
“Use Dumb Shell, Don’t Reinvent the Wheel” - ilyash
https://ilya-sher.org/2020/01/04/use-dumb-shell-dont-reinvent-the-wheel/
======
znpy
meh.

the pattern I see is people not learning enough bash to use it properly and
then complaining about it.

nothing new under the sun.

I just saw the demo at
[https://www.youtube.com/watch?v=T5Bpu4thVNo](https://www.youtube.com/watch?v=T5Bpu4thVNo)
... I guess time has come for us to launch scripts inside headless google
chrome windows? /s

on a more serious note... thanks but no thanks.

Bash is more than fine. I've said this over and over and I'll say it again:
shell scripting is software writing. You can't expect to get correct behavior
without understanding your tools and your shell. You can't expect not to do
error-checking and corner-case-checking and still have stuff working 100% of
the time.

I don't like to be rude, but: if you don't do error-checking and blame it on
bash when stuff goes down then you deserve what you get.

\----

One could blame it on programs: a shell language is a glue language to chain
commands together and to evaluate simple conditions to choose the next step:
if existing programs and new programs do not behave consistently, and you have
to resort to do weirder and weirder bash kung-fu, can you really blame it on
bash?

~~~
ilyash
> not learning enough bash to use it properly and then complaining about it

By the same logic, whoever prefers C over assembler, Python over C, etc just
doesn't understand the latter language enough. I think this logic is flawed.

> google chrome windows

I wouldn't accept a shell that works only in a browser. If you would take a
minute to actually look at [https://github.com/ngs-lang/ngs/wiki/UI-
Design](https://github.com/ngs-lang/ngs/wiki/UI-Design) , it reads: "Ability
to support several i/o modules", with sub-items "Console module" and "Later:
web module"

> Bash is more than fine.

Depends on the situation and task at hand. For me, most of the time, bash is
not fine. I do have a bunch of bash scripts because for their task they are
the best solution in my opinion... and that's what makes me sad. That is not
fine.

> You can't expect to get correct behavior without understanding your tools
> and your shell.

By that logic, whoever complains about any flaws in a language (error handling
and missing generics in Go come to mind) just doesn't understand the language.
I think this logic is flawed.

> You can't expect not to do error-checking and corner-case-checking and still
> have stuff working 100% of the time.

I don't. That's bash and that is how it works... and I don't like it.

Looking at two alternatives: exceptions vs error codes checking. I strongly
disagree with error codes checking approach. I do prefer (in most of my
scripts) uncaught exceptions (which would terminate the script) and smaller
code. The alternative with error codes checking is either have substantially
larger code or incorrect behaviour. I strongly disagree with the trade-off
that bash makes.

> can you really blame it on bash

There is a lot of crap going around. Not everything is on bash.

------
bradknowles
A “smart shell” with a UI is a GUI. It is not a shell.

We have plenty of GUIs, but if you want to invent another one, then be my
guest.

But don’t try and tell me that a GUI is a “smart shell”.

~~~
ilyash
We also have plenty of programs. Let's not write any new programs.

