[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] current-posix-second is a disastrous mistake



Posix should never have done what they did. But they did it, and now there is a serious problem if Scheme diverges.

The problem is that suddenly *scheme systems* will be responsible for creating a mechanism for distributing information about leap seconds to individual systems.

This is something that Unix/Linux distributions have in place, but the timezone folks adhere (now) to the Posix definitions, and so their distribution channel is not open to us.

It was very bad for Posix to make the decision they did here, but it would be even worse for us to diverge from them.

Thomas

On Tue, Dec 14, 2010 at 8:06 AM, John Cowan <cowan@x> wrote:
Alex Shinn scripsit:

> I have no idea what the [ISO C] committee was thinking when they came
> up with POSIX time, but I can only assume they were under the influence
> of some substance for which the idea of time passing at varying speeds
> seems natural.

They were under the influence of the maxim "Existing code matters,
existing implementations do not".  They observed that the overwhelming
majority of existing applications code that made use of clock() assumed
that {leap years, non-leap years, days, hours, minutes} were exactly
{31622400s, 31536000s, 86400s, 3600s, 60s} long.  Therefore, they defined
clock() to return a notion of time with the same assumptions.

> The ugly news is that if we standardize on TAI instead of POSIX time
> then many Schemes may simply be unable to implement the standard.
> You need a specialized library like NTP, or a hypothetical clock_gettime
> with a CLOCK_TAI clock id.  [CLOCK_MONOTONIC is difficult to work with
> since the epoch is unknown, and is dangerous on SMP systems because
> the process can shift to a different core and get inconsistent results.]

These are the points that concerned me most.  Note that I have added
minimal monotonic time to my WG1 proposal.

> I need to think about this more, but at this point am inclined to drop
> any notion of time from WG1 and leave it to WG2.

Please do continue to think about it.

--
John Cowan    http://ccil.org/~cowan  cowan@x
'Tis the Linux rebellion / Let coders take their place,
The Linux-nationale / Shall Microsoft outpace,
We can write better programs / Our CPUs won't stall,
So raise the penguin banner of / The Linux-nationale.  --Greg Baker

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports