Talk:Gaot++

From Esolang
Jump to navigation Jump to search

I have been enjoying the humorous nature of this language as well as the challenge of writing "simple" programs in it. I have a question about "invalid" commands and the examples. The cat and reverse cat examples use "blet" as a "no operation" command. This makes writing useful loops much easier and does not generate an error in the reference implementation. In fact, the reference implementation seems to treat any word that doesn't match the baa* or blee*t pattern as a no-op. (They aren't just ignored, they count as an instruction for the skip commands). Like I said, this is extremely useful for loops and other things like just popping the top stack value without using it (bleeeeeeet blet). But is this an intended feature of the language or just a result of lack of error checking in the implementation?

Has anyone constructed useful loops in Gaot++ without using no-ops? I'm also wondering if it is feasible to implement subroutines in Gaot++? I can imagine that it would be possible to skip over blocks of code that use the "no-op skip command" pattern and test at the boundary of each block for a value that means "run this block". But this might only allow for jumps in one direction and I'm not sure if there is a way to effectively jump between blocks in both the forward and backward directions. These are things I'm hoping to investigate.

By the way, I've found several bugs in the reference implementation. Fixes are available from my fork of Gaot++ on Github. I've also written some Python functions for a "translator" that converts Gaot++ code back and forth (ha!) to a Forth-like syntax that is much easier to read and write. - Anthonykozar (talk) 21:24, 12 December 2021 (UTC)