Live data from Hacker News

The Bun Shell

bun.sh

191–200 of 239 posts

Re: The Bun Shell

#191

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

Agree, I had the same thought reading the above comments. GNU is not holy correctness, it’s a first draft that worked well. Opinionated reimplementation with divergence isn’t a bad thing.

Re: The Bun Shell

#193

Earlier quoted context omitted.

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.

Agree, I had the same thought reading the above comments. GNU is not holy correctness, it’s a first draft that worked well. Opinionated reimplementation with divergence isn’t a bad thing.

Trust me, if we were all starting from scratch, I would agree. However, I am not ready to drop compatibility with GNU coreutils at the moment.

Re: The Bun Shell

#194
post #193

Earlier quoted context omitted.

Agree, I had the same thought reading the above comments. GNU is not holy correctness, it’s a first draft that worked well. Opinionated reimplementation with divergence isn’t a bad thing.

Trust me, if we were all starting from scratch, I would agree. However, I am not ready to drop compatibility with GNU coreutils at the moment.

Nobody is forcing you to. We can have alternative stacks for as long as we like. Any new stack is strictly opt-in.

Re: The Bun Shell

#195
post #193

Earlier quoted context omitted.

Trust me, if we were all starting from scratch, I would agree. However, I am not ready to drop compatibility with GNU coreutils at the moment.

Nobody is forcing you to. We can have alternative stacks for as long as we like. Any new stack is strictly opt-in.

I mention "GNU compatibility" for Bun Shell specifically because there are some incredibly commonly used GNU extensions even in the JS ecosystem like mkdir -p, and yes, even the GNU specific find extensions. I don't think we need total compatibility for everything. However, OTOH, Nushell is targeting being the default system shell, not just something off to the side. They could decide to be not GNU compatible and it's not like I'd complain, but I agree with their choice to be GNU compatible 100%, and it makes me more likely to consider it on my own machines.

I don't feel as though anyone is forcing me to do anything though, that's definitely not the tone I intended to convey.

Re: The Bun Shell

#196
post #143

Earlier quoted context omitted.

An absolutely ludicrous point, shells have some of the fastest startup times of all processes

If you are mindful and optimize your shell config, yea. But common stuff like zsh with oh-my-zsh is known to be rather slow, as in several hundred millisec to start. Depending on you, of course, that might be considered fast. I consider it insanely slow. My shell of preference, "nushell": > Startup Time: 24ms 448µs 147ns Ideally it would launch in < 16ms (1 frame at 60hz), but I can live with this ;-)

Why would you need to optimize the config? I'm not talking about running an interactive shell.

Re: The Bun Shell

#197
post #13

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

> Is it aiming to be POSIX-compliant/compatible with Bourne shell? No? It never claimed to be aiming to be POSIX-compliant. It seems like it's just making it easier to write "scripts", or do the equivalent of writing a script, in JS. And if you're NOT using this, then you're also not guaranteed to have a POSIX-compliant shell since you may be on Windows, for example

To be honest, it absolutely should aim to be at least a strictly compatible subset of POSIX, even if it doesn't implement everything. There is really no good reason to XKCD 927 this on purpose, but the mentality regarding this is not written anywhere that I saw. I think the mentality regarding compatibility ought to be documented in more detail. What is considered a "bug"?

Re: The Bun Shell

#198
post #196

Earlier quoted context omitted.

If you are mindful and optimize your shell config, yea. But common stuff like zsh with oh-my-zsh is known to be rather slow, as in several hundred millisec to start. Depending on you, of course, that might be considered fast. I consider it insanely slow. My shell of preference, "nushell": > Startup Time: 24ms 448µs 147ns Ideally it would launch in < 16ms (1 frame at 60hz), but I can live with this ;-)

Why would you need to optimize the config? I'm not talking about running an interactive shell.

You commented on someone mentioning bash being slow to start.

So your parent discussed interactive shell, and I assumed you did, since you didn't state otherwise.

Re: The Bun Shell

#199

Can somebody explain why they’re attributing ZSH to macOS? It’s clearly cross platform

Thank you. As someone who avoids Apple at all costs but loves zsh, this really rubbed me the wrong way. Pretty sure MacOS used to use bash too.
Post reply on HN