Offtopic/meta. I'm wondering about a technology that allows us to NOT re-implement an algorithm cookbook every time a new language shows up.
Show HN: Algorithm Cookbook in Rust
41–50 of 73 posts
Re: Show HN: Algorithm Cookbook in Rust
#42Thank you. But it seems not finished? I am trying to implement some basic data structures and algorithms in Rust, but the compiler nearly kills me. Is there any data structure & algorithms implementation tutorials for Rust newbies, like Learning_ Rust_With_Entirely_Too_Many_Linked_Lists[1]? [1]: http://cglab.ca/~abeinges/blah/too-many-lists/book/README.ht...
Data structures and algorithms are possibly the hardest part of Rust to dive into unless you have a really good reason. The best advice for newbies is to learn with other stuff and use existing algorithms. Of course, if you are trying to implement stuff for a class or something similar then you might be out of luck, and might consider trying the Rust IRC and such to work through the errors as they come up.
What else is there?
Re: Show HN: Algorithm Cookbook in Rust
#43Earlier quoted context omitted.
Data structures and algorithms are possibly the hardest part of Rust to dive into unless you have a really good reason. The best advice for newbies is to learn with other stuff and use existing algorithms. Of course, if you are trying to implement stuff for a class or something similar then you might be out of luck, and might consider trying the Rust IRC and such to work through the errors as they come up.
So what is the point of a language in which things are hard to implement?
Re: Show HN: Algorithm Cookbook in Rust
#44Offtopic/meta. I'm wondering about a technology that allows us to NOT re-implement an algorithm cookbook every time a new language shows up.
Re: Show HN: Algorithm Cookbook in Rust
#45Earlier quoted context omitted.
Data structures and algorithms are possibly the hardest part of Rust to dive into unless you have a really good reason. The best advice for newbies is to learn with other stuff and use existing algorithms. Of course, if you are trying to implement stuff for a class or something similar then you might be out of luck, and might consider trying the Rust IRC and such to work through the errors as they come up.
> Data structures and algorithms are possibly the hardest part of Rust to dive into What else is there?
Re: Show HN: Algorithm Cookbook in Rust
#46Earlier quoted context omitted.
> Data structures and algorithms are possibly the hardest part of Rust to dive into What else is there?
I think it was too much for the. to say "Data structures AND algorithms". It is mostly data structures that can be difficult.
Re: Show HN: Algorithm Cookbook in Rust
#47"My other goal is to show developers that C++ and Java kinda suck" -- really?!
That said, my biggest Rust-gripe has been writing recursive / self-referential data structures. Borrow system is just not very convenient for that and you end up restructing the code to be a bit more Rust-friendly.
Re: Show HN: Algorithm Cookbook in Rust
#48"My other goal is to show developers that C++ and Java kinda suck" -- really?!
It's not achieving it though. The code could be more idiomatic and the project could have a better file organization.
To put context around my provocative comment earlier: I write C++ professionally. C++ is the right choice for my organization, though for purely historical reasons. In the long run, I think we'd all be better off if Rust or similar languages replaced their predecessors. So my comment came from a place of personal frustration, the same that led me to find Rust in the first place.
The old wording was too negative; I'm just excited to show that contest programming, which one might imagine to be hard to translate, is not only practical but indeed arguably nicer in Rust.
Re: Show HN: Algorithm Cookbook in Rust
#49Re: Show HN: Algorithm Cookbook in Rust
#50Earlier quoted context omitted.
It's not achieving it though. The code could be more idiomatic and the project could have a better file organization.
Suggestions are welcome; I'm still learning Rust. To put context around my provocative comment earlier: I write C++ professionally. C++ is the right choice for my organization, though for purely historical reasons. In the long run, I think we'd all be better off if Rust or similar languages replaced their predecessors. So my comment came from a place of personal frustration, the same that led me to find Rust in the f…