If I recall correctly, I downloaded all of them, then pruned any that appeared to have non-deterministic behaviour (for example, using random), then used the offline testing script[0] helpfully provided by the site.
It was the first piece of code I put out that someone referred to as "art"[1].
Some others that hit the HN front page over the years:
I also had wrote some code for my former employer containing the magic string "haha jit go brrr" that raised some eyebrows when someone reverse engineering the code noticed it. It was part of a routine to try to coax the JIT into optimizing the code soon on low end Android devices for performance reasons, but someone who didn't understand what the code was doing thought it was part of an exploit... :facepalm:
The code that checked for DRM support set the "distinctiveIdentifier" config option to "not-allowed" specifically to avoid being useful for tracking. Most of the stuff that people think is "fingerprinting" is just trying to confirm the browser is what it claims to be. It is (or was) tricky to make DRM work in chromium compiled from source.
> Contains what appears to be a Javascript engine JIT exploit/bug, "haha jit go brrrrr" appears in a part of the code that appears to be doing something weird with math operations.
ROFL. Good find. I'd forgotten I left it running that long, I thought it was probably just overnight. Nowadays when I want to brute force something like that, I just rent a couple hundred cores for an hour.
(and pray to the gods I don't somehow leave the instances running by mistake)
Haha, this is pretty funny. I immediately thought of Cantor's diagonal argument when I saw the question, but it makes me wonder — how long would it have taken me to solve the problem if I hadn't previously read about Cantor's argument in the context of Turing machines?
Here's a variant: "Given a list of k LeetCode problems sourced from a bag of n unique tricks, generate a new LeetCode problem that utilizes a trick not found in the bag."
I'm being facetious of course, but actually now I have an idea that we could create a bipartite graph mapping tricks to LeetCode problems. From there, given a willingness to memorize n tricks, we can compute the optimal bag of tricks to commit to memory in order to maximize the number of LeetCode problems quickly solvable during an interview, weighted by the probability of each problem's appearance.
Yes. Cantors diagonalisation wasn't just a neat proof for an interesting theorem, but it made Cantor one of the few people to invent an entirely new class of proof technique. I'd give it a similar status to techniques like 'indirect proof' and 'induction'.
I learned about that proof from a YouTube math video, rather than my Computer Science degree or minor in Mathematics.
People expect genius in interviews all the time. They just don't realize that's what they're doing. They think what they're asking about is an obvious concept, forgetting that (insert renowned genius here) came up with the idea.
I'd have thought group theory would be a required math course. This would also come up in Comp.Sci. complexity contexts and even in Calculus or mathematical logic contexts (I'm sure in many others I'm missing). Way back when this was a required first year course in the Comp.Sci./Math program I took.
I also would have thought that it would be covered in a CS curriculum, as I said. it'snot just some random proof, but an important foundational one. (I don't think I "forgot a possibilty", I just thought it usually would).
You are saying you took classes that covered logic, number theory, group theory, algorithmic complexity, discrete math, and calculus, and you are certain none of them covered this? Too bad, that is unfortunate! I'm glad you found it on your own! it's really neat!
The same can be applied to a stock market. I am a big fan of looking into historical data, and I was using WealthLab for quite a while.
One of the funniest things is when you find "strategy" that performs best over one year by making from 50 to 100 deals. But don't get fooled, it's just a random parameters, and when applied to the next year or years, you won't get these results, of course.
So you're getting reliable results only when you can reproduce your success (no matter what it is) consistently.
In some sense, randomness is a modelling choice, not a statement about the underlying mechanism.
Eg we wouldn't be able to tell whether stock prices are truly random (according to some distribution), or governed by a cryptographically secure pseudo random number generator.
Another example: quantum mechanics is a fully deterministic theory. It's even linear, so we don't even get deterministic chaos like from Newtonian billiard balls or the Newtonian three body problem.
But some popular interpretations of quantum mechanics like the Copenhagen Interpretation decide that they need to add randomness to make sense of QM's predictions.
In contrast, some other interpretations like Many Worlds leave QM deterministic.
It was the first piece of code I put out that someone referred to as "art"[1].
Some others that hit the HN front page over the years:
https://news.ycombinator.com/item?id=10195358
https://news.ycombinator.com/item?id=9516824
https://news.ycombinator.com/item?id=26615938
I also had wrote some code for my former employer containing the magic string "haha jit go brrr" that raised some eyebrows when someone reverse engineering the code noticed it. It was part of a routine to try to coax the JIT into optimizing the code soon on low end Android devices for performance reasons, but someone who didn't understand what the code was doing thought it was part of an exploit... :facepalm:
0. https://rpscontest.com/rpsrunner.py
1. https://rya.nc/threads/art-and-beauty.html
https://iter.ca/post/reddit-whiteops/
`!("a" == "a"[0])` just detects IE6/7, as they return undefined for "a"[0]: https://unspecified.wordpress.com/2008/06/15/portable-javasc...
Here's the slide deck for a con talk I did a while back: https://rya.nc/files/A_nickel_tour_of_the_ad_fraud_ecosystem...
I haven't worked there for a couple of years though.
:) the only extra bit of info there is that the seed was found by brute force over a few days
(and pray to the gods I don't somehow leave the instances running by mistake)
Only on HN does someone asks questions about an obscure cool thing and the original author enters the discussion. Thanks for the explanation.
Here's a variant: "Given a list of k LeetCode problems sourced from a bag of n unique tricks, generate a new LeetCode problem that utilizes a trick not found in the bag."
I'm being facetious of course, but actually now I have an idea that we could create a bipartite graph mapping tricks to LeetCode problems. From there, given a willingness to memorize n tricks, we can compute the optimal bag of tricks to commit to memory in order to maximize the number of LeetCode problems quickly solvable during an interview, weighted by the probability of each problem's appearance.
https://chatgpt.com/share/baf1c785-11dc-46d1-aed7-860cbc741f...
Obviously Cantor was a genius, I would not expect most people, including myself, to come up with his argument themselves from scratch!
People expect genius in interviews all the time. They just don't realize that's what they're doing. They think what they're asking about is an obvious concept, forgetting that (insert renowned genius here) came up with the idea.
You are saying you took classes that covered logic, number theory, group theory, algorithmic complexity, discrete math, and calculus, and you are certain none of them covered this? Too bad, that is unfortunate! I'm glad you found it on your own! it's really neat!
One of the funniest things is when you find "strategy" that performs best over one year by making from 50 to 100 deals. But don't get fooled, it's just a random parameters, and when applied to the next year or years, you won't get these results, of course.
So you're getting reliable results only when you can reproduce your success (no matter what it is) consistently.
Eg we wouldn't be able to tell whether stock prices are truly random (according to some distribution), or governed by a cryptographically secure pseudo random number generator.
Another example: quantum mechanics is a fully deterministic theory. It's even linear, so we don't even get deterministic chaos like from Newtonian billiard balls or the Newtonian three body problem.
But some popular interpretations of quantum mechanics like the Copenhagen Interpretation decide that they need to add randomness to make sense of QM's predictions.
In contrast, some other interpretations like Many Worlds leave QM deterministic.
The author treats the seed as a hyperparameter and searches for the one that performs best for training a CV model.