Live data from Hacker News

Why Create a New Unix Shell?

oilshell.org

241–250 of 298 posts

Re: Why Create a New Unix Shell?

#241
post #203

Earlier quoted context omitted.

I've had good luck with this module. Much nicer than using os.system() imo. https://amoffat.github.io/sh/

never use os.system. os.system is a hack. Subprocess is a bit verbose to use, though... A wrapper would be nice.

Since python3.6 it's just subprocess.run(). The SP module was refactored. I hope that eliminates the need for all these annoying (IMHO) wrappers.

Re: Why Create a New Unix Shell?

#242
post #51

Lots of overlap in design goals with fish, except fish also places a premium on users interactively using the shell (which means friendlier in-repl experience but a balancing act when it comes to features). Fish’ auto completions are incredible, too. Best of luck to them. Another interesting shell to check out is elvish, lots of new ideas there (even if awkward to use). (Disclosure: I’m one of the core fish devs/main…

> Another interesting shell to check out is elvish, lots of new ideas there (even if awkward to use). Elvish is pretty nifty, but the biggest failing point to me is that the fancy rich pipelines really work just for in-process stuff, which for me kinda loses the point of being a shell. Of course I do realize that rich (polyglot) interprocess pipelines is a difficult problem; some might say a pipe dream.

PowerShell on Windows is the only production system that I have used which passes "objects" through pipes.

It's a challenge for me to use well; not sure all that richness is composable. Better programmers than I am would know.

Re: Why Create a New Unix Shell?

#245

Earlier quoted context omitted.

you can turn windows into an adult computer by using cygwin (maybe mingw), autohotkey and something like window manager. the illusion is almost real, because sometimes i also run linux in vmware/docker/... and when i am not paying attention i forget easily which os i am on. the unix subsystem for win is quite boring as you can't mix windows applications with linux ones, for example running visual studio build from ba…

You can run windows programs out of bash (I mean the wsl bash), and you can also create wrapper bat files to use Linux tools/programs from Windows.

i see ( https://docs.microsoft.com/en-us/windows/wsl/interop )

that was not possible when i tried it, thanks for pointing it out

Re: Why Create a New Unix Shell?

#246

Love it. I think there's plenty of room for innovation in this space. I'm currently in the process of porting a ~700 line bash script (I didn't write it) to Python. Although longterm I think this will be much better for the project, there are still tradeoffs. There are some things that are just so easy to express in shell language, like composing transformations via pipes. Sure, python can do it, but it feels clunky…

There's definitely room for innovation - fish is for me but I'm always impressed with the work being done on both new and old shells. One thing fish doesn't do is get much into the semantics of how processes interoperate, and I'm interested to see if there's a new idea that can gain some traction in that regard.

Re: Why Create a New Unix Shell?

#247
post #50

I spent the day making a virtual terminal ... I think the terminal is an unnecessary layer. All program UI is limited by this 40+ year old technology that is the terminal. Instead of making a new shell, make a shell + new user-interface.

You might be interested in this: https://github.com/withoutboats/notty

https://github.com/withoutboats/notty/issues/67

Dead project according to the author, though.

Re: Why Create a New Unix Shell?

#248

Earlier quoted context omitted.

never use os.system. os.system is a hack. Subprocess is a bit verbose to use, though... A wrapper would be nice.

Since python3.6 it's just subprocess.run(). The SP module was refactored. I hope that eliminates the need for all these annoying (IMHO) wrappers.

Ah, that's nice!

... unfortunately, I'm stuck with python2.4 or 2.6 on most machines my Python code has to run on. :/

Re: Why Create a New Unix Shell?

#249

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)

fish is released under GPLv2 and afaik Apple has a policy to not include any new GPL software in macOS.

I think GPLv2 is fine, GPLv3 is what stopped them from using new versions of Bash. But I'm sure they would prefer MIT, Apache, BSD, etc

Re: Why Create a New Unix Shell?

#250

Earlier quoted context omitted.

> They must be short ( Well, the question is: what do you use as a replacement? For my scripts I tend to pull in some version of PHP as soon as needed. Perl is something that's universally available in anything based on Debian or Ubuntu, but it's a maintenance nightmare, and PHP doesn't care whether I use spaces, tabs or a mixture, or if there are due to any circumstances mixed line endings in a file whereas Python m…

Anything that supports pipes and signals, and is easy to install. I've started using Steel Bank Common Lisp (SBCL) because it's the default implementation used with the Roswell installer. https://github.com/roswell/roswell (As a side-note: Perl 5 was really the ideal language for this, by design; we might be in a different world today if it hadn't been derailed by Perl Forever^W 6).

I mean, Perl 5 wasn't actually ideal for this, but it was better suited to the task than anything else that actually exists.
Post reply on HN