Git repository: git://jabberwocky.ca/~git/pub/sdm.git
Latest Snapshot: sdm-20130902.tar.gz
To compile and run:
There shouldn't be a need to change anything before compiling, but there are some basic settings in config.mk. After compiling, a single binary named 'moo' will be created in bin/.
tar -xvzf sdm.tar.gz cd sdm make bin/moo -l code/core.moo
Note: All paths are relative to the data directory, which defaults to data/, so the correct way to run the program is with 'code/core.moo' and not 'data/code/core.moo'
Basic Example of an Object
(define *global*.thing (root:clone)) (define thing.name "generic-thing") (define thing.title "something") (define thing.description "You're not sure what it is.") (define thing:move (lambda (this where) (define was this.location) (if (and (not (null? was)) (not (was.contents:remove this))) (return)) (define this.location where) (where.contents:push this) )) (define thing:look_self (lambda (this) (user:tell (expand "
This is just a quick example to give a feel for the scripting language. First, the root object is cloned and the newly created object is assigned to the global name 'thing'. Some properties of the new object are set, and then 2 methods are defined. The 'move' method is called when the object is moved from one location to another and the 'look_self' method is called when the user looks at this object.