Live data from Hacker News

The Bun Shell

bun.sh

61–70 of 239 posts

Re: The Bun Shell

#61

Earlier quoted context omitted.

JSON is a terrible configuration file format. Property names must be quoted, tons of brackets and commas, a mistake comma breaks it, no comments allowed, etc..

JSON5 is a more reasonable format for config files, in my opinion.

I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.

Re: The Bun Shell

#62

Earlier quoted context omitted.

JSON5 is a more reasonable format for config files, in my opinion.

I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.

> I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.

YAML is full of pitfalls. I think the brackets/braces and quotes are worth giving up a small amount readability to eliminate the ambiguity.

Re: The Bun Shell

#63
This looks very cool on the surface. There are a lot of systems out there with a mishmash of javascript and shell, those systems are stitched together in arbitrary ways, and it can often make them hard to debug and test. This looks like it'll make it easier to write and test those integrations, which is a win.

My main concern is that when things don't work as expected, the added layer of complexity will make it harder to figure out why. Hopefully there aren't too many rough edges.

Re: The Bun Shell

#64

Earlier quoted context omitted.

JSON5 is a more reasonable format for config files, in my opinion.

I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.

Seconding the sibling, YAML may look nice but it's absolutely full of awful confusing behavior. If you don't like JSON for human-written stuff, see TOML or the like. I think JSON is great for serialization, it's so simple, but I agree we need something more readable like TOML for human-written data.

https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-fr...

Re: The Bun Shell

#65

Love that bun just implements anything that could be useful. They are busy building useful stuff whilst others pontificate about what they should/shouldn’t build

Seriously. Like it’s just one continuous hack week over there.

Re: The Bun Shell

#67
post #27

Their 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

How many Linux/Mac devs know that? We live in a left-pad world, of course people will install a package to get a simple job done.

This is mostly useful to developers that don’t develop on windows. Typically server side and browser based JavaScript programs are deployed on Linux systems in production.

Today if I want to reliably automate some scripting I do NOT use shell scripting because it makes a bunch of implicit dependencies on existing system.

Instead I write these utility scripts in either JavaScript or PHP depending on the project and this seems to give JavaScript a slightly nicer consistent interface to perform basic functionality, built directly into the runtime.

Re: The Bun Shell

#68

"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

#69

> On a Linux x64 Hetzner Arch Linux machine, it takes about 7ms: hyperfine --warmup 3 'bash -c "echo hello"' 'sh -c "echo hello"' -N On my home machine and a mid-range AWS EC2 instance, the echoes run in ~0.5ms for bash and ~0.3ms for sh. Next time don't run benchmarks on a garbage host like Hetzner. Their hardware is grossly oversold, their support is abysmal, and they null-route traffic anytime there's a blip.

It's a been a long time since I read a post where someone bashes Hetzner. Usually they are well received. We use their VMs as back up servers, so not really pushing them hard. The most negative things I've read about them is they have much stronger KYC than AWS.

Agreed, have been a hetzner customer for years running a myriad of services there without issues.

Re: The Bun Shell

#70

For 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

For Deno there is https://github.com/dsherret/dax which is also zx inspired and has a cross platform shell built-in.
Post reply on HN