Scheming on the Pocket PC

I've temporarily adopted a Pocket PC -- and wanted to do something fun on it.

Some people suggested I download some games... but there are better things than games.

Code! Code is where the fun is.

So I tried to find some tools for Programming on the Pocket PC.

Not programming for the Pocket PC mind you -- I mean I want to sit on the bus or train and write programs on the tiny screen.

There was very little available, or very little I could find. (Got any suggestions?)

One thing I found was very intriguing though -- so I downloaded it immediately:

Pocket Scheme -- a scheme interpreter for the pocket PC.

Scheme is a variant of Lisp (yes... that.) and i've been keen to get further into lisp (or to escape the nonsense ravings of lisp-nut-jobs and the like ;-)) for a while.

Lately this introduction to lisp has been my friend.

The Little Schemer

Within 24 hours of downloading pocket scheme:

  • i'd ordered a copy of 'the little schemer' from amazon
  • i'd decided to purchase my own pocket pc ;-)

As part of dabbling with Scheme while on the train (and without internet access) I decided i needed some Scheme documentation on the Pocket PC. A bit of research told me that 'Teach Yourself Scheme in FixNum days' would suit my needs nicely.

But screen real-estate is expensive on the Pocket PC. And even scrolling is a pain. I worked out that what I really wanted was just the code samples from the book all in one page.

This is where it got fun. I decided to write a powershell script to extract all the code samples and put them into a html file. Any excuse for a bit of powershell ;-)

Here's the basic script:

PS C:\> $webclient = new-object
PS C:\> 3..23 | %{$page=$webclient.DownloadString("$_.html");"<h2><a href='$_.html'>Chapter $_</a></h2>" >> c:\matches.html;get-matches $page "(<pre .*?/pre>)" >> c:\matches.html }

Oh -- and that also relies on this function, get-matches, which is based on a snippet of Lee Holmes --


function get-matches (
    [string] $content = "",
    [string] $regex = ""
   $returnMatches = new-object System.Collections.ArrayList

   $resultingMatches = [Regex]::Matches($content, $regex, "IgnoreCase,Singleline")
   foreach($match in $resultingMatches)
      [void] $returnMatches.Add($match.Groups[1].Value.Trim())


The result is almost half a megabyte of lisp examples, in neatly formatted html (zips down to just 23K).

I've written to the author (Dorai Sitaram) to request permission to share the resulting file. I haven't heard back yet -- but if i do, I'll make it available as a download.

Now, about those Games. To increase the WAF, I'll need to find some good games for the pocket PC. Suggestions?


I'm currently writing a book about how to build your first product. If you want to build your first product, please sign up to be notified when the book is available.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.