We recently announced our App Inventor for Android project on the Google Research Blog. That blog entry was long on vision but short on technological details--details which we think would be of interest to our readers.
Of particular interest is our use of Scheme. Part of our development environment is a visual programming language similar to Scratch. The visual language provides a drag-and-drop interface for assembling procedures and event handlers that manipulate high-level components of Android-based phones. The components are similar to the ones in the recently announced Simple; in fact, the code bases share an ancestor.
We parse the visual programming language into an S-expression intermediate language, which is a domain-specific language expressed as a set of Scheme macros, along with a Scheme runtime library. We did this for a few reasons:
- S-expressions are easy to generate and read for both humans and machines.
- Scheme macros are a convenient (albeit sometimes arcane) way to express S-expression based syntax.
- Scheme is a small, powerful and elegant language well suited to describe and evaluate a large set of programming semantics. Additionally, it provides the flexibility that we require as our language and its semantics grow and develop.
- Scheme expertise was readily available among our team.
- A pre-existing tool (Kawa by Per Bothner) to create Android compatible output from scheme code was already available.
1 comments:
Why invest your time to reinvent the wheel?
Why not port the Squeak VM to Android. Then you have Scratch (which is written in Squeak Smalltalk) running on Android and you can adapt it to your needs.
The Squeak VM already runs on the iPhone, other mobiles and all major OS platforms since the VM is easy to port/generate. With Patato it even runs on the JVM and there is also a project (SqueakNOS) that directly boots Squeak on a computer.
With the Squeak VM you would have Scratch running on Android (and any other Smalltalk app) for free and can change it the way you like. People could also visually program on desktop machine and run later on Android one to one.
You even even run all the Etoys projects from the OneLaptop per child project (already used by people all over the world) or use SqueakNXT to control robots from Android then.
You would be able to run Nebraska so people can connect Android devices together and share objects, video, audio they created via Network.
If 3D is supported on Adroid then this would also allow you to run OpenCroquet.org or Cobalt (also written in Squeak) on it.
A Second life style program could be a killer application for Android...
So think big and "talk small" ;)
Post a Comment