News for hackers. Stuff that matters.
Re:SSL: Stupid Stack Language by Sniffnoy on Saturday March 13, 2021 @02:50PM (#26449376)
This description doesn't explain how this correspondence between 't's and 'u's is determined?
Re:SSL: Stupid Stack Language by kwhitefoot on Sunday March 14, 2021 @03:43AM (#26453491)
As nested pairs I would think. That is, when jumping forward from t to u scan the program incrementing a counter each time you see a t and decrement when you see a u, when the counter goes negative you have reached the matching u.

But what is supposed to happen when there is no matching u? Undefined like C and so implementation dependent? Or is the documentation just a summary and the real specification is the Python implementation?

In fact looking at the Python on the esolang site that is what happens and if there is no matching u then the program counter will have advanced beyond the end of the program and the program terminates. Going back fro u to t is slightly different in that if there is no matching t then it will simply continue from the first instruction.

Language design is difficult even for seemingly simple languages.