Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"The medium is the massage." -- Crazy Nigel


devel / comp.unix.shell / Re: Command Languages Versus Programming Languages

SubjectAuthor
* Command Languages Versus Programming LanguagesLawrence D'Oliveiro
+- Re: Command Languages Versus Programming Languagescandycanearter07
+* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|+* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
||`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| +* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| |`* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| | `- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| |+* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| ||`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| || +- Re: Command Languages Versus Programming LanguagesKeith Thompson
|| || `- Re: Command Languages Versus Programming LanguagesScott Lurndal
|| |`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| | `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| +* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| |`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| | `- Re: Command Languages Versus Programming LanguagesKeith Thompson
|| `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|`* Re: Command Languages Versus Programming LanguagesStefan Ram
| `* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|  `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
+* Re: Command Languages Versus Programming LanguagesMuttley
|+- Re: Command Languages Versus Programming LanguagesJosef Möllers
|+* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
||`* Re: Command Languages Versus Programming LanguagesMuttley
|| `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||  `* Re: Command Languages Versus Programming LanguagesMuttley
||   `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||    `* Re: Command Languages Versus Programming LanguagesMuttley
||     +- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
||     +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||     |`- Re: Command Languages Versus Programming LanguagesMuttley
||     `- Re: Command Languages Versus Programming LanguagesScott Lurndal
|`* Re: Command Languages Versus Programming LanguagesJohn Ames
| +* Re: Command Languages Versus Programming LanguagesMuttley
| |+- Re: Command Languages Versus Programming LanguagesJohn Ames
| |+* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| ||`* Re: Command Languages Versus Programming LanguagesMuttley
| || +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |+* Re: Command Languages Versus Programming LanguagesDavid W. Hodgins
| || ||+* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |||`- Re: Command Languages Versus Programming LanguagesDavid W. Hodgins
| || ||`- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |`* Re: Command Languages Versus Programming LanguagesMuttley
| || | `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |  `* Re: Command Languages Versus Programming LanguagesMuttley
| || |   +* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |`* Re: Command Languages Versus Programming LanguagesMuttley
| || |   | +- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   | `* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |+* Re: Command Languages Versus Programming LanguagesKeith Thompson
| || |   |  ||`- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |+* Re: Command Languages Versus Programming LanguagesJames Kuyper
| || |   |  ||`- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |`* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  | +* Re: Command Languages Versus Programming LanguagesKenny McCormack
| || |   |  | |`* Re: Command Languages Versus Programming LanguagesScott Lurndal
| || |   |  | | +- Re: Command Languages Versus Programming LanguagesDmitry A. Kazakov
| || |   |  | | +* Too much? (Was: Command Languages Versus Programming Languages)Kenny McCormack
| || |   |  | | |+* Re: Too much? (Was: Command Languages Versus Programming Languages)Kaz Kylheku
| || |   |  | | ||`- Re: Too much? (Was: Command Languages Versus Programming Languages)Kenny McCormack
| || |   |  | | |`* Re: Too much? (Was: Command Languages Versus Programming Languages)David Brown
| || |   |  | | | +* Re: Too much? (Was: Command Languages Versus Programming Languages)James Kuyper
| || |   |  | | | |`- Football (Was: Too much? (Was: Command Languages Versus Programming Languages))Kenny McCormack
| || |   |  | | | `* Re: Too much? (Was: Command Languages Versus Programming Languages)Chris Elvidge
| || |   |  | | |  +- Re: Too much? (Was: Command Languages Versus Programming Languages)Muttley
| || |   |  | | |  +- Re: Too much? (Was: Command Languages Versus Programming Languages)David Brown
| || |   |  | | |  `- Re: Too much? (Was: Command Languages Versus Programming Languages)Mister Johnson
| || |   |  | | `- Re: Command Languages Versus Programming LanguagesJames Kuyper
| || |   |  | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |  `- Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  `* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   +* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   |+* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   ||`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   || `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||  +- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||  +- Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||  `* Re: Command Languages Versus Programming LanguagesKeith Thompson
| || |   |   ||   +* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |+- Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |`* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   ||   | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  +* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  |+* Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  ||`* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  || `- Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  |`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  | `* Re: Command Languages Versus Programming LanguagesAlan Bawden
| || |   |   ||   |  |  +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |`* Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||   |  |  | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |  +* Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||   |  |  |  |`* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |  |  |  | +* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |   |   ||   |  |  |  | |`- Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |  |  |  | `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||   |  |  |  |  `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |  |   `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||   |  |  |  `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   ||   |  |  +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   ||   |  |  +- Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  |  `* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  `* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |   |   ||   `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   |`- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || `- Re: Command Languages Versus Programming LanguagesAndreas Eder
| |+- Re: Command Languages Versus Programming LanguagesChristian Weisgerber
| |`* Re: Command Languages Versus Programming LanguagesDavid Brown
| `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
+* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
+* Re: Command Languages Versus Programming LanguagesDavid Brown
`* Re: Command Languages Versus Programming LanguagesDmitry A. Kazakov

