From: Jamie Border
Subject: CL Literate Programming
Date: 
Message-ID: <dbt8ng$79$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>
I'm sure this has been asked before, but:

Anybody know of a literate programming environment for CL (in CL or ELisp)?

Googling found lisp-doc[1], which I don't really like the look of, and 
LLPE[2], which seems hugely complex.

Is anybody using either of these?  How do you rate them?

Piet Hut and Jun Makino have some interesting ideas[3], but no pusblished 
conscrete plans or code.

Does anybody actually write literate programs in CL?

Has anybody attempted writing their own LP tools?

Any guesses as to the complexity of writing something to produce TeX and/or 
XML output?

Questions, questions...

Jamie

From: Larry Clapp
Subject: Re: CL Literate Programming
Date: 
Message-ID: <slrnde4e8a.k91.larry@theclapp.ddts.net>
On 2005-07-23, Jamie Border <·····@jborder.com> wrote:
> Anybody know of a literate programming environment for CL (in CL or
> ELisp)?

Take a look at the Leo editor[1] (written in Python, though).  I
haven't had time to really try it, but I fiddled with it for a few
days and it seemed kind of neat.

-- Larry


[1] http://webpages.charter.net/edreamleo/front.html
From: drewc
Subject: Re: CL Literate Programming
Date: 
Message-ID: <HBwEe.22679$s54.16389@pd7tw2no>
Larry Clapp wrote:
> On 2005-07-23, Jamie Border <·····@jborder.com> wrote:
> 
>>Anybody know of a literate programming environment for CL (in CL or
>>ELisp)?
> 
> 
> Take a look at the Leo editor[1] (written in Python, though).  I
> haven't had time to really try it, but I fiddled with it for a few
> days and it seemed kind of neat.
> 

I used LEO religiously for years. It's a great tool, and if i was doing 
anything but Common Lisp, i'd probably use it still. I've found that, 
with CL, i can structure my code how I want anyway, so i don't really 
need to weave/tangle like i would in lesser languages.

FWIW. I use Marco's qbook now, but i did hack CL support into LEO at one 
point (based on the elisp mode), and you can email me for the code :)

drewc

-- 
Drew Crampsie
drewc at tech dot coop
"Never mind the bollocks -- here's the sexp's tools."
	-- Karl A. Krueger on comp.lang.lisp
From: Jamie Border
Subject: Re: CL Literate Programming
Date: 
Message-ID: <dc0oej$sdc$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com>
"drewc" <·····@rift.com> wrote:

> FWIW. I use Marco's qbook now, but i did hack CL support into LEO at one 
> point (based on the elisp mode), and you can email me for the code :)

That's two people who have much more time on CL than me using the same 
product.  Good enough recommendation for me.

Would be nice to produce latex output, though.

Jamie

>
> drewc
>
> -- 
> Drew Crampsie
> drewc at tech dot coop
> "Never mind the bollocks -- here's the sexp's tools."
> -- Karl A. Krueger on comp.lang.lisp 
From: drewc
Subject: Re: CL Literate Programming
Date: 
Message-ID: <sgSEe.27744$5V4.16381@pd7tw3no>
Jamie Border wrote:
> "drewc" <·····@rift.com> wrote:
> 
> 
>>FWIW. I use Marco's qbook now, but i did hack CL support into LEO at one 
>>point (based on the elisp mode), and you can email me for the code :)
> 
> 
> That's two people who have much more time on CL than me using the same 
> product.  Good enough recommendation for me.
> 
> Would be nice to produce latex output, though.

Although i have not used it myself, qbook from arch (Marco, is qbook in 
darcs somewhere yet?) has a latex output option.


-- 
Drew Crampsie
drewc at tech dot coop
"Never mind the bollocks -- here's the sexp's tools."
	-- Karl A. Krueger on comp.lang.lisp
From: Jamie Border
Subject: Re: CL Literate Programming
Date: 
Message-ID: <dc28nq$21s$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com>
"drewc" <·····@rift.com> wrote:

