Did you know that, just like Python, Bash scripts, etc., you can run a Swift source file right from the command-line as if it was an already compiled executable? You betcha! 😎 The Swift REPL program honors the SHEBANG line in a Swift source file. #!/usr/bin/swift import Foundation print("") print(" Int8 - size: \(MemoryLayout<Int8>.size); stride: … Continue reading Scripting with Swift
Linux
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
Swift 5.3 on Odroid C2
As promised, here's the link to the build of Swift for the ODROID C2. This build was done on Ubuntu 20.04. Your results on other platforms/distros will most certainly vary. USE AT YOUR OWN RISK - I provide absolutely NO WARRANTY, implied or otherwise, with this what so ever. EDIT: 2020-09-22 - You will probably … Continue reading Swift 5.3 on Odroid C2
Swift on an Odroid C2
Over the weekend I managed to get a build of Swift working on the Odroid C2 SBC. As soon as I get a chance I'll TAR up the build and put it up on Dropbox. The build for the Raspberry Pi is still compiling. Here's the little sample program I wrote to test it out. … Continue reading Swift on an Odroid C2
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
Thoughts on GNUstep
For those that don't know GNUstep is a project that started many years ago to help bring Objective-C to the masses using operating systems other than Mac OS X macOS. Actually, Objective-C already existed on any platform that had access to the GCC compiler suite but what GNUstep sought to do was bring the primary … Continue reading Thoughts on GNUstep