Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Racket intro projects: start hacking on and with Racket (github.com/plt)
54 points by p4bl0 on Aug 27, 2011 | hide | past | favorite | 5 comments


I'd like to get a second opinion on Racket's random number generator. Currently it's using one of L'Ecuyer's generators -- I think it's a 192-bit multiple recursive generator (MRG), nothing odd there. Seeding is really strange though. It takes 32-bit seed, splits it in half and uses it to seed identical 16-bit linear congruential generator (LCG). Sequential outputs from the first LCG are used to seed the MRG, and the outputs from the second LCG are mixed with the MRG state.

At best this method strikes me as unprincipled and limits the generator to no more than 2^32 initial states and potentially far fewer. Thoughts?


Are you referring to the implementation of `random' from `racket/base' (implemented here: https://github.com/plt/racket/blob/master/src/racket/src/ran... ) or the implementation in `srfi/27' (here: https://github.com/plt/racket/blob/master/collects/srfi/27/r... )?


The implementation in racket/base.


More projects should have pages like this one.


Agreed. Something I've found interesting is that such pages are a tangential benefit for any project that has participated in Google Summer of Code, as compiling project ideas is one of the first steps in participating. Although sometimes projects to err and fail to include "entry level" ideas. For reference:

FreeBSD: http://wiki.freebsd.org/IdeasPage

gcc: http://gcc.gnu.org/wiki/SummerOfCode

git: https://git.wiki.kernel.org/index.php/SoC2011Ideas




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: