Live data from Hacker News

Show HN: Algorithm Cookbook in Rust

github.com

1–10 of 73 posts

Re: Show HN: Algorithm Cookbook in Rust

#2
Thank 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...

Re: Show HN: Algorithm Cookbook in Rust

#3
MIT license is good, but I always wish that sample code was available under CC0 -- and presented with explicit permission to copy and paste without preservation of notices. (A request to link back optionally when practical is fine.)

That makes it easier for sample code to achieve the ends of maximum code reuse and popularization of the underlying technology.

Re: Show HN: Algorithm Cookbook in Rust

#5
A graph with the members first, next, and endpoints is not exactly self explanatory, something better than a "A compact graph representation" comment would be nice.

Especially since the ownership model of rust makes the classic graph representation of edges owning nodes impossible.

Re: Show HN: Algorithm Cookbook in Rust

#6
post #3

MIT license is good, but I always wish that sample code was available under CC0 -- and presented with explicit permission to copy and paste without preservation of notices. (A request to link back optionally when practical is fine.) That makes it easier for sample code to achieve the ends of maximum code reuse and popularization of the underlying technology.

Agreed. I once tried to submit a small snippet I found on stackoverflow to an open source project. Stackoverflow user content is licensed under creative commons, cc-by-sa (see https://stackoverflow.blog/2009/06/25/attribution-required/). I included attribution, but it was rejected. I totally understand why. CC0 is much preferred in this case.

Re: Show HN: Algorithm Cookbook in Rust

#7
post #3

MIT license is good, but I always wish that sample code was available under CC0 -- and presented with explicit permission to copy and paste without preservation of notices. (A request to link back optionally when practical is fine.) That makes it easier for sample code to achieve the ends of maximum code reuse and popularization of the underlying technology.

Agreed. I once tried to submit a small snippet I found on stackoverflow to an open source project. Stackoverflow user content is licensed under creative commons, cc-by-sa (see https://stackoverflow.blog/2009/06/25/attribution-required/ ). I included attribution, but it was rejected. I totally understand why. CC0 is much preferred in this case.

Why was it rejected?

Re: Show HN: Algorithm Cookbook in Rust

#8
post #3

MIT license is good, but I always wish that sample code was available under CC0 -- and presented with explicit permission to copy and paste without preservation of notices. (A request to link back optionally when practical is fine.) That makes it easier for sample code to achieve the ends of maximum code reuse and popularization of the underlying technology.

Agreed. I once tried to submit a small snippet I found on stackoverflow to an open source project. Stackoverflow user content is licensed under creative commons, cc-by-sa (see https://stackoverflow.blog/2009/06/25/attribution-required/ ). I included attribution, but it was rejected. I totally understand why. CC0 is much preferred in this case.

Your anecdote also emphasizes the requirement for open source projects to maintain rigorous intellectual property policies. Good on both you and the project for the appropriate handling!

Clean IP history is especially important for "universal donor" sample code intended to be copy/pasted. If there turns out to be an IP violation in library code, with luck it may be possible to excise it from the library -- and hopefully not too many downstream will have forked it. But when code is copy/pasted, the linkage is severed and the damage becomes increasingly difficult to repair.

For those reasons, I'd prefer to see something like a contributor list of public identities for collections of sample code, so that it is transparent who is making the licensing promises.

Re: Show HN: Algorithm Cookbook in Rust

#9

Earlier quoted context omitted.

Agreed. I once tried to submit a small snippet I found on stackoverflow to an open source project. Stackoverflow user content is licensed under creative commons, cc-by-sa (see https://stackoverflow.blog/2009/06/25/attribution-required/ ). I included attribution, but it was rejected. I totally understand why. CC0 is much preferred in this case.

Why was it rejected?

Though I don't know the specific project, I can tell you that it is common for projects to reject contributions under licenses that cannot be subsumed by the project's main license.

For example, if a project under the Apache License 2.0 were to accept a contribution of CC-BY-SA code, the complete product could no longer be available under the Apache License (and other licenses with similar terms) -- causing problems for downstream consumers.

Re: Show HN: Algorithm Cookbook in Rust

#10
Thanks for sharing this. I did a deep dive into Rust when I was tasked with implementing an interpreter[0] for school, and found the language to be very enjoyable to work in. While I have tried to convince other friends to try it, they still object citing a steep learning curve and the thought that it will never replace C++ or Java in mainstream development ecosystems. It is resources like these that will help lower that barrier to productivity. :)

[0] https://github.com/sejr/core-interpreter

Post reply on HN