It was written in B before the C programming language was created.
Is there a command line Forth interpreter out there that can save words or load a startup dictionary each use?
5 4 mark 3 2 1 sum -> 5 4 6On a side note, the description of arithmetic says that - and / swap the inputs, and it describes the operators as popping values a and b (and in the case of swap, then pushing a and b back on). This is a little confusing. It would be much simpler just to say that all binary operators pop values b and a. Now you don't have to swap anything, because - and / will still just perform a - b and a / b. And the fact that this swaps + and * is irrelevant, because those operators are commutative. And the swap operator makes more sense, because it "pops values b and a, and pushes values a and b", so you can now actually see the swapped values in the description.
Unfortunately, the homepage seems to be down at the moment, but here's a freecode link. It's also packaged for most popular distros.
I use Free42 for iOS and it works beautifully. Plus I can leave my real 42s safe in a drawer at home.
https://itunes.apple.com/us/app/free42/id337692629
There are other builds for Android, Windows, Mac, and Linux:
[1]: https://en.wikipedia.org/wiki/Bc_(programming_language)
[2]: https://unix.stackexchange.com/questions/124518/how-is-bc-di...
I hope this doesn't come off as snide... I just don't understand why the author would think this is something worth showing off.
In fact, the code is extremely simple. As I mentioned in the README, I've used dc a lot and what I propose with clac is an improvement (for my taste) regarding the UI, as there's an always-visible representation of the stack that gets updated as you type. I recorded a short video to show it in action: http://files.soveran.com/misc/clac.mov
To make this clear, I would upload your video to gfycat and link the gif in your readme.
Nostalgia.
There's a large class of people who can be relied on to see this as a noteworthy accomplishment -- students. More experienced hands will note the absence of range checking and error trapping.