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

IBOutlet properties must be readwrite… mostly

I couldn’t for the life of me figure out why two out of three IBOutlet-connected properties were being connected just fine, but a third wasn’t.  What was different?  Long story short: One was “(weak)”, meaning implicitly readwrite.  Apparently when I added that one I got it right accidentally. One was “(weak, readonly)” and yet still worked.… 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

SCNSphere can be expensive to recreate

In a current project I’m drawing hundreds of spheres, of varying sizes.  I discovered at one point that with them all in view simultaneously, performance was very bad (<10 FPS on my 6970M).  Trial and error revealed that changing the geometry complexity – by changing the segment count of my spheres – made a huge difference.… Read more