An unhandled exception in the English language

While no one expects a language that formed organically via iteration and evolution to be free of logical errors, over time conventions have been formed to deal with most of them such that for the most part there is a “right” way of saying something and a “wrong” way, even when there’s no obvious rule to cover the use case in mind.

The BBC has an excellent article with some examples and even past attempts at creating rules to deal with these cases.

“Adjectives in English absolutely have to be in this order: opinion-size-age-shape-colour-origin-material-purpose Noun. So you can have a lovely little old rectangular green French silver whittling knife. But if you mess with that word order in the slightest you’ll sound like a maniac. It’s an osadd thing that every English speaker uses that list, but almost none of us could write it out.”

My personal favorite “it’ll blow your mind” rule is with regards to ablaut reduplication:

You are utterly familiar with the rule of ablaut reduplication. You’ve been using it all your life. It’s just that you’ve never heard of it. But if somebody said the words zag-zig, or ‘cross-criss you would know, deep down in your loins, that they were breaking a sacred rule of language. You just wouldn’t know which one. All four of a horse’s feet make exactly the same sound. But we always, always say clip-clop, never clop-clip. Every second your watch (or the grandfather clock in the hall makes the same sound) but we say tick-tock, never tock-tick. You will never eat a Kat Kit bar. The bells in Frère Jaques will forever chime ‘ding dang dong’.

But what do you do when two rules or conventions clash? And what does that have to do with programming or computer science?

Continue reading

Transparent encryption and decryption in rust with cryptostreams

C# developers have long been spoiled when it comes to quickly and easily getting up and running with encryption thanks to the .NET CryptoStream  class, which wraps a Stream instance in a second Stream that automatically encrypts/decrypts anything read/written to/from it before passing it along to the underlying Stream. Long story short, it makes it ridiculously easy to add encryption or decryption facilities to an existing pipeline, as after setting up the CryptoStream instance you can just treat it like any other Stream object and read or write to it normally.

Encryption has been somewhat of a sore spot in the rust ecosystem after a few false starts with “native” rust encryption libraries that went nowhere, but today the rust community has fortunately adopted the OpenSSL bindings as the approach of choice, and the rust-openssl crate makes it easy to both bundle and consume the openssl bindings from rust in a cross-platform manner. What it doesn’t do is make encryption and decryption any easier than OpenSSL itself does.

Continue reading

Could not find `avx` in `x86`

Let’s start this article with an error message right off the bat:1

~> cargo install ripgrep --features 'avx-accel simd-accel'
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing ripgrep v0.9.0
…
error[E0432]: unresolved import `simd::x86::avx`
  --> /home/mqudsi/.cargo/registry/src/github.com-1ecc6299db9ec823/bytecount-0.3.2/src/lib.rs:49:16
   |
49 | use simd::x86::avx::{LowHigh128, u8x32};
   |                ^^^ Could not find `avx` in `x86`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error: Could not compile `bytecount`.

Continue reading


  1. I’m primarily blogging this as I’ve run into – and worked around – this error several times before running into it again and not being able to remember how I resolved this problem the last time around. ↩︎

PrettySize for rust

We’ve just published a rust port of our PrettySize.NET library, now available via cargo and github. Like its .NET predecessor, PrettySize-rs aims to provide a comprehensive API for dealing with file sizes, covering both manipulation and human-readable formatting.

Continue reading

Modern C++ isn’t memory safe, either

A recurring theme in just about all discussions revolving around the comparison of programming languages – apart from using the wrong tool for the job, adamantly pushing a language objectively/demonstrably inferior at x out of blind loyalty, bashing on languages you’ve never used or studied simply because you’ve seen firsthand how well received such comments can be, and worse – is acting off of stale information that no longer necessarily holds true.

At NeoSmart Technologies, we don’t just have one dog in the race; our software is developed in a multitude of languages, ranging from C/C++ to both desktop/web C#/ASP.NET, rust, [JS|TypeScript]/HTML/[LESS|CSS], (ba)sh scripting, and more.1 So it’s always interesting to observe these discussions (sometimes up close and personal and sometimes disinterestedly from afar) and observe what arguments remain standing once the dust has settled and the troops have gone home for the day.

Continue reading


  1. Gasp, yes, even PHP! ↩︎

iMessage for Windows

A year and a half ago, I heeded the growing warning signs that indicated the looming demise of macOS, née OS X, as a platform for developer and true computer enthusiasts, and set about trying to find a new ecosystem. Luckily, this was around the same time that updates to Windows 10 combined with the the continued awesomeness of WSL,1 made it a viable option for reconsideration.

While Windows had always remained my primary development platform of choice due to the nature of my work, there were various apps that I’d become accustomed to using and had to seek out alternatives for, chief of which was iMessage. As someone that has never embraced the mobile craze, I sorely missed the ability of texting (or “iMessaging”) from my PC, and came to absolutely despise having to drag my phone out of my pocket and text from its cramped display, constantly fighting autoincorrect and embarrassing myself with typos and misspellings. I tried switching to alternative platforms, including WhatsApp, Skype, and FB Messenger; but nothing came close to matching the pure simplicity and sheer genius of iMessage’s “SMS backwards-compatibility” approach that upgrades iPhone-to-iPhone communications to iMessage while transparently falling back to SMS or MMS where iMessage was not an option.

Continue reading


  1. WSL is the Windows Subsystem for Linux, also known as “Bash on Ubuntu on Windows,” offers a native Linux-in-a-shell with nice (and growing) integration with Windows. Check it out! ↩︎

Converting a binary/blob guid column to text in SQL

Since we live in an imperfect world where we often have to trade ease-of-use for simplicity and abstractions for performance, while dealing with computer systems and standards you’ll often run into tasks that seem like they should be really obvious and simple only to later discover that in reality they lead down a rabbit hole. Such is the case anytime a developer comes into contact with the individual bits of a binary blob – and that can happen even when you least expect it.

The premise is simple: given a database powered by, for example, the extremely popular MySQL or SQLite RDBMS engines that do not offer “native” representation of UUIDs or GUIDs, database designers and systems programmers have a choice to make: do you store a GUID as a plaintext (VARCHAR or TEXT) and take the performance, memory, and storage hit that comes with it, or do you take off the gloves and dig out the BLOB column type in your DDL?

Continue reading

Windows users vulnerable to Meltdown/Spectre until at least January 9, 2018

Security-conscious Windows users attempting to protect themselves against Meltdown and Spectre attacks in the wild are being met with a deceptive “Your device is up to date” message — but they’re not yet protected.

In the days following the disclosure of CPU cache attacks Meltdown and Spectre, hardware, kernel, and software developers have rushed to provide security updates for their respective devices and platforms in an (ongoing) effort to secure their users against the wide-ranging (and not yet fully understood/internalized) side-channel vulnerabilities disclosed a few days ago on the 3rd of January, 2018.

For those that aren’t up to date on these attacks – stop now, and read this excellent LWN article on Meltdown and Spectre; if you’re so inclined, you can even have a look at the original Google Project Zero article where it all started.1

Continue reading


  1. While the latter is more technical in nature, programming-inclined readers in the audience may find it to actually be easier to grok with its more definite and concrete approach, vs the somewhat abstract nature of pretty much all the other coverage out there. ↩︎

Tahoma vs Verdana

Ask your favorite typophile about the difference between Arial and Helvetica, and you’re sure to regret it… unless you have a latent appreciation for the differences between font faces, the attention given to kerning and hinting, and more. But ask them what’s the difference between Tahoma and Verdana, and you might just be surprised by the ensuing silence. Yet, these are two of the most popular online fonts, and have aged significantly well considering they share corporate roots with Comic Sans and Arial.1 If any fonts ever deserved scrutiny and attention, it’s these two.

Here are two lines of text, one in each of the two fonts in question:

Continue reading


  1. Just to name two fonts that designers love to hate. ↩︎

What happened to the sandy text editor?

The sandy text editor is an open source project from the team over at suckless.org, which make painfully minimal1 alternatives for popular tools and applications for unix-ish platforms.

But perhaps the tense being used here is wrong. For quite some time, sandy, suckless’ minimal vi(m) replacement, has been unavailable. The git repository is offline; the root cgit instance returning the following “No repositories found” message:

Continue reading


  1. Perhaps best described as borderline masochist in their austerity and spartanism ↩︎