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

ambiguous reference to member ‘joined()’

"What do you want" scene from The Notebook

You can readily tell that Swift was created by a C++ fanatic, by its fucking obtuse error messages. ⤹ Me             Swift compiler ⤵︎ In today’s episode of “what the fuck do you want, compiler?”, we tackle: foo.swift:186:39: error: ambiguous reference to member ‘joined()’ log.debug(“\(thingies.joined(separator: “, “))”) ^~~~~~~~ Swift.BidirectionalCollection:27:17: note: found this… Read more

Swift’s String.write(toFile:…) can’t handle tildes

Result?  Explode: Error Domain=NSCocoaErrorDomain Code=4 “The folder “sigh.txt” doesn’t exist.” UserInfo={NSFilePath=~/Desktop/sigh.txt, NSUserStringVariant=Folder, NSUnderlyingError=0x1018110b0 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}} And since there’s no documentation on that write() method, and this is obviously a perfectly reasonable request that can’t sanely yield that bizarre error message, you could be forgiven for having no idea how… Read more

SQLite table constraints must be specified after all columns

Marking this one for future reference. TL;DR:  You have to specify all the columns in your table, in a CREATE TABLE statement, before you specify table constraints like primary or foreign keys. SQLite gives the most useless error messages most of the time.  Case in point: CREATE TABLE “Foo” ( “ColumnA” TEXT NOT NULL UNIQUE, “ColumnB”… Read more

Building John The Ripper Jumbo for macOS Sierra

It’s quickly apparent that John The Ripper Jumbo doesn’t build out of the box on macOS, and probably hasn’t for a long time, due to its complaint about missing OpenSSL headers. This guide was almost helpful, except it’s out of date – e.g. the Makefile.in patch it provides no longer applies cleanly – and simply doesn’t… Read more

Swift[ly crashes]

Finally got around to trying out Swift today.  Literally within thirty seconds of actually writing code, it started crashing the Swift compiler.  And almost anything I could come up with crashed it.  In fact, I spent about an hour just trying to figure out how to create an NSDirectoryEnumerator without crashing the compiler, before just… Read more