I've been busy in my increasingly rare free time adding some very useful tools to my Rubicon library for Swift. Most all of them came out of direct needs for my XML parsing library but I decided to include them in Rubicon so that they can be used in other projects. 1) RingByteBuffer This is … Continue reading Updates to Rubicon Swift Library
This is going to be a HUGE time saver!!!!
Now I can program my robot using Swift!!!! SwiftyGPIO
Bad Month
Have you ever had one of those days where you just can't seem to get anything right? Well, when it comes to my professional life (work), I seem to be having one of those days for the last month or so. No matter how hard I try I just can't seem to get it right. … Continue reading Bad Month
Please Take an Economic Class… or Two.
I am so very TIRED of seeing stupid posts like the one below. To me it shows one area where public education has completely failed our children by not teaching them important things like basic economics. This leads to our kids having this grossly fairy tale-like, over simplified view of economics. Our kids end up … Continue reading Please Take an Economic Class… or Two.
A Better RegularExpression
As promised a while ago I've sat down and hammered out a better replacement for Swift's NSRegularExpression class. As I said then, NSRegularExpression is not actually a Swift class but rather an Objective-C class that has been bridged over to Swift via Swift's excellent ability to interface with C, C++, and Objective-C libraries directly. But … Continue reading A Better RegularExpression
Scripting with Swift
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
Avoiding a Swift NSRegularExpression Pitfall
Until Swift gets a native regular expression class of it's own we are stuck with the Objective-C version - NSRegularExpression. The Objective-C version is very capable and works very well but it's important to remember that it is working on Objective-C NSStrings which, unlike Swift's native Strings, are based on the UTF-16 encoding. What this … Continue reading Avoiding a Swift NSRegularExpression Pitfall
Civil War!
SHA-1 Hash: BA2DBDE93D1AC56EBBE2E9C7EF6B67232CD84F0B
Swift Property Wrappers
From now on with each new version of Swift that comes out I'm going to take some time a dig through all the Swift Evolution Proposals that made it into that release. Some real gems made it into the last few releases that I didn't know anything about but are really cool. The one I'm … Continue reading Swift Property Wrappers
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