Ubuntu 8.10 (Intrepid) for XO

Here is a link that explains how to set up Ubuntu on the XO.
(via OLPC News)
Addendum: 18/2/9
I installed it and it worked flawlessly. Here are my notes on the installation:

000. Remove the SD card and start the XO.
001. Start Terminal in Sugar.
002. Connect the USB drive
003. Run mount | grep /dev/sd , repeat until it returns a line like this:
     > /dev/sda1 on /media/ORNGESLIDE2 type vfat rw
004. Become root and stop haldaemon:
     	    sudo -s
     	    /etc/init.d/haldaemon stop
005. Insert SD card into the slot (the card will be erased, so back up all data
     on it that you want to preserve).
006. Erase MBR and partition table:
     	   dd if=/dev/zero of=/dev/mmcblk0 bs=4096 count=1
007. Make the partition table:
     	  echo -e ',,L,*\n\n\n' | sfdisk /dev/mmcblk0
008. Create the root filesystem:
     	    mke2fs -jLOLPCRoot /dev/mmcblk0p1
009. Mount the filesystem and unpack the tarball onto it:
     	   mount /dev/mmcblk0p1 /mnt
	   cd /mnt
	   tar xvjf /media/ORNGESLIDE2/OLPCFiles-intrepid-20081130.tar.bz2
010. Copy the developer key:
     tar xvf /media/ORNGESLIDE2/security.tar.gz
011. Reboot:
	reboot
012. Got the "Card didn't power up after 1 second" error:
     http://www.olpcnews.com/forum/index.php?topic=4053.msg28224#msg28224
     http://www.olpcnews.com/forum/index.php?topic=4053.msg28084#msg28084
     > I waited at the ok prompt and typed boot and it worked.
     > Recommended advice is if that works, to upgrade the firmware.
     > I will hold off for now.
013. After booting into a new system,
     log in as user olpc with password olpcolpc, and perform final updates:
014. Click on the Network Manager icon at the bottom panel,
     select the wireless network you want to use.
     If wireless network uses encryption,
     you will be prompted for the key/password.
     If it's a public access point that requires browser login
     (like T-Mobile hotspot), start Firefox and log in.
     Start Terminal and complete the configuration:
     	   passwd
		(enter olpcolpc as the current password,
		then twice the password you intend to use)
		sudo aptitude update
		sudo aptitude safe-upgrade
		sudo aptitude reinstall ssl-cert
		sudo aptitude clean
		sudo /etc/init.d/cups start
015. Configure mplayer
     	       mkdir .mplayer
	       echo -e 'vo=sdl\nframedrop=1\nlavdopts=skiploopfilter=all:fast=1' > .mplayer/config
exit
016. Install flash plugin
    	    sudo aptitude install flashplugin-nonfree
	    sudo ln -s /etc/alternatives/firefox-flashplugin /usr/lib/firefox-addons/plugins/flashplugin-alternative.so
017. In Firefox, installed the plugins:
       flashblock
       adblock plus
018. Set the timezone:
       sudo dpkg-reconfigure  tzdata
019. Boot failed, instead it went into Sugar.
    Ran e2fsck -y /dev/mmcblk0p1
    	This fixed a bunch of errors. I killed e2fsck the first time,
	apparently with no ill effects.
    Rebooted, held the 'square' joystick button,
    hit escape 'x' on the keyboard to get the boot prompt 'ok'.
    Typed: boot sd:\boot\olpc.fth
    System worked, got keyring question
    	   Used the old default pw
	   Reset doing: rm .gnome2/keyrings/login.keyring
	   Logged out and in
020. Set up some swap space
     	 sudo dd if=/dev/zero of=/swap.bin bs=1M count=256
	 sudo chmod 600 /swap.bin
	 sudo mkswap /swap.bin
	 In /etc/fstab add:
	    /swap.bin none swap defaults 0 0
	 In /etc/sysctl.confg add:
	    # Swap as little as possible
	    vm.swappiness=0

WordPress 2.7 is out

WordPress 2.7 is out. While there are a lot of great new features, there are two that piqued my interest:

Comment threading is just that, comment threading. This is a useful feature that has always been provided by a plugin.
WordPress Upgrader “will give you the option of downloading, installing, and upgrading to the latest WordPress version from your Administration Panel.” This is particulary helpful as the WordPress developers are very proactive about addressing security risks and adding new (extensively tested) features. It can become a hassle to keep up with ugprades.
Most folks use a plugin to perform upgrades, but with my not-uncommon-set-up where the blog is installed in a sub-directory but served on the root, that plugin only worked 1/10th of the time. Consequently, all of my upgrades were manual, until now at least. Thanks WordPress team!

