contrapunctus, by Christopher League
 

To appear at CCSC

In April, I will be presenting a new paper — Something for Everyone: AI Lab Assignments that Span Learning Styles and Aptitudes — at the Consortium for Computing Sciences in Colleges, held in the exotic, distant locale of Staten Island. A preprint can be found in the publications section of my site.

I will be building a repository and wiki about the assignments. With any luck, it will be available in time for the presentation. Shown here are some photos from our Connect 4 tournament during the first year I used these lab assignments.

Automated programming tutor

This short video (3:24) is about an idea I have for an automated tool that would tutor and assess students on fundamental skills in computer programming. I call it the ‘codeTutor’. I find that students that need a lot of practice on rudiments are often not willing or not confident enough to create their own exercises, and I don’t have the time to keep them inundated with practice problems. So here’s my idea:

If you think this is a {useful,great,dumb,old,…} idea, leave a comment or get in touch by email. If you’d like to participate in building or testing, even better. I’d want the tool to run as some kind of {Flash,Java} applet, or maybe Java WebStart program, just to lower the barrier to running it. Since it will do some non-trivial manipulation of syntax trees (and for a variety of other good reasons), I may write it in Scala instead of just Java. I’ve been toying with Scala for a few days, even producing little Swing (GUI) apps, and I’m fairly pleased.

Viva Vivaldi

Here’s my synthesized rendition (recorded using my Yamaha digital piano as a MIDI controller into Apple GarageBand on my MacBook Pro) of the first movement of Vivaldi’s concerto grosso in D minor (opus 3, number 11).

Or download vivaldi-cto-11-1.mp3 (possibly by right-clicking). It’s just under 5 minutes and 5 megabytes.

Argumentatum ad ars divinum

On most days, I am an extreme rationalist and philosophical materialist, but I have one major weakness. Any ‘delusion’ that inspired (for example) J.S. Bach to compose the Mass in B minor is definitely worth maintaining.

I recognize the fallacy. In Bach’s culture, credo in unum deum was the only game in town. Apologists may claim that without it, the Bachs could have been a family of bakers. And perhaps their panem diem would have been divine too, but centuries later we could not partake.

At counterpoint is the old sentiment that an ordinary person must be thoroughly trained to excel, but we’d have to train a prodigy not to. Who is to say what Bach could have composed if he grasped our deep and ancient connection to all life on earth, or perceived the majesty of the cosmos as we understand it today?

Still, what a tragedy it would be not to have the Mass in B minor.
Gratias agimus tibi propter magnam gloriam tuam.
Dona nobis pacem.

Bootstrap Blues

Bootstrapping a compiler can be a finicky process, because many compilers are written in the language that they compile. It’s easy to paint yourself into a corner if you’re not extremely vigilant about binaries and configuration management.

I wanted to try SMLserver, a system for writing database-backed web services using Standard ML. It is tightly integrated with the MLkit compiler.

Unfortunately, the distributed binaries would not run on my installation of Debian stable (codename ‘etch’) because they expect a newer version of ‘libc’, the main system library. Upgrading that library could be pretty disruptive, which defeats the purpose of running a ‘stable’ distribution.

Unlike many compiler code bases, MLkit can be built by compilers other than itself, namely SML/NJ and MLton. Ordinarily, this would simplify the process, except that the SML/NJ version it requires is ancient (and doesn’t itself compile out of the box anymore on this system) and MLton has extreme memory demands.

Fortunately, an older binary of MLkit (4.3.0) runs on this system, but at best that’s a starting point. Once a particular revision can bootstrap itself, it’s natural for the source language to evolve beyond what the previous revision could handle. But in this case, the changes were small. Version 4.3.0 lacks some pieces of the ‘Posix.FileSys’ module that 4.3.2 needs, but they were small enough to rewrite:

Index: src/Tools/MlbMake/MlbFileSys.sml
===================================================================
--- src/Tools/MlbMake/MlbFileSys.sml	(revision 2311)
+++ src/Tools/MlbMake/MlbFileSys.sml	(working copy)
@@ -49,9 +49,9 @@
 	  | EQUAL => SysWord.compare (b,d)

     fun unique link f =
-	let val s = if link then Posix.FileSys.lstat f else Posix.FileSys.stat f
-	in (Posix.FileSys.inoToWord(Posix.FileSys.ST.ino s),
-	    Posix.FileSys.devToWord(Posix.FileSys.ST.dev s))
-	end
+        let val {dev,ino} = OS.FileSys.fileId f
+         in (Word.fromInt ino,
+             Word.fromInt dev)
+        end
   end

Index: src/Manager/Manager.sml
===================================================================
--- src/Manager/Manager.sml	(revision 2311)
+++ src/Manager/Manager.sml	(working copy)
@@ -807,7 +807,6 @@
            val fu = (Posix.IO.close (Posix.FileSys.creat (lockfile ^ unique,Posix.FileSys.S.iwusr)) ; true) handle OS.SysErr _ => false
            val f = if fu
                    then (Posix.FileSys.link{old=lockfile ^ unique, new=lockfile}; true)
-                        handle OS.SysErr _ => Posix.FileSys.ST.nlink (Posix.FileSys.stat (lockfile ^ unique)) = 2
                    else false
          in if fu then (Posix.FileSys.unlink (lockfile ^ unique); f) handle _ => f
             else false

Version 4.3.0 can build 4.3.2 patched thusly, which can then bootstrap its unmodified self. Really, I lucked out here. Imagine having to do this across a major compiler release cycle!