Live data from Hacker News

GitHub – nushell/nushell: A new type of shell

github.com

61–70 of 411 posts

Re: GitHub – nushell/nushell: A new type of shell

#61
post #54

Earlier quoted context omitted.

PowerShell from Microsoft is looking too alien on Unix. Just looking at the syntax I already feel uncomfortable. It's hard for me to criticize it because I haven't used it, but it looks like it was designed by a committee and overdesigned. I.e. it wasn't created from the need, like someone at Microsoft wanted to automate his work and created PS to solve his problem. It looks like some boss decided: "They have shells,…

I’m sorry to say this but this is a very uninformed comment with way too many biases without any backing. > I.e. it wasn't created from the need, like someone at Microsoft wanted to automate his work and created PS to solve his problem Interestingly enough, it is used for automating Windows configuration. Re last paragraph: UNIX commands are random letters that are like that due to historical reasons — if you don’t k…

Yes, I haven't used PowerShell. And I agree that my comment is uninformed.

It's just that I feel uncomfortable even looking at the PS syntax. Maybe it's idiosyncratic. Maybe I've spent too many years in Unix shell.

Re: GitHub – nushell/nushell: A new type of shell

#62
post #28

This feels extremely like PowerShell, from all the examples, and even cites "draws inspiration from projects like PowerShell", so "a new type of shell" feels very disingenuous unless it has additional novel properties that aren't evident just from these. There's also no support for variables yet if the page is to be believed, which means there's 0 chance of me using this for more than 5 minutes right now. (I'm not tr…

https://github.com/nushell/nushell#progress "Nu supports variables and environment variables"

That page was edited an hour ago, so that was presumably a stale example. I'm glad to be wrong!

Re: GitHub – nushell/nushell: A new type of shell

#63
post #15

Seems pretty well designed. Though the decision to be able to refer to the properties of data in a pipe directly with their names might cause some confusion in the end (the 'size' in 'ls | where size > 1'). Ok it's succinct, but it's also a bit weird that the loop variable (what this basically is in a pipe) is treated different than all others. Not that e.g. PS' $_ is so great, but at least it's obvious: it's a varia…

This is a feature that Powershell gained and it is very useful.

Re: GitHub – nushell/nushell: A new type of shell

#65

Earlier quoted context omitted.

Why is everything written in rust nowadays? Apart from the safety it provides.

I think Cargo doubling as both build tool and package manager is a big factor here. The combination of Cargo + crates.io makes it very easy to write some Rust code and make it available to anyone with Cargo on their system. Either by `cargo install nu` to build it from sources on crates.io or `cargo install` inside the git repo to build my own customized version. No more waiting for distro packagers to keep up. Putti…

This is insanity and hubris.

"It's so easy!" yes if you have the language and tools de jour installed and up to date. I want none of that.

It was node and npm.

Then go.

Now Rust and cargo.

Oh, I forgot ruby.

And all this needs to be up to date or things break. (And if you do update them then things you are actively using will break.)

I don't need more tamagochis, in fact the less I have, the better.

What happened to .deb and .rpm files? Especially since these days you can have github actions or a gitlab pipeline packaging for you. I can't care less what language you are using, don't try to force it down my throat.

Re: GitHub – nushell/nushell: A new type of shell

#66

Very promising project that I hope it will take off and succeed. I recently switched to zsh with the addition of oh-my-zsh and I am happy how it has features like auto completion and command validation of some sort, but this could take it to the next level. I am just afraid to change to it and be disappointed about some incompatibility issues or bugs / crashes. I will observe and wait until it's quite popular to hop…

I use Oh-my-zsh too but I hate that it constantly asks me to update itself and it isn't exactly the quickest update either. Either update automatically in the background or don't tell me about updates at all. Don't constantly nag me when I start new shells!

I had the same issue but your comment made me look up if there is something to do about it. Both things are possible https://github.com/ohmyzsh/ohmyzsh#getting-updates

Re: GitHub – nushell/nushell: A new type of shell

#67

I played with it recently. The interactive part is limited at the moment, but I really like the idea of having operations like sorting and filtering separate from the tools which produce the data. Having these things consistent and available everywhere is a huge cognitive win. I can finally sort and filter `ls` output without having to read the man page. :) "Querying" data feels a lot like SQL in that respect.

Were you not able to before? ls | grep foo | sort is hardly something people normally read the man page for.

Re: GitHub – nushell/nushell: A new type of shell

#68

Earlier quoted context omitted.

>That is like a big deal Why you think it is "a big deal"?

Why do you not? No memory leaks, no security issues stemming from such. No random crashes from memory misuse, no issues debugging the issues that exist. It's like a higher level language but lower. You get to do things your way, except when your way is fundamentally unsafe. The code is then easier to debug as it actually describes what's happening and issues are mostly algorithmic, while the application gets a massiv…

Rust isn't the only language that offers that. In fact most languages offer that. Even Pascal is safer than C. Or if we're really concerned about security then we should be advocating that out shells are written in Ada. But clearly there's more to it than that....

It's also worth remembering that the biggest causes of RCE in shells haven't been buffer overflows. It's been fundamental design problems from the outset (eg Bash executing functions in environmental variables (Shellshock) and CI/CD pipelines or other programs forking out to the shell without sanitising user input nor having sufficient RBAC in place).

Don't get me wrong, I have nothing against Rust. I think its fantastic that we're seeing diversity in the ecosystem. But we need to be careful not to judge a project simply because of its use of Rust (or choice of other language). The reality is soooo much more complicated and nuanced than is often made out in HN.

Re: GitHub – nushell/nushell: A new type of shell

#69
Nushell missed the one feature that every Unix shell has: if it doesn't recognize the first word as a built-in command, look it up and run it as an executable. It's crucial, and nushell is missing out on an ecosystem of random shell commands to complement it as a result. This, of course, is what makes the Unix shell so great: the many little programs able to work together via pipelines.

This makes nushell an interpreter command line, instead of a system shell.

(Yes, you can "escape" by typing ^ before a word. That's not nearly the same thing.)

Re: GitHub – nushell/nushell: A new type of shell

#70
post #30

Earlier quoted context omitted.

powershell for unix is ... powershell: https://docs.microsoft.com/en-us/powershell/scripting/instal...

PowerShell from Microsoft is looking too alien on Unix. Just looking at the syntax I already feel uncomfortable. It's hard for me to criticize it because I haven't used it, but it looks like it was designed by a committee and overdesigned. I.e. it wasn't created from the need, like someone at Microsoft wanted to automate his work and created PS to solve his problem. It looks like some boss decided: "They have shells,…

PowerShell was started by a single person, Microsoft's Jeffrey Snover. As the project progressed other designers came on board but Snover remained (and remains) as Chief Architect. The design-by-committee allegation isn't being fair to him.

Part of why PowerShell may seem not quite Unix-like, is Snover didn't just look at Unix as an influence. Snover's professional background included experience with IBM OS/400's CL shell and OpenVMS's DCL, and his experience with both systems influenced PowerShell's design.

Post reply on HN