Pages:12345678910111213
Re: Command Languages Versus Programming Languages

<20240401132531.00003710@gmail.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7814&group=comp.unix.shell#7814

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!nntp.comgw.net!newsfeed.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 1 Apr 2024 13:25:31 -0700
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <20240401132531.00003710@gmail.com>
References: <uu54la$3su5b$6@dont-email.me>
<87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com>
<h6EON.153422$TSTa.2209@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 01 Apr 2024 20:25:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6e54db6547ba0cd3cfb65d52cc115a0b";
logging-data="2808884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gdOjJWaBfLR1kuF9bJo7+Vu8dkERzKj4="
Cancel-Lock: sha1:ClWSywXDlO/w5wLAOHna5JDgYcE=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
 by: John Ames - Mon, 1 Apr 2024 20:25 UTC

On Mon, 01 Apr 2024 19:42:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:

> Why is it important that there be a distinction between "scripting"
> and "non-scripting" languages at all?

Oh, it's an interesting question from a general standpoint, and I think
you could make an argument that it'd be "useful" to someone trying to
determine what the right tool for a given job would be.* The problem
seems to be that *A.* we're arguing from several wildly different
definitions of "scripting language" - is it a matter of problem domain?
Implementation details? Both? Phase of the moon? - and nobody seems to
want to budge on their preferred line, and *B.* even with a given
definition, it's not exactly a firm line.

