Clac – A command-line, stack-based calculator with postfix notation
1–10 of 29 posts
Re: Clac – A command-line, stack-based calculator with postfix notation
#2Re: Clac – A command-line, stack-based calculator with postfix notation
#3Re: Clac – A command-line, stack-based calculator with postfix notation
#4Re: Clac – A command-line, stack-based calculator with postfix notation
#5I hope this doesn't come off as snide... I just don't understand why the author would think this is something worth showing off.
Re: Clac – A command-line, stack-based calculator with postfix notation
#6I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C. 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.
Re: Clac – A command-line, stack-based calculator with postfix notation
#7I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C. 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.
Nostalgia.
Re: Clac – A command-line, stack-based calculator with postfix notation
#8I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C. 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.
Also the command dc ships with most Linuxes. It is included with the bc package.
Re: Clac – A command-line, stack-based calculator with postfix notation
#9I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C. 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.
Re: Clac – A command-line, stack-based calculator with postfix notation
#10I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C. 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