I seem to be in another “excited about programming languages” phase.
First it was lcc. I spent a couple of days reading and thinking about the project, and decided I want to read the book. The preface does a good job of explaining why the project is important and interesting. I really like the idea of documenting end-to-end – via literate programming – a large software artifact – in this case a portable ANSI C compiler. Niklaus Wirth has complained that there should be more books and papers written that carefully describe complete systems – ideally the description should include the source code – rather than exhibiting lots of theory and small and useless toy systems. While his projects successfully embody this ideal – which I share – his implementations tend to leave me cold. Oh well.
Thinking about lcc reminded me of my idea of writing (yet another) Haskell compiler in Haskell, with the intent that it be small and beautiful, and that there be a book describing it (that includes all the source code!). I wish I knew where & how to begin working on this.
Somehow while noodling and googling about my Haskell project, I discovered that Caltech have a Haskell track in their “language lab” course, and Jason Hickey uses Objective Caml in the compiler course he teaches there. He has written an introductory Objective Caml book that you should download, because soon it will be published on paper and unavailable electronically.
Then, today, I was reading about Scheme again (partly in search of a good, friendly implementation for learning the language) and became fascinated reading the vehement votes against ratification of R6RS.
I want to say more about revised six Scheme than will fit comfortably here.
My code used to be in a Subversion repo, parts of which were publicly available from svn.nimblemachines.com, a CNAME for my webserver machine. The Apache configuration for that subdomain fired up some Subversion-Apache-WebDAV magic so that the code was browsable from the web and indexable by spiders.
All that has changed. My code is in Git repositories now, and I’m not hosting them on my machine (though it is easy to do so, using git-daemon). Instead I’m using a hosted Git repo.
Last night I started to edit by hand the wiki pages that refer to svn.nimblemachines.com and change them over to github.com, but midway through the process realized that I may have to do this again if things move in the future. Instead of constantly editing pages I should have an abstraction: some wiki markup that acts like a macro and expands to the current code repository host.
The markup for linking to a Git repo is this:
Git:muforth Git:muforth/mu/target/ARM/ Git:muforth:target-arm
The Git keyword can take an optional branch (prefixed by ":”) and an optional path (prefixed by "/") after the project name. In general the format would be Git:project:branch/path.
There are two subtleties with this approach. One is that I can’t use these macros in preformatted sections – which is usually where I explain command lines and such – because doing so would, among other things, make it hard to demonstrate the code, since it would get expanded into URIs instead.
The other is that while I now have an abstraction for where my code repos are, I often say something like “my code is now hosted github.com; browse it here” and make a link ... using these macros. Which, down the road, will expand to something other than github.
So I need to mention github in one place only – how about my mention of it already in this post? – and elsewhere on the site simply say “browse the code here”, where here is a link to some Git markup. Now I need to go eradicate the several mentions of github that I’ve scattered about.
I agree with referring to github in one place only (actually two: one page, and the code that expands the Git macro). But I would refer to a page, say, Git repo and mention on that page where it is actually hosted. --Michael Pruemm
I’ve done precisely this. Thanks.
I’m likely to launch into an annoying phase. This is your warning.
More concretely, I’ve been thinking about American English and how much it annoys me. Having already adopted two conventions of British English, I may start using their spellings as well. I did this when I was much younger – perhaps in middle school – and enjoyed it. I stopped doing it because it seemed precious and posery. Now I don’t care. I like what I like, and there isn’t any good reason to use spellings that I find ugly, when I could simply choose a more pleasing way.
I am unlikely to change existing pages on this site; that way there will be a demarcation between my sanity and insanity.
The two conventions I’ve adopted already are these:
- chapter and section headings have only the initial word capitalized (excepting proper nouns); and
- aggregates (companies, bands) are referred to in the plural (as in “Ford have introduced”, rather than “Ford has introduced”.)
Of course, this wiki violates that first “rule” because of the way that it converts CamelCase page names into titles, and this is, in fact, one reason that I keep considering replacing the CamelCase linking with something more flexible.
I’ve always thought that American “modernized” spellings were ugly and stupid. And I like calling the letter Z zed. It sounds final, as it should, unlike the American zee!! which sounds like a whoop uttered by someone riding a roller coaster.
What people here in America often call a donut used to be spelled doughnought which tells much more about what it is: a hunk of (fried) dough in the shape of a nought – nought being another name for zero.
I think that’s much more interesting and far less ugly. It has a story to tell that donut is silent about.
Modernized, “simplified” spellings also relate to an ugly American habit of intentional misspelling (Krispy Kreme) that is egregious enough that it deserves its own post. I’ll leave that for later.
And don’t get me started on our failed effort to convert to the metric system.
What a backwards country I live in!
Back again after a bit of a hiatus. I’ve put the site back up temporarily while I perseverate about my future. Right now it is being served from starbuck, the machine under my desk (and next to my bed) that I use for programming microcontrollers. This means that it may go away at night, since I don’t want to listen to its fan while I’m trying to sleep.
I’m about to launch into a minor rewrite of the site engine – mostly involving how it stores pages. They are in Subversion now, but there isn’t a good way to browse past versions. I wanted to put them into Git, but that would be even worse. Not because Git is somehow bad (on the contrary, I love it) but because it’s only possible to have one tree checked out. If various people are viewing various versions of pages, this becomes a bit complicated.
Also, right now I store two tidbits of metadata as Subversion properties: the page modtime (as a Unix epoch), and a commit message. With Git I don’t have this capability, so I need another way to store metadata.
I need to experiment. But I also wanted to be able to write about what I was doing, so I fired the site back up, as it was, and will be using the Subversion backend for now.
I’d also like to report that I’ve been pretty busy. In early March I agreed to give a talk at DorkbotPDX 0x01. This got me fired up to dig into muforth (one subject of my talk) and I spent a week first using git svn to exhume my code from its grave in Subversion, and get it into Git, and then a couple of weeks cleaning up and trying out new things.
Using git svn actually worked really well, but it meant I had to let go of my desire to use my Lua code (that parses Subversion dump files and generates commands and data for git-fast-import) – which I could not get to work. It turns out that parsing dump files is the wrong approach, at least for a repo, like mine, that had been twisted around and reorganized (partly to fix mistakes of mine, and partly to fix shortcomings of various conversion tools).
I was rather depressed about not using my Lua code, and initially didn’t trust that git-svn would work. I did some experiments, and carefully checked various revs between Git and svn trees (using “diff -ur”), and convinced myself that I was getting good output. Once I swallowed my pride, used git-svn for the conversion, and put my muforth code in a public Git repo, I was pretty ecstatic, and launched into two solid weeks of coding, and using Git – which I now love, even though I agree with the consensus that its UI is a bit dain-bramaged.
After my talk I spent some time soldering – first building a couple of RBBBs (a form of Arduino), and then a tube mic preamp (which is still not quite finished). That was really fun. I’m not the most skilled soldering tech, but I enjoy it. I’d love to build some more audio gear!
Now I’m going to turn my thoughts to random page fixes and working on the backend.
In 2003 I played with Ruby a bit, but decided not to pursue it. Now I’m reconsidering Ruby. At least for the web. Or parts of it.
It might be fun, and there are lots of Rubyists in PDX to talk to. Maybe I can convince them all to use Haskell.
I’m posting partly to do a brain dump of things I’ve recently discovered, and also to mention some recent project ideas.
I am, for the present, giving up on BSD. I ran into different kinds of trouble with FreeBSD, NetBSD, and DragonFlyBSD, and decided to try running Linux again (for the first time in seven years.). I found Arch Linux, and have been happy with it so far – having used it for a month or so.
I haven’t done much with Git, but I still think that it’s the future, and look forward to playing around with it.
I’ve been thinking about writing a Forth interpreter and cross-compiler in Lua, and may still, but never got beyond the idea stage.
Instead I got very inspired by Alan Kay and Ian Piumarta's work on reinventing programming – so much so that I’ve decided I want to try to do what they are doing, but in the functional space ... by writing a Haskell compiler in 5000 lines of code. I have no idea if it’s even possible, but I’d like to try. It would be bootstrapped, as simple as possible, deeply convivial, and as “live” as possible: the system would, like Lisp, Smalltalk, or Forth, have the entire compiler available at all times.
Since I’m currently planning to move out of my house and leave on a trip (of unknown duration!), there will no longer be a place called “my basement”, so the server that resides there will have to move. I’ll probably give it to a friend, but even so I’m thinking I might be done with self-hosting; hence – I’ve recently been looking for interesting (free, cheap, powerful, different, innovative, whatever) web hosting solutions, having solved my email hosting problems by hosting email on Google Apps. Sadly Google don’t offer compelling ways to build web sites. Their Google Pages service is silly – they offer a WYSIWYG interface for building pages, and each one can be styled independently. They should instead offer some kind of super-simple content management system (CMS) that can be easily tweaked into being a blog or wiki. Oh well.
Rather than take up more space here, I’ve collected some ideas about web hosting.
Read the 2007 journal.