Moby: the Moby Scheme Compiler

1What is Moby?

Moby is a project from the PLT team. The Moby compiler
consumes Advanced Student Language (ASL) programs that use World
primitives, and produces applications for mobile platforms. The
current prototype supports desktop browsers and smartphones.
Our long-term goal is to make Racket the premiere reactive scripting
language for mobile phones.

Note that this program’s in a separate language that provides
extra functions like big-bang. This program can be
executed in Racket, although evaluation will halt on the
big-bang because it’s a function that
requires a Javascript web context.

For testing, the function run-in-browser can be used to provide a mock
environment in your web browser:

The next example shows an image and an input text field. As with the
previous example, it uses draw-html and draw-css to
construct the web page, and every time the world changes, the runtime environment
reacts by re-drawing the web page.

Note that it requires phone/location, one of the
modules provided by this package.

The last example is a phone mood ring called "mood-ring.rkt":
it shows a single DIV whose background color is controlled by the
phone’s orientation; it uses phone/tilt to get at the
orientation of the phone, and arbitrarily maps it to a color.