Download Game! Currently 82 players and visitors. Last logged in:TikkuDynaMutaFrenor

Blitzer's Blog >> 72451

Back to blogs index
Posted: 15 Sep 2026 14:58 [ permalink ]
I added this to PUSH in opcodes.js, is this enough?:-

==
B B B B // 2. FORGIVING VM: Always add to destination! (Prevent duplicates)
B B B B if (!ctx.memory[dest].includes(item)) {
B B B B B B ctx.memory[dest].push(item);
B B B B }
==

Testing with debug ports et all patched-in: 

==[ Terminal ]==
--- FSO Compiler Pipeline ---
[1] Reading source intent from game_idea.txt...
[2] Compiling via local cluster...
[3] Artifact saved to game_idea.md. Booting VM...

========================================


[SYS] Live Control Plane active on http://localhost:8080
You are on a deserted beach. To the north is a dense jungle, and to the east
is a rocky cave.

>B
[ENV EVENT]: A stray wooden boat washes up onto the beach, carried by the
tide.

==[ /Terminal ]==

==[ Terminal-2 ]==
$ curl -X POST http://localhost:8080/memory \
B B B-H "Content-Type: application/json" \
B B B-d '{"ISLAND_KEY": "TRUE"}'
{"status":"success","memory":{"INVENTORY":"[]","TREASURE_FOUND":"FALSE","ISLAND
_KEY":"TRUE"}}$B
$B
$B

==[ /Terminal-2 ]==

==[ Terminal ]==
[DEBUG] External process updated memory: { ISLAND_KEY: 'TRUE' }
i
node:internal/readline/emitKeypressEvents:74
B B B B B B throw err;
B B B B B B ^

TypeError: inv.join is not a function
B B at RuntimeEnvironment.processInput (file:///mnt/mesh_shared/src/ast-vm/runt
ime.js:59:64)
B B at file:///mnt/mesh_shared/src/ast-vm/cli.js:51:21
B B at [_onLine] [as _onLine] (node:internal/readline/interface:417:7)
B B at [_line] [as _line] (node:internal/readline/interface:906:18)
B B at [_ttyWrite] [as _ttyWrite] (node:internal/readline/interface:1286:22)
B B at ReadStream.onkeypress (node:internal/readline/interface:271:20)
B B at ReadStream.emit (node:events:519:28)
B B at emitKeys (node:internal/readline/utils:370:14)
B B at emitKeys.next (<anonymous>)
B B at ReadStream.onData (node:internal/readline/emitKeypressEvents:64:36)

Node.js v22.23.2
$B

==[ /Terminal ]==

Oops. I must have botched up. 

$ ls -ltra
total 68
-rw-r--r--B 1 teacher teacher 1637 Sep 15 08:54 vm.js
-rw-r--r--B 1 teacher teacherB B 0 Sep 15 08:56 curl
-rw-r--r--B 1 teacher teacherB 170 Sep 15 09:01 game_idea.txt.orig
-rw-r--r--B 1 teacher teacherB 333 Sep 15 09:06 package.json.template
-rw-r--r--B 1 teacher teacherB 143 Sep 15 09:07 package.json
drwxrwxrwx 24 nobodyB nogroupB B50 Sep 15 09:44 ..
-rw-r--r--B 1 teacher teacherB 120 Sep 15 09:49 .prettierrc
-rw-r--r--B 1 teacher teacher 3237 Sep 15 10:15 cli.js
-rw-r--r--B 1 teacher teacher 1276 Sep 15 11:32 lexer.js
-rw-r--r--B 1 teacher teacherB 237 Sep 15 11:37 game_idea.txt
-rw-r--r--B 1 teacher teacher 3430 Sep 15 11:44 compiler.js
-rw-r--r--B 1 teacher teacher 7396 Sep 15 11:54 opcodes.js
-rw-r--r--B 1 teacher teacher 8017 Sep 15 11:55 runtime.js
drwxr-xr-xB 2 teacher teacherB B15 Sep 15 11:55 .
-rw-r--r--B 1 teacher teacher 1702 Sep 15 11:57 game_idea.md
$B