Earlier quoted context omitted.
I get where you're coming from, but there's an enormous ecosystem of software written for posix. You wouldn't just be starting over with new standards.. you'd be tossing out a whole world of software that we already have.
Well, I was more talking about just having an extra terminal program that launched an alternative shell (like oilshell / nushell etc.) and occasionally migrate one of your legacy scripts to that and see if it fits. I am definitely not advocating for a switch overnight. That would of course be too disruptive and is not a realistic scenario. In terms of POSIX I'd start with just removing some of the quirkiest command l…
The Bun Shell
211–220 of 239 posts
Re: The Bun Shell
#212"JavaScript is the world's most popular scripting language." Perhaps, based on usage. But shell must be the world's most ubiquitous scripting language. Not every computer has a Javascript engine but most have a shell. Many, many computers have no browser, let alone a GUI. Some small form factor computers might have embedded Javascript engine but that's a minority. No browser on the router.
I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell.
Re: The Bun Shell
#213Earlier quoted context omitted.
I have recently switched to using Nushell as my default shell. They were also writing their own but recently decided instead to begin incorporating github.com/uutils/coreutils (Rust rewrite of GNU coreutils). They target uutils to be a drop-in replacement for the GNU utils. Differences with GNU are treated as bugs.
A commendable effort but to me they are not going far enough. I'd honestly just start over, implement what seems to make sense and only add extra stuff on top if there's a huge demand for it + that demand is well-argumented for. I get why they don't want to do that and I respect their project a lot. But to me imitating this ancient toolchain is just perpetuating a problem.
Re: The Bun Shell
#214Earlier quoted context omitted.
I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell.
Windows comes with two shells (CMD and Windows Power Shell 5.1). MacOS comes with zsh or bash (maybe both). I think one problem here is people are assuming a shell must be a Linux shell.
Re: The Bun Shell
#215> We've implemented many common commands and features like globbing, environment variables, redirection, piping, and more. Of course on paper that sounds fine. However, something that is missing from here is some assurances of how compatible it actually is with existing shells and coreutils implementations. Is it aiming to be POSIX-compliant/compatible with Bourne shell? I am going to assume that not all GNU extensio…
I feel the best way to handle this is for $ to require all non-bultin calls to be explicit and try to replicate utilities as builtins as much as possible
> Also, it's probably obvious but you likely would not want to surprise-replace a Bourne-compatible shell like ZShell with this in most contexts. This only makes sense in the JS ecosystem
The sheer size of the JS runtime is enough argument to not use it in a non-JS project. Not a jab at JS or Bun, python/ruby/etc can't compete with shell script runtime size either
Re: The Bun Shell
#216Earlier quoted context omitted.
It really depends on how you define "computer".
Can you give an example of a device that has an end-user accessible shell, but not an end-user accessible browser? Every iOS device is the opposite.
Definition of computer: "a device, usually electronic, that processes data according to a set of instructions."
Maybe it's pedantic, but you're simply not counting trillions of real computers in the world doing valuable work without any kind of user interface, even IoT devices that are connected to the internet. I have dozens of home automation "computers" that have no such end-user accessible shell, but I can definitely ping their IP address and control them in various ways - and I create the firmware for devices (ESP32 primarily), so I can assure you they are the full definition of "a computer" and that they have no shell, do not run javascript, and have no browser.
And yet those embedded devices can be forced to run a version of Javascript.
Re: The Bun Shell
#217Earlier quoted context omitted.
Can you give an example of a device that has an end-user accessible shell, but not an end-user accessible browser? Every iOS device is the opposite.
Your definition of "computer" seems to be too narrow. "A computer" does not have to have a shell, run linux, windows, or macos - "a computer" can be an embedded 8-bit SOC. Definition of computer: "a device, usually electronic, that processes data according to a set of instructions." Maybe it's pedantic, but you're simply not counting trillions of real computers in the world doing valuable work without any kind of use…
Re: The Bun Shell
#218Earlier quoted context omitted.
Your definition of "computer" seems to be too narrow. "A computer" does not have to have a shell, run linux, windows, or macos - "a computer" can be an embedded 8-bit SOC. Definition of computer: "a device, usually electronic, that processes data according to a set of instructions." Maybe it's pedantic, but you're simply not counting trillions of real computers in the world doing valuable work without any kind of use…
Given the whole discussion is about prevalence of shell interpreters vs javascript engines, the existence of devices that neither interpret shell nor javascript is entirely beside the point. There are a ton of fish in the ocean, but they don't matter when determining whether more land animals have 4 legs or lungs.
>"I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell."
So let's use a specific goalpost and frame "a computer" as a desktop personal computer.
Today, there are no mainstream personal computers sold that don't come with both a user accessible shell and a web browser. Even Chromebooks have a shell. Just because a user doesn't have a clue how to use it doesn't mean it's not there.
Oh, did you mean to include phones in this pointless internet argument? Because that's an entirely different goalpost, and if you want to include phones then you should also include routers, IoT and embedded devices as "computers", says me.
Re: The Bun Shell
#219Earlier quoted context omitted.
I had the same thought and had an Intel Mac, but then I tried WSL2 and it just works. Now my daily driver is a PC with specs that I wouldn't be able to afford if it was a Mac.
Honestly that's awesome, I admittedly haven't tried it yet
Re: The Bun Shell
#220Earlier quoted context omitted.
Given the whole discussion is about prevalence of shell interpreters vs javascript engines, the existence of devices that neither interpret shell nor javascript is entirely beside the point. There are a ton of fish in the ocean, but they don't matter when determining whether more land animals have 4 legs or lungs.
Sure, if you set your own goalposts for the argument, you get to win any way you want. >" I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell. " So let's use a specific goalpost and frame "a computer" as a desktop personal computer. Today, there are no mainstream personal computers sold that don't come with both a user accessible shell and…
To me it seems they are just about as irrelevant to the topic at hand as anything could possibly be, but you are getting very hung up on including them in the debate for reasons that elude me.