* (Funny story - when I was a young'un first dabbling with computer
programming, I got the impression that a lot of DOS games were written
in Batch, of all things, because that was how you invoked them, and
spent several confused days poring over the MS documentation trying to
figure out how they could've done it!)

Re: Command Languages Versus Programming Languages

<20240401134457.000067f2@gmail.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7815&group=comp.unix.shell#7815

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 1 Apr 2024 13:44:57 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <20240401134457.000067f2@gmail.com>
References: <uu54la$3su5b$6@dont-email.me>
<87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 01 Apr 2024 20:44:59 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6e54db6547ba0cd3cfb65d52cc115a0b";
logging-data="2808884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FaVTyt9nYzy6aHoLuR2T4j+gdnNZNDk8="
Cancel-Lock: sha1:GRkrcw/K7QywQKBFNZeVhNuOZ0U=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
 by: John Ames - Mon, 1 Apr 2024 20:44 UTC

On Mon, 1 Apr 2024 11:15:52 -0700
John Ames <commodorejohn@gmail.com> wrote:

> And while this is pretty true of scripting languages, it doesn't make
> for a good point-of-contrast with "non-scripting" languages; *piles*
> of them include support for automatic memory management, and some
> (outside of the C family) don't even include facilities for doing it
> "by hand."

And, in fact, C actually does one specific bit of automatic memory
management itself - the stack, which may or may not even *be* a true
hardware stack (depending on the architecture,) and which is handled in
an entirely transparent fashion* by compiler-generated entry/exit code
generated by the compiler for each function.

* (Until you go and pass a pointer to a local variable to some piece of
code that expects it to still be valid later, natch.)

Re: Command Languages Versus Programming Languages

<stack-20240401220727@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7816&group=comp.unix.shell#7816

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 1 Apr 2024 21:13:42 GMT
Organization: Stefan Ram
Lines: 25
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <stack-20240401220727@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <types-20240401151149@ram.dialup.fu-berlin.de> <20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de blSA4b7xpdY41MLQXyMIEQm4lZ1qAuiM2R2eN5wnajYOEC
Cancel-Lock: sha1:MREBjHXWXc0mxTaqpn6KMY08iZo= sha256:3/hsTDcoUKskm97Ms0YSZrUWrylDMRMjQOhKNvacFGs=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Mon, 1 Apr 2024 21:13 UTC

John Ames <commodorejohn@gmail.com> wrote or quoted:
>And, in fact, C actually does one specific bit of automatic memory
>management itself - the stack, which may or may not even *be* a true
>hardware stack (depending on the architecture,) and which is handled in
>an entirely transparent fashion* by compiler-generated entry/exit code
>generated by the compiler for each function.

This stack "management" is "limited" in C:

|Unfortunately, the notion of stack overflow is not mentioned
|by the standard or the standard’s rationale at all. This is
|very troublesome, as for most actual implementations stack
|overflow is a real problem.
....
|in a real C implementation, a call like f(10000000) will not
|return 10000000, but instead will crash with a message like
|"segmentation fault". Furthermore, stack overflow does not
|necessarily have to result in a crash with a nice error
|message, but might also overwrite non-stack parts of the
|memory (possibly putting the address of virus code there).
|Stack overflow even can occur without function calls. For
|example, the program int main(void) { int a[10000000]; }
....
"Subtleties of the ANSI/ISO C standard" (2012); Robbert
Krebbers, Freek Wiedijk; Radboud University Nijmegen.

Re: Command Languages Versus Programming Languages

<20240401143042.000056e0@gmail.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7817&group=comp.unix.shell#7817

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 1 Apr 2024 14:30:42 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20240401143042.000056e0@gmail.com>
References: <uu54la$3su5b$6@dont-email.me>
<87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com>
<20240401134457.000067f2@gmail.com>
<stack-20240401220727@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 01 Apr 2024 21:30:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6e54db6547ba0cd3cfb65d52cc115a0b";
logging-data="2859439"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XIGflyIJaxoLs36HijyEMel4rHF/B9xA="
Cancel-Lock: sha1:/OABO4+f9RnACz0lM1XD/ltMMdE=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
 by: John Ames - Mon, 1 Apr 2024 21:30 UTC

On 1 Apr 2024 21:13:42 GMT
ram@zedat.fu-berlin.de (Stefan Ram) wrote:

> This stack "management" is "limited" in C:

True enough, although as noted that's an implementation issue as much
as it is a limitation of the language spec. (I'm not sure how you could
handle that in a way that's both robust and reasonably C-ish...)

> |Stack overflow even can occur without function calls. For
> |example, the program int main(void) { int a[10000000]; }

But I did have to have a chuckle at this reminder of the days when "try
to allocate < 40 MB on the stack" meant "automatic segfault." A lotta
modern developers should've had to cut their teeth in an environment
like that...!

Re: Command Languages Versus Programming Languages

<uuf9n3$2nlg1$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7818&group=comp.unix.shell#7818

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 1 Apr 2024 21:41:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uuf9n3$2nlg1$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 01 Apr 2024 21:41:56 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="445f0d7a61ecd06b6b866cbc6ffe24ee";
logging-data="2872833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jZl8DkCyeeEzTsQX0lnpa"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:HJBGWVG71ucuNxFwWBMzn2rhP6c=
 by: Lawrence D'Oliv - Mon, 1 Apr 2024 21:41 UTC

On Mon, 1 Apr 2024 08:32:48 -0000 (UTC), Muttley wrote:

> Ugh. No wonder the language fell out of fashion. Looks like some kind of
> hacked up Basic.

The BASIC comparison is just ignorant, but a lot of the ugliness comes
from the traditional “parenthesis pileup” layout. I prefer to write my
LISP code in a different way.

One of the key things about LISP is homoiconicity. That is, the language
explicitly includes an AST representation made out of objects defined in
the language itself. This allows for a robust token-based macro facility,
for example. Contrast this with the fiddliness and fragility of #define in
C and C++, for example.

Re: Command Languages Versus Programming Languages

<uuf9pr$2nlg1$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7819&group=comp.unix.shell#7819

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 1 Apr 2024 21:43:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uuf9pr$2nlg1$2@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 01 Apr 2024 21:43:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="445f0d7a61ecd06b6b866cbc6ffe24ee";
logging-data="2872833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18THJO8PCIcvwFD7LLgnyuD"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:YI9iODoGMoD+uG6hXjqNGC/VWD0=
 by: Lawrence D'Oliv - Mon, 1 Apr 2024 21:43 UTC

On 1 Apr 2024 14:16:33 GMT, Stefan Ram wrote:

> Scripting languages handle the memory for you.

If I were to link compiled C code against a runtime that includes a
garbage collector, would that turn it into a “scripting” language?

Re: Command Languages Versus Programming Languages

<zJGON.210616$hN14.93559@fx17.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7820&group=comp.unix.shell#7820

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!nntp.comgw.net!peer03.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Command Languages Versus Programming Languages
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <types-20240401151149@ram.dialup.fu-berlin.de> <20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com> <stack-20240401220727@ram.dialup.fu-berlin.de> <20240401143042.000056e0@gmail.com>
Lines: 22
Message-ID: <zJGON.210616$hN14.93559@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 01 Apr 2024 22:40:31 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 01 Apr 2024 22:40:31 GMT
X-Received-Bytes: 1820
 by: Scott Lurndal - Mon, 1 Apr 2024 22:40 UTC

John Ames <commodorejohn@gmail.com> writes:
>On 1 Apr 2024 21:13:42 GMT
>ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>
>> This stack "management" is "limited" in C:
>
>True enough, although as noted that's an implementation issue as much
>as it is a limitation of the language spec. (I'm not sure how you could
>handle that in a way that's both robust and reasonably C-ish...)

Modern (64-bit) linux systems leave large buffer zones (unmapped addresses)
on either side of the stack; a stack overflow or underflow will
immediately fault if the RLIMIT_STACK value is exceeded.

>
>> |Stack overflow even can occur without function calls. For
>> |example, the program int main(void) { int a[10000000]; }

POSIX and linux systems support limiting the amount of address
space an individual users stack can consume. 8MB is the default
on many linux distributions.

Re: Command Languages Versus Programming Languages

<877chgr8tw.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7821&group=comp.unix.shell#7821

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 01 Apr 2024 15:56:11 -0700
Organization: None to speak of
Lines: 35
Message-ID: <877chgr8tw.fsf@nosuchdomain.example.com>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com>
<20240401134457.000067f2@gmail.com>
<stack-20240401220727@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 01 Apr 2024 22:56:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3a6d60d87380a0c0f1e42919673cda47";
logging-data="2906074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19a1L9o96O/tf1bGTFzcFuc"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:R6C/cow9/gWiNCjsAo3xx7I5nXg=
sha1:bbO9pQI0qjymiY0/abKeZJ4tsVw=
 by: Keith Thompson - Mon, 1 Apr 2024 22:56 UTC

ram@zedat.fu-berlin.de (Stefan Ram) writes:
> John Ames <commodorejohn@gmail.com> wrote or quoted:
>>And, in fact, C actually does one specific bit of automatic memory
>>management itself - the stack, which may or may not even *be* a true
>>hardware stack (depending on the architecture,) and which is handled in
>>an entirely transparent fashion* by compiler-generated entry/exit code
>>generated by the compiler for each function.
>
> This stack "management" is "limited" in C:
>
> |Unfortunately, the notion of stack overflow is not mentioned
> |by the standard or the standard’s rationale at all. This is
> |very troublesome, as for most actual implementations stack
> |overflow is a real problem.
> ...
> |in a real C implementation, a call like f(10000000) will not
> |return 10000000, but instead will crash with a message like
> |"segmentation fault". Furthermore, stack overflow does not
> |necessarily have to result in a crash with a nice error
> |message, but might also overwrite non-stack parts of the
> |memory (possibly putting the address of virus code there).
> |Stack overflow even can occur without function calls. For
> |example, the program int main(void) { int a[10000000]; }
> ...
> "Subtleties of the ANSI/ISO C standard" (2012); Robbert
> Krebbers, Freek Wiedijk; Radboud University Nijmegen.

Available online at :

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1637.pdf

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Command Languages Versus Programming Languages

<uufiv0$2pj73$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7822&group=comp.unix.shell#7822

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 00:19:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uufiv0$2pj73$2@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Apr 2024 00:19:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6bac8e0fd82579f167fcd77dc15169c7";
logging-data="2936035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19U5P9ydXlj3U1qPb2zuiCC"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:5x/yqEPS/Ga+B9ULXaK0jeNassU=
 by: Lawrence D'Oliv - Tue, 2 Apr 2024 00:19 UTC

On Mon, 1 Apr 2024 13:44:57 -0700, John Ames wrote:

> ... the stack, which may or may not even *be* a true
> hardware stack (depending on the architecture,) ...

This reinforces the point I made elsewhere about abstract machines being
layered on top of other abstract machines, such that the line between
“hardware” and “software” really becomes arbitrary.

What constitutes a “true” hardware stack? Does it have to be a reserved
area, like page 1 on the 6502 family? Does the use of a particular
register as a stack pointer have to be defined by the instruction set, or
just by the ABI, as in many RISC architectures?

Re: Command Languages Versus Programming Languages

<uufj0e$2pj73$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7823&group=comp.unix.shell#7823

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 00:20:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uufj0e$2pj73$3@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com> <h6EON.153422$TSTa.2209@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Apr 2024 00:20:31 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6bac8e0fd82579f167fcd77dc15169c7";
logging-data="2936035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nqsMrwj2n4wxu4A2MFKOX"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:jsl+Iz5hJSCXyZwluFz+aNXWFhY=
 by: Lawrence D'Oliv - Tue, 2 Apr 2024 00:20 UTC

On Mon, 01 Apr 2024 19:42:05 GMT, Scott Lurndal wrote:

> Why is it important that there be a distinction between "scripting" and
> "non-scripting" languages at all?

Particularly since the point of this thread is that there isn’t an
important one.

Re: Command Languages Versus Programming Languages

<87wmpg7gpg.fsf@tudado.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7824&group=comp.unix.shell#7824

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jfairchild@tudado.org (Johanne Fairchild)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 01 Apr 2024 21:26:19 -0300
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <87wmpg7gpg.fsf@tudado.org>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Tue, 02 Apr 2024 00:26:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71332c224b00ef3fe931ab03af09fb19";
logging-data="2943308"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MeG+engYlCQvt1TSayZfJtmJVy4L8ykk="
Cancel-Lock: sha1:g88kzyQENsVeb5XowkLxSQHFo40=
sha1:nRwVv/WCw262xp9M1Olrer10doU=
 by: Johanne Fairchild - Tue, 2 Apr 2024 00:26 UTC

Muttley@dastardlyhq.com writes:

[...]

> Readability of the flow of control matters. God knows whats going on with
> all those nested statements.

You don't seem to much of a Lisp writer. Lisp writers have no problem
reading that indentation.

Re: Command Languages Versus Programming Languages

<uufl5j$2q81c$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7825&group=comp.unix.shell#7825

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 00:57:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <uufl5j$2q81c$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Apr 2024 00:57:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6bac8e0fd82579f167fcd77dc15169c7";
logging-data="2957356"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dvx2sPP1NOx5LaYl83n/w"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:bZu5zpWddKTuoY6mQ4OhdE3y0kA=
 by: Lawrence D'Oliv - Tue, 2 Apr 2024 00:57 UTC

On Mon, 01 Apr 2024 21:26:19 -0300, Johanne Fairchild wrote:

> reading that indentation.

If indentation is good, more indentation should be better.

Re: Command Languages Versus Programming Languages

<87y19wpno7.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7826&group=comp.unix.shell#7826

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Mon, 01 Apr 2024 18:18:32 -0700
Organization: None to speak of
Lines: 13
Message-ID: <87y19wpno7.fsf@nosuchdomain.example.com>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <uufl5j$2q81c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Tue, 02 Apr 2024 01:18:34 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3a6d60d87380a0c0f1e42919673cda47";
logging-data="2966434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19N/FqV6GPazGwWg8l/S5w5"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:Q/x3jjOGLerW5mwGECF3iZ5wpWs=
sha1:QsAqLxEbVR4dQGRuc3VqjhPvhh0=
 by: Keith Thompson - Tue, 2 Apr 2024 01:18 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Mon, 01 Apr 2024 21:26:19 -0300, Johanne Fairchild wrote:
>
>> reading that indentation.
>
> If indentation is good, more indentation should be better.

No.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Command Languages Versus Programming Languages

<uufsem$2vft2$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7827&group=comp.unix.shell#7827

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 03:01:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uufsem$2vft2$2@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <uufl5j$2q81c$1@dont-email.me>
<87y19wpno7.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Apr 2024 03:01:42 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6bac8e0fd82579f167fcd77dc15169c7";
logging-data="3129250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7/vV+z3i41VC1cDZvz2aX"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:bUJ/sX+00D9TLuj9juEDWC9vGzs=
 by: Lawrence D'Oliv - Tue, 2 Apr 2024 03:01 UTC

On Mon, 01 Apr 2024 18:18:32 -0700, Keith Thompson wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>> On Mon, 01 Apr 2024 21:26:19 -0300, Johanne Fairchild wrote:
>>
>>> reading that indentation.
>>
>> If indentation is good, more indentation should be better.
>
> No.

Don’t quote so deeply, then.

Re: Command Languages Versus Programming Languages

<LISP-20240402085115@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7828&group=comp.unix.shell#7828

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 2 Apr 2024 07:56:48 GMT
Organization: Stefan Ram
Lines: 34
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <LISP-20240402085115@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de N035obyTNqaz8jG28znLZgcLpG1N89VnnhlhWcBCQWCLPG
Cancel-Lock: sha1:Cu5ydTu5rByhVRqBZ6NQkiSJXK4= sha256:seYLjWEFrVhb02zvtpTroEE5Sit0pItZ4iw9PNz7Ozk=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Tue, 2 Apr 2024 07:56 UTC

Johanne Fairchild <jfairchild@tudado.org> wrote or quoted:
>You don't seem to much of a Lisp writer. Lisp writers have no problem
>reading that indentation.

Well, there is the expression "write-only code", which shows
that a good Lisp writer may not necessarily be a good reader.

This is an example of LISP code:

( SETQ DIFF
( LAMBDA( X )
( COND
( ( ATOMP X )
( COND
( ( = X 'X )
1 )
( T
0 )))
( T
( COND
( ( =( CAR X )'SUM )
( LIST 'SUM( DIFF( CADR X ))( DIFF( CADDR X )))))))))

. For someone who has not learned LISP, this is difficult to read,
/not/ because of the indentation, but because the words used have no
meaning for him. Without the indentation it would be harder to read.

It defines ("SETQ") the name "DIFF" to be a function ("LAMBDA")
of one argument ("X"). When called, the functions tests
("COND") whether X is an atom ("ATOMP X"). In this case,
if X is the letter "X" the result is one, otherwise it's zero.
If X is not a atom, but a sum, we will return the sum of the
DIFFs of the augend and the added. This calls the same function
as the one defined. Yes! In LISP a function may call itself!

Re: Command Languages Versus Programming Languages

<LISP-20240402091729@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7829&group=comp.unix.shell#7829

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 2 Apr 2024 08:18:48 GMT
Organization: Stefan Ram
Lines: 44
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <LISP-20240402091729@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de NnyKtcFmzMPAmO+9KYLgEge8Db2c0QlDpOw6OYgzamFlyA
Cancel-Lock: sha1:1yQZpBDHTLAPG6f7E+bReusZkVE= sha256:nOZUEGsmBlrY6vN5DMrm5U12rWcFdcpTW/uDUQOvUdY=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Tue, 2 Apr 2024 08:18 UTC

ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
>( SETQ DIFF
> ( LAMBDA( X )
> ( COND
> ( ( ATOMP X )
> ( COND
> ( ( = X 'X )
> 1 )
> ( T
> 0 )))
> ( T
> ( COND
> ( ( =( CAR X )'SUM )
> ( LIST 'SUM( DIFF( CADR X ))( DIFF( CADDR X )))))))))

In Python:

def diff( x ):
return 1 if x == 'x' else 0 if type( x )is str
else[ 'sum', diff( x[ 1 ]), diff( x[ 2 ])]
if x[ 0 ]== 'sum' else None

. An attempt at indentation:

def diff( x ):
return \
1 if x == 'x' else 0 \
if type( x )is str else \
[ 'sum', diff( x[ 1 ]), diff( x[ 2 ])] \
if x[ 0 ]== 'sum' else None

. In a multiple-returns style:

def diff( x ):
if type( x )is str:
if x == 'x':
return 1
else:
return 0
else:
if x[ 0 ]== 'sum':
return [ 'sum', diff( x[ 1 ]), diff( x[ 2 ])]

.

Re: Command Languages Versus Programming Languages

<wrap-20240402092558@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7830&group=comp.unix.shell#7830

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.neodome.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 2 Apr 2024 08:26:14 GMT
Organization: Stefan Ram
Lines: 9
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <wrap-20240402092558@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de> <LISP-20240402091729@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de R0/LloTPy3Fs3AwSZcspRwAc7TpGudxxGkVaNx4fz+Yg6d
Cancel-Lock: sha1:7rlvWH+WrAOoftWBtvgLjdlExvM= sha256:KeXDgI/Il6fH4ogVXhE4UDtYVmH8Zxi6KITv6qWz92k=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Tue, 2 Apr 2024 08:26 UTC

ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
>def diff( x ):
> return 1 if x == 'x' else 0 if type( x )is str
> else[ 'sum', diff( x[ 1 ]), diff( x[ 2 ])]
> if x[ 0 ]== 'sum' else None

Oops! That was one long line starting with "return";
it was wrapped by the newsreader, but is not correct
Python anymore when wrapped this way.

Re: Command Languages Versus Programming Languages

<uugi79$344nk$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7831&group=comp.unix.shell#7831

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 05:13:13 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uugi79$344nk$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com> <h6EON.153422$TSTa.2209@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Apr 2024 09:13:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2c1625dce58de95fd27167534ab6226b";
logging-data="3281652"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ab4NhNaoKNNkVQExn33QSsR+1D2VI1lM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VFMmOVxWUEs7u2OSjX8JIlvlFDw=
In-Reply-To: <h6EON.153422$TSTa.2209@fx47.iad>
Content-Language: en-US
 by: James Kuyper - Tue, 2 Apr 2024 09:13 UTC

On 4/1/24 15:42, Scott Lurndal wrote:
....
> Why is it important that there be a distinction between "scripting"
> and "non-scripting" languages at all?

I don't know, which is why this discussion bores me. But when people
aren't in agreement about the definition of a term, it's often useful to
consider what you might want to say using the term - not what you want
to say about the definition, but what you want to say that can be
non-trivially derived from the definition. Then you should carefully
choose a definition for the term so that makes what you want to say
about it both true, and even more important, useful.

Re: Command Languages Versus Programming Languages

<uugj3f$34d7b$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7832&group=comp.unix.shell#7832

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 05:28:15 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uugj3f$34d7b$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <uufl5j$2q81c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Apr 2024 09:28:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2c1625dce58de95fd27167534ab6226b";
logging-data="3290347"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6qW2v9uPDX0C6TghuugS5dtuG5QH+2EM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6GpilgJuO8AYoKgrB6/oYTWnMzo=
In-Reply-To: <uufl5j$2q81c$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Tue, 2 Apr 2024 09:28 UTC

On 4/1/24 20:57, Lawrence D'Oliveiro wrote:
> On Mon, 01 Apr 2024 21:26:19 -0300, Johanne Fairchild wrote:
>
>> reading that indentation.
>
> If indentation is good, more indentation should be better.

By that same logic, if water is good, more water should be better. Tell
that to someone who is drowning.
For that matter, tell it to my mother who had a dangerous drug
interaction involving a diuretic, while (unknown to her doctor) she was
following a recommendation that she drink 8 glasses of water a day "for
her health". Look up hyponatremia.

Re: Command Languages Versus Programming Languages

<uuh8a1$39ilt$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7833&group=comp.unix.shell#7833

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 15:30:09 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 19
Message-ID: <uuh8a1$39ilt$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com>
<stack-20240401220727@ram.dialup.fu-berlin.de>
<20240401143042.000056e0@gmail.com> <zJGON.210616$hN14.93559@fx17.iad>
Injection-Date: Tue, 02 Apr 2024 15:30:10 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1b7679fc2773f20ec5b2192d045298ef";
logging-data="3459773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18O0B00HtdWfNUAj4DJ9Lr/Yp52IFQfccB7oUIvTR7khA=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:2hueGqctGAdxBkluH5aCbXlpO0Q=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Tue, 2 Apr 2024 15:30 UTC

Scott Lurndal <scott@slp53.sl.home> wrote at 22:40 this Monday (GMT):
> John Ames <commodorejohn@gmail.com> writes:
>>On 1 Apr 2024 21:13:42 GMT
>>ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>>
>>> This stack "management" is "limited" in C:
>>
>>True enough, although as noted that's an implementation issue as much
>>as it is a limitation of the language spec. (I'm not sure how you could
>>handle that in a way that's both robust and reasonably C-ish...)
>
> Modern (64-bit) linux systems leave large buffer zones (unmapped addresses)
> on either side of the stack; a stack overflow or underflow will
> immediately fault if the RLIMIT_STACK value is exceeded.

It still protects writing to memory outside that buffer, right?
[snip]
--
user <candycane> is generated from /dev/urandom

Re: Command Languages Versus Programming Languages

<20240402084304.00001875@gmail.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7834&group=comp.unix.shell#7834

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 08:43:04 -0700
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20240402084304.00001875@gmail.com>
References: <uu54la$3su5b$6@dont-email.me>
<87edbtz43p.fsf@tudado.org>
<types-20240401151149@ram.dialup.fu-berlin.de>
<20240401111552.00006ddc@gmail.com>
<20240401134457.000067f2@gmail.com>
<stack-20240401220727@ram.dialup.fu-berlin.de>
<20240401143042.000056e0@gmail.com>
<zJGON.210616$hN14.93559@fx17.iad>
<uuh8a1$39ilt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Apr 2024 15:43:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="744ddc53edd42a735bf7b4a3be5f2aaf";
logging-data="3432669"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iwWL0ohyrztet0VYzbM09ZWVqxWiTQxM="
Cancel-Lock: sha1:chHUCBgDmEICehyq4xCIQeFl7O8=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
 by: John Ames - Tue, 2 Apr 2024 15:43 UTC

On Tue, 2 Apr 2024 15:30:09 -0000 (UTC)
candycanearter07 <candycanearter07@candycanearter07.nomail.afraid>
wrote:

> It still protects writing to memory outside that buffer, right?
> [snip]

"Protecting memory" doesn't mean "no page fault," though, just that it
won't scribble all over some other process's memory. But I am curious
how universally various freenix distributions these days just let the
application segfault vs. using that as a cue to allocate additional
stack space; a quick test with WSL (Debian somethingorother) runs that
test without complaint, but I don't have a genuine *nix box to hand to
try it with.

Re: Command Languages Versus Programming Languages

<65WON.122189$zqTf.16530@fx35.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7835&group=comp.unix.shell#7835

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!usenet.network!news.neodome.net!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx35.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Command Languages Versus Programming Languages
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <types-20240401151149@ram.dialup.fu-berlin.de> <20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com> <stack-20240401220727@ram.dialup.fu-berlin.de> <20240401143042.000056e0@gmail.com> <zJGON.210616$hN14.93559@fx17.iad> <uuh8a1$39ilt$1@dont-email.me> <20240402084304.00001875@gmail.com>
Lines: 24
Message-ID: <65WON.122189$zqTf.16530@fx35.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 02 Apr 2024 16:09:38 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 02 Apr 2024 16:09:38 GMT
X-Received-Bytes: 2023
 by: Scott Lurndal - Tue, 2 Apr 2024 16:09 UTC

John Ames <commodorejohn@gmail.com> writes:
>On Tue, 2 Apr 2024 15:30:09 -0000 (UTC)
>candycanearter07 <candycanearter07@candycanearter07.nomail.afraid>
>wrote:
>
>> It still protects writing to memory outside that buffer, right?
>> [snip]
>
>"Protecting memory" doesn't mean "no page fault," though, just that it
>won't scribble all over some other process's memory.

The regions each side of the stack are marked not-present. This supports
automatic stack expansion, within the resource limit for the stack on
one side, and will produce a SIGSEGV or SIGBUS on the other end.

> But I am curious
>how universally various freenix distributions these days just let the
>application segfault vs. using that as a cue to allocate additional
>stack space; a quick test with WSL (Debian somethingorother) runs that
>test without complaint, but I don't have a genuine *nix box to hand to
>try it with.

All linux will allocate space, up to the stack resource limit.

Re: Command Languages Versus Programming Languages

<20240402084057.881@kylheku.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7836&group=comp.unix.shell#7836

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.nntp4.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 16:18:24 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <20240402084057.881@kylheku.com>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
Injection-Date: Tue, 02 Apr 2024 16:18:24 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d32078294708f72fe3a949b9ce8e6715";
logging-data="3482803"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hETHh4rHc1tlKaUoBWeo5QgXszRZPCb4="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:F/KJfk3X+YZhTsipJsATXZZnoVA=
 by: Kaz Kylheku - Tue, 2 Apr 2024 16:18 UTC

On 2024-04-02, Stefan Ram <ram@zedat.fu-berlin.de> wrote:
> Johanne Fairchild <jfairchild@tudado.org> wrote or quoted:
>>You don't seem to much of a Lisp writer. Lisp writers have no problem
>>reading that indentation.
>
> Well, there is the expression "write-only code", which shows
> that a good Lisp writer may not necessarily be a good reader.
>
> This is an example of LISP code:
>
> ( SETQ DIFF
> ( LAMBDA( X )
> ( COND
> ( ( ATOMP X )
> ( COND
> ( ( = X 'X )
> 1 )
> ( T
> 0 )))
> ( T
> ( COND
> ( ( =( CAR X )'SUM )
> ( LIST 'SUM( DIFF( CADR X ))( DIFF( CADDR X )))))))))
>
> . For someone who has not learned LISP, this is difficult to read,
> /not/ because of the indentation, but because the words used have no
> meaning for him. Without the indentation it would be harder to read.

I know all the words. It's still hard to read because of the weird
spaces.

This is the way of writing the code that the vast majority of the Lisp
word since gravitated toward:

(SETQ DIFF
(LAMBDA (X)
(COND
((ATOMP X)
(COND
((= X 'X) 1) ;; unnecessary line breaks shored up here
(T 0)))
(T
(COND
((= (CAR X) 'SUM)
(LIST 'SUM (DIFF (CADR X)) (DIFF (CADDR X)))))))))

The code is from just before MacCarthy invented the ternary IF, as a
shorthand for a one clause cond:

(SETQ DIFF
(LAMBDA (X)
(IF (ATOM X)
(IF (= X 'X) 1 0)
(IF (= (CAR X) 'SUM)
(LIST 'SUM (DIFF (CADR X)) (DIFF (CADDR X)))))))

Also, modern cond clauses are not strictly pairs,
which allows the T to be omitted:

(cond (this that) (else)) ;; rather than (t else)

when a cond clause consists of a single expression, then if that
expression is true, cond stops and yields that expression's value.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Command Languages Versus Programming Languages

<20240402092331.115@kylheku.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7837&group=comp.unix.shell#7837

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 2 Apr 2024 16:33:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <20240402092331.115@kylheku.com>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
Injection-Date: Tue, 02 Apr 2024 16:33:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d32078294708f72fe3a949b9ce8e6715";
logging-data="3490530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18l6+cUwgHAUwnnuETmbDpyG4GGX/303K4="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:9366ZoCXCrW7Lw2bTQFhcWuP1IM=
 by: Kaz Kylheku - Tue, 2 Apr 2024 16:33 UTC

On 2024-04-02, Stefan Ram <ram@zedat.fu-berlin.de> wrote:
> ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
>>( SETQ DIFF
>> ( LAMBDA( X )
>> ( COND
>> ( ( ATOMP X )
>> ( COND
>> ( ( = X 'X )
>> 1 )
>> ( T
>> 0 )))
>> ( T
>> ( COND
>> ( ( =( CAR X )'SUM )
>> ( LIST 'SUM( DIFF( CADR X ))( DIFF( CADDR X )))))))))
>
> In Python:
>
> def diff( x ):
> return 1 if x == 'x' else 0 if type( x )is str
> else[ 'sum', diff( x[ 1 ]), diff( x[ 2 ])]
> if x[ 0 ]== 'sum' else None

n TXR Lisp:

(defun-match dif
((sum @left @right) ^(sum ,(dif left) ,(dif right)))
((@op . @args) (error "~s: unrecognized operator: ~s" 'dif op))
(x 1)
(@else 0))

diff is a built in, which we don't want to be redefining without
an exceptionally good reason, so I changed to dif.

If we compile 'dif we get unused variable warnings:

2> (compile 'dif)
** expr-1:1: warning: let*: variable args unused
** expr-1:1: warning: let*: variable else unused
#<vm fun: 0 param + 3 optional + variadic>

To suppress that, we use @nil instead of @args or @else; @nil is a
placeholder pattern that matches any object without binding a variable.

Otherwise we need more verbiage:

((@op . @args) (ignore args) (error ....))
...
(@else (ignore else) 0)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Command Languages Versus Programming Languages

<87plv762zt.fsf@tudado.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7838&group=comp.unix.shell#7838

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jfairchild@tudado.org (Johanne Fairchild)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Tue, 02 Apr 2024 15:20:06 -0300
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <87plv762zt.fsf@tudado.org>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <uufl5j$2q81c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Tue, 02 Apr 2024 18:20:10 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8c3cff226c62324048dcefc796e4ba2d";
logging-data="3539362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19406aMm/ac9c6tUoI+egE6Q5ofi9rl4p4="
Cancel-Lock: sha1:Rb82Z/1QEAPkkgqDFXJZjkADJSg=
sha1:oFG2gr4uzxxz0MpVsrx4obSKS3g=
 by: Johanne Fairchild - Tue, 2 Apr 2024 18:20 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Mon, 01 Apr 2024 21:26:19 -0300, Johanne Fairchild wrote:
>
>> reading that indentation.
>
> If indentation is good, more indentation should be better.

Too much of a good thing is a bad thing.


devel / comp.unix.shell / Re: Command Languages Versus Programming Languages

Pages:12345678910111213
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor