AllTheWayDown/turtlepower — pull request #19 by bwhmather (2013-09-25 00:12:20+00:00)
Title: DO NOT PULL!!  quick and dirty proof of concept asteroids with eval'ed user script

I'm sorry for dumping such an ugly patch. It's for demonstration only.

Basic outline of what's going on:

The student script is just a string which gets evaluated once by the turtle at startup.

The turtle passes in a proxy to itself with overpowered methods (sort of) hidden and whatever utility functions might be needed.

Running the user script only once and forcing them to manually bind the update callback means that state can in a closure. We could probably clear all callbacks when replacing the script.

some things (like the turtle.distance method) don't really make sense without self and there needs to be a better way of deciding what methods to expose (`@expose` + `@expose\n@staticmethod` decorators?)

That's about it. Please don't pull