Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

201–204 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#201

Amazing write up! Everyone at work is itching to try Rust, but I think what’s killing adoption is that it’s not very clear how to gradually transition a code base. We have a few million lines of C++, some of it written 25 years ago. A full rewrite is just out of the question, at best we could use it for new sections. This is super common in the c++ world, so it’s a pity that porting wasn’t a first class concern in ru…

If you codebase isn't somewhat modern C++(C++11) I would start there before concidering a port to rust. It will be a significantly easier upgrade in safety even if not going all the way to rusts level of safety.

Generally code that has been running for years is unlikely to have too many bugs since they have been shaken out, "rewrite it in Rust" as a fad just ignores the decades of work already put into the codebase and for large codebases likely eont succeed.

As you mentioned, write new modules with rust. That means likely needing to export a C API for your libraries but there's a good chance you were already doing that. There was also a rust crate that tried to automate most of the c++ rust interop for you but not sure about how good it is in reality.

Re: Fish 4.0: The Fish of Theseus

#202

Earlier quoted context omitted.

FWIW, fish is much more bash-compatible these days. We've introduced support for a lot of bash-isms that don't completely break the fish spirit or clash with its syntax in the last few releases.

Thanks! I'm trying fish once in a while, and currently, the following are missing: $ cat

In regards to the former, you use the psub function instead of special syntax (a pattern that fish often follows):

$ cat (echo Hello | psub)

Re: Fish 4.0: The Fish of Theseus

#203

Earlier quoted context omitted.

FWIW, fish is much more bash-compatible these days. We've introduced support for a lot of bash-isms that don't completely break the fish spirit or clash with its syntax in the last few releases.

Thanks! I'm trying fish once in a while, and currently, the following are missing: $ cat

Also, fish doesn't have here-strings/here-docs, I believe. That is far and away the main thing I miss in fish.

Re: Fish 4.0: The Fish of Theseus

#204

Earlier quoted context omitted.

To answer your first question specifically, yes. With fish you get substantial ergonomic improvements over bash and ash out of the box. There's also a very minimal learning curve since these features build on familiar idioms. There are some differences with fish as a language that take some getting used to, but bash is always one command away if needed for more complex stuff. It's absolutely worth a test drive to see…

set it to default on my laptop. the prompt was a bit noisy by default, and a bit too colourful, but it was very easy to configure. the autocomplete has also helped me out a few times already, much nicer than bash's

Yeah, simplifying the prompt a bit was one of the first things I did too, and the configuration is smooth indeed. Hope you're still enjoying it. There are some nice things to discover after a while, like the context aware features and some intuitive keybindings. My favorite in the latter category might be ctrl-p/arrow up to reverse search after entering some text.
Post reply on HN