Talk:Footsteps
Out of bounds?
What happens if the referenced line is out of bounds (ie, not in the program)? Wrapping? I would assume so from the example on the page, unless it's just a random case displaying syntax.
And what if the program runs out of lines? Such as:
0: end 0 1: <empty>
An intriguing language here, at any rate. --Keymaker (talk) 11:19, 12 June 2017 (UTC)
- Either wrapping or undefined; I haven't decided yet. I guess the answer is "undefined if the language is still TC with it undefined, wrapping otherwise". (The aim of the language is to have very terse implementations in high-level languages, and thus leaving things undefined when possible aids with that aim.) Running out of lines altogether would halt the program. --ais523 22:28, 14 June 2017 (UTC)
Start 0
What is wrong with start 0
? It seems to have an unambiguous meaning, pointing to the current / first line, since lines are zero-indexed, and end 0
is explicitly stated to be the last line in the semantics section.
The only reason I can think of is to prevent infinite loops -- but those are required for the language to be Turing complete. I can't see another sensible way to repeat something indefinitely, or to repeat something some number of times that isn't known (i.e. hardcoded) in advance. Both are needed for TCness. Furthermore I don't think you could generally prevent end
references from accidentally referring to the current line at least some of the time, so discouraging start 0
doesn't even avoid loops.
AFAICT start 0
is well-defined (copy current line to the end of the program), and is a sensible direct way to achieve something required for Turing-completeness, and therefore unavoidable. Salpynx (talk) 03:58, 19 December 2022 (UTC)
- I think it's there just to make things more difficult, to prevent a line copying itself, and instead needing to copy several, which together (when executed) have the same effect. Why that is, I have no idea... Anyway, I think there's a good chance
start 0
won't be necessary for the language's Turing-completeness if it's one day proven. Some years ago I tried different things before giving up, but needing 'start 0' was not a huge problem. Granted, my point is a bit meaningless as I didn't prove anything, so let's just say based on everything I observed it was not needed in my systems. What stopped me were empty lines; they caused more problems than I could solve. It would be interesting to think about this problem a bit again but I think it needs a better environment for testing/programming. I made a Javascript interpreter (unreleased) that displayed added lines in different color, thus allowing one to see where the cycle was, and when the original lines were all executed, the color of the new lines was changed back to the first color and the same repeated. (Of course the colouring doesn't help much if the program doesn't rely on clearly identifiable cycles, but mine did.) --Keymaker (talk) 17:18, 19 December 2022 (UTC) - I had a particular implementation of Footsteps in mind when I designed the language, and it removed the line of commands that's currently being run from the program before running it, so
start 0
couldn't be implemented – it would have nothing to refer to. (In general, the existence ofstart 0
would prevent you using destructive iterators that remove commands from the line as they're being run, and rather reduces the number of possible implementations.) --ais523 04:38, 15 February 2023 (UTC)
is not ResPlicate a subset of this, thus proving it also turing complete?
Maybe I did not understand something, but I think ResPlicate could easily be simulated by this. What do you think? --Pro465 (talk) 08:10, 21 September 2023 (UTC)
- In ResPlicate, the copied section of code gets deleted. In Footsteps, it is still there and gets run. This is a major difference between the languages that makes a proof difficult – in ResPlicate it is easy to skip over unwanted code, but in Footsteps, once a command is added to the program there is no way to prevent it running. --ais523 13:22, 21 September 2023 (UTC)
- Oh, right. I actually had a similar idea but it would copy the previously executed instructions, basically like Xeroxer but without the jumping. I gave it up though (because it seemed too hard for my feeble mind to comprehend). but I think this would be a bit easier than that. we basically need:
- empty lines (no effect)
- some way to set those empty lines as the "arguments" to the next lines, thus nullifying their effects.
- The second requirement could only be fulfilled if we have "end" as the referents of all the (important) commands, since the end is the only place we can immediately modify. --Pro465 (talk) 16:41, 21 September 2023 (UTC)
- Oh, right. I actually had a similar idea but it would copy the previously executed instructions, basically like Xeroxer but without the jumping. I gave it up though (because it seemed too hard for my feeble mind to comprehend). but I think this would be a bit easier than that. we basically need: