I shipped the first release of another retro-language revival today: COMIT. Dating from 1957 (coincidentally the year I was born) this was the first string-processing language, ancestral to SNOBOL and sed and ed and Unix shell. One of the notational conventions invented in COMIT, the use of $0, $1…etc. as substitution variables, survives in all these languages.
I actually wrote most of the interpreter three years ago, when a copy of the COMIT book fell into my hands (I think A&D regular Daniel Franke was responsible for that). It wasn’t difficult – 400-odd lines of Python, barely enough to make me break a sweat. That is, until I hit the parts when the book’s description of the language is vague and inadequate.
It was 1957 and nobody knew hardly anything about how to describe computer language systematically, so I can’t fault Dr. Victor Yngve too harshly. Where I came a particular cropper was trying to understand the intended relationship between indices into the workspace buffer and “right-half relative constituent numbers”. That defeated me, so I went off and did other things.
Over the last couple days, as part of my effort to promote my Patreon feed to a level where my medical expenses are less seriously threatening, I’ve been rebuilding all my project pages to include a Patreon button and an up-to-date list of Bronze and Institutional patrons. While doing this I tripped over the unshipped COMIT code and pondered what to do with it.
What I decided to do was ship it with an 0.1 version number as is. The alternative would have been to choose from several different possible interpretations of the language book and quite possibly get it wrong.
I think a good rule in this kind of situation is “First, do no harm”. I’d rather ship an incomplete implementation that can be verified by eyeball, and that’s what I’ve done – I was able to extract a pretty good set of regression tests for most of the features from the language book.
If someone else cares enough, some really obsessive forensics on the documentation and its code examples might yield enough certainty about the author’s intentions to support a full reconstruction. Alas, we can’t ask him for help, as he died in 2012.
A lot of the value in this revival is putting the language documentation and a code chrestomathy in a form that’s easy to find and read, anyway. Artifacts like COMIT are interesting to study, but actually using it for anything would be perverse.
“actually using it for anything would be perverse”
This from the guy who single-handedly resurrected INTERCAL…
>This from the guy who single-handedly resurrected INTERCAL…
I’ve always said that I was crazy enough to write an INTERCAL implementation, but not crazy enough to use it.
If you didn’t use it, how did you test? ;)
>If you didn’t use it, how did you test? ;)
Obviously, by :use: I meant “write code for a present-day problem”,
For both INTERCAL and COMIT, I made tests from the existing code in those languages – usually the examples in the language manuals.
Were you tempted to use “Yngve is not a louse!” as a title?
>Were you tempted to use “Yngve is not a louse!” as a title?
You, sir, just won this comment thread.
>I was able to extract a pretty good set of regression tests for most of the features from the language book.
I’d think the most important regression test for this particular language is to print the interpreter listing and eat it.
If properly implemented, COMIT should cause facial discoloration, a lingering petrochemical aftertaste, intense nausea (within 24 hours of consumption), and an obsession with the Colonel Bogey March.
It seems the “comit” file (the actual Python script) is missing from the tarball at http://www.catb.org/~esr/comit/comit-0.1.tar.gz
>It seems the “comit” file (the actual Python script) is missing from the tarball
Ugh. Fixed.
That was an embarrassing typo.
Just noticed that you’re still linking to Google+ at the bottom of your posts. It may be time to remove that. :)