Me>> Would be nice to produce latex output, though.
>
> Although i have not used it myself, qbook from arch (Marco, is qbook in 
> darcs somewhere yet?) has a latex output option.

Sold.

Jamie

>
>
> -- 
> Drew Crampsie
> drewc at tech dot coop
> "Never mind the bollocks -- here's the sexp's tools."
> -- Karl A. Krueger on comp.lang.lisp 
From: Marco Baringer
Subject: Re: CL Literate Programming
Date: 
Message-ID: <m24qajckps.fsf@soma.local>
drewc <·····@rift.com> writes:

> Although i have not used it myself, qbook from arch (Marco, is qbook
> in darcs somewhere yet?) has a latex output option.

just moved qbook over to darcs:

http://common-lisp.net/project/bese/repos/qbook/

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Albert Reiner
Subject: Re: CL Literate Programming
Date: 
Message-ID: <vw87jfh3h4y.fsf@berry.phys.ntnu.no>
["Jamie Border" <·····@jborder.com>, Sat, 23 Jul 2005 11:12:49 +0000 (UTC)]:
> Does anybody actually write literate programs in CL?

I do, using noweb.

Albert.
From: Marco Baringer
Subject: Re: CL Literate Programming
Date: 
Message-ID: <m2oe8t69vk.fsf@soma.local>
"Jamie Border" <·····@jborder.com> writes:

> Has anybody attempted writing their own LP tools?

[this isn't really literate programming in the sense that there's no
weaving or tangling. it is literate programming in the sense that the
source code is designed to be read in a linear fashion by a human and
it can be used to augment (but NOT replace) an API/internals document]

luke gorrie came up with the deceptively simple pbook:

http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf

i then took it and wrote the same thing in lisp:

http://common-lisp.net/project/bese/docs/qbook/

(both of those are the output of said systems)

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Jamie Border
Subject: Re: CL Literate Programming
Date: 
Message-ID: <dbtaku$jd2$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com>
Marco:

Thanks, I'll have a look at this - it may prove sufficient to my needs.

My OP hasn't appeared yet (to me), so I'll include the references here 
*sigh*

[continued]

And I've seen Albert[4], but this is more javadoc than LP, really.


[1] http://lki-www.informatik.uni-hamburg.de/~kirschke/invlit.html#lisp-doc
[2] http://anny.kinjo-u.ac.jp/~houser/llpe/Welcome.html
[3] http://www.artcompsci.org
[4] http://albert.sourceforge.net


"Marco Baringer" <··@bese.it> wrote in message 
···················@soma.local...
> "Jamie Border" <·····@jborder.com> writes:
>
>> Has anybody attempted writing their own LP tools?
>
> [this isn't really literate programming in the sense that there's no
> weaving or tangling. it is literate programming in the sense that the
> source code is designed to be read in a linear fashion by a human and
> it can be used to augment (but NOT replace) an API/internals document]
>
> luke gorrie came up with the deceptively simple pbook:
>
> http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf
>
> i then took it and wrote the same thing in lisp:
>
> http://common-lisp.net/project/bese/docs/qbook/
>
> (both of those are the output of said systems)
>
> -- 
> -Marco
> Ring the bells that still can ring.
> Forget the perfect offering.
> There is a crack in everything.
> That's how the light gets in.
> -Leonard Cohen 
From: Jamie Border
Subject: Re: CL Literate Programming
Date: 
Message-ID: <dbtclb$4sn$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com>
I wrote:

[vague question about Literate Programming in CL]

Afterthought:  How hard would it be to put hooks in defining forms (defun, 
defclass, devar, etc...), to allow me to maintain a 'current' structure 
containing things like:

* CLOS class hierarchy
* defined functions
* defined variables/parameters
* sutff I haven't considered yet

The basic idea would be to maintain some separate representation of the 
things I'm interested in, to enable 'live' changes to their doc as/when 
needed.

