emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Literate Programming with Org mode
Date: Tue, 28 Jul 2009 22:41:50 +0200	[thread overview]
Message-ID: <874oswpmk1.fsf@mundaneum.com> (raw)
In-Reply-To: 1e5bcefd0907280946r7b2eb7b9lac80ddc813fa9809@mail.gmail.com

Hi Marcelo,

Marcelo de Moraes Serpa wrote:
> Sébastien Vauban wrote:
>> Hi Eric and all,
>>
>> Here some promised description of how I'm using Literate Programming with
>> LaTeX (up to now -- soon directly from Org mode?).
>>
>> I write an "enhanced LaTeX" file ([1], having the `.nw' -- for Nuweb --
>> extension). It is enhanced as I can put blocks of code in there (SQL blocks,
>> for example), and give them a name for further referencing.
>>
>> Then, at some point in the file, I say how I want the code files to look like,
>> by assembling the blocks in a certain order, with some glue.
>>
>> [...]
>>
>> OK. So, my `org-lit-prog.nw' file is ready, and committed under Subversion
>> (this is the only one I'm committing as it contains both the documentation of
>> the code, and the source code itself).
>>
>> Then, I just type `noweb org-lit-prog.nw' to extract both:
>>
>>    o   the LaTeX file [2] to be compiled into a PDF [3],
>>    o   the different source code files (Enterprise.sql [4], Lessons.sql [5],
>>        [6] and [7])
>>
>> Just that easy to keep code and doc in sync, and get a very nice-to-read
>> documentation of the code.
>>
>> [...]
>>
>> Is the above description worth for you?  Do you understand how I work when
>> documenting code?  Pay attention: I'm *the* expert in literate programming.

Euh... Euh... Euh... I meant: I am _NOT_ *the* expert in literate programming.
Just a user of the approach... Sorry for misbehaving ;-)


>> Just an amateur being seduced by some of its features.
>
> Hmm, this seems interesting and something I'm looking for, but I'm not
> entirely sure what you mean by "literate programming" (I haven't
> googled yet either, I'm about to do it once I answer this message).

If I would have to summarize what it is in a sentence, it would be this: LP
(not logic programming) is about *putting the code in the documentation* -- at
the opposite of the current mainstream approach where one puts the
documentation inside the code (where there is documentation!).

I've heard that Knuth told about it in those words: it's when we will be able
to read the code of a software in our bed, reading a book made of 90% of
documentation and 10% of code. If someone can find this phrase somewhere...


> Anyway, I have a project I'm working on right now that requires me to
> set up a "publishing environment", in the sense that I might have
> source files (maybe in XML or whatever format makes sense) and be able
> to convert them to LaTeX (for pdf), html or whatever format I could
> think of, using XSLT, something like the "pragmatic programmers"
> publishing toolchain. Not sure if literate programming has anything to
> do with that :)

As far as I can understand, yes, as you're talking of inserting source code
(of whatever language) in your big documentation of the project. That's the
philosophy, yes, *iff* you produce the code out of that documentation. The
code is becoming an output of the documentation. Not the opposite.

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-07-28 20:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 16:14 Literate Programming with Org mode Sébastien Vauban
2009-07-28 16:46 ` Marcelo de Moraes Serpa
2009-07-28 20:41   ` Sébastien Vauban [this message]
2009-07-28 21:53     ` sam kleinman
2009-07-29 22:16       ` Eric H. Neilsen, Jr.
2009-07-31 17:01       ` Eric Schulte
2009-07-31 20:30         ` sam kleinman
2009-07-30  0:42 ` Eric Schulte
2009-08-02  1:46   ` Eric Schulte
2009-08-03  8:42     ` Sébastien Vauban
2009-08-03 15:38       ` Eric Schulte
2009-08-11  9:42         ` Sébastien Vauban
2009-08-11 18:55           ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874oswpmk1.fsf@mundaneum.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).