Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

171–180 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#171

Earlier quoted context omitted.

I fully expect fish 4.0 to be in openwrt (because openwrt runs on x86_64), but what percentage openwrt machines have the space to run it would be interesting (I suspect it won't be an issue, as likely those near the lower limit of openwrt are probably sticking with busybox anyway, and not installing a different shell). Personally, what I want is inexpensive hardware (routers, but also storage devices) that don't use…

I know rust-fish is being used on at least some non-x86_64 non-aarch64 routers because we've accepted patches by those users to make it build on platforms without native 64-bit CAS.

IIUC lacking 64-bit CAS is an example of a place where on the surface the Rust situation looks worse than C++ but that's misleading

In this scenario C++ will provide "atomic" types that are just locking - they work but they don't have the behaviour you presumably wanted - and Rust will say OK, there's no 64-bit CAS so you can't have these features.

If all you actually needed was a type that has apparently atomic behaviour then I guess the C++ feature is perfect, but I'm assuming almost nobody asks for an atomic type if they would have accepted a locked type instead and so for them Rust saying "No, sorry" is actually a good heads up that they need to think again for this target.

Re: Fish 4.0: The Fish of Theseus

#172
post #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 availabl…

I generally think autoconf etc should be defined to expect certain things by default (keyed by OS), and fail loudly rather than auto-disabling those features. If you really don't want those features, pass in --disable-foo.

I re-did Firefox's autoconf to do this back around 2010 (was contracting for Mozilla as a part-time job in college), after running into one too many features that were automatically disabled because of a missing library. There was at least one Firefox nightly that was missing an important feature because the build machine didn't have the required library.

Re: Fish 4.0: The Fish of Theseus

#174
post #81

Earlier quoted context omitted.

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

I generally think autoconf etc should be defined to expect certain things by default (keyed by OS), and fail loudly rather than auto-disabling those features. If you really don't want those features, pass in --disable-foo. I re-did Firefox's autoconf to do this back around 2010 (was contracting for Mozilla as a part-time job in college), after running into one too many features that were automatically disabled becaus…

Yes! Please fail if a feature tells me its on by default but it can't be enabled for whatever reason. Otherwise I need to hope that, among all the output of the configure script, I didn't miss anything about the script choosing to disable a feature.

Re: Fish 4.0: The Fish of Theseus

#175
post #62

Earlier quoted context omitted.

It's 'easier' for some people but you lose GNU bash compatibility and it kinda underlines all of the issues with interactive only shell systems -- a lack of interoperability. It's honestly a non-issue in the current year to learn zsh or tcsh

On the other hand, fish being a clean-room shell implementation not beholden to the baggage of legacy systems is immune to some crazy behaviors or vulnerabilities that other shells - including zsh - are prone to: https://yossarian.net/til/post/some-surprising-code-executio... Compatibility has also come a long way in recent releases; you should give it a try.

I don't have a system capable of building rust applications so no thank you

Re: Fish 4.0: The Fish of Theseus

#176
post #145
post #42

Earlier quoted context omitted.

I “devolved” mostly along the same path. Bespoke shell to OMZSH to Zsh to Bash. Zsh has a few nasty Bashism footgun incompatibilities. If I remember correctly the worst one is with how globbing / “*” works, which is why that is guarded with an option. My main reason for sticking with Bash is that it’s everywhere, and the places where it isn’t try very hard to support the most-used featureset of Bash. A stock Bash she…

Bash on osx is pretty old due to avoiding GPLv3. I think they have zsh as the default login shell

True. But it’s easy to install Bash 5 via Homebrew or MacPorts.

Re: Fish 4.0: The Fish of Theseus

#177

Earlier quoted context omitted.

Just fyi, you should use `#!/usr/bin/env bash` instead of `#!/bin/bash` or whatever because you can't assume the location of bash (but the location of `env` is indeed portably fixed). e.g. FreeBSD (and macOS?) has bash at `/usr/local/bin/bash`

bash is /bin/bash on macOS, unless the user really likes bash, in which case it's probably /opt/homebrew/bin/bash or /opt/local/bin/bash

I wouldn't say I particularly like bash, bash has seen a ton of improvements since Apple stopped updating the vendored version. Using that old bash which is frozen for non-technical reasons just seems stupid to me.

If you don't want bash-specific features, you might as well use zsh or dash or whatever lives in /bin/sh. If you do want bash-specific features, you might as well take advantage of the latest and greatest.

On that note, on my Macs, the bash I want is usually /opt/pkg/bin/bash or /run/current-system/sw/bin/bash :)

Re: Fish 4.0: The Fish of Theseus

#178
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.

Agree with you on helix. I love it. Atuin for improved history search. Starship for an improved shell prompt. zoxide - better cd ripgrep - better grep just - a command runner. I put project specific commands/scripts in there so I don’t have to remember. All of these are indispensable for me.

+1 for atatuin

Re: Fish 4.0: The Fish of Theseus

#180

I would love to use fish, but it seems there really isnt a oh-my-zsh equivalent. I dont even need the OMZ prompt (i use starship for that), but the aliases from the kubectl and git plugins are just so great to have if you use kubectl and git often. Other plugins (like colored-man-pages, fzf-tab and syntax-highlighting) are also nice. Is there something like that for fish? Oh-my-fish has some of those features, but it…

Have you ever tried https://ohmyposh.dev/docs/installation/prompt with fish?
Post reply on HN