Hi,

Today, Martin (marv) and I have been working on the integration of USL into 
Glob2 that Bradley has started. The current system is able to compile and run 
a USL script.

For instance, the following script works and prints "Hello" (in the console), 
waits 5 seconds, and prints "world":

        def sleep(x) := if (0 < x) {
                yield()
                sleep(x-1)
        }

        print "Hello"
        sleep 5
        print "world!"

The interesting thing to note here is that wait() is defined in the script 
itself, which shows the flexibility of usl [1]. Of course, we will provide 
such functions in a glob2 standard library. The latter, with proper binding 
for the current feature-set of SGSL is the next step.

Have a nice day,

Steph

[1]     the enlightened reader would note that "if" itself is implemented in 
usl, 
see: data/usl/Language/Runtime/If.usl

-- 
http://stephane.magnenat.net


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to