Re: A new era for Temporal

2010-04-20 Thread Dave Rolsky

On Mon, 12 Apr 2010, Moritz Lenz wrote:


Am 12.04.2010 03:47, schrieb Dave Rolsky:

On Sun, 11 Apr 2010, Moritz Lenz wrote:


I've planned to add such a module to the Perl 6 spec, but some comments
on #perl6 suggested it should be kept out of core to prevent bloat.
Still if the overall opinion is that Perl 6 should have such a module
out of the box, I'll be happy to spec it.


I think that having a standard, minimal API for this defined in core as
a Date role would be ideal.


I'm curious, why a role and not a class?


No reason, really. I don't tihnk I understand the Perl 6 way well enough 
to make a good distinction.


Mostly, I want there to be something simple that classes on CPAN6 can 
implement and build on.



-dave

/*
http://VegGuide.org   http://blog.urth.org
Your guide to all that's veg  House Absolute(ly Pointless)
*/


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

2010-04-20 Thread Dave Rolsky

On Fri, 16 Apr 2010, pugs-comm...@feather.perl6.nl wrote:


+=head2 Semi-internal methods
+
+[This section is severely conjectural]
+
+For efficient implementation of arithmetics on CDate objects, two more
+methods are exposed:
+
+$d.daycount
+Date.new-from-daycount(Int $daycount)


I'd _really_ like to see this be based on Rata Die, which is January 1, 
0001. See http://en.wikipedia.org/wiki/Rata_Die


This epoch value is used as the basis for many calendrical calculations in 
the Calendarical Calculations book, and has in turn been used as the 
method for calendar conversion in the Perl 5 DateTime sweet.


Exposing this value explicitly (rata-die-day-count) would be a wise 
decision, IMO.


Also, day-count, not daycount ;)


-dave

/*
http://VegGuide.org   http://blog.urth.org
Your guide to all that's veg  House Absolute(ly Pointless)
*/


Parrot 2.3.0 Released!

2010-04-20 Thread Gerd Pokorra
  Truth is what stands the test of experience.
 - Albert Einstein

On behalf of the Parrot team, I'm proud to announce Parrot 2.3.0 Samoan
Lory. Parrot (http://parrot.org/) is a virtual machine aimed at running
all dynamic languages.

Parrot 2.3.0 is available on Parrot's FTP site, or follow the download
instructions at http://parrot.org/download. For those who would like to
develop on Parrot, or help develop Parrot itself, we recommend using
Subversion on the source code repository to get the latest and best
Parrot code.

Parrot 2.3.0 News:
- Core
  + Allow passing parameters to the dynamic linker ('dlopen' improved)
  + loadlib opcode added
  + Calling conventions are now much more consistent, and follows
natural
semantics of handling arguments and return values
  + Recursive make for src/dynpmc removed
  + Datatype STRINGNULL for a single Null STRING added
  + config_lib.pasm replaced with config_lib.pir
- Platforms
  + Improved handling of new compilers
  + Cygwin packages will be updated again with Parrot releases
  + Fedora packages add desktop files
  + gzip and bzip2 compressed tar files for releases
- Tools
  + tapir executable added; tapir is a TAP test harness
  + Added TAP options --merge --ignore-exit
- Miscellaneous
  + 3 month cycle for supported releases
  + Review and vote of GSoC applications


Many thanks to all our contributors for making this possible, and our
sponsors for supporting this project.  Our next scheduled release is 18
May 2010.

Enjoy!





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

2010-04-20 Thread Mark J. Reed
On Tue, Apr 20, 2010 at 10:59 AM, Dave Rolsky auta...@urth.org wrote:

 I'd _really_ like to see this be based on Rata Die, which is January 1,
 0001. See http://en.wikipedia.org/wiki/Rata_Die


To be clear, that's specifically January 1, 1 CE in the retrojected
Gregorian calendar, which is the same day as January 1, 3 CE in the
retrojected Julian calendar; noon UTC began Julian Day 1,721,426.

You could also use the JD directly, but there's a subtle design decision
lurking there. The JD is tied to UTC, and refers to a specific 24-hour
period that is the same across the planet: JD 2,455,307 began 4 hours and 45
minutes ago as I write this, and will be over in 19 hours and 15 minutes,
and that is a universal fact no matter whether it's currently Tuesday the
20th or already Wednesday the 21st where you are.   An RD, in contrast, is
not tied to a specific time zone, but is simply a numerical way to represent
exactly the same concept as the date: whatever the Gregorian date April 20,
2010 means, RD 733,882 means the same thing.  So on some parts of the
planet its RD 733,882 and in others it's already RD 733,883.

The RD is thus a better fit for the Date class, which is a representation of
an abstract date, unanchored in spacetime.  An integral JD number may be
used to fit the same bill, but opens the possibility of confusion with the
more typical anchored JD values (which might even be available from DateTime
objects).

The difference between them, or with any other epoch choice, is mostly just
a matter of a constant which can be added or subtracted as needed, and to
the degree that's true this is just bikeshed painting.   But the part that
isn't is important:

I don't want to dilute what I see as the primary benefit of a Date object
over a DateTime object that simply has its time fields zeroed, which is
flexibility.  The latter is still by implication tied to a specific swath of
spacetime (e.g. midnight to midnight in some time zone), whereas the former
is free to refer to whatever the human date designation can.

-- 
Mark J. Reed markjr...@gmail.com