date: 2004-01-19
description: GenScript3, ape dream
lj-entry-id: 337,206

GenScript3, ape dream - 2004-01-19 - Entry 419 - TOGoS's Journal

We played Doom way too long yesterday. It got old after I had about 4 or 5 hundred frags. Eventually we all started changing our names and appearances and stuff. First I was Trent Renor and I was all black. Then I was beast... I went through "UR A FAGGOT", "ANDY'S DAD", "ANDY'S UGLY GF", and then back to "ANDY'S DAD" when Andy's GF came in to take Andy down to lift. I got up to about 800 frags and then me and Fizz gave up. Andy went to eat at Tanya's, me and Fizz ate at Glenview, and we got trashbags and I went to sleep. I had a dream about Vikings, and then I was swimming around, and then I was in a jungle, and I was climbing around in trees like a monkey. I was telling some people about where I had been and they told me I couldn't possibly have been up in that tree because humans weren't that agile. To show them, I started swinging around. Then I turned into an Orangutang or something.

I'm now working on GenScript version 3. I started it just yesterday, and I already have compiled a program to IMCC. All it does is print stuff, but it works. No parser yet--for now I have to program in the AST manually:


require 'TOGoS/GenScript3/CompilerToIMCC'

function = TOGoS::GenScript3::AST::HeavyBlock.new
function.locals = {'foo'=>'string','bar'=>'int','baz'=>'object','ba!z'=>'float','ba@z'=>'float'}
function.lexicals = {'jim-neighbors'=>'int'}
function.depth = 0
function << TOGoS::GenScript3::AST::Print.new( "Middling!\n" )

on_enter = TOGoS::GenScript3::AST::Block.new
on_enter.lexicals = {'jim-henson'=>'object'}
on_enter.depth = 1
on_enter.parent_block = function
on_enter << TOGoS::GenScript3::AST::Print.new( "Entering!\n" )

on_exit = TOGoS::GenScript3::AST::Block.new
on_exit.depth = 1
on_exit.parent_block = function
on_exit << TOGoS::GenScript3::AST::Print.new( "Exiting!\n" )

function.on_enter_block = on_enter
function.on_exit_block = on_exit

compiler = TOGoS::GenScript3::CompilerToIMCC.new
compiler.write_sub( '_main', function )

I think it's good that I got something working right away, rather than build up something huge and fancy and never get it done. This way I feel like I'm actually getting something done, and am more likely to continue working on it. Maybe I'll back up what I've done, so far.