Rationale:  If I re-defun something at the REPL (or more likely in SLIME), 
that would be the right time for me to change the doc, as it is fresh in my 
mind.

I'm not (yet) looking to write a general-purpose tool suitable for 
everybody.  At the moment this is just for me.

Also, I haven't fully thought this through :-)  I'm sure there are terrible 
flaws in the concept.

Anyway, I think it sounds like a fun little project, and it'll help my CL 
knowledge in the process.

Jamie

"Jamie Border" wrote:

> Marco:
>
> Thanks, I'll have a look at this - it may prove sufficient to my needs.
>
> My OP hasn't appeared yet (to me), so I'll include the references here 
> *sigh*
>
> [continued]
>
> And I've seen Albert[4], but this is more javadoc than LP, really.
>
>
> [1] 
> http://lki-www.informatik.uni-hamburg.de/~kirschke/invlit.html#lisp-doc
> [2] http://anny.kinjo-u.ac.jp/~houser/llpe/Welcome.html
> [3] http://www.artcompsci.org
> [4] http://albert.sourceforge.net
>
>
> "Marco Baringer" <··@bese.it> wrote in message 
> ···················@soma.local...
>> "Jamie Border" <·····@jborder.com> writes:
>>
>>> Has anybody attempted writing their own LP tools?
>>
>> [this isn't really literate programming in the sense that there's no
>> weaving or tangling. it is literate programming in the sense that the
>> source code is designed to be read in a linear fashion by a human and
>> it can be used to augment (but NOT replace) an API/internals document]
>>
>> luke gorrie came up with the deceptively simple pbook:
>>
>> http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf
>>
>> i then took it and wrote the same thing in lisp:
>>
>> http://common-lisp.net/project/bese/docs/qbook/
>>
>> (both of those are the output of said systems)
>>
>> -- 
>> -Marco
>> Ring the bells that still can ring.
>> Forget the perfect offering.
>> There is a crack in everything.
>> That's how the light gets in.
>> -Leonard Cohen
>
> 
From: Robert Uhl
Subject: Re: CL Literate Programming
Date: 
Message-ID: <m3mzodfow6.fsf@4dv.net>
"Jamie Border" <·····@jborder.com> writes:
> 
> Afterthought: How hard would it be to put hooks in defining forms
> (defun, defclass, devar, etc...), to allow me to maintain a 'current'
> structure containing things like:
> 
> * CLOS class hierarchy
> * defined functions
> * defined variables/parameters
> * sutff I haven't considered yet

With macro and function advice I imagine it'd be pretty easy, but I
don't know if any implementations support macro advice (I'm an utter
newb, though, so it's possible that every advanced implementation
_does_).

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
Old Russian Proverb: If you see a Bulgarian on the street, beat him;
                     he will know why.
From: Marco Baringer
Subject: Re: CL Literate Programming
Date: 
Message-ID: <m2ek9p4sl8.fsf@soma.local>
"Jamie Border" <·····@jborder.com> writes:

> Afterthought:  How hard would it be to put hooks in defining forms (defun, 
> defclass, devar, etc...), to allow me to maintain a 'current' structure 
> containing things like:
>
> * CLOS class hierarchy
> * defined functions
> * defined variables/parameters
> * sutff I haven't considered yet

the only simple and portable way to do this would be to stuff all the
documentation into docstrings. lisp already provides ways of
inspecting variables/parameter, functions, clos classes and slots,
macros, packages and extracing the associated documentation. this is,
basically, what albert does.

your other option is to use your own defwhatever forms (probbaly just
by shadowing the cl versions) and build whatever hooks you need around
those.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Jonathan Bartlett
Subject: Re: CL Literate Programming
Date: 
Message-ID: <42e8e42f@news.tulsaconnect.com>
> Anybody know of a literate programming environment for CL (in CL or ELisp)?

For a language-agnostic literate programming system, see:

http://literatexml.sourceforge.net/

Jon
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017