The Bun Shell
81–90 of 239 posts
Re: The Bun Shell
#82"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
#83Re: The Bun Shell
#84"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.
Lots and lots of IoT devices running node…you might be shocked
Re: The Bun Shell
#85Re: The Bun Shell
#86This looks exactly like zx by Google. And that's probably a good thing. https://github.com/google/zx
[0]: https://github.com/google/zx
Re: The Bun Shell
#87For something which works across all JS runtimes (Deno, Node) and achieves basically the same, check out the popular JS library Execa[1]. Works like a charm! Another alternative is the ZX shell[2] JS library. Tho haven't tested it. [1]: https://github.com/sindresorhus/execa [2]: https://github.com/google/zx
One thing that surprised me about Node was how slow the default way to shelling out (child_process) could be (probably https://github.com/nodejs/node/issues/14917 ). Although according to the linked issue, it has been "fixed", I still ran into a problem during a batch script that was calling imagemagick through a shell for each file in a massive directory; profiling was telling me that starting (not completing) (yes,…
Re: The Bun Shell
#88Re: The Bun Shell
#89Re: The Bun Shell
#90if you're writing "await" before every function call maybe that should be the default.