Tuesday, February 24, 2009

LaTeX, Python and Literate Programming

In my spare time (a couple of hours per weekend...!) I am implementing calcal, a Python version of calendrica-3.0.cl, the Common Lisp implementation of the calendars from N. Dershowitz, E. M. Reingold Calendrical Calculations, 3rd Edition. (In case you are interested you can find a preview in my google page.)
At some point I decided to go Literate [Programming] using noweb. This is an experiment in the experiment but so far it has been a good choice because I can define all I need in the same place and generate documentation, source code (Python, shell scripts ...) from the same source.
I also found something interesting (on a now disappeared blog ttp://usefreetools.blogspot.com): executing Python from within LaTex! I could use it to avoid to hardcode results in my doc and just calculate them on the fly...
The same blog was showing how to build LaTeX docs using SCons: I will defenitly use it; my Makefile isn't that great nor easy to mantain.

Monday, February 23, 2009

My Giants

I am probably too selective, anyway my models for computer science/software engineering (one of them would disagree on both definitions) are just two: Donald E. Knuth and Alan Kay.
The first one continues to surprise me with the depth, clarity and joy of his works: from TeX (well, I use LaTex but it does not exist without TeX) to The Art of Computer Programming to Literate Programming.
About the latter, I was one of the blessed to be present to his Turing Award Lecture: he shocked me to the point I had two sleepless nights so angry I was about having wasted so much time in useless (computer) matters! After that I have been studying and using a lot of what he wrote and presented from Squeak to Croquet to the Burroughs B5000 and stack computers to his recent line of exploration and the proposal to NSF about reinventing programming (PDF).