Turtles All The Way Down

C. Scott Ananian cscott at laptop.org
Fri May 20 14:02:08 EDT 2011


2011/5/20 NoiseEHC <NoiseEHC at freemail.hu>:
> 1. Why do the bytecode stuff? JS seems to be a perfectly good code
> representation to me and it can be run much faster compared to a naive
> bytecode interpreter or compiler written without the resources of the
> Chrome/V8 team.

It's true.  As described in my blog post, the VM work was an
experiment to see "how far down the turtles could go".  As the Klein
VM and other examples have shown -- pretty far down!  Even if you end
up running the language in the fast V8 VM, you might want to have a
version with somewhat lower performance which is 99.9% "view
source"-able.  But I really should be concentrating on the
higher-level stuff at the moment.

> 2. Why do you want to serialize the stuff? Is not it enough to serialize
> just the JS code + screenshot and on load run it?

It relates to the desire to be able to do prototype-style development,
where you modify existing objects to create new functionality.  (Think
etoys.)  Once you've got a bunch of user-modified objects floating
around, you have to start thinking about how to save/load them.

> 3. Why is the pervasive undo necessary? Only for debugging?

That relates to the goals of Sugar, leaking through into TurtleScript.
 It's actually pretty easy to screw up your VM pretty badly if you can
actually access it down all the way to the bottommost turtle.  Once
you've done this, it would be nice to be able to recover gracefully --
or at least, more gracefully than "toss the saved image and restart".
Supporting cheap snapshots of the system image is one way to do this.

> BTW cool project, that is exactly what I wanted to do, now I do not have
> to... :)

Oh no!  That's the opposite of my intended goal in talking about this
stuff -- at some point I badly need other people to adopt the ideas
and carry on with the implementation, as I'm unfortunately still a
single-core human.
  --scott

-- 
      ( http://cscott.net )



More information about the Devel mailing list