nushell / nushell.github.io

Nushell's main website, blog, book, and more
https://www.nushell.sh/book/
MIT License
183 stars 431 forks source link

Add Comparison with PowerShell / NGS #1468

Closed Malix-Labs closed 3 months ago

Malix-Labs commented 4 months ago

It would be very nice to know your opinion towards Powershell, and also more particularly NGS, as I find these two to be the closest of the purpose of NuShell in the first place

fdncred commented 4 months ago

There is some comparison information in our book. I'm not sure if NGS is mentioned though.

Malix-Labs commented 4 months ago

Yes

Also see https://www.reddit.com/u/ilyash/s/F9q41Q1OWW

Malix-Labs commented 4 months ago

Also see

https://github.com/ngs-lang/ngs#:~:text=similar%20to%20Shell%2B%2B.-,Nu%20Shell,-%2D%20compared%20on%202020

devyn commented 4 months ago

If you're familiar with both NGS and Nushell and you'd like to write it, I think we'd happily take it.

NotTheDr01ds commented 3 months ago

This looked interesting enough for me to spend some time trying to grok the NGS doc. I did not run any examples (although I tried, unsuccessfully); just working from the doc. This isn't something I'd put in a doc write-up, I don't think - Just initial observation and opinion.

Key takeaways:

Nushell NGS
Written in Rust Written in C
Platform Linux, Windows, Mac Linux, Mac
Shell + Programming Language Programming Language: Despite the name, currently does not implement shell/CLI features
Activity Latest 200 commits by 36 contributors in the last 2 months. Latest 200 commits by 3 contributors in the last 2 years.
Popularity 31.1k stars, 1.6k forks 1.4k stars, 43 forks
Focus General purpose, cross-platform shell + modern programming language with a focus on structured data from multiple sources. Modern programming language with a focus on domain-specific use-cases (DevOps with AWS, etc.)
More verbose More terse
~400 built-in commands and 35 operators ~400 methods and operators (operators are functions) plus some number of additional keywords
More commands focused on data manipulation and data sources More keywords/methods focused on language -- type definitions, OOP, method overloading ('multimethods'), C interface, and OS interface
Chaining Pipeline Multi-mode: Command mode (pipeline) and Code (.function())
Types Basic types + Shell types (duration, datetime, filesize, etc.) Basic types + lower level (C-interface). ~80 types, but many listed as undocumented or unused

Personally, I'm not a fan of the syntax, as it looks far too reliant on quotes, terse operators, and parenthesis/sub-expressions. This impacts ergonomics, which is one of Nushell's greatest advantages. This is the same thing that keeps me from using Xonsh -- Even though I like Python syntax, it isn't nearly as composable as Nushell.

I think the biggest surprise/shock to me is that something titled "Next Generation Shell" is not a shell. I mean, I was concerned when, after reading through the docs, I hadn't seen anything about configuration or interactive use, but I was still surprised when I ran the Docker image (that's a nice-to-have) and it came up to Bash. Running ngs results in:

You have started NGS with no command line arguments.
In future this will invoke the CLI (shell). Currently the CLI is not implemented yet

The last time there were any commits (other than README and GitHub actions) was March of 2023. Since the maintainer was dusting things off recently with some GitHub Action updates earlier this month, it's possible they are trying to restart work, but other than that it seems pretty dead. The Reddit post from 6 months ago might have been an attempt to restart as well.

The maintainer is clearly smart and (perhaps too) persistent. Over the last 11 years, they've created a domain-focused language that doesn't seem to be in wide use other than the maintainer's day-job. Based on the name, they clearly had aspirations to turn it into a shell as well, but that never seemed to come to fruition.

Given the lack of recent activity, I'd like to see them shift to Nushell - They have some good ideas we could benefit from. But I honestly don't see this happening as the design philosophy is so different.

fdncred commented 3 months ago

nice write-up @NotTheDr01ds! ❤️