03 Apr 2005 (permalink)

"Potykaniem dobrym potykałem się, wiaręm zachował, zawodum dokonał. Na koniec przyznaczon mi jest wieniec sprawiedliwości."

Papież Jan Paweł II, wielki syn Narodu Polskiego, odszedł od nas. Cześć Jego pamięci.

15 Apr 2005 (permalink)


RMS has finally dubbed cflow a GNU package. I am now installing a repository on Savannah and working on other procedure issues (docs, web page, FSF directory entry etc.)

MIX language

There are quite some news in this respect. Firstly, I have prepared a patch to GNU MDK that fixes several incompatibilities between the language described by Dr.Knuth and the language accepted by MDK itself. These are:

José has agreed to include the patch into the future version of MDK

I have also returned to work on Douglas Laing MIX package. Douglas has kindly given me his permission to distribute the sources under GPL and has informed Dr.Knuth about the new package.

Why work on another MIX assembler/simulator when MDK is available? Well, there are quite a few reasons of doing so. While being a nice package, MDK does not quite satisfy my needs. What I want is a MIX assembler/simulator as closely conforming to TAOCP as is possible. Douglas's MIX meets this requirement, especially after I added back TTY device (by the way, I'm looking for a name for the new package, Conformant MIX seems to be quite a good choice).

Secondly, any MIX package is meant first of all for those who are studying TAOCP and are experimenting with the programs from its examples and excercises. This audience will certainly welcome a debugging feature. I have implemented MIX terminal mode, which, apart from remembering me IBM 360 console of the good ol' times, allows to debug MIX programs.

Another thing, given its special audience, a MIX package should be extremely educational itself. Again, MIX fits this description quite well. Its simulator is initially written closely following the guidelines set forth in TAOCP itself. Besides, it is written in WEB. And this brings me to the third objective of the package:

I want to rewrite the entire package in WEB. The primary motivation is explained above: it is to make sources well-documented and educational to the very extreme. There is a secondary motivation as well: I want to explore the limits of usability of CWEB tools, by pushing them to the very edge. At the risk of being accused of heresy, I must admit I doubt whether they could effectively be used for a real-world programming. Writing in literate programming style requires one to switch attention between TEX subtleties and writing good code, which is a difficult task (the new CWEB major mode for Emacs might help in this regard, though) and does not improve productivity. Besides I do not like much the way cweave formats large C data (e.g. arrays of structures). It is simply awful. So the purpose is to explore all pros et contras of CWEB tools.

The majority of MIX sources are rewritten in WEB. I have even managed to produce a valid YACC source file from a .w source (see mixal.w)!

The only two sources left are lex.l, which is downright impossible to write in WEB, and automatically-generated optab.c, which, being processed by cweave, looks like a pile of ..., well, garbage.

Trying to make my best to handle these, too...

Oh, well, and last but not the least: the package will provide a MIX simulator written entirely in Elisp. There exists a preliminary implementation already.


I have published my modifications to Warren Toomey's apout package. The modifications permit to run all programs from the earliest UNIX binaries found so far: so called 1972_stuff, binaries dated 1973, discovered by Dennis Ritchie.

Here is my message to Warren describing the details. It is interesting to notice the date, by the way.

Other things

Have you ever tried to download, compile and install a dozen and a half aspell dictionaries on one machine? If you ever need it, use this script.

18 Apr 2005 (permalink)


It was possible to write entire MIX in CWEB! Even including optab.c and lex.l!

However, I had to write a special post-processing program to handle lex and yacc sources, created by ctangle. Here it is.

Another good news: Dr.Knuth's home page already includes a link to MIX.