help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quote by Knuth


From: Emanuel Berg
Subject: Re: Quote by Knuth
Date: Wed, 21 Jul 2021 06:28:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tomas wrote:

>>> Literate programming is an enhanced macro substitution
>>> package tuned to the task of rearranging source code.
>> 
>> We know what a macro is but what is literate programming
>> except it relies on macros? Does it rely on macros MORE
>> than everyday programming, including programming that uses
>> macros, or are the macros CLOSER to natural
>> languages, maybe?
>
> This discussion is so full of category errors that it's
> difficult to say anything relevant anymore. Let me pick two
> senses for the term "literate programming":

Isn't it better you tell us when that happens (with cite) than
first say you can't say anything because of them and then 4
paragraphs of "not saying anything"...

> "Literate programming" is a pretty generic term. The most
> you can say about it is that it tries to combine "writing
> for humans" ("literature") and "writing for machines"
> ("programming")

It is a poetic idea, but in practice how could one ever
do that?

Because then the machine must be taught to understand human
language which it cannot almost by definition, except perhaps
for very simple to-the-point applications like selling tickets
to the cinema or whatever, and what's more, wouldn't that even
be (in the case of programming) even completely _undesirable_
because in programming we _want_ everything to be defined,
unambiguous, deterministic, stripped of emotion and stress,
and so on?

If you work as a carpenter or construction worker, you have
tools - like the hammer, saw, drilldriver, etc - but there is
another tool as well - and that's the human language.
For a law practitioner, maybe the language is the only tool,
even? So the language is a tool alright, it isn't about
feeling lonely, making silly "trip humor" jokes or puns
or anything like that...

But just because the human language is a tool, and maybe the
best tool we have, except for the hand or brain I guess, just
because it is a tool doesn't mean it is close to the tool that
is a programming language - isn't it the opposite,
if anything?

How would one even approach that? To combine them? Tell me,
what's the first step Knuth took merge them, if that's
what happened, actually?

Maybe Knuth lived in an era when they believed Asimovean
"robot law" AI was just around the corner?

> Talking about macros in this context would be a category
> error [0] like saying "Colorless green ideas sleep
> furiously".

?

> "Literate programming" as coined by Knuth (no, Mr. Dimech, you
> probably won't be interested -- for me, you can't overstate Knuth
> too much) is /technically/ based on WEB, which is a text substitution
> system, so can be regarded as a macro [1] system. If you look closely,
> TeX [2] and METAFONT [3] are "text substitution systems" a.k.a.
> macro [4] expanders.

"Literate programming" is based on WEB, a text substitution
system or macro system. TeX and METAFONT are text substitution
systems or macro expanders.

... hahah :)

> It was the rage among some computer scientists of that time
> (1980s), and Donald Knuth seems to have been interested in
> them back then.

rage ??? anger? What do you mean?

> So yes, in the second, strict, sense macros do play a role.
> By the way, and to try to put things on-topic (hope? HAH!),
> noweb is also a text expansion machinery, inspired... yes,
> on Knuth's WEB. Go figure.

I knew it! The text expansion machinery noweb is inspired
by WEB! Hahaha :)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]