Re: [go-nuts] 9 is prime if it's a hot day

170 views
Skip to first unread message

Sven Anderson

unread,
Jun 4, 2023, 8:01:54 AM6/4/23
to Kamil Ziemian, golang-dev


Kamil Ziemian <kziem...@gmail.com> schrieb am Sa. 3. Juni 2023 um 21:13:
Is this example found in the "Composite literals" section of Go Spec a joke?
// list of prime numbers
primes := []int{2, 3, 5, 7, 9, 2147483647}

I checked on the internet and 2147483647 is a prime number (https://en.wikipedia.org/wiki/2,147,483,647), so this element is fine.

Best regards
Kamil


Rob Pike: It's a reference to a legendary article from the Journal of Irreproducible Results.

Andrew Bonvente: Is this a hazing ritual for new issue triagers? ;)

Rob Pike: Perhaps. There are details from the earliest parts of the project that are deliberately weird, as Easter eggs, if you like.

Alan Donovan

unread,
Jun 4, 2023, 2:48:31 PM6/4/23
to Sven Anderson, Kamil Ziemian, golang-dev
I can't find said article or any reference to the "hot day" phrase.
Does the deliberate mistake warrant a comment in the HTML source of
the document so that the answer is there for those who care to look?
> --
> You received this message because you are subscribed to the Google Groups "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/CAFwXxZQvPLpjRf-P9o_pzF-nvHRajT4-nfceQvgMZrghE_t6Ww%40mail.gmail.com.

Josh Bleecher Snyder

unread,
Jun 4, 2023, 3:34:51 PM6/4/23
to Alan Donovan, Kamil Ziemian, Sven Anderson, golang-dev

Dan Kortschak

unread,
Jun 4, 2023, 5:02:23 PM6/4/23
to golan...@googlegroups.com
On Sun, 2023-06-04 at 12:34 -0700, Josh Bleecher Snyder wrote:
> https://codereview.appspot.com/5630043
>
>
> On Sun, Jun 4, 2023 at 11:48 AM Alan Donovan <al...@alandonovan.net>
> wrote:
> > I can't find said article or any reference to the "hot day" phrase.
> > Does the deliberate mistake warrant a comment in the HTML source of
> > the document so that the answer is there for those who care to
> > look?

That gives a clue for the proximal rationale, but it would be very nice
(speaking as a former academic) to know the original source.

Bakul Shah

unread,
Jun 4, 2023, 6:00:41 PM6/4/23
to Alan Donovan, Sven Anderson, Kamil Ziemian, golang-dev
Find the following paper and all will be revealed! May be.

"Measuring The Primadona Factor For Odd Numbers" by Y. Ronen et al.

PS: I think Rob's explanation is incorrect! 9 is shown to be not a prime possibly because it was a hot day! But given where this was published, may be Rob's explanation is indeed the right one :-)

Reply all
Reply to author
Forward
0 new messages