Re: Temporal seems a bit wibbly-wobbly

2010-02-23 Thread Nicholas Clark
On Tue, Feb 23, 2010 at 10:02:02AM +0300, Richard Hainsworth wrote:
> - Time Zone, which can differ from GMT by halves of an hour.

quarter hours in at least one place (Nepal)

This doesn't affect your reasoning.

Also, time zone abbreviations are ambiguous. PST can be
Pacific Standard Time, Pakistan Standard Time, Phillippine Standard Time.
Probably others are similarly overloaded.

This means that even a well formed time string complete with timezone
abbreviation isn't actually absolute.

> - The legal jurisdiction.

And oh gosh is *that* one fun. eg do we or don't we have daylight saving time?

Nicholas Clark


Building Rakudo under Windows 7 / 32bit

2010-02-23 Thread Claus Nagel
Hi,

I'm trying to build rakudo under Windows 7 / 32bit ( Strawberry
Version 5.10.1.0, released 21 Oct 2009) and get the error

D:\Src\rakudo\parrot_install\bin\parrot.exe  src\gen\perl6.pbc --target=pir \
src\gen\core.pm > src\gen\core.pir
mingw32-make: *** [perl6.pbc] Error -1073741819

PS D:\Src\rakudo> git show
commit 4071ac33015ff1ca30e5fc15cce0065b4fa13f5e

The error code 1073741819 was mentioned early last year on #perl6 and
on this list appearing on vista/32 and darwin/32.

Any hints how to find out what's wrong (btw: I never played with gdb...)?

- clausi -


Re: Temporal seems a bit wibbly-wobbly

2010-02-23 Thread Mark J. Reed
On Mon, Feb 22, 2010 at 6:50 PM, Daniel Ruoso  wrote:
> So why have the duration TAI-based?
>
> Simply because TAI is supposedly immutable as a scale, so it's predictable.
> Gregorian time is not immutable and timezone definitions are not anyhow
> predictable.

OK, this seems to be a point of confusion.  TAI *is defined in terms
of the Gregorian calendar*.It is not just a sequence of anonymous
seconds ticking off at the rate specified by SI.   TAI specifies a
name for each second, not just the amount of time between them.  And
that name is a date/time using the Gregorian calendar.  If you like,
you can convert it to a Julian Date, but that's a one-to-one mapping.
You're still going to get a value that's wrong for civil purposes -
that is, currently 34 seconds fast compared to an NTP-synchronized
clock.

If Perl's internal idea of time is just a count of atomic seconds,
great.  That, however, is not TAI.  UTC and TAI and the proposed
leap-second-free UTC-replacement "TI" all tick at the same rate and at
the same time, and you can devise any number of time scales that do
likewise, differing only in the labels.

-- 
Mark J. Reed 


[perl #73034] Variables in closures are shared too eagerly

2010-02-23 Thread via RT
# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #73034]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=73034 >


>From t/spec/S06-signature/sub-ref.t:

{
my $mkinc = sub { my $x = 0; return sub { $x++ }; };

my $inc1 = $mkinc();
my $inc2 = $mkinc();

is($inc1(), 0, "clousures: inc1 == 0");
is($inc1(), 1, "clousures: inc1 == 1");
is($inc2(), 0, "clousures: inc2 == 0");
is($inc2(), 1, "clousures: inc2 == 1");
}

Rakudo now fails the last two tests, the old rakudo (now alpha) passed
them (and Perl 5.10 also passes them, if adapted to Perl 5 syntax).

It shares $x between both closures, although it shouldn't.


Re: Building Rakudo under Windows 7 / 32bit

2010-02-23 Thread Bruce Gray


On Feb 23, 2010, at 7:45 AM, Claus Nagel wrote:


I'm trying to build rakudo under Windows 7 / 32bit ( Strawberry

--snip--

The error code 1073741819 was mentioned early last year on #perl6 and
on this list appearing on vista/32 and darwin/32.


Info for readers playing catch-up (like me):
Error code -1073741819 (the negative is significant)
is more commonly written as 0xC005,
which is a Win32 EXCEPTION_ACCESS_VIOLATION,
which is the equivalent of a Unix SIGSEGV.

Any hints how to find out what's wrong (btw: I never played with  
gdb...)?



