Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

11–20 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#11
I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient.

Heartily recommend others give it a try as a daily driver for a couple of weeks. I liken it to Sublime Text: an excellent “out of the box” tool. Just the right amount of features, with the option to add more if you want. But you also don’t feel like your missing out if you keep it bare bones. A great tool in and of itself.

Re: Fish 4.0: The Fish of Theseus

#12
> The one platform we care about a bit that it does not currently seem to have enough support for is Cygwin, which is sad, but we have to make a cut somewhere.

> We’re also losing Cygwin as a supported platform for the time being, because there is no Rust target for Cygwin and so no way to build binaries targeting it. We hope that this situation changes in future, but we had also hoped it would improve during the almost two years of the port. For now, the only way to run fish on Windows is to use WSL.

I understand, but this is indeed incredibly sad. To this day I still use Cygwin, and in fact prefer it to WSL depending on what I'm doing. Cygwin is an incredible project that is borderline miraculous for what it accomplished and provides. Without Cygwin I may not have any sanity left. I can't exude enough love for the Cygwin team.

Hopefully rust will support cygwin as a build target in the future!

Re: Fish 4.0: The Fish of Theseus

#13
> The one goal of the port we did not succeed in was removing CMake.

> That’s because, while cargo is great at building things, it is very simplistic at installing them. Cargo wants everything in a few neat binaries, and that isn’t our use case. Fish has about 1200 .fish scripts (961 completions, 217 associated functions), as well as about 130 pages of documentation (as html and man pages), and the web-config tool and the man page generator (both written in python).

Our issue for this is https://github.com/rust-lang/cargo/issues/2729

Personally, I lean away from Cargo expanding into these use cases and prefer another tool being implemented on top. I've written more about this at https://epage.github.io/blog/2023/08/are-we-gui-build-yet/

Re: Fish 4.0: The Fish of Theseus

#14
> it is often better to use if cfg!(...) instead of #[cfg(...)] because code behind the latter is eliminated very early

My experience with this is the other way around, especially if you have crates tied to that feature.

The cfg! is a marco that compiles to true/false, so whatever is inside of the if guard needs to compile regardless.

E.g.:

Cargo.toml

    [features]
    default = []
    my_feature = ["deps:feature_dependency"]

    [dependencies]
    feature_dependency = "1.0.0"
And in code:

    if cfg!(feature = "my_feature") {
        feature_dependency::something::Something::invoke();
    }
This will fail if you compile without `my_feature`.

Re: Fish 4.0: The Fish of Theseus

#15
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

Interesting, I went the other way about 7 years ago - switched from fish to zsh (initially with oh-my-zsh). The interactive experience was similar enough on both shells, and the performance was great on fish and okay-ish on zsh, but two things won me over:

1. With zsh, I can copy-paste some bash snippet and in 99% of cases it will just work. Aside of copy-pasting from StackExchange, I also know a lot of bash syntax by heart by now, and can write some clever one-liners. With zsh, I didn't need to learn everything from scratch. (I guess this matters less now that you can ask AI to convert a bash one-liner into fish one-liner?)

2. For standalone scripts... well, I think it's best to reach for a proper programming language (e.g. Python) instead of any shell language, but if I had to use one, I would pick bash. Sure, it has many footguns, but I know them pretty well. And fish language is also not ideal - e.g. IIRC it doesn't have an equivalent of `set -e`, you have to add `; or return 1` to each line.

Re: Fish 4.0: The Fish of Theseus

#16

> it is often better to use if cfg!(...) instead of #[cfg(...)] because code behind the latter is eliminated very early My experience with this is the other way around, especially if you have crates tied to that feature. The cfg! is a marco that compiles to true/false, so whatever is inside of the if guard needs to compile regardless. E.g.: Cargo.toml [features] default = [] my_feature = ["deps:feature_dependency"] […

That was the point. The paragraph is talking about how errors only show up in some configurations, leading to “works for me” behavior for some of the devs. When you can get away with cfg!, you are more confident that it will at least compile regardless of the config being checked.

Re: Fish 4.0: The Fish of Theseus

#17
post #10

> Fish also uses threads for its award-winning (note to editor: find an actual award) autosuggestions and syntax highlighting, and one long-term project is to add concurrency to the language. (note to editor: find an actual award)

The two most popular zsh plugins are total clones of this at 31k and 20k gh stars respectively. Not an award but certainly an indication of its success.

Having used zsh with those plugins for a while and not having used fish personally, I'll nominate them for "most desirable plugins to copy for your own shell to make it more user-friendly".

Re: Fish 4.0: The Fish of Theseus

#18

> Fish also uses threads for its award-winning (note to editor: find an actual award) autosuggestions and syntax highlighting, and one long-term project is to add concurrency to the language. (note to editor: find an actual award)

They should make an award, like RL Stein did

https://x.com/RL_Stine/status/1337768882988347393

Re: Fish 4.0: The Fish of Theseus

#19
post #13

> The one goal of the port we did not succeed in was removing CMake. > That’s because, while cargo is great at building things, it is very simplistic at installing them. Cargo wants everything in a few neat binaries, and that isn’t our use case. Fish has about 1200 .fish scripts (961 completions, 217 associated functions), as well as about 130 pages of documentation (as html and man pages), and the web-config tool an…

(hi Ed!)

I would definitely love to see Cargo have the ability to do this -- it means that `cargo install --locked` stays as a viable approach. It probably won't apply to fish, but I think being able to run a post-install command from the binary you just installed would suffice for my needs.

Post reply on HN