Give One Get One laptop for software development

M. Edward (Ed) Borasky znmeb at cesmail.net
Tue Dec 25 22:13:16 EST 2007


Edward Cherlin wrote:
> I would want to work out algorithms in APL and translate to something
> else after they were working. I may be able to provide an APL for the
> XO next month. It's 29K. See Executable Math on the Wiki.

Very cool!! I've always wanted to learn APL but never had an excuse. I
think I installed APlus when I was running Debian, but when I switched
to Gentoo, I couldn't find the source.

>> 2. "Native" develop and test on the XO itself.
>>
>> The XO as currently shipping does *not* contain a development tool set
>> other than Python and Etoys, which is a version of Squeak, which is a
>> Smalltalk IDE. In particular, there is no Perl interpreter on the XO,
>> and there is not GCC or any of the conventional Linux development tool set.
> 
> The XO is memory and storage constrained. You can plug in a multi-G
> flash drive or an SD card for more storage, but you can' get more
> memory. There is no swap partition. You could plug in an external hard
> drive and set up a swap there.
> 
> There are instructions on the OLPC Wiki for dual-booting to Debian.
> You could adapt them to create a command-line development environment
> using a text-mode programming editor.

1. I've experimented with some other tools, and just about all of them
have a Perl dependency. So it might not be all that big a deal to just
bite the bullet and install Perl. When my main computer was a
Hewlett-Packard HP100-LX, I did on-box development in Perl 4 and Forth
and everything worked just fine.

2. I don't understand what advantages "dual-booting to Debian" offers
for the command-line developer over the modified Fedora 7 that's already
on the XO.

3. I suspect swap to a SD card would be slow. If the USB slots have the
power to drive one, you might be better off with a micro-hard drive
instead of flash. You don't need all that much swap space anyhow -- if
you've overloaded RAM to the point where you've filled up 256 MB of RAM
and another 256 MB - 512 MB of swap, your performance is going to be
horrible anyhow. You're much better off designing an efficient explicit
"out of core" algorithm than letting the swapper try to guess what
should be in RAM and what should be on "backing store".

>> On top of that, there is very little room on the XO's base flash hard
>> drive (1 GB) for any additional software at the system level. As a
>> consequence, I think you'd want to either cross-develop using the
>> standard GNU/Linux tools, or use a more compact development tool set on
>> the XO itself.
> 
> Yum is provided, so you can install a few hundred megabytes of
> software with no difficulty. Large amounts would require a bit of
> surgery, to install software other than in default locations and
> expand the path or symlink everything.

Yeah ... that's probably what I'll end up doing if I fill up the flash
drive. But right now it doesn't look like I'm going to need to do that.
I'm probably stuck with Perl and Tcl/Tk/Tkinter, but other than that and
gForth I don't think I need much more of an on-system toolchain.
> 
>> I recommend Forth for the "compact development tool set on the XO
>> itself". The stock Fedora "gforth" package should work, although I've
>> only tested it on an emulated XO -- my physical unit has not arrived
>> yet. And there is a version of Forth that is more or less "XO-native" --
>> it's a port of the boot firmware to run in the Linux environment.
> 
> Power on the XO. During the boot countdown, press the Esc key (top
> left, x in a black circle). This will put you at the FORTH 'ok'
> prompt. There are FORTH lessons on the Wiki.

Only if you have a developer key, I'm told, is the boot firmware Forth
available. Of course, I've applied for a developer key, but I'm somewhat
used to gForth already, so I've loaded it. It's under a megabyte and has
all the ANS floating point words. I'm not sure the boot Forth does.





More information about the Devel mailing list