Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

81–90 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#81
post #8

Congrats to the fish team! Great writeup with lots of interesting detail. I wonder if this is the biggest project that has moved from C++ entirely to Rust (or maybe even C to Rust?) It probably has useful lessons for other projects. If I'm reading this right, it looks like fish was not released as a hybrid C++ / Rust program, with the autocxx-generated bindings. There was a release during that time, but it says "fish…

> Feature Detection Is Better than Version Detection

The problem with feature detection (normally referred to as configuration probing), at least the way it's done in ./configure and similar, is that it relies on compiling and potentially linking (and sometimes even running, which doesn't work when cross-compiling) of a test program and then assuming that if compilation/linking fails, then the feature is not available.

But the compilation/linking can fail for a myriad of other reasons: misconfigured toolchain, bug in test, etc. For example, there were a bunch of recent threads on this website where both GCC and Clang stopped accepting certain invalid C constructs which in turn broke a bunch of ./configure tests. And "broke" doesn't mean you get an error, it means your build now thinks the latest Fedora and Ubuntu all of a sudden don't have strlen().

Re: Fish 4.0: The Fish of Theseus

#82

Earlier quoted context omitted.

(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.

We've actually added support to make single-binary fish deployments possible by (optionally) bundling static resources that would be part of the CMake-based deployment into the binary itself and having it unwrap those on first execution. The limitations of Cargo and the idiomatic `cargo install` usage primarily motivated this.

Ah interesting, I looked through your build.rs for the "installable" feature, and it looked like you were running sphinx-build in there. Do you plan to ship those artifacts in the .crate file?

Re: Fish 4.0: The Fish of Theseus

#83
post #29

Congrats to the Fish team. The best shell just got better. How about updating the project tagline to: "Finally, a shell for the 00s!"

Thanks but one cannot be too ambitious like that! '00s would mean the end of zip drives, dealing with unstandardized flash drives flakier than the floppy disks of old, and supporting point-and-shoot digital cameras!

I guess the author meant "the shell for '000s", but that's too much to type

Re: Fish 4.0: The Fish of Theseus

#84
Very nice too see Rust being used where it is actually appropriate! Hopefully Rust "easy" multi-threading will allow more parts of fish to be async, even though it's already much better in that regard than bash (or any other shell I've seen).

One weird thing I'd also like to see is more bash integration, as others pointed out that being their primary motivation against switching to fish full-time. My use case is mostly sourcing bashrc/bashevv, and theoretically it should be possible in fish if I understand correctly: you need to be able to import e.g. every new env variable that changed before and after sourcing a bash script via real bash.

Re: Fish 4.0: The Fish of Theseus

#85
post #29

Congrats to the Fish team. The best shell just got better. How about updating the project tagline to: "Finally, a shell for the 00s!"

Thanks but one cannot be too ambitious like that! '00s would mean the end of zip drives, dealing with unstandardized flash drives flakier than the floppy disks of old, and supporting point-and-shoot digital cameras!

That’s true. Better to stick to the 90s where we are safe.

Re: Fish 4.0: The Fish of Theseus

#86
I am curious to ask others here, are there other low-config alternative tools like Fish that, looking back, now seem like a no brainer? Ghostty is a recent example, Helix seems like another. I’d love to know about other tools people are using that have improved or simplified their lives.

Re: Fish 4.0: The Fish of Theseus

#88

> 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"] […

I might be wrong but most optimizing compilers will treat "if false" and the following code as dead and remove it.

Re: Fish 4.0: The Fish of Theseus

#89
post #22

> 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 alm…

It's strange how the article starts off complaining about C++'s platform "issues": > We’ve experienced some pain with C++. In short: > tools and compiler/platform differences before conceding that, because of Rust, they 1) are actually dropping support for a platform they previously supported and 2) can only support (in theory) a small fraction of those platforms supported by g++, but that that's OK because those are…

C++ may run in more places than Rust but that's nothing to do with how good the tooling is. C++ runs everywhere AND its tooling is abysmal.

Re: Fish 4.0: The Fish of Theseus

#90
post #86

I am curious to ask others here, are there other low-config alternative tools like Fish that, looking back, now seem like a no brainer? Ghostty is a recent example, Helix seems like another. I’d love to know about other tools people are using that have improved or simplified their lives.

mise, uv, ruff, starship is my current list.
Post reply on HN