Normally, you would use `gdb` to get a backtrace, but Strawberry Perl  
does not include `gdb`.


I have reproduced the problem with MinGW-TDM on Win2K, but cannot get  
a backtrace.

Session output:
C:\Rakudo_TDM\rakudo>gdb C:\Rakudo_TDM\rakudo\parrot_install\bin 
\parrot.exe

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show  
copying"

and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...

(gdb) run src\gen\perl6.pbc --target=pir src\gen\core.pm > src\gen 
\core.pir
Starting program: C:\Rakudo_TDM\rakudo\parrot_install\bin\parrot.exe  
src\gen\perl6.pbc --target=pir src\gen\core.pm > src\gen\core.pir

[New thread 368.0x4dc]
Failed allocation of 116122728 bytes
Parrot VM: PANIC: Out of mem!
C file src\gc\alloc_memory.c, line 151
Parrot file (not available), line (not available)

We highly suggest you notify the Parrot team if you have not been  
working on

Parrot.  Use parrotbug (located in parrot's root directory) or send an
e-mail to parrot-...@lists.parrot.org.
Include the entire text of this error message and the text of the  
script that

generated the error.  If you've made any modifications to Parrot, please
describe them as well.

Version : 2.1.0-devel
Configured  : Tue Feb 23 17:40:30 2010 GMT
Architecture: i386-MSWin32
JIT Capable : No
Interp Flags: (no interpreter)
Exceptions  : (missing from core)

Dumping Core...
Sorry, coredump is not yet implemented for this platform.


Program exited with code 01.
(gdb) bt
No stack.


--
Hope this helps,
Bruce Gray (Util)



r29809 - docs/Perl6/Spec

2010-02-23 Thread pugs-commits
Author: lwall
Date: 2010-02-23 19:32:48 +0100 (Tue, 23 Feb 2010)
New Revision: 29809

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] make Instant completely opaque as suggested by ruoso++.
Instants are now considered a more type basic than epochs, which
are just particular named instants.  All culturally aware time
can be based on calculations involving instants and durations.
(Durations are still considered interconvertible with Reals.)


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-02-23 18:07:45 UTC (rev 29808)
+++ docs/Perl6/Spec/S02-bits.pod2010-02-23 18:32:48 UTC (rev 29809)
@@ -13,8 +13,8 @@
 
 Created: 10 Aug 2004
 
-Last Modified: 20 Feb 2009
-Version: 202
+Last Modified: 23 Feb 2010
+Version: 203
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1168,38 +1168,61 @@
 Parcel  List of syntactic objects
 Capture Function call arguments (right-hand side of a binding)
 BlobAn undifferentiated mass of bits
-Instant A point on the continuous atomic timeline (TAI)
+Instant A point on the continuous atomic timeline
 DurationThe difference between two Instants
 HardRoutine A routine that is committed to not changing
 
 Cs and Cs are measured in atomic seconds with
 fractions.  Notionally they are real numbers which may be implemented
-in any C type of sufficient precision, preferably a C or C.
-(Implementations that make fixed-point assumptions about the available
-precision subsecond precision are discouraged; the user interface must act
-like real numbers in any case.)  Interfaces that take C arguments,
-such as sleep(), may also take C arguments, but C
-arguments must be explicitly created via any of various culturally
-aware time specification APIs that, by and large, are outside the
-C of Perl 6, with the possible exception of a constructor taking a
-native TAI value.  In numeric context a C happily returns a
-C representing seconds.  If pressed for a number, an C
-will return the length of time in atomic seconds from the TAI epoch,
-but it will be unhappy about it.  (The time will be returned as a C
-to preserve maximal precision and accuracy.)  Systems which cannot provide
-a steady time base, such as POSIX systems, will simply have to make
-their best guess as to the correct atomic time.
+in any C type of sufficient precision, preferably a C or
+C.  (Implementations that make fixed-point assumptions about
+the available precision subsecond precision are discouraged; the user
+interface must act like real numbers in any case.)  Interfaces that
+take C arguments, such as sleep(), may also take C
+arguments, but C arguments must be explicitly created either
+via any of various culturally aware time specification APIs.  A small
+number of C values that represent common epoch instant values
+are also available.
 
