News for hackers. Stuff that matters.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by gsliepen on Tuesday November 05, 2024 @02:23PM (#42054415)
I'm sure this library does the thing it claims to do very nicely. However, as a programmer I am saddened that so many things that should have been in the standard library by now need to come from external repositories and have a weird and unintuitive names.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by lesuorac on Tuesday November 05, 2024 @02:39PM (#42054542)
I kind of like the "thin" stdlib approach tbh.

Rather than having 3-5 ways to do a say a GUI from the stdlib you have 0 and instead you can pick a dependency that suits your way.

That then boils down to even data structures, there's a bunch of trade-offs to be made where one is better than the other and if Rust had to maintain 30 different types of maps for each use case that seems like a waste of their time. Push that work off to the people that need those maps.

Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by willothy on Tuesday November 05, 2024 @03:48PM (#42055023)
I agree with this take a lot. I think having lots of custom implementations is inevitable for systems languages - the only reason why Rust is different is because Cargo/crates.io makes things available for everyone, where in C/C++ land you will often just DIY everything to avoid managing a bunch of dependencies by hand or with cmake/similar.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by seanw444 on Tuesday November 05, 2024 @04:44PM (#42055449)
I'm torn. I don't write Rust much at all, but I have been playing around with it a little here and there for the last couple years. When I first tried it out, I was shocked that almost nothing I was looking for could be found in the stdlib. I thought I was looking in the wrong place. Coming mostly from the Go world, it was jarring to me when it turned out that out no, it really just barely has a stdlib.

Now after on some pondering though, there is a strength in that the Rust team doesn't have to focus on maintaining such a large stdlib, as you said. I find myself using external libraries for many things in Go already, so why not just extend that to slightly more fundamental things with lots of variance too.

I think the largest downside with this approach, however, is that it's hard for me to know what the de facto, collectively-agreed-upon standard is for a given task.

Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by ghotli on Tuesday November 05, 2024 @02:34PM (#42054513)
I try to tell all new programmers that ask me for advice that keeping abreast of the words of tools that are available for use is a big part of the work and shouldn't be left out. If I quit my daily / weekly trawl of what's out there, I'd surely start to atrophy.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by bryanlarsen on Tuesday November 05, 2024 @02:29PM (#42054461)
tokio itself is not mature/stable enough to be in the standard library, IMO, let alone anything based on tokio.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by rsanders on Tuesday November 05, 2024 @02:37PM (#42054531)
I'm pretty new to Rust so forgive me if I'm mistaken, but it seems to me that this crate doesn't require the use of tokio.
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by lesuorac on Tuesday November 05, 2024 @02:40PM (#42054547)
When all the examples are marked with `#[tokio::main]`, it probably requires tokio.

Although I guess they do implement Future on their own so it shouldn't need a specific runtime then.

https://github.com/fortress-build/whirlwind/blob/main/src/sh...

Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by macawfish on Tuesday November 05, 2024 @02:45PM (#42054584)
They're just using tokio as a dev dependency. You could use this with any async runtime

https://github.com/fortress-build/whirlwind/blob/main/Cargo....

Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by willothy on Tuesday November 05, 2024 @02:50PM (#42054621)
Tokio is just used for async tests and the examples, the crate doesn’t depend on any specific async runtime :)
Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by willothy on Tuesday November 05, 2024 @02:25PM (#42054432)
Hey, I think the name is cool!

Fair point though, there would definitely be some benefit to having some of these things in the stdlib.

Re:Show HN: Whirlwind – Async concurrent hashmap for Rust by schainks on Tuesday November 05, 2024 @02:46PM (#42054588)
The teams who compile the standard libraries are still made up of people, and sometimes better libraries get written outside of those teams. It's just a natural consequence of the intense collaboration we have in this industry. In fact, I am GLAD things happen this way, because it shows how flexible and open minded folks are when it comes to such libraries.

Naming things is... well, you know...