TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Unix Shell Programming: The Next 50 Years

159 pointsby mlernerover 3 years ago

12 comments

nextaccounticover 3 years ago
So somehow this paper misses one of the greatest developments in this area, oil <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;</a> - which:<p>1. has a compatibility mode with sh and bash. it&#x27;s the only new shell I know with a upgrade path from bash [0]<p>2. otherwise fixes tons of unix shell misfeatures and in particular fixes quoting hell [2]<p>PS: one fun quirk of the oil implementation is that it&#x27;s written in Python.. but actually in a DSL that generates statically typed C++ code, ditching the Python runtime altogether [3] [4] - when you do compile Oil, you just get a C++ tarball (somewhat like fftw, a FFT package written in OCaml but which generates C code; fftw developers write OCaml, but fftw users compile C)<p>[0] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;why.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;why.html</a><p>[1] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2020&#x2F;01&#x2F;simplest-explanation.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2020&#x2F;01&#x2F;simplest-explanation.h...</a><p>[2] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;release&#x2F;latest&#x2F;doc&#x2F;idioms.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;release&#x2F;latest&#x2F;doc&#x2F;idioms.html</a><p>[3] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2021&#x2F;01&#x2F;why-a-new-shell.html#why-is-it-written-in-python" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2021&#x2F;01&#x2F;why-a-new-shell.html#w...</a><p>[4] But actually I think there&#x27;s still work to do to remove the CPython dependency at runtime, <a href="https:&#x2F;&#x2F;github.com&#x2F;oilshell&#x2F;oil&#x2F;issues&#x2F;636" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oilshell&#x2F;oil&#x2F;issues&#x2F;636</a>
评论 #29612407 未加载
评论 #29615331 未加载
评论 #29614412 未加载
评论 #29614125 未加载
PaulDavisThe1stover 3 years ago
It seems odd that any paper on this topic (I read both TFA and the paper it references) would not mention PowerShell once, nor the broader issue of how the Unix shell uses text streams as the only intermediary format between pipeline components.
评论 #29612004 未加载
评论 #29612687 未加载
评论 #29611883 未加载
评论 #29611796 未加载
usr1106over 3 years ago
The paper is 7 months old and has been submitted a dozen times. Most discussion is here:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27378444" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27378444</a><p>The title is promising, but when I read the paper half a year ago I found it disappointing, no practical value. Academic considerations to get a conference paper.
throwaway984393over 3 years ago
The shell is first and foremost a user interface. Its entire purpose is just to help users use the computer. A huge amount of its functionality is in dealing with making it convenient for people to do work - from looking at command history, to skipping back and forth along a text line, to dynamically changing a prompt, to auto-completion. Think of it as an IDE.<p>Shell &#x27;scripting&#x27; is only supposed to be a way to automate that IDE. It&#x27;s not supposed to be a programming language. Literally the purpose is that you&#x27;re sitting there at your terminal and you think &quot;boy, I would really love to rename 100 files in a certain way&quot;. At first you write a quick one-line series of commands with a loop. But the intention is to eventually write a <i>real</i> dedicated program (like the `rename` command) so you don&#x27;t have to write a crappy line of &quot;scripting&quot;.<p>Shell scripting should remain limited in functionality, and be tailored to helping someone use the IDE. If you want a systems programming language, then develop one. Go crazy and develop new ideas and push the boundaries of computer science. But please don&#x27;t ruin the shell experience by trying to solve some unrelated problems with it and end up ruining the simple end user experience.
louiskottmannover 3 years ago
I am a bash expert.<p>This paper reads like it was written by clueless academics with no real world experience.<p>Multicore bash already exists and is seldom used, through the &quot;parallel&quot; cmd.<p>Other points address no particular issue, and would actually make the language more painful to use.<p>Bash has its limits, which pushes you to use a full fledged language if you attempt to walk past them. It&#x27;s a good system.
评论 #29613277 未加载
评论 #29613201 未加载
评论 #29614107 未加载
评论 #29613425 未加载
1vuio0pswjnm7over 3 years ago
As a daily shell user, I want a shell that uses even less resources, and perhaps even does less. Otherwise I am going to use the default scripting shell. Today, that&#x27;s an Almquist derivative as it has been for 20+ (at least, for NetBSD, Linux adoption was more recent). Never do I see proposals for a &quot;next generation shell&quot; which uses <i>less</i> resources than Almquist and can do all the same things. Anyways, Almquist shell isn&#x27;t going away anytime soon, not for at least another 50 years. IMHO.
评论 #29612475 未加载
评论 #29616125 未加载
评论 #29624357 未加载
sbpoliover 3 years ago
Unix shell isn&#x27;t usable by normal public. It&#x27;s just a stash of random symbols everywhere with unintuitive semantics. You&#x27;d loose your brain if you begin writing one. There are so many quirky considerations you&#x27;ve to take in mind to handle for all cases just gets even more complex then remembering C++ rules.<p>The substitution and shell-quoting are the things that piss me off. Why in 2021 would ever want all that legacy cruft? I better write a Python script that is far more readable and intuitive than figuring out all the symbol combinations in shell programming. We deserve better, don&#x27;t we?<p>Shell programming is like necromancing, one simple mistake leads to big disasters. Also, these shells never point out the actual mistake, like are very unhelpful.
sally1620over 3 years ago
I hope not. I was hoping that Unix and its shell would die out at some point. But it is a hydra that will live on and haunt our dreams.<p>FWIW, I have switched to Powershell &amp; Python for most of my work. I only use Python when I have to share scripts with colleages, though. Powershell still beats Python for scripting.
mukundeshover 3 years ago
I would like a SAFE distributed shell - allow me to run commands seamlessly on remote machines as if they are on my own.<p>Check out op <a href="https:&#x2F;&#x2F;docs.shoreline.io&#x2F;op" rel="nofollow">https:&#x2F;&#x2F;docs.shoreline.io&#x2F;op</a> op&gt; hosts | filter(cpu_usage &gt; 80) | `pkill high_cpu_proc`
unbannedover 3 years ago
Powershell. At least you have actual objects returned and don&#x27;t have to parse stdio
Recursingover 3 years ago
I&#x27;m surprised to see no mention of nushell [0] I&#x27;ve tried it a while ago and seemed really promising<p>[0] <a href="https:&#x2F;&#x2F;www.nushell.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nushell.sh&#x2F;</a>
throwawaybutwhyover 3 years ago
Thanks to the author for posting this. Thoughts, in no particular order:<p>Repeatability:<p>- We already have a dataflow graph, it&#x27;s called makefiles<p>- Going from shell commands to Ansible playbooks can be made easier<p>- Declarative, idempotent commands<p>- Integration with version control<p>User friendliness:<p>- GNU standards. If I cannot use --help and --version, I get angry<p>- Backward compatibility. Ripgrep, I&#x27;m looking at you<p>- Autocompletion is still in its infancy. Co-operative autocompletion is easy, and can be done by utility authors. What are the options (no pun intended) when the author would not update an autocompletion script? fzf and its kin greatly enhance user experience<p>- Performance. Accidentally quadratic stuff is a Cthulhu-scaled abomination<p>- Fancier prompts without needing to install extra software or add a bunch of PS1&#x2F;PS2 scripts<p>&#x27;Novelties&#x27; (not so much, other OSes have had them before):<p>- Coprocs<p>- Easier parallelization<p>- Improvement in job control - freezing and thawing jobs, moving jobs to other hosts etc. K8s&#x2F;kubeflow and friends<p>Security:<p>- Better integration with secret managers<p>- History cleanup when passwords are passed on the command line
评论 #29612600 未加载
评论 #29625784 未加载