Re : CWEB

Well, thank you guys. As always, making one’s own opinion remains the best issue :wink:
And as always, I find interesting arguments in both of your emails.

The thing is, in the industrial world, they mainly focus on productivity. They only begin
to understand that writing programs is difficult, nearly an art to itself.
At first sight, I found CWEB to be an apparent gain in both productivity and clarity.
Productivity because you write both the doc and the source at the same time.
I know Doxygen-like programs allow this too, but to my mind, the main difference is,
in classical source code the documentation is limited to the source code layout whereas
in litterate programming (I’m not refering to CWEB in particular), it is the source code
which is constraint to the documentation layout.

Moreover, the source code seems far more easy to understand for a new developer
integrating the project.

However, talking about CWEB in particular, although the idea is worth paying attention
to, maybe TeX/LaTeX is not the better way to make it popular ; and I’m not reconsidering
TeX/LaTeX 's power and popularity.

To finish, I agree that although Knuth has brought a lot to computer science, it doesn’t
mean that all his ideas are good ideas.

Some of you know another application of the Litterate Programming paradigm other
than Knuth’s CWEB ?

Again, thank you.

Julien.

----- Message d’origine ----De : Jeff <j_post at pacbell.net>
? : A list for developers using the SDL library. (includes SDL-announce)
Envoy? le : Vendredi, 25 Juillet 2008, 7h48mn 25s
Objet : Re: [SDL] CWEB

On Thu July 24 2008 20:48, KHMan wrote:

Getting a bit OT,

Agreed.

Knuth has been drumming this for decades and there is practically
zero uptake in the real world market. IMHO Knuth doesn’t think
like the rest of us – he’s a mathematician.

And this is a bad thing? Computer science is applied mathematics.

Gives examples of algorithms in MIX/MMIX

Yeah, MMIX is a bit dated, but the idea is to keep it simple.

while practically every other educator uses
a programming language or clear pseudo-code.

From a practical point of view, I agree that a standard programming language
or pseudo code is more useful. But Knuth is trying to convey basic ideas, not
make it easy for programmers to cut and paste without understanding what
they’re doing.

I can’t help but think the cweb/web thing is meant to turn source
code into a big ‘elegant’ math equation.

Source code is a big math equation, elegant or otherwise. Doubt it? Give me
your compiled source and I’ll return to you a (really huge) NUMBER that
defines your application.

Real cool stuff for
"up in the clouds" kind of academia.

Academia is not “up in the clouds”. It’s down to Earth basics. It’s from those
basics that we working programmers build “up in the clouds” applications.

This is the only serious disagreement I have with your comments.

Jeff


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  _____________________________________________________________________________ 

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

[sorry OT]
julien CLEMENT wrote:

[snip snip]
Some of you know another application of the Litterate Programming
paradigm other than Knuth’s CWEB ?

This looks comprehensive:
http://www.literateprogramming.com/tools.html

While plowing through Knuth’s TeX/MF archive, I took a close look
at Leo’s documentation before:
http://webpages.charter.net/edreamleo/front.html

But I never did try it. I’d like to think that LP is evolving. No
clear winners or de facto standards yet.–
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Well, I see that Python has a really good help system, that’s true.
However, there is a particularity in Litterate Programing that only
dedicated tools can handle, which is the possibility to define
blocks of code in an order that is different from the program order.

Example (pseudo code):

"
This is the main function:
int main (int argc, char ** argv)
{
< init SDL >
< load game resources >

< release resources >
< quit SDL >
}

"
and then define:

" =
SDL_Init(SDL_INIT_VIDEO);
(etc.)
"

Of course, you can do the same by splitting the program into
small functions, but it is due to my example.

Regards
Julien

----- Message d’origine ----De : Ren? Dudfield
? : A list for developers using the SDL library. (includes SDL-announce)
Envoy? le : Lundi, 28 Juillet 2008, 2h49mn 16s
Objet : Re: [SDL] CWEB

hi,

I see python as literate programming.

eg, see doctest:
http://docs.python.org/lib/module-doctest.html

You write docs before the code. So then you have automated tests, and
examples too.

Also you can access the documentation for each object with the
.doc attribute, or the help() function in a running program or
from the interpreter.

Python is fairly close to pseudo code, and often looks nicer than pseudo code :slight_smile:

cu,

On Fri, Jul 25, 2008 at 3:58 AM, julien CLEMENT <@Julien_Clement1> wrote:

Some of you have tried CWEB ?
http://www-cs-faculty.stanford.edu/~knuth/cweb.html
It is another way to write a source code.
I wanted to get some feedback from people who would
have possibly tried it…

Thank you !
Julien


Envoy? avec Yahoo! Mail.
Une boite mail plus intelligente.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  _____________________________________________________________________________ 

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr