🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
384 messages
384 total messages Page 5 of 8 Started by Lawrence D’Oliveiro Sat, 17 Oct 2026 20:47
Page 5 of 8 • 384 total messages
Re: Back To CS Basics. Fuck AI
#221
Author: Janis Papanagnou
Date: Sat, 17 Oct 2026 21:29
42 lines
2995 bytes
On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
> On 17 Oct 2026 08:40:24 GMT, Stéphane CARPENTIER wrote:
> 
>> Now, there are almost no more interpreted scripts.
> 
> Shell scripts are still interpreted. Not only that, but the shell
> actually seeks through the source file to do a transfer of control.
> 
> How do I know this? Try making changes to the script while it is
> running. ;)

I've just done this ("a script change while it's running") [*]
(with ksh and bash) and there was no change in behavior of the
running script.

You may want to provide an example what you've actually done
to come to that conclusion (or reformulate your conclusion).

BTW; I've in other (more complex?) contexts observed that some
intrusions (tackling the shell program while it runs) do affect
the running script, but back then I haven't examined the reason
or circumstances of that effect, or whether it's some effect of
an interaction with the OS. - So the principle question, what
exactly happens in what circumstances, is still interesting.

Janis

[*] What I've done was to run the following script "dynchg.sh"

   while read ; do
       echo $REPLY
   done

and change it (from another terminal) while it runs by

   sed -i '2p' dynchg.sh

I could even remove that file from the directory and it still
processes data as expected. And there's also no difference if
that program is explicitly run with the interpreter or running
it using a shebang interpreter as executable script.
Re: Back To CS Basics. Fuck AI
#223
Author: Anton Antimo
Date: Mon, 19 Oct 2026 20:18
48 lines
3424 bytes
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
>> On 17 Oct 2026 08:40:24 GMT, Stéphane CARPENTIER wrote:
>> 
>>> Now, there are almost no more interpreted scripts.
>>
>> Shell scripts are still interpreted. Not only that, but the shell
>> actually seeks through the source file to do a transfer of control.
>> How do I know this? Try making changes to the script while it is
>> running. ;)
>
> I've just done this ("a script change while it's running") [*]
> (with ksh and bash) and there was no change in behavior of the
> running script.
>
> You may want to provide an example what you've actually done
> to come to that conclusion (or reformulate your conclusion).
>
> BTW; I've in other (more complex?) contexts observed that some
> intrusions (tackling the shell program while it runs) do affect
> the running script, but back then I haven't examined the reason
> or circumstances of that effect, or whether it's some effect of
> an interaction with the OS. - So the principle question, what
> exactly happens in what circumstances, is still interesting.
>
> Janis
>
> [*] What I've done was to run the following script "dynchg.sh"
>
>   while read ; do
>       echo $REPLY
>   done
>
> and change it (from another terminal) while it runs by
>
>   sed -i '2p' dynchg.sh
>
> I could even remove that file from the directory and it still
> processes data as expected. And there's also no difference if
> that program is explicitly run with the interpreter or running
> it using a shebang interpreter as executable script.

If your remove the script while it's still running, chances are the
interpreter still has it open, so the data is not removed until the file
is closed---that is, you don't more free space until every reader and
writer have closed the file.  That's the typical UNIX semantics of open
files.  (If I understood the problem here correctly.)
Re: Back To CS Basics. Fuck AI
#224
Author: Carlos E.R.
Date: Tue, 20 Oct 2026 08:54
59 lines
3606 bytes
On 2026-10-19 22:18, Anton Antimo wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> 
>> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
>>> On 17 Oct 2026 08:40:24 GMT, Stéphane CARPENTIER wrote:
>>>
>>>> Now, there are almost no more interpreted scripts.
>>>
>>> Shell scripts are still interpreted. Not only that, but the shell
>>> actually seeks through the source file to do a transfer of control.
>>> How do I know this? Try making changes to the script while it is
>>> running. ;)
>>
>> I've just done this ("a script change while it's running") [*]
>> (with ksh and bash) and there was no change in behavior of the
>> running script.
>>
>> You may want to provide an example what you've actually done
>> to come to that conclusion (or reformulate your conclusion).
>>
>> BTW; I've in other (more complex?) contexts observed that some
>> intrusions (tackling the shell program while it runs) do affect
>> the running script, but back then I haven't examined the reason
>> or circumstances of that effect, or whether it's some effect of
>> an interaction with the OS. - So the principle question, what
>> exactly happens in what circumstances, is still interesting.
>>
>> Janis
>>
>> [*] What I've done was to run the following script "dynchg.sh"
>>
>>    while read ; do
>>        echo $REPLY
>>    done
>>
>> and change it (from another terminal) while it runs by
>>
>>    sed -i '2p' dynchg.sh
>>
>> I could even remove that file from the directory and it still
>> processes data as expected. And there's also no difference if
>> that program is explicitly run with the interpreter or running
>> it using a shebang interpreter as executable script.
> 
> If your remove the script while it's still running, chances are the
> interpreter still has it open, so the data is not removed until the file
> is closed---that is, you don't more free space until every reader and
> writer have closed the file.  That's the typical UNIX semantics of open
> files.  (If I understood the problem here correctly.)

I have learned not to edit a script while it was running, weird things 
happened when I did. My theory was that bash kept an index pointing to 
the current line. Dunno if as byte or as line.



-- 
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
Re: Back To CS Basics. Fuck AI
#225
Author: Kaz Kylheku
Date: Tue, 20 Oct 2026 17:38
37 lines
3357 bytes
On 2026-10-20, Carlos E.R. <robin_listas@es.invalid> wrote:
> I have learned not to edit a script while it was running, weird things 
> happened when I did. My theory was that bash kept an index pointing to 
> the current line. Dunno if as byte or as line.

IIRC, here is how it works: bash reads the script via a buffered stream
as it executes, thus some multi-kilobyte blocks of the script text. If
you overwrite the script while it is running, it will not affect the
script text that is already waiting in the buffer, but when bash
reads to the end of the buffer, after that it will read the altered
script. Therefore it is somewhat "unpredictable" where the discontinuity
will occur: you have to know the buffer sizes and relate them to the
script text.

Earlier parts of the script are not re-read.  Bash does not re-read code
to iterate over a loop; the whole top-level command is parsed into an
internal representation that is executed.  If a script modifies its own
source file, everything before and including that modifying command is
"safe".

There may be some subtleties with here docs.  Suppose have
a command ending in <<WORD followed by a large amount of here-doc
data terminated by WORD. I don't know whether Bash reads all of it,
or under what conditions. Probably when Bash runs on a system where
here docs have to be done using temprary files, it does have to read
all the data, put it into the temporary file and then launch the command
with the <<WORD syntax replaced by the name of the temporary file.

But on a system where the program can be given a /dev/fd/<n> syntax or
whatever to refer to a file descriptor, bash can pipe the data to it.
Maybe it is possible for the script to be modified after that command is
launchedm such that the command receives  different here doc data.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Re: Back To CS Basics. Fuck AI
#226
Author: Helmut Waitzmann
Date: Tue, 20 Oct 2026 22:54
43 lines
3182 bytes
 Janis Papanagnou <janis_papanagnou+ng@hotmail.com>:
> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
> I've just done this ("a script change while it's running") [*]
>
> [*] What I've done was to run the following script "dynchg.sh"
>
>    while read ; do
>        echo $REPLY
>    done
>
> and change it (from another terminal) while it runs by
>
>    sed -i '2p' dynchg.sh
>

 As the "-i" option is not defined by the POSIX standard but by GNU 
 sed, I assume that your example uses GNU sed. 


 GNU sed's "-i" option does not edit the file in place.  Rather it 
 sends its output to a new file (instead of to standard output), 
 then removes (or renames) the name of the original file.  
 Finally, the name of the new file is renamed to be the no more 
 existing name of the original file. 


 => GNU sed doesn't modify the original shell script, which has 
 been opened by the shell. 


 Therefore the shell won't see anything of the new file but rather 
 stick to the already opened original file (even, if that original 
 file hasn't got any file name). 


> I could even remove that file from the directory and it still 
> processes data as expected. 
>

 Yes.  As long as the shell doesn't close the file descriptor 
 accessing the original file, it will continue to access the 
 original unmodified file. 
Re: Back To CS Basics. Fuck AI
#227
Author: Janis Papanagnou
Date: Fri, 23 Oct 2026 16:50
35 lines
2512 bytes
On 2026-10-21 00:54, Helmut Waitzmann wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com>:
>> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
>> I've just done this ("a script change while it's running") [*]
>>
>> [*] What I've done was to run the following script "dynchg.sh"
>>
>>    while read ; do
>>        echo $REPLY
>>    done
>>
>> and change it (from another terminal) while it runs by
>>
>>    sed -i '2p' dynchg.sh
>>
> 
> As the "-i" option is not defined by the POSIX standard but by GNU sed, 
> I assume that your example uses GNU sed.

Yes. (I've just used '-i' for simplicity.)

A better example would have been to issue (from another shell window)
the command

    echo "echo END" >> dynchg.sh

and we then see that after terminating the above loop the "END" will
be printed.

(I'm testing with ksh but suppose that in bash it would be similar.)

Janis

> [...]
Re: Back To CS Basics. Fuck AI
#229
Author: c186282
Date: Sat, 24 Oct 2026 03:59
49 lines
3479 bytes
On 10/23/26 12:50, Janis Papanagnou wrote:
> On 2026-10-21 00:54, Helmut Waitzmann wrote:
>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com>:
>>> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
>>> I've just done this ("a script change while it's running") [*]
>>>
>>> [*] What I've done was to run the following script "dynchg.sh"
>>>
>>>    while read ; do
>>>        echo $REPLY
>>>    done
>>>
>>> and change it (from another terminal) while it runs by
>>>
>>>    sed -i '2p' dynchg.sh
>>>
>>
>> As the "-i" option is not defined by the POSIX standard but by GNU 
>> sed, I assume that your example uses GNU sed.
> 
> Yes. (I've just used '-i' for simplicity.)
> 
> A better example would have been to issue (from another shell window)
> the command
> 
>     echo "echo END" >> dynchg.sh
> 
> and we then see that after terminating the above loop the "END" will
> be printed.
> 
> (I'm testing with ksh but suppose that in bash it would be similar.)


   KSH and BASH are "mostly compatible". Minor diffs but
   nothing hard to get around. Anything you can do in KSH
   can be done in BASH.

   There are MANY shells, of course. CSH and ZSH are 'more
   different' for example and it'd be a more complicated
   translation. Not impossible, just more work.

   If KSH works for you then stick with it. Note however
   that MOST distros default to BASH now - so if you plan
   to 'distribute' your work it'd be better to move your
   stuff over to BASH. Most distros, users would have to
   intentionally install KSH and scripts would need a
   shebang at the top to specify which shell to use.
   (good practice, always add the shebang)
Re: Back To CS Basics. Fuck AI
#230
Author: Janis Papanagnou
Date: Sat, 24 Oct 2026 09:53
73 lines
4532 bytes
On 2026-10-24 05:59, c186282 wrote:
> 
>    KSH and BASH are "mostly compatible". Minor diffs but
>    nothing hard to get around. Anything you can do in KSH
>    can be done in BASH.

This is not correct. While Bash has over time adopted quite
some features from Ksh - but sadly needed often far too many
years for that - there's still a lot substantial functions
in Ksh that Bash has not implemented (or substituted by some
equivalent feature).

> [...]
> 
>    If KSH works for you then stick with it.

I use Ksh meanwhile for ~35 years, and since I use a lot of
Ksh features that Bash just doesn't support there's certainly
no reason to switch. (Also its speed is a criterion, BTW. And
back then there were no Bash versions on commercial Unixes;
but commercial Linuxes haven't the prevalence any more today,
and play no role now in my private systems context.)

>    Note however that MOST distros default to BASH now -

Yes, Linux often has Bash as its default.

>    so if you plan
>    to 'distribute' your work it'd be better to move your
>    stuff over to BASH.

Certainly not.

And this is short-sighted. If _portability_ is an issue you'd
better stick with the POSIX subset of both, Ksh and Bash.

(Sadly, as we observe, especially "Linux kiddies" often don't
know what that POSIX subset actually is; in their scripts they
are writing #!/bin/sh and using some bash-specific syntax not
realizing that there's a difference, and that Bash is not the
[portable] *standard*.)

>    Most distros, users would have to
>    intentionally install KSH and scripts would need a
>    shebang at the top to specify which shell to use.

I don't recall to have ever "intentionally installed" Ksh on
Linux. Earlier Linuxes had just a (sub-optimal!) PD-ksh that
you could use out of the box. Later they provided also the
much better "original" [AT&T] Ksh, and meanwhile you find on
(some?) Linuxes ksh93u+m, Martijn Dekker's improved version.

Of course you can call shell scripts with the executable-flag
set and with a she-bang line on top. Personally I run most
shell scripts with the interpreter explicitly provided, as in
   ksh my-script flags arguments
allowing easy debugging by adding '-x' without explicit 'set'
command in the script. Only if some script gets the status of
a "standard-command" I regularly use I set the shebang. YMMV.

(So you don't "need" a shebang line, but it's useful.)

>    (good practice, always add the shebang)

Yes, if you are running your scripts executable script (or if
you want to give your editor a hint for syntax highlighting,
what shell is actually used, or just for specification purpose;
but note, as said above, that we see many people have no clear
idea about what a "/bin/sh" is and where /bin/bash or /bin/ksh
differ from the standard.

Janis
Re: Back To CS Basics. Fuck AI
#231
Author: Nuno Silva
Date: Sat, 24 Oct 2026 11:06
10 lines
1793 bytes
On 2026-10-24, c186282 wrote:

>   KSH and BASH are "mostly compatible". Minor diffs but
>   nothing hard to get around. Anything you can do in KSH
>   can be done in BASH.

Now that sounds like something Greg Sullivan of Microsoft would say.

-- 
Nuno Silva
Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#232
Author: Kenny McCormack
Date: Sat, 24 Oct 2026 12:10
27 lines
2186 bytes
In article <11bhv61$1bjd2$2@dont-email.me>,
Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>On 2026-10-24 05:59, c186282 wrote:
>> 
>>   KSH and BASH are "mostly compatible". Minor diffs but
>>   nothing hard to get around. Anything you can do in KSH
>>   can be done in BASH.
>
>This is not correct. While Bash has over time adopted quite
>some features from Ksh - but sadly needed often far too many
>years for that - there's still a lot substantial functions
>in Ksh that Bash has not implemented (or substituted by some
>equivalent feature).

I think you're taking Speedy way too seriously here.  All of your points
are valid, of course, but it should not be necessary to respond to the
troll.

BTW, you assert that there are (many) features of Ksh that are not (yet)
present in bash.  I'm not doubting you, but I am curious about examples.
It seems to me that if you assert something like that, you should give
examples.

-- 
Rich people pay Fox people to convince middle class people to blame poor people.

	(John Fugelsang)
Re: Back To CS Basics. Fuck AI
#233
Author: Stéphane CARPENTIER
Date: Sat, 24 Oct 2026 13:41
48 lines
3895 bytes
Le 24-10-2026, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> a écrit :
> On 2026-10-24 05:59, c186282 wrote:
>>    Note however that MOST distros default to BASH now -
>
> Yes, Linux often has Bash as its default.

I just keep this because I guess, if I don't consider it to be wrong
because I know what it exactly means, I believe it's often a source of
confusion. Because it can mean two different things and three different
things must be considered when speaking about the default shell.

Mostly, BASH is the default for the three things, one of them can be
changed effortlessly, one of them would be very difficult to change in
the long term and the last one depend on the interaction with others.

The first thing is the way by which you interact directly with your
SHELL, a kind of REPL. It's just a field in the /etc/passwd file, it's
easy to change and if you prefer any SHELL, just install it, change the
field and it rocks. It's just a matter of taste, nothing can go wrong by
changing it.

The second thing is the shell used by the distro to run its script. This
one is clearly often BASH, changing it can be challenging. And things
can go wrong in a lot of ways, from the shebang poorly defined to some
specificities expected by the distro. But really, I'm not sure it's a
real issue because I'm not sure there are reason to change it. The
fact that systemd doesn't need any shell script is a reason why it's nit
that important. One can want to change the default provided by the
distro, but changing the script shell provided by the distro mean each
time an update is done, the changes will be removed. And they will need
special care. When there are ways to change the default without changing
the scripts provided by the distro.

The last one is the shell you choose to write your scripts. It doesn't
need to be the same one than the one you are using to interact with your
shell. As long as the shebang is correctly defined, it depends more on
the people with whom you share it than with any default choice made by
any distro. Because people can be more or less comfortable with
different specificities, even if they can install any available shell.

Unlike the choice of the default bootloader or the choice of the default
init system can can have huge impacts, I really don't see how the choice
of the default shell by a distro can be important (for the end user
because for the contributor, it has some implications).

-- 
Si vous avez du temps Ă  perdre :
https://scarpet42.gitlab.io
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#234
Author: Janis Papanagnou
Date: Sat, 24 Oct 2026 16:53
50 lines
3758 bytes
On 2026-10-24 14:10, Kenny McCormack wrote:
> In article <11bhv61$1bjd2$2@dont-email.me>,
> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>> On 2026-10-24 05:59, c186282 wrote:
>>>
>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>    nothing hard to get around. Anything you can do in KSH
>>>    can be done in BASH.
>>
>> This is not correct. While Bash has over time adopted quite
>> some features from Ksh - but sadly needed often far too many
>> years for that - there's still a lot substantial functions
>> in Ksh that Bash has not implemented (or substituted by some
>> equivalent feature).
> 
> I think you're taking Speedy way too seriously here.  All of your points
> are valid, of course, but it should not be necessary to respond to the
> troll.

Oh, I didn't knew that he's considered a troll. His post looked just
uninformed, or opinionated, not trollish.

> 
> BTW, you assert that there are (many) features of Ksh that are not (yet)
> present in bash.  I'm not doubting you, but I am curious about examples.
> It seems to me that if you assert something like that, you should give
> examples.

Mind that his post says "Minor diffs"; and I was not (not primarily)
addressing the absolute number of features but those features that
are hard(er) or in practice impossible [based on existing functions]
to substitute. Off the top of my head I had been thinking of discipline
functions, or the "type system" - these are very closely embedded in
the shell.

Note that while these features are probably not widely used there's
also many often used details I used, functions and options, that Bash
doesn't have as I noticed over the time. I've occasionally mentioned
those in some posts that where about such functionality, but I'm too
lazy to create a list or something, which would require to re-test
every features whether one or another has meanwhile been implemented;
that would be too much effort.[*])

Janis

[*] After finishing writing the post I remembered that we could ask
a search machine AI, but strangely it had no or found any substantial
information, not even the obvious examples; so we have to rely on the
experts or own experience here.
Re: Back To CS Basics. Fuck AI
#235
Author: Carlos E.R.
Date: Sat, 24 Oct 2026 19:31
42 lines
3739 bytes
On 2026-10-24 15:41, Stéphane CARPENTIER wrote:
> Le 24-10-2026, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> a écrit :
>> On 2026-10-24 05:59, c186282 wrote:
>>>     Note however that MOST distros default to BASH now -
>>
>> Yes, Linux often has Bash as its default.
> 
> I just keep this because I guess, if I don't consider it to be wrong
> because I know what it exactly means, I believe it's often a source of
> confusion. Because it can mean two different things and three different
> things must be considered when speaking about the default shell.
> 
> Mostly, BASH is the default for the three things, one of them can be
> changed effortlessly, one of them would be very difficult to change in
> the long term and the last one depend on the interaction with others.
> 
> The first thing is the way by which you interact directly with your
> SHELL, a kind of REPL. It's just a field in the /etc/passwd file, it's
> easy to change and if you prefer any SHELL, just install it, change the
> field and it rocks. It's just a matter of taste, nothing can go wrong by
> changing it.
> 
> The second thing is the shell used by the distro to run its script. This
> one is clearly often BASH, changing it can be challenging. And things
> can go wrong in a lot of ways, from the shebang poorly defined to some
> specificities expected by the distro. But really, I'm not sure it's a
> real issue because I'm not sure there are reason to change it. The
> fact that systemd doesn't need any shell script is a reason why it's nit
> that important. One can want to change the default provided by the
> distro, but changing the script shell provided by the distro mean each
> time an update is done, the changes will be removed. And they will need
> special care. When there are ways to change the default without changing
> the scripts provided by the distro.

I don't see any reason to change the shell used by system scripts. If 
the shebang is /bin/sh, and bad things happen if you uninstall bash and 
they are forced to use ksh, well, it is their fault and it is a bug. 
They should have specified the proper shebang. Just report it.

-- 
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
Re: Back To CS Basics. Fuck AI
#236
Author: Lawrence D’Oliveiro
Date: Sat, 24 Oct 2026 22:36
14 lines
2372 bytes
On 24 Oct 2026 13:41:20 GMT, Stéphane CARPENTIER wrote:

> The second thing is the shell used by the distro to run its script.
> This one is clearly often BASH, changing it can be challenging. And
> things can go wrong in a lot of ways, from the shebang poorly
> defined to some specificities expected by the distro.

Debian (and I guess its derivatives as well) long ago moved away from
the assumption that “/bin/sh” meant the same thing as “/bin/bash”.
They introduced a new, very vanilla, POSIX-compliant shell called
dash(1) <https://manpages.debian.org/dash(1)>, which is the shell that
is invoked when your script says “/bin/sh”.

So if you want bash, you have to explicitly ask for bash.
Re: Back To CS Basics. Fuck AI
#237
Author: c186282
Date: Mon, 26 Oct 2026 03:49
156 lines
8349 bytes
On 10/24/26 05:53, Janis Papanagnou wrote:
> On 2026-10-24 05:59, c186282 wrote:
>>
>>    KSH and BASH are "mostly compatible". Minor diffs but
>>    nothing hard to get around. Anything you can do in KSH
>>    can be done in BASH.
> 
> This is not correct. While Bash has over time adopted quite
> some features from Ksh - but sadly needed often far too many
> years for that - there's still a lot substantial functions
> in Ksh that Bash has not implemented (or substituted by some
> equivalent feature).
> 
>> [...]
>>
>>    If KSH works for you then stick with it.
> 
> I use Ksh meanwhile for ~35 years, and since I use a lot of
> Ksh features that Bash just doesn't support there's certainly
> no reason to switch. (Also its speed is a criterion, BTW. And
> back then there were no Bash versions on commercial Unixes;
> but commercial Linuxes haven't the prevalence any more today,
> and play no role now in my private systems context.)
> 
>>    Note however that MOST distros default to BASH now -
> 
> Yes, Linux often has Bash as its default.
> 
>>    so if you plan
>>    to 'distribute' your work it'd be better to move your
>>    stuff over to BASH.
> 
> Certainly not.
> 
> And this is short-sighted. If _portability_ is an issue you'd
> better stick with the POSIX subset of both, Ksh and Bash.
> 
> (Sadly, as we observe, especially "Linux kiddies" often don't
> know what that POSIX subset actually is; in their scripts they
> are writing #!/bin/sh and using some bash-specific syntax not
> realizing that there's a difference, and that Bash is not the
> [portable] *standard*.)

   Delay does not necessarily equate with 'ignorance'.

   Different developers ... everyone had their own idea
   of a 'perfect shell' - but then had to adapt and adapt
   again as the Real Needs became more obvious. Now, most
   WILL do the same things - just slightly different syntax.

   I rather liked the 'c-shell' long back because it, well,
   'looked like C'. It was one of the things that attracted
   me to Unix/Linux in the first place. Now I'm happy (ok,
   that's not really the word) with BASH. Not much it
   can't do ... but the fudged-fudged-fudged syntax to add
   features over time CAN be a pain in the ass.

   If I want 'scripting' now, I do it with Python. BASH
   or whatever, maybe it just EVOKES the Python scripts,
   a one or two-liner. Wrote many rather long BASH scripts
   in the past, and while they worked they were, well, just
   TOO messy/cryptic.

   Last big BASH script I did was for backing up a bunch
   of on-network drives. Mount-checking (important), calls
   to rsync and openSSH and ftp, local AND 'cloud', all
   with some confirmation checks along the way. SEMI-repeating
   units but each was a bit 'special'.

   (ALWAYS pre-encrypt before sending to 'cloud' - I do
   NOT trust the providers one bit. Mine had an extension
   that 'suggested' some kind of ZIP, just to help them
   waste time)

   RE-did it in Python. MUCH shorter and more comprehensible
   and a nice easy CSV config file you could tweak in a text
   editor or spreadsheet. Python made it all BETTER.

   Had a 'C' version of that backup pgm earlier. Worked
   fine, but there was a lot of string checking/editing
   involved and 'C' is CLUNKY with string shit. Python
   stole the FORTRAN string-slicing stuff, good deal !

   Won't ever use BASH or any other 'shell script' for
   that kind of task again. Those might be "trad -IX"
   but IMHO they're just OVER. "Solutions" MOVED ON.

>>    Most distros, users would have to
>>    intentionally install KSH and scripts would need a
>>    shebang at the top to specify which shell to use.
> 
> I don't recall to have ever "intentionally installed" Ksh on
> Linux. Earlier Linuxes had just a (sub-optimal!) PD-ksh that
> you could use out of the box. Later they provided also the
> much better "original" [AT&T] Ksh, and meanwhile you find on
> (some?) Linuxes ksh93u+m, Martijn Dekker's improved version.

   Um ... these days, almost all distros, you do have
   to "intentionally install" KSH or any rivals. BASH
   rules by default.

> Of course you can call shell scripts with the executable-flag
> set and with a she-bang line on top. Personally I run most
> shell scripts with the interpreter explicitly provided, as in
>    ksh my-script flags arguments
> allowing easy debugging by adding '-x' without explicit 'set'
> command in the script. Only if some script gets the status of
> a "standard-command" I regularly use I set the shebang. YMMV.

   Direct spec of the shell IS useful, however the
   'shebang' trick works well too.

> (So you don't "need" a shebang line, but it's useful.)
> 
>>    (good practice, always add the shebang)
> 
> Yes, if you are running your scripts executable script (or if
> you want to give your editor a hint for syntax highlighting,
> what shell is actually used, or just for specification purpose;
> but note, as said above, that we see many people have no clear
> idea about what a "/bin/sh" is and where /bin/bash or /bin/ksh
> differ from the standard.

   I have, I think, FOUR shells on this machine. The
   shebang IS required/desired.

   Still kinda like 'tcsh', it's there in case I get
   a brain-worm and wanna fool around with olde-dayz
   stuff. Zsh ain't so bad either.

   But, as said, for 'scripting' now, Python is by
   far my #1 choice unless the script is like a
   simple little ten-liner. Tend to use those on
   my PIs.

   Fooled around a bit with Lua and Ruby for scripting,
   but, really, Python and the MASSIVE number of libs
   have them beat. Python will do ANYTHING these days,
   just not as fast as 'C'. However CPU speed is less
   of a thing these days - I/O ops drag things down
   more than the CPU - so Python and 'C' can usually
   compete pretty well.

   There are Python compilers too. The main issue there
   is all the sub-sub-versions of Python, so you always
   have to include the entire binaries into each compilation
   to ensure it'll work. But then space is also a minor
   issue now as well unless you're doing micro-controllers.
   Did my share of those - DO teach you how to really SQUEEZE
   shit in - all computer kiddies should learn MCs first.

   . . .

   ("Harry talks in his sleep, didn't you notice ?"
     Slight telling delay, then Hermonie says 'No' :-)
Re: Back To CS Basics. Fuck AI
#238
Author: c186282
Date: Mon, 26 Oct 2026 03:59
25 lines
2763 bytes
On 10/24/26 07:06, Nuno Silva wrote:
> On 2026-10-24, c186282 wrote:
> 
>>    KSH and BASH are "mostly compatible". Minor diffs but
>>    nothing hard to get around. Anything you can do in KSH
>>    can be done in BASH.
> 
> Now that sounds like something Greg Sullivan of Microsoft would say.

   You "can do" most anything in COBOL or FORTRAN or 'C'
   in ANY other lang - just as anything in one shell script
   you can do in any other. The issue is 'how easily' - and
   that depends on your particular application.

   "Needs" eventually rule. So, EVERYONE winds up with kind
   of the same 'capabilities'. How nice/easy/clear, depends.

   Use Python for scripts over maybe 10 lines for everything
   these days. Infinitely capable and READABLE and DOCUMENTED.
   No real competition now. If you hate Python "just because"
   then reconsider.

   Yea yea ... the old shells are "Trad-IX" ... but IMHO
   their day is kinda OVER.
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#239
Author: c186282
Date: Mon, 26 Oct 2026 04:28
82 lines
5351 bytes
On 10/24/26 12:53, Janis Papanagnou wrote:
> On 2026-10-24 14:10, Kenny McCormack wrote:
>> In article <11bhv61$1bjd2$2@dont-email.me>,
>> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>>> On 2026-10-24 05:59, c186282 wrote:
>>>>
>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>    nothing hard to get around. Anything you can do in KSH
>>>>    can be done in BASH.
>>>
>>> This is not correct. While Bash has over time adopted quite
>>> some features from Ksh - but sadly needed often far too many
>>> years for that - there's still a lot substantial functions
>>> in Ksh that Bash has not implemented (or substituted by some
>>> equivalent feature).
>>
>> I think you're taking Speedy way too seriously here.  All of your points
>> are valid, of course, but it should not be necessary to respond to the
>> troll.
> 
> Oh, I didn't knew that he's considered a troll. His post looked just
> uninformed, or opinionated, not trollish.

   Thanks, I think  :-)

   I never 'troll' - just relate MY experiences and what
   I've learned from them. I had my own path, own needs,
   my own 'environments', starting in the punch-card days.
   But what served ME best may not be what served YOU, what
   I learned may not be what YOU learned.

   A great purpose of groups like these is to bring in
   a LOT of experiences and perspectives. You MAY find
   something compatible/useful in all the diverse advice.
   I don't pretend to know-it-all, nothing close (though
   a few, well, SAY they do :-)

   As said elsewhere, "NEED" eventually supersedes all else.
   Earlier on, all the shells maybe started with a narrow
   'vision' but HAD to include capabilities the other people
   put in. Sometimes the additions were neat/clear, sometimes
   not so much, but they're THERE.

   A sort of 'functional convergence' due to NEEDS.

   Anyway, I reject 'religions' built around shells or
   langs and such. For each need, pick the best tools
   and approaches. "Best" - sometimes that's what most
   harmonizes with YOUR brand of thinking.

>> BTW, you assert that there are (many) features of Ksh that are not (yet)
>> present in bash.  I'm not doubting you, but I am curious about examples.
>> It seems to me that if you assert something like that, you should give
>> examples.
> 
> Mind that his post says "Minor diffs"; and I was not (not primarily)
> addressing the absolute number of features but those features that
> are hard(er) or in practice impossible [based on existing functions]
> to substitute. Off the top of my head I had been thinking of discipline
> functions, or the "type system" - these are very closely embedded in
> the shell.
> 
> Note that while these features are probably not widely used there's
> also many often used details I used, functions and options, that Bash
> doesn't have as I noticed over the time. I've occasionally mentioned
> those in some posts that where about such functionality, but I'm too
> lazy to create a list or something, which would require to re-test
> every features whether one or another has meanwhile been implemented;
> that would be too much effort.[*])
> 
> Janis
> 
> [*] After finishing writing the post I remembered that we could ask
> a search machine AI, but strangely it had no or found any substantial
> information, not even the obvious examples; so we have to rely on the
> experts or own experience here.

   "AI"s aren't really as all-around 'smart' as their
   sellers suggest  :-)

   You generally find that out AFTER you $ubscribe .....
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#240
Author: c186282
Date: Mon, 26 Oct 2026 04:57
40 lines
3440 bytes
On 10/24/26 08:10, Kenny McCormack wrote:
> In article <11bhv61$1bjd2$2@dont-email.me>,
> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>> On 2026-10-24 05:59, c186282 wrote:
>>>
>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>    nothing hard to get around. Anything you can do in KSH
>>>    can be done in BASH.
>>
>> This is not correct. While Bash has over time adopted quite
>> some features from Ksh - but sadly needed often far too many
>> years for that - there's still a lot substantial functions
>> in Ksh that Bash has not implemented (or substituted by some
>> equivalent feature).
> 
> I think you're taking Speedy way too seriously here.  All of your points
> are valid, of course, but it should not be necessary to respond to the
> troll.
> 
> BTW, you assert that there are (many) features of Ksh that are not (yet)
> present in bash.  I'm not doubting you, but I am curious about examples.
> It seems to me that if you assert something like that, you should give
> examples.

   I've mentioned (necessary) "Functional Convergence". If yer
   shell doesn't do something neat-o some other one does NOW,
   it WILL soon enough. Might get squeezed-in nice/neat, or
   maybe NOT. All great/pure ideas/visions eventually HAVE to
   converge somewhere - or vanish into the historical recycle bin.

   Anyway, for 'scripts', I'm 99% Python now. Does EVERYTHING
   and MUCH clearer than any old shell.

   Of note, did NOT use Python until P3 came out. It seemed
   interesting/versatile but why learn an obsolete version ?
   BASIC, skip the bile, became a fair 'script' lang after
   awhile - but, too clunky IMHO - meant for a different
   era, different environment, different mindset.

Re: Back To CS Basics. Fuck AI
#242
Author: Janis Papanagnou
Date: Mon, 26 Oct 2026 05:04
237 lines
11203 bytes
On 2026-10-26 04:49, c186282 wrote:
> On 10/24/26 05:53, Janis Papanagnou wrote:
>> On 2026-10-24 05:59, c186282 wrote:
>>>
>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>    nothing hard to get around. Anything you can do in KSH
>>>    can be done in BASH.
>>
>> This is not correct. While Bash has over time adopted quite
>> some features from Ksh - but sadly needed often far too many
>> years for that - there's still a lot substantial functions
>> in Ksh that Bash has not implemented (or substituted by some
>> equivalent feature).
>>
>>> [...]
>>>
>>>    If KSH works for you then stick with it.
>>
>> I use Ksh meanwhile for ~35 years, and since I use a lot of
>> Ksh features that Bash just doesn't support there's certainly
>> no reason to switch. (Also its speed is a criterion, BTW. And
>> back then there were no Bash versions on commercial Unixes;
>> but commercial Linuxes haven't the prevalence any more today,
>> and play no role now in my private systems context.)
>>
>>>    Note however that MOST distros default to BASH now -
>>
>> Yes, Linux often has Bash as its default.
>>
>>>    so if you plan
>>>    to 'distribute' your work it'd be better to move your
>>>    stuff over to BASH.
>>
>> Certainly not.
>>
>> And this is short-sighted. If _portability_ is an issue you'd
>> better stick with the POSIX subset of both, Ksh and Bash.
>>
>> (Sadly, as we observe, especially "Linux kiddies" often don't
>> know what that POSIX subset actually is; in their scripts they
>> are writing #!/bin/sh and using some bash-specific syntax not
>> realizing that there's a difference, and that Bash is not the
>> [portable] *standard*.)
> 
>    Delay does not necessarily equate with 'ignorance'.

Not sure why you bring up that statement; nobody said anything
like that.

My statement about the delayed adoption of Ksh features by Bash
was just pointing to the fact that Bash users had to wait before
they could use comfortable features that Ksh had already provided
for (often many) years.

(It's also a bit unfortunate that Bash implemented some features,
and some of them IMO unnecessarily, in a slightly different way,
so that you cannot easily switch between the two shells.)

> 
>    Different developers ... everyone had their own idea
>    of a 'perfect shell' - but then had to adapt and adapt
>    again as the Real Needs became more obvious. Now, most
>    WILL do the same things - just slightly different syntax.

Where not outright wrong, this is very fuzzy. (I don't think it
makes sense to comment on that.)

> 
>    I rather liked the 'c-shell' long back because it, well,
>    'looked like C'. It was one of the things that attracted
>    me to Unix/Linux in the first place. Now I'm happy (ok,
>    that's not really the word) with BASH. Not much it
>    can't do ... but the fudged-fudged-fudged syntax to add
>    features over time CAN be a pain in the ass.

If you think it's a good idea to use C-shell for scripting, and
since for you it seems to be just a syntax-difference, well, do
what you like in your private working context.

> 
>    If I want 'scripting' now, I do it with Python. BASH
>    or whatever, maybe it just EVOKES the Python scripts,
>    a one or two-liner. Wrote many rather long BASH scripts
>    in the past, and while they worked they were, well, just
>    TOO messy/cryptic.

Yes, I share your valuation of shells being somewhat cryptic and
also "messy".

> 
>    Last big BASH script I did was for backing up a bunch
>    of on-network drives. Mount-checking (important), calls
>    to rsync and openSSH and ftp, local AND 'cloud', all
>    with some confirmation checks along the way. SEMI-repeating
>    units but each was a bit 'special'.

Well, that's what their task mostly is, to "glue" together tools,
even if that glue is quite powerful (yet still somewhat "messy").

> 
>    (ALWAYS pre-encrypt before sending to 'cloud' - I do
>    NOT trust the providers one bit. Mine had an extension
>    that 'suggested' some kind of ZIP, just to help them
>    waste time)

I suppose you mean here that you encrypt your backups before you
store them in the cloud. That's sensible. (I don't store my files
or backups in the cloud in the first place.)

> 
>    RE-did it in Python. MUCH shorter and more comprehensible
>    and a nice easy CSV config file you could tweak in a text
>    editor or spreadsheet. Python made it all BETTER.

I'm not too surprised that you say that.

> 
>    Had a 'C' version of that backup pgm earlier. Worked
>    fine, but there was a lot of string checking/editing
>    involved and 'C' is CLUNKY with string shit.

Shell has higher abstractions compared to "C".

>    Python
>    stole the FORTRAN string-slicing stuff, good deal !

Not sure what you are actually referring here to. (Shell has
such things as well. Unless you mean something more fancy when
you talk about Python or FORTRAN? My memories on FORTRAN are
very faint after 40 years when I had last used it.)

> 
>    Won't ever use BASH or any other 'shell script' for
>    that kind of task again. Those might be "trad -IX"
>    but IMHO they're just OVER. "Solutions" MOVED ON.

With the POSIX-Shells you have at least a standard language on
Unixes.

> 
>>>    Most distros, users would have to
>>>    intentionally install KSH and scripts would need a
>>>    shebang at the top to specify which shell to use.
>>
>> I don't recall to have ever "intentionally installed" Ksh on
>> Linux. Earlier Linuxes had just a (sub-optimal!) PD-ksh that
>> you could use out of the box. Later they provided also the
>> much better "original" [AT&T] Ksh, and meanwhile you find on
>> (some?) Linuxes ksh93u+m, Martijn Dekker's improved version.
> 
>    Um ... these days, almost all distros, you do have
>    to "intentionally install" KSH or any rivals. BASH
>    rules by default.

Mine has even ksh93u+m. Some years ago I've got original ksh. Yet
more years ago I've seen PD-ksh. All in the standard distribution.
As said, I've never had to "intentionally install" a Ksh.

There's one exception; back in the days when there was only PD-Ksh
provided in the distributions and that was the only existing Ksh,
but AT&T released their ksh93 for free, I got that from the AT&T
to replace the PD-thing. That *was* an intentional install. But
all those who didn't want The Original they could just use the one
that came with the distros.

> 
>> Of course you can call shell scripts with the executable-flag
>> set and with a she-bang line on top. Personally I run most
>> shell scripts with the interpreter explicitly provided, as in
>>    ksh my-script flags arguments
>> allowing easy debugging by adding '-x' without explicit 'set'
>> command in the script. Only if some script gets the status of
>> a "standard-command" I regularly use I set the shebang. YMMV.
> 
>    Direct spec of the shell IS useful, however the
>    'shebang' trick works well too.
> 
>> (So you don't "need" a shebang line, but it's useful.)
>>
>>>    (good practice, always add the shebang)
>>
>> Yes, if you are running your scripts executable script (or if
>> you want to give your editor a hint for syntax highlighting,
>> what shell is actually used, or just for specification purpose;
>> but note, as said above, that we see many people have no clear
>> idea about what a "/bin/sh" is and where /bin/bash or /bin/ksh
>> differ from the standard.
> 
>    I have, I think, FOUR shells on this machine. The
>    shebang IS required/desired.
> 
>    Still kinda like 'tcsh', it's there in case I get
>    a brain-worm and wanna fool around with olde-dayz
>    stuff. Zsh ain't so bad either.

I don't consider it a good idea to use 'csh' or 'tcsh' for shell
*programming*. (Browse the web for the well known paper with the
thoroughly explained rationales.)

I know some folks use and prefer 'tcsh' as interactive shells.
(Although the Bash, Zsh, or Ksh, are meanwhile quite comfortable
to use also interactively.)

> 
>    But, as said, for 'scripting' now, Python is by
>    far my #1 choice unless the script is like a
>    simple little ten-liner. Tend to use those on
>    my PIs.
> 
>    Fooled around a bit with Lua and Ruby for scripting,
>    but, really, Python and the MASSIVE number of libs
>    have them beat. Python will do ANYTHING these days,
>    just not as fast as 'C'. However CPU speed is less
>    of a thing these days - I/O ops drag things down
>    more than the CPU - so Python and 'C' can usually
>    compete pretty well.
> 
>    There are Python compilers too. The main issue there
>    is all the sub-sub-versions of Python, so you always
>    have to include the entire binaries into each compilation
>    to ensure it'll work. But then space is also a minor
>    issue now as well unless you're doing micro-controllers.
>    Did my share of those - DO teach you how to really SQUEEZE
>    shit in - all computer kiddies should learn MCs first.

(I'm not the appropriate person to discuss Python, Lua, Ruby, and
similar.)

Janis

> 
>    . . .
> 
>    ("Harry talks in his sleep, didn't you notice ?"
>      Slight telling delay, then Hermonie says 'No' :-)
> 
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#241
Author: Janis Papanagnou
Date: Mon, 26 Oct 2026 05:20
76 lines
4716 bytes
On 2026-10-26 05:28, c186282 wrote:
> On 10/24/26 12:53, Janis Papanagnou wrote:
>> On 2026-10-24 14:10, Kenny McCormack wrote:
>>> In article <11bhv61$1bjd2$2@dont-email.me>,
>>> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>>>> On 2026-10-24 05:59, c186282 wrote:
>>>>>
>>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>>    nothing hard to get around. Anything you can do in KSH
>>>>>    can be done in BASH.
>>>>
>>>> This is not correct. While Bash has over time adopted quite
>>>> some features from Ksh - but sadly needed often far too many
>>>> years for that - there's still a lot substantial functions
>>>> in Ksh that Bash has not implemented (or substituted by some
>>>> equivalent feature).
>>>
>>> I think you're taking Speedy way too seriously here.  All of your points
>>> are valid, of course, but it should not be necessary to respond to the
>>> troll.
>>
>> Oh, I didn't knew that he's considered a troll. His post looked just
>> uninformed, or opinionated, not trollish.
> 
>    Thanks, I think  :-)
> 
>    I never 'troll' - just relate MY experiences and what
>    I've learned from them. I had my own path, own needs,
>    my own 'environments', starting in the punch-card days.

(I've still a block of punch-cards in the cellar, so I've got an
impression where you're coming from.)

>    But what served ME best may not be what served YOU, what
>    I learned may not be what YOU learned.

Oh, in my previous reply I said something like that; that it's
fine if it serves you in your private contexts.

A discrepancy might appear when you are working in a larger area
with rules that are not tailored to your personal likings but to
experiences from a larger (or another) group of persons.

> 
>    A great purpose of groups like these is to bring in
>    a LOT of experiences and perspectives. You MAY find
>    something compatible/useful in all the diverse advice.
>    I don't pretend to know-it-all, nothing close (though
>    a few, well, SAY they do :-)

Oh, I'm completely fine with that. - If statements are formulated
as opinions, what else can we do than agree to those or disagree.
A problem, though, is, when opinions are stated as facts, and if
statements are even wrong, then they should be corrected. (Or
clarified if it was just a communication or expression problem.)

> 
>    As said elsewhere, "NEED" eventually supersedes all else.
>    Earlier on, all the shells maybe started with a narrow
>    'vision' but HAD to include capabilities the other people
>    put in. Sometimes the additions were neat/clear, sometimes
>    not so much, but they're THERE.
> 
>    A sort of 'functional convergence' due to NEEDS.
> 
>    Anyway, I reject 'religions' built around shells or
>    langs and such. For each need, pick the best tools
>    and approaches. "Best" - sometimes that's what most
>    harmonizes with YOUR brand of thinking.

(Unfortunately language topics are often presented with religious
fervor.)

Janis

> [...]
Re: Back To CS Basics. Fuck AI
#243
Author: Janis Papanagnou
Date: Mon, 26 Oct 2026 05:41
33 lines
3003 bytes
On 2026-10-26 04:59, c186282 wrote:
> On 10/24/26 07:06, Nuno Silva wrote:
>> On 2026-10-24, c186282 wrote:
>>
>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>    nothing hard to get around. Anything you can do in KSH
>>>    can be done in BASH.
>>
>> Now that sounds like something Greg Sullivan of Microsoft would say.
> 
>    You "can do" most anything in COBOL or FORTRAN or 'C'
>    in ANY other lang - just as anything in one shell script
>    you can do in any other. The issue is 'how easily' - and
>    that depends on your particular application.

(Be careful; if your argument goes in the direction of "language A
is Turing-complete so you can use it simulating language B, which
makes it effectively the same", then that statement would be of no
practical value!)

I want to give you an example code from a little shell tool I wrote:

   function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}

(What this does is that whenever the environment variable 'LINES'
changes - e.g. if you pick your mouse and resize the X-window - then
that function gets triggered and the actions defined executed.)

I'd be interested how you'd implement or emulate that, say, in Bash.

Janis

> [...]
Re: Back To CS Basics. Fuck AI
#244
Author: c186282
Date: Mon, 26 Oct 2026 07:15
385 lines
17823 bytes
On 10/26/26 01:04, Janis Papanagnou wrote:
> On 2026-10-26 04:49, c186282 wrote:
>> On 10/24/26 05:53, Janis Papanagnou wrote:
>>> On 2026-10-24 05:59, c186282 wrote:
>>>>
>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>    nothing hard to get around. Anything you can do in KSH
>>>>    can be done in BASH.
>>>
>>> This is not correct. While Bash has over time adopted quite
>>> some features from Ksh - but sadly needed often far too many
>>> years for that - there's still a lot substantial functions
>>> in Ksh that Bash has not implemented (or substituted by some
>>> equivalent feature).
>>>
>>>> [...]
>>>>
>>>>    If KSH works for you then stick with it.
>>>
>>> I use Ksh meanwhile for ~35 years, and since I use a lot of
>>> Ksh features that Bash just doesn't support there's certainly
>>> no reason to switch. (Also its speed is a criterion, BTW. And
>>> back then there were no Bash versions on commercial Unixes;
>>> but commercial Linuxes haven't the prevalence any more today,
>>> and play no role now in my private systems context.)
>>>
>>>>    Note however that MOST distros default to BASH now -
>>>
>>> Yes, Linux often has Bash as its default.
>>>
>>>>    so if you plan
>>>>    to 'distribute' your work it'd be better to move your
>>>>    stuff over to BASH.
>>>
>>> Certainly not.
>>>
>>> And this is short-sighted. If _portability_ is an issue you'd
>>> better stick with the POSIX subset of both, Ksh and Bash.
>>>
>>> (Sadly, as we observe, especially "Linux kiddies" often don't
>>> know what that POSIX subset actually is; in their scripts they
>>> are writing #!/bin/sh and using some bash-specific syntax not
>>> realizing that there's a difference, and that Bash is not the
>>> [portable] *standard*.)
>>
>>    Delay does not necessarily equate with 'ignorance'.
> 
> Not sure why you bring up that statement; nobody said anything
> like that.


   My following exposition explains why.


> My statement about the delayed adoption of Ksh features by Bash
> was just pointing to the fact that Bash users had to wait before
> they could use comfortable features that Ksh had already provided
> for (often many) years.

   Well, good for them.

   I'll stick to my philosophic "Functional Convergence"
   theory here. If shell X does something neat-o then it
   HAS to be incorporated into all others - some way, some
   how, neat or not.

> (It's also a bit unfortunate that Bash implemented some features,
> and some of them IMO unnecessarily, in a slightly different way,
> so that you cannot easily switch between the two shells.)
> 
>>
>>    Different developers ... everyone had their own idea
>>    of a 'perfect shell' - but then had to adapt and adapt
>>    again as the Real Needs became more obvious. Now, most
>>    WILL do the same things - just slightly different syntax.
> 
> Where not outright wrong, this is very fuzzy. (I don't think it
> makes sense to comment on that.)

   I think it makes good sense. Everybody just HAS to
   somehow incorporate everyone else's good ideas
   eventually. Otherwise --> TRASH BIN of history.


>>    I rather liked the 'c-shell' long back because it, well,
>>    'looked like C'. It was one of the things that attracted
>>    me to Unix/Linux in the first place. Now I'm happy (ok,
>>    that's not really the word) with BASH. Not much it
>>    can't do ... but the fudged-fudged-fudged syntax to add
>>    features over time CAN be a pain in the ass.
> 
> If you think it's a good idea to use C-shell for scripting, and
> since for you it seems to be just a syntax-difference, well, do
> what you like in your private working context.

   As said, CSH did initially attract me to -IX. However
   don't really USE it anymore. HAVE tcsh installed though,
   Just In Case. Good idea, but didn't "evolve" enough.

>>    If I want 'scripting' now, I do it with Python. BASH
>>    or whatever, maybe it just EVOKES the Python scripts,
>>    a one or two-liner. Wrote many rather long BASH scripts
>>    in the past, and while they worked they were, well, just
>>    TOO messy/cryptic.
> 
> Yes, I share your valuation of shells being somewhat cryptic and
> also "messy".

   VERY messy and OFTEN 'cryptic' (unless very short).
   Just no NEED for such shit anymore.

>>    Last big BASH script I did was for backing up a bunch
>>    of on-network drives. Mount-checking (important), calls
>>    to rsync and openSSH and ftp, local AND 'cloud', all
>>    with some confirmation checks along the way. SEMI-repeating
>>    units but each was a bit 'special'.
> 
> Well, that's what their task mostly is, to "glue" together tools,
> even if that glue is quite powerful (yet still somewhat "messy").


   But NOT 'comprehensible' a year or two LATER. Been
   there, experienced/suffered that. Python is MUCH
   better in that respect. Didn't matter if I wrote
   the thing, the logic/sense of it DECAYS with time
   no matter HOW many comments/doc. I had a 40+ year
   career ... even 'simple' scripts/pgms, the whole
   sense/sensibility decayed over time. It all seems
   SO clear WHEN you're writing it, but ......

   Note a good third of my 'programs' at least
   were COMMENTS - by-line PLUS an informative
   header at the top of each function. Two or three
   years later, revision time - "WHAT The Fuck ???".


>>    (ALWAYS pre-encrypt before sending to 'cloud' - I do
>>    NOT trust the providers one bit. Mine had an extension
>>    that 'suggested' some kind of ZIP, just to help them
>>    waste time)
> 
> I suppose you mean here that you encrypt your backups before you
> store them in the cloud. That's sensible. (I don't store my files
> or backups in the cloud in the first place.)

   I very much mean to encrypt the backups BEFORE you
   send them to 'cloud'. Don't put un-encrypted shit
   on their sites for a millisecond. Do NOT trust them !
   AES-xxx is good, though sometimes used Camilla.

   With several langs/FTP you can put a file on 'cloud'
   and then set the datetime/ownership to whatever the
   original had. That's how I did it for a decade+ - works
   very well. Encrypt, upload, then tweak the specifics.
   Pirates get NOTHING.

>>    RE-did it in Python. MUCH shorter and more comprehensible
>>    and a nice easy CSV config file you could tweak in a text
>>    editor or spreadsheet. Python made it all BETTER.
> 
> I'm not too surprised that you say that.

   Do you disagree ???

>>    Had a 'C' version of that backup pgm earlier. Worked
>>    fine, but there was a lot of string checking/editing
>>    involved and 'C' is CLUNKY with string shit.
> 
> Shell has higher abstractions compared to "C".

   Slightly - but also CLUNKY and hard to understand
   a year or two later. Doing serious string stuff in
   BASH and several others ... nasty !

   Look, if you're 20-something it MAY be possible to
   hold all the sense/logic of older shit in your head.
   Believe me - that CHANGES. Too much shit on a
   small drive, so to speak.

>>    Python
>>    stole the FORTRAN string-slicing stuff, good deal !
> 
> Not sure what you are actually referring here to. (Shell has
> such things as well. Unless you mean something more fancy when
> you talk about Python or FORTRAN? My memories on FORTRAN are
> very faint after 40 years when I had last used it.)

   Um ... check. Almost all the Python string shit
   was 'borrowed' from FORTRAN. This is a GOOD thing.
   SO often you have to slice and dice and squish
   string stuff together in the real world. It'd
   better be EASY and OBVIOUS or you're doomed.

>>    Won't ever use BASH or any other 'shell script' for
>>    that kind of task again. Those might be "trad -IX"
>>    but IMHO they're just OVER. "Solutions" MOVED ON.
> 
> With the POSIX-Shells you have at least a standard language on
> Unixes.

   Python is now 'standard enough' - and totally ubiquitous.

   FIRST place I started seeing a lot of Python wasn't Linux,
   but WINDERS. Had to learn a little P2 just because. Found,
   despite initial prejudice, I didn't hate it ......

>>>>    Most distros, users would have to
>>>>    intentionally install KSH and scripts would need a
>>>>    shebang at the top to specify which shell to use.
>>>
>>> I don't recall to have ever "intentionally installed" Ksh on
>>> Linux. Earlier Linuxes had just a (sub-optimal!) PD-ksh that
>>> you could use out of the box. Later they provided also the
>>> much better "original" [AT&T] Ksh, and meanwhile you find on
>>> (some?) Linuxes ksh93u+m, Martijn Dekker's improved version.
>>
>>    Um ... these days, almost all distros, you do have
>>    to "intentionally install" KSH or any rivals. BASH
>>    rules by default.
> 
> Mine has even ksh93u+m. Some years ago I've got original ksh. Yet
> more years ago I've seen PD-ksh. All in the standard distribution.
> As said, I've never had to "intentionally install" a Ksh.

   Umm ... what IS this 'ksh'-defaulting distro ???

> There's one exception; back in the days when there was only PD-Ksh
> provided in the distributions and that was the only existing Ksh,
> but AT&T released their ksh93 for free, I got that from the AT&T
> to replace the PD-thing. That *was* an intentional install. But
> all those who didn't want The Original they could just use the one
> that came with the distros.
> 
>>
>>> Of course you can call shell scripts with the executable-flag
>>> set and with a she-bang line on top. Personally I run most
>>> shell scripts with the interpreter explicitly provided, as in
>>>    ksh my-script flags arguments
>>> allowing easy debugging by adding '-x' without explicit 'set'
>>> command in the script. Only if some script gets the status of
>>> a "standard-command" I regularly use I set the shebang. YMMV.
>>
>>    Direct spec of the shell IS useful, however the
>>    'shebang' trick works well too.
>>
>>> (So you don't "need" a shebang line, but it's useful.)
>>>
>>>>    (good practice, always add the shebang)
>>>
>>> Yes, if you are running your scripts executable script (or if
>>> you want to give your editor a hint for syntax highlighting,
>>> what shell is actually used, or just for specification purpose;
>>> but note, as said above, that we see many people have no clear
>>> idea about what a "/bin/sh" is and where /bin/bash or /bin/ksh
>>> differ from the standard.
>>
>>    I have, I think, FOUR shells on this machine. The
>>    shebang IS required/desired.
>>
>>    Still kinda like 'tcsh', it's there in case I get
>>    a brain-worm and wanna fool around with olde-dayz
>>    stuff. Zsh ain't so bad either.
> 
> I don't consider it a good idea to use 'csh' or 'tcsh' for shell
> *programming*. (Browse the web for the well known paper with the
> thoroughly explained rationales.)


   OFTEN not a 'good idea' ... but sometimes "an IDEA", a
   brain-worm that commands you to "do this it tcsh" !  :-)


> I know some folks use and prefer 'tcsh' as interactive shells.
> (Although the Bash, Zsh, or Ksh, are meanwhile quite comfortable
> to use also interactively.)


   Never got TOO far into ZSH ... but it DOES have a lot
   of potential. Don't count it out of the picture.


>>    But, as said, for 'scripting' now, Python is by
>>    far my #1 choice unless the script is like a
>>    simple little ten-liner. Tend to use those on
>>    my PIs.
>>
>>    Fooled around a bit with Lua and Ruby for scripting,
>>    but, really, Python and the MASSIVE number of libs
>>    have them beat. Python will do ANYTHING these days,
>>    just not as fast as 'C'. However CPU speed is less
>>    of a thing these days - I/O ops drag things down
>>    more than the CPU - so Python and 'C' can usually
>>    compete pretty well.
>>
>>    There are Python compilers too. The main issue there
>>    is all the sub-sub-versions of Python, so you always
>>    have to include the entire binaries into each compilation
>>    to ensure it'll work. But then space is also a minor
>>    issue now as well unless you're doing micro-controllers.
>>    Did my share of those - DO teach you how to really SQUEEZE
>>    shit in - all computer kiddies should learn MCs first.
> 
> (I'm not the appropriate person to discuss Python, Lua, Ruby, and
> similar.)

   Experiences vary. Needs vary.

   As said somewhere, I'm not "religious" in any of
   this stuff - shells/langs/distros. Whatever is
   best for The Job. If "Plan-9" or Solaris seem to
   serve best then USE them.

   NOT much use for Winders these days, not at all.
   A code/method CESSPIT full of spyware and worse.

   Bought five of those "mini-boxes", BMax/BeeLink,
   a couple years back when they were cheap. Kinda
   "lower-end laptop" power. However with -IX the
   performance is very good. Kinda a matter of pride
   to not let Winders run for a single millisecond
   before I install an -IX. Did add SATA SSDs to
   three of them (again cheap before the tariff wars).
   These are my home backbone now, do everything I
   want as fast as I need. Even have one as a de-facto
   NAS box with a bunch of USB drives attached.

   (Oh, DON'T disagree with the tariff wars ... were
   kinda NEEDED in my opinion. BAD idea to let China
   Own All). Alas no USA/EU/Taiwan makers seemed to
   step up to the challenge, at least not yet)

   REALLY simple/dedicated uses - and HAVE several -
   just use PIs. Note had a HORRIBLE/useless experience
   with a SUPPOSED SATA hat. Spent a week trying to
   get it to work - NADA ! Still have several PIs
   pretending to be IP cameras and smart displays
   however. P3s work as IP cams fine, P4s are good
   for smart displays of the images, P5s ... um ...
   they're kinda too weird/expensive right now.
   Have one, don't use it for anything.

   (note there are cheap weather-proof boxes that
   will JUST fit a Pi-3 and a mini-board camera.
   Use "motion" for the cam. Have two of those
   running very well right now. Scripts even compensate
   for varying day/night times. Two cams on one mini-box
   also, again the day/night script. Note the PI3s ...
   kept locking up after about a week. Tried the
   simple solution of forcing a reboot, but that
   tended to hang. Clue - force all Python stuff
   to STOP just before the reboot. Now they run
   for months)

   Have two Pi-0/W2 boards. Might fit an even smaller
   waterproof box. Testing. Less power than a Pi3,
   but still MAYBE just enough if you stick to a
   low frame rate.

   "-IX" is just MUCH better and more efficient and
   less trashy than Winders. Have one with "GhostBSD"
   which is a good FreeBSD alt - easier to install
   and a nice GUI.

   Got into -IX a little back in the 386 days,
   remember SCO ?, but the boss decided against
   using it. Maybe smart back then. The goal was
   to write a database and GIS in it. However
   'cheap'/useful/better' ones came out for Winders
   soon. Old commercial -IX systems were EXPENSIVE
   too.

   'AREV' for the database, multi-value. LOVED it !
   Kinda steep learning curve though, DO check
   the 'advanced' shit at the back of the manuals.
   You can STILL buy it, but no support and DOS
   mem lims.

   STILL kinda interested in Solaris/OpenIndiana.
   Unix-LIKE ... SOME interesting aspects and
   NOT Winders at all. More experiments coming.
   The storage set-up IS weird though ... more
   for 'giant' systems. Don't need that now.

   Oh well, went too long/wide again ...
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#245
Author: c186282
Date: Mon, 26 Oct 2026 07:38
112 lines
6300 bytes
On 10/26/26 01:20, Janis Papanagnou wrote:
> On 2026-10-26 05:28, c186282 wrote:
>> On 10/24/26 12:53, Janis Papanagnou wrote:
>>> On 2026-10-24 14:10, Kenny McCormack wrote:
>>>> In article <11bhv61$1bjd2$2@dont-email.me>,
>>>> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>>>>> On 2026-10-24 05:59, c186282 wrote:
>>>>>>
>>>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>>>    nothing hard to get around. Anything you can do in KSH
>>>>>>    can be done in BASH.
>>>>>
>>>>> This is not correct. While Bash has over time adopted quite
>>>>> some features from Ksh - but sadly needed often far too many
>>>>> years for that - there's still a lot substantial functions
>>>>> in Ksh that Bash has not implemented (or substituted by some
>>>>> equivalent feature).
>>>>
>>>> I think you're taking Speedy way too seriously here.  All of your 
>>>> points
>>>> are valid, of course, but it should not be necessary to respond to the
>>>> troll.
>>>
>>> Oh, I didn't knew that he's considered a troll. His post looked just
>>> uninformed, or opinionated, not trollish.
>>
>>    Thanks, I think  :-)
>>
>>    I never 'troll' - just relate MY experiences and what
>>    I've learned from them. I had my own path, own needs,
>>    my own 'environments', starting in the punch-card days.
> 
> (I've still a block of punch-cards in the cellar, so I've got an
> impression where you're coming from.)
> 
>>    But what served ME best may not be what served YOU, what
>>    I learned may not be what YOU learned.

   My first computer was a PDP-11. Great unit.
   But still remember having to submit my card
   stack (DON'T drop it !) to the IT overlords.
   Helped a bit if you offered them 'gifts'.

> Oh, in my previous reply I said something like that; that it's
> fine if it serves you in your private contexts.

   Most everybody has a 'private context'. Doesn't
   matter what you do in 'IT'. Every life experience
   and need is a bit different, takes you down
   different paths. Since the 70s the field was
   SO wide that nobody could do it ALL, keep it
   ALL in mind.

   DID like that newfangled 'C' language for
   the PDPs though  :-)

> A discrepancy might appear when you are working in a larger area
> with rules that are not tailored to your personal likings but to
> experiences from a larger (or another) group of persons.

   Been there.

>>    A great purpose of groups like these is to bring in
>>    a LOT of experiences and perspectives. You MAY find
>>    something compatible/useful in all the diverse advice.
>>    I don't pretend to know-it-all, nothing close (though
>>    a few, well, SAY they do :-)
> 
> Oh, I'm completely fine with that. - If statements are formulated
> as opinions, what else can we do than agree to those or disagree.
> A problem, though, is, when opinions are stated as facts, and if
> statements are even wrong, then they should be corrected. (Or
> clarified if it was just a communication or expression problem.)

   Still a lot of 'religion' involved ... some present
   THE Way ... holy writ. Rarely works for most.

   Yea, there are maybe a few IQ-200 people who post.
   Well, good for them. we need some IQ-200 people.
   However even they have their prejudices and
   preferences that may not serve all. It's the
   tendency for ATTITUDE that most annoys me. Not
   looking for an Ayatollah.

   Ever see that "Sheldon" character from the TV series ?
   HIS way or you get the "retard" label :-)

>>    As said elsewhere, "NEED" eventually supersedes all else.
>>    Earlier on, all the shells maybe started with a narrow
>>    'vision' but HAD to include capabilities the other people
>>    put in. Sometimes the additions were neat/clear, sometimes
>>    not so much, but they're THERE.
>>
>>    A sort of 'functional convergence' due to NEEDS.
>>
>>    Anyway, I reject 'religions' built around shells or
>>    langs and such. For each need, pick the best tools
>>    and approaches. "Best" - sometimes that's what most
>>    harmonizes with YOUR brand of thinking.
> 
> (Unfortunately language topics are often presented with religious
> fervor.)

   Very much noted.

   But, bigger picture, I think that's *wrong*.

   MANY paths to "your solution". Pick the best
   and most compatible. SO many paths to be had
   these days. Be smart and sensible. Simpler
   TENDS to be better long-term.
Re: Back To CS Basics. Fuck AI
#246
Author: c186282
Date: Mon, 26 Oct 2026 07:50
50 lines
3731 bytes
On 10/26/26 01:41, Janis Papanagnou wrote:
> On 2026-10-26 04:59, c186282 wrote:
>> On 10/24/26 07:06, Nuno Silva wrote:
>>> On 2026-10-24, c186282 wrote:
>>>
>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>    nothing hard to get around. Anything you can do in KSH
>>>>    can be done in BASH.
>>>
>>> Now that sounds like something Greg Sullivan of Microsoft would say.
>>
>>    You "can do" most anything in COBOL or FORTRAN or 'C'
>>    in ANY other lang - just as anything in one shell script
>>    you can do in any other. The issue is 'how easily' - and
>>    that depends on your particular application.
> 
> (Be careful; if your argument goes in the direction of "language A
> is Turing-complete so you can use it simulating language B, which
> makes it effectively the same", then that statement would be of no
> practical value!)

   I know I will offend The Religious.

   Fuck 'em.

   Task, BEST solution for YOU. That is The
   Standard so far as I'm concerned.

> I want to give you an example code from a little shell tool I wrote:
> 
>    function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}
> 
> (What this does is that whenever the environment variable 'LINES'
> changes - e.g. if you pick your mouse and resize the X-window - then
> that function gets triggered and the actions defined executed.)
> 
> I'd be interested how you'd implement or emulate that, say, in Bash.

   I'd write it in PYTHON now  :-)

   Some OS.System() and maybe Subprocess calls.
   Leverage the existing simple/low-level utils
   in Linux to your advantage. Run, parse,
   mutate, USE.

   Done a lot of apps that simply grab output
   from those simple Linux utils - then parse
   and trim and mix. Why re-invent the wheel ?
   You CAN - but WHY ???
Re: Back To CS Basics. Fuck AI
#247
Author: Keith Thompson
Date: Mon, 26 Oct 2026 22:16
18 lines
2434 bytes
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
> I want to give you an example code from a little shell tool I wrote:
>
>   function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}
>
> (What this does is that whenever the environment variable 'LINES'
> changes - e.g. if you pick your mouse and resize the X-window - then
> that function gets triggered and the actions defined executed.)
>
> I'd be interested how you'd implement or emulate that, say, in Bash.

I do something similar in bash, but using a different mechanism (so this
isn't a response to your challenge).  I trap on SIGWINCH.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Re: Back To CS Basics. Fuck AI
#248
Author: Janis Papanagnou
Date: Tue, 27 Oct 2026 01:26
54 lines
4317 bytes
On 2026-10-26 23:16, Keith Thompson wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> [...]
>> I want to give you an example code from a little shell tool I wrote:
>>
>>    function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}
>>
>> (What this does is that whenever the environment variable 'LINES'
>> changes - e.g. if you pick your mouse and resize the X-window - then
>> that function gets triggered and the actions defined executed.)
>>
>> I'd be interested how you'd implement or emulate that, say, in Bash.
> 
> I do something similar in bash, but using a different mechanism (so this
> isn't a response to your challenge). 

(It was not so much a challenge but a motivation to think about it.)

> I trap on SIGWINCH.

That's a reasonable alternative for that specific task.

I thought it was an appropriate example because Kornshell's "Discipline
Functions" are of course not only applicable to this specific variable
but to every variable, also user defined.[*] Actually you can associate
such functions, and not only the predefined 'get', 'set', and 'unset',
but also user defined, to any shell variables, existing and introduced.
It was a compact example that stems from a real application not just an
academical one, and it was also compact enough to not get distracted.
It should make it more obvious what simple syntactic features and their
differences in the shells are and where there's a more tight embedding
with the shell mechanisms and features existing. As it was a simple
example to think about I also not really wanted to see a Bash solution,
I know a solution[**] which in the light of that feature I can only call
a workaround, though.

Above sample line contain also another Kornshell specific feature; use
of namespaces. Just BTW. (There's still quite a lot unique features in
Kornshell.)

Janis

[*] It goes further, being able to associate functions to "Types" with
'typeset -T', making code organizations possible that some call "object
oriented".

[**] Actually, there had been a neat idea in the past; Kaz suggested and
developed a shell status line feature for Bash (called "basta"). Since
it was for Bash it had to handle window resizing by another way. I just
adopted the idea of the tool and implemented my version for Kornshell
(called "kosta", to honor the origin of the basic idea) from scratch,
and of course I could make use of such Kornshell-features to simplify
the code.
Re: Back To CS Basics. Fuck AI
#249
Author: Janis Papanagnou
Date: Tue, 27 Oct 2026 01:44
77 lines
4817 bytes
On 2026-10-26 08:50, c186282 wrote:
> On 10/26/26 01:41, Janis Papanagnou wrote:
>> On 2026-10-26 04:59, c186282 wrote:
>>> On 10/24/26 07:06, Nuno Silva wrote:
>>>> On 2026-10-24, c186282 wrote:
>>>>
>>>>>    KSH and BASH are "mostly compatible". Minor diffs but
>>>>>    nothing hard to get around. Anything you can do in KSH
>>>>>    can be done in BASH.
>>>>
>>>> Now that sounds like something Greg Sullivan of Microsoft would say.
>>>
>>>    You "can do" most anything in COBOL or FORTRAN or 'C'
>>>    in ANY other lang - just as anything in one shell script
>>>    you can do in any other. The issue is 'how easily' - and
>>>    that depends on your particular application.
>>
>> (Be careful; if your argument goes in the direction of "language A
>> is Turing-complete so you can use it simulating language B, which
>> makes it effectively the same", then that statement would be of no
>> practical value!)
> 
>    I know I will offend The Religious.
> 
>    Fuck 'em.
> 
>    Task, BEST solution for YOU. That is The
>    Standard so far as I'm concerned.

(Hmm.. - are these comments probably what Kenny previously had meant
when he spoke about trollish behavior. - Beyond that I don't see how
these statements would contribute anything substantial.)

(We seem to also have different interpretations of the meaning of the
word "standard".)

> 
>> I want to give you an example code from a little shell tool I wrote:
>>
>>    function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}
>>
>> (What this does is that whenever the environment variable 'LINES'
>> changes - e.g. if you pick your mouse and resize the X-window - then
>> that function gets triggered and the actions defined executed.)
>>
>> I'd be interested how you'd implement or emulate that, say, in Bash.
> 
>    I'd write it in PYTHON now  :-)

Sure, you said that before that this is (one of) your preference(s).

(Mind that I was making a comment, backed up with an actual example,
to explain why I said your generalizing statements are inappropriate
and even wrong, concerning major features in Ksh vs. Bash.)

> 
>    Some OS.System() and maybe Subprocess calls.
>    Leverage the existing simple/low-level utils
>    in Linux to your advantage. Run, parse,
>    mutate, USE.
> 
>    Done a lot of apps that simply grab output
>    from those simple Linux utils - then parse
>    and trim and mix. Why re-invent the wheel ?
>    You CAN - but WHY ???

Nothing I showed in my sample was "reinventing the wheel". It may not
have become obvious to you by the sample, despite having deliberately
kept it terse and focused. The previous discussions was about features,
simple ones - you basically implied that all features are trivial and
mapable - and ones that are substantially extending the shell language
- where I provided an example for better understanding the differences.

Nevermind.

Janis
Re: Back To CS Basics. Fuck AI
#250
Author: Janis Papanagnou
Date: Tue, 27 Oct 2026 03:42
279 lines
13152 bytes
On 2026-10-26 08:15, c186282 wrote:
> On 10/26/26 01:04, Janis Papanagnou wrote:
>> On 2026-10-26 04:49, c186282 wrote:
>>> On 10/24/26 05:53, Janis Papanagnou wrote:
>>>> On 2026-10-24 05:59, c186282 wrote:
[...]
>>
>> Not sure why you bring up that statement; nobody said anything
>> like that.
> 
>    My following exposition explains why.
> 
> 
>> My statement about the delayed adoption of Ksh features by Bash
>> was just pointing to the fact that Bash users had to wait before
>> they could use comfortable features that Ksh had already provided
>> for (often many) years.
> 
>    Well, good for them.
> 
>    I'll stick to my philosophic "Functional Convergence"
>    theory here. If shell X does something neat-o then it
>    HAS to be incorporated into all others - some way, some
>    how, neat or not.

I can't see how that would match to what had previously been discussed.

First, I think, we should acknowledge a few facts for better valuation.
Kornshell (ksh88) was the base for the POSIX standard (not "standard").
Bash (and Zsh) support that standard. All these three shells extended
their set of features according to the needs and course of evolution.
Zsh made some fundamental additions in some features to tackle inherent
issues in Bourne shell. Ksh and Bash kept Bourne shell's basic syntax.
Ksh extended (and streamlined some) features staying withing Bourne's
syntactical paragon (as far as sensible and possible).

So it came that Ksh featured, for example, things like ${..//../..},
${..:..:..}, ((...)), <(...), "ksh-patterns", and many more features
that Bash (and Zsh) adopted.

Many more features either weren't (yet) adopted, things like 'float'
arithmetic and more basic math functions in $((...)) and ((...)),
namespaces, type system, discipline functions, and whatnot.

I would have hoped that some features would not have been implemented
in Bash by other names, using other built-in command's options, and
that the rest would have converged better and faster; mind that many
of the newer Ksh features have already been available with Ksh in '93.

> 
>> (It's also a bit unfortunate that Bash implemented some features,
>> and some of them IMO unnecessarily, in a slightly different way,
>> so that you cannot easily switch between the two shells.)
>>
>>>
>>>    Different developers ... everyone had their own idea
>>>    of a 'perfect shell' - but then had to adapt and adapt
>>>    again as the Real Needs became more obvious. Now, most
>>>    WILL do the same things - just slightly different syntax.
>>
>> Where not outright wrong, this is very fuzzy. (I don't think it
>> makes sense to comment on that.)
> 
>    I think it makes good sense. Everybody just HAS to
>    somehow incorporate everyone else's good ideas
>    eventually. Otherwise --> TRASH BIN of history.

Maybe, maybe not. - But what strikes me more is that (shell-)languages
might vanish because of other factors; like official maintenance and
support. I think with the predominance of Bash it will likely persist,
but I'm not that sure with Ksh; after official support from AT&T was
dropped we have to rely on those that took over the task today. Since
the Ksh is less widely used (and the maintainers struggling with the
code base, at least as it seems to me) I'm not too optimistic here.

> [snip Csh talk]
> 
>>>    If I want 'scripting' now, I do it with Python. BASH
>>>    or whatever, maybe it just EVOKES the Python scripts,
>>>    a one or two-liner. Wrote many rather long BASH scripts
>>>    in the past, and while they worked they were, well, just
>>>    TOO messy/cryptic.
>>
>> Yes, I share your valuation of shells being somewhat cryptic and
>> also "messy".
> 
>    VERY messy and OFTEN 'cryptic' (unless very short).

*shrug*

My experience here is that you can do a lot to address that, so the
adverbs you use are relative to one's experience and programming
habits.

>    Just no NEED for such shit anymore.
> 
>>>    Last big BASH script I did was for backing up a bunch
>>>    of on-network drives. Mount-checking (important), calls
>>>    to rsync and openSSH and ftp, local AND 'cloud', all
>>>    with some confirmation checks along the way. SEMI-repeating
>>>    units but each was a bit 'special'.
>>
>> Well, that's what their task mostly is, to "glue" together tools,
>> even if that glue is quite powerful (yet still somewhat "messy").
> 
> 
>    But NOT 'comprehensible' a year or two LATER.

As said, as lot is in the hand of the programmer. (You may be doomed
if you want to work on third-party code. But if your own code is that
bad that you can't "decipher" it after a year don't blame the language
alone.)

> [snip Python talk]
> 
>>>    (ALWAYS pre-encrypt before sending to 'cloud' - I do
>>>    NOT trust the providers one bit. Mine had an extension
>>>    that 'suggested' some kind of ZIP, just to help them
>>>    waste time)
>>
>> I suppose you mean here that you encrypt your backups before you
>> store them in the cloud. That's sensible. (I don't store my files
>> or backups in the cloud in the first place.)
> 
>    I very much mean to encrypt the backups BEFORE you
>    send them to 'cloud'.

So I understood correctly, fine.

I maintain my philosophy to not store any of my sensible data in "the
cloud", neither in plain nor in encrypted form. An encryption that is
safe today isn't guaranteed to be safe tomorrow. Since if my data is
accessible by some third party in the cloud _now_ it might get decoded
later; so that's no option for my.

>    Don't put un-encrypted shit
>    on their sites for a millisecond. Do NOT trust them !
>    AES-xxx is good, though sometimes used Camilla.
> 
>    With several langs/FTP you can put a file on 'cloud'
>    and then set the datetime/ownership to whatever the
>    original had. That's how I did it for a decade+ - works
>    very well. Encrypt, upload, then tweak the specifics.
>    Pirates get NOTHING.
> 
>>>    RE-did it in Python. MUCH shorter and more comprehensible
>>>    and a nice easy CSV config file you could tweak in a text
>>>    editor or spreadsheet. Python made it all BETTER.
>>
>> I'm not too surprised that you say that.
> 
>    Do you disagree ???

(In my previous post I wrote that I'm not the appropriate person to
discuss Python.)

I just said that I understand that because you obviously show some,
umm.., enthusiasm here, concerning that specific language.

(I heard and read about Python, I helped debugging a piece of Python
that my child was trying to run, and I draw the conclusion that it's
not worth [for me] to learn and use that language.)

(It certainly appears a lot more "attractive" than the Unix shells.
But enthusiastic comments often disregard other aspects. Standard
environments and tools, company policies, etc., so in your private
system environment you have more options to choose your personally
preferred tools.)

> 
>>>    Had a 'C' version of that backup pgm earlier. Worked
>>>    fine, but there was a lot of string checking/editing
>>>    involved and 'C' is CLUNKY with string shit.
>>
>> Shell has higher abstractions compared to "C".
> 
>    Slightly - but also CLUNKY and hard to understand
>    a year or two later.

(I already commented on that.)

>    Doing serious string stuff in
>    BASH and several others ... nasty !

I'm curious what specifically you mean; can you give examples?

> 
>    Look, if you're 20-something it MAY be possible to
>    hold all the sense/logic of older shit in your head.
>    Believe me - that CHANGES. Too much shit on a
>    small drive, so to speak.

Well, your way of writing programs may differ from mine.

And (given what you wrote) I'm likely about as old as you are;
and I'm certainly not "remembering" what an older program does.
I'm certainly writing my programs in ways that makes it possible
to resume work at a later stage. This is actually not uncommon;
I've done it in various languages, and problems arose primarily
where I ignored (general, or my own) program quality standards.

I mean I've seen bad code in many languages. And I consider it a
basic programming skill to structure code, name entities sensibly,
and comment code, as necessary.

I understand that the shell with its attributes of being somewhat
cryptic you may more easily write "messy" code, and that it needs
experience and more discipline to write maintainable software.[*]

[*] Back in the 1990's when I gave a couple courses in Kornshell
I explicitly emphasized to handle the Shell not as a "scripting
language" but as a _programming language_. (Hope you understand
what I'm trying to say by that.) To apply all the good practices
that you also apply with other non-"scripting"-languages.

> 
>>>    Python
>>>    stole the FORTRAN string-slicing stuff, good deal !
>>
>> Not sure what you are actually referring here to. (Shell has
>> such things as well. Unless you mean something more fancy when
>> you talk about Python or FORTRAN? My memories on FORTRAN are
>> very faint after 40 years when I had last used it.)
> 
>    Um ... check. Almost all the Python string shit
>    was 'borrowed' from FORTRAN. This is a GOOD thing.
>    SO often you have to slice and dice and squish
>    string stuff together in the real world. It'd
>    better be EASY and OBVIOUS or you're doomed.

(I already asked above about any concrete example you have in mind.)

> [snip]
>>>
>>>    Um ... these days, almost all distros, you do have
>>>    to "intentionally install" KSH or any rivals. BASH
>>>    rules by default.
>>
>> Mine has even ksh93u+m. Some years ago I've got original ksh. Yet
>> more years ago I've seen PD-ksh. All in the standard distribution.
>> As said, I've never had to "intentionally install" a Ksh.
> 
>    Umm ... what IS this 'ksh'-defaulting distro ???

Here we spoke not about "defaulting"[*]; here we spoke about
explicitly "intentionally installed" shells.

Over the time I've used several. Around Y2k I had Suse which had a
PD-ksh. Currently I have Xubuntu which comes with ksh93u+m. But of
course you can also make another shell your personal default-shell;
there's really a lot of shells you can choose from (on Linuxes).

[*] Concerning to your term "'ksh'-defaulting" I refer to another
post in this thread who already expanded on that. (I don't want to
engage with you in some terminology-battle, whether that is your
intention or not.)[**]

[**] Concerning "default" shell we already exchanged this:
|
| 24-10-2026, Janis Papanagnou:
| > 2026-10-24, c186282:
| >>    Note however that MOST distros default to BASH now -
| >
| > Yes, Linux often has Bash as its default.
|
and with a seemingly agreed interpretation of "default" we seem to
have said the same, so I don't think there's more to say.

> [snip]
>> [...]
> 
>    Never got TOO far into ZSH ... but it DOES have a lot
>    of potential. Don't count it out of the picture.

(I certainly don't ignore Zsh, I even mentioned it a couple times.)

> [big snip of digressions]
Janis
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#252
Author: Janis Papanagnou
Date: Tue, 27 Oct 2026 04:01
23 lines
2399 bytes
On 2026-10-26 08:38, c186282 wrote:
[...]
>    My first computer was a PDP-11. Great unit.
>    But still remember having to submit my card
>    stack (DON'T drop it !) to the IT overlords.

Corrupted data (if you've dropped it)...

>    Helped a bit if you offered them 'gifts'.

...and corrupted people?

Janis

PS: The nastiest thing I've encountered with the
card deck was that a friend exchanged all my cards
which carried the word 'BEGIN' with cards carrying
the word 'SADAT' - just as a hilarious play with
words WRT two international politicians back then.
Not so funny for me when I noticed all the syntax
errors and had to wait another hour for the next
batch run.
Re: Taking Speedy too seriously (Was: Back To CS Basics. Fuck AI)
#251
Author: c186282
Date: Tue, 27 Oct 2026 16:24
56 lines
3666 bytes
On 10/27/26 00:01, Janis Papanagnou wrote:
> On 2026-10-26 08:38, c186282 wrote:
> [...]
>>    My first computer was a PDP-11. Great unit.
>>    But still remember having to submit my card
>>    stack (DON'T drop it !) to the IT overlords.
> 
> Corrupted data (if you've dropped it)...

   Well, a lot of re-sorting at the very least.

   Punch cards and paper tape WORKED. Clunky and
   low-density but they worked - and were used
   for quite awhile. However putting a COBOL
   corporate accounting system on cards is
   not an attractive prospect.

   I've run into people who remember those
   mag tape towers from old movies and think
   the programs/data was just magically
   uploaded directly to them. Nope, paper
   cards first .....

   Found a PDP-11 emulator for Linux, but it
   just wouldn't be quite the same. MAY be
   some actual working units still out there
   however. Weak unit by today's standards,
   but at the time it was pretty good.

>>    Helped a bit if you offered them 'gifts'.
> 
> ...and corrupted people?

   People are mostly pre-corrupted  :-)

   The SysLord had a serial terminal, but all
   the rest of us had to do cards.

> Janis
> 
> PS: The nastiest thing I've encountered with the
> card deck was that a friend exchanged all my cards
> which carried the word 'BEGIN' with cards carrying
> the word 'SADAT' - just as a hilarious play with
> words WRT two international politicians back then.
> Not so funny for me when I noticed all the syntax
> errors and had to wait another hour for the next
> batch run.

   Admit it, was a CLEVER joke !

   SADAT ... do, but barely, remember it now.

   The dictator, well, things didn't work out so
   well for him :-)
[OT] Punch card times (was Re: Taking Speedy too seriously)
#253
Author: Janis Papanagnou
Date: Wed, 28 Oct 2026 00:12
48 lines
3232 bytes
On 2026-10-27 17:24, c186282 wrote:
> On 10/27/26 00:01, Janis Papanagnou wrote:
> [...]
> 
>    The SysLord had a serial terminal, but all
>    the rest of us had to do cards.

I started with punch cards and switched early to a
terminal.

(Frankly, the cards had an advantage; the terminal
made us stay constantly in front of it; write code,
make some changes/fixes, compile, rinse repeat.
With the cards we spent time beforehand designing
the code, seeing and fixing all errors in one turn.
It turned out to be, WRT net-time, more efficient.
But, OTOH, fixing a punching mistake was more time
consuming; needed a lot discipline and attention.)

> 
>>
>> PS: The nastiest thing I've encountered with the
>> card deck was that a friend exchanged all my cards
>> which carried the word 'BEGIN' with cards carrying
>> the word 'SADAT' - just as a hilarious play with
>> words WRT two international politicians back then.
>> Not so funny for me when I noticed all the syntax
>> errors and had to wait another hour for the next
>> batch run.
> 
>    Admit it, was a CLEVER joke !

(I can't tell you how pissed I was at that moment!)

But, with some distance, it was a marvellous prank.
(That's why I still remember it after 40+ years.)

He was all like that. Sadly he died extremely young.

> 
>    SADAT ... do, but barely, remember it now.

(I do recall his name only because of that joke.)

Janis

> [...]
Re: [OT] Punch card times (was Re: Taking Speedy too seriously)
#255
Author: c186282
Date: Wed, 28 Oct 2026 09:26
88 lines
5291 bytes
On 10/27/26 20:12, Janis Papanagnou wrote:
> On 2026-10-27 17:24, c186282 wrote:
>> On 10/27/26 00:01, Janis Papanagnou wrote:
>> [...]
>>
>>    The SysLord had a serial terminal, but all
>>    the rest of us had to do cards.
> 
> I started with punch cards and switched early to a
> terminal.

   We got terminals, EVENTUALLY. But at the beginning
   it was all punch cards. FORTRAN, COBOL, even that
   neat-o newfangled PDP-11 lang called 'C'.

> (Frankly, the cards had an advantage; the terminal
> made us stay constantly in front of it; write code,
> make some changes/fixes, compile, rinse repeat.
> With the cards we spent time beforehand designing
> the code, seeing and fixing all errors in one turn.
> It turned out to be, WRT net-time, more efficient.
> But, OTOH, fixing a punching mistake was more time
> consuming; needed a lot discipline and attention.)

   I'll say cards imposed a certain "discipline",
   get it right the first time. But, imho, not really
   a "good" solution.

>>>
>>> PS: The nastiest thing I've encountered with the
>>> card deck was that a friend exchanged all my cards
>>> which carried the word 'BEGIN' with cards carrying
>>> the word 'SADAT' - just as a hilarious play with
>>> words WRT two international politicians back then.
>>> Not so funny for me when I noticed all the syntax
>>> errors and had to wait another hour for the next
>>> batch run.
>>
>>    Admit it, was a CLEVER joke !
> 
> (I can't tell you how pissed I was at that moment!)

    Well, I can imagine ... but it WAS a clever joke !

> But, with some distance, it was a marvellous prank.
> (That's why I still remember it after 40+ years.)
> 
> He was all like that. Sadly he died extremely young.

   Some do alas - the more 'boisterous' personalities
   especially. "Candle burning twice as bright" maybe.

>>    SADAT ... do, but barely, remember it now.
> 
> (I do recall his name only because of that joke.)
   Checked a couple hours ago ... barely ANY reference
   to SADAT now ... and then only ABSTRACTS. It was
   a sort of 'structural correctness' tool for FORTRAN.
   Not really 'smart' at all, but it'd find gross
   errors. DID use it ... but it was SO SO long ago.

   Something like "PyCharm" can, sometimes, find
   mis-indented/incomplete bits in Python code.
   But even that IDE isn't as smart as desired.

   None of them can fully grasp What You Intended.
   Haven't even seen AI 'solutions' that are great
   for that. More than once I've put some bit of
   code one indent too far in or out for the
   intended purpose. The debugging CAN be rather
   difficult sometimes. Needs a human mind to
   grasp Where It Went Wrong.

   I miss the old Gen-3 programming IDEs. Not
   too many of them left. Very helpful and
   easy to navigate. Quick debugging and fixes.
   The successors - FAR too complicated and/or
   overly-abstract. Can't even figure out what
   they're saying - much less the problems with
   your code.

   Kinda back to the Olde Days ... "get it right
   the first time".

   Lazarus/FPC and a few others still carry on the
   old Gen-3 tradition. Love 'em. Shortest path
   to success.
Re: [OT] Punch card times (was Re: Taking Speedy too seriously)
#254
Author: Josef Möllers
Date: Wed, 28 Oct 2026 16:01
63 lines
3591 bytes
On 28.10.26 01:12, Janis Papanagnou wrote:
> On 2026-10-27 17:24, c186282 wrote:
>> On 10/27/26 00:01, Janis Papanagnou wrote:
>> [...]
>>
>>    The SysLord had a serial terminal, but all
>>    the rest of us had to do cards.
> 
> I started with punch cards and switched early to a
> terminal.

Ah ... yes ... The Olde Times ;-)
I started studying CS in 1977 (after two years trying my luck at EE). 
Indeed, we too had to use punched cards in the beginning.

> (Frankly, the cards had an advantage; the terminal
> made us stay constantly in front of it; write code,
> make some changes/fixes, compile, rinse repeat.
> With the cards we spent time beforehand designing
> the code, seeing and fixing all errors in one turn.
> It turned out to be, WRT net-time, more efficient.
> But, OTOH, fixing a punching mistake was more time
> consuming; needed a lot discipline and attention.)

100% +1! Think twice before punching.

I had been told once that IBM developers did not have a compiler or such 
at their disposal but only a text editor, so they, too, had to think 
twice before committing their code.

> 
>>
>>>
>>> PS: The nastiest thing I've encountered with the
>>> card deck was that a friend exchanged all my cards
>>> which carried the word 'BEGIN' with cards carrying
>>> the word 'SADAT' - just as a hilarious play with
>>> words WRT two international politicians back then.
>>> Not so funny for me when I noticed all the syntax
>>> errors and had to wait another hour for the next
>>> batch run.
>>
>>    Admit it, was a CLEVER joke !
> 
> (I can't tell you how pissed I was at that moment!)
> 
> But, with some distance, it was a marvellous prank.
> (That's why I still remember it after 40+ years.)
> 
> He was all like that. Sadly he died extremely young.
> 
>>
>>    SADAT ... do, but barely, remember it now.
> 
> (I do recall his name only because of that joke.)

This is SOOO funny! At that time I myself had put a note on the wall 
stating that with the developments then the keyword BEGIN should be 
replaced by SADAT.

I'm 70 now, retired 4 years ago.

Josef
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#201
Author: Johann 'Myrkraverk' Oskarsson
Date: Fri, 06 Nov 2026 22:25
45 lines
3815 bytes
On 11/7/2026 4:51 AM, Charlie Gibbs wrote:
> On 2026-11-06, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
> 
>> And here’s another tale: this was probably from the very earliest days
>> of computers, but the story I remember reading involves users entering
>> a query, and how long it took to get back a response. Apparently, if
>> the response came back *too* quickly, the users felt that the computer
>> somehow wasn’t treating their question with the importance it
>> deserved.
> 
> I wrote a program that searches a large collection of files for
> various data.  I noticed the same thing: it ran so fast that
> people weren't taking it seriously.  It didn't help that the
> search parameter screen was too easy to use, either.
> 
> I guess that in this modern age, where complexity is equated
> with sophistication, any sign of simplicity or efficiency
> is suspect.
> 

I think it's more /instinctual/ than that.  Humans, who dismiss sugges-
tions without thought, normally do so as a status symbol: they are more
important than you.

It isn't about the idea or suggestion being stupid, because then there
would be a followup explanation.

Follow those experiences up with people who do shoddy work fast, and if
the computer is fast too, it /didn't take the time to do things proper-
ly/.

The machine, as a servant, should never /feel/ more important than the
user.  Which unfortunately, seems to be more and more real in the age of
"A.I." as business owners tend to prefer people who can crank out
prompts rather than do the work /by hand/.  The /machine/ is now more
important than the employee who wields it.  Anyway, that's a rant we
don't need in alt.folklore.computers.


Best wishes, and happy search algorithms!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#202
Author: Janis Papanagnou
Date: Sat, 07 Nov 2026 04:00
15 lines
2549 bytes
On 2026-11-07 02:22, Charlie Gibbs wrote:
> 
> I've heard that car manufacturers put padding into the doors
> to give a satisfying thump rather than a clank.

Unless the various sounds in cars are created artificially!

(Not joking. - Inspect the automotive business job offers,
specifically sound designers and sound engineers, and also
inspect the information on the Net about where artificial
sound is actually synthesized and applied to, including the
doors.)

Janis
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#204
Author: c186282
Date: Sat, 07 Nov 2026 04:09
28 lines
3152 bytes
On 11/6/26 01:35, Thomas Koenig wrote:
> The Natural Philosopher <tnp@invalid.invalid> schrieb:
> 
>> IBM Macro  assembler is practically a high level language, given the
>> scale of macro usage in legacy systems
> 
> High-level languages abstract away the underlying machine, which
> I presume the Macro assembler does not.
> 
> Plus, does it do register allocation?
> 
> (OK, then Wirth's PL/360 creeps in, which does not do so either,
> but then I would argue that that is a glorified assembler - it also
> does not do operator precenence).

   I will agree that MASM isn't a good equiv to
   any higher-level language. Used it a fair bit
   in the bad old days, but never to its max cap.
   Served my particular needs however, back when
   ASM was the only way to get tight code with
   lowest-level access. 'C' eventually assumed
   that role for the most part, but not overnight.

   ASM was also *the* way for the older micro-controllers
   for a long time. However some of the optimized 'C'
   compilers can now rival ASM for speed and size and
   you don't have to hand-code bit-banging serial either :-)
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#203
Author: Charlie Gibbs
Date: Sat, 07 Nov 2026 04:12
23 lines
2485 bytes
On 2026-11-07, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:

> On 2026-11-07 02:22, Charlie Gibbs wrote:
> 
>> I've heard that car manufacturers put padding into the doors
>> to give a satisfying thump rather than a clank.
>
> Unless the various sounds in cars are created artificially!
>
> (Not joking. - Inspect the automotive business job offers,
> specifically sound designers and sound engineers, and also
> inspect the information on the Net about where artificial
> sound is actually synthesized and applied to, including the
> doors.)

I did read recently that they have staffers charged with
designing the weird noises electric cars make at low speeds.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#206
Author: Janis Papanagnou
Date: Sat, 07 Nov 2026 04:39
30 lines
3269 bytes
On 2026-11-07 05:12, Charlie Gibbs wrote:
> On 2026-11-07, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> 
>> On 2026-11-07 02:22, Charlie Gibbs wrote:
>>
>>> I've heard that car manufacturers put padding into the doors
>>> to give a satisfying thump rather than a clank.
>>
>> Unless the various sounds in cars are created artificially!
>>
>> (Not joking. - Inspect the automotive business job offers,
>> specifically sound designers and sound engineers, and also
>> inspect the information on the Net about where artificial
>> sound is actually synthesized and applied to, including the
>> doors.)
> 
> I did read recently that they have staffers charged with
> designing the weird noises electric cars make at low speeds.

Yes, that is one application case. Actually its a requirement
that is even demanded by regulations hereabouts!

But then there's also other things, like the mentioned door
sounds, the voluminous sound of the engine, noise reduction
(adding noise here and reducing it there; somewhat crazy!),
feedback sounds (with Star Trek as general paragon :-), and
some gimmicks.

Janis
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#205
Author: The Natural Philosopher
Date: Sat, 07 Nov 2026 11:32
25 lines
2513 bytes
On 06/11/2026 15:45, Scott Lurndal wrote:
> The Natural Philosopher <tnp@invalid.invalid> writes:
>> On 04/11/2026 14:54, Peter Flass wrote:
>>> On 11/3/26 15:15, Pancho wrote:
>>>>
>>>> If you want heavy usage, I would guess bank risk calcs, weather calcs,
>>>> lots of science applications, running on compute grids, (or whatever
>>>> the modern word is), blow this mainframe high i/o away.
>>>
>>> I think back in the day the quants preferred Sun.
>>>
>> Not for transactuon processing
> 
> You clearly don't know what a "quant" is, in this context.

I do.

More than you, probably

-- 
If I had all the money I've spent on drink...
..I'd spend it on drink.

Sir Henry (at Rawlinson's End)
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#207
Author: The Natural Philosopher
Date: Sat, 07 Nov 2026 11:37
15 lines
2526 bytes
On 07/11/2026 04:12, Charlie Gibbs wrote:
> I did read recently that they have staffers charged with
> designing the weird noises electric cars make at low speeds.

My StupidPhone yelps like a puppy that has just been stepped on, on 
receipt of a text message.

People look for the dog...



-- 
Karl Marx said religion is the opium of the people.
But Marxism is the crack cocaine.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#208
Author: The Natural Philosopher
Date: Sat, 07 Nov 2026 11:45
30 lines
3170 bytes
On 07/11/2026 04:09, c186282 wrote:
> ASM was also *the* way for the older micro-controllers
>    for a long time. However some of the optimized 'C'
>    compilers can now rival ASM for speed and size and
>    you don't have to hand-code bit-banging serial either

At some point I idly compiled some gcc C to assembler . I spent a 
pointless half hour trying to work out if I could have done it better.

I couldn't..

In terms of modern micros I wouldn't even bother unless I couldn't do it 
in 'C'.



-- 
“it should be clear by now to everyone that activist environmentalism 
(or environmental activism) is becoming a general ideology about humans, 
about their freedom, about the relationship between the individual and 
the state, and about the manipulation of people under the guise of a 
'noble' idea. It is not an honest pursuit of 'sustainable development,' 
a matter of elementary environmental protection, or a search for 
rational mechanisms designed to achieve a healthy environment. Yet 
things do occur that make you shake your head and remind yourself that 
you live neither in Joseph Stalin’s Communist era, nor in the Orwellian 
utopia of 1984.”

Vaclav Klaus
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#209
Author: Peter Flass
Date: Sat, 07 Nov 2026 14:37
21 lines
2817 bytes
On 11/7/26 04:45, The Natural Philosopher wrote:
> On 07/11/2026 04:09, c186282 wrote:
>> ASM was also *the* way for the older micro-controllers
>>    for a long time. However some of the optimized 'C'
>>    compilers can now rival ASM for speed and size and
>>    you don't have to hand-code bit-banging serial either
> 
> At some point I idly compiled some gcc C to assembler . I spent a 
> pointless half hour trying to work out if I could have done it better.
> 
> I couldn't..
> 
> In terms of modern micros I wouldn't even bother unless I couldn't do it 
> in 'C'.
> 

But then you add all the cruft that GCC drags in and you're back where 
you started (size-wise, at least). When PCs were new I used a compiler 
called "Aztec C" that had almost no overhead in excess libraries, 
start-up code, etc., unless you asked for them.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#210
Author: Johann 'Myrkraverk' Oskarsson
Date: Sat, 07 Nov 2026 14:49
36 lines
3456 bytes
On 11/7/2026 10:37 PM, Peter Flass wrote:
> On 11/7/26 04:45, The Natural Philosopher wrote:
>> On 07/11/2026 04:09, c186282 wrote:
>>> ASM was also *the* way for the older micro-controllers
>>>    for a long time. However some of the optimized 'C'
>>>    compilers can now rival ASM for speed and size and
>>>    you don't have to hand-code bit-banging serial either
>>
>> At some point I idly compiled some gcc C to assembler . I spent a 
>> pointless half hour trying to work out if I could have done it better.
>>
>> I couldn't..
>>
>> In terms of modern micros I wouldn't even bother unless I couldn't do 
>> it in 'C'.
>>
> 
> But then you add all the cruft that GCC drags in and you're back where 
> you started (size-wise, at least). When PCs were new I used a compiler 
> called "Aztec C" that had almost no overhead in excess libraries, start- 
> up code, etc., unless you asked for them.

And nonconsensual AVX code.  I've heard some CPUs have a lower maximum
Hz when AVX is enabled.  And I have never heard of a benchmark that mea-
sures the cutoff when doing things the old fashioned way, say REP MOVSB
is faster or slower than the AVX method(s), due to this difference.

So, why not tell me this cutoff?  Are the GCC devs afraid of something?
Shouldn't they be proud of their optimizations?

Or was I lied to, about modern CPUs stepping down when AVX is in play?
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#211
Author: Thomas Koenig
Date: Sat, 07 Nov 2026 14:54
37 lines
3325 bytes
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> schrieb:
> On 11/7/2026 10:37 PM, Peter Flass wrote:
>> On 11/7/26 04:45, The Natural Philosopher wrote:
>>> On 07/11/2026 04:09, c186282 wrote:
>>>> ASM was also *the* way for the older micro-controllers
>>>>    for a long time. However some of the optimized 'C'
>>>>    compilers can now rival ASM for speed and size and
>>>>    you don't have to hand-code bit-banging serial either
>>>
>>> At some point I idly compiled some gcc C to assembler . I spent a 
>>> pointless half hour trying to work out if I could have done it better.
>>>
>>> I couldn't..
>>>
>>> In terms of modern micros I wouldn't even bother unless I couldn't do 
>>> it in 'C'.
>>>
>> 
>> But then you add all the cruft that GCC drags in and you're back where 
>> you started (size-wise, at least). When PCs were new I used a compiler 
>> called "Aztec C" that had almost no overhead in excess libraries, start- 
>> up code, etc., unless you asked for them.
>
> And nonconsensual AVX code.

-fno-tree-optimize is your friend.

> I've heard some CPUs have a lower maximum
> Hz when AVX is enabled.

AVX512, yes.


-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#212
Author: c186282
Date: Sat, 07 Nov 2026 18:31
47 lines
3919 bytes
On 11/7/26 09:37, Peter Flass wrote:
> On 11/7/26 04:45, The Natural Philosopher wrote:
>> On 07/11/2026 04:09, c186282 wrote:
>>> ASM was also *the* way for the older micro-controllers
>>>    for a long time. However some of the optimized 'C'
>>>    compilers can now rival ASM for speed and size and
>>>    you don't have to hand-code bit-banging serial either
>>
>> At some point I idly compiled some gcc C to assembler . I spent a 
>> pointless half hour trying to work out if I could have done it better.
>>
>> I couldn't..
>>
>> In terms of modern micros I wouldn't even bother unless I couldn't do 
>> it in 'C'.
>>
> 
> But then you add all the cruft that GCC drags in and you're back where 
> you started (size-wise, at least). When PCs were new I used a compiler 
> called "Aztec C" that had almost no overhead in excess libraries, start- 
> up code, etc., unless you asked for them.

   Used Aztec ... indeed HAVE the compiler and EXTENSIVE
   docs stashed away somewhere. Will have to make a new
   CP/M-86 VM for it first. Not sure you'd get best effect
   on a simulated Z80. Have seen some 'kit' Z80 boards.

   There's also a DOS version - but it's apparently meant
   to run under XP.

   The docs are IMPRESSIVE - endless bit-level and flag
   stuff - exactly what you needed to know if trying to
   shoehorn something into a small system.

   A few versions of Turbo Pascal allowed code overlays
   in a fairly civil fashion, another way to squeeze a
   big pgm into a small machine. But, better have a HDD,
   pulling overlays from a floppy - you don't wanna
   go there :-) Did a couple of large pgms where overlays
   were needed.

   Anyway, if interested in Aztec, try :

https://www.aztecmuseum.ca/compilers.htm


Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#213
Author: Johann 'Myrkraverk' Oskarsson
Date: Sat, 07 Nov 2026 18:56
57 lines
4269 bytes
On 11/8/2026 2:31 AM, c186282 wrote:
> On 11/7/26 09:37, Peter Flass wrote:
>> On 11/7/26 04:45, The Natural Philosopher wrote:
>>> On 07/11/2026 04:09, c186282 wrote:
>>>> ASM was also *the* way for the older micro-controllers
>>>>    for a long time. However some of the optimized 'C'
>>>>    compilers can now rival ASM for speed and size and
>>>>    you don't have to hand-code bit-banging serial either
>>>
>>> At some point I idly compiled some gcc C to assembler . I spent a 
>>> pointless half hour trying to work out if I could have done it better.
>>>
>>> I couldn't..
>>>
>>> In terms of modern micros I wouldn't even bother unless I couldn't do 
>>> it in 'C'.
>>>
>>
>> But then you add all the cruft that GCC drags in and you're back where 
>> you started (size-wise, at least). When PCs were new I used a compiler 
>> called "Aztec C" that had almost no overhead in excess libraries, 
>> start- up code, etc., unless you asked for them.
> 
>    Used Aztec ... indeed HAVE the compiler and EXTENSIVE
>    docs stashed away somewhere. Will have to make a new
>    CP/M-86 VM for it first. Not sure you'd get best effect
>    on a simulated Z80. Have seen some 'kit' Z80 boards.
> 
>    There's also a DOS version - but it's apparently meant
>    to run under XP.
> 
>    The docs are IMPRESSIVE - endless bit-level and flag
>    stuff - exactly what you needed to know if trying to
>    shoehorn something into a small system.
> 
>    A few versions of Turbo Pascal allowed code overlays
>    in a fairly civil fashion, another way to squeeze a
>    big pgm into a small machine. But, better have a HDD,
>    pulling overlays from a floppy - you don't wanna
>    go there :-) Did a couple of large pgms where overlays
>    were needed.
> 
>    Anyway, if interested in Aztec, try :
> 
> https://www.aztecmuseum.ca/compilers.htm

Thank you.  It's mildly unclear if the compiler will run under pure DOS,
and this XP package is merely a convenience -- alas I was not in the
mood to find out.

However, I am perusing the manual library, to see if I find something
interesting.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#214
Author: Lawrence D’Oliveiro
Date: Sat, 07 Nov 2026 20:03
13 lines
2508 bytes
On Sat, 7 Nov 2026 07:37:39 -0700, Peter Flass wrote:

> But then you add all the cruft that GCC drags in ...

You can build programs with GCC that don’t use glibc.

Back when I got my first 64-bit machine, I tried to build the smallest
program I could: it took a number as a command-line argument, and
slept for that number of seconds. This gave me time to do a ps listing
to see how much memory it was using. I built it against one of the
alternative cut-down libc alternatives -- maybe musl or uclibc.

ps reported that it was using just 20kB of memory.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#215
Author: The Natural Philosopher
Date: Sat, 07 Nov 2026 21:53
33 lines
3043 bytes
On 07/11/2026 14:37, Peter Flass wrote:
> On 11/7/26 04:45, The Natural Philosopher wrote:
>> On 07/11/2026 04:09, c186282 wrote:
>>> ASM was also *the* way for the older micro-controllers
>>>    for a long time. However some of the optimized 'C'
>>>    compilers can now rival ASM for speed and size and
>>>    you don't have to hand-code bit-banging serial either
>>
>> At some point I idly compiled some gcc C to assembler . I spent a 
>> pointless half hour trying to work out if I could have done it better.
>>
>> I couldn't..
>>
>> In terms of modern micros I wouldn't even bother unless I couldn't do 
>> it in 'C'.
>>
> 
> But then you add all the cruft that GCC drags in and you're back where 
> you started (size-wise, at least).
Hardly.


> When PCs were new I used a compiler 
> called "Aztec C" that had almost no overhead in excess libraries, 
> start-up code, etc., unless you asked for them.
> 
Well in general you DO ask for them



-- 
Climate Change: Socialism wearing a lab coat.
Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#217
Author: rbowman
Date: Sun, 08 Nov 2026 01:23
36 lines
2867 bytes
On Sat, 7 Nov 2026 21:53:26 +0000, The Natural Philosopher wrote:

> On 07/11/2026 14:37, Peter Flass wrote:
>> On 11/7/26 04:45, The Natural Philosopher wrote:
>>> On 07/11/2026 04:09, c186282 wrote:
>>>> ASM was also *the* way for the older micro-controllers
>>>>    for a long time. However some of the optimized 'C' compilers can
>>>>    now rival ASM for speed and size and you don't have to hand-code
>>>>    bit-banging serial either
>>>
>>> At some point I idly compiled some gcc C to assembler . I spent a
>>> pointless half hour trying to work out if I could have done it better.
>>>
>>> I couldn't..
>>>
>>> In terms of modern micros I wouldn't even bother unless I couldn't do
>>> it in 'C'.
>>>
>>>
>> But then you add all the cruft that GCC drags in and you're back where
>> you started (size-wise, at least).
> Hardly.
> 
> 
>> When PCs were new I used a compiler called "Aztec C" that had almost no
>> overhead in excess libraries, start-up code, etc., unless you asked for
>> them.
>> 
> Well in general you DO ask for them

I fixed a 20 year old bug that was caused by the programmer deciding 
adding '-lm' to the compilation would be too heavy. iirc his version of 
hypot() worked most of the time.


Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
#216
Author: Lynn Wheeler
Date: Sun, 08 Nov 2026 02:04
98 lines
6467 bytes
c186282 <c186282@nnada.net> writes:
>   The 'mainframe' era is nearly over - to be replaced
>   by cluster/distributed/AI.
>
>   However IBM is already into all that, WILL make money.
>
>   Many baskets ... How To Survive/Thrive.
>
>   Hmmmm ... do remember when IBM was "typewriters" ...

1988, Nick Donofrio approves HA/6000, originally for NYTimes to move
their newspaper system ("ATEX") off DEC VAXCluster to RS/6000 (running
project out at Los Gatos lab). I rename it HA/CMP
https://en.wikipedia.org/wiki/IBM_High_Availability_Cluster_Multiprocessing
when I start doing technical/scientific cluster scale-up with national
labs (LANL, LLNL, NCAR, etc) and commercial cluster scale-up with RDBMS
vendors (Oracle, Sybase, Ingres, Informix) with VAXCluster support in
same source base with UNIX (planning on using Hursley 9333 for mid-range
and full FCS for both technical and commercial scaleup). DB2 was still
all mainframe source, IBM non-mainframe "DB2" had yet to be developed.

IBM S/88 (relogo'ed Stratus) Product Administrator started taking us
around to their customers and also had me write a section for the
corporate continuous availability strategy document (it gets pulled when
both AS400/Rochester and mainframe/POK complain they couldn't meet
requirements).  Had coined "disaster survivability" and "geographic
survivability" (as counter to disaster/recovery) when out marketing
HA/CMP.

One of the first HA/CMP customer installs was new Indian Reservation
Casino in Connecticut, was suppose to have week of testing before
opening ... but after 24hrs, they decided to open the doors (based on
projected revenue; at the time was largest in the US, still one of the
largest in the country)
https://en.wikipedia.org/wiki/Foxwoods_Resort_Casino#Debt_default

Early Jan92, there was HA/CMP meeting with Oracle CEO and IBM/AWD
executive Hester tells Ellison that we would have 16-system clusters by
mid92 and 128-system clusters by ye92. Mid-jan92, I update FSD on HA/CMP
work with national labs and FSD decides to go with HA/CMP for federal
supercomputers. By end of Jan, we are told that cluster scale-up is
being transferred to Kingston for announce as IBM Supercomputer (SP,
technical/scientific *ONLY*) and we aren't allowed to work with anything
that has more than four systems (we leave IBM a few months later). A
couple weeks later, 17feb1992, Computerworld news ... IBM establishes
laboratory to develop parallel systems (pg8)
https://archive.org/details/sim_computerworld_1992-02-17_26_7

Some speculation that HA/CMP would have eaten the mainframe in the
commercial market. 1993 industry benchmarks (number of program
iterations compared to the industry MIPS/BIPS reference platform):

ES/9000-982 : 8CPU 408MIPS, (51MIPS/CPU)
RS6000/990 (RIOS chipset) : 1-CPU: 126MIPS

Executive we had reported to, goes over to head up Somerset/AIM (Apple,
IBM, Motorola) to do single chip 801/RISC (Power/PC) and uses Motorola
88k bus/cache enabling SMP implementations.

In the mid-90s, the i86 chip makers then do hardware layer that
translates i86 instructions into RISC micro-ops for actual execution,
largely negating the performance difference with RISC platforms. 1999
industry benchmarks:
IBM PowerPC 440: 1,000MIPS
Intel Pentium3 2,054MIPS

Dec2000 (IBM mainframe) benchmark:
IBM z900 16CPU: 2.5BIPS, 156MIPS/CPU 

Also 1988, IBM branch office asked if I could help LLNL (national lab)
standardize some serial stuff they were working with ... which quickly
becomes Fibre Channel Standard ("FCS", including some stuff I had done
in 1980; initially planning on using 1gbit transfer, full-duplex,
aggregate transfer 200mbytes/sec & 64-port non-blocking switches, with
high-end HA/CMP installations). POK mainframe eventually announces its
serial stuff (when it is already obsolete) as "ESCON" (initially
10mbytes/sec). Some POK engineers then become involved with FCS and
define a heavy weight protocol that radically cuts the native
throughput, eventually announced as FICON.

Latest public benchmark I've found is 2010 z196 "Peak I/O" getting 2M
IOPS using 104 FICON (20K IOPS/FICON). About the same time a native FCS
is announced for E5-2600 server blades getting over million IOPS (two
such FCS higher throughput than 104 FICON running over FCS). Note IBM
docs has SAPs (system assist processors that do actual I/O) CPU be kept
to 70% ... or 1.5M IOPS ... also no CKD DASD have been made for decades
(just simulated with industry standard fixed-block devices).

This "Evolution of the System z Channel" (SHARE 2011 presentation at
wayback machine)
https://web.archive.org/web/20170829213251/https://share.confex.com/share/117/webprogram/Handout/Session9931/9934pdhj%20v0.pdf
talks about after 2010 z196 "Peak I/O" benchmark and "zHPF" that
increased throughput from 20K IOPS/FICON to 52K IOPS/FICON then to 92K
IOPS/FICON (aka from 1/50th to almost 1/10th the native FCS announced in
2010).

-- 
virtualization experience starting Jan1968, online at home since Mar1970
Page 5 of 8 • 384 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads