Friday, March 4, 2011

PHP literate programming project

This is going to be a somewhat terse post given the ambitiousness of the project I'm going to lay out.  I'm just interested in getting it out there to get some useful feedback.

Last year I wrote a simple literate programming system in perl, which accepted files in an extended docbook format, and had tangle and weave utilities to create source code (tangle) and well formatted xhtml articles (weave).  It was actually a pretty successful project, as it was target language agnostic.   The system didn't care whether the language to tangle was c, lisp, forth, or haskell, as long as the programmer knew the order required by the language.

At about the same time I conducted a podcast interview with Donald Knuth  which inspired me to take the project very seriously.

Since then I've done nothing with the perl version of the project, and have shifted my income generating attention to php.

So here's a gonzo version of an SRS for the PHP version of my utility.

The utility presents a web interface which accepts one or more files in an extended  docbook format (with added tags appropriate to literate programming), either imported or entered via a web based docbook editor.  The main interface gives three basic options, edit (create a source file in the extended docbook format), tangle (create a compilable or   interpretable file of source code), or weave (create an awesome human readable article explaining how the code works, with the complete source code imbedded ... see any of Donald Knuth's writings on literate programming to see how this works).

What I need from you PHP geeks is advice about the most efficient way to build a really good online Docbook editor.  I can probably figure out the backend tangle and weave routines quickly (it'll look a whole lot like the perl code I've already written.

1 comment:

  1. This is a nice article..
    Its very easy to understand ..
    And this article is using to learn something about it..
    c#,, php tutorial
    Thanks a lot..!