fend
fend copied to clipboard
Converting `fend` scripts to `bc`/`dc` syntax for portable scripts
Not sure how doable this would be, but it'd be nice to have some way of converting a fend
script to bc
or dc
syntax (chiefly for embedding within a portable shell-script designed to run on systems that don't have fend
installed).
I haven't actually used bc
/dc
before, but this definitely sounds like it'd be a cool and useful feature to have.
I recommend starting with bc
, as its syntax is the easiest to learn and use in everyday practice. dc
uses Reverse Polish Notation and is a concatenative stack-based programming language that's literally older than C (it's one of the oldest surviving Unix commands, IIRC). bc
can even compile to dc
syntax, so the former is probably worth targeting first.