#truthify

GenghisKen CoarGenghisKen@ruby.social
2022-11-18

@MoskitoHero

I use something like that in a more general sense:

#𝚝𝚛𝚞𝚝𝚑𝚒𝚏𝚢(𝚊𝚛𝚐) => 𝙱𝚘𝚘𝚕𝚎𝚊𝚗

Going against the UNIXish #paradigm of "zero means true" (which has *never* made sense to me), 0, 0.0, and "" evaluate to #𝚏𝚊𝚕𝚜𝚎. Other numerics and nonempty strings are #𝚝𝚛𝚞𝚎. Anything other than a number or string will be coerced with #𝚝𝚘_𝚒, and evaluate to 𝚏𝚊𝚕𝚜𝚎 on failure. I'd have to check the code, but I think you can specify how strings should be treated.

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst