Live data from Hacker News

Nushell: Introduction to a new kind of shell

dataswamp.org

51–60 of 252 posts

Re: Nushell: Introduction to a new kind of shell

#51
post #35

Earlier quoted context omitted.

Powershell is also quite anti-semantic, non-portable and verbose

> anti-semantic Why? > non-portable PowerShell 6 and later run on Windows, macOS, and Linux. > verbose This is by design.

>Why?

Case insensitive, weird parameter passing, no Posix-like interface.

>Windows, macOS, and Linux

Yet it is still mostly suitable for Windows, where it makes sense with weird (read: mostly bad and outdated) platform-wide proprietary decisions.

>This is by design

Well, humans should not spend too much focus on verbosity, maybe I'm wrong, at least that's what I've learnt from a university HCI course.

Re: Nushell: Introduction to a new kind of shell

#52
post #19

Earlier quoted context omitted.

I'm curious what you mean by "properly supports Windows." Are you on a version of Windows that supports WSL2 (Windows Subsystem for Linux)?

WSL is great but it’s basically a convenient VM. It’s no longer windows, as far as I’m concerned.

It’s a lightweight Hyper-V VM, just like Windows itself when you turn Hyper-V support on (boots hypervisor first, then the Windows VM in the root or parent partition)[0].

But if that’s an issue, WSL1 is still an option.[1] It’s a thin translation layer between Linux kernel calls and NT kernel calls, which was the original concept of subsystem from the early NT days which allowed OS/2 apps to run on top of ntdll.dll.

WSL2 didn’t replace WSL1.

[0] https://learn.microsoft.com/en-us/virtualization/hyper-v-on-...

[1] https://learn.microsoft.com/en-us/windows/wsl/compare-versio...

Re: Nushell: Introduction to a new kind of shell

#53
post #35

Earlier quoted context omitted.

Powershell is also quite anti-semantic, non-portable and verbose

> anti-semantic Why? > non-portable PowerShell 6 and later run on Windows, macOS, and Linux. > verbose This is by design.

Its not verbose. Its just that people that use it like to share verbose stuff as it is more helpful to others.

Re: Nushell: Introduction to a new kind of shell

#54
I just ported a bunch of scripts to nushell.

I hit some bugs, a couple of which are a bit sharp, but wow, the list of quirks I have to remember for nutshell are so much fewer than for bash.

Constantly impressed at the errors it catches at parse time, kinda crazy sometimes.

Oh my god I could cry, strings are sane to work with. I may never write a bash script again (it's okay, I use Nix so I get nushell everywhere I'm might need it, for free)

Everyone is asking about PowerShell. I never hated it, but lord it makes some awful, stupid infuriating decisions. I've lost hair and sanity to some stupid list/single-item-list beahvior. Numerous operators and bits of syntax are just different. Everything about the script syntax is just slight odd and confusing. There's basically none of this with nushell. Jonathan Turner is a gifted person with an eye for language design and it really shows.

Edit: I do think it's missing some important output redirection functionality. You can workaround by using "complete" but that feels non-ideal.

Re: Nushell: Introduction to a new kind of shell

#55

I use it as my primary driver, for the sole reason is that it's the only cross-platform shell that properly supports Windows (without resorting to Cygwin/MSYS, which has performance issues and many pain points). I'm still getting used to the syntax though... (Edit: forgot to mention Powershell, since nowadays it also works on Macs and Linux)

Why use this over PowerShell for example?

I am a C# programmer at heart, and I use powershell a good bit. I can honestly say I can never use powershell without my cheat sheets or my list of favorite commands (and especially the arguments to use).

I looked at this and kinda get it and think I could do some things with it. I don't think it's as powerful and can _definitely_ say it won't be capable of the same automations we use.

That said, the text parsing people do with bash makes me cringe. It's so repulsive and sketchy. Anything to get linux world off of bash would be a good thing.

Re: Nushell: Introduction to a new kind of shell

#56
> In a nutshell, nushell is non-POSIX shell, so most of your regular shells knowledge (zsh, bash, ksh, etc…) can't be applied on it, and using it feels like doing functional programming.

Is there a reason some shells like fish (and now nushell) are non-POSIX? What is the benefit? I really like fish but I've kept away from it because it's non-POSIX and won't necessarily play well with years of POSIX scripts and knowledge I have.

Re: Nushell: Introduction to a new kind of shell

#57

> In a nutshell, nushell is non-POSIX shell, so most of your regular shells knowledge (zsh, bash, ksh, etc…) can't be applied on it, and using it feels like doing functional programming. Is there a reason some shells like fish (and now nushell) are non-POSIX? What is the benefit? I really like fish but I've kept away from it because it's non-POSIX and won't necessarily play well with years of POSIX scripts and knowle…

Is there a reason every PL designer in the world didn't just make a new implementation of Pascal rather than design Python or Java or Rust? :)

Re: Nushell: Introduction to a new kind of shell

#58
post #35

Earlier quoted context omitted.

Powershell is also quite anti-semantic, non-portable and verbose

> anti-semantic Why? > non-portable PowerShell 6 and later run on Windows, macOS, and Linux. > verbose This is by design.

Lol so what happens if I run 'curl' in my PS6 script? Asking for a friend with PTSD.

Re: Nushell: Introduction to a new kind of shell

#59

> In a nutshell, nushell is non-POSIX shell, so most of your regular shells knowledge (zsh, bash, ksh, etc…) can't be applied on it, and using it feels like doing functional programming. Is there a reason some shells like fish (and now nushell) are non-POSIX? What is the benefit? I really like fish but I've kept away from it because it's non-POSIX and won't necessarily play well with years of POSIX scripts and knowle…

Correct me if I’m wrong, but doesn’t POSIX dictate a text stream as STDIN/STDOUT?

If my understanding is correct, this basically rules out any attempts to create richer CLI pipelines that necessitate other kinds of data interchange. IIRC this was one of the motivating factors in the design of PowerShell—though I don’t know PS well enough to say if it’s POSIX complaint or not.

Post reply on HN