Live data from Hacker News

The Bun Shell

bun.sh

91–100 of 239 posts

Re: The Bun Shell

#92

"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.

[deleted]

Re: The Bun Shell

#93
post #72
post #16

I work on Bun - happy to answer any questions/feedback

I think Bun is written in Zig. Is Zig stable as in 1.0.0, LTS?

Nope. Zig is still changing. In my understanding bun is generally quick to adapt to these changes, and one of the projects zig is keeping an eye on when breaking changes are introduced.

Re: The Bun Shell

#94

Earlier quoted context omitted.

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...

Do you convert your Markdown front matter to TOML? Also for your clients?

Re: The Bun Shell

#95

It 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.

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

#98
I love Bun. I no longer use Node for development. Hardly any gotchas anymore. It's just faster all over. Especially `bun test`. Highly recommended. Thank you @Jarred!

Re: The Bun Shell

#99

I am pretty Python already have all of these? One could just write Python CLI that wraps Python stdlib to do all of these.

Python's subprocess, os.system, etc. offload the work to your system's shell. Bun, on the other hand, is running the scripts in its own runtime.

Re: The Bun Shell

#100
> $ hyperfine --warmup 3 'bash -c "echo hello"' 'sh -c "echo hello"' -N

Small nitpick but on Arch, /bin/sh is a symlink to bash so it's measuring the same thing.

On many systems like Debian, /bin/sh is dash instead (though default interactive shell remains bash) which is actually a few times faster, for start up and in general.

Post reply on HN