top | item 44196321 (no title) dginev | 8 months ago One can also grab a random arXiv paper in HTML (via ar5iv), if that was desired.Just visit:https://ar5iv.labs.arxiv.org/feeling_lucky discuss order hn newest jegp|8 months ago Is the code for the "feeling lucky" selection mechanism open? Or, do you know how they select papers at random? dginev|8 months ago Sure, the repository is open source (linked from the front page).The selection did not get much thought at all, just a Rust rand shuffle over all ids performed at first page visit and then cached: https://docs.rs/rand/latest/rand/seq/trait.SliceRandom.html#...I had all IDs already computed for the previous/next article navigation feature, so it seemed fun to reuse them. jegp|8 months ago Thanks for this! If I knew this existed, I wouldn't have built the page myself.
jegp|8 months ago Is the code for the "feeling lucky" selection mechanism open? Or, do you know how they select papers at random? dginev|8 months ago Sure, the repository is open source (linked from the front page).The selection did not get much thought at all, just a Rust rand shuffle over all ids performed at first page visit and then cached: https://docs.rs/rand/latest/rand/seq/trait.SliceRandom.html#...I had all IDs already computed for the previous/next article navigation feature, so it seemed fun to reuse them.
dginev|8 months ago Sure, the repository is open source (linked from the front page).The selection did not get much thought at all, just a Rust rand shuffle over all ids performed at first page visit and then cached: https://docs.rs/rand/latest/rand/seq/trait.SliceRandom.html#...I had all IDs already computed for the previous/next article navigation feature, so it seemed fun to reuse them.
jegp|8 months ago
dginev|8 months ago
The selection did not get much thought at all, just a Rust rand shuffle over all ids performed at first page visit and then cached: https://docs.rs/rand/latest/rand/seq/trait.SliceRandom.html#...
I had all IDs already computed for the previous/next article navigation feature, so it seemed fun to reuse them.
jegp|8 months ago