Newsletter # 4 Using Kernel Queues notifications in Swift Oct 11 2019
Hello,
New OS version this week! I hope you had an easy upgrade to macOS(10.15) Catalina. I'm glad that everything went smoothly on my laptop. A couple of friends reported that their installation got stuck at the "Setting Up Your Mac" screen. The solution was to force restart and after everything completed as expected.
It's crazy how far we've come. Many people complained about the upgrade being buggy, but I think upgrading now is smooth. I remember having to recompile everything after a kernel update on my Linux box, that's when things got interesting. Different times.
Also, this week's post was out a little later than usual, so if you haven't check it out you can find the link here:
https://rderik.com/blog/using-kernel-queues-kqueue-notifications-in-swift/
The idea was to show how we can take advantage of kernel notifications. How cool is that? Imagine, we only have to wait for the kernel to report to us about system events. We can use kqueues ( Kernel Queues) to "listen" for events like process state changes, memory warnings, file system changes, timers, sockets. The applications are quite useful. It might be something that you don't think you'll need. But when you find yourself in a situation that benefits from using the Kernel Queue notification mechanism, you'll be glad that you know how to use them.
I also want to thank all of you for reading the content I create. The other day I got a nice message about my content. It's nice to hear from you and have conversations about topics we find interesting.
Ok, time to go now.
Have a good weekend. Until you next week.
Derik
Project I want to explore - rewrite of Swift Driver
This project sounds interesting, and it's just starting. I think it's an excellent opportunity to jump in and get involved.
"Swift's compiler driver is a program that coordinates the compilation of Swift source code into various compiled results: executables, libraries, object files, Swift modules and interfaces, etc. It is the program one invokes from the command line to build Swift code (i.e., swift or swiftc) and is often invoked on the developer's behalf by a build system such as the Swift Package Manager (SwiftPM) or Xcode's build system."
https://github.com/apple/swift-driver
Tip of the week:
If you want to obtain a list of all available keybindings in the os, you can use the following command:
1
$ plutil -convert xml1 /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict -o -|pl|grep -v noop:|ruby -pe '$_.gsub!(/[^ -~\n]/){"\\U%04x"%$&.ord}'
I'm a vim user, and having to use the mouse feels sluggish. If you are the same, you'll find some useful keybindings that you can incorporate in your everyday use.