Get the latest tech news

Fat Rand: How many lines do you need to generate a random number?


More musing on dependencies.

For that single function (and the information which DLL it needs link into), we are compiling and downloading megabytes of windows-targets. ppv-lite86(the rand's picked default randon number generator) alone comes to 3,587 lines of code including 168 unsafe blocks. The difference is that I can trust the standard library as a whole—it comes from a single set of authors, making auditing easier.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of lines

lines

Photo of random number

random number

Photo of fat rand

fat rand

Related news:

News photo

Data Centres Can Cut Energy Use By Up To 30% With Just About 30 Lines of Code, Research Shows

News photo

Google: How to make any AMD Zen CPU always generate 4 as a random number

News photo

Government Tech Workers Forced to Defend Projects to Random Elon Musk Bros | A recent high school graduate and former Neuralink intern has joined meetings to review lines of code and other work history of career public servants, sparking chaos at a major government agency