Halloween Egg

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Crazed123

Halloween Egg

Post by Crazed123 »

There is an easter egg in the attached file of code, and anyone who cares to find gets a candy corn and, hopefully, a laugh.

The hint is to look for a constant.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Halloween Egg

Post by Candy »

Crazed123 wrote: The hint is to look for a constant.
Isn't that epoch a little bit large?

Do I get myself now? ;)
DennisCGc

Re:Halloween Egg

Post by DennisCGc »

Crazed123 wrote: There is an easter egg in the attached file of code, and anyone who cares to find gets a candy corn and, hopefully, a laugh.

The hint is to look for a constant.
Wait, it could be me or... according it's about 6000 years ago.. and that's exactly the year Israel are using...

I could be wrong ofcourse ::)
Crazed123

Re:Halloween Egg

Post by Crazed123 »

Damn you and your knowledge of alternate calendars! Actually, that's the religious calendar (the sabra use Gregorian like the rest of the world), but I thought it would be funny to have a calendar that counted "Ticks since the birth of the Universe." If you look at the quadword division we can even do this "age of the universe" (6000 years or so) quite a few times over before an unsigned 64-bit counter will overflow.

For anyone confused at the code, if it looks like a bug it's probably a bug.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Halloween Egg

Post by Solar »

Since the universe is more like 13.7 billion years old, you'll get into trouble even with 64bit values...

To quote Simon Singh: "You might think that I am being rather uptight, but the role of the scientist is slowly being undermined with a growing belief that scientific results are merely subjective guesses that go in and out of fashion."
Every good solution is obvious once you've found it.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Halloween Egg

Post by Candy »

Crazed123 wrote: d*mn you and your knowledge of alternate calendars! Actually, that's the religious calendar (the sabra use Gregorian like the rest of the world), but I thought it would be funny to have a calendar that counted "Ticks since the birth of the Universe." If you look at the quadword division we can even do this "age of the universe" (6000 years or so) quite a few times over before an unsigned 64-bit counter will overflow.
Actually, that is the age of the universe according to christian lore. They figured the earth was 4000 years old (in the year 0, so that would be 6005 years now).

There are more interesting charts, Julian, the one used a long time ago in Brazil (which had 10 months which included January 34th), the muslim one (which iirc started around 1400 years ago), the chinese one (which started a longer time ago and has a different new year)...

For an encore, create a muslim calendar with correct Iran daylight savings date calculation.

(note on the challenge, you very probably won't succeed. Iran is the country where the exact date is still decided by a bunch of old men that together pick a date).
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Halloween Egg

Post by Solar »

I once created a calendar for a roleplaying game I created, assuming a two-moon world and sporting a 13-day week, two-week months, and 14-month years - which nevertheless came pretty close to "reality" with 364 days to a year... 8)
Every good solution is obvious once you've found it.
Crazed123

Re:Halloween Egg

Post by Crazed123 »

Disregarding our Circadian (spelling?) Cycle, this sounds fun. It would certainly be cool to have 8 hours of fun time every "day", 9 if I sacrifice a sleep hour.

And I got the date from the "alternate calendars" page linked by the Wiki. It's actually listed in the section on the Hebrew calendar. Just before midnight, October 6, 3761 BCE, which I adjust forwards to midnight because the exact amount of time before midnight of Creation isn't listed.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Halloween Egg

Post by Solar »

^^ is a bit too one-minded about a world of over 6 billion people, thousands of religions and countless pieces of evidence still revolving around his religion of choice, for my tastes.

Sorry, wrong thread, but I couldn't resist.
Every good solution is obvious once you've found it.
Crazed123

Re:Halloween Egg

Post by Crazed123 »

"Wrong thread" is exactly right. I'm putting a damned joke in my code, it doesn't have to be scientifically or theologically correct.

Besides, as far as I know you're an atheist/agnostic and therefore have no excuse to get offended at a religious joke.

A second aside, if you multiply 15,000,000,000*365*24*60*60*1024 to approximate the scientific age of the universe I don't think you'd come up with an answer any reasonably-sized variable could store, much less add to without overflowing.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Halloween Egg

Post by Candy »

Crazed123 wrote: A second aside, if you multiply 15,000,000,000*365*24*60*60*1024 to approximate the scientific age of the universe I don't think you'd come up with an answer any reasonably-sized variable could store, much less add to without overflowing.
Why would you want the age of the universe in milliseconds? By the way, the 1024 can be left off. If you do that, it fits in 64 bits easily.

If you then include another 32 or 64 bit value for the subsecond part, you're set in 96 or 128 bits for all time determinations you'll ever do.

I'm voting for 128 bits so you can calculate with pico- and femtoseconds.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Halloween Egg

Post by Solar »

Crazed123 wrote: Besides, as far as I know you're an atheist/agnostic and therefore have no excuse to get offended at a religious joke.
1) You are wrong about my religious beliefs.

2) What makes you think an atheist / agnostic mustn't get offended by religious jokes?

3) I'm not offended by your "religious joke", I notice the complete lack of anything like an "according to" in your subsequent posts, and cannot keep myself from thinking this is completely on purpose.
Every good solution is obvious once you've found it.
Hmm

Re:Halloween Egg

Post by Hmm »

I think both of you should stop getting all hot and bothered and stop flaming. It doesn't matter if the other person is entirely in the dark, your flames aren't going to enlighten the other to either of your satisfactions, as I think has been adequately proved already. This moved from debate to a light show quite a while ago, and there's really no reason it has to continue.
Solar wrote:and cannot keep myself from thinking this is completely on purpose.
All the more reason to not feed the trolls. Leave his fun to his fun, and if he was trying to start something, it wouldn't have worked.

Alright. I'm done, I think.
Crazed123

Re:Halloween Egg

Post by Crazed123 »

Wow, he's right.

I'm not trying to flame, I just don't see why you have to get offended at a joke. And I did write "as far as I know", which I suppose means that you "should be" polite about correcting me when I'm wrong.

Calculating in picoseconds? Why? 1024ths of a second are the standard resolution for the RTC, and I see no reason the clock needs to count that small.

The whole point of the joke is to epoch from a non-arbitrary date, which January 1, 1970 wasn't back when Unix was started up. NOW it's an important date, but in 1970 it was merely New Years Day. So the point was that the birth of the universe was one of the more important dates to epoch from.

If I feel like the work I'll un-offend Solar and change it to epoch from the Big Bang by using a seperate variable for milliseconds.

Oy gevalt.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Halloween Egg

Post by distantvoices »

just a joke on unix time epoch (01011970),and what do I see here? Shouting and having a go at each other?

Lads, Lads ... Oh, not as if I am in any centimeter better. ];-> I too like to have my little vocal/verbal fights.

Stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply