[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [slightly OT] New O'Reilly book features Matz

Yukihiro Matsumoto

3/15/2007 6:17:00 AM

Hi,

In message "Re: [slightly OT] New O'Reilly book features Matz"
on Thu, 15 Mar 2007 12:25:32 +0900, James Edward Gray II <james@grayproductions.net> writes:

|> I am against "literate programming" in a sense Don Knuth did in his
|> Web system.
|
|Can you expand on what you mean by that Matz? I'm just curious.

Knuth's Web is the system he developed for literate programming (it's
not World Wide Web, just coincidence). One can generate both document
for the algorithm and working code to compile (Pascal in original Web)
from one source with special mark-up.

He's idea is retrieving programs from document. Mine is making
programs to tell what they do, by choosing proper programming
languages.

matz.

3 Answers

M. Edward (Ed) Borasky

3/15/2007 6:48:00 AM

0

Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: [slightly OT] New O'Reilly book features Matz"
> on Thu, 15 Mar 2007 12:25:32 +0900, James Edward Gray II <james@grayproductions.net> writes:
>
> |> I am against "literate programming" in a sense Don Knuth did in his
> |> Web system.
> |
> |Can you expand on what you mean by that Matz? I'm just curious.
>
> Knuth's Web is the system he developed for literate programming (it's
> not World Wide Web, just coincidence). One can generate both document
> for the algorithm and working code to compile (Pascal in original Web)
> from one source with special mark-up.
>
> He's idea is retrieving programs from document. Mine is making
> programs to tell what they do, by choosing proper programming
> languages.
>
> matz.
>
I agree with you in your assessment of the original version of "literate
programming". It was intended to get the programmer to create the
documentation hand in hand with the code. However, literate programming
has evolved into a concept I find very appealing -- so called
"reproducible research." As practiced by the bio-informatics community
in the R language, the core concept is something called a compendium. A
compendium is a software package, which contains all of the code and
data required to reproduce the research, including the tools to write
the paper. The way it's done in R, and the way it could be done in Ruby,
the author creates a collection of source and data files. The literate
programming process of _weaving_ produces the document -- in the case of
R, this includes running R scripts that do the analysis, create the
figures, and so on.

I think what I really would like to see is some combination of
test/behavior driven development and reproducible research. In short,
the programmer develops the tests, the software *and* the documentation
concurrently.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


Chad Perrin

3/15/2007 8:11:00 AM

0

On Thu, Mar 15, 2007 at 03:16:47PM +0900, Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: [slightly OT] New O'Reilly book features Matz"
> on Thu, 15 Mar 2007 12:25:32 +0900, James Edward Gray II <james@grayproductions.net> writes:
>
> |> I am against "literate programming" in a sense Don Knuth did in his
> |> Web system.
> |
> |Can you expand on what you mean by that Matz? I'm just curious.
>
> Knuth's Web is the system he developed for literate programming (it's
> not World Wide Web, just coincidence). One can generate both document
> for the algorithm and working code to compile (Pascal in original Web)
> from one source with special mark-up.
>
> He's idea is retrieving programs from document. Mine is making
> programs to tell what they do, by choosing proper programming
> languages.

In other words: literate programming is "documentation as code", and
your preference is "code as documentation". Yes?

I tend to share that preference. I've looked into "literate
programming" a little bit, and found it unnecessarily byzantine in
practice.

--
CCD CopyWrite Chad Perrin [ http://ccd.ap... ]
unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.

M. Edward (Ed) Borasky

3/15/2007 2:08:00 PM

0

Chad Perrin wrote:
> On Thu, Mar 15, 2007 at 03:16:47PM +0900, Yukihiro Matsumoto wrote:
>
>> Hi,
>>
>> In message "Re: [slightly OT] New O'Reilly book features Matz"
>> on Thu, 15 Mar 2007 12:25:32 +0900, James Edward Gray II <james@grayproductions.net> writes:
>>
>> |> I am against "literate programming" in a sense Don Knuth did in his
>> |> Web system.
>> |
>> |Can you expand on what you mean by that Matz? I'm just curious.
>>
>> Knuth's Web is the system he developed for literate programming (it's
>> not World Wide Web, just coincidence). One can generate both document
>> for the algorithm and working code to compile (Pascal in original Web)
>> from one source with special mark-up.
>>
>> He's idea is retrieving programs from document. Mine is making
>> programs to tell what they do, by choosing proper programming
>> languages.
>>
>
> In other words: literate programming is "documentation as code", and
> your preference is "code as documentation". Yes?
>
> I tend to share that preference. I've looked into "literate
> programming" a little bit, and found it unnecessarily byzantine in
> practice.
>
It's also, as it's usually practiced, rather dependent on the literate
programmer knowing another of Knuth's inventions -- TeX/Metafont and the
common open source implementations thereof. Just about everybody with a
formal CS background and everybody who expects to publish in
peer-reviewed journals is forced to learn this stuff anyhow. The LyX
document processor makes it (just barely) possible for someone without
TeX (LaTeX, to be precise) knowledge to do literate programming.

I am actually hacking away on a project called Rameau to bring
reproducible research to Ruby -- more the other way around, actually --
to apply the pragmatic automation of Ruby to the processes of
reproducible research. I haven't spent too much time on it recently, but
I'll assume neither you nor Matz is interested in volunteering to join
it when I get more of it laid down and start looking for help. :)

ObHeroWorship: Donald Knuth is probably one of the smartest guys in this
business. He probably, for better or worse, invented the term "computer
science". And, believe it or not, he was first published, as a high
school student, in the 1950s in Mad Magazine: "The Potrzebie System of
Weights and Measures". Sadly, they never published *my* contribution
along a similar vein back then, a parody of Scientific American. :(.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.