Extra words or punctuation marks add up quickly. I can very realistically type hundreds, if not thousands, of commands per day. The programming language and stdlib aspects are just like Python or Rust, but with a different focus: ![]() Shells are a combination of programming language, user interface, and standard library. Mtime-nsec 0 ctime 1405615444 ctime-nsec 0 path "/usr/share/dict/words") I made a language for myself in this space, geared toward C and Unix people who are willing to try Lisp: TXR. The fix is to use some real programming language for complex work. That only gives you names, and has quirks that are only adequately worked around with Bash options. The POSIX shell has that in the form of globbing. But this hopefully demonstrates why the base language Python is not a good shell, despite it being portable, being nearly ubiquitous nowadays, being relatively easy to use and learn, being "safe" in many ways that traditional shell languages are not, and having a huge and useful standard library.Ĭalling an external too to list files is an anti-pattern every programming language or shell language should have that built-in, so it's just doing that via the OS API (opendir/readdir/closedir). Maybe that's what Xonsh is, I haven't looked at it myself. "Running other programs" includes invoking them (literally 0 extra syntax), piping them (one letter: |), and redirecting the standard input and output streams to files (>, > < << | to mimic what a shell does. But it's literally the purpose of a shell, so a shell should be good at it. Most programming languages do not and should not optimize for this. Typing commands interactively is essential because. everything is a string), and moreover that syntactically bare symbols are also strings. They are also is distinct in that they are "stringly-typed" (i.e. Traditional shell scripting languages are great at exactly three things: typing commands interactively, running other programs, and sourcing other shell scripts. Since I can't edit my post anymore, here are some additional thoughts: You can workaround by using "complete" but that feels non-ideal. Jonathan Turner is a gifted person with an eye for language design and it really shows.Įdit: I do think it's missing some important output redirection functionality. ![]() There's basically none of this with nushell. Everything about the script syntax is just slight odd and confusing. Numerous operators and bits of syntax are just different. ![]() I've lost hair and sanity to some stupid list/single-item-list beahvior. I never hated it, but lord it makes some awful, stupid infuriating decisions. I may never write a bash script again (it's okay, I use Nix so I get nushell everywhere I'm might need it, for free)Įveryone is asking about PowerShell. Oh my god I could cry, strings are sane to work with. I hit some bugs, a couple of which are a bit sharp, but wow, the list of quirks I have to remember for nutshell are so much fewer than for bash.Ĭonstantly impressed at the errors it catches at parse time, kinda crazy sometimes. I just ported a bunch of scripts to nushell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |