It's not suitable for our aspiring beginners[0], but my recent article suggests a programming exercise, not only easy (and enjoyable), but also of historical interest:

http://queue.acm.org/detail.cfm?id=2724586

The basic problem is to write a "compiler-compiler" (the square root of a compiler?). I provide some historical context and translations to modern vocabulary, in an effort to make it easier to approach the over 50-year-old original paper, but in a modern environment the task should be well within the grasp of anyone who calls themselves a programmer.

-Dave

(the former and current compiler writers among us should find the task itself trivial, but —being less distracted by mechanics— are more likely to appreciate the subtler pleasures of recreating[1] self- reproducing systems)

[0] for beginners, I woud instead recommend the classic chestnut: write a program which prints its own source. (and absolute beginners are allowed and encouraged to find the "trivial" solutions, before doing it properly) [1] as per Schrödinger's aperiodic crystals: Val Schorre's program concretely reproduced itself on IBM 1401s, but his paper allowed me to transpose it (via a language invented roughly halfway between then and now) to a program concretely reproducing itself on modern machines — so, in my view, the paper is an abstract self-reproducer.


Reply via email to