w> a: 1
== 1
w> block: [a: a + 1]
== [a: a + 1]
w> do block ; this will compile and run the block of code
== 2 ; and we see the result, 2
w> disasm block
0 GET_TVALUE 1 100312790
1 LOADK 2 1
2 ADD 1 1 2
3 SET_TVALUE 100312790 1
4 END 1
1 LOADK 2 1
2 ADD 1 1 2
3 SET_TVALUE 100312790 1
4 END 1
Beside series, NEXT and BACK also works on integers, so I can write:
w> block: [next 'a]
== [next 'a]
w> disasm compile block ; this just compiles the block without running it
0 LOADK 1 100117a18
1 NEXT 1 1
2 END 1
1 NEXT 1 1
2 END 1
This new block does the same as the block above, but in fewer instructions, because it uses call-by-word. If TRACE is ON, the VM code is shown, while it's being executed:
w> trace on
0 END_EXECUTE 0
0 END 0
w> now0 END 0
0 LOAD_NONE 0 2
0 NOW 0
0 END_EXECUTE 0
0 END 0
== 03-Dec-2011/10:13:55+1:000 NOW 0
0 END_EXECUTE 0
0 END 0
We came to the end of the countdown. In the last 10 days, the sources have grown with around 1,000 lines of C, so it's now close to 24,000 lines. And it'll continue growing to become version 1. The open alpha release of The World Programming Language can be on your computer tomorrow, so stay tuned!
Finally, the smallest "Hello, World!" program in the known Universe:
.
Yes, it's a dot! Let's see it in action at the World prompt:
w> .
Hello, World!