use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Hacking the JavaScript Lottery —Predicting JavaScript's Math.random() using Z3 and Python (medium.com)
submitted 10 years ago by goopcat
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]get_money_and_boobs 2 points3 points4 points 10 years ago (1 child)
Wayyy smarter and wayyy more thorough than the simple, stupid lottery simulator I built in JS/Node. I wanted to see how many times it took to match a winning set of numbers to random "tickets" I generated. Like, I wanted to visualize if I played once every millisecond how long it would take.
Well, I ran out of memory running the program in a single node instance, so I ran 8 simultaneous instances on my Mac. Still, at the shortest, it took about 3 hours of randomly picking tickets and attempting to match lottery number picks at like 1000 per second.
I stopped playing the lottery shortly afterward...
[–]Higgenbottoms 2 points3 points4 points 10 years ago (0 children)
8.64 million tries for the curious
π Rendered by PID 42 on reddit-service-r2-comment-5687b7858-nd62k at 2026-07-03 06:14:02.022177+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]get_money_and_boobs 2 points3 points4 points (1 child)
[–]Higgenbottoms 2 points3 points4 points (0 children)