Re: Temporal revisited

2009-02-23 Thread Darren Duncan
Larry Wall wrote: This still seems to be confusing implementation issues with the point I'm trying to make about the basic nature of time. Duration and Instant are both simple (but typed) Num semantics on seconds. There are no integers unless you specifically ask for an interpretation in minut

Re: Temporal revisited

2009-02-22 Thread David Green
On 2009-Feb-20, at 7:17 am, Dave Rolsky wrote: Define really basic math. [...] you could say "all math is done in terms of seconds", but then there's literally no way to "add 1 month". Oh, I meant only adding or subtracting seconds (as mentioned elsewhere); adding a month is certainly advanc

Re: Temporal revisited

2009-02-20 Thread Mark J. Reed
Assuming the Gregorian calendar, "one month from today" is well defined for 98.15% of all dates, and there are a few logical options for the other 1.85%. It's true you can't define "one month" as a constant amount of time, but providing a method to return one month after a given date is a reasonab

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, mark.a.big...@comcast.net wrote: "one month from today" is ill-defined regardless what time system you are using. There are dates from which "one month from today" can be reasonably argued to be any of 5 different days. This is why bank contracts are always to be written t

Re: Temporal revisited

2009-02-20 Thread Geoffrey Broadwell
On Fri, 2009-02-20 at 15:33 -0600, Dave Rolsky wrote: > Of course, if you're dealing with TAI only, you're safe for constants up > to ONE_WEEK. So we just define ONE_MONTH as 4 * ONE_WEEK, right? *duck* -'f

Re: Temporal revisited

2009-02-20 Thread mark . a . biggar
- Original Message - From: "Dave Rolsky" >That will make it clear >that there's no way to calculate "one month from today" >using the core API. "one month from today" is ill-defined regardless what time system you are using. There are dates from which "one month from today" can be r

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, Larry Wall wrote: Duration and Instant are both simple (but typed) Num semantics on seconds. There are no integers unless you specifically ask for an interpretation in minutes, hours, fortnights, what have you. The basic flow of time is continuous and stable in Perl 6, or a

Re: Temporal revisited

2009-02-20 Thread Larry Wall
On Fri, Feb 20, 2009 at 02:07:05PM -0600, Dave Rolsky wrote: > On Fri, 20 Feb 2009, Dave Whipp wrote: > >> I'm getting a bit lost following precisely what's being proposed. What >> I'm sort of feeling is that there are two fundamental immutable types >> needed: Instants and Durations: >> >> mult

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, Dave Whipp wrote: I'm getting a bit lost following precisely what's being proposed. What I'm sort of feeling is that there are two fundamental immutable types needed: Instants and Durations: multi sub infix:<-> (Instant, Instant --> Duration) multi sub infix:<+> (Instan

Re: Temporal revisited

2009-02-20 Thread Dave Whipp
I'm getting a bit lost following precisely what's being proposed. What I'm sort of feeling is that there are two fundamental immutable types needed: Instants and Durations: multi sub infix:<-> (Instant, Instant --> Duration) multi sub infix:<+> (Instant, Duration --> Instant) multi sub in

Re: Temporal revisited

2009-02-20 Thread Mark J. Reed
On Fri, Feb 20, 2009 at 2:39 AM, David Green wrote: > Why can't we just have time() that takes a :tz adverb and dispense with > gmtime() and localtime()? It depends on what sort of value time() returns. In the caes of Perl5, the return value is completely independent of time zone. You have to t

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, Leon Timmermans wrote: On Thu, Feb 19, 2009 at 7:26 PM, Dave Rolsky wrote: After some discussion I made a number of drastic revisions to S32-setting-library/Temporal.pod What I want to see in Perl 6 is a set of very minimal roles that can be used to provide a simply objec

Re: Temporal revisited

2009-02-20 Thread Leon Timmermans
On Thu, Feb 19, 2009 at 7:26 PM, Dave Rolsky wrote: > After some discussion I made a number of drastic revisions to > S32-setting-library/Temporal.pod > > What I want to see in Perl 6 is a set of very minimal roles that can be used > to provide a simply object from gmtime() and localtime(). These

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, Richard Hainsworth wrote: a) I am strongly in favour of "Instant" over "DateTime" for several reasons, one being that it marks a new approach. I don't care _that_ much. I'm happy to leave it to @Larry. b) Although for business we use a calendar derived from the one decree

Re: Temporal revisited

2009-02-20 Thread Dave Rolsky
On Fri, 20 Feb 2009, David Green wrote: On 2009-Feb-19, at 11:26 am, Dave Rolsky wrote: What I want to see in Perl 6 is a set of very minimal roles that can be used to provide a simply object from gmtime() and localtime(). These objects should not handle locales, proper Olson timezones, string

Re: Temporal revisited

2009-02-20 Thread Richard Hainsworth
Dave Rolsky wrote: After some discussion I made a number of drastic revisions to S32-setting-library/Temporal.pod What I want to see in Perl 6 is a set of very minimal roles that can be used to provide a simply object from gmtime() and localtime(). These objects should not handle locales, pro

Re: Temporal revisited

2009-02-19 Thread David Green
On 2009-Feb-19, at 11:26 am, Dave Rolsky wrote: What I want to see in Perl 6 is a set of very minimal roles that can be used to provide a simply object from gmtime() and localtime(). These objects should not handle locales, proper Olson timezones, string parsing, user-defined formatting, or

Temporal revisited

2009-02-19 Thread Dave Rolsky
After some discussion I made a number of drastic revisions to S32-setting-library/Temporal.pod What I want to see in Perl 6 is a set of very minimal roles that can be used to provide a simply object from gmtime() and localtime(). These objects should not handle locales, proper Olson timezones,