Live data from Hacker News

GitHub – nushell/nushell: A new type of shell

github.com

101–110 of 411 posts

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

#101
post #93
post #65

Earlier quoted context omitted.

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…

100% agree. I find it very funny, but in a sarcastic and totally wrong way, when a project's README has an Install section that reads: Run "cargo install myProject" I know Rust, so Cargo is not alien to me. But come on, you know that your install instructions are a bit shitty. Please, choose a target distro, then test your instructions in a clean Docker container. THEN you can sit down knowing you wrote proper guidan…

Hold on, do you not see the insane contradiction of not wanting to rely on having cargo installed but requiring something is deployable and tested in a docker container? What?!

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

#102
post #30

Need some description up front, not in the 5th section ("Philosophy" https://github.com/nushell/nushell#philosophy ). Some ideas: "powershell for unix", "structured pipes", "pre-parsed text", "small, useful, typed tools loosely coupled."

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

Am I missing something cool by not looking into PowerShell for Linux? Anyone using it could chime in and share how it improves their workflow? What kind of tools does it bring to the table?

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

#104
post #71
post #45

Earlier quoted context omitted.

Try fish shell. It has auto completion by default and is easy to configure with web interface "fish_config", no need to rely on some community repo like oh-my-zsh. There can be bugs if you set it as default shell but i just append "fish" at the end of my .bashrc :)

It's so interesting - it seems that fish is getting more and more popular lately. I tried it ~7 years ago and thought it was severely lacking, so I just stuck with zsh and have never really had a reason to look back. Maybe I'll check out fish again at some point - what features does it have that drew you to it?

Almost everything that you might get from oh-my-zsh is built in and it's _much_ faster. I've been using Fish for a few years now and I love it.

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

#105
post #83

Earlier quoted context omitted.

> You could redirect 4>&1 1>/dev/null For anyone confused by this, 1 is the output to stdout, and 4 is being redirected to where 1 goes, which is stdout. Unrelated to that, 1 (what’s actually being output to stout by the application) is being redirected to /dev/null. The order of operations matters. If 1 was redirected to /dev/null first, then 4 would also end up in /dev/null. As it stands now, that doesn’t happen.

So you are supposed to read it from right to left? "First take 1 and throw it away. Next put 4 in 1." Is that how it works?

Not quite. Left to right: copy the descriptor 1 onto descriptor 4, change descriptor 1 to result of open("/dev/null").

The >& is for copying the descriptor not for aliasing ("hardlinking") it.

The descriptor is the "fd" argument, e.g.:

write(int fd, const void *buf, size_t count)

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

#106
post #101
post #93

Earlier quoted context omitted.

100% agree. I find it very funny, but in a sarcastic and totally wrong way, when a project's README has an Install section that reads: Run "cargo install myProject" I know Rust, so Cargo is not alien to me. But come on, you know that your install instructions are a bit shitty. Please, choose a target distro, then test your instructions in a clean Docker container. THEN you can sit down knowing you wrote proper guidan…

Hold on, do you not see the insane contradiction of not wanting to rely on having cargo installed but requiring something is deployable and tested in a docker container? What?!

If its deployable and tested in a docker container its much easier to generate user images, it takes the onus away from the user and the developer can just put it on the aur/publish a deb

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

#107
Thinking this is so cool! I was wondering if seriously buying into an alternate shell like this would be worth it in the long run.

Would really love to read from people who use(d) an alternative shell, both success and failure stories.

I cannot shake from my head the idea that buying into a non-standard shell will only work for personal projects in one's own workstation, but it won't fly too far for company work because you'd then be introducing an implicit dependency on your special snowflake non-standard runtime. Which is something we came to accept and assume for interpreted languages (Python, Ruby, Node, etc.) but I'm not yet ready to assume for shell scripts.

So right when I was going to test Nushell, I discover there are also other shells like Elvish [0] and Oil which supports structured data [1]. Now on top of my hesitations I'm adding decision paralysis :-]

[0]: https://elv.sh/

[1]: https://www.oilshell.org/

Lots more shells: https://github.com/oilshell/oil/wiki/Alternative-Shells

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

#108
post #82

Earlier quoted context omitted.

I've used it and I can relate to the comment. Maybe your assumptions are off in there, but I think the main point you were trying to make is that it's complicated. It's so complicated that you really need a repl to be able to work with it efficiently. It's a bit like how programming Java is simple if you do it in Idea or back then in eclipse, but in a pure editor it's impossible to remember all the boilerplate.

Can you write a bash one-liner that gets the free memory of your system? Is the awk blackmagic better than selecting an item of an object? Of course new things will be harder to write but it’s a people problem not something inherent with PS.

is the writing part really what we should focus on in scripting though?

i personally would've put much more weight into the ease of reading and understanding the code.

personally, i think that PS just came too late, so most people (me included) are too used to the way the unix shell works/feels. It would have to be just straight up better in all regards to displace it, but its more like a different flavor entirely. It however a very interesting take on scripting, in my mind it was more comparable to python repl then bash though, but i haven't really used it much.

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

#109
post #83

Earlier quoted context omitted.

> You could redirect 4>&1 1>/dev/null For anyone confused by this, 1 is the output to stdout, and 4 is being redirected to where 1 goes, which is stdout. Unrelated to that, 1 (what’s actually being output to stout by the application) is being redirected to /dev/null. The order of operations matters. If 1 was redirected to /dev/null first, then 4 would also end up in /dev/null. As it stands now, that doesn’t happen.

So you are supposed to read it from right to left? "First take 1 and throw it away. Next put 4 in 1." Is that how it works?

No, it’s like assigning variables. The second part overwrites the value of 1, but the first part is still using the old value.

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

#110
post #54

Earlier quoted context omitted.

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.

If somebody tried to introduce the Unix shell syntax today, they would be laughed out of the room. Nobody would be able to take something so utterly nonsensical seriously.

The only reason anyone accepts it is that it has always been there. But if you actually look at it critically, it is hot garbage.

Post reply on HN