-Although C presents a C interface to the user
-when converted to C, the internal form may of course be
-optimized internally for "nearby" times, so that, if we know the
-year as an integer, the instant within the year can just be a C
-representing the offset from the beginning of the year.  Calculations
-that fall within the same year can then be done in C rather than
-C, or a table of yearly offsets can find the difference in
-integer seconds between two years, since (so far) nobody has had the
-nerve to propose fractional leap seconds.
+In numeric context a C happily returns a C or C
+representing the number of seconds.  C values, on the other
+hand, are largely opaque, numerically speaking, and in particular
+are epoch agnostic.  (Any epoch is just a particular C, and
+all times related to that epoch are really C ± C,
+which returns a new C.)  In order to facilitate the writing of
+culturally aware time modules, the C type provides C
+values corresponding to various commonly used epochs, such as the
+1958 TAI epoch, the POSIX epoch, the Mac epoch, and perhaps the year
+year 2000 epoch as UTC thinks of it.   There's no reason to exclude
+any useful epoch that is well characterized in atomic seconds.
+All normal times can be calculated from those epoch instants using
+addition and subtraction of C values.  Note that the
+C values are still just atomic time without any cultural
+deformations; in particular, the C formed of by subtracting
+C from the current instant will contain more
+seconds than the current POSIX time due to POSIX's abysmal ignorance
+of leap seconds.  This is not the fault of the universe, which is
+not fooled (neglecting relativistic considerations).  Cs and
+Cs are always linear atomic seconds.  Systems which cannot
+officially provide a steady time base, such as POSIX systems, will
+simply have to make their best guess as to the correct atomic time
+when asked to interconvert between cultura

Re: Building Rakudo under Windows 7 / 32bit

2010-02-23 Thread Claus Nagel
Thank,

I try that.
Can't wait to play around with perl6 - the quickened pace just seems
staggering since I read my first synopsis years ago...

- clausi -

On Tue, Feb 23, 2010 at 18:37, Bruce Gray  wrote:
>
> On Feb 23, 2010, at 7:45 AM, Claus Nagel wrote:
>>
>> I'm trying to build rakudo under Windows 7 / 32bit ( Strawberry
>
> --snip--
>>
>> The error code 1073741819 was mentioned early last year on #perl6 and
>> on this list appearing on vista/32 and darwin/32.
>
> Info for readers playing catch-up (like me):
> Error code -1073741819 (the negative is significant)
> is more commonly written as 0xC005,
> which is a Win32 EXCEPTION_ACCESS_VIOLATION,
> which is the equivalent of a Unix SIGSEGV.
>
>> Any hints how to find out what's wrong (btw: I never played with gdb...)?
>
>
> Normally, you would use `gdb` to get a backtrace, but Strawberry Perl does
> not include `gdb`.
>
> I have reproduced the problem with MinGW-TDM on Win2K, but cannot get a
> backtrace.
> Session output:
> C:\Rakudo_TDM\rakudo>gdb C:\Rakudo_TDM\rakudo\parrot_install\bin\parrot.exe
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-mingw32"...
>
> (gdb) run src\gen\perl6.pbc --target=pir src\gen\core.pm > src\gen\core.pir
> Starting program: C:\Rakudo_TDM\rakudo\parrot_install\bin\parrot.exe
> src\gen\perl6.pbc --target=pir src\gen\core.pm > src\gen\core.pir
> [New thread 368.0x4dc]
> Failed allocation of 116122728 bytes
> Parrot VM: PANIC: Out of mem!
> C file src\gc\alloc_memory.c, line 151
> Parrot file (not available), line (not available)
>
> We highly suggest you notify the Parrot team if you have not been working on
> Parrot.  Use parrotbug (located in parrot's root directory) or send an
> e-mail to parrot-...@lists.parrot.org.
> Include the entire text of this error message and the text of the script
> that
> generated the error.  If you've made any modifications to Parrot, please
> describe them as well.
>
> Version     : 2.1.0-devel
> Configured  : Tue Feb 23 17:40:30 2010 GMT
> Architecture: i386-MSWin32
> JIT Capable : No
> Interp Flags: (no interpreter)
> Exceptions  : (missing from core)
>
> Dumping Core...
> Sorry, coredump is not yet implemented for this platform.
>
>
> Program exited with code 01.
> (gdb) bt
> No stack.
>
>
> --
> Hope this helps,
> Bruce Gray (Util)
>
>


r29810 - docs/Perl6/Spec

2010-02-23 Thread pugs-commits
Author: tene
Date: 2010-02-23 22:05:30 +0100 (Tue, 23 Feb 2010)
New Revision: 29810

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] Small prose fixes.  No functional changes.


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-02-23 18:32:48 UTC (rev 29809)
+++ docs/Perl6/Spec/S02-bits.pod2010-02-23 21:05:30 UTC (rev 29810)
@@ -1176,10 +1176,10 @@
 fractions.  Notionally they are real numbers which may be implemented
 in any C type of sufficient precision, preferably a C or
 C.  (Implementations that make fixed-point assumptions about
-the available precision subsecond precision are discouraged; the user
+the available subsecond precision are discouraged; the user
 interface must act like real numbers in any case.)  Interfaces that
 take C arguments, such as sleep(), may also take C
