Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
More importantly, it's already in the spec! All I proposed was an alias to an existing attribute name. If it gets dropped out of core, that's fine, too. But I'd like to see the longer name available, in whatever module it shows up in... On Thu, Jul 15, 2010 at 5:36 PM, yary wrote: > On Thu, J

Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread yary
On Thu, Jul 15, 2010 at 2:13 PM, Brandon S Allbery KF8NH wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 7/15/10 12:21 , Mark J. Reed wrote: >> By analogy, I'd say week-of-year should work as well. > > Wasn't the week stuff punted to a non-core module because there are too many > d

Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/15/10 12:21 , Mark J. Reed wrote: > By analogy, I'd say week-of-year should work as well. Wasn't the week stuff punted to a non-core module because there are too many differences in how it's handled (week starts on Sunday in the US and Israel and

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread yary
> or, if you want to use bit ops and integer math, "$l +> 1 + $r +> 1 + > ($l mod 2 + $r mod 2) +> 1" Just because I find a perverse pleasure in this- $mid = $r+>1+$l+>1+($r+&$l+&1) -y

[perl #73460] tests available

2010-07-15 Thread kyleha
This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/whatever.t commit 00c99647a074586660ac551d94a564fdd29c842a Author: moritz Date: Thu Jul 15 19:04:00 2010 + [t/spec] tests for RT #73460, Whatever stars and variables

[perl #76234] tests available

2010-07-15 Thread kyleha
This is an automatically generated mail to inform you that tests are now available in t/spec/S02-literals/string-interpolation.t commit 34d975a16ed97d91998ebac76d096293c6cdbfe7 Author: moritz Date: Thu Jul 15 19:00:56 2010 + [t/spec] test for RT #76234, interpolating empty block into

Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
I was just proposing an alias for "week" it that clarifies what it is the week *of*. The rest of what you ask is already established in Temporal.pm. 1. week returns the week number in the ISO 8601 week calendar. You can find the spec by Googling, but in summary: a. weeks begin on Monday

r31702 -[S06] ss/is context/is dynamic/ fossil

2010-07-15 Thread pugs-commits
Author: lwall Date: 2010-07-15 19:24:08 +0200 (Thu, 15 Jul 2010) New Revision: 31702 Modified: docs/Perl6/Spec/S06-routines.pod Log: [S06] ss/is context/is dynamic/ fossil Modified: docs/Perl6/Spec/S06-routines.pod === --- docs/P

Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread yary
On Thu, Jul 15, 2010 at 9:21 AM, Mark J. Reed wrote: > By analogy, I'd say week-of-year should work as well. Oof, is there a generally accepted for numbering weeks within a year? A month's boundaries' always coincides with a day's boundary, but a year only occasionally begins/ends on a week bound

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread yary
"mid" is too specific. A "mean" function may be good as part of a statistics package. Doesn't seem like a good addition to the core. How about resorting to algebra and using the commutation my $middle = floor($l / 2 + $r / 2); or, if you want to use bit ops and integer math, "$l +> 1 + $r +> 1 +

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread Moritz Lenz
Todd Olson wrote: > At 12:35 +0200 2010-07-15, Moritz Lenz wrote: >>>If it ever were the case that $r + $l could produce an overflow >> >>Then we really have other problems. Remember that $r and $l are >>array indexes. If your machine has enough memory to hold an array >>and a hash of the same si

Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
By analogy, I'd say week-of-year should work as well. On Thu, Jul 15, 2010 at 8:18 AM, wrote: > Author: Kodi > Date: 2010-07-15 14:18:15 +0200 (Thu, 15 Jul 2010) > New Revision: 31696 > > Modified: >   docs/Perl6/Spec/S32-setting-library/Temporal.pod > Log: > [S32/Temporal] Permit day-of-month o

Re: [bug] A where clause should not apply to a missing optional argument.

2010-07-15 Thread Stéphane Payrard
I am ok with the where applying on an explicit default argument. But I understand the implicit default argument as the way to manifest the absence of that argument. So that doest not make much sense to test if that value is conform to the where constraint because in essence there is no value to t

[perl #76514] [bug] A where clause should not apply to a missing optional argument.

2010-07-15 Thread jn...@jnthn.net via RT
On Wed Jul 14 16:25:26 2010, cognominal wrote: > Here, the where clause is applied to the default value, the undefined > type Any > and results in an error. > > $ perl6 > > sub a(Range $r? where {$r.min >= 0} ) {}; a() > Type objects are abstract and have no attributes, but you tried to > access

[perl #73044] [TODO] user-defined circumfixes in Rakudo

2010-07-15 Thread jn...@jnthn.net via RT
On Tue Feb 23 08:43:05 2010, masak wrote: > std: sub circumfix:<| |>() {}; |*| > std 29806: OUTPUT«===SORRY! [...] FAILED 00:01 11… > STD doesn't do circumfixes > oh :/ > alpha: sub circumfix:<| |>() {}; |*| > alpha 30e0ed: OUTPUT«Confused at line 10, near "|" [...] > aww > :-) >

[perl #73460] [BUG] You can sneak a Block into a variable typed as a Whatever in Rakudo

2010-07-15 Thread jn...@jnthn.net via RT
On Tue Mar 09 03:14:37 2010, masak wrote: > rakudo: my $x = *; say $x.WHAT > rakudo de996e: OUTPUT«Block()␤» > now that's... confusing > nod. Now: > my $x = *; say $x.WHAT Whatever() > rakudo: say *.WHAT > rakudo de996e: OUTPUT«Whatever()␤» > say *.WHAT Whatever() > rakudo: say Block ~~

[perl #76382] [BUG] Role type objects are defined in Rakudo

2010-07-15 Thread jn...@jnthn.net via RT
On Sun Jul 04 06:45:36 2010, masak wrote: > $ perl6 -e 'class C {}; say defined C # right' > 0 > > $ perl6 -e 'role R {}; say defined R # RONG' > 1 Fixed now: > role R[$x] {}; R() > say defined R 0 > say defined R[42] 0 > say R.defined 0 > say R[42].defined 0 \0/ Given to moritz++ for spectest

r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread pugs-commits
Author: Kodi Date: 2010-07-15 14:18:15 +0200 (Thu, 15 Jul 2010) New Revision: 31696 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: [S32/Temporal] Permit day-of-month on Dates. Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod ==

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread Todd Olson
Hi At 20:11 +0200 2010-07-14, Moritz Lenz wrote: I'll also fix some minor nits, like simplifying my $middle = $l + floor( ($r-$l)/2); to my $middle = floor ($r + $l) / 2 Since we often need to compute (correctly and efficiently) the middle point of two numberish things, perhaps a better appr

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread Todd Olson
At 12:35 +0200 2010-07-15, Moritz Lenz wrote: If it ever were the case that $r + $l could produce an overflow Then we really have other problems. Remember that $r and $l are array indexes. If your machine has enough memory to hold an array and a hash of the same size in memory, but can't stor

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread Moritz Lenz
Am 15.07.2010 12:24, schrieb Todd Olson: Hi At 20:11 +0200 2010-07-14, Moritz Lenz wrote: I'll also fix some minor nits, like simplifying my $middle = $l + floor( ($r-$l)/2); to my $middle = floor ($r + $l) / 2 ??? !!! Thinking more about it, my $middle = ($r + $l) div 2 is even better

Re: Contribution to perl 6 - week 9 Hash.pick

2010-07-15 Thread Todd Olson
Hi At 20:11 +0200 2010-07-14, Moritz Lenz wrote: I'll also fix some minor nits, like simplifying my $middle = $l + floor( ($r-$l)/2); to my $middle = floor ($r + $l) / 2 ??? If it ever were the case that $r + $l could produce an overflow then the second statement would fail, while the first

[perl #76518] [BUG] REPL weirdness with exported subs

2010-07-15 Thread via RT
# New Ticket Created by Timothy Totten # Please include the string: [perl #76518] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=76518 > Say you have a module file called Greetings.pm6 that contains: use v6; module Greetin

[perl #76514] [bug] A where clause should not apply to a missing optional argument.

2010-07-15 Thread via RT
# New Ticket Created by Stephane Payrard # Please include the string: [perl #76514] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=76514 > Here, the where clause is applied to the default value, the undefined type Any and r