Logo Programming on the pocket PC

November 14th, 2007 | Categories: pocket pc, programming | Tags:

According to the server logs one of the most popular posts I have made on Walking Randomly is the one I made a couple of months ago about the Logo programming language. Of course this may be due to the fact that this year marked the 40th anniversary of the language thus leading people to google for nostalgic reasons but it may also be because it is a genuinely interesting language. One thing that’s for certain is that programming in Logo can be a lot of fun and naturally leads to further study of concepts such as recursion, geometry and fractals.

With this in mind I thought it was high time I worked out a way of installing Logo on the pocket PC so that I can play with it on my new toy – the remarkable HTC TyTyn II My task set, I embarked on a set of very extensive google searches and to my surprise came up with very little.

The only native windows mobile solution that I could find was a free package called pocket turtle by Morten of Xpoint.dk. Although very much in the alpha stages of development (It only supports 6 commands and no user defined functions) this software looked promising and so I contacted the author to ask what he plans to do with it. His reply was prompt and friendly but unfortunately his future plans do not include any more pocket turtle development which is a shame but understandable since developing free software is a very time consuming affair. I tried to install it anyway since a little Logo is better than none at all but unfortunately could not get it on my new Windows Mobile 6 device.

Things were looking bleak on the pocket-pc logo front. Just as I was about to give up and resign myself to using my laptop to quench my Logo thirst, I came across a package called TinyLogo which was developed quite a while ago now. It is free, which is nice, but unfortunatley it only runs on PalmOS hardware. Now this is great news for the Palm users out there (Amanda – are you taking note of this?) but not so good for the likes of me.

A fantastic piece of (nonfree) software called StyleTap came to my rescue. Essentially what this does is emulate the Palm OS operating system on Windows Mobile devices so now you can run all of those must have Palm programs (such as TinyLogo) on your pocket PC.

I installed the trial version of StyleTap then installed TinyLogo on top of that and it worked like a charm. The TinyLogo icon appears on my device exactly as if it were a native application and the only way I can tell that this is not the case is that the menus look a little old fashioned (just like Palm OS) when I use it.

A quick read of the TinyLogo documentation later (recommended since the interface is not very intuitive in my opinion) and I was cooking on gas as the following screenshots demonstrate.

There is one minor problem. In order to write and edit TinyLogo scripts you need to use the standard PalmOS application ‘MemoPad’ and this is not included with StyleTap – probably for copyright reasons. All is not lost, however, since it turns out that MemoPad is not very good and so many people have developed free MemoPad replacements. One such example is jpad which also works on StyleTap without a hitch and has the added bonus of looking delightfully old fashioned which somehow enhanced the Logo experience for me.

I was so pleased with the StyleTap emulator that I ended up buying it – not just for TinyLogo you understand (honest) – but because there are quite a few Palm OS applications out there that I would quite like to play with again.

In summary using TinyLogo via StyleTap is a workable (albeit fiddly) solution for Logo enthusiasts who would like to code directly on their pocket PC. The interface is old fashioned and non-intuitive (well it was coded back in 1999 so this is to be expected) and because of this, and the fact that you have to pay for the StyleTap emulator, I would not recommend it for classroom use. Hopefully someone, somewhere will come up with a native Windows Mobile solution but for now TinyLogo on StyleTap is the best we have.

  1. May 16th, 2008 at 08:25
    Reply | Quote | #1

    Does the TyTyn II have a web browser that can do JavaScript and SVG? (Opera, for example). If so, it might be amusing (to me) to see how Curly Logo behaves.

  2. November 5th, 2008 at 20:18
    Reply | Quote | #2

    Dear Mike,
    i see that you are interested in Pocket PC Logo programming.
    I’d like to point out that I developed PocketLogo, a Logo programming environment for Windows Mobile.

    The downloads and a detailed description (in german), as well as a lot of screenshots and screen videos can be found here:

    http://pocketlogo.sourceforge.net/

    PocketLogo implements all the basic commands and data types (word, list and array) known from popular interpreters like UCB Logo.
    Some features:
    Arithmetic expressions can use prefix or infix notation (tiny example: “print sum 3 4″ or “print 3 + 4″). Writing one’s own procedures and using recursion is possible. All commands and error messages are translatable (mainly because PocketLogo is intended to be an educational tool for school use). The user interface of PocketLogo is entirely in german.
    There are some features intended to ease the entry of commands on the PDA: You can scroll through the commands entered previously, and there is a menu allowing to insert code snippets at the current cursor position. The contents of this menu can be customised.

    PocketLogo has some special features: – You can define “walls” which are impossible to cross for the turtle (an error is thrown as if the turtle was in “fence mode” and tried to walk out of the screen area). There is a command that returns the distance to the nearest wall in the turtles viewing direction. – The turtle can take and lay down objects (apples). There is a command that returns the number of apples in the turtle’s reach. – PocketLogo can process deterministic context-free Lindenmayer systems with or without a stack memory. It translates them into a recursive Logo program that draws the image deduced from the L-system (e.g. the koch curve), or alternatively into the word that is derived from the axiom after an indicated number of iterations. – It is possible to display the syntax tree used by PocketLogo to interpret the Logo program.

    Markus Hunke

  3. Mike Croucher
    November 9th, 2008 at 10:18
    Reply | Quote | #3

    Hi Markus

    Thanks for that – your implementation looks great and I have added it to my list of things to look at over the next week or so. There will probably be a write up on here soon as well :)

    By the way – sorry that it took a while for your comment to appear. For some reason it was identified as spam and it was only when I checked my spam bin that I found it.

    Best Wishes,
    Mike

Comments are closed.