Hacker News new | ask | show | jobs
by protomyth 3360 days ago
Nice. I did one in Perl a long while back. I added sum to sum the contents of the stack (good for bill paying day) and pt for Pythagorean theorem because I was doing a lot of cable distances.

Is there a command line Forth interpreter out there that can save words or load a startup dictionary each use?

1 comments

That's interesting: commands that consume everything in the stack. About saving/loading words: I have plans to work on that, it could be a very useful feature.
Postscript had the concept of dropping a mark on the stack that allowed commands that would consume the whole stack to also stop at a mark if encountered.

  5 4 mark 3 2 1 sum -> 5 4 6
I love the idea, thanks for the tip!