Within the Swift Foundation Library there exists a function called withoutActuallyEscaping(_:do:) that has, at least for me, become one of those hidden gems that is extremely useful for things beyond its original intention. As it's documentation states: Allows a nonescaping closure to temporarily be used as if it were allowed to escape.Apple Documentation - Swift … Continue reading Helpful Swift Trick #1 – withoutActuallyEscaping(_:do:)
macOS
Fastest Way To Get The Time
So, for my 6502/6510 emulator project I've been trying to figure out the best (read that, "fastest") way to get the time with nanosecond resolution. I need this because the North American version of the Commodore 64 ran at 1.02MHz (1,022,727Hz) and so that means the clock "ticks" every 977.8 nanoseconds. And that's just for … Continue reading Fastest Way To Get The Time
Documentation 😳
I've started using Jazzy to generate documentation for my Swift and Objective-C projects. If you do development on the macOS platform then I highly recommend using Jazzy. It's by far the easiest to use. Here's a sample: Rubicon â–º Extensions â–º String â–º split(on:limit:)
Rubicon
I've made a major milestone in my personal project Rubicon. Â I've gotten it where it will build on Linux as well as Mac OS X. Â More info is in the readme file. Â Check it out:Â https://github.com/GalenRhodes/Rubicon
Always an Easier Way
Previously in Avoiding an Objective-C Pitfall #1 I discussed a more stable way of creating singletons in Objective-C.  As with all things in the world of Apple there's always an easier way and that way comes to us via two very powerful yet unnoticed (in the Windows and Linux communities at least) APIs that Apple has contributed to … Continue reading Always an Easier Way