Re: [Vm-dev] Year 2037 problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Year 2037 problem

Eliot Miranda-2
On Wed, May 14, 2014 at 5:48 PM, David T. Lewis <[hidden email]> wrote:

On Wed, May 14, 2014 at 05:34:42PM -0700, Casey Ransberger wrote:
>
> Below.
>
> > On May 13, 2014, at 10:30 AM, Eliot Miranda <[hidden email]> wrote:
> >
> > The [Cog] vms and the interpreter provide a 64 bit microseconds from 1901 primitive which is good for > 30,000 years.
>
> Where's the method in VMMaker? Maybe I'll leave a nice comment for the poor sap who gets the bug in 30,000 years:D
>

There are two primitives available in all current VMs:

   primitiveUTCMicrosecondClock
       "Answer the UTC microseconds since the Smalltalk epoch. The value is
       derived from the Posix epoch (see primitiveUTCMicrosecondClock) with a
       constant offset corresponding to elapsed microseconds between the two
       epochs according to RFC 868."

   primitiveUtcWithOffset
       "Answer an array with UTC microseconds since the Posix epoch and
       the current seconds offset from GMT in the local time zone. An empty
       two element array may be supplied as a parameter.
       This is a named (not numbered) primitive in the null module (ie the VM)"

In which case are we in agreement that it's time I replace the old primitive use with the new ones in trunk?

--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Year 2037 problem

Eliot Miranda-2
Um...


On Wed, May 14, 2014 at 5:48 PM, David T. Lewis <[hidden email]> wrote:

On Wed, May 14, 2014 at 05:34:42PM -0700, Casey Ransberger wrote:
>
> Below.
>
> > On May 13, 2014, at 10:30 AM, Eliot Miranda <[hidden email]> wrote:
> >
> > The [Cog] vms and the interpreter provide a 64 bit microseconds from 1901 primitive which is good for > 30,000 years.
>
> Where's the method in VMMaker? Maybe I'll leave a nice comment for the poor sap who gets the bug in 30,000 years:D
>

There are two primitives available in all current VMs:

   primitiveUTCMicrosecondClock
       "Answer the UTC microseconds since the Smalltalk epoch. The value is
       derived from the Posix epoch (see primitiveUTCMicrosecondClock) with a
       constant offset corresponding to elapsed microseconds between the two
       epochs according to RFC 868."

   primitiveUtcWithOffset
       "Answer an array with UTC microseconds since the Posix epoch and
       the current seconds offset from GMT in the local time zone. An empty
       two element array may be supplied as a parameter.
       This is a named (not numbered) primitive in the null module (ie the VM)"

The primitives in Cog are from the Smalltalk epoch, 1901.  We still have a ways to go.

With 50000 years to play with the Posix epoch really makes no sense to me.  The start of the 20th century is a significant point time.  1970, well we'd already been round the moon, I was 11, hair styles were interesting, blah.

 

Dave




--
best,
Eliot