#if DEBUG in Swift

Sigh. The Swift team give an impeccable impression of a group of people who’ve never actually tried to use Swift. An incredibly basic compiler task is to provide code a way to distinguish between debug & release builds, in order that it can behave accordingly (e.g. change the default logging verbosity, change asserts from fatal to… Read more

EXIF metadata stores random gibberish for dates & times

Warped clock face spiralling ever inwards

I hadn’t ’til yesterday realised that EXIF metadata doesn’t actually store dates & times correctly.  Whoever came up with the spec all those decades ago clearly didn’t know how to work with dates & times correctly.  This is immensely frustrating since now we have countless images taken with timestamps that are collectively gibberish. The problem is… Read more

Stupid Swift error message #a bajillion and one

Input code: Push button.  Expect results (or at least bacon).  Get: Foo.swift:76:21: error: expected ‘,’ separator .day: { String($0 + 1) }, ^ , Foo.swift:76:21: error: expected expression in list of expressions .day: { String($0 + 1) }, ^ Foo.swift:76:21: error: expected ‘,’ separator .day: { String($0 + 1) }, ^ , Believe it or… Read more

macOS 10.12.2 appears to have brought with it some GPU issues

I run Einstein@Home, using both CPU cores & my GPU.  Other than a few month period where Einstein@Home was issuing broken GPU work units, I’ve been successfully doing this for years, I think.  Longer than I can really remember, in any case. It appears, however, that 10.12.2 has introduced some serious issues impacting those GPU… Read more

Flinging poo in Swift

Thanks to one of the genuine upsides of Swift, full Unicode support in the compiler itself, you can do: Finally you can express yourself honestly within your program: Or, if you prefer to be polite & British about it: You can go further, if you like, and have all manner of interesting things thrown about… Read more