Earlier quoted context omitted.
hashbrown, smawk, corasick, parking_lot, itoa, ryu Writing in Rust looks like casting spells in an Infocom game. Gnusto rezrov!
Really? itoa is one of your "magic incantations"? https://en.m.wikibooks.org/wiki/C_Programming/stdlib.h/itoa I get the others, but that ones a pretty standard type converter, the opposite of the C standard atoi
Show HN: tere – A Faster Alternative to cd+ls
181–190 of 206 posts
Re: Show HN: tere – A Faster Alternative to cd+ls
#182Earlier quoted context omitted.
I wonder, have you considered D? Seems almost ideal to me for this kind of small tooling, and it's unlikely to break because of dependency version changes caused by the thirty-seventh party.
Rust is also unlikely to break because of dependency version changes caused by the thirty-seventh party. Despite similarly large dependency trees, the Rust ecosystem takes backwards compatibility much more seriously than e.g. the JavaScript ecosystem.
Re: Show HN: tere – A Faster Alternative to cd+ls
#183Earlier quoted context omitted.
Rust is also unlikely to break because of dependency version changes caused by the thirty-seventh party. Despite similarly large dependency trees, the Rust ecosystem takes backwards compatibility much more seriously than e.g. the JavaScript ecosystem.
Well, I should hope so. Nevertheless every dependency removed completely removes even the possibility of such breakage.
Re: Show HN: tere – A Faster Alternative to cd+ls
#184Earlier quoted context omitted.
I can assure you this Rust library did not invent the term https://trends.google.com/trends/explore?date=all&geo=US&q=s...
Sadly all I'm constantly getting is "429. That’s an error."
Re: Show HN: tere – A Faster Alternative to cd+ls
#185Re: Show HN: tere – A Faster Alternative to cd+ls
#186Do people actually still use cd + ls? At least in bash, you get a similar experience just typing a cd command and tab-completing the path elements - bash shows a listing of matches when your command is ambiguous, no `ls` required.I'll still check it out as I can see fuzzy-search being more useful but muscle memory is hard to change.
cd tab tab directories listed
cat tab tab files listed
(this^^ is on Debian, it can probably be changed but I've not looked into it)
it's pretty annoying when I'm halfway through and want to use tab tab as a periscope to see all file+dirs
Re: Show HN: tere – A Faster Alternative to cd+ls
#187Congrats for getting this out! > I also wanted an excuse to learn This is the best reason ever, and not just for you: seeing your GIF I thought "could I achieve that with fzf?". Turns out, yes I can: function fcd() { local dir; while true; do # exit with ^D dir="$(ls -a1p | grep '/$' | grep -v '^./$' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)" if [[ -z "${dir}…
Re: Show HN: tere – A Faster Alternative to cd+ls
#188Earlier quoted context omitted.
Atrocious but exceptionally battle-tested?
It was the best option a long while ago, and basically resulted in a kind of vendor lock in of sorts. Musl is far superior as a libc, but most Linux software is written for glibc and has quirks that make porting hard.
Anyway, GLibc is just better, both in terms of performance (algorithms are more optimized, at the cost of a bigger executable size) and in terms of available features.
Re: Show HN: tere – A Faster Alternative to cd+ls
#189Congrats for getting this out! > I also wanted an excuse to learn This is the best reason ever, and not just for you: seeing your GIF I thought "could I achieve that with fzf?". Turns out, yes I can: function fcd() { local dir; while true; do # exit with ^D dir="$(ls -a1p | grep '/$' | grep -v '^./$' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)" if [[ -z "${dir}…
Thanks for the kind words! :) While digging up alternatives (of course after I had already written most of the functionality), I briefly tried out fzf. I think at that time I couldn't find an example snippet like yours to do the cding, so I didn't look into it much more. With some basic settings, it was also not easy (or even possible?) to go up in the folder tree, but I see that your example handles that. If you're…
Re: Show HN: tere – A Faster Alternative to cd+ls
#190Earlier quoted context omitted.
It was the best option a long while ago, and basically resulted in a kind of vendor lock in of sorts. Musl is far superior as a libc, but most Linux software is written for glibc and has quirks that make porting hard.
Musl is liked since it has a non-copyleft license and thus can be used to produce statically-linked executable that are distributed with proprietary licenses. Also Musl is smaller than GLibc thus more suitable for embedded systems. Anyway, GLibc is just better, both in terms of performance (algorithms are more optimized, at the cost of a bigger executable size) and in terms of available features.
Not only for that. As much as I love copyleft, I'm really happy that musl exists so that I can easily test my programs locally for portability. Compiling stuff with different compilers and libraries exposes at once all sorts of weird bugs before you get to publish your codes.