Skip to main content

Squeak Etoys on iPad

In preparation of making Etoys work on the recently announced OLPC tablet, I ported it to the iPad. Here is a video—read on below for some details:



This might look exciting, and it certainly is, but it feels actually a lot more clunky than it looks. You may have noticed the little target circles I added whenever a finger touches the screen. That's to know where exactly the finger hit. It's really hard to hit anything, took me a while of training to hit the colorful halo handle buttons on first try. We really need to redesign the user interface before giving this into the hands of kids ...

But for now, some technical details: John McIntosh ported the Squeak Virtual Machine to Apple's touch-based OS last year (source available at isqueak.org). I modified it slightly to enable multi-touch and keyboard input. Also, I rewrote his code to deal with touch events in Squeak, and added multi-touch handling to Morphic. Fortunately, Morphic was designed to handle multiple "hands" (pointing devices) from the beginning, so adding this was much easier than in a system that assumes there is only one mouse. That's why moving multiple objects at the same time, and painting with more than one finger, just works once the events are in the system.

So far this is just an early test. We should work on improving the Etoys touch UI in next year's release. The Sugar menu bar works fine, but everything else is way too small. At least we have the luxury of being able to test Etoys already—getting the rest of Sugar running on a touch device might take a while. Hopefully OLPC will have developer machines soonish. If this test has shown one thing, then that there is lots of work to do (and it may even be necessary to start over).

Comments

Isn't great to see how much adaptable squeak as technology is?

It can run in almost whatever that has bits in it :)
MrStevesScience said…
What about a Hand Magnifier to show where your finger is pointing? I've used this when playing with scripts. Even with a mouse on a large screen those little arrows are hard to hit.
Vanessa said…
Steve: doesn't work, because we only know where the finger is once you touch. Having no mouse-over events is one of the reasons we need to redesign the UI for touch.
Anonymous said…
What ar the steps to install Squeak into the iPad, is thre like an installable package? Is like any other MacOS package?
Vanessa said…
Yes, an iPad application is similar to a Mac OS one. However, an unmodifed iPad only runs signed apps (modifying it to run anything is called "jail breaking"). Applications are signed by Apple once they are accepted into the AppStore. Then anyone can download and run them. For testing, an app can also be signed by a registered developer. This will then only run on the devices of beta testers. That is how I ran it.
I've been thinking some about what a "Next Generation" Sugar (on a multitouch machine) would look like. Since you're the only person who seems to be thinking about multitouch, I wonder -- what if "Sugar II" was built in Squeak? Assuming y'all come up with a killer design for the object browser in a multitouch world, why not use that for everything?

What's missing? Well, the packaging people would likely prefer to have some form of "save as source" instead of writing out binary system images, but I think that's already been worked on to some degree. Perhaps it would be best if squeak grew some gobject-introspection support so that arbitrary GNOME libraries could be accessed easily. What else?

Thoughts?
GerryJ said…
Re Steve's comment, how about presenting a zoomed box of the nearby screen rectangle so you can do a better finger point next time, with option to try again at bottom or top.
Unknown said…
Nice Work!

Two questions... well three:

1) Do you think that the iPad could be a viable OLPC/OTPC solution? Why, or why not?

2) Is the source for your port available or at least an ad hoc distribution.

3) I am retired, with 3 grandchildren (10, 11, 14), a background in computers and an iOS developer... can I help?
Vanessa said…
Dick: I think having a touch UI is essential for a good kids computer. A mouse or trackpad is no good substitute. Having a keyboard and stylus would be nice but I guess they are not essential. The tablet form factor has the largest chance of driving the price down quickly, since there are so few parts, and every machine can be the same (no custom keyboard). So OLPC is right in going in that direction. A sunlight-readable low-power display would be nice. Not sure if a sealed device like the iPad or an open, easily maintainable one is better. OLPC has focused on the latter.

The source is available, but not in readily buildable state. My VM changes have been merged into the official iOS port. My adhoc ipa is in the experimental Etoys downloads. You might also try the Etoys-Touch-Emu app there which should work on Mac, Windows, and Linux.

Help would be very welcome. I have had no time to work on this since May. A first step would be to get acquainted with Etoys and Squeak. At least as Objective-C developer you know the Smalltalk syntax already :) You should subscribe to the Etoys developers list and we can take it from there.

Popular posts from this blog

Frontend-only Multi-Player. Unlimited Bandwidth. Or: What is Croquet.io, really?

A multi-player web app needs a backend, right? What if I told you, it doesn’t? Read on for how Croquet gets rid of servers running your multiplayer code. No, really . Instantaneous Shared Experiences  is how we describe Croquet on our website. And while that excellently describes What Croquet does, as Croquet's Chief Architect, I wanted to share a bit about How we do that. So I wrote a Twitter thread . Here it is in blog form, slightly extended. Click the animation above if it does not play automatically Croquet lets you build completely client-side multi-user web apps. Read that again. Client-side. Multi-user. No I’m not kidding. I built it, I know it works. 😁  Croquet apps run completely client-side: are hosted as a static web site no server-side code needed no networking code needed  Croquet is literally virtualizing the server: Instead of running code on a server (or in a serverless function) we run it as a virtual machine (VM) on each client.  Croquet carefully control

Deconstructing Floats: frexp() and ldexp() in JavaScript

While working on my  SqueakJS VM, it became necessary to deconstruct floating point numbers into their mantissa and exponent parts, and assembling them again. Peeking into the C sources of the regular VM, I saw they use the  frexp ()   and ldexp () functions found in the standard C math library. Unfortunately, JavaScript does not provide these two functions. But surely there must have been someone who needed these before me, right? Sure enough, a Google search came up with a few implementations. However, an hour later I was convinced none of them actually are fully equivalent to the C functions. They were imprecise, that is, deconstructing a float using frexp() and reconstructing it with ldexp() did not result in the original value. But that is the basic use case: for all float values, if [ mantissa , exponent ] = frexp (value) then value = ldexp ( mantissa , exponent ) even if the value is subnormal . None of the implementations (even the complex ones) really worked. I

Smalltalk Bindings for Minecraft Pi

The Raspberry Pi is a cute little computer. Quite cheap at $35, you plug in USB keyboard+mouse and a TV as monitor. And it is surprisingly capable, even for running 3D games. One particularly interesting game is Minecraft: Pi Edition . As in other Minecraft versions, the main goal is to create a world. But unlike other versions, you can not only use the tools provided by the game, you can make your own tools! That's because it comes with a programming interface. The Minecaft world is made of little cubes, and you normally place or remove these blocks by hand, one after another. This is fun, but for larger structures also quite cumbersome. For example, this rainbow here might take a long time to construct manually: But I did not make the rainbow by hand. I programmed it, using the Smalltalk programming language. It's just these dozen lines of code in the Squeak programming environment: Squeak is already installed on the Raspberry Pi, because Scratch was made in Squeak