Unlock Forth on the OLPC XO

A week or so ago I ended up on “Luke’s Weblog” reading an article about Forth on the OLPC XO.

The OLCP Wiki has got Forth Lessons for everyone to enjoy. Forth is a pretty neat language!

You may have noticed that although access to the Forth shell is explained on this page, it doesn’t work. The reason can be two-fold. First, you can only access the Forth shell if the firmware security is disabled. Second, on newer machines you access the Forth shell by hitting the escape key at boot time.

This page explains how to gain access to the Forth shell on machines that have got the firmware security enabled (G1G1 owners, that means you). You need a developer key to unlock your firmware, the request takes less than 24 hours to be fulfilled. Please read the page closely (disable-security twice!) and heed their advice of disabling firmware security (you can always enable it later).

Managing files in the OLPC XO datastore

The only official way to get files in and out of the datastore is to drag and drop a single file at a time, and this only works on USB thumbdrives, not on the filesystem.

There is ticket for a workaround using a Python script; if you use an XO, please offer encouragement to get this functionality integrated with the XO.

Here is the ticket.

OLPC XO Answers about hardware

The OLPC XO Wiki has a questions and answers page. Today I took look at the hardware page and found a few important bits:

  • JFFS2 compresses your data, performs wear leveling, and manages bad blocks so you don’t need to worry about the fact you are writing to flash.
  • USB “thumbdrives” should be formatted to FAT32.
  • Although the CPU supports sleep mode, and the hardware detects the the lid closing, the XO will not automatically enter sleep mode on lid closing until some time next year.
  • The XO can remain plugged in constantly; the battery will not get overcharged.

CUFP 07 Write-Up now available

A write-up on the Commercial Users of Functional Programming 07 conference is now available here.

It is definitely worth a read for folks who wonder about the “real world” problems that are solved using functional programming. There is a nice mix of both languages and problem domains, and the tone is pretty laid back.

Code Generation and DSLs in Scheme

Over the years, I have heard some pretty outrageous and tantalizing claims made about the programming language Lisp. For example, “It will change you, forever.” and “You write code that writes code.”. Sadly, no further explanation is ever provided. Perhaps it is impossible to capture the essence of that to which these statements allude? This air of mystery around Lisp is both a blessing and a curse. Some folks will find this aura repugnant; others magical. For me, it was the latter. I wanted in on the secret!

Continue reading “Code Generation and DSLs in Scheme”