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

Re: Temporal and purity (was: Re: IO, Trees, and Time/Date)

2009-02-19 Thread David Green
On 2009-Feb-19, at 4:39 pm, Martin Kealey wrote: 2. "Date isa Instant" works sensibly: anywhere that expects an Instant, you can give it a Date. (Assuming we all agree that dates start at midnight, but then we *are* talking specifically Gregorian dates.) I don't like dates just starting at

Re: Temporal changes (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-19 Thread Wayland
On Fri, 20 Feb 2009, Timothy S. Nelson wrote: +role Temporal::DateTime { +has Temporal::Date $!date handles ; Can't do this, I think; this would require an instance of Temporal::Date, which is a role and can't be instantiated. That's why I was using "does" instead. I don't know

Re: Perl's internal time (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Chris Dolan wrote: On Feb 19, 2009, at 10:17 PM, Timothy S. Nelson wrote: On Thu, 19 Feb 2009, Larry Wall wrote: Well, leaving that rant aside, I'm still tempted to say that times in Perl 6 are TAI seconds since 2000. Standard TAI would work too. I've wondered someti

Re: Perl's internal time (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-19 Thread Chris Dolan
On Feb 19, 2009, at 10:17 PM, Timothy S. Nelson wrote: On Thu, 19 Feb 2009, Larry Wall wrote: Well, leaving that rant aside, I'm still tempted to say that times in Perl 6 are TAI seconds since 2000. Standard TAI would work too. I've wondered sometimes about the idea of having a dual/moving

Re: Exegesis 7/format() question

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Brandon S. Allbery KF8NH wrote: On 2009 Feb 17, at 1:54, Timothy S. Nelson wrote: Hi all. According to S29, the Perl 5 format() function is obsolete, and it says "See Exegesis 7". According to Exegesis 7, there will be a Form.pm which implements similar functionality, b

Perl's internal time (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Larry Wall wrote: Well, leaving that rant aside, I'm still tempted to say that times in Perl 6 are TAI seconds since 2000. Standard TAI would work too. I've wondered sometimes about the idea of having a dual/moving epoch. By this, I mean that you have eg. two Ints, one

Re: Exegesis 7/format() question

2009-02-19 Thread Brandon S. Allbery KF8NH
On 2009 Feb 17, at 1:54, Timothy S. Nelson wrote: Hi all. According to S29, the Perl 5 format() function is obsolete, and it says "See Exegesis 7". According to Exegesis 7, there will be a Form.pm which implements similar functionality, but has to be "use"d. My questions are: 1. Is

r25452 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread pugs-commits
Author: wayland Date: 2009-02-20 02:42:25 +0100 (Fri, 20 Feb 2009) New Revision: 25452 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: Minor syntax fix Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod ==

Temporal changes (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, pugs-comm...@feather.perl6.nl wrote: Author: autarch Date: 2009-02-19 19:14:48 +0100 (Thu, 19 Feb 2009) New Revision: 25445 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: This is a very drastic revision (hopefully this won't turn into a revert war ;) I

More trees and roles

2009-02-19 Thread Timothy S. Nelson
On IRC, ruoso wrote: wayland, one important thing I didn't mention in the mail is that I understand that if some attribute is going to be undefined for some cases in a Role, then it doesn't belong in that role, but in a more specialized one... the good thing about roles is that they don't r

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
Darren Duncan wrote: Dave Rolsky wrote: It's not necessary to store each unit internally in order to get everything right, and not doing so makes some things a lot easier (though it makes other things harder ;) I prefer to make value representation simpler at the possible cost of calculation

Re: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Larry Wall
On Thu, Feb 19, 2009 at 05:05:32PM -0600, Dave Rolsky wrote: > On Thu, 19 Feb 2009, Darren Duncan wrote: > >> As per my previous post, I recommend having both, like this: >> >> role Instant { >>has Int $.year; >>... >>has Rat $.second; >> } >> >> role DateTime is Instant where define

Re: Spec reorganisation

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Daniel Ruoso wrote: Em Qui, 2009-02-19 às 22:57 +1100, Timothy S. Nelson escreveu: Interesting. I'm happy to assume that $root is allowed to be Undefined, I think. But let me ask a question; were you to represent an unrooted tree in a computer, how would you do it

Re: Spec reorganisation

2009-02-19 Thread Geoffrey Broadwell
On Thu, 2009-02-19 at 22:57 +1100, Timothy S. Nelson wrote: > On Thu, 19 Feb 2009, Carl Mäsak wrote: > > A tree is a graph without cycles. That's insufficient. In fact, there are a number of ways that the general concept of an acyclic graph must be constrained before you get something you can cal

Re: Temporal and purity (was: Re: IO, Trees, and Time/Date)

2009-02-19 Thread Martin Kealey
On Fri, 20 Feb 2009, Timothy S. Nelson wrote: > On Thu, 19 Feb 2009, Martin D Kealey wrote: > > Rather, let's have immutable time "values", and methods which return other > > "values" where various computations (*1) have been applied. Provide > > constructors which take the Y/M/D/h/m/s/dst_now/dst_

Re: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
Dave Rolsky wrote: On Thu, 19 Feb 2009, Darren Duncan wrote: So something like that. So Date and Time mean all Date|Time details, and DateTime means all details of both. And Instant means any combination of defined or not of said member attributes. And that's actually why I advocated Instan

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
Dave Rolsky wrote: On Thu, 19 Feb 2009, Darren Duncan wrote: And which is why subsecond and whole-second *can* be combined. Appropriate separation allows better accuracy in letting people express what they mean rather than shoehorning it into a less accurate space, like DateTime.pm shoehorns

Re: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Dave Rolsky
On Thu, 19 Feb 2009, Darren Duncan wrote: As per my previous post, I recommend having both, like this: role Instant { has Int $.year; ... has Rat $.second; } role DateTime is Instant where defined $.year ... and defined $.second; role Date is Instant where defined $.year ... and

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Dave Rolsky
On Thu, 19 Feb 2009, Darren Duncan wrote: And which is why subsecond and whole-second *can* be combined. Appropriate separation allows better accuracy in letting people express what they mean rather than shoehorning it into a less accurate space, like DateTime.pm shoehorns into Days+Seconds+N

Re: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
pugs-comm...@feather.perl6.nl wrote: Author: autarch Date: 2009-02-19 19:14:48 +0100 (Thu, 19 Feb 2009) New Revision: 25445 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: This is a very drastic revision (hopefully this won't turn into a revert war ;) I agree with your chang

r25451 - docs/Perl6/Spec

2009-02-19 Thread pugs-commits
Author: hinrik Date: 2009-02-19 22:37:47 +0100 (Thu, 19 Feb 2009) New Revision: 25451 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] fix Pod errors Modified: docs/Perl6/Spec/S29-functions.pod === --- docs/Perl6/Spec/S29-fu

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
Timothy S. Nelson wrote: On Thu, 19 Feb 2009, Darren Duncan wrote: You could make month/day into positive integers or "subtype of Int where 1..12" etc, though it isn't strictly necessary. Leave year as Int of course, since at least in the proleptic Gregorian etc you can have negatives or zero

Re: r25402 - in docs/Perl6/Spec: . S32-setting-library

2009-02-19 Thread Moritz Lenz
Hi, as necessary as this step is, it opens up a new task that I haven't though of before. First all the new POD files should appear in a sensible manner on L, and second there should be good and easy way to smartlink to these new documents (for example with L). pugs-co

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,

r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread pugs-commits
Author: autarch Date: 2009-02-19 19:14:48 +0100 (Thu, 19 Feb 2009) New Revision: 25445 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: This is a very drastic revision (hopefully this won't turn into a revert war ;) Here's the changes in summary: removed all references to ...

Temporal and purity (was: Re: IO, Trees, and Time/Date)

2009-02-19 Thread Timothy S. Nelson
Just to clear up ahead of time, the consensus both here and on IRC seemed to be that in the core, we put a basic Temporal::Instant object that about powerful enough to deal with: - localtime/gmtime functionality - ctime, mtime, etc, in stat() - nanoseconds or whatever needed f

Re: Spec reorganisation

2009-02-19 Thread Daniel Ruoso
Em Qui, 2009-02-19 às 22:57 +1100, Timothy S. Nelson escreveu: > Interesting. I'm happy to assume that $root is allowed to be > Undefined, I think. But let me ask a question; were you to represent an > unrooted tree in a computer, how would you do it so that, if you had to look > around

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Darren Duncan wrote: +role Temporal::Date { + has Int $.year; + has Int $.month; + has Int $.day; # Day of month + has Int $.dayofweek; You could make month/day into positive integers or "subtype of Int where 1..12" etc, though it isn't strictly

Re: r25402 - in docs/Perl6/Spec: . S32-setting-library

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Moritz Lenz wrote: Hi, as necessary as this step is, it opens up a new task that I haven't though of before. First all the new POD files should appear in a sensible manner on L, and second there should be good and easy way to smartlink to these n

Re: Spec reorganisation

2009-02-19 Thread Timothy S. Nelson
On Thu, 19 Feb 2009, Carl Mäsak wrote: Timothy (>), Moritz (>>): Speaking of Tree, let me quote from IRC: 09:23 < masak> it's a bit unfortunate that the identifier 'Tree' is now squatted by an internal class in Perl 6, which is not general enough to reprenest an arbit

Re: r25405 - docs/Perl6/Spec/S32-setting-library

2009-02-19 Thread Darren Duncan
pugs-comm...@feather.perl6.nl wrote: Author: wayland Date: 2009-02-19 08:47:26 +0100 (Thu, 19 Feb 2009) New Revision: 25405 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: Improved Temporal (previously DateTime) stuff a bit Okay, so I have a few specific suggestions ... And

Re: r25402 - in docs/Perl6/Spec: . S32-setting-library

2009-02-19 Thread Darren Duncan
Darren Duncan wrote: Presumably the other enhancements we discussed like using the 'Instant' name will follow soon. Well, I spoke too quickly; its already done with r25405; good start there. -- Darren Duncan