Live data from Hacker News

GitHub – nushell/nushell: A new type of shell

github.com

51–60 of 411 posts

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

#51
post #4

Kudos for writing something in rust and not appending "written in rust!" everywhere.

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

It's a fast compiled language with a great type system and a sane build system. There aren't a lot of alternatives with those properties.

I'd say the closest are Go, which doesn't have remotely as good a type system, Typescript which isn't compiled and isn't quite as fast or nice.

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

#52
post #4

Kudos for writing something in rust and not appending "written in rust!" everywhere.

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

Most of the answers here omit this, and it's a very important point for hobby open source projects - Rust is just very fun to write.

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

#53

This looks pretty awesome. Wonder if it could be used with a command rather than as a new shell. Tangent: How is this at the top of the front page with a dozen upvotes and no comments? Maybe these upvotes all occurred at once?

You can with `-c`:

    $ nu -c "sys | get host.name"
    > Ubuntu

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

#54
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,…

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 know one exists, you can’t find it. And when you have to use {} in PS you are dealing with something you would do with awk sed with even more arcane syntax — PS is pretty readable with some knowledge on any PL. Also, they are Verb-Noun based so you can get around and find commands even offline (though Noun-Verb would have probably been a better decision). Due to the fixed syntax they can be shortened very well. Also, due to every “command” having the same conventions, arguments are properly done (no tar xf or -xf or —extract), they are reliably autocompletable without black magic, and they are also autocompletable by giving enough letters to make it unambiguous. So while I am not particularly fond of Microsoft, powershell is better than bash (though frankly, what isn’t?) in every conceivable way.

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

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

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

#56

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…

How are you measuring popularity?

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

#57

I wonder if this could be accomplished in a more general way with a fourth standard file descriptor for structured data. stdjson basically.

A pipe only conveys stdout. You could redirect 4>&1 1>/dev/null, but you'd have to rewrite all tools to generate both stdout and stdjson anyway.

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

#58

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…

> 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 HN-style nitpicking, and then there's this.

I'm sorry, but I'm not actually sure what you're trying to express here.

My initial interpretation is that this is a level beyond typical nitpicking, but I'm not sure how that follows?

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

#60
post #29

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…

Have you used PowerShell much? The examples in the Readme make it obvious that it's very different (in a good way).

I use PowerShell daily, though I do not, for example, develop nontrivial modules for it.

Could you provide an example of what I'm overlooking?

Post reply on HN