News for hackers. Stuff that matters.
Re:GitHub – nushell/nushell: A new type of shell by kaba0 on Wednesday June 16, 2021 @03:51AM (#27525999)
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.
Re:GitHub – nushell/nushell: A new type of shell by rjzzleep on Wednesday June 16, 2021 @04:13AM (#27526124)
I find cut easier to use than remembering awk syntax. So I get where you're coming from, but it's just a tad disingenuous don't you think? Especially since `free` `man free` is definitely easier to remember than Get-Whateverfunctioncall is
Re:GitHub – nushell/nushell: A new type of shell by vips7L on Wednesday June 16, 2021 @08:01AM (#27527533)
Is it easier? Because I would expect man free to go to the C stdlib.h definition.

You’re just familiar with the former and not the latter currently.

Re:GitHub – nushell/nushell: A new type of shell by rjzzleep on Wednesday June 16, 2021 @10:11AM (#27528666)
Your assumption is wrong. Why would you double down on a bad argument? Don't you have a linux environment to type man free in before making that claim?

It's just an overall bad argument. I don't see how `Get-CimInstance -Class Win32_OperatingSystem` is in any way memorable

https://www.google.com/search?q=man+free

Re:GitHub – nushell/nushell: A new type of shell by vips7L on Wednesday June 16, 2021 @02:58PM (#27532154)
How is expecting man free to point to the stdlib function a bad argument? man malloc goes to the function so why shouldn't man free? How would anyone just know that the command free exists _without already being familiar with a linux environment_ ?
Re:GitHub – nushell/nushell: A new type of shell by reallydontask on Wednesday June 16, 2021 @10:55AM (#27529200)
man free for me shows the BSD library functions manual, maybe it's different in Linux
Re:GitHub – nushell/nushell: A new type of shell by Arnavion on Wednesday June 16, 2021 @03:05PM (#27532214)
It's the same on Linux, depending on what manpages you have installed. free(1) is the binary. free(3) and free(3p) are the C function.

If you have more than one installed, `man` might decide to show the first one or it may interactively ask you to pick one, depending on whether it's been configured to be "posixly correct" or not.

Re:GitHub – nushell/nushell: A new type of shell by rjzzleep on Wednesday June 16, 2021 @11:20PM (#27535838)
procps may not be installed by default on BSDs or VMS or whatever other *nix flavour the person has. But then again quite a few of those systems also don't use bash as default shell(or at least didn't use to), so when the person above asks about "writing a bash script to just do" it's safe to make some assumptions about the target audience.
Re:GitHub – nushell/nushell: A new type of shell by 411111111111111 on Wednesday June 16, 2021 @04:36AM (#27526251)
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 by jamincan on Wednesday June 16, 2021 @08:46AM (#27527881)
I think bash is only readable because pretty much everyone is already familiar with the syntax. Given someone with no experience, they would probably have more success understanding what a Powershell script is doing.
Re:GitHub – nushell/nushell: A new type of shell by 411111111111111 on Wednesday June 16, 2021 @10:07AM (#27528627)
> 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.

I'm getting confused here, Isn't that literally what I said?

Re:GitHub – nushell/nushell: A new type of shell by AnIdiotOnTheNet on Wednesday June 16, 2021 @09:31AM (#27528321)
Wait, are you seriously trying to tell me that bash is more readable than PowerShell? Excuse me, but what alternate timeline did you accidentally stumble in from?
Re:GitHub – nushell/nushell: A new type of shell by 411111111111111 on Wednesday June 16, 2021 @09:46AM (#27528457)
I did not say that, no.

I said that a lot of people (me included) are more used to Unix shell scripting. If PS had been released 30yrs ago, things wouldve probably been different. People have however already become comfortable with Unix shells, so it needs significant improvements to convince them to switch the tool of choice. While PS does have improvements, they're not significant enough to relearn everything.

To me, Unix scripts are more readable though, this is simply because Ive been writing them for so many years now, while I barely touched any PS code.

Re:GitHub – nushell/nushell: A new type of shell by AnIdiotOnTheNet on Wednesday June 16, 2021 @09:52AM (#27528497)
I very much disagree. There's a reason this is funny:

https://xkcd.com/1168/