Earlier quoted context omitted.
I tried to avoid bloat as much as possible, and I would argue that the non-transitive deps are pretty essential. I'l look into tweaking some features as suggested in sibling to trim it further down. But you're right that it could always be simpler, in fact I wrote tere originally in C with curses as the only dependency, and it compiles >10x faster. But there I had to manually write some (pretty certainly buggy) unico…
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.
Show HN: tere – A Faster Alternative to cd+ls
91–100 of 206 posts
Re: Show HN: tere – A Faster Alternative to cd+ls
#92Earlier 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.
Not really. The main reason for choosing Rust was to try it out, because it's the new cool thing. And I do find it really enjoyable. Rust is also trying very hard to keep dependency-related breakage to a minimum, and I think the Cargo ecosystem is doing a great job at that.
Re: Show HN: tere – A Faster Alternative to cd+ls
#93curl https://raw.githubusercontent.com/mgunyho/tere/master/Cargo.lock | grep source | wc -l 51 How come that such a simple tool has more than half a century of dependencies? This is terrifying.
The "too many dependencies" meme is far too often an example of Chesterton's Fence. The answer to your question "How come a simple thing is more complex than I first thought?" is: "Because you've spent less time thinking about it than the author".
Whether this is better or worse seems to be a matter of contention for a lot of people, but it certainly poses a challenge for supply-chain auditing. I suspect for Rust to truly ever replace C++ in its domain, the ecosystem is going to need to come up with something like boost so you can grab one library that does all the things nearly any program wants (regex, serialization, cli opts, etc) but that don't get included in the core language's stdlib.
Re: Show HN: tere – A Faster Alternative to cd+ls
#94Congrats 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}…
FYI: I think you meant "contagious" rather than "contaminating". The latter means to make something impure whereas the former means more to spread something. :)
The best one I've seen recently was a fellow enthusing about the descendant of Plan 9 who wrote, "I'll always singe the praises of Inferno!".)
Re: Show HN: tere – A Faster Alternative to cd+ls
#95curl https://raw.githubusercontent.com/mgunyho/tere/master/Cargo.lock | grep source | wc -l 51 How come that such a simple tool has more than half a century of dependencies? This is terrifying.
The deps for each of these packages is really out of the authors hands, this is really the same for any programming language though which need to pull in dependencies of their own.
Re: Show HN: tere – A Faster Alternative to cd+ls
#96Congrats 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
#97Earlier quoted context omitted.
Well, that's Rust for you. They somehow think that having a boatload of dependencies with nondescript names (smawk, parking_lot_core, serde, clap - I feel like I'm having a stroke) is a feature. I'm not even joking.
Serde is a common term meaning "serialization/deserialization," seems pretty descript to me.
Re: Show HN: tere – A Faster Alternative to cd+ls
#98Congrats 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}…
function fcd() {
local dir;
while true; do
# exit with ^D
dir="$(ls -a1F | grep '[/@]$' | grep -v '^./$' | sed 's/@$//' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)"
if [[ -z "${dir}" ]]; then
break
elif [[ -d "${dir}" ]]; then
cd "${dir}"
fi
done
}Re: Show HN: tere – A Faster Alternative to cd+ls
#99curl https://raw.githubusercontent.com/mgunyho/tere/master/Cargo.lock | grep source | wc -l 51 How come that such a simple tool has more than half a century of dependencies? This is terrifying.
`cargo tree` output: tere v1.0.0 ├── clap v3.0.10 │ ├── bitflags v1.3.2 │ ├── indexmap v1.8.0 │ │ └── hashbrown v0.11.2 │ │ [build-dependencies] │ │ └── autocfg v1.1.0 │ ├── os_str_bytes v6.0.0 │ │ └── memchr v2.4.1 │ ├── strsim v0.10.0 │ ├── terminal_size v0.1.17 │ │ └── libc v0.2.126 │ └── textwrap v0.14.2 │ ├── smawk v0.3.1 │ ├── terminal_size v0.1.17 (*) │ ├── unicode-linebreak v0.1.2 │ │ [build-dependencies] │ │…
Re: Show HN: tere – A Faster Alternative to cd+ls
#100Earlier quoted context omitted.
Well, that's Rust for you. They somehow think that having a boatload of dependencies with nondescript names (smawk, parking_lot_core, serde, clap - I feel like I'm having a stroke) is a feature. I'm not even joking.
Serde is a common term meaning "serialization/deserialization," seems pretty descript to me.