booldnf(1)

πŸ“¦
version 0.1.16 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ booldnf(1) ✨

okay bestie, pull up a chair, because booldnf is about to become your new fav lil command πŸ’– it's a section 1 manual page (yes, the cute executable-commands one) and it does exactly one thing but it does it flawlessly.


🌸 NAME 🌸

booldnf β€” converts a boolean expression to the DNF

like. that's it. that's the job. and it eats every time πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

echo 'a&(!b|c&!d)' | booldnf > result.txt

pipe it in, pipe it out, boom, done, no notes πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so booldnf is a program that reads boolean expressions from its standard input and rewrites them in Disjunctive Normal Form on its standard output. it's running on the BoolStuff library underneath, slay 🫢

now what even is Disjunctive Normal Form? bestie it's an ORing of ANDed terms. think of it like this: if you treat the OR as an additive operation and the AND as a multiplicative operation, then the DNF is literally a sum of products. math girlies rise up ⭐

house rules, no exceptions:

  • Each expression has to be on its own text line. one line, one expression, that's the vibe πŸ“
  • Variable names must be composed only of ASCII letters and digits. that's it. no dashes, no emoji (😭 i know), no nonsense.

the operators, learn them, love them:

  • the AND operator is &
  • the OR operator is |
  • the NOT operator is !
  • and parentheses are allowed, thank god, go wild with the nesting πŸŽ€

one more thing and it's actually iconic: the command flushes its output buffer after each result or error message, so it's safe to use with bidirectional pipes. communication queen fr fr. and results and error messages always take exactly one text line β€” no messy multi-line surprises, we don't do that here ✨


🌈 EXAMPLES 🌈

run this:

echo 'a&(!b|c&!d)' | booldnf

and it should display:

a&c&!d|a&!b

ate. no crumbs. πŸ”₯


πŸŽ€ LICENSE πŸŽ€

This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty.

and we mean absolutely. zero. none. nada. it's giving "you're on your own bestie" πŸ’€ (but legally, and in a nice open-source way 🫢)

πŸ’– AUTHOR πŸ’–

See the boolstuff(3) manual page. πŸ‘€


πŸ™ˆ BUGS πŸ™ˆ

See the boolstuff(3) manual page. πŸ‘€

like… same page, same energy, go look, iykyk πŸ¦‹


that's the whole manual, bestie β€” and it's dated May 24th, 2016, part of the booldnf(1) page (source/version and date all in one lil bow πŸŽ€). go forth, normalize some booleans, and be the main character of your shell session πŸ‘‘πŸ’…

πŸ“¦ where this page comes from