Live data from Hacker News

Why Create a New Unix Shell?

oilshell.org

61–70 of 298 posts

Re: Why Create a New Unix Shell?

#61
post #45

What kind of shell can I run on a server without filesystem access that I can open to external untrusted users?

What's your use case for that? If it doesn't have file system access, does that mean it can't run any programs?

I believe Oil will be able to do this, because the architecture is very modular. See the last point in the post using the LLVM / GCC analogy.

(This type of feature isn't a priority now, but I'm interested in hearing use cases.)

Re: Why Create a New Unix Shell?

#62
post #53

Earlier quoted context omitted.

Why do people care about "COMPATIBILITY" so much w.r.t. shells? It's so easy to use other shells to run your script. > /bin/bash your_script.sh And if your script is written with bash in mind, use a shebang: > #! /bin/bash And it will work perfectly fine on fish. As long as I have a bash binary, why do I need COMPATIBILITY?

One of the werid cases with fish as default shell is scripts and programs that expect bash when executing “system” commands. For instance a php or Java program running shell commands. Having bash compatibility is a quality of life feature, no need to debug all the werid cases where it breaks for purely syntax reasons.

That's just lazy programming, and if anything, we should have more incompatible shells so that developers will start to write their programs to stop shelling out and run individual programs, or if they do shell out, actually declare the shell you're using at that point and don't assume it will be sh compatible.

Re: Why Create a New Unix Shell?

#63

Earlier quoted context omitted.

If you like rc, do you like es? http://wryun.github.io/es-shell/

I don't know. I don't like installing new things on servers in general.

But you do test new things you install on your servers somewhere else, at least, I hope so.

Re: Why Create a New Unix Shell?

#64
post #10

Finally a modern shell that understands the importance of COMPATIBILITY! This gives it a realistic chance of getting real adoption. Shells like zsh and fish will never get mainstream adoption because they are not compatible with bash.

Why do people care about "COMPATIBILITY" so much w.r.t. shells? It's so easy to use other shells to run your script. > /bin/bash your_script.sh And if your script is written with bash in mind, use a shebang: > #! /bin/bash And it will work perfectly fine on fish. As long as I have a bash binary, why do I need COMPATIBILITY?

... and if you're going to disrupt existing shells - why would you not use JS? (I don't care for JS, but it is the lingua franca du jour)

Re: Why Create a New Unix Shell?

#65

Earlier quoted context omitted.

I sort of agree that there isn't any strong reason for an interactive shell to have 100% bash compatibility. However, when I tried to convert to using fish I found my muscle-memory used too many simple history substitutions like "!!" and "!$" (which actually pre-date bash; they arrived with csh 40 years ago!) which were missing. Ultimately I gave up and went back to bash. It sort of is an "uncanny valley" for a text…

It was difficult to implement !! and !$ in fish (I rarely actually used them in bash, so it wasn't an issue for me) and I know others who found that annoying. However if you dig around, there are a couple of solutions on Stack Overflow and blog posts that add in that functionality using plugins or functions. It's not exactly the same, but some of them work pretty well.

I use !! maybe ten times per day. !$ can be implemented in your PS1 easily.

Re: Why Create a New Unix Shell?

#66

A little tangential, but I keep wondering if Apple is developing its own shell or will adopt one with a more liberal licence such as Oil or Fish. I mean, they can't keep using Bash 3 forever, right? (Hope)

I find it interesting that Apple actually downgraded to an older version of bash at some point to avoid the GPLv3. I reference it in a post about Open Source and business I wrote two years back:

http://penguindreams.org/blog/the-philosophy-of-open-source-...

Re: Why Create a New Unix Shell?

#67

A little tangential, but I keep wondering if Apple is developing its own shell or will adopt one with a more liberal licence such as Oil or Fish. I mean, they can't keep using Bash 3 forever, right? (Hope)

I really don't understand why they haven't made ZSH the default. It has a much more powerful REPL and a more permissive license.

Re: Why Create a New Unix Shell?

#68
In your FAQ you decry Perl as having no ability to redirect around other programs. Yet you don't explain how any of the following fail to meet those needs.:

* http://perldoc.perl.org/functions/open.html

* http://perldoc.perl.org/IPC/Open2.html

* http://perldoc.perl.org/IPC/Open3.html

* http://search.cpan.org/~odc/IPC-Open2-Simple-0.01/lib/IPC/Op...

* http://search.cpan.org/~exodist/Child-0.013/lib/Child.pm

* http://search.cpan.org/~rkrimen/IPC-RunSession-Simple-0.002/...

* http://search.cpan.org/~trski/Proc-Forkmap-0.025/lib/Proc/Fo...

* http://search.cpan.org/~toddr/IPC-Run-0.96/lib/IPC/Run.pm

* http://search.cpan.org/~ayoung/IPC-Run3-Simple-0.011/lib/IPC...

* http://search.cpan.org/~rjbs/IPC-Run3-0.048/lib/IPC/Run3.pm

* http://search.cpan.org/~djerius/IPC-PrettyPipe-0.03/lib/IPC/...

* http://search.cpan.org/~xan/IPC-Pipeline-1.0/lib/IPC/Pipelin...

* http://search.cpan.org/~sscaffidi/IPC-OpenAny-0.005/lib/IPC/...

* http://search.cpan.org/~glai/IPC-Exe-2.002001/lib/IPC/Exe.pm

* http://search.cpan.org/~zefram/IPC-Filter-0.005/lib/IPC/Filt...

Post reply on HN