HackerTrans
TopNewTrendsCommentsPastAskShowJobs

holy_city

no profile record

comments

holy_city
·قبل 7 سنوات·discuss
More like Github stars
holy_city
·قبل 7 سنوات·discuss
Interestingly enough, the published work [1] has two self-citations. So maybe there's something to that phrase, “the next work cannot be carried on without referring to previous work.”

[1] https://journals.plos.org/plosbiology/article?id=10.1371/jou...
holy_city
·قبل 7 سنوات·discuss
I think Amazon would have benefited from better UI for particular parts of their platform and achieved better growth.

They're great for point of sale, terrible for product discovery as a direct result of the UI. That's fine for most products where you can research what you want to buy then purchase on Amazon anyway (because free 1/2-day shipping), but it means services like Prime Video are terrible to use compared to Hulu/Netflix.

Which is a shame, since I think their originals and content library is really solid. It's just impossible for you to discover it without a huge ad campaign.
holy_city
·قبل 7 سنوات·discuss
>In Rust, does the standard way of implementing a graph structure still use a vector of nodes and indices for edges?

You'd probably want to do this whenever you implement a graph in a performant language, it's faster and safer (depending on the problem). Implementing edges as vectors of pointers is an exercise in memory leaks and data races, imo.

You can see an implementation with adjacency lists here:

https://github.com/bluss/petgraph/blob/master/src/graph_impl...

>I think I saw a Rust implementation of an arena. Is it working?

https://docs.rs/typed-arena/1.4.1/typed_arena/
holy_city
·قبل 7 سنوات·discuss
imo you solve these problems by segregating the ownership logic and relationship logic of the data structure.

In other words the DAG would never be traversed to allocate or free memory, each vertex would be held by a vector or other container and the edges represented by an adjacency list/matrix.

It's faster and safer than pointer chasing.