Hello, fellow front-end developers! Imagine a tool that’s not about punching in commands but a gateway to a world of coding artistry. That’s what the macOS Terminal became for me at Luxoft.
Development for MacOS *
Developing for Apple desktop OS
High-performance network library using C++20 coroutines
Asynchronous programming is commonly employed for efficient implementation of network interactions in C++. The essence of this approach lies in the fact that the results of socket read/write functions are not immediately available but become accessible after some time. This approach allows for loading the processor with useful work during the wait for data. Various implementations of this approach exist, such as callbacks, actors, future/promise, coroutines. In C++, these implementations are available as libraries from third-party developers or can be implemented independently.
Coroutines are the most challenging to implement as they require writing platform-dependent code. However, the recent version of the C++ 20 language standard introduces support for coroutines at the compiler and standard library levels. Coroutines are functions that can suspend their execution, preserving their state, and later return to that state to resume the function's work. The compiler automatically creates a checkpoint with the coroutine's state.
For a comprehensive understanding of C++ 20 coroutines, refer to this article. Below, we examine a code example using coroutines and describe important points applied during implementation.
Building your own CLI with Swift Programming Language
Command-line interfaces (CLI) are a common way to use applications. In iOS, we usually use scripting languages like Bash or Ruby to build those CLIs and automate mundane tasks. The most popular CLI for app signing and build automation is, without a doubt, Fastlane, which was initially written in Ruby. Fastlane is a great tool, convenient and fairly easy to use, and a lot of effort came into building it.
However, there's a great chance you considered moving away from Fastlane to avoid learning Ruby and to lower the entry threshold for your developers. Setting up a Ruby environment could be quite tedious and require additional devs' expertise to write and support those scripts.
Explore how to build your own command line tools with Swift in this article.
Electron + web camera (cpp-ffmpeg)
An example of using Electron + React JS and a native ffmpeg addon to access a webcamera
This guide may be helpful to someone who is trying to find a way
to work with Electron if they need to use a c++ library or code
I was looking for a more realistic example than a simple 'hello world' and i didn't succeed
Here are the links in advance:
- electron - https://github.com/khomin/electron_camera_ffmpeg
- addon - https://github.com/khomin/electron_ffmpeg_addon_camera
So let me share my experience...
MacOS Kernel, How Good Is This Apple?
At the very beginning of this year, Apple released the source code for macOS – Big Sur. It includes XNU, the kernel of the macOS operating system. A few years ago, PVS-Studio has already checked the kernel source code. It coincided with the analyzer release on macOS. It's been a while since then. The new kernel source code has been released. A second check? Why not?
Confusing extensions in Swift
Example with JSONDecoder
What would happen if we run the following piece of code?
struct Test<T>: Codable where T: Codable {
enum CodingKeys: String, CodingKey {
case value
}
let value: T
let info: String
}
extension Test {
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.value = try container.decode(T.self, forKey: .value)
self.info = "Default init(from decoder:)"
}
}
extension Test where T == String {
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.value = try container.decode(T.self, forKey: .value)
self.info = "Custom init(from decoder:)"
}
}
let data = #"{"value":"Hello, World!"}"#.data(using: .utf8)!
let object = try? JSONDecoder().decode(Test<String>.self, from: data)
print(object.debugDescription)
Try thinking for 5 seconds about the result.
Optional(
Test<String>(
value: "Hello, World!",
info: "Default init(from decoder:)"
)
)
How to find errors in a C# project working under Linux and macOS
PVS-Studio is a well-known static code analyzer that allows you to find a lot of tricky errors hidden in the source code. Beta testing of the new version has recently finished. It provides the possibility to analyze C# projects under Linux and macOS. The tool can also be integrated into the cross-platform IDE from JetBrains — Rider. This article will help you to get acquainted with these features using the example of checking the open source RavenDB project.
Beta testing of the PVS-Studio C# analyzer on Linux and macOS
More and more users of the PVS-Studio C# analyzer get interested in the possibility to utilize it for checking C# code on Linux and macOS. Today we have some good news.
Visual Studio for Mac: Take Control of Your IDE with Keybindings
Stylish Avalonia
Introducing solution-level NuGet Package Management in Visual Studio for Mac
We’ve made improvements to help you discover packages more easily. This includes an improved experience while searching for new packages, gaining an understanding of what packages are already installed in your project, and finding packages that have updates available. In this blog post, we will focus on the package management experience for a Solution. However, most of the experiences including installing, updating, and viewing installed packages have a similar new experience at the project-level, too.
To launch the NuGet Package Manager for a Solution, you can go to the context menu for the Solution and select «Manage NuGet Package…»:
Visual Studio for Mac: Top Features of the New Editor
At the core of the updated editors within Visual Studio for Mac is the shared language service with Visual Studio on Windows. What this means is that the same backend that powers the Windows version of Visual Studio now powers the macOS version as well. This includes IntelliSense, Roslyn, text logic, and all the language services behind the scenes. The only portion not shared between Windows and macOS is the UI layer, which stays native for each platform. In the case of macOS, that means using macOS frameworks like Cocoa and CoreText to power the UI experience. By using a native UI, while also being able to utilize support for native input methods as well as support for right-to-left languages, font ligatures and other advanced graphical features.
Here’s How to Update Node.js Via Visual Studio, NPM, Windows/Mac
I hope that you will find Node version 12 new capabilities compelling and soon you will upgrade your app to it.
In turn, you will get advanced debugging, intelligent coding with the powerful IntelliSense engine, interactive window, quick tracking of performance issues, unit testing, typescript integration, source control, cloud integration, and npm integration.
To get started in this walkthrough, this post captures the steps on how to update Node.js in Visual Studio, Windows/macOS, and NPM.
Microsoft Edge for macOS
Last month, we announced the first preview builds of the next version of Microsoft Edge for Windows 10. Today, we are pleased to announce the availability of the Microsoft Edge Canary channel for macOS. You can now install preview builds from the Microsoft Edge Insider site for your macOS or Windows 10 PC, with more Windows version support coming soon.
Getting Ready for macOS’s Hardened Runtime and Notary
With macOS Mojave, Apple introduced support for Hardened Runtime and Notary service. These two services are designed to improve application security on macOS. Recently Apple has stated:
“Beginning in macOS 10.14.5, all new or updated kernel extensions and all software from developers new to distributing with Developer ID must be notarized in order to run. In a future version of macOS, notarization will be required by default for all software.”
Today will help you to understand new rules from the Xamarin point of view.