5 ms·
Interesting points. As a long-time sysadmin; a big fan of Bash, Ruby, and Go; and a bemused observer of "we need to replace the shell!" manifestos like this one
by skywhopper 9y ago
Interesting points. As a long-time sysadmin; a big fan of Bash, Ruby, and Go; and a bemused observer of "we need to replace the shell!" manifestos like this one, I have long believed that the low-friction of system-level interaction you get from Bash is inextricably linked with its contradictory, confusing, and error-prone syntax. You can't have one without the other. Ruby is one step up the chain. Still easy to get going on a project, much cleaner syntax and more consistent behavior, but the abstraction separates you just enough from the OS that it's no longer trivial to interact with files, processes, and pipes, and instead there has to be an API. Then a language like Go, carefully designed to be as self-consistent and predictable as possible, but the trade-offs are enforced error handling, higher LOCs-to-functionality ratio, and the compilation cycle, and now interacting with OS-level abstractions like files and pipes becomes a major chore, not a magical puzzle of joy like Bash sometimes feels like.
I wish the author good luck with his NGS, but I don't think it's possible to make something as direct as Bash that has all the other features the author wants. But more power to him for trying.
Although, looking at the Github page, I get the impression the author is writing software to automate AWS deployments after getting fed up with Terraform and CM tools, rather than a Better Shell Language. Maybe it's both, but the 100% AWS example code does not remotely appeal to this AWS sysadmin.
- lsd5you 9y agoWhen the replacement of bash comes it will seem like a complete 'no-brainer'. In my opinion what should be happening is they should completely decouple the engineering from the interactive shell. The shell should just be a series of aliases and shorthands translating into something more robust. But I also think they should move away from plain text for everything as well. Almost everything in a unix system could be better served with some kind of standard system of typing. Config files, program inputs (give universal tab completion) ... etc. So I tried powershell and found it to be terrible. It seems like the implementation is killing the idea, stack traces all over the place - rather than helpful errors - and different types for file system objects (I cannot quite remember exactly what) making it hard to combine operations.
- metaobject 9y agoPerhaps it seems superficial, but one of the reasons I don't like PowerShell is because the language is ugly. There is something about using capital letters for commands that really bothers me. It may be an OCD thing, bc I use lower-case snake_case for all variable/class names in Lisp, C, C++, and Python. I don't usually do any work on Windows, but when something came up where some scripting had to be done, I just installed the Cygwin and was done with it.
- humanrebar 9y ago> Almost everything in a unix system could be better served with some kind of standard system of typing. Lightly typed data (like strings you must parse) is more future proof at the expense of leaving more potential for bugs (escaping whitespace). Strongly typing requires the shell designers to provide more opinions. More opinions provide more opportunities to be wrong about what needs we will have in the future decades.
- dotancohen 9y agoIt sounds to me like you would be happy with a python3 REPL that automatically 'import's certain libraries. I don't know if it is possible to configure the REPL like that, but you could probably script it!
- krab 9y agoThat's possible with a PYTHONSTARTUP file. https://docs.python.org/3.6/using/cmdline.html#envvar-PYTHONSTARTUP https://docs.python.org/3.6/using/cmdline.html#envvar-PYTHON...
- falcolas 9y agoI actually worked with someone who did exactly this: they replaced their bash shell with the python shell. It took them a year to get it comfortably working, and they were constantly tweaking on it, but it did work. Some tasks were harder, some easier, but it was all quite entertaining to see.
- dotancohen 9y ago> Bash is inextricably linked with its contradictory, confusing, and error-prone syntax. You can't have one without the other. Ruby is one step up the chain.... Then a language like Go... To be fair, this is use case for shared libraries. I've not dabbled much in Ruby or Go, but in Python there are terrific libraries for handling filesystems, sockets, HTTP request, etc. Most of them (e.g. Requests) have terrific 'Pythonic' interfaces, one doesn't even feel that he's left Python for some decades-old legacy interface.
- KGIII 9y agoThat is certainly one of Python's strong points, at least from my perspective. I haven't touched much code in a number of years, as I've had no reason to, but Python keeps tempting me. While generally a horrible idea, I can start a simple http server with a simple one-line command from the terminal. Yeah, it's probably not smart - but I find myself using simple things like that more and more often - and I'm just a retiree with a small home network. If anything draws me back into programming, it's going to be Python or Java.