niss

im gay animals irl. it's true

enjoyer of type systems and weird creatures

banner: zylex


🔞 lewd account
cohost.org/nissnsfw
🌐 elsewhere
yummy.cricket/#links

bruxisma
@bruxisma

You are outside giggling at the latest internet post about how YAML is bad because there are 5 different ways to parse booleans. Suddenly, the sky has darkened. You are robbed of speech. Your breath has quickened, and you are tearing at the burning pain in your chest that has suddenly swelled within you. You must be in hell.


CMake looms over you. There is a string in front of you. It is the entire text of The Great Gatsby, with one minor alteration: it ends in -nOtFoUnD

There is a loud booming voice within your mind

Is the value true, or false?

You are presented with two stones, one marked YES, the other marked OFF

You begin to sweat. "The empty string is a false value! This string has contents!", you hear your ancestral guardians wise words echoing through time trying to save you.

You start to point to YES. "NO! The word NO is near the end of the string. It must be a trick!", a winding, slithering voice whispers in your ear, as a small weight lightly rests on the blade of your left shoulder. "YOU FILTHY RAT, RON. STRING COMPARISONS ARE CASE SENSITIVE AND EVERYTHING IN CMAKE IS A STRING", you hear shrieking as a bird of omen lands to rest on the opposite shoulder.

TIME. TO. CHOOSE.

The voice of CMake is so loud your body becomes numb.

Without realizing it, you've reached out and tried to stabilize yourself on the OFF stone, so as to not shatter into glass and sand. CMake leaves, satisfied with your answer.

Pure luck has saved you this day. It will not be the last time. You make a mental note:

anything ending in -notfound in a case insensitive way is considered false according to CMake.


You must log in to comment.

in reply to @bruxisma's post:

  1. it's stringly typed because the creators really liked Tcl in the 90s and Javascript was only 2 years old at that point
  2. It was meant to replace autotools and autotools had multiple ways to express false because there were (at the time) about 10 or so different shells that were close to being posix but not quite so a boolean was just "whatever dude, idk"
  3. Scons happened
  4. When they implemented the first find_ set of functions they couldn't return booleans, so they used <name-of-variable-requested>-NOTFOUND.
  5. Sometimes you just wanna to ask a user a question and get back a yes, a no, an on, an off, a y, an n, or an ignore :)))