Submit a patch to Monotone that makes "mtn log" display log entries in chronological order.
Finish debugging the new, faster syntax-case implementation I have for Try Scheme. (sigh) It's so close!
Write about continuations.
A good tutorial would be helpful. I haven't read anything I really liked. (Squawk of the Parrot has some very nice stuff on this.) I think a good approach would be to say up front that it's extremely generalized and hard to explain, but that we're going to work toward the definition. Then lean heavily on examples and analogies. Compare continuations to all kinds of control-flow concepts: functions; goto;
returnandbreakas functions; savepoints in video games; exceptions; generators; longjmp. Explain that all of these can be implemented fairly easily usingcall/cc. Then talk about continuation-passing style.I also want to investigate just what abstraction boundaries are violated by first-class continuations in a language that has state. I am kind of down on continuations as a language feature at the moment.
Read about continuations. In particular, Andrzej Filinski's thesis introducing the symmetric lambda calculus.
24 June 2007
To do
10 April 2007
Things of the moment
My current side project is fixing bugs in Python's DOM implementation.
Brainteaser: What if chess had a single level of undo? Specifically, after your opponent moves, you may, instead of making your next move as usual, roll the game back to the point just before your previous move and do something else instead. (Your game clock, though, would not be turned back.) How would this affect the game?
I'm trying to understand Haskell's existentially quantified types, and (a shallower question) why there's no Data.Hashtable.ST, darn it.
GoboLinux is a Linux distribution with a sane filesystem layout. From reading that one page, I like it. You can't fight with MSI for a week without realizing that the people who design installer systems have been working waaaay too hard, and that the fate of our civilization hinges on stopping them.
Yesno is a toy programming language in which every method call returns something immediately ...and returns the correct result eventually. It's either hilarious or awesome, probably. The obvious next step is to make it self-host.
In the spirit of yesno, here are two quick reviews of books I'm not done reading yet. (I'll refine these opinions later, maybe.) The Time-Traveler's Wife is too sentimental and too linear, and does not contain enough adventure or suffering. Oryx and Crake has a lot of the same strengths and weaknesses as 1984, but much more angst.
25 July 2006
To do
More possible side projects:
- Blog about irrationality and game theory. I promised D.E. something about this many months ago.
- Implement long integers for Try Scheme. (Java's implementation is about 4400 lines; Python's is about 3200 lines, including comments and boilerplate junk. Neither one uses two's complement to represent negative numbers, which surprises me. Maybe division is a lot harder to implement in two's complement?)
- Get Try Scheme working in Safari (the most obvious problem is that Safari doesn't have
Object.isPrototypeOf). - Implement a built-in manual and tutorial for Try Scheme.
- Write a story.
02 May 2006
To do
-
Write an article, "What do objects do all day?", talking about the various roles classes play in a program. Some classes are, in no particular order, (a) collections of data, all public except for details of memory management and such:
ArrayList,BigDecimal,Point,AffineTransform,org.w3c.dom.Document, and I guessString; (b) handles to software entities that live in the kernel or out of process:Socket,Process,java.sql.Connection; (c) data sources and sinks:ResultSet,OutputStream,Iterator; (d) event handlers—these don't model anything at all, you just use them to hook into other objects; (e) representations of some random programming language concept that the language doesn't have special syntactic support for, like a logic variable, a closure, or a future; (f) models of real-world "things" in the problem domain.I'm interested in this because I'm interested in what code means. I think having a clear idea of what you mean gets your job done faster, leads to more readable code and a more flexible design, and reduces bugs.
The few object-oriented textbooks I remember at all focused their abstract discussion of “what objects mean” entirely on (f). It was as though the authors didn't really think about the question. But I suspect (without substantiation) that different techniques—and different programming language features—matter in different cases.
Find out if anyone does studies of questions like these: How many arguments does a method take, on average? (You get different answers if you count method declarations, method calls in source code, method calls at runtime.) What proportion of method calls take any complex arguments (I mean, arguments that can't be represented losslessly as smallish strings)? What proportion of methods simply delegate their job to some other object? What kind of changes do people make to existing code? Are there trends in these numbers over time?
04 April 2006
To do
I have to get back to my current side project, about which more in a bit. But a definite possible future side project is:
- Create a "foundations of math" wiki combining MediaWiki and the Metamath proof-checking engine.
21 February 2006
To do
Explore possible APIs for discrete finite graphs, along the lines of the stuff for arrays and hash tables that has become canon in PL design these days. (I guess
awkstarted this trend?) Graphs are everywhere: directory trees with symlinks; PL syntax trees; objects in memory and the pointers that tie them together; network architecture—any relational database with foreign keys is a graph.Come to think of it, what is it exactly about arrays and hash tables that makes them so insanely useful? Arrays: ordered, integer-indexed, random-access in constant time, non-sparse, mutable, growable in constant time on average, efficiently sortable, non-unique collection of values. Hash tables: non-ordered, arbitrarily-indexed, random-access in constant time on average, mutable, growable in constant time on average, unique-per-key collection of key-value pairs. There are nigh-infinite combinations of collection properties like these; why these two combinations in particular?
That reminds me: submit a patch for Python that implements a
priority_queuetype to add to thecollectionsmodule. It would basically deprecate theheapqmodule.heapqis just a collection of functions; this would be a class. Unlikeheapq, it would acceptkey=,cmp=, andreversed=keyword arguments that would govern the sort order. This is a really good idea, worth doing. It's the only idea I know of that clearly belongs incollectionsright away.One problem with this is that I've never implemented a Fibonacci heap before. I only know about binary heaps, like the one in
heapq, which are slower. For example, merging binary two heaps is O(n); with Fibonacci heaps it's O(1).
20 February 2006
Possible side projects
I think I've picked my next side project. It sits nicely on the border between pointless and useful, and it's something particularly interesting and profitable for me. I've been thinking about how to do it, and I'm pretty sure I have a good approach. Best of all, it isn't anything I've mentioned here yet. The only thing is, it will take some focused effort.
One more side project idea:
Blog about the cool ideas that own my brain. I suspect there are a few really killer counterintuitive ideas I've run into that really knocked me flat and guide my entire philosophy—reliable systems made of unreliable parts (i.e. the Internet); order without design (the most important idea in economics and biology); etc. The main question is whether enough of them are non-math and non-computing to make them worth writing about.
17 February 2006
Possible side projects
- As an April Fool's joke, write a PEP to add Lisp-style macros to Python, complete with quoting, the whole nine yards. (I have a nagging feeling this idea is just short of brilliant, so if you happen to be a Python developer, please don't give me away! If this entry mysteriously disappears from my blog, you'll know I'm committed...)
Possible side projects
It would be cool if subversion had a command
svn post-patch -u <url>that would basically dosvn diff, put a summary of the files touched into a text file, open an editor so the user can add an explanation of the patch, tar+gzip it all together, and post the resulting patch to a specified HTTP URL.svncould even do something dumb to find the appropriate URL within the source tree itself, rather than requiring the user to specify it.The idea is, if you're a big open-source project using subversion, you could install some hypothetical web-based tool to receive and track patches. Your core developers could browse and apply patches with a few clicks.
16 February 2006
Possible side projects
- Help daniele with his really cool idea for a web site. (Bonus: It'll be a great way to learn Ruby on Rails.)
- Make a write-only object model for generating C code. I wonder if this exists. I have not come up with the right set of search terms to find it. The point is, if you create little programming languages, it's easier and more portable for your compiler to output C than machine language. On the other hand, you can't have continuations if you're stuck with C. I guess it's easier to produce Scheme code anyway...
- Write a library that allows any of a nice set of VMs (CLR, JVM, Python VM, etc.) to load any other on demand and use its libraries. The benefit is, you wouldn't have to choose a programming language for a particular project based on the libraries you want to use. There are tons of implementations of this for specific pairs of VMs (i.e. a version of Python that embeds the CLR) but nothing generic that I can see. This is probably too hard.
- Download pypy and see if I can write an objectspace where everything is a thunk. Lazy Python! (There is no point whatsoever to doing this.)
- Make a language called Chef 2 that's like Chef, but with a larger standard library of verbs and tools to give the recipes more variety. Possibly the theme could be more of a horror-flick thing. (Equally pointless.)
- Write some foldout toys in Haskell. Nothing specific in mind.
- Write more interpreters.
06 February 2006
Managed frivolity
I am struck by a sudden impulse to organize my free time to maximize frivolous output. I think the most important thing is to spend all my free time on one useless project until it's done.
My first project is to update my web site with pictures of Abby and new pictures of James. We have some really good ones.
Update: Done!