It’s because the Booleans sometimes are flipped in display-server technology from the 1980s, particularly anything with X11 lineage, and C didn’t have Boolean values back then. More generally, sometimes it’s useful to have truthhood be encoded low or 0, as in common Forths or many lower-level electrical-engineering protocols. The practice died off as popular languages started to have native Boolean values; today, about three quarters of new developers learn Python or ECMAScript as their first language, and FFI bindings are designed to paper over such low-level details. You’ll also sometimes see newer C/C++ libraries depending on newer standards which add native Booleans.
As a fellow vim user with small hands, here are some tricks. The verb gU
will uppercase letters but not underscores or hyphens, so sentences like gUiw
can be used to uppercase an entire constant. The immediate action ~
which switches cases can be turned into a verb by :set tildeop
, after which it can be used in a similar way to gU
. If constants are all namespaced with a prefix followed by something unique like an underscore, then the prefix can be left out of new sections of code and added back in with a macro or a :%s
replacement.
Yeah, writing your own squeeblerizer sucks, but there’s no better option. GNU Scrimble can be used off-the-shelf as a passthrough, so the only real tasks are implementing Squeeb’s algorithm and a sprongler; then, your entire pipeline is merely something like:
Edit: Whoops! Forgot to mention, GNU Scrimble also has Snorble support out-of-the-box, and Scrimble clients have content auto-negotiation, so
your_squeeb
can just take JSON on stdin. GNU Scrimble is really nice for this sort of thing, just…big.And if you want to sprongle directly into a database or etc. then you can write
your_sprongler
to taste. Full disclosure: I have a fairly fast implementation of Squeeb’s algorithm in rpypkgs. However, I’d really recommend writing your own; it’s like twenty lines of code you can copy from Wikipedia and it’ll give you a good basis for extending it with your own desired changes later.You can read snorblite’s code if you need to figure out a specific sprongling technique, but it’s way easier to just go look up the original SprongCode from SprongReg. Use a search engine to get around the university’s paywall. This gets you the SprongCode UUID and you don’t have to read code written by a batshit fascist.