Scheme and the Philosophy Behind Perl 6

Contrast Larry Wall‘s take on the “soon to be released” Perl 6 today [in 2008]:

Don’t design everything you will need in the next 100 years, but design the ability to create things we will need in 20 or 100 years. The heart of the Perl 6 effort is the extensibility we have built into the parser and introduced language changes as non-destructively as possible.

(via Computerworld)

with that of [R3RS] Scheme in 1986:

Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.

(via R3RS, referenced in R5RS)

In other words, language implementers ought to accept that they aren’t going to “get it right” on the first try, and they should leave the language extensible for additions.

Are you as excited about Perl 6 as I am! 🙂

Undergrad Scheme Projects

Fred Martin wrote to the PLT Discussion List that:

You may have noticed a number of emails from my students at UMass Lowell. I had assigned a final project in our required “Organization of Programming Languages” course which is based on the SICP text. This is the first time that the course included a significant, independent project component, and I did encourage them to ask you for assistance.
I am happy to report that the projects were wildly successful.

Here are some of the projects:

(via PLT Discussion List)
Addendum: 01/09/09
Today, in the original thread, Fred replied to some interesting questions about the projects:

Hi everyone,
This is a belated reply to Eric Tanter and Shriram Krishnamurthi’s
questions about how I structured student projects in my last
semester’s junior-level PL course, which was based on Scheme and SICP.
This was the first time that students were required to do projects in
our undergrad PL course, and they were quite successful. Since I
wrote last, I graded the projects. Broadly, I’d categorize them as
1/3 excellent, 1/3 decent, and 1/3 weak (I suppose that’s a normal
distribution of anything we do…). But that’s still 2/3 of students
really exercising ideas in Scheme and PLs (functional programming,
map/filter, recursion) for their own purposes, which I think could be
quite valuable in the long run.
from Eric:
> Can you tell us more about how the projects
> were conceived? did they all pop up out of students’ mind, if so,
> under which guidelines if any? or did you have a pool of project ideas?
I started out by telling them about the project on the first class
meeting, letting students know that the project would be worth 25% of
their overall grade (the final exam was only worth 20%!). Here’s what
I wrote in the syllabus:
“In the final project, you will apply the ideas developed in the class
in an original software implementation. You may thus connect the ideas
of the class with your own interests—music, robotics, art, databases,
the web, networking, gaming, etc. The learning goal of the project is
to have you find some real-world relevance of the ideas in the class.”
Then, during the semester, I showed/mentioned real-world projects done
in Scheme. I showed a movie of the real-time
writing-scheme-code-as-a-musical-performance work done by the Impromtu
team in Australia http://impromptu.moso.com.au/gallery.html. I
discussed FP techniques practiced by Jane St. Capital, a Wall St
trading firm, http://portal.acm.org/citation.cfm?id=1394798.
In early November, I assigned preliminary work: students had to
download and play with at least two different libraries from the
PLaneT repository. I demonstrated in class the HTTP Get library. We
also talked in class about project ideas, including the robotics,
gaming, and networking concepts that ultimately students implemented
(most networking stuff they did went far beyond any class
discussions).
Just before Thanksgiving, their project proposal was due. This was
supposed to be based on the exploratory work they had already
completed (and in many cases, it was). In giving them the guidelines
for the proposal document, I also gave them the grading criteria for
the final project. These were:
* an explicit connection to ideas that were introduced in the course
* an explicit connection to some outside piece of technology (e.g.,
images, sound, networking, database, etc)
* an interesting overall concept
* something that you personally are interested in and care about
* a writeup that explains what you accomplished
* a demo that lets people (or yourself) interact with your project
They had 2.5 weeks after the Thanksgiving holiday to work on their
projects for real. In class, I was covering the metacircular
interpreter, and they had a problem set on this that was due 5 days
AFTER the project deadline had passed. (This was a bit squeezed.)
I used the final class meeting date for a project open-house, which
was set up in our department’s main lobby. I provided drinks and
snacks for that, and we had a decent turnout, including several other
faculty.
To me, the best projects were ones where students really did connect
Scheme and the course’s ideas to something of personal interest. As I
look back over the project list, I’d say that in more than half of the
projects, students really did something they were interested in, and
made explicit connections in their implementations to course material.
(A number more did have the conceptual connections, but the thematic
matter was not really something the student was passionate about.)
As an example of a success story, there was a project where a student
imported baseball stats from a public web site into Scheme via XML
translation. A number of students did stuff with XML, but this one
stood out because the student really cared about the baseball data.
He was really excited that he was able to reveal data that the web
site had collected, but did not make available in its standard web
presentation. The project was not as advanced as some others, but
because of the student’s true interest in the material, it was quite
well done.
(All the projects are written up at
http://www.cs.uml.edu/ecg/index.php/OrganizationProgrammingLanguagesFall2008/Project)
Onto Shriram’s questions:
> – This is an impressive list of projects, but how much evaluation was
> there of how well they did what they promised?
At the public demo day, I visited each project and had a 5-minute
conversation with each student, taking quick notes. Then students
turned in their code, with additional documentation explaining it
(e.g., drawing out the ways their code exemplified ideas in the
class). (BTW – I didn’t make them post the code and notes on their
public project web pages.)
I graded their projects based on the criteria previously discussed
with them, with separate marks for: the quality of the proposal,
explicit connection to course concepts, use of external technology, an
innovation/creativity mark, the final writeup, and the quality of the
live demonstration.
I was lenient with the “did they do what they promised.” In fact, I
had told them that up front: if you end up getting stuck or otherwise
needing to go in a different direction than you described in your
proposal, that was fine. But I still used the same rubric for grading
(I just didn’t penalize if it was different than the proposal).
> – How good is their code? What’s the measure of goodness? Did they
> get administered code-walks?
This is a good/hard question. As I mentioned earlier, one of my star
students commented that now he understood what people meant when they
were talking about “elegant code,” and that he wanted to go back and
re-write code he had written in the past (code that was not written in
Scheme). This was the person who built a hash table of lambda
functions to process a variety of possible reply packets from a
serially-connected hardware device.
So, to answer — no there wasn’t an administered code-walk. That’s a
great idea — I wish I had time for that. I did however read through
all of their code, and sync’ing that with their documentation notes,
was able to determine what kind of ideas they worked through in their
implementations. This was the basis of the grading, particularly for
the “connection to course concepts” category.
One of the additional benefits of the project from my vantage point is
that it gave me a brand-new window into my students’ abilities. From
quiz scores and class participation, I could tell that about 1/3 of
the class was strong, and 1/3 was weak, but there was the middle band
that I was mentally lumping with the “weak” category — they didn’t
speak up in class, and their quiz scores were not great.
But from the projects, a bunch of this middle band really shined, and
I gained new appreciation for them. As it turned out, they *were*
paying attention, and through the project, really engaged with the
class material.
So I’ll definitely be running the projects again when I teach the
course in the spring. I should be able to do a better job working
through the main curriculum so that the metacircular material (which
is clearly central) isn’t so squeezed at the end. Hopefully too I’ll
be able to establish the value of the projects in my colleagues’ eyes
so they have a chance of living beyond my tenure with the course.
There’s one more Q&A below — it’s somewhat of a digression on
integrating Scheme and C++, so I’ll end this note here and leave it as
a P.S.
Thanks again everyone for your attention and encouragement.
Fred

SPITBOL and SNOBOL

During the 1950s and 1960s there was a flourishing of interest in special-purpose computer languages. SNOBOL [String Oriented Symbolic Language] was one of a number of text-string-oriented languages…

SNOBOL was widely used in the 1970s and 1980s as a text manipulation language in the humanities, but in recent years, its popularity has faded as newer languages such as Awk and Perl have made string manipulation by means of regular expressions popular. However, the pattern matching capabilities of SNOBOL are significantly more powerful than those of regular expressions.

(via Wikipedia)

SPITBOL (Speedy Implementation of SNOBOL) is a compiled implementation of the SNOBOL4 language…

One contribution of SPITBOL to computer science was to demonstrate the clear distinction between a language and its implementation. Rather than stating that a language itself is slow, it is more accurate to say that the ability to write a fast and elegant implementation is a rare gift.

(via Wikipedia)

It is what you know that you don't know that matters most

The idea that “It is what you know that you don’t know that matters most” has been coming up a lot lately. Here is one fellow’s take on it via this post:

I have the the distinction of being the “programming languages guru” here at Dobbs Code Talk. So what does this mean to me? It means that after many years of programming and studying language design, I am reasonably aware about what it is that I don’t know about programming languages. Contrast this to something like helicopter mechanics, for which the only meaningful thing I can say is that I know nothing about it.
It is perhaps a dubious achievement to be knowledgable about the limits of your understanding, but at the same time I don’t really think you can do any better.

Agreed.