-arguments, but C arguments must be explicitly created either
+arguments, but C arguments must be explicitly created
 via any of various culturally aware time specification APIs.  A small
 number of C values that represent common epoch instant values
 are also available.
@@ -1192,7 +1192,7 @@
 which returns a new C.)  In order to facilitate the writing of
 culturally aware time modules, the C type provides C
 values corresponding to various commonly used epochs, such as the
-1958 TAI epoch, the POSIX epoch, the Mac epoch, and perhaps the year
+1958 TAI epoch, the POSIX epoch, the Mac epoch, and perhaps the
 year 2000 epoch as UTC thinks of it.   There's no reason to exclude
 any useful epoch that is well characterized in atomic seconds.
 All normal times can be calculated from those epoch instants using



Re: Temporal seems a bit wibbly-wobbly

2010-02-23 Thread Timothy S. Nelson

On Tue, 23 Feb 2010, Nicholas Clark wrote:


On Tue, Feb 23, 2010 at 10:02:02AM +0300, Richard Hainsworth wrote:

- Time Zone, which can differ from GMT by halves of an hour.


quarter hours in at least one place (Nepal)

This doesn't affect your reasoning.

Also, time zone abbreviations are ambiguous. PST can be
Pacific Standard Time, Pakistan Standard Time, Phillippine Standard Time.
Probably others are similarly overloaded.


	EST = Eastern Standard time, ie. +1000 from GMT.  Has anyone noticed 
that I'm referring to Australia?  Both Aust. & USA have Eastern Standard Time, 
but they're quite different times :).



This means that even a well formed time string complete with timezone
abbreviation isn't actually absolute.


That's why we use +1000 now :).


- The legal jurisdiction.


And oh gosh is *that* one fun. eg do we or don't we have daylight saving time?


	...and are we starting 3 months early this year to accomodate the 
Olympics?


:)


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-



r29811 - docs/Perl6/Spec

2010-02-23 Thread pugs-commits
Author: masak
Date: 2010-02-24 00:14:59 +0100 (Wed, 24 Feb 2010)
New Revision: 29811

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
[S12] found/fixed a case of a missing comma between adverbs

Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2010-02-23 21:05:30 UTC (rev 29810)
+++ docs/Perl6/Spec/S12-objects.pod 2010-02-23 23:14:59 UTC (rev 29811)
@@ -820,7 +820,7 @@
 One handy place for an in-place mutator is to call a constructor on a
 variable of a known type:
 
-my Dog $spot .= new(:tail :legs);
+my Dog $spot .= new(:tail, :legs);
 
 =head1 Calling sets of methods