News for hackers. Stuff that matters.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by sbf501 on Saturday August 06, 2022 @12:06PM (#32369260)
This is what bugs me about the stackexchange model. Most of the comments are guesses by people who really don't know. The "correct" answer doesn't explain anything, it just points to some sources. The highest ranked comment that comes closest, attempts to explain the nature of the numbers (the modulous is the period, and the primes stretch out the cycle) and fires off a link to wikipedia.

Then it appears on HN, and more people half guessing, but better content in general.

Based on yesterday's post, BYTE magazine would have actually given an answer with both why and how.

EDIT: Granted, the link DOES go to Wikipedia which has a great explanation, but in general, providing a link and not answer is a poor model because links decay so quickly.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by svat on Saturday August 06, 2022 @01:55PM (#32370182)
It took me a while to understand your comment, until I realized there are two interpretations of the question of where these numbers come from:

• One is a historical question: who first used these numbers and when? who copied from where?

• The other is a conceptual question: why might someone choose these numbers, what do they "mean", how do we interpret these constants?

The former is purely a question of facts and there is nothing to "explain the nature of the numbers", and this is what the answerer on Stack Exchange seems to have interpreted it as. Under this interpretation saying things like "the modulus is the period" is not really germane to the question; what's required is to search sources and try to find the chronologically earliest one. (The answer doesn't seem to have done a definitive job, but it's a reasonable start.)

This is like synchronic vs diachronic in linguistics: in the latter interpretation you mainly just want to understand the random-number generator.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by jefftk on Saturday August 06, 2022 @09:03PM (#32372937)
Reading the question it seems pretty clear to me they're interested primarily in the history: "Who invented this algorithm and tested the distribution? Is there a paper or something to cite?"
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by svat on Saturday August 06, 2022 @11:53PM (#32373756)
Yes that's what I thought too (which is why I found the complaint hard to understand until I thought of the alternative interpretation). But clearly at least the person I was replying to understood it differently, and it was also the top comment on this thread for a while at the time I posted my comment, so others may have thought the same too. Even at the question, on a comment on the answer the asker mentions "why these numbers are special" and comments about them being prime etc, so it's possible they didn't have a clear idea what they wanted either.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by spullara on Saturday August 06, 2022 @12:35PM (#32369531)
I'd be willing to bet that a Wikipedia link will outlast a StackExchange answer.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by matheusmoreira on Saturday August 06, 2022 @01:33PM (#32369983)
It absolutely will. Some of my favorite answers on Stack Overflow have been deleted and there seems to be no archive for such lost data.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by cxcorp on Saturday August 06, 2022 @01:47PM (#32370103)
I usually save my bookmarks on the Wayback Machine just so there's at least one copy out there.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by nerdponx on Saturday August 06, 2022 @03:56PM (#32371037)
Stackoverflow itself retains all deleted questions and answers. If you have enough points you can see them.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by matheusmoreira on Saturday August 06, 2022 @09:08PM (#32372956)
How many points? Right now I have 16.7k.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by nerdponx on Monday August 08, 2022 @03:58PM (#32390290)
Less than that for sure. Maybe you need to enable some setting, like on HN?
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by kragen on Saturday August 06, 2022 @05:46PM (#32371849)
Which ones were they?
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by matheusmoreira on Saturday August 06, 2022 @09:05PM (#32372944)
One of my favorite answers was about programming languages written by a Jörg W Mittag. It was a comparison between shells like bash and proper programming languages and featured a huge table comparing syntax, showing how languages are supposed to scale up in complexity while shells are supposed to scale down.

Never found it again on the site. Years ago I remember digging up a link to the question but got the 404 page when I followed it.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by svat on Sunday August 07, 2022 @01:51PM (#32378251)
I think I found the answer you mean! https://stackoverflow.com/questions/3637668/why-are-scriptin... — the topic matches, there's a table comparing syntax (though I wouldn't call it huge), and it includes the idea of scaling up to large programs vs scaling down to 10 character programs.

(The question was deleted in July 2014 and undeleted in December 2020: https://stackoverflow.com/posts/3637668/revisions , so right now anyone can see it. BTW with ≥10000 reputation one can see deleted posts, per https://stackoverflow.com/help/privileges and https://stackoverflow.com/help/privileges/moderator-tools — e.g., as you mentioned you have ~16k points, try the much-mirrored "programmer joke" deleted question (linked from e.g. https://meta.stackexchange.com/questions/76584).)

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by matheusmoreira on Tuesday August 09, 2022 @09:52PM (#32407046)
Yeah, that's the one. It must have been years since I tried looking for it. I didn't know it had been restored... Thanks for looking it up! I can see the programmer jokes question as well.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by kragen on Saturday August 06, 2022 @09:53PM (#32373185)
Aw. I really enjoy his answers in general.

I wonder if the answer survives in an old data dump or in the Archive?

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by pizza234 on Saturday August 06, 2022 @02:38PM (#32370501)
> This is what bugs me about the stackexchange model.

> providing a link and not answer is a poor model because links decay so quickly.

Providing a link and not answer is not the stackexchange model. On the Stack Exchange network, such answers are often (not always, of course) commented with a request to expand the answer.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by nerdponx on Saturday August 06, 2022 @03:56PM (#32371045)
And it's not just accepted but encouraged to comment on old questions and answers that are either wrong or not up to current standards.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by phalangion on Saturday August 06, 2022 @12:31PM (#32369496)
> links decay quickly

That might be true in many places, and I agree with the general sentiment that the answer should provide an answer and not just a link to an answer. But wikipedia links are generally pretty stable. It’s not some random blog post.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by eru on Saturday August 06, 2022 @09:47PM (#32373155)
Wikipedia can change of course, but they are very good about preserving their history.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by bluedino on Saturday August 06, 2022 @12:40PM (#32369566)
The title question was the original source. The answer was a list of places it was found, including the earliest.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by sbf501 on Saturday August 06, 2022 @02:17PM (#32370350)
Oh, good point. OP was looking for original source, papers referring to, etc. Too late to edit, but minus points for me for not comprehending the original question.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by Nition on Saturday August 06, 2022 @04:56PM (#32371524)
I don't think you were far off what the asker was looking for. In a comment, they say "I was kind of hoping to be able to point to some specific research as to why these numbers are special".
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by bluedino on Saturday August 06, 2022 @05:34PM (#32371765)
Didn't help that he asked a couple more questions at the end

Who invented this algorithm and tested the distribution? Is there a paper or something to cite?

That would have made another question.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by a-dub on Saturday August 06, 2022 @12:47PM (#32369617)
NR has long been seen as a sort of necronomicon for scientific computer programming.

i don't think it's SE's fault as much as it is a historical rough edge between two fields (computer programming and applied mathematics).

the first constant is klaatu, the second is barada and the third is nikto.

(NR also tends to be fairly rigorous in terms of citations, for the curious)

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by ascar on Saturday August 06, 2022 @01:43PM (#32370068)
What's NR, what's a necronomicon and what's klaatu, barads and nikto.

I googled all these things and I can't still make any sense of your comment except that it's intentionally confusing with some popular fiction references?

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by hinkley on Saturday August 06, 2022 @02:48PM (#32370564)
"Klaatu barada nikto" is a code phrase from The Day the Earth Stood Still to stop the homicidal antagonists from killing you.

It's doubly famous because Sam Raimi recycled it in "Army of Darkness" as an incantation to dispel the curse of the Necronomicon (book of the dead, portrayed as the arch book of black magic in any number of stories), which our hapless anti-hero Ash fucks up and thus unleashes the armies of the dead on a roughly medieval and wholly unprepared world.

If you like campy horror movies, there is so much camp in Army of Darkness that there's barely any room for the horror. It is technically a sequel but it works as a standalone movie. I watched it years before I finally sat down and watched The Evil Dead.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by Natsu on Saturday August 06, 2022 @04:20PM (#32371242)
Wasn't it also used in Ghost Busters at some point?
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by webstrand on Saturday August 06, 2022 @01:52PM (#32370159)
NR is apparently Numerical Recipes, a book. I think they mean that the constants are not well understood, like the phrase "Klaatu barada nikto" was not understood, but still had an effect.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by kragen on Saturday August 06, 2022 @05:47PM (#32371866)
In addition to what the other answers have said, the Necronomicon is the book of dark magic in the Lovecraft mythos, from which it has been copied into some other mythoi.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by svnpenn on Saturday August 06, 2022 @02:12PM (#32370306)
It's common hacker news trope for someone to do acronym diarrhea, even with rarely or never used abbreviations. It's quite annoying.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by Dylan16807 on Saturday August 06, 2022 @02:53PM (#32370598)
NR is in the answer in the link.

I feel like SE being stack exchange is pretty clear here.

The remaining reference is not an acronym or abbreviation, nor do I think it looks like one.

Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by adhesive_wombat on Saturday August 06, 2022 @01:54PM (#32370169)
I assume Numerical Recipes.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by 0xTJ on Saturday August 06, 2022 @03:33PM (#32370881)
The question isn't asking about how it works. It asks about where that algorithm comes from.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by sbf501 on Sunday August 07, 2022 @12:57AM (#32374013)
Please read the other comments before adding a redundant one.
Re:Original source of `(seed * 9301 and 49297) % 233280` ran... by loldk on Saturday August 06, 2022 @01:43PM (#32370071)
Insecure devs always obfuscate and try to hide the whole truth. It is a massive problem in tech.