News for hackers. Stuff that matters.
Re:SSL: Stupid Stack Language by mikewarot on Saturday March 13, 2021 @09:03AM (#26446634)
It is possible to implement a real forth in this language.. but it would be as slow as molasses in January. You can get the depth of the stack, you can swap arbitrary positions of the stack, and do math... so you could build a system of fixed allocation of memory IN the stack, which means you could then compile new definitions

The interpreter doesn't add like forth... it leaves the 2 values to be added still on the stack... you have to do "glblb" to do a normal add, for example.

A fun exercise, but not a language I'd want to work with.

Edit: Specifically missing are any ways to persist variables, or allocate memory. Yes, you could fake all of that with some very careful coding, but a single mistake or clear stack (y) would send it all tumbling down.

Re:SSL: Stupid Stack Language by hansvm on Saturday March 13, 2021 @10:56AM (#26447373)
> but a single mistake or clear stack (y) would send it all tumbling down.

This seems especially prone to some kinds of nasty bugs if you're not careful with what you're doing:

Would you like to save your progress? [y/n] >> y