News for hackers. Stuff that matters.
Re:Show HN: tere – A Faster Alternative to cd+ls by mgunyho on Friday July 15, 2022 @06:13AM (#32106560)
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) unicode handling, and I think adding extra features (proper arg parsing, json for history file etc) would be way more painful.

Re:Show HN: tere – A Faster Alternative to cd+ls by capdeck on Friday July 15, 2022 @02:04PM (#32111068)
I disagree with "bloat" comments. First, the binary will only have stuff you use. Secondly, the fact that you are not writing from scratch code that someone else had more time to write and test - this is a huge plus. I'd use your implementation any day vs. something that someone could put together in C with no dependencies and remarkable pointer math equilibristics.

As long as the use of dependencies remains reasonable, the number of dependencies does not immediately mean that the code is "bloated".

Re:Show HN: tere – A Faster Alternative to cd+ls by jhgb on Friday July 15, 2022 @09:29AM (#32107970)
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.
Re:Show HN: tere – A Faster Alternative to cd+ls by mgunyho on Friday July 15, 2022 @10:01AM (#32108302)
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 by jhgb on Friday July 15, 2022 @10:07AM (#32108369)
Fair enough; "I wanted to try out X" is always a valid reason. It's just that compared to C, things like Unicode support, argument parsing and JSON support are already part of D's standard library so no dependencies should be required for those.
Re:Show HN: tere – A Faster Alternative to cd+ls by cillian64 on Saturday July 16, 2022 @04:43AM (#32116245)
> unlikely to break because of dependency version changes caused by the thirty-seventh party.

With rust you just check in your Cargo.lock file to your VCS and then the versions of your dependencies and their dependencies (etc) are pinned, so if it works now then it will always work. For dependencies on crates.io authors don’t even have the option to remove a version once it’s published.

Upgrading dependencies is an explicit operation, so you only do it when required and run your tests afterwards.

In practice I’ve had far fewer issues with dependency versions using rust than I’ve had using dynamic system libraries in the C/C++ ecosystem

Re:Show HN: tere – A Faster Alternative to cd+ls by nicoburns on Friday July 15, 2022 @04:09PM (#32112222)
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 by jhgb on Friday July 15, 2022 @04:22PM (#32112344)
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 by nicoburns on Friday July 15, 2022 @04:27PM (#32112398)
I mean sure, but it means you have to maintain that functionality yourself. Often DIY implementations are not as robust as the versions in battle tested libraries with lots of eyes. So you can easily end up with more problems overall.