Mark Fredrickson wrote:
Hello Tim,

Knuth originally created an idea of literate programming
where you embed source code into latex documents. He called
such documents "web" documents (because nobody had yet used
the word "web").

Thanks for passing along your code. I have some familiarity with
noweb. I use Sweave every day (R's noweb implementation), though not
for many of its more advanced features. I specifically avoided the
using the phrase "literate programming" for a few reasons:

1. I have never defined chunks in different orders than they should
execute. I have no need for this feature. As I understand it, out-of-
order chunks are a cornerstone of the lit. prog. model.
Actually I rarely use this feature.
I do use the fact that equal chunk names get combined so that I can split a
large chunk into parts and add explanations in the middle.
2. Insofar as "literate programming" implies "noweb", I dislike the
<<>>=/@ syntax. Moreover, this syntax requires a smarter parser to
understand any options inside the <<...>>= directives. My parser is
dumb. My insight is that I can do the same things as <<echo = TRUE>>=
through a macro (output-forms ...). The system is extensible, unlike
noweb.
Literate programming and noweb are independent. As I said, the lisp version of tangle
uses latex syntax such as

\begin{chunk}{some chunk name}
 (your code)
\end{chunk}

rather than the

<<some chunk name>>=
 (your code)
@

This has the considerable advantage that your document is pure latex.
3. Insofar as "literate programming" implies "LaTeX," while I write a
lot of TeX, I intend to use this system for blog posts, README files,
perhaps even inline documentation as mentioned above. My experience
with Sweave shows that writing other document types is not the
default. Perhaps there is an option to not inject \Schunk{...} into
my .txt files, but changeling is designed from the group up to support
many different output contexts.

The same magic can happen in TeX since latex is only a macro layer.
I may be reinventing the wheel, but mine has bling rims. ;-)
The details are not important but the use of literate programming (or whatever term you prefer) is important and can dramatically change the quality of the system.
-Mark


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to