Live data from Hacker News

Fish 4

github.com

11–20 of 113 posts

Re: Fish 4

#11
> However, there should be no direct impact on users.

I find this quite impressive, that they rewrote the whole Fish core, but everything keeps working exactly in the same way (except very few minor things which change in only minor ways, which they list).

Re: Fish 4

#12
post #5

Fish 4.0: The Fish Of Theseus ( https://fishshell.com/blog/rustport/ ) is the full story of their rewrite from C++ to Rust. Discussed on HN here - https://news.ycombinator.com/item?id=42535217 (906 points, 198 comments). Highlights of the rewrite - 1155 files changed, 110247 insertions(+), 88941 deletions(-) (excluding translations) - 2604 commits by over 200 authors - 498 issues - Almost 2 years of work - 57K Lines…

I'm surprised Rust took more lines. Perhaps formatter makes shorter lines due to method chaining? Or improved test suite?

Rust, IMO is a noisy language. So not surprising it took more lines.

Having to handle every case of every branch also probably balloons line count.

Efficient LOC is not a goal of rust at all anyway.

Re: Fish 4

#14
post #5

Fish 4.0: The Fish Of Theseus ( https://fishshell.com/blog/rustport/ ) is the full story of their rewrite from C++ to Rust. Discussed on HN here - https://news.ycombinator.com/item?id=42535217 (906 points, 198 comments). Highlights of the rewrite - 1155 files changed, 110247 insertions(+), 88941 deletions(-) (excluding translations) - 2604 commits by over 200 authors - 498 issues - Almost 2 years of work - 57K Lines…

I'm surprised Rust took more lines. Perhaps formatter makes shorter lines due to method chaining? Or improved test suite?

Rust code defenitely takes more space with default formatter settings if you use functional paradigms. Every chained function call in many cases is one extra line. Default line width is not much anyway. Also if you handle all return types, lines will add up.

Since there are quite many contributors, it can be difficult to introduce some advanced macro requirements for the project, which could reduce the code.

Re: Fish 4

#15
post #5

Fish 4.0: The Fish Of Theseus ( https://fishshell.com/blog/rustport/ ) is the full story of their rewrite from C++ to Rust. Discussed on HN here - https://news.ycombinator.com/item?id=42535217 (906 points, 198 comments). Highlights of the rewrite - 1155 files changed, 110247 insertions(+), 88941 deletions(-) (excluding translations) - 2604 commits by over 200 authors - 498 issues - Almost 2 years of work - 57K Lines…

I'm surprised Rust took more lines. Perhaps formatter makes shorter lines due to method chaining? Or improved test suite?

According to the blog post (https://fishshell.com/blog/rustport/#fn:formatting):

> A lot of the increase in line count can be explained by rustfmt’s formatting, as it likes to spread code out over multiple lines [...] The rest is additional features. Also note that our Rust code is in some places a straight translation of the C++, and fully idiomatic Rust might be shorter.

Re: Fish 4

#16
post #8
post #4

The most interesting thing about Fish 4.0.0 for most people will be that it is now written in Rust, which they talk about here [1]. Looking forward to testing it out and seeing if there are any noticeable differences. [1] https://github.com/fish-shell/fish-shell/pull/9512

I'll be curious if it's faster.

It’s broadly the same speed currently, but the goal was always to do a simple port to start with, then iterate from there.

Re: Fish 4

#17

> However, there should be no direct impact on users. I find this quite impressive, that they rewrote the whole Fish core, but everything keeps working exactly in the same way (except very few minor things which change in only minor ways, which they list).

If they managed to keep all the bugs as well and not to reduce them, that would be especially impressive.

Re: Fish 4

#18
post #6

I've used Fish for many years, but frankly only for the great autocompletion. The streamlined theme/prompt system and oh-my-fish plugin management are quite nice too, but minor. The rest of Fish features that are not bash-compatible are rather a pain, particularly environment variable management. In principle these features have a better design than in bash, but not that much better, and their use is infrequent enoug…

The better syntax used to be a selling point, but now with AI being able to generate any trivial one-liner and minor scripts you need on a day-to-day basics, have a bad syntax would only affect bigger projects, which I would not write in Fish shell anyway. It's a hard sell.

Speak for yourself, but I would not want to be beholden to AI for every trivial shell one-liner. "Sorry boss, ChatGPT is down, I can't count how many *.txt files are in this directory. See you tomorrow!"

I'll take the better syntax, thanks.

Re: Fish 4

#19
post #17

> However, there should be no direct impact on users. I find this quite impressive, that they rewrote the whole Fish core, but everything keeps working exactly in the same way (except very few minor things which change in only minor ways, which they list).

If they managed to keep all the bugs as well and not to reduce them, that would be especially impressive.

https://xkcd.com/1172/
Post reply on HN