EXAPUNKS

EXAPUNKS

Not enough ratings
EXA-EXAPUNKS-PUNKS (EXA INTERPRETER)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
9.424 KB
May 5, 2021 @ 9:29pm
1 Change Note ( view )

Subscribe to download
EXA-EXAPUNKS-PUNKS (EXA INTERPRETER)

Description
Yo dawg I heard you like EXAPUNKS so I put EXAPUNKS in your EXAPUNKS so you can code while you code.

Create an EXA interpreter that will execute a script containing a subset of the instructions (DROP, GRAB, LINK, SEEK, COPY) and registers (X, F).

A solution within 100 lines is difficult but not impossible.
2 Comments
akeustis  [author] Jun 1, 2021 @ 11:10pm 
Anyone need a hint? Here's an outline for how I solved it in under 100 lines:
Have two EXAs, one spits out the contents of 300, the other converts them to the index in file 301. If it's a number literal, it won't be found in the file, so spit out a sentinel value (such as -1) followed by the number value
Have a third EXA that receives the instructions from the global M network. It's important to interpret something like "GRAB X" as "copy X to a temporary register" followed by "grab the value in that temporary register". I ran out of registers so I ended up using local M for this (with the help of REPL).
Use killbots on a timer to leave no trace in case the execution bot dies. If it doesn't die, kill the killbot.
zwippie May 16, 2021 @ 3:39pm 
Wow, this a real brainteaser, thank you!

I've not managed to solve this one but I will keep trying. :D