When was the big bang?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9582
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

When was the big bang?

Post by dunbarx » Tue Feb 23, 2016 10:21 pm

What is the "real" beginning of time? This came from a thread that had nothing to do with this.

It is important to know that negative seconds can be exploited to find dates before zero seconds (12/31/69).

With a button and a field:

Code: Select all

on mouseUp
   repeat with y = 1 to 325
   get -100000000 * y
   convert it to long date
   put it into line y of temp
   end repeat
   
   sort temp dateTime
put temp into fld 1
end mouseUp
The dates seem valid back to about the year 940 or so. The value "325" is the max this particular handler will go using increments of 100,000,000 seconds, or about 3 years. It would be a hoot to find the actual second where the process breaks down, and you get useless strings of digits instead of a date. These strings are simply the value of, say, 100,000,000 * 326 and up.

But this does indicate that one can find medieval dates, if not ancient Greek ones, directly, without having to roll ones own time calculator.

Craig Newman
Last edited by dunbarx on Wed Aug 31, 2022 6:52 pm, edited 6 times in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: When was the big bang?

Post by FourthWorld » Tue Feb 23, 2016 10:25 pm

Are you on a Mac? The docs note that the span of accurate times the convert command can handle is dependent on the OS routines provided. On Windows life began in Unix time, but OS X has special APIs to do the fudging for developers to handle pre-Unix-time dates.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9582
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: When was the big bang?

Post by dunbarx » Tue Feb 23, 2016 10:32 pm

Richard.
Are you on a Mac?
You cut me to the quick. What other options are there?

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9582
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: When was the big bang?

Post by dunbarx » Wed Feb 24, 2016 1:20 am

So I did fool around with finding the beginning and the ending second. It turns out the big bang started at the negative value of the big crunch.

Of course there may no longer be any such crunch; dark energy trumping gravity, you know.

Anyway the universe can be said to exist between -32535244799 and +32535244799 seconds. Not quite 2^15 in raw digits, if not in scale, though suspiciously close, but this may be due to the uncertainty principal, which is the foundation of my programming style. Hermann will tell me why.

And this means that the big bang started a little after midnight on December 31, in the year 938. It was a Wednesday.

And it the universe will end in the year 3001, on a Thursday.

Craig

Hermann. Why close to 2^15, nothing, please, about my programming style.

EDIT. Some changes to the date and day of week. Sorry, Martin and Lagi. :oops:
Last edited by dunbarx on Wed Feb 24, 2016 3:19 pm, edited 4 times in total.

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 365
Joined: Mon Jun 10, 2013 1:32 pm

Re: When was the big bang?

Post by Lagi Pittas » Wed Feb 24, 2016 1:28 pm

It had to be a Thursday of all days , and Noon is about lunchtime too.

I never could get the hang of Thursdays either.

Lagi

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 256
Joined: Sun May 27, 2007 8:19 pm

Re: When was the big bang?

Post by Martin Koob » Wed Feb 24, 2016 2:09 pm

But on the bright side that first week is just a day and a half and then straight into the weekend. I guess the universe needed to rest up after that initial wave of expansion.

Martin

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: When was the big bang?

Post by [-hh] » Wed Feb 24, 2016 7:24 pm

Hi all,

what a thread! Far from buttons, dropshadows and frames counting.
And who is involved? Craig. No comment.

Last time I read about such problems was around 2000.
Was, besides the 'y2k-problem' also connected to file systems (especially JHFS+).
I had a source explaining this popular in large. Can't find it just now.

Anyway, a good summary is here, explaining the jump to negative numbers from
an integer overflow.

https://en.wikipedia.org/wiki/Year_2038_problem

Now it's hard to solve Craig's 32535244799 problem.

At first we have
log2(1+2*32535244799) = 35.9 , so 2^35 < 1+2*32535244799 < 2^36.

Could be 2^15 seconds and a 10^6 subdivision (microseconds) what requires 20 bits,
because log2(10^6)=19.9.
That is the Microseconds of 2^16 seconds have dimension above 35 and below 36 bit.

[2^15*2^20 =] 2^35 < 1+2*32535244799 < 2^36 [= 2^16*2^20]
Sounds plausible?

And 2^15 is clearly derived from the old 'Apple-paradise joke':
32 bit = plus-minus 15 bit plus 1 bit for the sign plus one bit for (the) apple.

Hermann
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9582
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: When was the big bang?

Post by dunbarx » Wed Feb 24, 2016 8:57 pm

Hermann.

I knew I could count (MMMPH...AH.. HAHA HAHA...) on you.

Craig

Post Reply

Return to “Talking LiveCode”