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

let path = “~/Desktop/sigh.txt” try “WTF?”.write(toFile: path, atomically: true, encoding: .utf8) 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 … 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

Do Nikon teleconverters work on the Sigma 105 macro?

In a word:  no.  And not just “they’re unsupported”, or that they have optical issues – they physically will not connect.  They are deliberately keyed to be incompatible.  Nikon teleconverters have a protrusion on their lens mount, which prevents any ‘standard’ Nikon-mount lens from attaching, unless that lens is missing a particular obstruction on the rear … Read more

SceneKit & shaders

Note: Since writing this originally I’ve figured out how to get at least some aspects of shaders working.  I’m still trying to flesh out the rest.  I’ll post an update or revised entry at some point. Ugh.  SceneKit supports shaders, technically.  But it’s almost unequivocally unusable.  Let me count the reasons: It doesn’t support geometry shaders … Read more

+[SCNTransaction setCompletionBlock:] always invokes the block immediately

It’s supposed to invoke your block when all the animations in the current transaction have completed. It doesn’t; it runs it as soon as the transaction is committed. Le sigh. It does appear to do it from the main runloop at least, as documented. So there is technically a delay, as a consequence of that … Read more