Halloween Egg
Halloween Egg
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.
The hint is to look for a constant.
Re:Halloween Egg
Isn't that epoch a little bit large?Crazed123 wrote: The hint is to look for a constant.
Do I get myself now?
Re:Halloween Egg
Wait, it could be me or... according it's about 6000 years ago.. and that's exactly the year Israel are using...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.
I could be wrong ofcourse ::)
Re:Halloween Egg
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.
For anyone confused at the code, if it looks like a bug it's probably a bug.
Re:Halloween Egg
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."
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.
Re:Halloween Egg
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).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.
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).
Re:Halloween Egg
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...
Every good solution is obvious once you've found it.
Re:Halloween Egg
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.
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.
Re:Halloween Egg
^^ 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.
Sorry, wrong thread, but I couldn't resist.
Every good solution is obvious once you've found it.
Re:Halloween Egg
"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.
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.
Re:Halloween Egg
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.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.
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.
Re:Halloween Egg
1) You are wrong about my religious beliefs.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.
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.
Re:Halloween Egg
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.
Alright. I'm done, I think.
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.Solar wrote:and cannot keep myself from thinking this is completely on purpose.
Alright. I'm done, I think.
Re:Halloween Egg
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.
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.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Halloween Egg
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.
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
BlueillusionOS iso image