Re:The Namingless Programming Language
by bruce343434 on Monday February 19, 2024 @06:22AM
(#39428561)
_ is eval
"The datastructure" is cons
Re:The Namingless Programming Language
by lifthrasiir on Monday February 19, 2024 @06:27AM
(#39428607)
`_` is weaker than eval. It doesn't allow for any sort of recursion if I haven't mistaken.
Re:The Namingless Programming Language
by LegionMammal978 on Monday February 19, 2024 @08:47AM
(#39429661)
Indeed: it looks like on each iteration of `execute()`, exactly one leaf node is popped from `left`, no more and no less. So since there's nothing that can add more nodes to `left` after the program is first loaded, there's no way to call `execute()` more times than the total length of the program.
Another fix I believe sufficient (and perhaps a bit more interesting) would be an operation to exchange `left` and `right`, so that the program is replaced with the data, and vice versa.
What's going on here is that there are actually two operations, where one is spelled `_` and another is spelled every other character. The program starts with an empty array of trees (what is called the "current branch" here), and any character other than `_` appends to that array, while `_` takes the last element and does something accordingly. And that's a common theme for light-hearted esolangs: that single operation encodes a lot of semantics so that there are in fact multiple super-operations described with that operation. It is much harder to design a minimal esolang without no obvious super-operation structures.
One thing less obvious from the description is the Turing completeness. I think it is not, because the actual computation is only possible via `_`, but the number of `_` operations is set from the initial program. If `_` can be executed undefinitely, it is relatively easy to construct a program that replicates itself (cf. quine) in the current branch and `_` keeps running the replicated program over and over. Alternatively `_` can have a super-operation that can execute `_` multiple times, for example by interpreting a particular branch as a program [1]. But as it stands, it doesn't seem to have any sort of looping. A simple fix would be to assume an infinite number of `_` following the input program.
[1] This sort of iteration is not very uncommon in esolangs. See, for example: https://esolangs.org/wiki/Muriel