Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-17

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 TimToady of course, *I* never make broad statements...  :P
00:01 lue I'm sorry? I was compiling, and I don't understand what's going on anymore :)
00:01 jnthn Discussion got boring, so we moved to meta-discussion. ;-)
00:01 TimToady just keep compiling, it's a good excuse.
00:01 TimToady now we're on meta xx *
00:02 * diakopter tries to type the next one, but can't quite ....
00:03 TimToady we would aleph at you :)
00:03 lue aleph-1? Because aleph-naught is relatively boring.
00:04 diakopter I see a couple of questions from 120m ago that are still open in my brain - masak's (and my) question about my ($a, $b --> Int)  and  <@sorear> diakopter: is my &:(Int --> Int) &foo = * + 1; legal?
00:04 * lue has the sudden urge to set up the ability to type Hebrew
00:04 jnthn Talking of which, it's late, and I has work tomorrow, so it's time aleph-t for sleep.
00:04 * TimToady wonders if ** is still aleph-0
00:04 jnthn o/
00:04 * lue s/Hebrew/math symbols/
00:04 lue jnthn: night
00:04 TimToady \o
00:06 lue AUG! Blender (unstable) has been giving me a lot of grief during compilation involving Python, and it's use in C (or C++, I can't tell)
00:07 lue I really want them to switch to Perl for extensions right now :)
00:09 yinyin joined #perl6
00:10 * lue ponders the implications of naming any program in perl6 (in /usr/bin) to ./perl6
00:11 lue rm "any program"
00:12 {shade} joined #perl6
00:15 ashleydev joined #perl6
00:19 lue I guess jnthn takes the voiceboxes of many as he sleeps :)
00:24 lue How can I force perl to explore subdirectories with this code (yes, it's P5; if a P6 version exists, I'd love it.):
00:24 lue /usr/bin/perl -p -i -e "s/#include <Python.h>/#include <python2.6\/Python.h>/g" source/blender/python/intern/*
00:28 TimToady <@sorear> TimToady: [viv] Why did you choose to make the default emit_p5 behavior for leaf nodes unaltered passthrough instead of carping?
00:28 TimToady well, laziness, I suppose, since much of P5 and P6 are the same
00:30 TimToady and xact is sort for 'transaction'
00:30 TimToady specifically, backtracking states, really
00:31 TimToady it's probably abusing the term, but there are notions of commit and rollback flying about
00:31 [Coke] rakudo: subset Quad of Any;
00:31 p6eval rakudo 87e0e1:  ( no output )
00:31 diakopter rakudo: subset Quad of Quad
00:31 p6eval rakudo 87e0e1:  ( no output )
00:33 * [Coke] wonders why masaks's Quad is failing in his poker example. :P
00:34 TimToady std: subset Foo of Foo;
00:34 diakopter std: subset Quad of Quad
00:34 p6eval std 30664: OUTPUT«ok 00:01 110m␤»
00:34 p6eval std 30664: OUTPUT«ok 00:01 110m␤»
00:34 TimToady hmm
00:34 TimToady sort of like a self-signed certificate :)
00:34 diakopter std: subset subset of subset
00:34 p6eval std 30664: OUTPUT«ok 00:01 110m␤»
00:35 TimToady std: subset Foo of Bar;
00:35 p6eval std 30664: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/cKY2o0xHxX line 1:␤------> [32msubset Foo of [33m⏏[31mBar;[0m␤    expecting typename␤Parse failed␤FAILED 00:01 111m␤»
00:35 TimToady std: subset Foo;
00:35 p6eval std 30664: OUTPUT«ok 00:01 110m␤»
00:36 TimToady std: subset Foo of Foo of Foo of Foo of Foo;
00:36 p6eval std 30664: OUTPUT«ok 00:01 110m␤»
00:36 TimToady hmm
00:37 [Coke] TimToady: nifty!
00:37 [Coke] std: subset Foo of Bar of Foo of Bar;
00:37 p6eval std 30664: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/DYUnTlKZpQ line 1:␤------> [32msubset Foo of [33m⏏[31mBar of Foo of Bar;[0m␤    expecting typename␤Parse failed␤FAILED 00:01 111m␤»
00:37 diakopter std: role Boo[Boo];
00:37 p6eval std 30664: OUTPUT«ok 00:01 112m␤»
00:39 TimToady "You have just swallowed your tail.  Have a pleasant day, what's left of it."
00:40 TimToady .oO(Diet of Worm)
00:40 diakopter std: role role[role]
00:40 p6eval std 30664: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse role definition at /tmp/MuHtBWxcsH line 1 (EOF):␤------> [32mrole role[role][33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 112m␤»
00:40 diakopter std: role role[role];
00:40 p6eval std 30664: OUTPUT«ok 00:01 112m␤»
00:50 TimToady std: 42 ~~ undef
00:50 p6eval std 30664: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤       Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    :!defined as a matcher,␤  Any:U as a type
00:50 p6eval ..constraint␤       or fail() as…
00:51 TimToady if something P5ish is missing from P6, the fastest way to find out what it is will generally be to try to use it anyway.  :)
00:51 TimToady s/it/the new way/
00:52 TimToady s:2nd/it/the old way/
00:54 lue rakudo: say $_ ~~ Mu #curious
00:54 p6eval rakudo 87e0e1: OUTPUT«1␤»
01:00 lue .rnd( It's annoying when _nothing_ is going on. :| )
01:04 TiMBuS joined #perl6
01:18 [Coke] seen masak?
01:18 * [Coke] needs a bot primer for this discussion.
01:19 pugssvn r30665 | lwall++ | [S03] make more explicit that doctrine that ~~ topicalizes, and
01:19 pugssvn r30665 | remove smartmatch table fossils that automatically fall out from it
01:19 [Coke] phenny: tell masak that I have a working example now of his poker code.
01:19 phenny [Coke]: I'll pass that on when masak is around.
01:19 [Coke] phenny: tell masak it's just the same code he posted earlier, though. (need some .value()s)
01:19 phenny [Coke]: I'll pass that on when masak is around.
01:19 snarkyboojum joined #perl6
01:31 quietfanatic lue: (re: question at 17:24) replace source/blender/python/intern/* with `find source/blender/python/intern`
01:34 [mark] joined #perl6
01:45 am0c joined #perl6
01:50 pjcj joined #perl6
01:50 [Coke] are enums in rakudo mostly functional? (trying to convert some stuff that uses masak's DIY::Enum class, getting an unexpected error.)
01:51 colomon they are vaguely functional.
01:52 colomon moritz_ and I were messing around trying to get them to work in the setting this morning.
01:52 colomon I think they work at least a bit in user code.
01:52 colomon not sure how fancy you can get, however.
01:52 colomon what are you trying to do?
01:53 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
01:53 p6eval rakudo 87e0e1: OUTPUT«-1␤»
01:56 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say +Increase
01:56 p6eval rakudo 87e0e1: OUTPUT«-1␤»
01:56 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say Increase.perl
01:56 p6eval rakudo 87e0e1: OUTPUT«-1␤»
01:56 [Coke] trying to narrow down what exactly is causing the error.
02:02 [Coke] ah. if I have an emum, how do you iterate over it ? Name.pick(*).eager doesn't seem to do it.
02:02 JimmyZ joined #perl6
02:03 eternaleye (re special casing ~~ .meth) I don't see why the special case was ever needed, when we have *.meth/!*.meth, as well as :meth/:!meth
02:06 pjcj joined #perl6
02:08 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say Order
02:08 p6eval rakudo 87e0e1: OUTPUT«Decrease   1␤Increase        -1␤Same   0␤␤»
02:09 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); for Order.keys -> $k { say $k }
02:09 p6eval rakudo 87e0e1: OUTPUT«Decrease␤Increase␤Same␤»
02:09 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); for Order -> $k, $v { say $k }
02:09 p6eval rakudo 87e0e1: OUTPUT«StopIteration␤current instr.: '_block25' pc 29 (EVAL_2:0)␤»
02:09 colomon huh.
02:10 colomon I need to go to bed, but those evals seem like they might both have a bug and a clue for a workaround.  :)
02:10 [Coke] rakudo: enum FOO <A B>; say FOO.enums.perl
02:10 p6eval rakudo 87e0e1: OUTPUT«Method 'enums' not found for invocant of class 'EnumMap'␤current instr.: '_block18' pc 29 (EVAL_2:0)␤»
02:10 colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say Order.perl
02:10 p6eval rakudo 87e0e1: OUTPUT«{"Decrease" => 1, "Increase" => -1, "Same" => 0}␤»
02:21 alester joined #perl6
02:59 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say @a X @b;
02:59 p6eval rakudo 87e0e1: OUTPUT«1 a1 b1 c2 a2 b2 c3 a3 b3 c␤»
03:00 masonkramer joined #perl6
03:01 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b);
03:01 p6eval rakudo 87e0e1: OUTPUT«1 a1 b1 c2 a2 b2 c3 a3 b3 c␤»
03:02 sorear odd spacing.
03:04 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).perl;
03:04 p6eval rakudo 87e0e1: OUTPUT«("1", "a", "1", "b", "1", "c", "2", "a", "2", "b", "2", "c", "3", "a", "3", "b", "3", "c")␤»
03:04 [Coke] how to get that as a list of 2-at-a-time?
03:05 sorear I think it's supposed to be 2-at-a-time
03:05 sorear slicels are weird in rakudo now
03:05 sorear rakudo: say <a b c d e f>.map({ $^a => $^b }).perl
03:05 p6eval rakudo 87e0e1: OUTPUT«Lexical '$a' not found␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:06 sorear rakudo: say <a b c d e f>.map(-> $a, $b { $a => $b }).perl
03:06 p6eval rakudo 87e0e1: OUTPUT«("a" => "b", "c" => "d", "e" => "f")␤»
03:06 sorear that might do
03:06 sorear is the first one a bug?
03:08 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).map(-> $a, $b { $a => $b}).perl
03:08 p6eval rakudo 87e0e1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block62' pc 462 (EVAL_1:1782836685)␤»
03:08 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).perl.map(-> $a, $b { $a => $b}).perl
03:09 p6eval rakudo 87e0e1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block64' pc 474 (EVAL_1:25378415)␤»
03:09 sorear .perl produces a string
03:10 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; (@a X @b).map(-> $a, $b { $a => $b }).say
03:10 p6eval rakudo 87e0e1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block62' pc 451 (EVAL_1:25374860)␤»
03:11 [Coke] rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).map(-> $a, $b { $a => $b })
03:11 p6eval rakudo 87e0e1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block62' pc 450 (EVAL_1:26665595)␤»
03:24 [Coke] ARGh.
03:26 buffalo2010 joined #perl6
03:31 molaf joined #perl6
03:34 quietfanatic joined #perl6
03:35 quietfanatic rakudo: subset IntStr where Int | Str; proto x (IntStr $x) {say 'a'}; multi x (Int $x) {say 'b'}; multi x (Str $x) {say 'c'}; x(4);
03:35 p6eval rakudo 87e0e1: OUTPUT«b␤»
03:35 quietfanatic rakudo: subset IntStr where Int | Str; proto x (IntStr $x) {say 'a'}; multi x (Int $x) {say 'b'}; multi x (Str $x) {say 'c'}; x("a");
03:35 p6eval rakudo 87e0e1: OUTPUT«c␤»
03:44 ashleydev joined #perl6
03:48 eternaleye [Coke]: The spacing is because say takes a list argument, stringifies each element, and prints the stringifications with no separator. Thus, each element in the top level list is a two element list itself. The stringification of the two element list includes a space, so the spacing you observed is the result.
03:49 eternaleye Also, this is simpler than the map:
03:49 quietfanatic rakudo: multi x (Int $x) {...}; (multi x (Str $x) {...}).candidates>>.signature>>.perl>>.say
03:49 p6eval rakudo 87e0e1: OUTPUT«:(Int $x)␤:(Str $x)␤»
03:49 eternaleye rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X=> @b).perl
03:49 p6eval rakudo 87e0e1: OUTPUT«("1" => "a", "1" => "b", "1" => "c", "2" => "a", "2" => "b", "2" => "c", "3" => "a", "3" => "b", "3" => "c")␤»
03:49 eternaleye [Coke]: X is not only an op, it's also a metaop
03:50 quietfanatic Why is the return of the second multi declaration the whole multisub, rather than the individual one?
03:51 eternaleye quietfanatic: Not sure, but >>.say doesn't do what you think it does. While the return values of a hyper will be in order, the _execution_ order is undefined, possibly random, and potentially parallel. So it may say each element in anyt order, not the list's order
03:52 quietfanatic No, I mean the return value of (multi x (...) {...})
03:52 eternaleye quietfanatic: Hence the 'not sure, but...'
03:52 quietfanatic should be only the one candidate, rather than all of the candidates.
03:52 quietfanatic I have the >>. ops okay.
03:52 quietfanatic Oh, and yeah
03:53 eternaleye And I think the return value is a Perl6MultiSub, which contains all of the candidates
03:53 quietfanatic I realize it's supposed to be hyper.  I don't need it to be ordered.
03:53 [Coke] X=> ahh.
03:53 eternaleye rakudo: multi x (Int $x) {...}; (multi x (Str $x) {...}).WHAT
03:53 p6eval rakudo 87e0e1:  ( no output )
03:53 eternaleye rakudo: multi x (Int $x) {...}; say (multi x (Str $x) {...}).WHAT
03:53 p6eval rakudo 87e0e1: OUTPUT«Multi()␤»
03:53 quietfanatic The return value /ought/ to be just the one sub.
03:53 eternaleye rakudo: multi x (Int $x) {...}; say (multi x (Str $x) {...}).PARROT
03:53 p6eval rakudo 87e0e1: OUTPUT«Perl6MultiSub␤»
03:53 quietfanatic or so says TimToady, who I've asked.
03:54 quietfanatic I'll submit this as a bug then.
03:54 eternaleye rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).slice.perl
03:54 p6eval rakudo 87e0e1: OUTPUT«Method 'slice' not found for invocant of class 'GatherIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:54 eternaleye rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@a X @b).slicel.perl
03:54 p6eval rakudo 87e0e1: OUTPUT«Method 'slicel' not found for invocant of class 'GatherIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:54 eternaleye rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (@@(@a X @b)).perl
03:54 p6eval rakudo 87e0e1: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)␤»
03:55 eternaleye rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (||(@a X @b)).perl
03:55 p6eval rakudo 87e0e1: OUTPUT«Capture.new()␤»
03:55 eternaleye 0.o
03:55 quietfanatic I think prefix:<|> is supposed to coerce to a capture, so that's right
03:55 quietfanatic except of course that .perl ought to introspect it.
03:55 eternaleye quietfanatic: Yes, but not an _empty_ capture
03:56 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (||(@a X @b))[0]
03:56 p6eval rakudo 87e0e1: OUTPUT«Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:56 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; say (|(@a X @b))[0]
03:56 p6eval rakudo 87e0e1: OUTPUT«Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:57 eternaleye phenny: tell masak: is http://irclog.perlgeek.de/perl6/2010-05-17#i_2337529 and subsequent a bug?
03:57 phenny eternaleye: I'll pass that on when masak is around.
03:57 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; (-> (*@x) {say @_}).(|(@a X @b))
03:57 p6eval rakudo 87e0e1: OUTPUT«Placeholder variable cannot override existing signature at line 11, near ").(|(@a X "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
03:57 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; (-> (*@x) {say @x}).(|(@a X @b))
03:57 p6eval rakudo 87e0e1: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤current instr.: '_block58' pc 467 (EVAL_1:33647942)␤»
03:57 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; (-> *@x {say @x}).(|(@a X @b))
03:57 p6eval rakudo 87e0e1: OUTPUT«␤»
03:57 quietfanatic I see, the capture is empty.
03:58 eternaleye quietfanatic: Also, while |(...) flattens, ||(...) slice-ifies
03:58 quietfanatic rakudo: my @a = <1 2 3> ; my @b =<a b c>; (-> *@x {say @x}).(||(@a X @b))
03:58 p6eval rakudo 87e0e1: OUTPUT«␤»
03:58 quietfanatic Ah.  I was not up to date then.
03:59 agentzh joined #perl6
04:00 eternaleye quietfanatic: Also, like |@foo in calls matches *@foo in signatures, ||@foo matches **foo in signatures
04:00 eternaleye erm, **@foo
04:00 quietfanatic Ah, I didn't even know there was a **@foo now
04:01 eternaleye Yep, for slurpy slicels. It changed from @@foo
04:01 eternaleye Erm, *@@foo
04:01 eternaleye I need caffeine
04:01 [Coke] rakudo: enum Foo <a b c>; enum Bar <1 2 3> ; say (Foo.keys X=> Bar.keys).perl
04:01 p6eval rakudo 87e0e1: OUTPUT«()␤»
04:07 [Coke] rakudo: my $Foo = <a b c>; my $Bar = <1 2 3> ; say (Foo X=> Bar).perl
04:07 p6eval rakudo 87e0e1: OUTPUT«Could not find sub &Bar␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
04:07 [Coke] rakudo: my $Foo = <a b c>; my $Bar = <1 2 3> ; say ($Foo X=> $Bar).perl
04:07 p6eval rakudo 87e0e1: OUTPUT«("a" => "1", "a" => "2", "a" => "3", "b" => "1", "b" => "2", "b" => "3", "c" => "1", "c" => "2", "c" => "3")␤»
04:09 [Coke] Should the enum case also work?
04:10 eternaleye Probably, but I don't think they're fully implemented yet
04:11 eternaleye rakudo: my constant Foo = <a b c>; my constant Bar = <1 2 3>; say (Foo X=> Bar).perl
04:11 p6eval rakudo 87e0e1: OUTPUT«Malformed my at line 11, near "constant F"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
04:11 eternaleye rakudo: constant Foo = <a b c>; constant Bar = <1 2 3>; say (Foo X=> Bar).perl
04:11 p6eval rakudo 87e0e1: OUTPUT«Could not find sub &Foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
04:12 * [Coke] gives up an falls back on masak's DIY::Enum class.
04:20 lue Is there some cool perl way to search for files that don't have string 'xyz' and then put 'xyz' in there? [searching]
04:20 sorear where would you put it?
04:21 lue in each file w/o that string (inplace editing)
04:22 jql you mean something like for i in `find . -type f | xargs grep -l xyz`; do echo xyz >> $i; done ?
04:22 lue I can search for a string in a directory of files, and then do a substitution.
04:22 lue I don't know how to get a list of files *without* a certain term.
04:23 lue ( some "person" forgot to put needed #include lines in a bunch of c files :( )
04:23 jql perhaps xargs grep -L xyz ?
04:24 lue that's a good start!
04:25 * lue goes googling for "files without match" one liners
04:27 lue hopefully I get out of this hole soon, or I'll have to write a whole perl script file to make it easier on myself! Thank you everyone!
04:49 snarkyboojum joined #perl6
04:54 kaare joined #perl6
04:57 pencilk joined #perl6
05:04 xinming_ joined #perl6
05:14 [Coke] joined #perl6
05:14 mberends joined #perl6
05:20 pencilk joined #perl6
05:59 finanalyst joined #perl6
06:07 finanalyst rakudo: my @x=10,NaN,8,18; say @x.comb(/\d+/).min; say @x.comb(/\d+/).max
06:07 p6eval rakudo 87e0e1: OUTPUT«10␤8␤»
06:07 finanalyst Can anyone tell me how to get min and max in above to compare numified matches?
06:08 moritz_ ».Numeric.max
06:09 moritz_ alpha: rakudo: my @x=10,NaN,8,18; say @x.comb(/\d+/)».Num.min
06:09 p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near ": my @x=10"␤in Main (file <unknown>, line <unknown>)␤»
06:09 moritz_ alpha: my @x=10,NaN,8,18; say @x.comb(/\d+/)».Num.min
06:09 p6eval alpha 30e0ed: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤»
06:10 moritz_ rakudo: my @x=10,NaN,8,18; say @x.comb(/\d+/).map({+$_}).min
06:10 p6eval rakudo 87e0e1: OUTPUT«8␤»
06:11 moritz_ rakudo: my @x=10,NaN,8,18; say @x.comb(/\d+/).min({$^a <=> $^b})
06:11 p6eval rakudo 87e0e1: OUTPUT«8␤»
06:11 finanalyst oh good. hypotheticals are working
06:12 finanalyst i think $^ == hypotheticals
06:13 finanalyst moritz_: good morning. Are $^a etc working in all contexts?
06:14 moritz_ not hypothetical
06:14 moritz_ formal parameters
06:15 uniejo joined #perl6
06:16 finanalyst it seems formal parameters are now working again.
06:16 finanalyst rakudo: my @x=1,2,3,4,5,6,7,8; my %h= map {1; $^y => $^x },@x; say %h.perl
06:16 spinclad joined #perl6
06:16 p6eval rakudo 87e0e1: OUTPUT«{"2" => 1, "4" => 3, "6" => 5, "8" => 7}␤»
06:25 Su-Shee joined #perl6
06:36 mantovani joined #perl6
06:37 iblechbot joined #perl6
06:38 moritz_ does anybody else get passing TODOs in inifinity.t and nan.t?
07:00 Grrrr joined #perl6
07:05 am0c joined #perl6
07:08 BrowserUk joined #perl6
07:34 kaare joined #perl6
07:48 uniejo joined #perl6
07:49 constant joined #perl6
07:49 constant joined #perl6
08:01 meppl joined #perl6
08:25 am0c joined #perl6
08:37 envi^home joined #perl6
09:03 Trashlord joined #perl6
09:12 viklund joined #perl6
09:25 snarkyboojum joined #perl6
09:39 jnthn morning
09:40 moritz_ o/
09:48 mberends o/ jnthn
09:49 jnthn mberends: o/
10:21 colomon joined #perl6
10:42 am0c joined #perl6
10:50 mj41 joined #perl6
10:53 k23z__ joined #perl6
10:53 k23z__ joined #perl6
10:56 arnsholt joined #perl6
10:56 mj41 joined #perl6
10:58 eternaleye joined #perl6
10:58 hejki joined #perl6
10:58 PerlJam joined #perl6
10:59 viklund joined #perl6
10:59 Su-Shee joined #perl6
10:59 meteorjay joined #perl6
10:59 jotr^outtahere joined #perl6
11:07 finanalyst joined #perl6
11:24 colomon moritz_: ping?
11:31 proller joined #perl6
11:31 moritz_ colomon: pong
11:32 moritz_ (back from nom)
11:38 ruoso joined #perl6
11:38 JimmyZ joined #perl6
11:43 moritz_ .oO( ping timeout >)
11:58 colomon moritz_: I suggested adding subst functionality as a possible newcomer project.
11:58 colomon Thoughts?  I think we just ought to go ahead and implement it ourselves if we don't make it a challenge this week or maybe next.
11:59 moritz_ colomon: which subst functionality are you thinking of?
11:59 moritz_ I like the idea
11:59 colomon I don't remember where I found it in the spec now.
12:00 colomon but I think there is :nth
12:00 colomon and :c
12:00 moritz_ S05
12:00 colomon Ah, I was there, but I did a search for sdubst
12:00 colomon :)
12:01 moritz_ http://perlcabal.org/syn/S05.html#Modifiers
12:01 colomon actually, as far as I know, it doesn't support :i or :a yet either.
12:02 moritz_ :i is tricky
12:02 moritz_ because you have to modify the regex after it was compiled
12:02 moritz_ but :nth would be a good idea
12:02 moritz_ rakudo: say 'abcdef'.subst(/./, 'O', :x(3))
12:02 p6eval rakudo 87e0e1: OUTPUT«OOOdef␤»
12:03 moritz_ colomon: could you write up the proposal?
12:03 colomon think I can find time here.
12:04 moritz_ great
12:05 TiMBuS joined #perl6
12:05 colomon Now trying to figure out how much of this stuff is practical.
12:06 moritz_ just one, I'd say
12:06 moritz_ having it interact with :x() is already sufficiently complicated
12:07 colomon just :nth?
12:07 moritz_ just :nth
12:07 colomon okay, I'll take a look at your previous ones in a minute and see what I can come up with.
12:13 moritz_ (maybe plus tests, if there aren't any good ones yet)
12:13 moritz_ rakudo: say 'abc'.subst(/./, 'O', :x(3))
12:13 p6eval rakudo 87e0e1: OUTPUT«OOO␤»
12:13 orafu joined #perl6
12:13 moritz_ that's wrong, according to the specs
12:14 colomon how so/
12:14 moritz_ but I don't really know if the current spec makes sense and is practical
12:14 colomon ?
12:14 moritz_ "except that the string is unchanged unless all four matches are found"
12:14 colomon .oO(must admit I find this section of the specs a bit wonky)
12:14 colomon but you did three
12:15 colomon rakudo: say 'abc'.subst(/./, 'O', :x(4))
12:15 p6eval rakudo 87e0e1: OUTPUT«abc␤»
12:15 moritz_ oh
12:15 * moritz_ can't count
12:15 colomon still seems like an amazing amount of magic is being packed into .subst
12:16 colomon rakudo: say 'abc'.subst(/./, 'O', :x(2..5))
12:16 p6eval rakudo 87e0e1: OUTPUT«abc␤»
12:16 colomon that's wrong, for sure.
12:18 pmichaud in general, .subst wants to be written in terms of .match
12:18 phenny pmichaud: 16 May 23:07Z <bkeeler> tell pmichaud if you're in a reviewing mood, there's now a 'regex-interpolation' branch in nqp-rx
12:18 moritz_ this is going to be such a pain
12:18 pmichaud good morning, #perl6
12:18 colomon o/
12:19 moritz_ pmichaud: then .match should be extended to allow string patterns (and not regexes)
12:19 moritz_ otherwise it's going to be a PITA to implement
12:19 moritz_ because .subst allows both
12:20 pmichaud I wouldn't have an issue with that.
12:20 colomon other problem here is that subst is implemented in terms of .split (which is implemented in terms of .match)
12:20 pmichaud ...why is .subst implemented in terms of split?  that seems very wrongish
12:20 moritz_ pmichaud: is there a simplish way to compile a regex that does a literal match?
12:21 moritz_ pmichaud: because .split() does a bit of pre-work that early versions of .subst need
12:21 colomon pmichaud: you split on all the matches, keeping the matches, then change the matches and rejoin.
12:21 pmichaud does split take :x, and :n, and the like?
12:21 colomon it's a very natural way of implementing it.
12:21 moritz_ including matching constant substrings
12:22 colomon pmichaud: don't think so, .subst seems to implement :x directly.
12:22 moritz_ but I agree that .subst should use .match more directly
12:22 colomon and there is no :nth yet.
12:22 pmichaud .match takes :x, :n, etc.
12:22 pmichaud which is why it's more natural to use it
12:22 pmichaud also, .match takes :g, like split
12:22 pmichaud sorry, like subst
12:22 pmichaud it's _very_ natural to write .subst in terms of .match
12:23 moritz_ so
12:23 moritz_ the best way forward would be implement .match with literal strings
12:24 moritz_ and then .subst in terms of .match
12:24 colomon and forget about :nth as a challenge.
12:24 pmichaud :nth isn't really that hard either.  alpha did it.
12:24 pmichaud (iirc)
12:24 moritz_ colomon: or do that change today, and make :nth a challenge tomorrow
12:25 colomon pmichaud: challenge in the sense of one of moritz_'s newcomer challenges
12:25 pmichaud at any rate, .split in terms of .match is the way that nqp-setting works
12:25 colomon ie something easy enough a newbie can do it.
12:25 pmichaud and you can see that it's really pretty straightforward
12:25 pmichaud basically, call match, then replace each of the returned match objects with the replacement
12:25 colomon for what it's worth, match doesn't appear to support :x or :n (:nth?) yet
12:26 moritz_ nqp: say(join(';', split('ab', 'cabcabd')))
12:26 p6eval nqp: OUTPUT«Could not find sub split␤current instr.: '_block11' pc 0 (EVAL_1:4)␤»
12:26 colomon afk # diaper
12:26 pmichaud sorry, .subst is implemented in terms of .match
12:26 pmichaud (I typoed above)
12:26 pmichaud also note that nqp-setting isn't loaded automatically
12:26 pmichaud we need to change the name, because people seem to assume that it is
12:27 moritz_ stdlib
12:28 pmichaud colomon: S05:3726 mentions that repeated matches can have the :x flag
12:34 colomon pmichaud: I'm not talking theory, I'm talking code....
12:35 colomon significant work is required on .match before it can do what .subst already does.
12:35 colomon unless there's something I'm missing here....
12:37 mberends hmm, when PERL6LIB is used to define new module search directories, they are appended behind the predefined ones. During module development, it would be useful to have the local directories before the predefined ones, otherwise the installed modules get used instead of the local ones. Is it ok if I change the order?
12:38 moritz_ +1 from me
12:39 mberends thanks, just hoping this does not ignore some other conceptual idea
12:43 pmichaud colomon: we'll have to have significant work on .match anyway, then
12:43 colomon pmichaud: sure enough.
12:46 Su-Shee so using Roles properly.. Would my Member class do Creation (Role to create a new Member) and do Change and do Deletion?
12:47 moritz_ I'd consider Creation basic enough not put it in a role, but in class itself... unless you're doing something very fancy in there
12:49 Su-Shee hm. same with Deletion and Change?
12:50 colomon moritz_: perhaps the challenge for this week should be to do better tests for .match?  I don't see any sign that :x or :nth are tested there yet...
12:50 pmichaud :x, :nth, :g   are the major ones
12:50 * hugme hugs pmichaud, good vi(m) user!
12:51 pmichaud also :overlap, ;exhaustive
12:51 moritz_ colomon: +1
12:52 colomon I'm not quite sure where the tests should go -- just that we don't implement the features yet, and don't appear to have nearly enough skips in S05-match to account for them!
12:56 pmichaud has anyone tried building Rakudo on parrot trunk lately?  We should probably do that since Parrot release is tomorrow
12:56 jnthn pmichaud: I'm working on $dayjob atm, but can set off a build / test run on latest Parrot trunk in the background.
12:56 * jnthn does so
12:57 pmichaud and colomon++ is our most esteemed Release Manager this month.  \o/
12:57 colomon and starting to get nervous about it.  :)
12:57 moritz_ pmichaud: did so yesterday, worked just fine...
12:58 pmichaud nothing to be nervous about UNLESS YOU SCREW IT UP.  :-P :-P
12:58 moritz_ pmichaud: apart from the occasional non-zero exist status, and the occasional segfault that I've already reported to the parrot people
12:58 pmichaud moritz_: excellent, glad you're keeping us up-to-date
12:59 pmichaud colomon: picked a release name yet?
12:59 colomon woah, we basically have no tests for .match at all!  just 5 total.
12:59 colomon pmichaud: no, and that's probably the hard part, isn't it?  ;)
12:59 pmichaud colomon: it often is, yes.
12:59 moritz_ colomon: that's easy, you can name Erlangen.pm
12:59 moritz_ colomon: after my home .pm group where I held a Perl 6 talk this month
13:00 colomon sounds good to me.  any objections?
13:00 pmichaud wfm
13:00 pmichaud here in Dallas we have a Perl 6 meeting every month
13:00 pmichaud although it's not actually held in Dallas :-P
13:01 moritz_ did we alrady have a Dallas.pm release?
13:02 patrickas joined #perl6
13:02 pmichaud no, not yet
13:03 pmichaud but the Dallas folks haven't felt like they're ready for a Dallas.pm release :-)
13:03 pmichaud in fact, there's not really an official Dallas.pm yet -- it's DFW.pm
13:03 pmichaud and there hasn't been a meeting of DFW.pm in a very very long time
13:09 plobsing joined #perl6
13:09 hatseflats joined #perl6
13:10 hatseflats joined #perl6
13:11 pnu joined #perl6
13:15 colomon wow.  S05-modifier has ~24 test files.
13:15 colomon spectest.data only lists five of them.
13:15 colomon and all five are commented out.
13:18 colomon Am I correct in thinking we should be testing .match as well as m// ?
13:18 moritz_ yeas
13:18 moritz_ s/a//
13:19 * [Coke] thinks parrot actually has a bunch of match-like tests that PGE used, fwiw.
13:20 molaf joined #perl6
13:20 colomon we've also got hundreds (thousands?) of m// tests, many of them very turned off.
13:21 colomon rakudo: "hello world" ~~ m:x(3)/o/
13:21 p6eval rakudo 87e0e1: OUTPUT«Confused at line 11, near "\"hello wor"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
13:21 moritz_ quoting adverbs are NYI
13:21 moritz_ my naive attempts to implement them have failed while trying to parse the setting
13:25 XaeroOne joined #perl6
13:30 hirschnase joined #perl6
13:40 lisppaste3 colomon pasted "draft of this week's contribution to perl 6" at http://paste.lisp.org/display/99336
13:42 moritz_ colomon: it's nice, but it's too abstract
13:42 moritz_ "create tests for"
13:42 moritz_ what kind of tests?
13:42 moritz_ more concrete would be
13:43 moritz_ tests @these modifiers
13:43 moritz_ with a simple string and regex
13:43 moritz_ and have for each (combination of) modifier(s) at least one test for matching, and one for non-matching
13:44 colomon I was thinking more in terms of translating the exist tests to the new form.
13:44 colomon though I meant to include an example, I admit.
13:44 moritz_ ok
13:44 moritz_ then be specific about the file names, for example
13:45 moritz_ (don't worry about HTML escaping code snippets, my blog has a shortcut for that)
13:45 colomon crap, this section of the spectest is a horrible mess.
13:45 colomon we don't really have any :g tests as far as I can see, which is a shame, as that is a simple example.
13:46 Su-Shee I hereby petition for the removal of Roles. they're confusing me. ;)
13:47 moritz_ petition rejected.
13:47 moritz_ wow, that was fast :-)
13:47 rv2733 joined #perl6
13:47 colomon rakudo: "hello world".match(/o/); say $/
13:47 p6eval rakudo 87e0e1: OUTPUT«Any()␤»
13:48 colomon rakudo: say "hello world".match(/o/);
13:48 p6eval rakudo 87e0e1: OUTPUT«o␤»
13:49 isBEKaml joined #perl6
13:50 isBEKaml hello, #perl6!
13:50 colomon \o
13:51 isBEKaml what's news? (yeah, I'm looking at backlogs. :) )
13:52 colomon moritz_: I think the tests may be so badly broken that this is a bad challenge.  :(
13:52 moritz_ :(
13:53 colomon the :x tests (in S05-modifier/counted.t) for instance, appear to be all wrong to me.
13:53 isBEKaml colomon: challenge? Is there ever one? :)
13:54 colomon isBEKaml: we're talking about moritz_'s "This Week's Contribution to Perl 6" series.
13:54 colomon I proposed one and wrote it up, but I'm now thinking it's too nebulous and hard.
13:54 isBEKaml colomon: hmm, I don't see it on moritz_'s blog...
13:55 colomon http://paste.lisp.org/display/99336
13:55 colomon we hadn't gotten to the stage of actually blogging it yet.
13:55 Trashlord joined #perl6
13:56 isBEKaml last week, it was just one. This week it evolved into a lot!
13:57 isBEKaml I was actually thinking I could, maybe, try to port some already ported module just for kicks (+ learnings)
13:58 isBEKaml I find it hard to sit around with the synopses.
13:59 colomon isBEKaml: me too.
13:59 colomon too much detail unless you're actively looking for that detail.
13:59 jnthn Same. They take up the WHOLE sofa after I print them out.
13:59 jnthn ;-)
14:00 isBEKaml jnthn: wasting the ink needlessly.. ;)
14:00 SmokeMachine joined #perl6
14:01 isBEKaml colomon: match is too much functionality for a single challenge. And, you're right, it's nebulous.
14:02 isBEKaml colomon: It's not just about running the same set of tests as in ~~m, right?
14:02 colomon well, it is, sort of.
14:02 colomon but they need to be rewritten to work as match tests.
14:03 colomon the bigger problem is that almost none of these tests work at the moment.
14:03 isBEKaml wow, you got trouble enough not to trouble the newbie challenge warrior. ;)
14:03 colomon I wouldn't be surprised if getting m// and match working fully with a reasonably full test suite will get us another thousand working tests.
14:04 moritz_ both can take huge numbers of combinations of modifiers
14:04 colomon moritz_: is there some reason I'm not seeing, or is getting match to work on Str as simple as wrapping the Str in //
14:05 colomon I don't even think we're close to having tests for the combinations yet!
14:05 isBEKaml moritz_: that was what I was thinking when I said too much functionality for a single challenge.
14:05 moritz_ colomon: you're right - I forgot that variable interpolation was working in regexes
14:05 colomon isBEKaml: I was anticipating that multiple people might tackle it, and tackle different aspects of the problem.
14:06 colomon rakudo: my $a = "o"; say "hello world".match(/$a/)
14:06 p6eval rakudo 87e0e1: OUTPUT«␤»
14:06 colomon or does it?
14:07 colomon that can't be the syntax, can it?
14:07 colomon rakudo: my $a = "o"; say "hello world".match(/{$a}/)
14:07 p6eval rakudo 87e0e1: OUTPUT«␤»
14:08 colomon rakudo: my $a = "o"; say "hello world".match(rx/{$a}/)
14:08 p6eval rakudo 87e0e1: OUTPUT«␤»
14:08 moritz_ rakudo: my $x = 'o'; say 'hello' ~~ /$x/
14:08 p6eval rakudo 87e0e1: OUTPUT«␤»
14:08 moritz_ not working
14:08 PacoLinux joined #perl6
14:09 colomon wait, interpolation wouldn't work anyway, would it?
14:09 colomon special characters have to be escaped, etc.
14:09 moritz_ that's part of the new (non-)interpolation
14:09 moritz_ it's not first interpolated and then compiled, but rather handed as a variable to the regex engine
14:10 moritz_ which takes a non-regex variable as a literal
14:10 isBEKaml what does this mean ~~ ?
14:10 rgrau joined #perl6
14:11 isBEKaml rakudo: my $a = 'o'; my $match = "hello world"; say $match ~~ $a;
14:11 p6eval rakudo 87e0e1: OUTPUT«0␤»
14:11 isBEKaml rakudo: my $a = 'o'; my $match = "hello world"; say $match ~~ /$a/;
14:11 p6eval rakudo 87e0e1: OUTPUT«␤»
14:11 isBEKaml :(
14:11 colomon isBEKaml: smartmatch with a string is just string equality, I think.
14:12 isBEKaml rakudo: my $a = 'o'; my $match = "hello world"; say $match ~~ /$match/;
14:12 p6eval rakudo 87e0e1: OUTPUT«␤»
14:12 isBEKaml rakudo: my $a = 'o'; my $match = "hello world"; say $match ~~ $match;
14:12 p6eval rakudo 87e0e1: OUTPUT«1␤»
14:12 isBEKaml colomon: sounds like you're right. Don't they take regexes in // ?
14:13 isBEKaml btw, what equivalent do we have for $str =~ /$pattern/ as in p5?
14:14 jaffa4 joined #perl6
14:14 isBEKaml rakudo: my $pattern="o"; my $str="hello world"; say $str =~ /$pattern/;
14:14 p6eval rakudo 87e0e1: OUTPUT«Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 11, near " /$pattern"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
14:17 isBEKaml rakudo: my $pattern="o"; my $str="hello world"; say $str.match('o');
14:17 p6eval rakudo 87e0e1: OUTPUT«No applicable candidates found to dispatch to for 'match'. Available candidates are:␤:(Mu : Regex $pat, Any :c($c) = { ... }, Any :g($g);; *%_)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:17 isBEKaml rakudo: my $pattern="o"; my $str="hello world"; say $str.match(/o/);
14:17 p6eval rakudo 87e0e1: OUTPUT«o␤»
14:17 isBEKaml variable interpolation doesn't work in // ?
14:17 colomon isBEKaml: that's what moritz_ and I were trying to figure out.
14:18 isBEKaml oh..
14:18 jnthn bkeeler++ recently sent in an updated patch to get it working, iirc. It's just waiting on review from pmichaud++ now. :-)
14:19 moritz_ speaking of review...
14:19 isBEKaml Ah, I see it now.. nqp-rx's regex interpolation branch..
14:20 moritz_ jnthn: do you have a chance to look at the mob4 branch?
14:20 patspam joined #perl6
14:20 jnthn moritz_: No, not yet. I had some tuits yesterday, but spent them reviewing/doing some bits on book instead.
14:20 moritz_ ok
14:20 jnthn moritz_: Should have more tuits this evening though. :-)
14:20 moritz_ jnthn: ok
14:23 moritz_ the last commit adds cheating methods in the vtables - trying to have those actually call .'postcircumfix:<{ }>' is what leads to infinite loops
14:27 isBEKaml moritz_: the style changes I made for u4x docs would work only on firefox(especially those rounded borders). Feel free to spruce them up for other browsers. I can't do them here since I don't have anything other than firefox. :(
14:28 isBEKaml gack... s/work (only)/look nice $1/
14:28 moritz_ that's ok; others will chime in if their favourite browser doesn't produce nice output
14:29 isBEKaml no problem on text only browsers, though. ;)
14:36 colomon moritz_: just started a simple test file for match(//, :g)
14:36 colomon it miserably fails my first simple test.
14:36 colomon I think it may be borked.
14:36 colomon rakudo: "hello world".match(/.o/, :g).perl.say
14:36 p6eval rakudo 87e0e1: OUTPUT«Method 'perl' not found for invocant of class 'Regex;Match'␤current instr.: 'perl6;Iterator;_block16114' pc 471375 (src/gen/core.pir:64441)␤»
14:37 colomon rakudo: ("hello world".match(/.o/, :g)>>.Str).say
14:37 p6eval rakudo 87e0e1: OUTPUT«wo␤»
14:37 colomon rakudo: "hello world".match(/.o/, :g).elems
14:37 p6eval rakudo 87e0e1:  ( no output )
14:37 colomon rakudo: +("hello world".match(/.o/, :g))
14:37 p6eval rakudo 87e0e1:  ( no output )
14:37 colomon rakudo: "hello world".match(/.o/, :g).elems.say
14:37 p6eval rakudo 87e0e1: OUTPUT«2␤»
14:38 moritz_ so the first match disappears?
14:38 colomon take issue
14:38 colomon I'm testing a fix now.
14:38 isBEKaml colomon: gatheriterators are fixed? I mean, their fragile behaviour of outputting next iteration on their single call?
14:38 moritz_ take my $m = ...;
14:38 moritz_ isBEKaml: don't think so
14:39 isBEKaml colomon: that is, GatherIterator.perl puts out the first element and say doesn't find any..
14:39 colomon key point here is it probably never worked post-alpha.
14:39 colomon serious testing failure.
14:40 XaeroOne joined #perl6
14:40 colomon isBEKaml: gather iterators are still the same, but that's okay, perl should consume them and leave a string for say.
14:40 colomon (test passes, check-ins soon.)
14:40 colomon well, post spec test.
14:40 isBEKaml colomon: ok
14:43 pugssvn r30666 | colomon++ | [t/spec] First simple tests for match's :g functionality.
14:45 ashleydev joined #perl6
14:46 jnthn Rakudo on latest Parrot appears to have some new test failures.
14:46 jnthn Worth somebody else checking.
14:47 jnthn Oh ouch
14:47 jnthn And it hangs during the integration tests.
14:47 moritz_ trying now
14:47 colomon building on linux box...
14:48 jnthn Fails in pick.t, Date.t, and 99-problems is the source of some fails + the hangs (two of them hang, it seems).
14:49 colomon pick.t?  that seems like an odd one to fail...
14:49 moritz_ so is Date.t
14:49 jnthn series-arity0.t also seems to have some
14:49 jnthn t\spec\S03-operators\series-arity0.t
14:49 jnthn Failed: 4)
14:49 jnthn Failed tests:  5, 7-8, 10
14:49 colomon :\
14:51 moritz_ jnthn: please email the test results to parrot-dev (asks whitenight, the release manager for tomorrow)
14:52 ash_ joined #perl6
14:56 colomon jnthn: on my 64-bit linux box, series-arity0.t works fine.
14:56 colomon pick.t seems fine as well.
14:57 colomon parrot revision 46739?
14:58 jnthn I had 46737
14:59 colomon worth trying the update, maybe?
14:59 * colomon decides it might be time to pay himself this month...
15:00 jnthn colomon: Will try; will also nuke my Parrot tree
15:00 masonkramer joined #perl6
15:01 moritz_ Date.t passed here
15:01 jnthn Oddness
15:02 jnthn Hopefully a clean Parrot at the later revision does it.
15:04 colomon hope++
15:05 jnthn change++
15:05 jnthn oh, wait, the election campaign is over
15:05 jnthn :-)
15:05 colomon change is scary.
15:05 Su-Shee fuckshit, roles are cool. :)
15:05 mberends Su-Shee.flip()
15:05 ash_ do you guys need another person to try these tests?
15:06 isBEKaml change is the only constant :)
15:06 colomon jnthn: any chance you could hook up the modifiers to m// and s// if "we" got them working in .match and .subst?
15:06 Su-Shee mberends: I'm short before hysteria and wrote like 6 versions in one day :) (in 5 _and_ 6 :)
15:06 colomon ash_: we've got three people on it already, so probably not.
15:06 jnthn colomon: I can't certainly try.
15:07 moritz_ Result: PASS
15:07 jnthn 64?
15:07 moritz_ parrot r46738 on 64bit linux
15:08 jnthn heh, I'm the 32-bitter amongst us. :-)
15:08 isBEKaml guys, I got 32 bit linux, can I help?
15:08 jnthn isBEKaml: Don't worry just yet.
15:08 jnthn If I get another pile of fail, then could be interesting for someone else on 32-bit to try though.
15:08 isBEKaml jnthn: Ah, cool. I can wait.
15:09 * jnthn needs a break from his locking/timing/threading debugging
15:09 jnthn walk, bbiab
15:12 molaf joined #perl6
15:13 pmurias joined #perl6
15:15 colomon my 64-bit linux spectest run on latest parrot actually comes back PASS with two todo's passing.
15:16 molaf joined #perl6
15:19 dalek rakudo: 96fbd6f | (Solomon Foster)++ | t/spectest.data:
15:19 dalek rakudo: Turn on the new S05-modifier/global.t.
15:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/96fbd6fb500d7c333496bf9fbfcb57fb5d176838
15:19 dalek rakudo: ec37acc | (Solomon Foster)++ | src/core/Cool-str.pm:
15:19 dalek rakudo: In .match's global path, copy the match variable, then call "take" with the
15:19 dalek rakudo: copy.
15:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ec37accfda6533d2d926abfdec8e038a7e41fcf6
15:23 am0c joined #perl6
15:24 pencilk joined #perl6
15:28 * [Coke] wishes we had a CABBAGE_PATCH.
15:33 pmurias diakopter: hi
15:33 ashleydev joined #perl6
15:39 jnthn grr
15:39 jnthn No, fails here again :-(
15:39 colomon that's with the even more updated parrot?
15:40 jnthn Same two integration tests hung too. Up to 650 MB a piece before I just killed them.
15:40 jnthn Yeah
15:40 * moritz_ always thought "no fails" were good
15:40 [Coke] jnthn: standard "did you realclean" ?
15:40 jnthn [Coke]: I nuked my Parrot tree and got a clean check out just in case.
15:40 colomon want me to take a stab at it on one of my 32-bit machines, to see if I can duplicate?
15:40 jnthn Could be worthwhile.
15:41 colomon I'll use the 32-bit linux server, it does ... er, no git.
15:41 jnthn oh hmm, I had a local patch
15:41 jnthn That removed some debug code.
15:41 * jnthn gets rid of that Just In Case.
15:42 colomon ack, just realized that I have the same problem with linux installs as I do with bassoon reeds -- so long between times I forget what distribution / reed-maker was involved.
15:42 [Coke] jnthn: *shakes fist*
15:42 [Coke] (hopefully that was it)
15:42 colomon okay, the 32-bit guy does seem to have apt-get, I'll take that as a sign.
15:43 moritz_ apt-get++
15:43 moritz_ cat /etc/debian_version
15:44 colomon moritz_: 5.0.3
15:44 colomon bother.  going to wait for jnthn to make progress before trying to get this all sorted out on this machine.  :(
15:44 moritz_ hey, that's non-ancient :-)
15:45 isBEKaml I thought so too. I always seen Debian servers going one down below the latest, but updating all security patches. ;)
15:45 colomon headless linux boxes should be better at indicating what distribution you are using.
15:46 isBEKaml all linux boxen are better at indicating their versions in subtle ways. ;)
15:46 [mark] joined #perl6
15:46 isBEKaml jnthn: I'm still building the latest Rakudo, so will have to wait until I get them up.
15:47 isBEKaml jnthn: Ok, I'm done. run make spectests?
15:47 jnthn [Coke]: I hoped so too. Sadly, the first extra fail I had, t\spec\S03-operators\series-arity0.t, still fails with my Rakudo tree clean bar the version bump
15:48 jnthn isBEKaml: Yes, please.
15:48 alester joined #perl6
15:49 isBEKaml jnthn: ok, running it.
15:49 ash__ joined #perl6
15:50 gbacon_ joined #perl6
15:53 isBEKaml infinity succeeded. 1/13 unexpectedly succeeded. do you see this?
15:53 isBEKaml nan too. 1/7
15:54 cdarroch joined #perl6
15:54 * moritz_ saw the same
15:54 cdarroch joined #perl6
15:54 colomon isBEKaml: I got those as well.
15:56 justatheory joined #perl6
16:00 isBEKaml S02 pid failed.
16:01 pencilk joined #perl6
16:01 isBEKaml It's not fail first. It's still going on ahead with the rest?
16:01 isBEKaml ??
16:02 colomon rakudo: ~($string.match(/.a/))
16:02 p6eval rakudo 87e0e1: OUTPUT«Symbol '$string' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
16:02 colomon rakudo: ~("1a2a3a".match(/.a/))
16:02 p6eval rakudo 87e0e1:  ( no output )
16:02 colomon rakudo: ~("1a2a3a".match(/.a/)).say
16:02 p6eval rakudo 87e0e1: OUTPUT«Method 'say' not found for invocant of class 'Regex;Match'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:02 colomon rakudo: say ~("1a2a3a".match(/.a/))
16:02 p6eval rakudo 87e0e1: OUTPUT«1a␤»
16:02 colomon rakudo: say ~("1a2a3a".match(/.a/, :c))
16:02 p6eval rakudo 87e0e1: OUTPUT«2a␤»
16:03 colomon question for the wise:
16:03 pencilk joined #perl6
16:03 colomon m:c// is supposed to pick up starting from $/.to
16:04 colomon should .match(:c) also do so?
16:08 pugssvn r30667 | lwall++ | [S05] Disrequire retroactive semantics on :ii and :aa
16:11 TimToady the question is whether that's also retroactive semantics, like we just undid on :ii and :aa
16:12 TimToady it doesn't seem as though the regex must be compiled differently, so maybe it's okay
16:12 TimToady assuming that the implied .*? is on the outside of it
16:12 TimToady certainly setting the start position can be done externally
16:12 TimToady so :p is always fine
16:13 TimToady thing is, though, that with the method form, you probably have to pass :p($/.to) explicitly
16:13 pmichaud TimToady++ # r30667 YAY!
16:14 TimToady or :p has to have a param like :$p = CALLER::<$/>.to
16:15 TimToady hmm, that doesn't work
16:15 TimToady at all
16:15 TimToady :p returns True
16:16 TimToady so I think we have to require an arg on :p in the method form
16:16 TimToady and, by extension, :c
16:16 TimToady colomon: ^^
16:17 isBEKaml jnthn: series-arity0 seems to pass here...
16:17 jnthn OK
16:17 jnthn I got fail again, and the hangs on the integration tests.
16:17 jnthn Maybe it's Win32-specific or something.
16:17 jnthn Or my-box specific... :-/
16:18 isBEKaml could be worth checking on another win32 box..
16:18 jnthn aye
16:18 jnthn will do a run on my laptop later
16:19 isBEKaml one difference, though. I got r46740 of parrot.
16:22 colomon TimToady: that came out as a crazy series of smileys on my machine.  :)
16:23 colomon :c and :p require args in method form, is that the upshot?  no implicit $/   ?
16:23 colomon \o/
16:23 pugssvn r30668 | lwall++ | [S05] typo
16:27 colomon rakudo: sub foo(:$a) { say $a.WHAT; say $a.perl; };  foo(:a)
16:27 p6eval rakudo 87e0e1: OUTPUT«Bool()␤Bool::True␤»
16:29 colomon rakudo: sub foo(:$a) { say $a.WHAT; say $a.perl; };  foo(:a(4))
16:29 p6eval rakudo 87e0e1: OUTPUT«Int()␤4␤»
16:37 TimToady I suppose it would be *possible* to distinguish a Bool::True from a 1
16:39 iblechbot joined #perl6
16:39 colomon TimToady: sure, that's not a problem.
16:39 colomon not just possible, but easy
16:40 colomon rakudo: sub foo(:$a) { say $a.WHAT; say $a.perl; };  foo()
16:40 p6eval rakudo 87e0e1: OUTPUT«Any()␤Any␤»
16:44 Juerd I'm considering terminating feather0
16:44 moritz_ uh
16:45 Juerd I would move feather1..3 to one of the TNX physical machines.
16:46 moritz_ why? maintenance nightmare?
16:48 Juerd Energy efficiency
16:48 moritz_ ok
16:48 Juerd We're running into cooling problems. One of the easiest way to deal with this, is to get rid of some of the heaters :)
16:49 Juerd It's less costly to buy nice new machines and migrate a few existing boxes over, than to upgrade cooling.
16:50 moritz_ ah, and new  == more efficient
16:50 Juerd A great side effect is that everything becomes faster for everyone.
16:50 * jnthn warms to the idea
16:51 Juerd jnthn: Not too much I hope
16:51 * isBEKaml cools to the idea. ;)
16:51 Juerd jnthn: It's pretty hot where feather lives, already
16:51 jnthn Juerd: It's OK, I'm warming up many kilometers away from your data center. :-)
16:51 Juerd I'm not sure if IRC is such a good insulator
16:52 isBEKaml uh, didn't I modulate the temperature?
16:52 pyrimidine joined #perl6
16:52 Juerd Modulate temperature?
16:53 Juerd Signalling with flames?
16:53 isBEKaml erm, ice?
16:56 moritz_ flames and ice? iceland? volcanos?
16:57 jnthn Shhh. :P
16:58 jnthn .oO( at least I don't have any more flights for a few weeks )
17:05 pugssvn r30669 | moritz++ | [t/spec] truncate() now properly handles NaN in Rakudo
17:05 isBEKaml jnthn: which ones are the integration tests? I don't find them on spectest.data ?
17:06 moritz_ grep integration t/spectest.data
17:06 isBEKaml Right now, I'm on S-32 array bool
17:07 isBEKaml moritz_: aw, I didn't search the file. I thought they came in order and went on to the end of doc. :D
17:08 moritz_ they come in order, but "order" depends on the system
17:08 moritz_ rakudo: say 'S' lt 'i'
17:08 p6eval rakudo 96fbd6: OUTPUT«1␤»
17:08 [Coke] masak's subset FullHouse of Any where OnePair & ThreeOfAKind;
17:09 [Coke] in his poker example seems to trigger even on the pair.
17:09 moritz_ try
17:09 moritz_ where { ($_ ~~ OnePair) && ($_ ~~ ThreeOfAKind) }
17:09 moritz_ there's a known, reported bug wrt smartmatching &-junctions
17:10 moritz_ (iirc)
17:10 Juerd I could buy one new shiny box, merge the virtual machines from feather0 and two other machines onto it, and the entire operation would pay for itself in just two years
17:10 [Coke] yah, that's my workaround. danke.
17:11 Juerd The last feather upgrade was 2 years ago, and that was after it had been online for 2 years
17:11 Juerd That's a nice steady pace :)
17:18 moritz_ std: class A { multi a($.uri) }
17:18 p6eval std 30668: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/G6eiT7OovV line 1:␤------> [32mclass A { multi a($.uri) [33m⏏[31m}[0m␤    expecting any of:␤        routine_def␤      trait␤Parse failed␤FAILED 00:01 115m␤»
17:18 moritz_ std: class A { multi a($.uri) { } }
17:18 p6eval std 30668: OUTPUT«ok 00:01 112m␤»
17:34 [Coke] ugh. these DIY enums make it very difficult to write this poker example cleanly. (beats having non-functional enums, but still, pita.)
17:37 rurban joined #perl6
17:39 [Coke] ok. if I have an array of FOO, where foo has $.key and $.value, how can I get a list of all the unique $.key's in the array?
17:40 patrickas left #perl6
17:40 [Coke] er, sorry. An array of BAR, which contains FOO, which (as above.) =-)
17:40 [Coke] @bars>>.foo <step 2> .uniq # profit!
17:41 moritz_ @bar».foo».key».uniq ?
17:41 colomon (@bars>>.for>>.key).uniq
17:41 moritz_ erm, right
17:42 colomon s/for/foo
17:42 [Coke] moritz_: grumble. I had tried that but got an error ...
17:42 [Coke] ... somewhere else. :P
17:42 pugssvn r30670 | colomon++ | [t/spec] Fudge m:c// tests and add .match(:c) versions instead.
17:47 k23z__ joined #perl6
18:03 [Coke] someone should gently poke tom at the SYN instead of the EXE; though I have no idea if that addresses his issues at all.
18:04 moritz_ somebody who is immune to wordy answers :-)
18:04 moritz_ I might be that
18:08 moritz_ [X] sent
18:09 [Coke] moritz++
18:10 [Coke] phenny: tell masak that I forked his gist at http://gist.github.com/244255 and that my version adds royalflush and actually seems to work under rakudo-latest.
18:10 phenny [Coke]: I'll pass that on when masak is around.
18:10 [Coke] (of course, it doesn't do the thing I was trying to do there.)
18:11 moritz_ rakudo: say 'abc'.match(/./, :c(2))
18:11 p6eval rakudo 96fbd6: OUTPUT«c␤»
18:11 k23z__ moritz_, remember when you played with SVG ?
18:11 moritz_ k23z__: sure
18:12 moritz_ rakudo: 'abc' ~~ /b/; say 'abc'.match(/./, :c)
18:12 p6eval rakudo 96fbd6: OUTPUT«b␤»
18:12 k23z__ moritz_, http://i.imgur.com/cSDCt.png
18:12 k23z__ moritz_, in Perl .. 5
18:12 k23z__ moritz_, construction of regular pentagon with ruler and compass :)
18:13 k23z__ moritz_, rendered with GD::SVG
18:13 k23z__ moritz_, did you actually port GD::SVG to Rakudo or started from scratch ?
18:14 moritz_ k23z__: masak did the XML output module... I started a plotting module on top of it, from scratch
18:15 dolmen joined #perl6
18:15 k23z__ moritz_, do you have already implemented circles and line segments ?
18:17 bubaflub joined #perl6
18:18 moritz_ k23z__: my module is a chart plotter; circles or so are outside its scope
18:20 mberends k23z__: here's another (bitrotted) SVG::Tiny.pm that worked on alpha http://github.com/perl6/perl6-examples/tree/master/lib/SVG/
18:20 k23z__ bitrott = old ?
18:21 mberends yes, untested on master :-(
18:21 moritz_ nope
18:21 moritz_ worked on master last I tried
18:21 moritz_ oh wait no
18:21 moritz_ wrong one
18:21 moritz_ http://github.com/masak/svg/ this one works
18:22 moritz_ it's really just an XML emitter
18:31 colomon how do :c and /^whatever/ interact?
18:32 moritz_ will fail for :c != 0
18:32 moritz_ I have a small patch that allows :continue as an alias to :c
18:33 [Coke] is there a 'seen' bot in here?
18:33 moritz_ buubot: seen colomon
18:33 buubot moritz_: I last saw colomon saying "colomon" at Fri May 14 19:29:42 2010 Z.
18:33 colomon moritz_: for match, I should have already committed that.
18:33 [Coke] buubot: seen masak
18:33 buubot [Coke]: I last saw masak saying "TimToady " at Wed May  5 13:56:09 2010 Z.
18:33 moritz_ colomon: ooh
18:34 moritz_ colomon: but it's wrong :(
18:34 moritz_ colomon: bare :c is allowed
18:34 moritz_ colomon: and defaults to $/.to of the preceeding match
18:34 colomon moritz_: not per TimToady earlier today.
18:35 moritz_ so, spec changed?
18:35 dalek rakudo: a797463 | (Solomon Foster)++ | src/core/Cool-str.pm:
18:35 dalek rakudo: Allow :global as well as :g for match method.
18:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a797463edb84597afa451f3980accebbdfd67a28
18:35 dalek rakudo: 816a4fc | (Solomon Foster)++ |  (2 files):
18:35 dalek rakudo: Better support for :c / :continue in match, and turn on S05-modifier/continue.t.
18:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/816a4fc01fb86df24bca53c04d5ee429da192835
18:36 colomon TimToady: so I think we have to require an arg on  in the method form
18:36 colomon [12:16pm] TimToady: and, by extension,
18:36 colomon whoops, lost the modifiers in there.
18:37 * moritz_ mis-remembered
18:37 moritz_ colomon++
18:37 colomon easy enough to implement in a pinch.
18:38 colomon if we change our minds.
18:38 colomon using $/ would be kind of funky with match, since it's not set by match...
18:39 colomon I'm trying to figure out how to implement :pos, any ideas?
18:40 moritz_ maybe nqp-rx supports :p?
18:40 SmokeMachine joined #perl6
18:42 pugssvn r30671 | lwall++ | [S05] don't use 'accent' to mean 'mark' as pointed out by tchrist++
18:42 pugssvn r30671 | rename :a and :aa to :m and :mm
18:42 pugssvn r30671 | regularize mm// to ms// to avoid confusion with new :m ignoremark option
18:42 moritz_ so - everything is different now? :-)
18:44 perlygatekeeper joined #perl6
18:45 colomon happens every time #perl6 gets to talking... ;)
18:46 moritz_ TimToady: so sameaccent in S32/Str should probably also be samemark?
18:47 TimToady yes
18:47 colomon moritz_: is Regex::Cursor.parse in nqp-rx?
18:47 * moritz_ fixes
18:47 moritz_ colomon: yes
18:48 pugssvn r30672 | moritz++ | [S32/Str] update "sameaccent" fossile
18:48 TimToady I just figgered it wasn't fair to ask Tom for a patch when it really required redesign
18:48 moritz_ then maybe my mail was a bit harsh :(
18:48 moritz_ colomon: seems it does accept :p
18:49 colomon \o/
18:49 * moritz_ tries
18:50 pugssvn r30673 | coke++ | fix typo
18:51 PerlJam What's the difference between an "accent" and a "mark"?  Is that like an umlaut isn't an accent, but it is a mark?
18:51 moritz_ yes
18:51 colomon moritz_: I'll see if I can get some test cases ready...
18:51 moritz_ but there are others where it's more obvious
18:52 cotto_work I'm not seeing any of the failures jnthn mentioned on parrot-dev when using Parrot r46743 and the latest (updated within the last hour) rakudo.
18:52 cognominal rakudo:   say  ( method => 'toto' )  # easy to work around by may-be confusing old-timer perl5 programmers :)
18:52 p6eval rakudo 816a4f: OUTPUT«Malformed method at line 11, near "=> 'toto' "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
18:52 moritz_ cotto_work: I couldn't reproduce it on amd64/linux either
18:53 jnthn cognominal: Platform?
18:53 jnthn gha
18:53 jnthn cotto_work: platform?
18:56 bkeeler Hi-diddly-ho perl6erinos!
18:56 jnthn hi bkeeler!
18:58 moritz_ huh
18:58 moritz_ doesn'T seem to work
18:58 colomon moritz_: :pos you mean?
18:58 ShaneC joined #perl6
18:58 moritz_ colomon: aye
18:59 colomon bother
18:59 ShaneC left #perl6
18:59 moritz_ looking at the implementation... it seems that :p is ignored if :c is present
18:59 colomon moritz_: ah.  so we just need to get smart about that...
19:00 moritz_ aye, I hope so
19:01 colomon hmmm, what happens to .match if you use them both?
19:01 moritz_ then :c is preferred
19:02 colomon I'd have thought the other way around, :p is stricter.
19:03 dalek joined #perl6
19:03 moritz_ $ ./perl6 -e 'say "adabc".match(/a.*/, :p(2))'
19:03 moritz_ abc
19:03 moritz_ $ ./perl6 -e 'say "adabc".match(/a.*/, :p(1))'
19:03 moritz_
19:03 moritz_ (empty line
19:04 moritz_ except that I broke other stuff :(
19:05 PerlJam :pos anchors the match at a particular character position?
19:05 cognominal hum, it seems that the semantic of the state qualifier has changed from alpha to current rakudo.  Is there a new keyword. error message I get "Symbol '%message' not predeclared in send_error"?
19:05 moritz_ $ ./perl6 -e 'say so "abcde" ~~ /bc/'
19:05 moritz_ 0
19:05 moritz_ cognominal: not yet implemented
19:06 cognominal ok, no problem. easy to work around
19:06 cognominal thx
19:07 cognominal except I like the compiler to be honest with me :)
19:07 moritz_ like, uhm, I broke normal regex matches
19:07 colomon moritz_++
19:07 moritz_ cognominal: it is, for some value of honest
19:07 moritz_ cognominal: it parses state() as a subroutine call
19:08 cognominal :)
19:08 moritz_ cognominal: and comlains at compile time that the variable you're trying to call is not yet declared
19:08 moritz_ *complains
19:08 jnthn alpha's implementation of state was pretty spec compliant and stable. I wonder how easy it'd be to port it over.
19:10 TimToady maybe we should just go with :p($pos) and :p($pos..*)   1/2 :)
19:10 cognominal I should use --target=parse more often instead of whining here
19:10 moritz_ TimToady: I kinda like :c, because it's quite often used
19:10 TimToady to me, :p and :c are mutually exclusive
19:11 moritz_ aye
19:12 moritz_ colomon: seems like I have a fix
19:12 TimToady another approach, :c never takes an argument; if you want a different start pos than $/.to, set it with :p
19:12 cotto_work jnthn, Ubuntu 10.04 x84
19:13 PerlJam TimToady: for some reason I like that better than mutual exclusivity
19:13 cotto_work *x64
19:13 * moritz_ would like it the other way round
19:13 jnthn cotto_work: OK; I need to try it on my other Win32 box.
19:13 TimToady so :p(42):c ==> start at 42 and continue
19:13 moritz_ :c($pos) sets a position
19:13 moritz_ and :p actually anchors it there
19:13 colomon moritz_: \o/
19:13 jnthn cotto_work: So I can fathom if something is odd on just this machine or on Win32 generally.
19:13 PerlJam moritz_: then :p seems a bit of misnomer
19:13 TimToady and :c :)
19:14 moritz_ colomon: I'm through S02 with the spectests, no fallout so far
19:14 moritz_ :start-at, :anchored
19:14 PerlJam moritz_: the one-letter mnemonics are gone then  :)
19:14 TimToady but internally, anchored is the default, really
19:15 TimToady adding in .*? is really the non-default
19:16 TimToady I think set-position-and-scan is more complicated than set-position
19:17 TimToady we will have a hard enough time persuading people that regex don't always scan as it is
19:17 TimToady biasing the switches that way seems like a step backwards to me
19:18 PerlJam I don't know ... there's bunches of people who write regexes like this:    / .* foo /   :)
19:18 TimToady and then wonder why it finds the last one instead of the first one.  :)
19:20 TimToady anyway, for some reason I'm prejudiced towards the parsing view  :)
19:21 TimToady and it's almost the case that :c should be outlawed when parsing, and force people to put .*? where they mean it
19:21 TimToady I think the upshot of this is that we keep both :c and :p the way they are.  :)
19:22 TimToady and maybe force exclusion, if we feel like it
19:22 PerlJam exclusion is less confusing initially at least.
19:23 colomon \o/
19:23 * colomon will get back to working on tests for :p
19:24 * PerlJam is so used to seeing emoticons at the end of lines that he was waiting for colomon to finish his sentence.
19:24 PerlJam :-)
19:24 TimToady moritz_: do you actually have any use cases for :c or is it just a feeling that it's "quite often used"?
19:25 jhuni joined #perl6
19:25 colomon TimToady: it's essential for multiple matches
19:25 moritz_ TimToady: split()
19:25 moritz_ comb()
19:26 moritz_ hm, it seems that the standard perl 5 usage is actually covered by comb and split
19:26 TimToady and that behavior might just be hardwired there
19:26 colomon :c is needed to implement split....
19:26 TimToady .*? being easy to emulate externally
19:27 moritz_ well, it could also be a de-huffmanized attribute
19:27 TimToady :c($p) is equiv to :p($_) for $p..*
19:27 TimToady so it's a bit of sugar
19:28 TimToady well, with the stop on match too
19:29 TimToady not really arguing against keeping :c, but I would resist defining it as more basic than :p
19:29 k23z__ I'm bored
19:29 k23z__ any cure for that ?
19:29 TimToady good, bored people find interesting things to do and do them :)
19:29 PerlJam k23z__: code something using rakudo
19:33 TimToady also, I really dislike calling what :p does "anchoring", because people immediately think of ^ or ^^, and both of those are wrongish semantics for :p
19:34 moritz_ there are many more anchors than ^ and ^^
19:34 colomon rakudo: say "hello".match(/z/).perl
19:35 p6eval rakudo 816a4f: OUTPUT«Method 'perl' not found for invocant of class 'Regex;Match'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
19:36 colomon rakudo: say "hello".match(/z/).Bool
19:36 TimToady but that's what people think of
19:36 p6eval rakudo 816a4f: OUTPUT«0␤»
19:37 colomon rakudo: say "hello".match(/o/).Bool
19:37 p6eval rakudo 816a4f: OUTPUT«1␤»
19:37 colomon oooo
19:38 TimToady moritz_: I fight "undifferentiated regex thoughts" all the time at my company of hardware geeks...  :)
19:38 moritz_ TimToady: my condolences :0)
19:38 TimToady "unicode? what's that?"
19:39 moritz_ have them produce unicode-aware hardware :-)
19:40 TimToady bbl &
19:41 Tene "undifferentiated regex thoughts"?
19:41 PerlJam I confess that when I first read "anchor" I immediately think of ^ and $
19:41 moritz_ colomon: all tests pass... except t/spec/S05-modifier/global.t, which loops infinitely :(
19:41 colomon oh noez!
19:41 colomon I just added that one today...
19:42 colomon moritz_: you're not always starting from :c(0) if no :c is specified?
19:43 moritz_ colomon: I am... because otherwise non-anchored matches don't work anymore
19:43 bluescreen joined #perl6
19:43 colomon can you post your code?
19:43 colomon paste
19:44 lisppaste3 moritz_ pasted ":pos implementation" at http://paste.lisp.org/display/99362
19:46 colomon moritz_: you're not using $cont in the parse call in the loop.
19:46 colomon errr...
19:46 moritz_ I am, in %opts<c>
19:46 colomon that's only the first time through.
19:46 moritz_ ooooh
19:47 moritz_ I wanted to write %opts<c>
19:47 moritz_ and wrote %opts<p>
19:47 colomon yeah
19:47 colomon not sure why that loops instead of just failing, though.
19:47 moritz_ colomon++ # handy to have around for debugging :-)
19:48 colomon moritz_++ # handy to have around to do the implementing.  ;)
19:49 * jnthn enjoys watching the colomoritz bot at work
19:49 pmichaud seems to me that .match should always do some form of gather/take, and not have a special loop for :global
19:49 pmichaud i.e., I'd use the same loop for :global, :nth, and :x
19:50 mantovani joined #perl6
19:50 Lorn joined #perl6
19:50 pmichaud I don't remember if we decided that :nth and :x were mutually exclusive, though.
19:50 moritz_ and treat :global as :x(1..*) ?
19:50 moritz_ I don't think they are
19:50 pmichaud or as "True"
19:50 colomon pmichaud: normal single match is supposed to return a match object and not a list of match objects, isn't it?
19:51 pmichaud colomon: well, it would return a parcel in either case
19:51 pmichaud but yes, there could be a difference there
19:51 moritz_ :nth(1|3|4), :x(2) does make sense
19:51 colomon there are tests for :x and :nth together....
19:51 moritz_ exactly two matches, but not the second
19:51 pmichaud okay, that makes sense-ish
19:51 moritz_ colomon: and they are wrong, most likely :-)
19:52 pmichaud just feels like :global, :nth, and :x should share a common loop
19:52 moritz_ I know that because I wrote them :/
19:52 colomon pmichaud: agreed
19:53 colomon the :x tests I found were definitely wrong.
19:53 mantovani joined #perl6
19:53 stephenlb joined #perl6
19:53 pugssvn r30674 | pmichaud++ | [S05]: Typo fix TimToady++'s typo fix in r30668.  :-)
19:54 moritz_ if only the test write had had a clue about Perl 6 back then...
19:58 pugssvn r30675 | colomon++ | [t/spec] Basic tests for :p argument to match method.
19:58 moritz_ spectest run looks good so far
19:59 [Coke] 15:56 <+nopaste> "coke" at 192.168.1.3 pasted "rakudo spec test failures with recent parrot/rakudo" (8 lines) at http://nopaste.snit.ch/20577
20:01 molaf_ joined #perl6
20:02 moritz_ colomon: somehow fudge generates a file from pos.t that's not valid Perl 6
20:02 moritz_ STD says
20:02 moritz_ (Possible runaway string from line 74)
20:02 moritz_ Two terms in a row at /home/moritz/rakudo/t/spec/S05-modifier/pos.t line 75:
20:02 moritz_ ------>    nok $str.match(/abc/, :p(4)).Bool, "⏏No match anchored to 4";
20:03 colomon it's the line before.
20:03 colomon last " is missing
20:04 colomon line 79 as well.
20:04 moritz_ ah, thanks
20:04 * moritz_ too tired for serious debugging
20:04 colomon couldn't test it without your patch, sorry.
20:04 moritz_ no problem
20:04 pugssvn r30676 | moritz++ | [t/spec] fix syntax errors, colomon++
20:05 moritz_ spectest run finished, rakudo changes pushed
20:06 colomon moritz_++
20:06 moritz_ rakudo: say samecase('aBc', 'XYz')
20:06 p6eval rakudo 816a4f: OUTPUT«ABc␤»
20:08 moritz_ rakudo: say 3.samecase(5)
20:09 p6eval rakudo 816a4f: OUTPUT«3␤»
20:10 moritz_ rakudo: say 'abc'.match('b')
20:10 p6eval rakudo 816a4f: OUTPUT«No applicable candidates found to dispatch to for 'match'. Available candidates are:␤:(Mu : Regex $pat, Any :continue(:c($continue)), Any :global(:g($global));; *%_)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
20:10 dalek rakudo: 2d0fc2b | moritz++ |  (2 files):
20:10 dalek rakudo: implement :p/:pos in Regex.match
20:10 dalek rakudo: With help from colomon++
20:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2d0fc2b2729773a9987636cae65327480f54fd47
20:11 szabgab joined #perl6
20:12 gbacon_ joined #perl6
20:18 pugssvn r30677 | colomon++ | [t/spec] Test :pos as well as :p.
20:19 molaf joined #perl6
20:19 _buno_ joined #perl6
20:22 Guest71827 joined #perl6
20:26 elmex joined #perl6
20:32 perlygatekeeper left #perl6
20:32 moritz_ +   ok $match.Bool, "Match anchored to 6";
20:33 moritz_ ok $match, "..."; would be enough
20:45 colomon I wasn't sure how ok worked internally.  :)
21:00 wknight8111 joined #perl6
21:00 jnthn Curious. The Rakudo build and spectest went find on my laptop
21:00 * jnthn is kinda confused
21:03 [Coke] jnthn: SHIP IT!
21:03 [Coke] someone on #parrot suggested icu versions?
21:03 jnthn [Coke]: I don't build with ICU on this machine, so it's likely not that.
21:04 jnthn [Coke]: I do have I think different versions of MS VC++
21:04 jnthn I'll try a clean clone on this machine later on.
21:21 molaf_ joined #perl6
21:21 hercynium joined #perl6
21:21 pyrimidine left #perl6
21:29 k23z__ joined #perl6
21:52 ruoso joined #perl6
21:56 Targhan joined #perl6
22:31 pjcj joined #perl6
22:35 am0c joined #perl6
22:58 Psyche^ joined #perl6
23:07 pugssvn r30678 | lwall++ | [pos.t] remove 'my' that causes "Useless redeclaration of variable $_"
23:42 BrowserUk left #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo