origins: bash

If it doesn't relate to Debian, but you still want to share it, please do it here

origins: bash

Postby sickpig » 2020-10-29 18:06

With interviews from bash creator and the background story of what led to its creation. Made my yesterday's commute enjoyable. Thought you might like it too. The podcast link is https://www.redhat.com/en/command-line-heroes/season-3/heroes-in-a-bash-shell

Enjoy!
User avatar
sickpig
 
Posts: 589
Joined: 2019-01-23 10:34

Re: origins: bash

Postby LE_746F6D617A7A69 » 2020-10-29 20:04

I tried to listen this podcast, but that web site is polluted with tons of links to external sites - like f.e. akamai, known as the primary spying company working closely with Microshit - this is a show-stopper for me, sorry.
It's interesting how it's is possible that RedHat is now collaborating with them - but I just don't give a shit about RedHat, and I'm not going to take the risk of infecting my system (nor even if it's just collecting the browser stats)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: origins: bash

Postby sickpig » 2020-10-29 22:23

I don't visit the website at all. I have an rss feed for this podcast wherein I get a nice download link to directly download the audio file. The podcast also in brief describes arguments between Brian Fox the bash creater and the guy who created the Korn shell. Its interesting.

Here is a direct download link
https://dts.podtrac.com/redirect.mp3/cdn.simplecast.com/audio/a88fbe/a88fbe81-5614-4834-8a78-24c287debbe6/1a66178b-d531-4b54-b217-6c0db423325c/clh_s3_ep6_heroes_in_a_bash_shell_vfinal_tc.mp3

edit - added the direct download link
User avatar
sickpig
 
Posts: 589
Joined: 2019-01-23 10:34

Re: origins: bash

Postby LE_746F6D617A7A69 » 2020-10-31 12:06

Thanks for the link.

I've almost fell off my chair laughing when Brian told that bash started to delete its own source code during testing of globbing ... :lol:
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: origins: bash

Postby sickpig » 2020-11-01 01:20

Glad you liked it. I think it must be frustrating for Brian when the code got deleted but he took it sportingly.
User avatar
sickpig
 
Posts: 589
Joined: 2019-01-23 10:34

Re: origins: bash

Postby yeti » 2020-11-03 08:17

So early BASH even had garbage collection!   \o/
"I have a natural instinct for science" — DJ Trump.
"Vrijdag voor VT100!" — Yeti.
"There is no PLANET-B!" — ???
User avatar
yeti
 
Posts: 68
Joined: 2009-03-30 14:22

Re: origins: bash

Postby LE_746F6D617A7A69 » 2020-11-03 22:16

yeti wrote:So early BASH even had garbage collection! \o/
:lol:

Interpreters are slow, and script interpreters are even slower.
Despite the official claim from the manual:
BUGS:
It's too big and too slow.
The bash is actually quite fast - the thing is that 99% of the bash scripts are *not using bash* -> most of the scripts are polluted with calls to awk or grep (f.e.) which in most cases are suboptimal solutions -> in most cases such calls can be replaced with bash built-in commands which are very fast (as for script interpreter).

Don't blame bash for laziness of the users (but on the other hand the bash manual is not very friendly...)

... and of course HOAS will completely disagree with my opinion ;)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: origins: bash

Postby sickpig » 2020-11-04 01:05

LE_746F6D617A7A69 wrote:... and of course HOAS will completely disagree with my opinion ;)

Yes we can bet on it :)
User avatar
sickpig
 
Posts: 589
Joined: 2019-01-23 10:34

Re: origins: bash

Postby Head_on_a_Stick » 2020-11-04 17:52

LE_746F6D617A7A69 wrote:HOAS will completely disagree with my opinion

Well yes, but only because you're wrong :mrgreen:

Let's be clear here: shell scripting in general is absolutely awful and should only be used for the most basic of tasks with the scripts kept as short and simple as possible to avoid all of the atrocious bugs. So any scripts that "need" the "advanced" features offered by bashisms should almost certainly be re-written in another language (ie, perl, Go, C, etc) and any that don't need bashisms should use dash instead because it's quicker, lighter and less buggy. That's why the Debian developers made such an effort to change all of the system scripts from bash to dash :wink:

[/off-topic]
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12756
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: origins: bash

Postby LE_746F6D617A7A69 » 2020-11-04 21:51

Shell scripts are a perfect tool for automating various tasks - basically their purpose is to "replay" the commands which otherwise would need to be typed by hand on the console.
None of other languages is prepared or designed for such task, f.e. in c You would need to write at least 100 times more lines of code to achieve the same functionality as in shell script. Of course, such c program would be 1000000 times faster, but this is not important if its purpose would be to just invoke other programs in some defined order. This is especially true in case when the execution time of such invoked programs is much longer than the time needed to execute the script.

When the complexity of the tasks have increased, it quickly showed up that shells are expected to have the ability to perform basic computations, to take decisions based on some non-trivial conditions, etc -> this have caused that shell script languages became in fact fully Turing-complete, and it's possible to write just *any* program using only a shell scripting language.

While bash is definitely far from perfection, and the syntax is very ugly in some cases, it's the most advanced shell script interpreter in the world - f.e. it allows to implement object-oriented programming methods and it has full support for handling signals from the kernel (like f.e. the SIGSEGV)

Although there are many people who dislike it, bash is pre-installed on practically every system in the world today, unlike Korn's ksh - which is a great shell, but not that great ;)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: origins: bash

Postby Head_on_a_Stick » 2020-11-05 17:32

LE_746F6D617A7A69 wrote:it's the most advanced shell script interpreter in the world

What about zsh?

LE_746F6D617A7A69 wrote:bash is pre-installed on practically every system in the world today, unlike Korn's ksh - which is a great shell, but not that great

Bash isn't pre-installed in Android, they use the MirBSD Korn Shell instead because it's faster, lighter and less buggy :)
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12756
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: origins: bash

Postby LE_746F6D617A7A69 » 2020-11-05 22:12

Head_on_a_Stick wrote:What about zsh?
Hah! You have just killed me - I was never interested in zsh - simply I don't know it.
Anyway, I need bash for practical reasons - f.e. in my wxEDID project ;) (src/returncode/rcd_autogen bash script)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16


Return to Offtopic

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable