doesn't work with Windows: https://github.com/oven-sh/bun/issues/43
This is super confusing considering the text in the article.
The Bun Shell
131–140 of 239 posts
Re: The Bun Shell
#132I’m increasingly fed up with all shell scripts. Sure shell scripts are great when they’re small. Except then they become not small. But they don’t get rewritten. Piping strings of instructed text between programs is an error prone nightmare. I want full debugger support, strong typing, cross platform support, and libraries not programs. Python isn’t my favorite language. But I’ll take a debugable Python script over b…
Re: The Bun Shell
#133[flagged]
Re: The Bun Shell
#134Earlier quoted context omitted.
The most common usecase is probably “I have `rm` in the scripts section of package.json, and it doesn’t work on windows.”
> Bun provides a limited, experimental native build for Windows. > # WARNING: No stability is guaranteed on the experimental Windows builds Now your scripts simply will randomly break on Windows and you won't even know why!
Re: The Bun Shell
#135Re: The Bun Shell
#136"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.
Not true - shell does not run on Windows, iPhones etc. Even macOS has issues with those who assume Linux is the only Unix, Apple's bash is very old and does not run many scripts. Unfortunately Javascript does get installed everywhere,
Your TV/IoT device likely has busybox, as does your router.
You install git on windows, it's got a (POSIX) shell.
The number of places that lack a shell is tiny.
Node/deno/bun are rare, and browsers whilst being more common, still require the device to have some kind of GUI.
Re: The Bun Shell
#137It feels like the people behind bun are trying to differentiate from node so much that they sometimes don't stop to ask why. I'm sure there's a use-case somewhere, but if I'm using js I will just use a regex instead of reaching for grep. If I want the shell I'll use the shell.
Re: The Bun Shell
#138Earlier quoted context omitted.
Not true - shell does not run on Windows, iPhones etc. Even macOS has issues with those who assume Linux is the only Unix, Apple's bash is very old and does not run many scripts. Unfortunately Javascript does get installed everywhere,
Uh, MacOS has zsh (which has far more features than most other POSIX shells), and even old bash has POSIX compatibility. Your TV/IoT device likely has busybox, as does your router. You install git on windows, it's got a (POSIX) shell. The number of places that lack a shell is tiny. Node/deno/bun are rare, and browsers whilst being more common, still require the device to have some kind of GUI.
I don't think it's in the path by default so if some program like npm calls exec("rm") it's still going to fail I think.
Re: The Bun Shell
#139I really have a "scientists asked if they could not if they should" feeling about this one. I've seen and tried lots of solutions like that in different languages, but believe now it's a wrong level of abstraction. If you want to provide some crossplatform way to execute ls, providing an "ls()" function is much cleaner. Otherwise you start accumulating issues like: which flags are supported, does it support streaming…
Re: The Bun Shell
#140Their info about "rm -rf" not working in Windows is slightly misleading. In PowerShell, you can accomplish this by running: rm -r -fo my-folder-name