“Five Guys are zero-indexed” is probably the most trivial technical fact I will learn today.
@mhoye the five guys, then, are guy zero, guy one, ... guy four?
@sgillies
I don't remember that bit from the Louis Jordan song...?
@mhoye

@ddlyh @sgillies were the mambos zero indexed and we just didn’t know it, is there a hidden Zeroth Mambo?

What happens if the mambo underflows.

@mhoye
I think it inverts and becomes a limbo.
@ddlyh @sgillies
@sgillies well, I counted and there are six people working here, so I think that technically there’s an off by one error at this location so I’m pretty sure that this means that if I can find an extra apron I’m like two steps away from owning a burger franchise.
@mhoye @sgillies yeah but do you really want to maintain that legacy infra
@valrus @sgillies you say legacy, I say proven.
@mhoye @sgillies Solving the world through SCIENCE (or in this case, technology!).
@mhoye
Or they are stored as a small positive integer and you overflowed it?

@ddlyh

Nah, just a simple base 4 overflow.

@mhoye

@ddlyh @mhoye i actually think that might be the case tbh
@mhoye Does this mean there are 5 guys or 6?
@michaelcoyote @mhoye still 5, because the 5 in that instance would be the count, not the index (if it was, say, 5th guy, then there would be 6 guys, the 0th guy, the 1st guy, ... , the 5th guy)
@mhoye pentagon males
burying the lead here that there might actually be six guys, with guy zero lurking somewhere unregarded

CC: @mhoye@mastodon.social
@mhoye A proof-of-concept attack demonstrated by fast food security researchers leverages a lack of bounds checking in the Guys array to recruit customers and possibly food items as additional Guys.
@bosonicvinegar It reads like somebody opened a franchise in Dwarf Fortress.
@bosonicvinegar @mhoye if you get it just right you can encounter guy #4,294,967,295
@mhoye Does that mean it should really be called Four Guys?
@mhoye
>>> guys[5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
@mhoye here burger king order goes up to 10000. Then it reset
@mhoye @lunarequest
Age in most cultures are zero-indexed. However there're 1-indexed cases like east Asia.
https://en.wikipedia.org/wiki/East_Asian_age_reckoning
@billchenchina @mhoye I've heard about this lol. it terrifies me deeply. also iirc korea has their own age system?
@lunarequest @mhoye
I think it's the same as Chinese's aging system.
Actually in China we don't use this aging system in most cases (like legal), but rural and elderly like to use this.
@billchenchina @mhoye so i looked it up, everyone is one year in the womb. and every new year you get +1 tacked on your age. so your "Korean age" is +1-2 more than the "regular" age. Does China also follow that? or are they different?

@lunarequest @mhoye Almost the same.

One difference here is year += 1 happens on new year (Jan 1) for Korean, but in China, the day is Chinese (Lunar) New Year, which is defined by Chinese calendar.

@billchenchina @mhoye oh that is interesting, wonder why there's that difference?
@lunarequest @mhoye
Wikipedia says Korean age reckoning used to be the same as Chinese age reckoning, but they changed to Jan 1 from 1896.
@billchenchina @mhoye ah.. sounds like politics tbh
@lunarequest @mhoye
Did some search, seems China started using the Gregorian calendar from 1912 (Republic of China began on 1 January 1912).
@lunarequest @mhoye
i mean, in official documents, legal stuff and so on.
@billchenchina @mhoye oh, does that mean that korea and china once again use the same age system?

@lunarequest @mhoye

Before 1896:
Considered age 1 at birth, age increased by one year on Chinese New Year's Day (Lunar New Year)

Korea From 1896:
Still considered age 1 at birth, but age increased by one year on January 1st.

China From 1912:
0-index became the official system, age increases by one year on birthday.

Korea From 2023:
0-index became the official system, age increases by one year on birthday.

@mhoye Now serving order 3+4i
@mhoye So does that mean there are actually six guys?

@mhoye

So there are six guys or they are numbered 0 through 4? 😉

@mhoye so one day Walter Sobchak was the first customer at a Five Guys, yet his ticket said ‘Order 1’.

Long story short: there are now Five Guys who give a shit about the rules, and Walter only eats at In-N-Out after being banned for life.

i wonder if the int is signed
@mhoye So there are actually SIX guys?
@mhoye pizza hut is too
@mhoye so expensive tho…
@mhoye Interesting!
I noticed similar with Wawa.
Wawa's use the machine to determine the first digit. Seems to reset hourly. So like the far left machine will always be 1--, the 2nd will be 2--, etc. Online orders usually start with like 9. They start with 0 too.