»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:01
lue joined
|
|||
lue | hello world o/ | 00:01 | |
sorear | lue! | 00:04 | |
lue | hi sorear o/ | ||
00:15
fridim_ left
00:25
adu joined
00:31
benthumb joined
00:32
thilp joined,
benthumb left
00:33
fgomez left
00:38
_jaldhar joined
00:43
thilp left
00:52
sjohnson joined,
sjohnson left,
sjohnson joined
|
|||
dalek | p/toqast: 407a1cf | pmichaud++ | src/HLL/Compiler.pm: Update stagestats to use a bitmask instead of levels. 0x04 = force gc sweep before displaying stats 0x08 = pause between stages |
00:57 | |
01:00
_jaldhar left
01:01
Slacky left
|
|||
pmichaud | arggh, pushed to the wrong branch. | 01:14 | |
I'll cherry-pick it into master. | |||
dalek | p: a4165a9 | pmichaud++ | src/HLL/Compiler.pm: Update stagestats to use a bitmask instead of levels. 0x04 = force gc sweep before displaying stats 0x08 = pause between stages |
01:16 | |
01:31
thelazydeveloper left
01:32
fgomez joined
01:43
PacoAir left
01:46
adu left
02:04
Lard joined
|
|||
Lard | Hi guys, Is there something similar to moose type coercions in perl6? | 02:09 | |
I can't find any docs on it... | 02:10 | ||
"is also" is mentioned here gist.github.com/247656 but I can't see that documented anywhere | 02:11 | ||
02:16
_jaldhar joined
|
|||
sorear | Lard: no. | 02:17 | |
the closest we have are coerced types, like has Int() $.foo | 02:18 | ||
you can initialize $.foo with any value, and the .Int method will be called | |||
but you can't do custom coercers like Moose :( | |||
also I'm not sure that anyone implements coerced types yet. | |||
what you can do *today* is write a custom BUILD method which initializes the attributes | 02:19 | ||
Lard | sorear: ah ok thanks... I'll see if it that works now... | ||
sorear | submethod BUILD(:$foo) { $!foo = $foo.Int } | ||
Lard | really I couldn't get BUILD to work.... | ||
I do submethod BUILD ( :$foo ) {$!bar = $foo;} | 02:20 | ||
having declared bar earlier and it wasn't working for me... | 02:21 | ||
It's sad that something like type coercions isn't in perl6...I loved that part of moose | 02:22 | ||
sorear | it's sad that perl 6 hasn't bothered to learn from the changes Moose made after being forked | 02:24 | |
perl 6 doesn't even have _required attributes_ | |||
Lard | yeah I saw the = die "blah" but I prefer the declarative moose style | 02:25 | |
sorear | eh. I shouldn't dump all my complaints on the new person. | ||
Lard | haha | 02:26 | |
sorear | weclome! | 02:29 | |
Lard | thanks :) | ||
02:30
tokuhiro_ joined
|
|||
pmichaud | gist.github.com/3063969 # does this work as a Foo($value) coercer? | 02:33 | |
then we could have my Foo() $x; such that any value assigned to $x passes through Foo(...) first | 02:34 | ||
although I guess the resulting value would need to be blessed into Foo to satisfy the type constraint. | 02:35 | ||
sorear | let's add to Mu/Any multi postcircumfix:<( )>($x) { $x."{self.^name}"() } | 02:36 | |
now you can implement either Type() or .Type, with Type() multis taking precedence | |||
although we don't currently have a good way to define a ."Foo::Bar" method in Perl 6 | 02:37 | ||
pmichaud | I'm guessing you really want multi postcircumfix:<( )>(Mu:U: $x) there, though. | ||
otherwise we're defining postcircumfix on... well, everything :-) | 02:38 | ||
sorear | hrm. | 02:43 | |
irclog.perlgeek.de/perl6/2010-07-16#i_2559776 | |||
I recollected this as being much more of unilateral shoot-down than it actually was | 02:44 | ||
02:46
xinming_ joined
02:48
xinming left
03:12
bruges joined
03:13
Lard left
03:15
Entonian joined,
Entonian left
03:39
quietfanatic joined
|
|||
quietfanatic | Hm, is there a way to do a (function-style) pattern match on an object with attributes? | 03:40 | |
I know you can do it with an array. | |||
perl6: sub sayattrs ([*%attrs]) { say %attrs.perl }; class Vec { has $.x; has $.y; }; sayattrs(Vec.new(x => 1, y => 2)) | 03:41 | ||
p6eval | niecza v19-12-gf36d743: OUTPUT«Unhandled exception: Nominal type check failed in binding '' in 'sayattrs'; got Vec, needed Positional at /tmp/L__dOahayc line 0 (sayattrs @ 1)  at /tmp/L__dOahayc line 1 (mainline @ 7)  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3)  … | ||
..rakudo 57eaaa: OUTPUT«Nominal type check failed for parameter ''; expected Positional but got Vec instead in sub sayattrs at /tmp/MZ8UbWdvP6:1 in block <anon> at /tmp/MZ8UbWdvP6:1» | |||
quietfanatic | perl6: sub sayattrs ({*%attrs}) { say %attrs.perl }; class Vec { has $.x; has $.y; }; sayattrs(Vec.new(x => 1, y => 2)) | ||
p6eval | niecza v19-12-gf36d743: OUTPUT«===SORRY!===Unable to parse signature at /tmp/HiNGWvDQHD line 1:------> sub sayattrs (⏏{*%attrs}) { say %attrs.perl }; class VeCouldn't find final ')'; gave up at /tmp/HiNGWvDQHD line 1:------> sub sayattrs (… | ||
..rakudo 57eaaa: OUTPUT«===SORRY!===Missing blockat /tmp/i4BtaLswMt:1» | |||
03:43
Lard joined
|
|||
sorear | r: sub sayattrs($ (*%attrs)) { say %attrs.perl }; class Vec { has $.x; has $.y; }; sayattrs(Vec.new(x => 1, y => 2)) | 03:43 | |
p6eval | rakudo 57eaaa: OUTPUT«("x" => 1, "y" => 2).hash» | ||
sorear | quietfanatic. | ||
quietfanatic | oh | 03:44 | |
sweet | |||
though the syntax is a little odd methinks | |||
Oh, but I can't use that to do coercions, because methods on SomeType:U appear to be impossible | 03:50 | ||
rats | |||
Oh never mind, I was spelling postcircumfix 'infix'. Doh | 03:52 | ||
Except it still doesn't work. | 03:53 | ||
class A { method postcircumfix:<( )> (A:U:) { say 3 } }; A() | |||
rn: class A { method postcircumfix:<( )> (A:U:) { say 3 } }; A() | |||
p6eval | rakudo 57eaaa: OUTPUT«Too many positional parameters passed; got 2 but expected 1 in method postcircumfix:<( )> at /tmp/bxmz9cNgsh:1 in <anon> at src/gen/BOOTSTRAP.pm:811 in any <anon> at src/gen/BOOTSTRAP.pm:807 in block <anon> at /tmp/bxmz9cNgsh:1» | ||
..niecza v19-12-gf36d743: OUTPUT«3» | |||
quietfanatic | niecza++ | 03:54 | |
pmichaud | r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say 3 } }; XYZ(0) # checking | ||
p6eval | rakudo 57eaaa: OUTPUT«3» | ||
pmichaud | r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say 3 } }; XYZ() # checking | ||
p6eval | rakudo 57eaaa: OUTPUT«3» | ||
pmichaud | hmmmm | ||
r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say 3 } }; XYZ(3,4,5) # checking | 03:55 | ||
p6eval | rakudo 57eaaa: OUTPUT«3» | ||
pmichaud | I bet Rakudo is always expecting a Capture of the arguments there. | ||
quietfanatic | huh | ||
pmichaud | r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say $x.WHAT } }; XYZ(3,4,5) # checking | ||
p6eval | rakudo 57eaaa: OUTPUT«Capture()» | ||
pmichaud | *ding* | ||
quietfanatic | Where does that capture come from? | 03:56 | |
pmichaud | it's the capture formed by the arglist to the .( ) call | ||
03:57
thou left
|
|||
quietfanatic | oh, so | 03:57 | |
r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say $x[1] } }; XYZ(3,4,5) # checking | |||
pmichaud | I'm not sure it's _correct_; that just appears to be what Rakudo is doing. | ||
p6eval | rakudo 57eaaa: OUTPUT«4» | ||
quietfanatic | er | ||
r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say $x } }; XYZ(3,4,5) | 03:58 | ||
p6eval | rakudo 57eaaa: OUTPUT«3 4 5» | ||
quietfanatic | yeah I'm pretty sure that's wrong. | ||
where's masakbot? | |||
sorear | quietfanatic: 3,4,5 are being wrapped into a capture. | 03:59 | |
quietfanatic | Yes, but the signature should unwrap the capture. | ||
pmichaud | there may be some circularity sawing taking place there... probably need to check with jnthn++, too. | 04:00 | |
04:17
fgomez left
04:18
fgomez joined
|
|||
dalek | p: b9d44ce | pmichaud++ | src/QRegex/ (3 files): [qregex] Initial implementation of <( and )> tokens. |
04:20 | |
p: 66edbf6 | pmichaud++ | t/qregex/01-qregex.t: Add some got/expected output to t/qregex/01-qregex.t . |
|||
p: b07bc9e | pmichaud++ | t/qregex/rx_metachars: [qregex]: Add some tests for <( and )> . |
|||
04:26
tyatpi left
|
|||
moritz | \o | 04:31 | |
pmichaud | o/ | ||
sorear | |o| | ||
pmichaud | eek! a TIE fighter! | ||
dalek | kudo/nom: a569e39 | pmichaud++ | / (4 files): Update <( and )> in regexes to use code inherited from NQP. |
04:34 | |
ast: baf17a4 | pmichaud++ | S05-metasyntax/angle-brackets.t: Add some more <( and )> tests. |
|||
05:00
bluescreen10 left
05:01
thou joined
05:04
tyatpi joined
05:19
libertyprime joined
05:23
tyatpi left
05:44
kaare_ joined
05:52
tyatpi joined
06:04
tokuhiro_ left
06:21
thou left
06:32
mucker joined
06:36
sisar left
06:37
sisar joined,
nebuchadnezzar joined
06:46
quietfanatic left
|
|||
tadzik | hoelzro|away: yeah, please don't worry about licesing when it comes to my modules :) | 06:48 | |
I missed some action due to being suddenly asleep | 06:49 | ||
sorear | o/ tadzik | 06:53 | |
tadzik | sorear: o/ | 06:56 | |
moritz | \o | 07:02 | |
07:47
Lard left,
sergot joined
|
|||
sergot | hello o/ | 07:47 | |
! | |||
sorear | helo sergot | 07:59 | |
08:00
tokuhiro_ joined
08:08
GlitchMr joined
08:15
sorear joined
08:27
szabgab joined
|
|||
szabgab | r: say "hi" | 08:28 | |
p6eval | rakudo a569e3: OUTPUT«hi» | ||
szabgab | r: for 1 .. 3 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«123» | ||
szabgab | r: for 1 .. 3 { say } | ||
p6eval | rakudo a569e3: OUTPUT«» | ||
szabgab | r: for 1 .. 3 { print } | ||
p6eval | rakudo a569e3: ( no output ) | ||
szabgab | the last one prints me 3 times True in the REPL while the say version just 3 empty rows | 08:29 | |
If anyone could explain that to me ... | 08:30 | ||
pmichaud | the repl only does the 'p' if the executed code doesn't produce any output | ||
so, since for 1..3 { say } generates output, the repl doesn't do any additional printing. | |||
for 1..3 { print } doesn't print anything (it prints 3 null strings), so the repl prints the result of the for loop | 08:31 | ||
which is (True, True, True) | |||
r: say (for 1..3 { print }).perl | |||
p6eval | rakudo a569e3: OUTPUT«(Bool::True, Bool::True, Bool::True).list» | ||
pmichaud | you can also see the difference if you do say "" and print "" from the repl | 08:32 | |
the first will display a blank line; the second will display "True" (which is the result of the print) | |||
szabgab | ok for that, and why neiher of them print the content of $_ ? | ||
pmichaud | there are no more default arguments in Perl 6. | ||
08:33
mucker left
|
|||
pmichaud | if you want to print $_, you have to do print $_ or $_.print or .print | 08:33 | |
szabgab | but there is for the for loop | ||
default iterator | |||
or what is the name of the variable there? | |||
pmichaud | yes, $_ is set in the block, but a bare "say" doesn't default to displaying $_ | ||
std: for 1..3 { say } # I think STD flags it as an error | 08:34 | ||
p6eval | std fd2647b: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/BRcBVzOyPz line 1:------> for 1..3 { say⏏ } # I think STD flags it as an errorCheck failed… | ||
pmichaud | we used to flag it as an error in Rakudo... apparently that got dropped somewhere. | ||
szabgab | nice | ||
08:34
thelazydeveloper joined
|
|||
szabgab | probably it would be better to flag that too | 08:34 | |
pmichaud | agreed; it's not always super-easy to do that :) | ||
szabgab | and what is the name of the variables in the for loop ? | ||
pmichaud | the for loop just passes the iterated values to the block -- the block gets to decide what to call the variable. | 08:35 | |
r: for 1..3 { say $^x } | |||
p6eval | rakudo a569e3: OUTPUT«123» | ||
pmichaud | r: for 1..3 -> $n { say $n } | ||
p6eval | rakudo a569e3: OUTPUT«123» | ||
szabgab | I mean I used to call them "iterator" | ||
in perl 5 | |||
to describe them | |||
in general | |||
pmichaud | I don't think that works in p6, though. | ||
because they belong to the block, not the for loop. | 08:36 | ||
r: (1..3).map( -> $n { say $n }).eager | |||
p6eval | rakudo a569e3: OUTPUT«123» | ||
szabgab | so I was looking for a generic term for the variable that is on the right hand side of -> | ||
pmichaud | it's a parameter | 08:37 | |
szabgab | ok, that will do :) | ||
pmichaud | just like if we do sub anon ($x, $y) { ... } | ||
szabgab | then another question , there used to be an idea to write for 1..10 by(2) { } | ||
pmichaud | we can also do -> $x, $y { ... } | ||
08:37
brrt joined,
brrt left
|
|||
szabgab | but I don't think it is there any more, not even in the spec | 08:38 | |
08:38
brrt joined
|
|||
pmichaud | correct, it's gone. We now use the sequences operator. | 08:38 | |
szabgab | so can I loop every 2nd value? | ||
pmichaud | say 1,3,5 ...^ *>= 10 | ||
szabgab | r: for 1,3...10 { say $_ } | ||
pmichaud | r: say 1,3,5 ...^ *>= 10~ | ||
p6eval | rakudo a569e3: OUTPUT«(timeout)» | ||
rakudo a569e3: OUTPUT«===SORRY!===Confusedat /tmp/8DXq5AQqdk:1» | |||
pmichaud | r: say 1,3,5 ...^ *>= 10 | ||
p6eval | rakudo a569e3: OUTPUT«1 3 5 7 9» | ||
szabgab | r: for 1,3,5 ...10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«(timeout)» | 08:39 | |
pmichaud | the endpoint has to match exactly, or the sequence is infinite | ||
szabgab | r: for 1,3,5 ...11 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«1357911» | ||
szabgab | r: for 1,3 ...11 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«1357911» | ||
szabgab | oh | ||
08:39
araujo left
|
|||
pmichaud | it's a smart match at the end of the sequence, thus * >= 10 works | 08:39 | |
szabgab | I think that used to work without exact match | ||
pmichaud | it did; that got changed | ||
because we have lots of sequences that can't be easily deduced as "up to" or "down to" | 08:40 | ||
szabgab | r: for 1,3 ...^ *>10 | ||
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Missing blockat /tmp/N0PJ14uCw4:1» | ||
szabgab | r: for 1,3 ...^ *>10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«13579» | ||
pmichaud | hmmm, I wonder | 08:42 | |
szabgab | r: for 1,2,0 ... 3 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«120Unable to deduce sequence in method gist at src/gen/CORE.setting:9567 in sub say at src/gen/CORE.setting:7011 in block <anon> at /tmp/Dx2zwGalQA:1» | ||
pmichaud | r: for 1,3 ...^ * !< 10 { .say } | ||
p6eval | rakudo a569e3: OUTPUT«13579» | ||
pmichaud | heh, it works. | ||
szabgab | could you give a sequence where you cannot deduct if it is upper or lower limit? | 08:43 | |
pmichaud | r: my @a = 1, -2, 4 ... *; say @a[^15]; | 08:44 | |
p6eval | rakudo a569e3: OUTPUT«1 -2 4 -8 16 -32 64 -128 256 -512 1024 -2048 4096 -8192 16384» | ||
pmichaud | r: my @a = 1, -1, 1 ... *; say @a[^10] | ||
p6eval | rakudo a569e3: OUTPUT«1 -1 1 -1 1 -1 1 -1 1 -1» | ||
szabgab | r: for 1,2,0 ... 3 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«120Unable to deduce sequence in method gist at src/gen/CORE.setting:9567 in sub say at src/gen/CORE.setting:7011 in block <anon> at /tmp/1Mj25vrSPb:1» | ||
pmichaud | r: my @a = True, !* ... *; say @a[^10] | 08:45 | |
p6eval | rakudo a569e3: OUTPUT«True False True False True False True False True False» | ||
szabgab | it does not lie my sequence :( | ||
like | |||
pmichaud | it can't figure out the relationship between 1, 2, and 0 | ||
szabgab | r: for 1,2,0,3 ... -1 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«1203Unable to deduce sequence in method gist at src/gen/CORE.setting:9567 in sub say at src/gen/CORE.setting:7011 in block <anon> at /tmp/8yQEiguzOR:1» | ||
pmichaud | what sequence are you wanting there? | 08:46 | |
szabgab | +1, -2, +3, -4 | ||
pmichaud | yeah, that's neither arithmetic nor geometric | ||
but you can do | |||
(thinking) | 08:47 | ||
diakopter | 1234 times -1,1,-1,1 | ||
the nth at the first times the nth at the second | 08:48 | ||
szabgab | I was thinking that if it is restricted to arithmetic and geometric then from 3 items you can see if it has a direction | ||
pmichaud | r: my @a = 1, { $^x.abs * -$^x.sign } ... *; say @a[^10] | ||
p6eval | rakudo a569e3: OUTPUT«1 -1 1 -1 1 -1 1 -1 1 -1» | ||
pmichaud | r: my @a = 1, { ($^x.abs+1) * -$^x.sign } ... *; say @a[^10] | ||
p6eval | rakudo a569e3: OUTPUT«1 -2 3 -4 5 -6 7 -8 9 -10» | ||
szabgab | and from there you can no if it is upper bound, lower bound or no bound | ||
pmichaud | szabgab: yeah, I think we decided that's too much special casing | ||
it's much easier to just say it's always a smartmatch at the end | 08:49 | ||
and geometric doesn't always have a direction | 08:50 | ||
szabgab | r: for 1,3 ...^ *<10 { say $_ } | ||
p6eval | rakudo a569e3: ( no output ) | ||
szabgab | r: for 1,3 ...7 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«1357» | ||
szabgab | r: for 1,3 ...^ *>10 { say $_ } | 08:51 | |
p6eval | rakudo a569e3: OUTPUT«13579» | ||
szabgab | it feels the oposite way :) | ||
pmichaud | yeah, that's why I did !< earlier :-) | ||
szabgab | r: for 1,3 ...^ !<10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Preceding context expects a term, but found infix !< insteadat /tmp/GihLfh61fo:1» | ||
pmichaud | * !< 10 | ||
szabgab | r: for 1,3 ...^ * !<10 { say $_ } | 08:52 | |
p6eval | rakudo a569e3: OUTPUT«13579» | ||
szabgab | cryptic :( | ||
pmichaud | not really.... !< is "not less than" | ||
szabgab | r: for 1,3 ... ^*!< 10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«Cannot call 'Numeric'; none of these signatures match::(Mu:U \$v, Mu *%_) in method Numeric at src/gen/CORE.setting:686 in sub prefix:<^> at src/gen/CORE.setting:4948 in block <anon> at /tmp/bagpRPf6fq:1» | ||
szabgab | r: for 1,3 ...^*!< 10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«13579» | ||
szabgab | 4 non-alpha :) | 08:53 | |
r: for 1,3 ...* < 10 { say $_ } | |||
p6eval | rakudo a569e3: OUTPUT«1» | ||
szabgab | r: for 1,3 ...* > 10 { say $_ } | ||
p6eval | rakudo a569e3: OUTPUT«1357911» | ||
szabgab | the first one would look good :) | 08:54 | |
oh this will never end if every person comes with new ideas :) | |||
or "different from current" even if not "new" | 08:55 | ||
09:00
Woodi left
09:07
sudokode left
09:10
tyatpi left
09:12
cognominal left
09:14
cognominal joined
09:16
sergot left
09:26
PacoAir joined
09:31
birdwindupbird joined
09:36
sergot joined
|
|||
pmichaud | r: say 'abcd'.match(/a/, :x(1..4)).WHAT | 09:39 | |
p6eval | rakudo a569e3: OUTPUT«List()» | ||
pmichaud | r: say 'abcd'.match(/a/, :x(1..4)) | ||
p6eval | rakudo a569e3: OUTPUT«a» | ||
pmichaud | r: say 'abcd'.match(/a/, :n(1,3)) | ||
p6eval | rakudo a569e3: OUTPUT«q[a]» | ||
pmichaud | r: say 'abcd'.match(/a/, :n(1,3)).WHAT | ||
p6eval | rakudo a569e3: OUTPUT«Match()» | ||
pmichaud | r: say 'abcd'.match(/./, :n(1,3)).WHAT | 09:40 | |
p6eval | rakudo a569e3: OUTPUT«Match()» | ||
pmichaud | r: say 'abcd'.match(/./, :nth(1,3)) | ||
p6eval | rakudo a569e3: OUTPUT«a c» | ||
pmichaud | r: say 'abcd'.match(/./, :nth(1,3)).WHAT | ||
p6eval | rakudo a569e3: OUTPUT«List()» | ||
pmichaud | r: say 'abcd'.match(/a/, :nth(1,3)).WHAT | ||
p6eval | rakudo a569e3: OUTPUT«Match()» | ||
09:40
Guest34089 left
|
|||
pmichaud | that seems wrongish. | 09:40 | |
time for sleep -- bbl | 09:43 | ||
09:51
Su-Shee joined
|
|||
Su-Shee | hi all :) | 09:51 | |
sergot | Su-Shee: hi | 09:54 | |
09:56
mucker joined
10:03
whiteknight joined,
whiteknight is now known as Guest95989
10:06
szabgab left
10:23
Patterner left
|
|||
masak | g'day, #perl6. | 10:25 | |
10:25
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
colomon | \o | 10:25 | |
colomon is not quite awake yet | |||
masak is on a bus! | |||
and I've been awake since 04:30, which... mhh. | |||
colomon work up at exactly 06:01 | 10:27 | ||
tried to go back to sleep, but my nose was too stuffy to handle the CPAP. | 10:29 | ||
diakopter | hm. I spupose I should sleep tonight | ||
10:29
brrt left,
brrt joined
10:30
brrt left
10:36
zby_home_ joined
|
|||
jnthn | Good Saturday, #perl6 | 10:42 | |
masak | jnthn! \o/ | ||
moritz | \o | 10:44 | |
jnthn++ # hague grant completed | |||
colomon | \o/ | 10:46 | |
jnthn | \o/ | ||
10:49
je joined
|
|||
masak | jnthn++ \o/ | 10:56 | |
10:58
tyatpi joined
11:00
birdwindupbird left
11:01
je left
|
|||
masak | re irclog.perlgeek.de/perl6/2012-07-07#i_5793473 -- I agree with quietfanatic++, and I think sorear++ changed the spec and fixed Niecza to be more consistent and simpler in this regard. I don't believe there are circularity issues. | 11:06 | |
if jnthn concurs (or doesn't fly into a tantrum about having to change this bit), I'll submit a rakudobug. | |||
jnthn | It used to be spec'd that way. | 11:07 | |
I agreed it could change already. | |||
Rakudo didn't get updated yet. | |||
It was mostly SMOP that wanted it to be the other way, fwiw. | |||
masak submits rakudobug | 11:08 | ||
jnthn | That particular circularity saw doesn't apply to anything 6model-y. 6model doesn't care for captures in any sense, and the invocation protocol is specified as VM specific. | ||
masak | yes, I remember that bit of input coming from pmurias++ and ruoso++ | ||
jnthn | Rakudo's postcircumfix:<( )> isn't the invocation protocol in general. | ||
SMOP tried to make it that way, which was why it wanted said circularity saw, iirc. | |||
.oO( Can I just fix this, or do I have to think about deprecation policy... :-) ) |
11:09 | ||
11:10
araujo joined,
araujo left,
araujo joined
|
|||
masak | the invocation protocol is VM specific, but I do hope the expected parameter list for postcircumfix:<( )> isn't. | 11:14 | |
jnthn | masak: That was kinda my point. What postcircumfix:<( )> does isn't anything to do with the VM's view. | 11:15 | |
masak | ok ok good. | ||
that's probably wise. | |||
11:29
Woodi joined
|
|||
masak | Woodi! \o/ | 11:39 | |
11:44
c1sung left,
c1sung joined
|
|||
pmichaud | jnthn: (postcircumfix:<( )>) afaic, you can "just fix it". | 11:51 | |
Woodi | hi today everyone :) | 11:52 | |
jnthn | as far as i...? | 11:53 | |
pmichaud | as far as I'm concerned | ||
jnthn is used to that ending "ct" = can tell :) | |||
oh! | |||
:) | |||
12:15
mucker left
|
|||
dalek | c: 2139f4f | pmichaud++ | lib/Positional.pod: [Positional]: EnumMap isn't Positional; other minor tweaks and fixes. |
12:18 | |
12:27
mucker joined
12:29
GlitchMr left
|
|||
dalek | c: 7b0caa5 | pmichaud++ | lib/ (7 files): Various grammatical and minor fixes. |
12:31 | |
kudo/toqast: f96df3b | jnthn++ | src/QPerl6/Actions.pm: Translate the rest of the 'obvious' remaining PAST:: usages in the Actions. Thsoe that remain are interesting in some way. :-) |
12:33 | ||
kudo/toqast: 0c943c2 | jnthn++ | src/QPerl6/World.pm: Translate the easy remaining PAST usages in World. |
|||
12:33
samlt joined
12:41
birdwindupbird joined
12:42
crab2313 joined
12:48
am0c_ joined,
mucker left
12:51
mucker joined
13:04
GlitchMr joined
|
|||
dalek | p/toqast: fd47dae | jnthn++ | src/QAST/Operations.nqp: Add what/how/who ops. |
13:05 | |
p/toqast: 58acfd1 | jnthn++ | src/QAST/ (2 files): Add a way to mark a block as having a custom arguments processor, and compile it to a :call_sig usage on Parrot. |
|||
kudo/toqast: 9b02aca | jnthn++ | src/QPerl6/ (3 files): Add a few ops to the abstraction layer. |
13:07 | ||
kudo/toqast: c62d139 | jnthn++ | src/QPerl6/Actions.pm: Update arguments handling. Gets back one more sanity test, and changes the failure mode of many others. |
|||
kudo/toqast: bf653dd | jnthn++ | src/QPerl6/Actions.pm: Update compilation of .WHAT/.HOW/.WHO. |
|||
13:07
Su-Shee left
13:09
sergot left
13:16
Guest95989 left
|
|||
dalek | kudo/toqast: 9114f92 | jnthn++ | src/QPerl6/ (2 files): Start to update return value handling. |
13:22 | |
kudo/toqast: a543d24 | jnthn++ | src/QPerl6/ (2 files): Update Perl 6 capture_lex handling, which wins back one more sanity test. |
|||
kudo/toqast: 3f5bb89 | jnthn++ | src/QPerl6/Actions.pm: Make returnless analysis not explode. |
|||
13:25
sergot joined
13:33
birdwindupbird left,
birdwindupbird joined
13:34
pyrimidine left,
pyrimidine joined
13:37
tyatpi left
13:47
am0c_ left
|
|||
timotimo | are there already specs or ideas how the automatic commandline argument parser created with MAIN can be enhanced? descriptions for flags and values etc.? | 13:58 | |
14:02
flussence joined
14:06
fgomez left
14:12
birdwindupbird left,
brrt joined
|
|||
moritz | not really | 14:12 | |
you can always write your own command line parser | |||
timotimo | it would be nice to have a nice default one in place that does more than just the simples stuff | ||
moritz | then write one | 14:13 | |
and we'll ship it with R* | |||
and with a bit of luck and work, it'll become the default | |||
colomon | timotimo: do you know what the current one can do? | ||
timotimo | i don't know all of it i'm sure | ||
moritz | it's nice, but it does have its limitations | 14:14 | |
dalek | p/toqast: 9c4dfa5 | jnthn++ | / (4 files): Implement and test resultchild, which allows something other than the final statement of a QAST::Stmt or QAST::Stmts to be used as the result of the overall operation. |
||
moritz | it doesn't support subcommands with options separate from the main options, for example | ||
14:18
flussence left,
flussence joined
14:21
PacoAir_ joined
|
|||
colomon | What's qx// supposed to do if it can't execute? (Say you've used the wrong command name.) | 14:21 | |
moritz | fail() I hope | ||
colomon | that seems reasonable | ||
flussence | that's what S29 says for shell() and run() anyway | 14:22 | |
14:22
PacoAir left,
PacoAir_ is now known as PacoAir
|
|||
moritz | the first two tests in t/00-parrot/ now pass with qperl6 | 14:25 | |
as does no. 4 | |||
jnthn | moritz: Currenlty there's 4 failures in t/00-parrot nad 5 in t/01-sanity | 14:26 | |
(With latest toqast in nqp and rakudo repos) | |||
At least, that's how I have it :) | |||
14:33
nodmonkey joined
|
|||
colomon | arg. in niecza, sprintf works (on my current case) but printf doesn't. :( | 14:33 | |
niecza: printf("%s, %d\n", "test", 1) | 14:35 | ||
p6eval | niecza v19-12-gf36d743: OUTPUT«Unhandled exception: index out of range at /home/p6eval/niecza/lib/CORE.setting line 1277 (sprintf @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 1278 (printf @ 4)  at /tmp/R2j1ncpN6z line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setti… | ||
_sri wonders if there's a perl6brew yet | |||
tadzik: i've been looking at MuEvent, is $socket.poll the only way to do non-blocking I/O? | 14:41 | ||
that approach doesn't scale at all | 14:42 | ||
colomon is not sure what it says about him that fixing bugs in Niecza is easier than just remembering the syntax to get his 16-line $work script working in p5 | 14:43 | ||
_sri wanted to build a little event loop with rakudo to see where it stands performance wise for I/O heavy servers | 14:46 | ||
14:49
whiteknight joined
14:50
whiteknight is now known as Guest14009,
samlt left
|
|||
dalek | p/toqast: 2cf193e | jnthn++ | src/QAST/Operations.nqp: Port lexotic to QAST. |
14:55 | |
15:01
tyatpi joined
|
|||
dalek | volaj: 8449183 | (Arne Skjærholt)++ | TODO: Update TODO list. |
15:12 | |
15:14
cognominal_ joined
15:15
harmil_home joined
15:17
cognominal left
|
|||
dalek | ecza: 442e075 | (Solomon Foster)++ | lib/CORE.setting: Make printf work. (How had we missed this one?!) |
15:20 | |
15:24
tyatpi left
15:44
brrt1 joined
15:45
brrt1 left
15:46
brrt left
15:49
tokuhiro_ left
15:53
PacoAir left
15:54
PacoAir joined
|
|||
dalek | p/toqast: f80052a | jnthn++ | src/QAST/Compiler.nqp: s/newclosure/capture_lex/ for consistency with PAST. |
16:00 | |
p/toqast: 7de611e | jnthn++ | src/QAST/ (2 files): Fix register allocation so that lexicals don't get stomped on. |
|||
kudo/toqast: 05a1e61 | jnthn++ | src/QPerl6/Actions.pm: Update return handling for QAST. |
|||
kudo/toqast: c6c6488 | jnthn++ | src/QPerl6/Actions.pm: Stop add_inlining_info blowing up, though really this whole thing goes away soon since we'll be able to serialize bits of QAST. |
|||
p/toqast: 2cb23aa | jnthn++ | src/QAST/Compiler.nqp: Ensure blocks always end up with a lexinfo. |
16:16 | ||
16:18
crab2313 left
|
|||
harmil_home | busy morning | 16:19 | |
ugh, I'm trying to refactor IO into a base IO::Parrot and the specced IO class, and I'm getting some very odd errros on compile that give me no leads on what to fix... | 16:21 | ||
moritz | harmil_home: which specced IO class? | 16:22 | |
harmil_home: and what errors do you get? | |||
harmil_home | moritz: I don't know. Whatever one was already in there. I'm basically trying to leave it alone, and just factor out $!PIO into a base class | ||
Could not locate compile-time value for symbol Comp::AdHoc | 16:23 | ||
current instr.: 'nqp;Perl6;World;_block2280' pc 32075 (src/gen/perl6-symboltable.pir:13915) (src/Perl6/World.pm:1709) | |||
moritz | harmil_home: that IO class isn't specced :-) | ||
harmil_home | moritz: fair enough, but it's loosely based on (and probably intended to migrate towards) the spec, right? | ||
moritz | harmil_home: very loosely | 16:24 | |
harmil_home | My goal is to leave its interface as its interface, whatever that is and make Parrot::IO give us everything Parrot can do | ||
er IO::Parrot | |||
moritz | ah, I see how you might get that error | 16:25 | |
harmil_home | So, for example, my buffered IO stuff just moves down a level, as does anything that's basically just a wrapper around nqp::p6box_*($!PIO.somefunc()) | ||
oh? | |||
16:26
nodmonkey left
|
|||
moritz | harmil_home: it will be much easier for you do the whole thing outside of the setting | 16:26 | |
in fact, there isn't a good reason to do it inside the setting | 16:27 | ||
unless you are fond of very long compile times | |||
harmil_home | I'm not entirely clear what that menas. | ||
moritz | just write the new IO::Parrot and IO class in a normal script | ||
not in src/core/IO.pm | |||
harmil_home | Ah, and override the core ones and all of the static functions that map into them? | 16:28 | |
moritz | (the error you are getting is an error during error reporting; I'll try to make it more robust) | ||
harmil_home: right | |||
whever "override" just means "declare a new one" | |||
(lexical lookup)++ | 16:29 | ||
harmil_home | I suppose I could do that, but it seems like a lot of duplication. Won't that lead to IO in the core slowly diverging from "the real IO"? | ||
Do we care? | |||
moritz | harmil_home: well, we can always copy it back into src/core/IO.pm if it proves to be superior | ||
harmil_home | Fair enough, I see what you're saying. | 16:30 | |
moritz | harmil_home: in fact I prototyped most of "my" setting code outside the setting first | ||
arnsholt | One of the benefits of having most of the compiler written in Perl 6: Prototyping new bits of the compiler can often be done outside of the compiler first =) | 16:32 | |
pmichaud | Yes, I almost always prototype new features outside of the core setting first. | 16:33 | |
question: what should be the result of | |||
harmil_home | Should I do this as a stand-alone perl6-io module or in my fork of rakudo/rakudo under lib? | ||
pmichaud | "abcd".match( /./, :p(1), :global) | 16:34 | |
harmil_home: I suggest a standalone module. | |||
harmil_home | pmichaud: thanks | ||
pmichaud | I think (1) IO::Parrot is very useful, yet (2) it's unlikely to be part of the Rakudo core, unless we find it to be fundamental somehow. | 16:35 | |
(it is likely to be part of R*, however) | |||
rn: say "abcd".match( /./, :p(1), :global) | 16:36 | ||
harmil_home | pmichaud: urm... well, I can't do IO::Parrot in a vacuum. IO::Parrot is mostly a re-factor and re-write of the internals of IO | ||
p6eval | niecza v19-13-g442e075: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named global at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1)  at /tmp/AYDLrnj5tV line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3)  at /ho… | ||
..rakudo a569e3: OUTPUT«b c d» | |||
pmichaud | rn: say "abcd".match( /./, :p(1), :g) | ||
p6eval | niecza v19-13-g442e075: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named g at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1)  at /tmp/ePKgPPnjAJ line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3)  at /home/p6… | ||
..rakudo a569e3: OUTPUT«b c d» | |||
16:36
nodmonkey joined
|
|||
moritz | well, :p only makese sense on the first match | 16:36 | |
pmichaud | yes, so I'm wondering if we should only get one match back. | 16:37 | |
16:37
phenny left
|
|||
moritz | I can see three possible interpretations | 16:37 | |
(1) only ever return one match | |||
(2) only anchor the first match | |||
16:37
phenny joined
|
|||
moritz | (3) anchor the first match to 1, and each subsequent match to where the previous left off | 16:38 | |
pmichaud | yes, those are the three I was considering also. I guess this will have to be a TimToady++ question. | ||
arnsholt | My initial reaction is 1, I think | ||
moritz | nqp: my $x := 1; $x++; say($x) | 16:39 | |
p6eval | nqp: OUTPUT«2» | ||
moritz | nqp: my $x := 1; ++$x; say($x) | ||
p6eval | nqp: OUTPUT«2» | ||
16:42
nodmonkey left
|
|||
pmichaud | github.com/perl6/specs/issues/16 | 16:57 | |
moritz | pmichaud++ | 16:58 | |
sorear: can we get dalek to report spec issues? | 16:59 | ||
pmichaud | I found that by just watching the perl6/specs repo, I get emails everytime a new issue or comment is posted. | ||
email seems to be the only push notification for issues on github | 17:00 | ||
moritz | well, dalek also supports pulling | ||
colomon | ah, that's why I've been getting those emails... | ||
moritz | having commit access should also be enough | ||
pmichaud | I think one has to actually be watching the repo to get the emails. | 17:01 | |
but I could be wrong about that. | |||
(You also get emails for any issues you create or comment upon, I think.) | |||
moritz | maybe I'm watching it because I created it :-) | 17:02 | |
I don't remember ever pressing a "watch" button though | |||
pmichaud | anyway, I looked into it a few days ago, and decided I wasn't up to tracking everything down to get issue updates into dalek | 17:08 | |
17:08
pmurias joined
17:11
kaare_ left,
kaare_ joined,
lep-delete joined
|
|||
dalek | p/toqast: ad562d8 | jnthn++ | src/QAST/Operations.nqp: Implement op xor (which has the semantics of xor_nqp). |
17:12 | |
ecs: aca4dff | pmichaud++ | questions.txt: Remove questions.txt in favor of Github's issue tracker. github.com/perl6/specs/issues/17 . |
|||
kudo/toqast: 2ce8e79 | jnthn++ | src/QPerl6/Grammar.pm: xor_nqp => xor; now down to 2 failing test files in 00-parrot and 3 in 01-sanity. |
17:13 | ||
17:17
szabgab joined
|
|||
harmil_home | rn: class A {}; role B {}; class C is A does B {} | 17:17 | |
szabgab | r: say substr "abcd", 1, -1 | ||
p6eval | rakudo a569e3, niecza v19-13-g442e075: ( no output ) | ||
rakudo a569e3: OUTPUT«Negative length argument (-1) to .substr in method gist at src/gen/CORE.setting:9567 in sub say at src/gen/CORE.setting:7011 in block <anon> at /tmp/kvgD4R6vnP:1» | |||
harmil_home | I think the no output is mine ;) | 17:18 | |
szabgab | is the fact that substr does not take negative length the design or lack of implementation? | ||
pmichaud | I think it's *-1 | ||
harmil_home | rn: class A {}; role B {}; class IO is A does B | ||
p6eval | niecza v19-13-g442e075: OUTPUT«===SORRY!===Unable to parse class definition at /tmp/OcrdwU6Zc9 line 1 (EOF):------> ss A {}; role B {}; class IO is A does B⏏<EOL>Parse failed» | ||
..rakudo a569e3: OUTPUT«===SORRY!===Unable to parse $*PKGDECL definition at line 2, near ""» | |||
szabgab | harmil_home: yes | ||
pmichaud | r: say substr "abcd", 1, *-1 | ||
p6eval | rakudo a569e3: OUTPUT«bc» | ||
szabgab | pmichaud: aha | 17:19 | |
thanks | |||
pmichaud | the error message to .substr should perhaps indicate that. | ||
harmil_home | anyone have a sense of why I'm getting errors parsing a class definition if I call it IO? | ||
szabgab | r: my $x=-1; say substr "abcd", 1, $x | ||
p6eval | rakudo a569e3: OUTPUT«Negative length argument (-1) to .substr in method gist at src/gen/CORE.setting:9567 in sub say at src/gen/CORE.setting:7011 in block <anon> at /tmp/DgW1qkrzzW:1» | ||
moritz | r: class IO { } | ||
p6eval | rakudo a569e3: ( no output ) | ||
szabgab | r: my $x=-1; say substr "abcd", 1, *$x | 17:20 | |
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Confusedat /tmp/oj8gSkFa0S:1» | ||
moritz | harmil_home: no. works here | ||
szabgab | r: my $x=-1; say substr "abcd", 1, * $x | ||
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Confusedat /tmp/Y2_1LUWr3z:1» | ||
szabgab | r: my $x=1; say substr "abcd", 1, * -$x | ||
p6eval | rakudo a569e3: OUTPUT«bc» | ||
harmil_home | moritiz, see my rn: above | ||
moritz, even | |||
szabgab | so both rakudo and I am confused :) | ||
pmichaud | rn: class A {}; role B {}; my class IO is A does B { ... } | 17:23 | |
p6eval | rakudo a569e3: OUTPUT«===SORRY!===The following packages were stubbed but not defined: IOat /tmp/7bbkQWsjSF:1» | ||
..niecza v19-13-g442e075: OUTPUT«===SORRY!===Package was stubbed but not defined at /tmp/4sq6dqLtRv line 1:------> class A {}; role B {}; my class⏏ IO is A does B { ... }Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.se… | |||
pmichaud | rn: class A {}; role B {}; my class IO is A does B { } | ||
p6eval | rakudo a569e3, niecza v19-13-g442e075: ( no output ) | ||
pmichaud | rn: class A {}; role B {}; class IO is A does B { } | ||
p6eval | rakudo a569e3, niecza v19-13-g442e075: ( no output ) | ||
pmichaud | seems to work. | ||
harmil_home | I'm trying to figure out what you did differently... | 17:24 | |
moritz | harmil_home: you were missing the { } of the class | 17:25 | |
harmil_home | ah... hmm... | ||
so then it was a red herring. That's unpleasant | |||
My real error is Unable to parse $*PKGDECL definition at line 226, near "does IO::F" | 17:26 | ||
which I get on class IO is IO::Parrot does IO::FileTestable { | |||
pmichaud | could be an error inside the braces (that isn't being reported well) | ||
moritz | r: class IO::Parrot { }; class IO is IO::Parrot does IO::FileTestable { } | 17:27 | |
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Unable to parse $*PKGDECL definition at line 2, near "does IO::F"» | ||
harmil_home | OK, I'll start doing the binary search... | ||
pmichaud | if you can nopaste it, we might be able to spot it quickly | ||
harmil_home | interesting. | ||
moritz | seems I've just reproduced it above | ||
r: class IO::Parrot { }; class MyIO is IO::Parrot does IO::FileTestable { } | |||
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Unable to parse $*PKGDECL definition at line 2, near "does IO::F"» | ||
moritz | so, not related to the IO name | ||
harmil_home | related to undefined IO::FileTestable? | 17:28 | |
moritz | r: class IO::Parrot { }; class IO does IO::FileTestable { } | ||
p6eval | rakudo a569e3: OUTPUT«===SORRY!===Unable to parse $*PKGDECL definition at line 2, near "does IO::F"» | ||
harmil_home | Oh heck | ||
I didn't export IO::Parrot after I moved it out into a file | |||
moritz | r: say IO::FileTestable | ||
p6eval | rakudo a569e3: OUTPUT«Could not find symbol 'IO::&FileTestable' in block <anon> at /tmp/ojDGWQZdeJ:1» | ||
moritz | oh, that explains a lot | ||
harmil_home | hmmm that didn't help any | 17:29 | |
pmichaud | might be worthy of a LTA rakudobug | ||
moritz | r: say IO::FileTestable | ||
p6eval | rakudo a569e3: OUTPUT«Could not find symbol 'IO::&FileTestable' in block <anon> at /tmp/k8rQXz5Tio:1» | ||
harmil_home | LTA? | ||
moritz | less than awesome | ||
harmil_home | ah | ||
moritz | oh | ||
that's becase p6eval hides IO | |||
it works locally | |||
but yes, a missing IO::Parrot would do the same | 17:30 | ||
pmichaud | also, if you do class IO does IO::FileTestable you're hiding the old IO namespace | ||
harmil_home | pmichaud, which I wish to do | ||
I'm wholly replacing it | |||
pmichaud | which means that IO::FileTestable isn't visible :) | 17:31 | |
unless you're replacing that too :) | |||
harmil_home | yep | ||
pmichaud | okay then. | ||
moritz | though, consider not to inherit from IO::Parrot | ||
harmil_home | my IO.pm is the core IO.pm with all parrot IO calls ripped out | ||
moritz | it feels wrong to have VM-specific behavior as the superclass of the general IO class | 17:32 | |
harmil_home | how would you define IO.read if not in terms of a lower-level interface? | ||
pmichaud | it can be a role | 17:33 | |
jnthn | It's fine to define it in terms of a lower level interface, but it should be done through delegation. | ||
moritz | harmil_home: you can ouse a lower-level interface without inheritance | ||
jnthn | Please think a bit about what this will look like off Parrot too. :) | 17:34 | |
moritz | harmil_home: it can be an attribute (has $.parrot-io), or simply function calls or something else | ||
right, delegation, not inheritance | |||
pmichaud | we definitely don't want to be interposing a vm-specific class between IO and Any | ||
harmil_home | Ugh, I was trying to extract the parrot-speciifc attribute out, not change it's type ;) | ||
pmichaud, why not? | |||
pmichaud | it is likely to confuse the type system across implementations | 17:35 | |
moritz | because superclasses are part of the public API | ||
pmichaud | moritz++ said it better :) | ||
moritz | and our public API shouldn't expose VM-specific stuff | ||
inheritance is just wrong Wrong WRONG here | |||
harmil_home | pmichaud, how would it confuse the type systems across implementations? There won't be an IO::Parrot in a non-Parrot implementation will there? | ||
pmichaud | harmil_home: correct. Which means that IO on a different implementation would have a different superclass than Rakudo on Parrot | 17:36 | |
harmil_home | sigh, OK, I'm going to go get some lunch and try to pretend that getting buffered IO into the core isn't running into road-blocks at every step | ||
moritz | be glad that we caught that mistake *before* you implemented it all | 17:38 | |
pmichaud | > say substr 'abcd', 1, -1 | 17:40 | |
Negative length argument (-1) to .substr, use '*-1' if you want offset from the end | |||
jnthn | pmichaud++ | ||
dalek | kudo/toqast: 3dd5f6f | jnthn++ | src/QPerl6/Actions.pm: Eliminate a usage of viviself. |
||
kudo/toqast: a466813 | jnthn++ | src/QPerl6/ (2 files): Start fixing package lookups a bit. Gets us one more test passing again. |
|||
jnthn | splice still needs this kinda update too | ||
17:42
harmil_home left
|
|||
sorear | good * #perl6 | 17:46 | |
moritz: dalek reports anything that you can append to the queue file. | 17:47 | ||
moritz: it also has an rss puller | |||
rss pull will be slower ofc | |||
moritz | sorear: where is parrot's issue watching configured? | 17:48 | |
pmichaud | ...parrot has an issue watcher? | 17:49 | |
pmurias | sorear: hi | ||
sorear: is there anything with niecza that you need help with? | 17:50 | ||
sorear | pmichaud: yes! and it even used to work! | 17:53 | |
trac only | |||
17:53
vmspb joined
17:54
PerlJam joined
|
|||
sorear | colomon: why doesn't sprintf take a slurpy? | 17:56 | |
18:00
tyatpi joined
|
|||
dalek | kudo/nom: c24da0b | pmichaud++ | src/core/Str.pm: Improve the negative start/length failure messages for substr. |
18:01 | |
pmurias | sorear: my summer break has started so I should have lots of free time soon | 18:05 | |
sorear: should I work on the stuff from the TODO or does the no-bootstrap branch need to be finished first? | 18:06 | ||
sorear | I haven't gone over TODO recently, probably it has a lot of stale items | 18:09 | |
I personally am blocking everything else on no-bootstrap | |||
pmurias | anything there I should work on | 18:13 | |
? | 18:14 | ||
preferably something isolated as lightning destroyed my dsl modem, so I have to walk to the uni to use the wifi :( | |||
18:21
fgomez joined
|
|||
sorear shrugs | 18:21 | ||
18:30
am0c left
18:53
trist4n left
18:54
lep-delete left
|
|||
pmurias | sorear: how should I build the non-bs branch? | 18:54 | |
sorear | pmurias: make, then mono obj/Run.Kernel.dll -test-nobs --help | 18:58 | |
hmmm | |||
no, that was right | 18:59 | ||
it wasn't working because I tried it in the wrong checkout | |||
flussence | random question: is there a more idiomatic way to have a repeating list of items than @f[$_ % @f]? | 19:00 | |
sorear | @f xx * | ||
19:01
GlitchMr left
|
|||
pmurias | sorear: thanks | 19:01 | |
sorear: I mistook the lack of some debian package for typing the wrong invocation | |||
flussence | oh, that looks nicer. thanks | ||
19:01
MayDaniel joined
|
|||
sorear | pmurias: actually just make obj/Run.Kernel.dll | 19:02 | |
the branch is nowhere near usable | |||
19:04
vmspb left
|
|||
pmurias | sorear: does the non-bs branch run anything right now? | 19:07 | |
sorry for repetition | 19:08 | ||
sorear | no | ||
pmurias | so you are just translating code for now? | 19:10 | |
sorear | yes | 19:11 | |
masak | evening, #perl6 | 19:16 | |
sorear | o/ masak | ||
19:20
birdwindupbird joined
|
|||
moritz | \o * | 19:25 | |
19:29
pmurias left
19:30
preflex_ joined,
preflex_ is now known as preflex
|
|||
masak | r: class A { method foo() {} }; say +grep { .positional && !.invocant }, A.^methods[0].signature.params; class B { has A $.a handles <foo> }; say +grep { .positional && !.invocant }, B.^methods[0].signature.params | 19:35 | |
p6eval | rakudo c24da0: OUTPUT«00» | ||
masak | r: class A { method foo() {} }; say +grep { .positional && !.invocant }, A.^methods[0].signature.params; class B { has A $!a handles <foo> }; say +grep { .positional && !.invocant }, B.^methods[0].signature.params | ||
p6eval | rakudo c24da0: OUTPUT«01» | ||
masak | jnthn: why the 1? | ||
this surprised me greatly. | 19:36 | ||
r: class A { method foo() {} }; class B { has A $!a handles <foo> }; say (grep { .positional && !.invocant }, B.^methods[0].signature.params).name | |||
p6eval | rakudo c24da0: OUTPUT«No such method 'name' for invocant of type 'List' in block <anon> at /tmp/fUdadEjW3e:1» | ||
jnthn | masak: Maybe handles installs a closure rather than an anonymous method or something. | ||
masak | r: class A { method foo() {} }; class B { has A $!a handles <foo> }; say (grep { .positional && !.invocant }, B.^methods[0].signature.params)[0].name | ||
p6eval | rakudo c24da0: OUTPUT«$c» | ||
masak | what's $c? | ||
19:37
christian_ joined
|
|||
masak | jnthn: yeah, but it only does this when the attribute is private. | 19:37 | |
suddenly my nice introspection breaks :) | |||
jnthn | ...what? | ||
It's about handles. It's nothing to do with privacy. | |||
masak | well, it shouldn't have anything to do with privacy. | 19:38 | |
19:38
christian_ left
|
|||
masak | but note that the output is different if it's $.a or $!a above. | 19:38 | |
that's what's surprising, more than anything else, really. | |||
masak submits rakudobug | 19:39 | ||
jnthn | ah, maybe it goes thorugh a differnet codepath or something becuase you want it to call the accessor in the first case | ||
I dunno | |||
masak | the B.foo method comes back saying it has one positional non-invocant parameter. | 19:40 | |
jnthn | Well, did you check what kind of object it is? | ||
It's probably a Block rather than a Method. | |||
masak | r: class A { method foo() { say "OH HAI" } }; class B { has A $!a handles <foo> }; B.new.foo | ||
p6eval | rakudo c24da0: OUTPUT«OH HAI» | ||
masak | r: class A { method foo() {} }; class B { has A $!a handles <foo> }; say (grep { .positional && !.invocant }, B.^methods[0].signature.params)[0].^name | 19:41 | |
p6eval | rakudo c24da0: OUTPUT«Parameter» | ||
masak | er. | ||
r: class A { method foo() {} }; class B { has A $!a handles <foo> }; say B.^methods[0].^name | |||
p6eval | rakudo c24da0: OUTPUT«Method» | 19:42 | |
masak | it's a Method. | ||
with a $c parameter. | |||
jnthn | Oh. | ||
oh, of course. | |||
it's |$c | |||
As in, the capture | |||
I'm surprised that is counted as positional. | 19:43 | ||
I suspect that's the real bug. | |||
r: sub foo(|$c) { }; say &foo.params[0].positional | |||
p6eval | rakudo c24da0: OUTPUT«No such method 'params' for invocant of type 'Sub' in block <anon> at /tmp/GsWgBwfdNM:1» | ||
jnthn | r: sub foo(|$c) { }; say &foo.signature.params[0].positional | ||
p6eval | rakudo c24da0: OUTPUT«True» | ||
pmichaud | r: sub foo(|$c) { }; say &foo.count; | 19:44 | |
jnthn | Yeah, that probably should not be True | ||
p6eval | rakudo c24da0: OUTPUT«Inf» | ||
pmichaud | r: sub foo(|$c) { }; say &foo.arity; | ||
p6eval | rakudo c24da0: OUTPUT«0» | ||
pmichaud | at least those are correct. :-) | ||
masak | I think the real bug is that the actual parameters in the handled method get hidden in a capture parameter -- and that this only happens for private attributes :/ | ||
jnthn | What "actual parameters"? | ||
masak | jnthn: in this case, an empty list of them. | ||
jnthn | masak: Your expectations are weird. | 19:45 | |
masak: How is it meant to know that the object that you call .foo on will take no parameters? | |||
pmichaud | in some sense, wrappers that pass-through their arguments to the thing they wrap perhaps ought to expose the underlying signature, too. | 19:46 | |
jnthn | IT'S A METHOD DISPATCH. WE DO NOT KNOW. | ||
masak | jnthn: what pmichaud said. | ||
jnthn: why does it work for the public case but not for the private case? | |||
pmichaud | although yes, I see what jnthn++ is saying also, here. | ||
masak | well, me too. | 19:47 | |
jnthn | masak: Because you're looking at the wrong method, perhaps? | ||
.methods[0] | |||
You're probably looking at the generated accessor method there. | |||
pmichaud | there have been a few times I've wished for .methods.<xyz> :-) | 19:48 | |
jnthn | Sadly, it's a list, not a hash. | 19:49 | |
Wait...what? :) | |||
19:49
szabgab left
|
|||
jnthn | .find_method('xyz') # :) | 19:49 | |
pmichaud | ...where .postcircumfix:<{ }> greps through that list for method names | ||
I can live with find_method | |||
r: say 3.find_method('Str') | 19:50 | ||
p6eval | rakudo c24da0: OUTPUT«No such method 'find_method' for invocant of type 'Int' in block <anon> at /tmp/kwRwcKAoyO:1» | ||
jnthn | .^ | ||
pmichaud | r: say 3.^find_method('Str') | ||
jnthn | It's a meta-method | ||
p6eval | rakudo c24da0: OUTPUT«Str» | ||
pmichaud | r: say 3.^find_method('Str').signature | ||
p6eval | rakudo c24da0: OUTPUT«:(Mu , , Mu *%_)» | ||
jnthn | Um. | 19:51 | |
pmichaud | okay, that works well enough for me I guess. :) | ||
moritz | you can also do .can('Str')[0] | ||
jnthn | Aside from Signature.perl needs some love. | ||
pmichaud | r: class A { method foo() { say "OH HAI" } }; class B { has A $!a handles <foo>; B.new.^find_method('foo').say | ||
p6eval | rakudo c24da0: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2, near ""» | ||
pmichaud | r: class A { method foo() { say "OH HAI" } }; class B { has A $!a handles <foo>; }; B.new.^find_method('foo').say | 19:52 | |
p6eval | rakudo c24da0: OUTPUT«foo» | ||
pmichaud | r: class A { method foo() { say "OH HAI" } }; class B { has A $!a handles <foo>; }; B.new.^find_method('foo').signature.say | ||
p6eval | rakudo c24da0: OUTPUT«:(Mu , |$c, Mu *%_)» | ||
pmichaud | there ya go. :-) | ||
jnthn | Yeah, it knows its a capture. | ||
I bet that way, changing it to $.a doesn't change things. | |||
pmichaud | and we can't know anything about the underlying A.foo because it's a dispatcher, not a wrapper? | 19:53 | |
jnthn | What is I wrote a class C is A { method foo($x) { } } | ||
*if | |||
It's a dynamic (at runtime) dispatch. | |||
pmichaud | exactly. the handles<foo> doesn't wrap the A::foo method. | 19:54 | |
It simply takes anything coming in at B.foo and sends it to $!a | |||
jnthn | Exactly. It installs a new method in B. | ||
pmichaud | wfm | ||
masak | ok, so "it's like this". | 19:55 | |
moritz | ... "and that's the way it is" | ||
masak | r: class A { method foo() { say "OH HAI" } }; class B { has A $.a handles <foo>; }; say B.new.^find_method('foo').signature | ||
p6eval | rakudo c24da0: OUTPUT«:(Mu , |$c, Mu *%_)» | ||
jnthn | So, the only bug I see in all of this is that a |$c gives .positional as True under introspection. | ||
pmichaud | to fix the .positional problem, I propose adding $SIG_ELEMENT_IS_CAPTURE to | ||
($!flags +& ($SIG_ELEM_SLURPY_POS +| $SIG_ELEM_SLURPY_NAMED)) == 0 && | |||
jnthn | pmichaud: Yes, that should do it. | 19:56 | |
masak | jnthn: it also counts |$c differently for the public/private attr cases. | ||
even though it's there in both cases. | |||
jnthn | masak: You haven't shown that. | ||
masak: [0] in the list of methods is probably not the generated 'foo', but instead the generated accessor method. | 19:57 | ||
19:57
Guest14009 left
|
|||
masak | oh. | 19:58 | |
19:58
whiteknight joined
|
|||
jnthn | Relying on ordering of generated stuff in the method list is not wise. | 19:58 | |
pmichaud | ...which is why I'd like a .^methods{'foo'} :-) | ||
19:58
whiteknight is now known as Guest30914
|
|||
pmichaud | I agree that find_method works... but it has that "find_" part in it. | 19:58 | |
masak | r: class A { method foo() {} }; class B { has A $.a handles <foo> }; say (grep { .positional && !.invocant }, B.^methods[0].signature.params)[0].name | 19:59 | |
p6eval | rakudo c24da0: OUTPUT«No such method 'name' for invocant of type 'Nil' in block <anon> at /tmp/tqiggdrcJ4:1» | ||
masak | r: class A { method foo() {} }; class B { has A $.a handles <foo> }; say B.^methods[0].name | ||
p6eval | rakudo c24da0: OUTPUT«a» | ||
pmichaud | ding! | ||
masak | jnthn++ masak-- | ||
shoulda checked ;) | 20:00 | ||
jnthn | pmichaud: .^method_table{'foo'} may well work. | 20:01 | |
pmichaud: But it's...ugly again probably ;) | |||
pmichaud | jnthn: no, I like that one. | ||
jnthn | pmichaud: Be aware that method_table is only the methods *directly* in the class. | ||
pmichaud | find_method is too.... active for me | ||
oh, that's a very good point. | |||
jnthn | pmichaud: Well, find_method can be very active :) | ||
pmichaud | Okay, I accept find_method. | ||
jnthn | pmichaud: If there's any fallback stuff or wildcard delegation going on, find_method is gonna also get you that too. | 20:02 | |
pmichaud | ...we have no tests for .positional ? | ||
jnthn | .^methods is purely asking the class about what was added to it, and returns everything up to Cool or Any. | ||
masak | pmichaud: find_method is definitely active in the case of, say, Grammar::Debugger ;) | ||
jnthn | Right, that's an excellent example. | ||
pmichaud: S06-signature/introspection.t will contain them if they're anywhere | 20:04 | ||
pmichaud | jnthn: it does not. I'll add a couple :) | ||
jnthn | :) | ||
pmichaud | r: sub xyz(|$c) { }; say &xyz.signature.params[0].name | 20:05 | |
p6eval | rakudo c24da0: OUTPUT«$c» | ||
pmichaud | r: sub xyz(|$c) { }; say &xyz.signature.params[0].positional | 20:06 | |
p6eval | rakudo c24da0: OUTPUT«True» | ||
jnthn | That's the one that I think should be False. | ||
ooc | |||
r: sub xyz(*@a) { }; say &xyz.signature.params[0].positional | |||
p6eval | rakudo c24da0: OUTPUT«False» | ||
pmichaud | that's explicitly checked for by SIG_ELEM_SLURPY_POS | ||
jnthn | ah, yes | 20:07 | |
pmichaud | 19:55 <pmichaud> ($!flags +& ($SIG_ELEM_SLURPY_POS +| $SIG_ELEM_SLURPY_NAMED)) == 0 && | ||
r: sub xyz(|$c) { }; say &xyz.signature.params[0].slurpy | 20:08 | ||
p6eval | rakudo c24da0: OUTPUT«False» | ||
pmichaud | ...wonder if that should be true :-) | 20:09 | |
jnthn | Arguably | ||
pmichaud | > sub xyz(|$c) { }; say &xyz.signature.params[0].positional | 20:10 | |
False | |||
jnthn | (The reason there's something to argue mostly being because of its snapshotting semantics.) | ||
pmichaud | spectesting | 20:11 | |
moritz | pmichaud: is &xyz.count still Inf? | 20:13 | |
pmichaud | > say &xyz.count | 20:17 | |
Inf | |||
dalek | kudo/nom: 3e00089 | pmichaud++ | src/core/Parameter.pm: Fix .positional for capture parameters in signatures. masak++ |
20:18 | |
ast: 7a77ff8 | pmichaud++ | S06-signature/introspection.t: [S06]: Add tests for capture parameter introspection of .positional, .named, etc. |
|||
20:20
bruges left
20:26
kcwu left
|
|||
masak | lol I bloggied! strangelyconsistent.org/blog/july-7...-restoring | 20:27 | |
I again invite people to break the game in ways I didn't predict. | |||
20:37
seldon joined
|
|||
tadzik | _sri: yeah, this sucks a bit but it's the only way I know of | 20:38 | |
there's also Select PMC in Parrot, and IO::Select is a wrapper around that, but it behaved a bit weird to me last time I tried it | |||
_sri | tadzik: *a bit* is quite an understatement ;p | ||
tadzik | :) | 20:42 | |
I was secretly hoping that it'd work fine for you | |||
I wrote tests for it, but it was a bit like "hmm, what makes sense _and_ works..." | |||
not sure if I ever succeeded on the first part | 20:44 | ||
I have some free time in the upcoming days, maybe I could write some poll/epoll on parrot/nqp level which isn't completely stupid | |||
dalek | p: 8062b32 | pmichaud++ | src/QRegex/Cursor.nqp: [qregex] Add !cursor_more, a preliminary method for handling :g, :ov, :ex. |
20:51 | |
p: 052b7a1 | pmichaud++ | src/pmc/qrpa.pmc: [qrpa] Fix exception message for shift from empty array (jnthn++). |
|||
21:04
birdwindupbird left
21:11
tyatpi left
21:19
kaare_ left
|
|||
masak | good night, #perl6 | 21:22 | |
21:23
ponbiki joined,
ponbiki is now known as Guest77817
21:29
zby_home_ left
21:37
mucker left
21:39
MayDaniel left
21:41
samlt joined
|
|||
sorear | how much interest is there in getting github issues on dalek? | 22:03 | |
diakopter | the command to close an issue could be 'exterminate' | 22:04 | |
sergot | good night o/ | 22:11 | |
22:11
sergot left
|
|||
pmichaud | github issues on dalek +1 | 22:13 | |
jnthn | 'night, #perl6 | 22:17 | |
seldon | Are the d, e, f, l, r, s, t, w, x, and z methods of class IO part of the public API? | 22:21 | |
sorear | Yes | 22:25 | |
seldon | What do they do? | 22:28 | |
pmichaud | they're filetest operators | 22:29 | |
.d == is this file a directory | |||
.e == does this file exist | |||
seldon | Oh, I see. | ||
pmichaud | it's what enables things like "foo.txt".io ~~ :f # true if foo.txt exists and is readable | 22:30 | |
see "Other things" in perlcabal.org/syn/S32/IO.html | |||
dalek | p: 7995664 | pmichaud++ | src/ops/nqp.ops: Clean up some gcc compiler warnings. |
22:31 | |
p: eb7f09e | pmichaud++ | src/6model/ (4 files): More compiler warning cleanups. |
|||
p: 28f89ef | pmichaud++ | src/6model/base64.c: More casting and code cleanup. |
|||
seldon | There they are. I didn't make the connection to member functions :o | 22:35 | |
I'm shamelessly lifting method signatures from IO.pm, btw. I hope that's okay. | 22:37 | ||
22:46
PacoAir left
22:50
tyatpi joined
22:51
bruges joined
23:07
sudokode joined
|
|||
diakopter | pmichaud: does nqp's --target=past still work? It tells me Could not find sub _dumper | 23:24 | |
23:27
tyatpi left
23:34
seldon left
23:35
seldon joined
|