146
submitted 9 months ago by Chewy7324@discuss.tchncs.de to c/linux@lemmy.ml
top 20 comments
sorted by: hot top controversial new old
[-] Sibbo@sopuli.xyz 42 points 9 months ago* (last edited 9 months ago)

Wow they actually did it! Congratulations and welcome to the age of second-gen systems languages!

[-] Urist@lemmy.ml 19 points 9 months ago* (last edited 9 months ago)

Seems one of the main reasons is to use Rust's thread safety to enable "concurrent mode". Anyone with the knowledge able to explain what advantages that would yield for an end fish user?

[-] technom@programming.dev 22 points 9 months ago

Here's one issue they hope to solve with this rewrite: https://github.com/fish-shell/fish-shell/issues/238

[-] faho@lemmy.world 4 points 9 months ago

One big, long-standing issue is that fish can't run builtins, blocks or functions in the background or at the same time.

That means a pipeline like

seq 1 5 | while read -l line
    echo line; sleep 0.1; 
end | while read -l line
    echo line; sleep 0.1
end

will have to wait for the first while loop to complete, which takes 0.5s, and then run the second.

So it takes 0.5s until you get the first output and a full second until you get all of it.

Making this concurrent means you get the first line immediately and all of it in 0.5s.

While this is an egregious example, it makes all builtin | builtin pipelines slower.

Other shells solve this via subshells - they fork off a process for the middle part of the pipeline at least. That has some downsides in that it's annoyingly leaky - you can't set variables or create a background job in those sections and then wait for them outside, because it's a new process and so the outer shell never sees them.

[-] PropaGandalf@lemmy.world 12 points 9 months ago

Now we have nu and fish. Great!

[-] Laser@feddit.de 6 points 9 months ago

Interesting that you mention it. I mainly use fish but always do some stuff in nu to check out its progress. They are in my opinion the two most interesting interactive shells at the moment that I know of, the third shell I keep an eye on is oil but rather as a replacement for bash when used in scripts rather than interactive. The project also has ysh which also doesn't look too bad and seems to go in a similar direction as fish.

[-] Hapbt@mastodon.social 2 points 9 months ago

@Chewy7324 seems like it would be easier to have programmers port it than fish

this post was submitted on 16 Jan 2024
146 points (96.2% liked)

Linux

48074 readers
714 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS