Kartik Agaram
04/17/2023, 2:28 AM+
and -
[2] causes the number to be incremented and decremented, respectively. Now build addition out of it. Zooming into a number n
shows it to be a loop of n iterations. When the spaceship collides with n
it loops through n times, and the number inside it has n added to it. At a high zoom, you see the spaceship loop n times before exiting the "solar system". At a low zoom you see the spaceship exit instantaneously with n added to its value. Now you can imagine a reduce operation as a series of solar systems that the spaceship visits one by one.
Example 3: The spaceship contains a binary heap to insert and delete elements from depending on objects it collides with. Zooming into any single collision reveals the tree structure to be the "space" that a smaller spaceship containing a single number bounces among.
Two properties that seem important from these examples:
• A hierarchical nature where space and spaceship are duals, and zooming in and out causes them to turn into each other.
• Rendering the state of a spaceship needs to be extensible[3]. We need to leave Befunge's ASCII behind.
At the largest scale, state machines feel like a really powerful way to represent the state within a spaceship. I often find them to be the outermost architecture of a large program. But to actually find the state machine I have to flail around for a long time. If we could use some visual paradigm at the largest scales but zoom into text as needed, programs might be much more comprehensible.
[1] https://esolangs.org/wiki/Fungeoid
[2] https://en.wikipedia.org/wiki/Brainfuck#Language_design
[3] Like in my old Pong demo: https://handmade.network/snippet/1561guitarvydas
04/17/2023, 11:24 AM