Fish 4.0: The Fish of Theseus

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. fish-shell

    The user-friendly command line shell.

    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 3.7 remains a C++ program" [1]

    It sounds like they could have released if they wanted to, but there was a last stage of testing that didn't happen until the end.

    Some people didn't quite get the motivation for adding C++ features to Rust [2], and vice versa, to enable inter-op. But perhaps this is a good case study. It would be nice if you could could just write new Rust code in a C++ codebase, without writing/generating bindings, and then throwing them away, which is mentioned in this post.

    --

    Also the #1 gripe with Rust seems to be that it supports version detection, not feature detection.

    But feature detection is better for distros, web browsers, and compilers:

    https://github.com/oils-for-unix/oils/wiki/Feature-Detection...

    Version detection is why Chrome and IE pretend to be Mozilla, and why Clang pretends to be GCC. Feature detection doesn't cause this problem!

    [1] https://github.com/fish-shell/fish-shell/releases

    [2] e.g. https://news.ycombinator.com/from?site=safecpp.org

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. oils

    Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

    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 3.7 remains a C++ program" [1]

    It sounds like they could have released if they wanted to, but there was a last stage of testing that didn't happen until the end.

    Some people didn't quite get the motivation for adding C++ features to Rust [2], and vice versa, to enable inter-op. But perhaps this is a good case study. It would be nice if you could could just write new Rust code in a C++ codebase, without writing/generating bindings, and then throwing them away, which is mentioned in this post.

    --

    Also the #1 gripe with Rust seems to be that it supports version detection, not feature detection.

    But feature detection is better for distros, web browsers, and compilers:

    https://github.com/oils-for-unix/oils/wiki/Feature-Detection...

    Version detection is why Chrome and IE pretend to be Mozilla, and why Clang pretends to be GCC. Feature detection doesn't cause this problem!

    [1] https://github.com/fish-shell/fish-shell/releases

    [2] e.g. https://news.ycombinator.com/from?site=safecpp.org

  4. Cargo

    The Rust package manager

    > 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/

  5. remacs

    Rust :heart: Emacs

    Glad to see at least one Rust rewrite successful (unlike [1])!

    [1] https://github.com/remacs/remacs

  6. rsconf

    Build-time configure scripts for Rust

    One thing about rust is that it has always treated cross-compiling as a first-class citizen. Cargo is very intentional about the difference between the HOST and TARGET triplets and you can't mix them up unless you are doing so intentionally.

    The rsconf feature detection crate was similarly designed with cross-compilation in mind from the start and eschews running binaries in favor of some clever hacks to exfiltrate values during the cross-compilation process.

    There is only one rsconf feature that is currently labeled caveat emptor as it does not support cross-compilation; perhaps I can nerdsnipe someone here into figuring out a workaround: https://github.com/mqudsi/rsconf/issues/3

  7. xonsh

    :shell: Python-powered shell. Full-featured and cross-platform.

    Also, do consider xonsh.[1]

    It's a Bash-like shell written in Python. It has significant overlap with the awesomeness of fish, and has the advantage of being able to write your shell scripts in a Python dialect. So if you know Python, the mental burden is much lower.

    On top of that, it's cross platform, since Python is. No WSL needed.

    I switched to it in 2018 and haven't looked back. Originally it was just because I wanted a better command prompt environment in Windows for work, but I liked it so much I switched to it in Linux as well.

    (And yes, you can type any Python statement right in the command prompt).

    [1] https://xon.sh/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts