15 Aug 2006 ingvar   » (Master)

Not much games coding lately. Another (old) project sort-of happened. Not quite where it should be, but it's slowly getting there. Next step is having a think about iteration, I think.

So far:

BASIC> (b-r-e-p)
 > list
10 print "Hello"
15 print "World"
20 let nisse=3
22 let nisse=22
23 let nisse=50
25 print nisse
50 come from nisse
55 print line
60 print "The value of nisse is high"
65 goto 0
70 come from nisse
75 print line
80 print "Nisse has a high value here too"

NIL > run "Hello" "World" 51 71 "The value of nisse is high" "Nisse has a high value here too"

0 >

Yep, threaded basic interpreters with a least-surprise computed come from. Well, if there are multiple available come from statements that indicate that the thread of execution should come from the current line, it is (probably) least-surprise to effectively spawn new threads.

This might end up being truly evil, some day. For now, it works. Took a bit longer clearing up a code base that has hovered untouched for more than 6 years, though most of the code worked out of the box. I'd guess about 80% or so. Unfortunately, the code that didn't work was in the essential scaffolding. Also, I wonder why I didn't use hash tables for storing the interpreter's variables instead of knocking up a dictionary tree library (best guess, it looked like an interesting challenge writing the dictionary library and the basic interpreter was, at best, an excuse for having a use for the dictionary library).

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!