Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-04-18

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:08 skids joined #perl6
00:10 ruoso joined #perl6
00:19 samlh joined #perl6
00:30 Limbic_Region joined #perl6
00:41 Eevee joined #perl6
01:32 literal perl6: my @list = qw<a b c>; say @list.perl
01:32 p6eval pugs: OUTPUT«\("a", "b", "c")␤»
01:32 p6eval ..rakudo 616c0b: OUTPUT«["a", "b", "c"]␤»
01:32 p6eval ..elf 26253: OUTPUT«Undefined subroutine &GLOBAL::qw called at (eval 125) line 3.␤ at ./elf_h line 5881␤»
01:36 pugs_svn r26254 | hinrik++ | [util/perl6.vim] don't require whitespace before angle in qw<a b c>
01:46 justatheory joined #perl6
01:58 hercynium joined #perl6
02:03 pugs_svn r26255 | hinrik++ | [util/perl6.vim] add notice about new location
02:15 StephenPollei joined #perl6
02:19 literal perl6: print join(q/,/,@INC);
02:19 p6eval pugs: OUTPUT«,»
02:19 p6eval ..elf 26255: OUTPUT«Parse error in: /tmp/aP7oE1Kbiz␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: print join(q/,/,@INC);␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
02:19 p6eval ..STD_red/std.r...
02:19 p6eval ..rakudo 616c0b: OUTPUT«Scope not found for PAST::Var '@INC' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
02:19 eternaleye joined #perl6
02:22 Tene perl6: print join(',',@INC)
02:22 p6eval elf 26255: OUTPUT«Global symbol "$a_INC" requires explicit package name at (eval 125) line 3.␤ at ./elf_h line 5881␤»
02:22 p6eval ..pugs: OUTPUT«,»
02:22 p6eval ..rakudo 616c0b: OUTPUT«Scope not found for PAST::Var '@INC' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
02:26 alanhaggai joined #perl6
02:29 skids perl6: print join(',',@*INC)
02:29 p6eval rakudo 616c0b: OUTPUT«.»
02:29 p6eval ..elf 26255: OUTPUT«Undefined subroutine &GLOBAL::join called at (eval 125) line 3.␤ at ./elf_h line 5881␤»
02:29 p6eval ..pugs: OUTPUT«,»
02:29 literal oh right, the *
03:24 cspencer joined #perl6
03:41 orafu joined #perl6
04:02 meppl joined #perl6
04:19 Kisu joined #perl6
04:27 alanhaggai joined #perl6
04:37 dalek rakudo: f2c5829 | (Cory Spencer)++ | src/ (4 files):
04:37 dalek rakudo: Move chr and ord methods to the setting.
04:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​2c58298abf99dd1fb56bb9bfd0b758238ac41a8
04:47 b7j0c joined #perl6
04:48 pyrimidine joined #perl6
04:50 b7j0c any idea why i see "No rule to make target `/home/sergej/community.cvs/devel​/parrot/src/parrot-1.0.0/parrot', needed by `perl6_s1.pbc'" when trying to build rakudo from git??
04:50 skids did you perl Configure.pl --gen-parrot?
04:51 b7j0c yup
04:53 pyrimidine rakudo: class X {}; class Y {method a (X *@a) { say 1} }; Foo.new.a(Z.new);
04:53 p6eval rakudo f2c582: OUTPUT«Could not find non-existent sub Foo␤current instr.: '_block14' pc 53 (EVAL_19:37)␤»
04:53 pyrimidine rakudo: class X {}; class Y {method a (X *@a) { say 1} }; Y.new.a(X.new);
04:54 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
04:54 pyrimidine Am I calling slurpys wrong?
04:54 skids funny I don't see a parrot/src/parrot-1.0.0 in my built tree
04:55 b7j0c well i got parrot from arch linux repos
04:55 pyrimidine rakudo: class X {}; class Y {method a (X *@a) { say 1} }; Y.new.a((X.new));
04:55 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
04:55 b7j0c and i have never downloaded rakudo from git before tonight
04:55 skids You should let rakudo checkout and build it's own parrot, it's still lockstep with particular parrot versions.
04:56 b7j0c but why is "sergej" being hardcoded in a Makefile? why would building my own parrot address that?
04:56 skids That should have been done when you ran Configure.pl with --gen-parrot, though
04:56 pyrimidine I just built rakudo today from the latest parrot (seemed fine)
04:56 b7j0c well i will uninstall the arch linux parrot and try again
04:57 skids Makefil should be autgen, not hardcoded
04:57 skids You shouldn't have to uninstall.
04:58 b7j0c oh, the git version needs subversion (?)
04:58 skids Yeah parrot is still svn.
04:58 b7j0c ok getting that too...
04:59 pyrimidine rakudo: class X {}; class Y {method a (*@a) { say 1} }; Y.new.a((X.new));
04:59 p6eval rakudo f2c582: OUTPUT«1␤»
04:59 pyrimidine rakudo: class X {}; class Y {method a (X *@a) { say 1} }; Y.new.a(X.new);
04:59 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
04:59 pyrimidine hrmmm....
05:00 skids rakudo: class X {}; X.new.WHAT.say
05:00 p6eval rakudo f2c582: OUTPUT«X␤»
05:01 skids class X {}; class Y {method a (*@a of X) { say 1} }; Y.new.a(X.new);
05:01 skids rakudo: class X {}; class Y {method a (*@a of X) { say 1} }; Y.new.a(X.new);
05:01 p6eval rakudo f2c582: OUTPUT«1␤»
05:01 skids Yeah, hrm.
05:02 pyrimidine type constraints shouldn't require 'of'
05:02 skids Well, definitely not on simple decls.  Checking docs now about param decs.
05:03 * pyrimidine doing same...
05:04 b7j0c strange...after blowing away arch's parrot, building seems fine. harumph. let me guess, i am the only one other that 'sergej' to try it. anywho, what can we do with rakudo today? i dropped out of p6 around the pugs era, interested to know what state it is in
05:04 pyrimidine rakudo: class Y {method a (Str *@a) { say 1} }; Y.new.a('foo);
05:04 p6eval rakudo f2c582: OUTPUT«Statement not terminated properly at line 1, near "('foo);"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:04 pyrimidine rakudo: class Y {method a (Str *@a) { say 1} }; Y.new.a('foo');
05:04 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:04 pyrimidine rakudo: class Y {method a (Str *@a) { say 1} }; my Str $foo = 'bar'; Y.new.a($foo);
05:05 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:05 pyrimidine rakudobug?
05:06 szabgab joined #perl6
05:07 skids Yeah on a skim I don't see any "but you can't do it this way" for that for slurpies.
05:08 pyrimidine rakudo: sub a (Str *@a) { say 1}; my Str $foo = 'bar'; a($foo);
05:08 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:08 skids rakudo: class X {}; my X @a; @a.push(X.new);
05:08 p6eval rakudo f2c582:  ( no output )
05:08 skids rakudo: class X {}; my X @a; @a.push(X.new); @a.perl.say
05:08 p6eval rakudo f2c582: OUTPUT«[X.new()]␤»
05:08 skids rakudo: class X {}; my X @a; @a.push(X.new,2); @a.perl.say
05:08 p6eval rakudo f2c582: OUTPUT«Type check failure in push␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:09 skids now for the unfun part, searching RT :-/
05:10 pyrimidine This is fairly recent (within the last week or two).
05:10 pyrimidine found it: http://github.com/rakudo/rakudo/commit/f​b553bd5ba649eb526a16a99f8caecb799c405ef
05:12 pyrimidine so, this now works with .of (but breaks constraints otherwise)
05:12 skids 58278, closed ticket, jnthn mentions it at the end.  If I don't find another, maybe re-open that ticket.
05:15 skids Yeah typed array support is new.
05:16 pmichaud Are slurpies allowed to have type constraints?
05:17 skids rakudo: class X {}; class Y {method a (X @a) { say 1} }; Y.new.a([X.new]);
05:17 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:17 skids rakudo: class X {}; class Y {method a (@a of X) { say 1} }; Y.new.a([X.new]);
05:17 p6eval rakudo f2c582: OUTPUT«1␤»
05:17 skids ok not unique to slurpy
05:18 pyrimidine yes, found that as well
05:18 pmichaud I'm not sure that [X.new]  has  Positional[X]
05:19 pmichaud i.e., I'm not sure that we dynamically check all of the elements of a list to make sure they're type compatible when doing a bind of a  Positional[Any].
05:19 pmichaud (or just Positional)
05:19 pyrimidine this did work at one point (but that doesn't mean it's correct)
05:19 pmichaud you mean it worked at one point in Rakudo?
05:20 pyrimidine yes
05:20 pmichaud I suspect it's just that Rakudo wasn't doing type constraints.
05:20 pmichaud (on arrays)
05:20 pyrimidine yes
05:21 pmichaud I guess I'll ask jnthn/TimToady about it a bit later today.
05:22 pyrimidine It may be a spec issue (nothing is mentioned about it re: arrays or hashes)
05:22 pyrimidine and .of seems to work
05:22 pyrimidine rakudo: class X {}; class Y {method a (@a of X) { say 1} }; Y.new.a(X.new);
05:22 pmichaud rakudo:  say [X.new].of
05:23 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to a␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
05:23 p6eval rakudo f2c582: OUTPUT«Could not find non-existent sub X␤current instr.: '_block14' pc 53 (EVAL_16:37)␤»
05:23 pmichaud it may be that 'of X' simply isn't doing the type constraint either.
05:23 pyrimidine rakudo: class X {}; class Y {method a (*@a of X) { say 1} }; Y.new.a(X.new);
05:23 p6eval rakudo f2c582: OUTPUT«1␤»
05:23 pyrimidine ding!
05:24 pmichaud rakudo: class X {};  sub foo(@a of X) { say 1 };   foo([Int.new]);
05:24 p6eval rakudo f2c582: OUTPUT«1␤»
05:24 skids rakudo: class X {}; class Y {method a (*@a of X) { say 1} }; Y.new.a(3);
05:24 p6eval rakudo f2c582: OUTPUT«1␤»
05:24 skids yeah of is a noop.
05:27 pyrimidine okay, makes sense.  I'll hold off on the bug report until jonathan/TImToady is asked
05:27 * pyrimidine sleep
05:28 pmichaud it's okay to file the bug report so it's not forgotten  :-)
05:28 pmichaud or you can wait.
05:28 pyrimidine ok
05:28 pmichaud I'm just curious what the answer will be :-)
05:28 skids And there seems to be none that touches it yet.
05:28 skids (no RT ticket at least)
05:28 Kisu joined #perl6
05:29 pyrimidine well, it's either a bug or a spec issue that needs clarification (or both)
05:29 pyrimidine so to RT I go
05:29 pyrimidine (or rakudobug)
05:29 skids spec issues can go in RT, that's fine.
05:29 Tene pmichaud: any idea on the 'right' way to define subs that have unusual names?
05:30 Tene pmichaud: right now I'm just using hash access on the namespace.
05:34 lambdabot joined #perl6
05:42 pyrimidine_ joined #perl6
05:44 pyrimidine_ left #perl6
05:55 lambdabot joined #perl6
05:59 pmichaud Tene: you mean in Perl 6?  I think that's the normal way to do it.
05:59 Tene Hmm.  Okay.
06:00 pmichaud If I don't get too distracted with other things, I'm thinking of hacking in support for custom ops this weekend.
06:00 Tene In this specific case, I was looking at defining additional sub traits, which in rakudo means defining a '!sub_trait_foo' sub
06:00 Tene I don't know how that's specced to be done.
06:01 pmichaud in the general case, they're just roles, I think.
06:02 pmichaud the reason we have !sub_trait_foo in place now is because we either want to optimize that particular trait or our implementation of roles isn't quite up to the task yet.
06:17 kate21de joined #perl6
06:42 stas joined #perl6
07:01 c9s_ joined #perl6
07:03 stas joined #perl6
07:05 awwaiid joined #perl6
07:10 SamB joined #perl6
07:10 ejs joined #perl6
07:16 _SamB_ joined #perl6
07:28 iblechbot joined #perl6
07:29 masak joined #perl6
07:29 masak OH HAI from the post-NPW hackathon and szabgab's Perl 6 training session!
07:32 wayland76 Oh HAI from Australia!
07:33 mikehh and hi from just accross the North Sea
07:36 omega oh hai from the conference room down the hall from teh training session :p
07:41 masak heh. the students here did a quick round of introductions. the more known you are, the less you need to say. I talked for a minute I think. pmichaud said "I'm pmichaud, the lead developer for Rakudo, the Perl 6 impl on Parrot. And that's all you need to know". TimToady said "I'm Larry". :)
07:41 omega haha :p
07:43 mberends joined #perl6
07:43 masak I'm eager to finally learn Perl 6, by the way. It seems to be a neat language.
07:43 mberends :)
07:44 wayland76 masak: Faker :)
07:44 masak wayland76: indeed.
07:46 masak on a more serious note, I'm having high expectations for the hackathon weekend.
07:46 masak many plans are flying around, and if even a third of them get done, that's great.
07:46 Guest73590 joined #perl6
07:48 payload joined #perl6
07:48 szabgab joined #perl6
07:49 cosimo joined #perl6
07:49 masak szabgab: hi :)
07:49 wayland76 masak: Depending on which third?
07:49 PaxAnima_ joined #perl6
07:49 TimToady the fun third, likely
07:49 masak wayland76: no, it hardly does. all the thirds are interesting.
07:49 wayland76 TimToady: Or the necessary third :)
07:50 mib_iqqueh joined #perl6
07:50 haakonsk joined #perl6
07:50 mib_i7k0dt joined #perl6
07:50 TimToady some people's idea of fun is to do the hard, necessary third :)
07:50 mib_i7k0dt rakudo: 42.say
07:50 p6eval rakudo f2c582: OUTPUT«42␤»
07:50 wayland76 Is the IRC channel on an overhead projector or something?
07:50 TimToady std: .=flip
07:50 masak TimToady: we like those people.
07:50 maxim joined #perl6
07:50 p6eval std 26255: OUTPUT«ok 00:02 35m␤»
07:50 masak wayland76: aye.
07:50 * masak waves
07:50 wayland76 Hi everyone :)
07:50 literal Hi NPW
07:51 wayland76 (from Australia)
07:51 wayland76 Happy hacking!
07:51 * masak
07:51 baest how long is the training going to take?
07:52 TimToady it will never end
07:52 baest OMG
07:52 masak I think we'll stay till we run out of pizza.
07:52 baest TimToady: I think szabgab will get reaaaally tired then
07:52 wayland76 Now you know what the Eternal Student does when he leaves Uni :)
07:52 masak awww, no more overhead. :)
07:53 masak oh wait... still there.
07:53 Guest91326 left #perl6
07:53 masak std: 1..^Inf
07:53 p6eval std 26255: OUTPUT«ok 00:02 35m␤»
07:53 cosimo rakudo: say 1..5
07:53 p6eval rakudo f2c582: OUTPUT«12345␤»
07:54 * cosimo wonders what happens with 'say 1..*'
07:54 masak cosimo: will likely just hang.
07:54 masak cosimo: it prints line-wise.
07:54 jnthn OH NOES
07:54 TimToady depends on how the buffering works
07:54 masak oh, true.
07:54 TimToady and the implementation of say
07:54 jnthn I've had an alarm clock usage fail...
07:55 TimToady I would not expect say to do a join
07:55 KyLe48 joined #perl6
07:55 masak TimToady: the stringification of 1..* might.
07:55 baest jnthn: you're sure it wasn't a whiskey fail? :)
07:55 jnthn Say calls $*OUT.say with the args I guess...
07:55 jnthn baest: I assure you the whisky was a win...
07:55 TimToady if it's implement by just fprintfing each value, then flushing on newline, you'll still get intermediate results
07:55 TimToady when the buffer fills
07:56 TimToady it's likely the stringificaiton of 1..* will "go meta"
07:56 baest jnthn: hehe, if you say so :)
07:58 eternaleye joined #perl6
07:58 payload1 joined #perl6
07:59 sjn joined #perl6
08:04 c9s_ joined #perl6
08:04 eternaleye_ joined #perl6
08:10 DemoFreak joined #perl6
08:11 masak rakudo: my @a = ^4; say @a[1..*].perl
08:11 cosimo i think i just found a problem in `perl Configure.pl --gen-parrot' on windows
08:11 p6eval rakudo f2c582: OUTPUT«[1, 2, 3, undef]␤»
08:11 jnthn masak: Think that bug is already filed. ;-)
08:12 masak jnthn: aye.
08:12 masak just checking that it hasn't changed since then.
08:12 * jnthn figures his punishment for sleeping through his alarm is that he has to find the way to the Hackathon alone
08:14 projector joined #perl6
08:14 omega omg, HAI projector
08:14 * sjn wonders where everyone is...
08:15 eternaleye joined #perl6
08:15 masak omega: no projector any more, I'm afraid.
08:15 masak std: multi sub infix:<∧> ($lhs, $rhs) { $lhs && $rhs }; if 1 + 1 == 2 ∧ 42 == 42 { say "OH HAI" }
08:15 p6eval std 26255: OUTPUT«ok 00:04 38m␤»
08:16 masak STD++
08:16 omega masak: muaha, I see you on the bigscreen in this room :p
08:17 cosimo --gen-parrot seems to be working now for me...
08:18 jnthn sjn: My part of the everyone is on its way soon.
08:19 omega -gen-parrot worked to days ago for me
08:19 * masak will henceforth refer to himself as 'my part of the everyone'
08:20 cosimo i had to fix it, didn't work for me (i'm on win32)
08:20 omega ahh
08:20 omega method add (Array @rules) {
08:20 pnu joined #perl6
08:20 omega does that mean an array of Arrays?
08:21 pmichaud it does.
08:21 masak omega: yes.
08:21 masak omega: is it Dispatcher code?
08:21 masak er, Dispatch.
08:21 omega masak: no, I fixed Dispatcher now
08:21 omega working on Tags failure
08:22 jnthn Rakudo only started enforcing that this means a Positional of Array recently.
08:22 masak great.
08:22 omega so if I want an Array of Str, it woul be method add (Str @array)?
08:22 masak aye.
08:22 masak we should really rename Tags to November::Tags.
08:22 jnthn omega: Yes, ish, but note that really you're asking for a Positional of Str
08:22 jnthn Where Positional is a role that Array happens to do (but also List, etc)
08:23 omega but I guess I don't really care if its Array or List?
08:23 masak no.
08:23 jnthn Right, which is why there's a Positional role. ;-)
08:23 omega :)
08:24 jnthn Anyone know if it was possible to buy the tram tickets on the tram with card, or must I go find cash first?
08:24 omega you can stop by 7-11 for instance, and get a tram ticket there
08:24 mberends or you can walk like we did ;)
08:25 jnthn mberends: Oooh! Is it far?
08:25 masak jnthn: not really.
08:25 mberends 45 mins
08:25 masak and the weather is beautiful.
08:25 ihrd joined #perl6
08:25 pmichaud 3.5km
08:25 masak rakudo: class A {}; sub foo(@bar) {}; foo(A.new)
08:25 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @bar in call to foo␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
08:26 masak rakudo: class A does Positional {}; sub foo(@bar) {}; foo(A.new)
08:26 p6eval rakudo f2c582:  ( no output )
08:26 masak rakudo++
08:26 masak jnthn++
08:26 wayland76 You could even run :)
08:26 ihrd rakudo: my $foo = 'foo'; $foo R~= '!';
08:26 p6eval rakudo f2c582:  ( no output )
08:27 ihrd hm
08:27 masak rakudo: my $foo = 'foo'; $foo R~= '!'; say $foo
08:27 p6eval rakudo f2c582: OUTPUT«foo␤»
08:27 cosimo i just tried to submit a bug to perl6-bugs@perl.org. is that correct?
08:28 ihrd rakudo: my $foo = 'foo'; say $foo R~= 'a';
08:28 p6eval rakudo f2c582: OUTPUT«0foo␤»
08:28 ihrd zero?!
08:28 masak :P
08:29 masak ihrd: care to submit a bug?
08:29 ihrd rakudo: my $foo = 'foo'; say $foo = 'foo' R~ 'a';
08:29 p6eval rakudo f2c582: OUTPUT«afoo␤»
08:29 * jnthn studies the Google Map and ponders the walk.
08:29 TimToady std: 42 ? 43 : 44
08:29 p6eval std 26255: OUTPUT«##### PARSE FAILED #####␤Obsolete use of ?: for the conditional operator; in Perl 6 please use ??!! instead at /tmp/C7kiXGTEbE line 1:␤------> [32m42 ?[31m 43 : 44[0m␤FAILED 00:02 35m␤»
08:29 pmichaud rakudo: 42 ? 43 : 44
08:29 p6eval rakudo f2c582: OUTPUT«Statement not terminated properly at line 1, near "? 43 : 44"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:30 ihrd masak: hi, I will submit
08:30 hanekomu joined #perl6
08:30 omega http://pastie.org/450612
08:30 omega shouldn't that work?
08:30 masak rakudo: 42 ?? 43 : 44
08:30 p6eval rakudo f2c582: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'parrot;PGE;OPTable;parse' pc 1809 (compilers/pge/PGE/OPTable.pir:504)␤»
08:30 omega it dies with the Non-positional or positional error
08:30 masak pmichaud: that's the one.
08:30 masak ihrd: great.
08:30 TimToady std: 42 ?? 43 : 44
08:30 p6eval std 26255: OUTPUT«##### PARSE FAILED #####␤Illegal use of colon as invocant marker at /tmp/ATtZvviQo3 line 1:␤------> [32m42 ?? 43 :[31m 44[0m␤FAILED 00:02 35m␤»
08:31 TimToady std: 42 ?? 43 :: 44
08:31 p6eval std 26255: OUTPUT«##### PARSE FAILED #####␤Found ?? but no !!; possible precedence problem␤Please use !! rather than :: at /tmp/hA8zwVEnYw line 1:␤------> [32m42 ?? 43 [31m:: 44[0m␤    expecting any of:␤   infix or meta-infix␤      infix stopper␤    standard stopper␤ terminator␤FAILED 00:02
08:31 p6eval ..35m␤»
08:32 krunen_ joined #perl6
08:33 omega rakudo: sub add(Str @a) {}; my @r = <a b c>; add(@r);
08:33 p6eval rakudo f2c582: OUTPUT«Non-Positional argument or Positional of wrong element type for @a in call to add␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
08:33 omega why?
08:33 baest pmichaud: can you tell me where the parsing of grammars take place? I would like to look through and see if I understand enough to look at the <something> ** ','
08:33 omega ahh
08:33 omega rakudo: sub add(Str @a) {}; my Str @r = <a b c>; add(@r);
08:33 p6eval rakudo f2c582:  ( no output )
08:34 masak baest: src/parser/grammar.pg
08:35 masak omega: it can be argued that your first attempt should also work.
08:35 masak omega: but at present, it doesn't.
08:35 jnthn actually I think compilers/pge/src/... if you want something inside a regex.
08:35 masak baest: what jnthn said.
08:35 jnthn masak: That's unspec and I need to bother Larry about it. ;-)
08:35 baest jnthn,masak: thanks :)(
08:35 jnthn baest: And that's in the Parrot tree not the Rakudo one btw
08:35 baest :)
08:35 baest yeah, I figured
08:36 jnthn ok I failz at map understanding
08:36 omega masak: Well, it was un-intuituve at least to a simple minded norwegian :p
08:36 omega yay, different fail now :p
08:36 omega Null PMC access in find_method()
08:36 masak omega: what's the program?
08:36 masak omega: and, more importantly, did you submit a rakudobug yet?
08:37 omega masak: november tests
08:37 omega masak: for?
08:37 masak omega: oh. :/
08:37 masak omega++
08:37 pmichaud baest: compilers/pge/PGE/Perl6Regex.pir
08:37 masak masak--
08:37 masak omega: I'd like to see that, I think.
08:38 masak it sounds bad.
08:38 omega http://pastie.org/450616
08:38 masak gracias.
08:38 masak I suspect that one is filed already...
08:38 masak find_method() does that sometimes. :/
08:38 * masak looks at the method in question
08:39 omega masak: I pasted my diff of Tags.pm
08:39 jnthn rakudo: class A { has @.a is rw handles /m/; }; my $x = A.new; $x.a = 1,2,3; say $x.map(*-2);
08:39 p6eval rakudo f2c582: OUTPUT«Use of uninitialized value␤Parameter type check failed for expr in call to map␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
08:39 jnthn rakudo: class A { has @.a is rw handles /m/; }; my $x = A.new; $x.a = 1,2,3; say $x.a.map(*-2);
08:39 p6eval rakudo f2c582: OUTPUT«Use of uninitialized value␤Parameter type check failed for expr in call to map␤current instr.: 'die' pc 17324 (src/builtins/control.pir:222)␤»
08:40 omega masak: in the same pastie
08:40 jnthn rakudo: class A { has @.a is rw handles /m/; }; my $x = A.new; $x.a = 1,2,3; say $x.a.map(*+2);
08:40 p6eval rakudo f2c582: OUTPUT«345␤»
08:40 projector2 joined #perl6
08:40 jnthn rakudo: class A { has @.a is rw handles /m/; }; my $x = A.new; $x.a = 1,2,3; say $x.map(*+2);
08:40 p6eval rakudo f2c582: OUTPUT«3␤»
08:40 masak omega: ah, I see it.
08:40 jnthn rakudo: class A { has @.a is rw handles /m/; }; my $x = A.new; $x.a = 1,2,3; say $x .= map(*+2);
08:40 p6eval rakudo f2c582: OUTPUT«get_number() not implemented in class 'A'␤current instr.: 'infix:+' pc 23068 (src/builtins/op.pir:284)␤»
08:41 jnthn There's probably some rakudo bugs in there somewhere...
08:41 omega if you point somewhere, I will look :p
08:43 sitaram joined #perl6
08:44 jnthn I think the patch I've got spectest running through at the moment will fix one of 'em...
08:44 baest pmichaud: ok, thanks. Is P6Rule.grammar outdated, it seems wrong?
08:46 c9s_ joined #perl6
08:47 jnthn OK folks, I'm making my way to the hackathon. See you all soon :-)
08:48 masak jnthn: o/
08:48 jnthn (If I don't get epicly lost... ;-))
08:48 masak just follow the tracks.
08:48 jnthn yeah, I figured that from the map... :-)
08:49 masak omega: getting the same Null PMC access after applying your patch.
08:49 masak omega: investigating.
08:49 moritz_ good morning
08:50 masak moritz_: hello!
08:50 masak moritz_: wish you were here. there was a moritz_-shaped hole at NPW.
08:51 moritz_ masak: :/
08:51 * moritz_ wishes he was there too, but I need six more weeks to get to Oslo
08:51 sitaram joined #perl6
08:52 masak moritz_: you don't have to _walk_ all the way here.
08:52 moritz_ masak: actually we'll take car and ferry
08:53 masak good plan.
08:54 imarcusthis joined #perl6
08:54 pugs_svn r26256 | moritz++ | [perl6-projects.org] use camelia; a few other improvements
08:57 dalek rakudo: afd8ff1 | pmichaud++ | build/gen_parrot.pl:
08:57 dalek rakudo: Avoid problems with newlines in build/PARROT_REVISION on windows (RT #64816)
08:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​fd8ff1da93296ecfc3892dad8e92f9d3f1818e0
08:57 krunen left #perl6
08:59 moritz_ pmichaud: what do you think about the 'make tickettest' patch (RT #64810)?
08:59 krunen joined #perl6
08:59 moritz_ to me it feels a bit like a wrong approach, but I don't work on tickets that often, so I can't really tell
09:00 masak pmichaud: I looked in trac.parrot.org for the get-output-from-child-process, but did not find any ticket about it. do you happen to know where it is?
09:02 krunen joined #perl6
09:04 simcop2387 joined #perl6
09:04 rhr joined #perl6
09:04 jrockway joined #perl6
09:04 Diederich joined #perl6
09:04 pugs_svn joined #perl6
09:10 PacoLinux joined #perl6
09:11 pmichaud masak: it's in RT, I think.
09:11 pmichaud (it's that old)
09:11 dalek rakudo: 8a3a9a9 | pmichaud++ | build/gen_parrot.pl:
09:11 dalek rakudo: Oops.  *This* commit fixes RT #64816.
09:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​a3a9a9111c5a7a5d489b28135002f2eb4319723
09:12 masak pmichaud: oh! Parrot still uses RT? :)
09:12 * masak looks there
09:14 masak mberends: qpsmtpd.
09:17 * mberends likes Pure Perl daemons for most protocols
09:17 masak mberends: that's the name of the fourth component on RT, apart from perl5, perl6, and parrot.
09:17 mberends time to port 'em all to Rakudo
09:18 masak :)
09:18 sitaram joined #perl6
09:18 masak 1. port everything to Rakudo 2. ??? 3. Profit!
09:18 wayland76 mberends: No, wait until we have S17 :)
09:19 masak wayland76: 'wait' is not in the list of our supported operations. :P
09:19 wayland76 Ok, try this: 0. Finish and implement S17 1. port everything to Rakudo 2. ??? 3. Profit!
09:20 masak rakudo: class masak {}; say masak.can("wait")
09:20 p6eval rakudo 8a3a9a: OUTPUT«0␤»
09:20 masak see?
09:20 masak :P
09:20 sitaram left #perl6
09:20 wayland76 rakudo: class masak {}; say masak.can("do anything")
09:20 p6eval rakudo 8a3a9a: OUTPUT«0␤»
09:20 mberends wayland76: there may be double effort in it, but I'd rather port badly today, reap some benefit and the refactor S17 in when it's ready :)
09:21 wayland76 Well, I think you're more useful than that class :)
09:21 mberends *then
09:21 pmichaud masak: yes, some older issues are still in RT and haven't been migrated to Trac yet.
09:21 masak pmichaud: ok. that should be a Trac ticket in itself. :)
09:21 wayland76 mberends: But if we all took that attitude, S17 would never be ready :)
09:22 masak wayland76: I'm not sure I agree.
09:22 masak wayland76: application code tends to drive the spec forward, as well.
09:22 wayland76 masak: In detail, yes, but in something as large as S17?
09:22 pmichaud I think there's a trac ticket for that.  At any rate, the parrot tickets are slowly being migrated.
09:23 pmichaud I can't find an RT ticket that describes capturing stream output from subprocesses, though.  Perhaps it wasn't a ticket.  Perhaps it got inadvertently closed.
09:23 pmichaud so, perhaps just file a new trac ticket (and someone else can figure out if it's a duplicate :-)
09:23 wayland76 masak: And I'm assuming the drive sequence is app code ==> implementation(rakudo, etc) ==> Spec
09:23 masak pmichaud: I'll file the ticket, but primarily I want to write a good email to parrot-dev.
09:24 masak wayland76: in most cases, yes.
09:24 pmichaud masak: that is probably the best approach, yes.
09:24 wayland76 ...and I'll write a baaaaad e-mail to parrot-dev (well, maybe not :) )
09:25 wayland76 (sorry all, my sleep schedule has put my brain in "Far Side" mode)
09:27 moritz_ masak: mention that that feature would allow us test all kind of things in Perl 6 that we can't test now, at least not with reasonable effort
09:27 masak wayland76: the specific value of 'good' here is 'so that the devs understand the various ways in which this feature is highly desired'.
09:27 masak wayland76: what moritz_ said.
09:27 masak moritz_: aye, I will.
09:27 masak moritz_: it'll also be good for Parrot's tests, for exactly the same reason.
09:27 pmichaud it's been a long-desired feature in Parrot.
09:29 dalek rakudo: 91d6204 | pmichaud++ | docs/spectest-progress.csv:
09:29 dalek rakudo: spectest-progress.csv update: 371 files, 10414 passing, 0 failing
09:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​1d6204e6bbe6de8f9dea54c001e9f9e1a103943
09:29 dalek rakudo: 2e3a51a | pmichaud++ | :
09:29 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
09:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​e3a51a295f68f3fde3eaaaf3efd70ff0e613183
09:30 pmichaud +3143 new passing tests since March release.  :-)
09:30 moritz_ and we have another week before the April release, no?
09:31 masak aye.
09:31 moritz_ anyway, I'm off for some fantasy RPG ;-)
09:32 moritz_ have fun hacking!
09:32 masak moritz_: have the appropriate amount of fantasy fun.
09:32 moritz_ ;-)
09:32 pmichaud April release should be the 23rd
09:32 * moritz_ senses some conspiracy ;-)
09:35 cosimo finally built perl6.exe for win32 \o/
09:36 cosimo (again)
09:37 arnsholt joined #perl6
09:37 masak cosimo++
09:39 cosimo core tests pass
09:40 masak szabgab: say [+] lines("numbers.txt")
09:41 c9s__ joined #perl6
09:43 cosimo i'm trying with this:
09:43 cosimo my $sum = [+] lines('...'); say $sum
09:43 cosimo and it works
09:43 jeremiah1 joined #perl6
09:43 cosimo while 'my Int $sum = ...' does not
09:44 masak all languages may be equivalent in some sense, but that one-liner is quite a good example of Perl 6 helping you think faster.
09:44 * cosimo just playing around...
09:44 masak cosimo: there's a ticket about that.
09:44 masak cosimo: I dislike that slightly too.
09:44 masak cosimo: the problem is that the result of + is a Num, not an Int.
09:45 masak cosimo: so if you do Num, you should be fine.
09:45 jnthn oh hai I haz arrivals
09:46 masak jnthn++ # not getting lost
09:46 jnthn Just followed the tram tracks
09:46 baest jnthn: you walked?
09:46 jnthn aye
09:47 baest wow, seemed far
09:47 jnthn yeah, a little way
09:47 barney joined #perl6
09:48 jnthn otoh I walked four and a half hours last weekend with only a 10 minute break, so walking a long way is fine for me. :-)
09:49 masak rakudo: sub avg(@v) { ([+] @v)/@v }; my @values = <3 8 19 -7 13>; say avg(@values); say [min] @values; say [max] @values
09:49 p6eval rakudo 2e3a51: OUTPUT«7.2␤-7␤8␤»
09:49 baest well, yes, I was thinking about the consumption of alcohol yesterday, I wasn't thinking about walking when I woke up
09:49 masak jnthn: what's up with that last value?
09:49 masak jnthn: oh!
09:49 masak jnthn: Str comparison, right?
09:50 jnthn Yeah
09:50 jnthn min will be seeing it as a str I guess?
09:50 masak rakudo: sub avg(@v) { ([+] @v)/@v }; my @values = 3, 8, 19, -7, 13; say avg(@values); say [min] @values; say [max] @values
09:50 p6eval rakudo 2e3a51: OUTPUT«7.2␤-7␤19␤»
09:50 masak that works.
09:51 * jnthn notes we're up to 320 tickets now
09:51 baest ummm nice
09:51 cosimo rakudo: my @lines = <a b c>; say @lines
09:51 p6eval rakudo 2e3a51: OUTPUT«abc␤»
09:51 cosimo rakudo: my @lines = <a b c>; say @lines.perl
09:51 p6eval rakudo 2e3a51: OUTPUT«["a", "b", "c"]␤»
09:52 jnthn rakudo: sub a(--> Int) { }
09:52 p6eval rakudo 2e3a51: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near "--> Int) {"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
09:52 jnthn std: sub a(--> Int) { }
09:52 p6eval std 26256: OUTPUT«ok 00:02 34m␤»
09:52 cosimo @lines.length doesn't exist, right?
09:52 lambdabot Unknown command, try @list
09:53 baest cosimo: I think it is @lines.elems
09:53 cosimo baest: yes, thx
09:53 masak cosimo: 'length' is kind of the banned word of Perl 6.
09:53 pmichaud or even just  +@lines
09:54 masak cosimo: because it doesn't specify units, and thus is wildly ambiguous.
09:54 jnthn Think of length as the opposite of context and proto. ;-)
09:54 masak jnthn: you just made pmichaud LOL. :)
09:54 TimToady 'length' is underloaded
09:54 baest heh, that's what I heard through the wall then :)
09:55 pmichaud I think my LOL is almost as distinctive as Gloria's.  :-)
09:55 ihrd left #perl6
09:55 PacoLinux joined #perl6
09:55 masak std: my @a; @a.length
09:55 p6eval std 26256: OUTPUT«ok 00:02 35m␤»
09:56 * masak gasps
09:56 jnthn rakudo: class Any is also { method length { self.elems } }; my @a = 1,2,3; say @a.length;
09:56 p6eval rakudo 2e3a51: OUTPUT«3␤»
09:56 TimToady std; my @a; @a.blurfldy
09:57 baest oh the well known method blurfldy :)
09:57 masak jnthn: we should provide an 'I-want-everything-to-be-as-in-Perl-5' module. :)
09:57 literal p6eval likes the colon
09:57 cosimo where can i find .elems mentioned in the docs? i'm trying to find it, but...
09:57 TimToady looks like I kill std:
09:57 TimToady *killed
09:57 masak it must have been the blurfldy.
09:57 pmichaud or perhaps the semi :-)
09:58 cosimo S02
09:58 TimToady std: length('ouch')
09:58 p6eval std 26256: OUTPUT«Undeclared routine:␤   length used at 1 ␤ok 00:02 35m␤»
09:58 jnthn masak: It's called "use v5" ;-)
09:59 masak jnthn: I'm just curious how much you can flex Perl 6 to look like Perl 5.
09:59 TimToady std: use v5; length('retroactive murder')
09:59 p6eval std 26256: OUTPUT«Undeclared routine:␤   length used at 1 ␤ok 00:02 35m␤»
09:59 masak TimToady: bug in STD.pm :)
10:15 mikehh rakudo (afd8ff1) on parrot r38191 - make test/make spectest PASS on Ubuntu Intrepid i386
10:34 ejs joined #perl6
10:42 jnthn plz to make .WHAT a macro...
10:43 jnthn (in Rakudo...)
10:43 hanekomu joined #perl6
10:46 KyLe48 joined #perl6
10:48 espen_ joined #perl6
10:52 hanekomu rakudo: say "test"
10:52 p6eval rakudo 2e3a51: OUTPUT«test␤»
10:52 hanekomu right
10:52 hanekomu my @a=1..3; say [+] @a;
10:52 hanekomu rakudo: my @a=1..3; say [+] @a;
10:53 p6eval rakudo 2e3a51: OUTPUT«6␤»
10:53 hanekomu rakudo: my @a=1..3; say [*|+] @a;
10:53 p6eval rakudo 2e3a51: OUTPUT«Statement not terminated properly at line 1, near "|+] @a;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
10:53 hanekomu no hyperjunctions I guess.
10:53 masak hanekomu: what did you expect that to do? :)
10:53 hanekomu not sure :)
10:53 hanekomu I'm here to break perl6
10:53 masak hanekomu: you can't junction ops inside a []-metaop.
10:54 masak hanekomu: that's the spirit :)
10:54 hanekomu although the error message isn't so great
10:54 masak hanekomu: just as with speed, the focus hasn't been on great error messages.
10:54 hanekomu sure
10:54 masak ...so far.
10:55 KyLeLaptop joined #perl6
10:57 Whiteknight joined #perl6
10:58 hanekomu rakudo: our $count; multi foo (Str $x where { ++$count }) { say "foo!" }; foo("baz"); say $count;
10:58 p6eval rakudo 2e3a51: OUTPUT«foo!␤2␤»
10:58 TimToady std: say [*|+] 1,2,3
10:58 p6eval std 26256: OUTPUT«##### PARSE FAILED #####␤Unable to parse array composer; couldn't find final ']' at /tmp/md8dJLJwwN line 1:␤------> [32msay [*|+[31m] 1,2,3[0m␤    expecting any of:␤     noun␤   prefix or meta-prefix␤      prefix_postfix_meta_operator␤     whitespace␤FAILED 00:02 37m␤»
10:58 hanekomu constraint called twice. but as jnthn explained last night they reserve the right to call the constraint as often as they like
11:01 jnthn Or as unoften. :-)
11:01 jnthn But yes, calling it twice is sub-optimal.
11:01 masak jnthn: out of curiosity, what are the two calls in this case?
11:01 jnthn One is by the multi-dispatcher
11:01 masak mhm.
11:01 jnthn The other is during the signature binding after choosing the candidate.
11:01 masak ah.
11:02 jnthn However what we really need to do is invoke the thingy and try binding the signature instead
11:02 jnthn And then fall back out but with a continuation.
11:02 jnthn And then invoke the continuation of the "winner" that we choose to eventually invoke with the bound signature.
11:02 jnthn However, this is hard. ;-)
11:03 masak bet it is.
11:03 cosimo mberends: jnthn just tried to explain me how to implement IO::Socket in rakudo... :-)
11:04 mberends cookys:
11:04 mberends cosimo: nice
11:04 hanekomu rakudo: our $count; multi foo (Str $x where { ++$count } is cached) { say "foo!" }; foo("baz"); say $count;
11:05 p6eval rakudo 2e3a51: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near "is cached)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:05 hanekomu guess not :)
11:07 jnthn :-P
11:07 jnthn I think that's not valid syntax to apply the trait to the block that way anyways...
11:07 TimToady std: our $count; multi foo (Str $x where { ++$count } is cached) { say "foo!" }; foo("baz"); say $count;
11:07 p6eval std 26256: OUTPUT«##### PARSE FAILED #####␤Malformed multi␤Malformed routine␤Unable to parse multisig; couldn't find final ')' at /tmp/ofUxHO5QCQ line 1:␤------> [32mt; multi foo (Str $x where { ++$count } [31mis cached) { say "foo!" }; foo("baz"); s[0m␤    expecting any of:␤    infix or
11:07 p6eval ..meta-infi...
11:08 jnthn Hmm....is cached is basically what the code in Role.pir does to keep the result of looking up the parametric role...
11:08 masak http://gist.github.com/97553 # NQP/actions.pm question
11:08 jnthn Could factor it out and then is cached becomes trivial.
11:08 TimToady std: our $count; multi foo (Str $x where { ++$count }) is cached { say "foo!" }; foo("baz"); say $count;
11:08 p6eval std 26256: OUTPUT«ok 00:04 41m␤»
11:09 pmichaud masak: you probably need a PAST::Var for $_
11:09 TimToady rakudo: our $count; multi foo (Str $x where { ++$count }) is cached { say "foo!" }; foo("baz"); say $count;
11:09 p6eval rakudo 2e3a51: OUTPUT«foo!␤2␤»
11:09 masak pmichaud: ok.
11:09 jnthn masak: What are you trying to do?
11:09 masak will try to find an example to cargo cult.
11:09 masak jnthn: .=foo
11:09 jnthn I fear that's the wrong place to patch...
11:09 masak jnthn: not patching, just copying to create a minimal patch.
11:09 hanekomu rakudo: ur $count; sub count is cached () { ++$count }; multi foo (Str $x where { count() }) { say "foo!" }; foo("baz"); say $count;
11:10 p6eval rakudo 2e3a51: OUTPUT«Scope not found for PAST::Var '$count' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
11:10 masak jnthn: ...which you can later critique.
11:10 hanekomu erm
11:10 hanekomu rakudo: our $count; sub count is cached () { ++$count }; multi foo (Str $x where { count() }) { say "foo!" }; foo("baz"); say $count;
11:10 p6eval rakudo 2e3a51: OUTPUT«foo!␤2␤»
11:10 hanekomu still 2. not cached...
11:10 pmichaud I'm pretty sure we don't implement "is cached" yet.
11:11 hanekomu ok
11:11 omega so, is sockets done now?
11:12 jnthn pmichaud: we don't
11:12 jnthn was pondering I've already written most of hte code to do it somewhere else though...
11:16 mberends omega: I plan to get whatever is incomplete on sockets in Rakudo fixed during this Oslo Hackathon
11:16 omega mberends: aha, cool
11:17 masak mm, sockets.
11:17 omega masak: where is Web.pm hosted?
11:18 jnthn plz who knows git?
11:18 omega marcus does
11:18 hanekomu a little bit
11:18 masak jnthn: you haz a questshun?
11:18 omega I know some, but not advanced
11:18 masak omega: github, hold on.
11:18 jnthn masak: aye, where's the config file?
11:18 masak omega: http://github.com/masak/web/
11:18 jnthn masak: Seems I did not ever commit from my laptop yet... :-S
11:19 omega jnthn: .git/config
11:19 jnthn You can't push to git://github.com/user/repo.git
11:19 jnthn Use git@github.com:user/repo.git
11:19 hanekomu add the remote to .git/config
11:19 omega in the top
11:19 jnthn ah, thanks
11:20 masak I'd just change the remote 'origin'.
11:21 jnthn oh no, now I gotta remember how to sort out the key too...
11:21 masak jnthn: ssh-add
11:22 omega theres a good guide on github
11:23 hanekomu rakudo: my @a=1..3; say [min] @a.sort;
11:23 p6eval rakudo 2e3a51: OUTPUT«1␤»
11:23 hanekomu rakudo: my @a=1..3; say [max] @a.sort;
11:23 p6eval rakudo 2e3a51: OUTPUT«3␤»
11:23 hanekomu rakudo: my @a=1..3; say [uniq] @a.sort;
11:23 p6eval rakudo 2e3a51: OUTPUT«Statement not terminated properly at line 1, near "@a.sort;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:23 hanekomu hm, doesn't work for all methods
11:24 jnthn min and max are operators, not methods
11:24 jnthn use .reduce method if you want to reduce with a code
11:25 cosimo so, you can't say @a.min
11:25 cosimo ?
11:26 hanekomu yes, you can
11:26 hanekomu but i want to try all sorts of things
11:26 jnthn ;-)
11:26 hanekomu and if min and max work, i thought uniq might as well.
11:26 masak cosimo: that's the method, which is different from the op.
11:26 hanekomu would be sort of intuitive
11:26 jnthn ok, finally I can commit :-)
11:26 jnthn well
11:26 masak hanekomu: no, not really.
11:26 jnthn push
11:27 masak hanekomu: min and max are operators. uniq is a function.
11:27 hanekomu masak: not to you because you know perl 6 well. as a newcomer, i have a different idea of "intuitive". I didn't know that min and max are operators but uniq isn't
11:27 masak hanekomu: now you know :)
11:27 masak hanekomu: the rule is that you can put operators within the []
11:28 masak and not even all operators.
11:28 masak rakudo: say [=>] <a b c d>
11:28 p6eval rakudo 2e3a51: OUTPUT«say requires an argument at line 1, near " [=>] <a b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:29 dalek rakudo: 11bc88f | unknown++ | :
11:29 dalek rakudo: Merge branch 'master' of git://github.com/rakudo/rakudo
11:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​1bc88f76100e1b1447853e9c609173b713afb70
11:29 dalek rakudo: 341f449 | unknown++ | src/classes/ClassHOW.pir:
11:29 dalek rakudo: Need to not pun calls to .WHATon a role (this can go away when .WHAT really becomes a macro).
11:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​41f4497ad020d17ac7e5e1a03036f9bc465233d
11:29 pugs_svn r26257 | jnthn++ | [t/spec] Test for role punning with a method other than .new being punned.
11:30 jnthn fail
11:30 * jnthn goes to look up how not to be unknown
11:30 cosimo rakudo: my @x = 5, 13, -3, 8; say @x.min
11:30 p6eval rakudo 2e3a51: OUTPUT«-3␤»
11:31 masak cosimo++ # not using the parens
11:32 baest How I learned to stop worrying and love not using parens
11:33 cosimo it's cool
11:33 TimToady std: say [=>] <a b c d>
11:33 p6eval std 26257: OUTPUT«ok 00:02 36m␤»
11:33 TimToady std likes it
11:34 jnthn How goes the sockets?
11:35 cosimo Ah :-)
11:35 mberends jnthn: waiting on pizza ;)
11:36 masak rakudo: "abc".comb; say "alive"
11:36 p6eval rakudo 341f44: OUTPUT«alive␤»
11:38 cosimo @x.min works on @x = <some,numbers> but returns nothing when i read @x with lines("filename")
11:38 lambdabot Not enough privileges
11:39 cosimo :)
11:39 cosimo what am i doing wrong?
11:42 omega masak: wanna give me a quick intro to Web.pm?
11:42 alanhaggai_ joined #perl6
11:43 masak http://gist.github.com/97567 # counting the words in November.pm
11:43 hanekomu rakudo: say [X] 1..4;
11:43 p6eval rakudo 341f44: OUTPUT«Statement not terminated properly at line 1, near "1..4;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:43 masak omega: absolutely. by IRC or in meatspace?
11:44 omega whicever you prefer :)
11:44 omega in person might be easier
11:44 omega pointing etc
11:44 masak aye.
11:44 * masak comes over
11:46 baest pmichaud: I'm pretty lost in PGE :( When you have time, could you introduce me to the s3cr3ts of it or tell me to stop trying :)
11:50 pmichaud baest: where are you right now?
11:50 baest pmichaud: in the next room towards the reception
11:50 pmichaud okay, brt
11:50 baest cool
11:51 wayland76 /msg all-visitors you're welcome to come here any time, you know :)
11:57 payload joined #perl6
12:00 rblasch joined #perl6
12:13 smtms joined #perl6
12:14 cosimo rakudo: my @x = '-3', '2000', '-1000', '8'; print @x.min
12:14 p6eval rakudo 341f44: OUTPUT«-1000»
12:14 cosimo rakudo: my @x = '-3', '2000', '-1000', '8'; print @x.max
12:14 p6eval rakudo 341f44: OUTPUT«8»
12:14 cosimo rakudo: my @x = '-1', '2000', '-3000', '8'; print @x.max
12:14 p6eval rakudo 341f44: OUTPUT«8»
12:15 cosimo rakudo: my @x = '-1', '2000', '-3000', '8'; print @x.min
12:15 p6eval rakudo 341f44: OUTPUT«-1»
12:15 * baest wonders why length is banned in perl6 but welcome in parrot :)
12:18 masak cosimo++
12:18 masak baest: well, one explanation is that the Parrot API congealed before the Perl 6 API did.
12:19 masak baest: another is that whereas Perl 6 is sort of restricted to conform to the regulations of Perl 6, Parrot isn't. :)
12:19 baest make sense, I was mostly failing in being funny :)
12:20 masak baest: I have a bad habit. I answer seriously to people being funny.
12:20 baest masak: but still, the same argument in Perl6 should apply to Parrot
12:20 masak that way, I don't look bad if it turns out they were actually being serious. :)
12:20 masak baest: it could, yes.
12:21 masak baest: but the fact remains that Parrot is not ruled by Perl 6 design concerns. not in that sense anyway.
12:21 baest ok
12:25 masak rakudo: .say for $_ for <a b c>, <d e f>
12:25 p6eval rakudo 341f44: OUTPUT«Use of uninitialized value␤␤Could not find non-existent sub for␤current instr.: '_block14' pc 200 (EVAL_18:85)␤»
12:25 * masak submits rakudobug
12:25 masak YaY!
12:25 baest masak: first of the day?
12:25 cognominal joined #perl6
12:25 wayland76 masak: Let's test your habit.  "If the opposite of pro is con, then the opposite of progress is?"
12:25 masak baest: nod.
12:26 masak wayland76: retrogression.
12:26 wayland76 Yup, it works :)
12:26 masak wayland76: and you're trying to use a fallacy of analogy there.
12:26 masak wayland76: and that doesn't work. :P
12:26 wayland76 I'd say it's more a linguistic accident :)
12:27 masak linguistic shit happens.
12:28 LylePerl Hi All
12:28 masak std: .say for $_ for <a b c>, <d e f>
12:28 p6eval std 26257: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/iAUpOSIj1K line 0:␤------> [32m[31m[0m␤    expecting any of:␤    infix or meta-infix␤      infix stopper␤    parameterized block␤      standard stopper␤FAILED 00:02 37m␤»
12:28 masak LylePerl: hi.
12:28 LylePerl hi masak
12:28 LylePerl how did NPW go?
12:29 masak LylePerl: NPW was a success. it got people wildly interested in Perl 6.
12:29 masak everyone's hacking on their new Perl 6 projects now.
12:29 LylePerl masak: Brilliant :)
12:29 masak indeed.
12:30 baest masak: I think many of us already was interested, we're just coming out of our bushes now :)
12:30 masak baest: worksforme.
12:30 imarcusthis bush people
12:31 pnu NEXT block is not implemented, right?
12:32 kimtaro joined #perl6
12:33 pugs_svn r26258 | cosimo++ | [t/spec] Added min/max tests to S32-list when input is read from a file
12:34 cosimo now forgive me please :-)
12:34 masak pnu: for <a b c> { NEXT {} }
12:35 masak rakudo: for <a b c> { NEXT {} }
12:35 p6eval rakudo 341f44: OUTPUT«Could not find non-existent sub NEXT␤current instr.: '_block28' pc 207 (EVAL_17:99)␤»
12:35 masak pnu: right. NYI.
12:35 LylePerl I've been learning some parrot to try and figure the best way to write tests for chdir
12:35 LylePerl I came across http://docs.parrot.org/parrot/l​atest/html/src/pmc/os.pmc.html
12:35 masak well, there you go.
12:36 LylePerl So have been temped to write and spec for mkdir as well and have a go at implementing those
12:36 LylePerl (I'm guessing it should be easy as it sits on top of the parrot ops)
12:36 LylePerl to test chdir, I need a cwd
12:37 LylePerl I can't find cwd mentioned anywhere in the docs
12:37 LylePerl I could just drop down to parrot in the test, but perl 6 is going to need some kind of cwd
12:37 LylePerl perl6: $*CWD.say
12:37 p6eval rakudo 341f44: OUTPUT«Use of uninitialized value␤␤»
12:37 p6eval ..elf 26258, pugs: OUTPUT«␤»
12:38 baest LylePerl: there is a STRING *cwd() in STRING *cwd()
12:38 masak buubot: spack cwd
12:38 buubot masak: Sorry, I couldn't find any matches for: cwd
12:38 baest sorry in http://docs.parrot.org/parrot/l​atest/html/src/pmc/os.pmc.html
12:38 LylePerl PUGS $*CWD.say works for me locally
12:39 LylePerl baest: I know
12:39 baest cwd is a method
12:40 LylePerl perl 5  doesn't have a cwd built in, but has Cwd.pm
12:41 LylePerl I was hoping TimToady might give a pointer as to how he wants to deal with this since $*CWD has been dropped
12:42 masak LylePerl: what, specifically, is it that you'd like to have clarified?
12:42 LylePerl How to get current working directory in perl 6
12:43 LylePerl whether a method should be implemented, or a variable or an object
12:43 LylePerl I know that time this came up he mentioned a $CD object or something
12:43 masak hm.
12:43 masak there's an OS class in S29.
12:44 masak but maybe that's not the right place to put it, because it's not the OS that's changing directories, it's the program context.
12:44 LylePerl S29 doesn't mention any cwd though
12:44 masak LylePerl: right, none of the specs do.
12:45 LylePerl That's why I haven't implemented the tests, I wanted to know which way this was going first
12:45 LylePerl on Linux you can just grab the PWD Env, but that isn't portable
12:45 masak sure. :) just don't expect that someone will necessarily come forward and tell you.
12:46 Psyche^ joined #perl6
12:46 masak the usual way this happens is that someone commits a draft-like suggestion, and people say "yes, that's fine" or "no, that's not so good".
12:47 LylePerl Ok. I'll bite the bullet and put some more suggests in the spec
12:47 masak if you create a new class DirectoryChanger with the sole method cwd, that would at least create some debate. :P
12:48 Whiteknight joined #perl6
12:49 LylePerl I thought maybe add it to IO::DirectoryNode?
12:49 wayland76 How about IO::FileSystem?
12:50 TimToady LylePerl: whatever we come up with has to support both one current dir for the whole process (Unix model) or a separate current directory for any dynamic scope that overrides the current directory, which supports things like an apache server running independent threads
12:50 pnu multi sub based on return value type .. NYI or not specd?
12:50 TimToady the latter has to have some support from with IO, of course
12:51 wayland76 At onepoint, Tree was going to handle this, but Tree got scrapped :)
12:51 TimToady specced as not necessary for 6.0
12:51 jnthn And as a result not implemented. ;-)
12:51 masak pnu: you can do it already with 'where' clauses.
12:51 masak std: *\i
12:51 p6eval std 26258: OUTPUT«ok 00:02 35m␤»
12:52 TimToady LylePerl: another design point is that the same interface should work for both cases, so that you can incorporate a standalone script in a server
12:52 jnthn That is provided you mean multi x() returns Int { } and multi x() returns Str { } and expect them to differentiate on the return type of that multi.
12:52 wayland76 Can you believe my NetBook didn't have the Perl documentation installed? :)
12:53 pnu jnthn: yes, based on the callers context.. where i'm putting the return value.
12:53 LylePerl TimToady: I assume the cwd from parrot of PMC is for the whole process... And the dynamic one would have to be implemented differently?
12:54 TimToady $*CWD (or whatever name we end up with) is a contextual variable, so can be overridden in a dynamic scope
12:54 TimToady so separate threads could have different wds
12:55 TimToady at a fundamental level we're trying to get the same abstract separation that Unix processes get, only between threads
12:55 TimToady and contextual variables are really modelled on env vars
12:55 TimToady (except we can have rw ones)
12:55 TimToady where any child can write
12:56 TimToady so such a variable would have to have locking
12:56 wayland76 Have we taken into account that Windows systems have a separate CWD for each drive?
12:56 TimToady no
12:56 masak should we?
12:57 TimToady I am dubious :)
12:57 LylePerl If the script has only one $*CWD I wouldn't have thought it mattered
12:58 LylePerl switching drives in the $*CWD would just adjust that individual drives cwd
12:58 DemoFreak joined #perl6
12:58 LylePerl You wouldn't be pointing to the old one so it's CWD wouldn't matter
12:58 LylePerl (i think) :s
12:59 TimToady I know folks would would say "You're using Windows, so it wouldn't matter."  :P
12:59 pmichaud (length in parrot):  It's also useful to remember that Parrot's original target wasn't really Perl 6, but rather a "best guess" at what Perl 6 might be like given the current knowledge of Perl 5.
12:59 TimToady *who would
12:59 pmichaud So in many ways, Parrot targets Perl 5 more than Perl 6.  :-|
13:00 TimToady how do we then explain that Parrot runs Perl 6 better than it runs Perl 5?  :)
13:00 wayland76 Incentive :)
13:01 wayland76 Although some think (obfus)Perl code resembles invective more than incentive :)
13:02 omega http://gist.github.com/97592
13:02 omega am I the only one who think something like that makes sense?
13:03 masak omega: November actually has that.
13:03 omega yeah, I know
13:04 masak we have been wanting to go back to Rakudo's own Test.pm, but we like got/expected too much.
13:04 masak there was a patch in RT to add it, but I think it stalled because people said that Test.pm was being integrated into the core of Rakudo anyway.
13:04 omega aha
13:05 pmichaud I don't know that Test.pm will integrate anytime soon.
13:05 pmichaud So if someone wants to apply something like 97592, I'm okay with that.
13:05 omega well, I'll just keep it in my local copy anyways
13:05 cspencer joined #perl6
13:05 masak omega: :)
13:05 LylePerl jnthn: any tips on bits of code I should look at to try and implement $*CWD?
13:06 jnthn maybe Parrot's OS PMc.
13:07 LylePerl jnthn: yes I've had a play with that. But I've no idea how to setup $*CWD and link in with parrots os.cwd on changes
13:08 LylePerl perl6: $*PID.say
13:08 p6eval rakudo 341f44: OUTPUT«Use of uninitialized value␤␤»
13:08 p6eval ..pugs: OUTPUT«␤»
13:08 p6eval ..elf 26258: OUTPUT«24590␤»
13:08 masak moritz_: ping.
13:09 omega whats a good place to read about Rules?
13:09 LylePerl my local pugs returns a PID as well...
13:09 masak omega: S05.
13:10 masak omega: http://perlcabal.org/syn/S05.html
13:10 LylePerl jnthn: seems the windows pugs off your site behaves differently to this evalbot
13:12 jnthn rakudo: role Foo { }; my $x = Foo.new; say $x.WHAT
13:12 p6eval rakudo 341f44: OUTPUT«␤»
13:12 masak fail.
13:12 masak jnthn: is that submitted?
13:15 ilogger2 joined #perl6
13:15 sitaram joined #perl6
13:16 LylePerl perl6: $*OS.say
13:16 p6eval elf 26258, rakudo 341f44: OUTPUT«linux␤»
13:16 p6eval ..pugs: OUTPUT«␤»
13:18 spx2 joined #perl6
13:18 spx2 are threads going to be the same mess in perl6 as in perl5 ?
13:18 spx2 are they implemented yet in perl6 ?
13:19 masak spx2: no, and no.
13:19 masak :)
13:19 cspencer good morning all :)
13:19 masak spx2: but your question seems to assume that there's only one Perl 6 implementation.
13:19 masak cspencer: OH HAI
13:20 cspencer masak: OH HAI
13:22 omega grammars and classes live in the same namespace?
13:22 wayland76 spx2: The thread spec is not finalised
13:22 masak rakudo: class A {}; grammar A {}
13:22 p6eval rakudo 341f44: OUTPUT«Re-declaration of type A at line 1, near ""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:22 wayland76 in fact, it's a real mess
13:22 masak omega: aye.
13:23 wayland76 There've been at least 3 attempts to write a thread spec (S17), and bits of all of them are still in there
13:23 eiro hello all
13:23 masak eiro: hi!
13:23 wayland76 About the only thing I know is that it seems like people want to use a model which has an event loop underlying threads
13:23 eiro i'm trying to redefine the NL of $*IN.
13:24 wayland76 NL?
13:24 eiro but i don't know how to tell: \x1f
13:24 cspencer has running test in parallel during a "make spectest" always been there? :)
13:24 eiro $/ is now nl :)
13:24 wayland76 ok
13:24 eiro i'm reading S06 ... no clue for the moment
13:24 spx2 wayland76: lol , so they want to write event-based instead of parallel things ?
13:25 spx2 wayland76: so everyone has this POE-like mindset in Perl
13:25 wayland76 Spx: I'll find the link for the thing they like.  Justamo
13:25 eiro rakudo: say "\x{1d}"
13:26 eiro :(
13:26 p6eval rakudo 341f44: OUTPUT«Unable to parse block; couldn't find final '}' at line 1, near "1d}\""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:26 wayland76 Spx: http://www.seas.upenn.edu/~​lipeng/homepage/unify.html
13:26 wayland76 Click on the first link under "Documentation"
13:26 wayland76 Keep in mind that the people who wrote that weren't thinking of Perl at all
13:27 spx2 wayland76: so you're trying to copy Haskell in that regard...
13:27 wayland76 Also, the last time someone mentioned POE, someone else said we should be looking at AnyEvent instead (I think it was AnyEvent)
13:27 cosimo now forgive me please :-)
13:27 pmichaud rakudo: say "\x[1d]"
13:27 p6eval rakudo 341f44: OUTPUT«␤»
13:27 wayland76 spx2: I only know what they told me :)
13:27 masak rakudo: say "\c[0x1d]"
13:28 p6eval rakudo 341f44: OUTPUT«perl6regex parse error: Invalid digit in \x[...], \o[...], or \c[...] at offset 9, found 'x'␤current instr.: 'parrot;PGE;Perl6Regex;parse_error' pc 10552 (compilers/pge/PGE/Perl6Regex.pir:1323)␤»
13:28 spx2 oh boy this is gonna take lots of time , so Perl6 will also have broken threads
13:28 spx2 this is good to know
13:28 wayland76 spx2: broken in what way?
13:29 wayland76 What do you think would be better?
13:30 eiro masak, pmichaud thx. from what syn ? (if you know)
13:30 wayland76 (That's a genuine question -- I personally freely admit that I have no idea about threads; that's why I'm not working on S17)
13:31 pmichaud eiro: S02
13:31 wayland76 spx2: Or let me ask a different question -- Who/what do you think does threads well?
13:31 omega http://gist.github.com/97606
13:31 pmichaud eiro:  at the section beginning "Characters indexed by hex numbers" ...
13:32 omega so, that doesn't work, obviously :p
13:32 omega but why does it fail in line 7?
13:32 * masak looks
13:32 omega Statement not terminated properly at line 7, near "/;\n       "
13:32 eiro ok... thanks (i learn to fish)
13:32 omega I first tried the one from S05, towards the bottom
13:32 masak omega: try '$_ ~~ ' instead of 'm'
13:32 dalek rakudo: cdd84c6 | jnthn++ | src/classes/Role.pir:
13:32 dalek rakudo: When you pun a role, instances of the class should have a .WHAT that stringifies to the class name. This patch also attaches the parameters a role was instantiated with to the role.
13:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​dd84c652023773f18f57c709c12d4ca3bacea06
13:33 omega $parsetree = m:keepall/<Perl.prog>/;
13:33 pugs_svn r26259 | jnthn++ | [t/spec] Test that .WHAT on an instance of a class punned from a role stringifies to the role name.
13:33 eiro $*IN.nl("\x[1d]"); don't work ... but open has a nl parameter :(
13:33 Pompel joined #perl6
13:33 masak omega: I don't think 'm' is implemented yet, and boolean context of Regex is still slightly wonky.
13:34 omega $parsetree = m:keepall/<Perl.prog>/;
13:34 omega argh, wrong window
13:34 omega masak: aha, ok
13:34 PhatEddy joined #perl6
13:35 masak omega: or, instead of lines 5-8, simply 'my $parsetree = $in ~~ /.../'.
13:35 PhatEddy rakudo: say
13:35 p6eval rakudo cdd84c: OUTPUT«say requires an argument at line 1, near ""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:36 PhatEddy not very dwimmy I think ...
13:36 masak PhatEddy: it's by design.
13:36 wayland76 Would it be possible to make a quote operator that does sprintf?
13:36 masak PhatEddy: it's so that people won't write 'say for <a b c>'
13:36 omega masak: yeah, trying that now
13:36 masak wayland76: sure, once we have macros and/or operatory overloading.
13:36 omega masak: but it still fails out :/
13:37 masak omega: new paste, please?
13:37 wayland76 Cool, that's what I thought
13:37 omega http://gist.github.com/97609
13:37 pmichaud at the moment Rakudo doesn't recognize m/.../ as forcing an immediate match.
13:37 masak omega: try without 'm'.
13:37 omega .Statement not terminated properly at line 5, near "/;\n       "
13:38 omega kk
13:38 wayland76 In the back of my mind, I'm trying to figure out how to combine sprintf, pack, and Form.pm all into one big language
13:38 omega Statement not terminated properly at line 5, near "~~ /<EasyC"
13:38 Guest73590 joined #perl6
13:38 masak omega: wtf?
13:38 masak rakudo: my $a = "foo"; my $parsetree = $a ~~ /foo/;
13:38 p6eval rakudo cdd84c:  ( no output )
13:38 masak rakudo: my $a = "foo"; my $parsetree = $a ~~ /foo/; say $parsetree.WHAT
13:38 p6eval rakudo cdd84c: OUTPUT«Match␤»
13:39 masak rakudo: regex foo { foo }; my $a = "foo"; my $parsetree = $a ~~ /<foo>/; say $parsetree.WHAT
13:39 p6eval rakudo cdd84c: OUTPUT«Match␤»
13:39 masak omega: how is this different from what you're doing?
13:39 omega I'm trying to use a Grammar I guess?
13:39 masak omega: oh, you have a dot inside the <>
13:39 dalek rakudo: a245b4d | (Cory Spencer)++ |  (2 files):
13:39 dalek rakudo: Add samecase method to the Any class in the setting.
13:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​245b4d748bf4dbb0164770683dee7815638c486
13:39 dalek rakudo: 6739243 | (Cory Spencer)++ | :
13:39 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
13:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​7392434b9008215367678a2d2f69c7cb45281ca
13:40 masak omega: try :: instead.
13:40 omega masak: ahh, the spec said .
13:40 frettled joined #perl6
13:40 masak omega: oh.
13:40 * masak looks
13:40 omega yiha, now it works :p
13:40 omega $parsetree = m:keepall/<Perl.prog>/;
13:41 masak omega: indeed.
13:41 omega masak: thanks for the help :)
13:41 masak omega: np
13:41 masak TimToady: is it <Grammar.rule> or <Grammar::rule>?
13:41 payload joined #perl6
13:41 masak std: grammar A { rule b { b } }; /<A::b>/
13:42 p6eval std 26259: OUTPUT«ok 00:03 36m␤»
13:42 masak std: grammar A { rule b { b } }; /<A.b>/
13:42 p6eval std 26259: OUTPUT«ok 00:02 35m␤»
13:42 masak :/
13:42 spx2 wayland76: c++ with posix threads , python
13:43 namsa__ joined #perl6
13:44 wayland76 spx2: Thanks.
13:44 PhatEddy about "say" say by itself, might a note in S32 IO.pod make sense?  I didn't see one ...
13:44 masak so, either S05:3789 or Rakudo does it wrong.
13:45 * masak submits rakudobug
13:45 eiro i tried input_rec_separator (S28) and nl (S16) but i can't figure out how to set $/
13:46 masak eiro: recall that $/ means something completely different in Perl 6 than in Perl 5. but maybe you just meant that loosely. :)
13:47 omega bleh, whenever I try to do something I get Null PMC access in get_bool() :/
13:48 PhatEddy rakudo: sub foo { say "hi" }; foo()
13:48 p6eval rakudo 673924: OUTPUT«hi␤»
13:48 PhatEddy rakudo: say()
13:48 p6eval rakudo 673924: OUTPUT«say requires an argument at line 1, near ""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:48 hanekomu what's the difference between the synopses and u4x? They both aim to be "the documentation", right?
13:49 masak hanekomu: u4x is not at all official.
13:49 masak it just aims to be.
13:49 masak it says so in the README, I think.
13:49 hanekomu ok, but it seems like u4x could use most (if not all) of the synopses' contents
13:50 masak currently, the Specs are actually claiming to be the user documentation as well.
13:50 masak but I think they are too compact and dense for regular users.
13:50 hanekomu viewed that way u4x would be a kind of unofficial extension of S*
13:50 masak hanekomu: sort of, yes.
13:50 TimToady masak: it's :: because what's really going on is Cursor.Grammar::rule()
13:50 TimToady well, $cursor.Grammar::rule
13:50 eiro masak, i know it's different :) i want to reopen $*IN at the $*IN address but with a different ... RS ?
13:50 masak TimToady: I can patch S05 if you want.
13:50 TimToady fine
13:50 masak I'll close the bug, too. :)
13:51 masak eiro: right. take a look in the Setting in Rakudo.
13:51 masak specifically, the open and slurp functions.
13:52 eiro i try it
13:52 PhatEddy rakudo: say() for <a b c>
13:52 cspencer is "multi method foo" is considered to be different than "multi method foo()"?
13:52 p6eval rakudo 673924: OUTPUT«say requires an argument at line 1, near " for <a b "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:52 pmichaud Yes.
13:52 cspencer iirc, the latter specifies that foo has no args, correct?
13:52 masak cspencer: aye.
13:53 masak cspencer: the former gives it a default slurpy hash.
13:53 cspencer should i fix methods in the setting then that omit the "()"
13:53 cspencer ah ok, makes sense
13:53 masak cspencer: if they are wrong, sure.
13:53 wayland76 Question -- do any of the P6 people know anything about threads?
13:54 pmichaud actually, without the parens gives a default slurpy _array_
13:54 pmichaud all methods get a default slurpy hash
13:55 TimToady but nameds don't participate in multi method dispatch in any case
13:56 eiro rakudo: say for $*IN.HOW
13:56 p6eval rakudo 673924: OUTPUT«say requires an argument at line 1, near "for $*IN.H"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
14:01 PhatEddy rakudo: 3.HOW.say
14:01 p6eval rakudo 673924: OUTPUT«Could not locate a method 'say' to invoke on class 'P6metaclass'.␤current instr.: 'die' pc 17354 (src/builtins/control.pir:222)␤»
14:01 PhatEddy rakudo: say 3.HOW
14:01 dalek rakudo: 27b0b76 | pmichaud++ | :
14:01 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
14:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​7b0b766c497fddf3405f3f20201545ae8a7d524
14:01 p6eval rakudo 673924: OUTPUT«␤»
14:02 pugs_svn r26260 | hanekomu++ | fixed missing quote in code
14:04 PhatEddy Why aren't those last two the same?
14:05 pmichaud currently a P6metaclass knows how to stringify, but it doesn't know how to .HOW
14:05 TimToady rakudo: 3.how.Str.say
14:05 pmichaud sorry, it doesn't know how to .say
14:05 p6eval rakudo 673924: OUTPUT«Method 'how' not found for invocant of class 'Int'␤current instr.: 'parrot;P6metaclass;dispatch' pc 662 (src/classes/ClassHOW.pir:171)␤»
14:05 TimToady rakudo: 3.HOW.Str.say
14:05 p6eval rakudo 673924: OUTPUT«Could not locate a method 'Str' to invoke on class 'P6metaclass'.␤current instr.: 'die' pc 17354 (src/builtins/control.pir:222)␤»
14:05 cosimo IO::Socket!!!
14:06 pmichaud rakudo:  ~(3.HOW).say
14:06 p6eval rakudo 673924: OUTPUT«Could not locate a method 'say' to invoke on class 'P6metaclass'.␤current instr.: 'die' pc 17354 (src/builtins/control.pir:222)␤»
14:06 pmichaud oops
14:06 pmichaud rakudo:  (~(3.HOW)).say
14:06 p6eval rakudo 673924: OUTPUT«get_string() not implemented in class 'P6metaclass'␤current instr.: 'prefix:~' pc 22863 (src/builtins/op.pir:145)␤»
14:06 pmichaud bah.
14:06 pmichaud I don't know why.  :-)
14:06 masak pmichaud: bug? :)
14:07 alc joined #perl6
14:09 pmichaud well, the result of .HOW isn't currently a subclass of Object, so that's why it didn't understand .Str
14:09 pmichaud I'm not sure why it "works"  with   say 3.HOW
14:09 pmichaud rakudo: say 3.HOW
14:09 p6eval rakudo 673924: OUTPUT«␤»
14:09 eiro .slurp.split("\x[1d]") finally ...
14:09 pmichaud rakudo:  say 3.HOW.PARROT;
14:09 p6eval rakudo 673924: OUTPUT«Could not locate a method 'PARROT' to invoke on class 'P6metaclass'.␤current instr.: 'die' pc 17354 (src/builtins/control.pir:222)␤»
14:12 hanekomu make spectest failure. http://pastebin.com/m575f9b39
14:12 buubot hanekomu: The paste m575f9b39 has been copied to http://erxz.com/pb/17098
14:12 hanekomu sorry, i don't know what the official way to report it is
14:13 omega ok, where can I read about the Match-object?
14:14 omega ergh
14:14 omega I found that
14:14 omega damn wrong windows :/
14:14 omega does Match.caps work?
14:15 masak rakudo: say ("foo" ~~ /foo/).caps
14:15 p6eval rakudo 673924: OUTPUT«␤»
14:15 masak rakudo: say ("foo" ~~ /foo/).uc
14:15 p6eval rakudo 673924: OUTPUT«FOO␤»
14:16 * masak suddenly remembers what 'caps' does
14:17 masak rakudo: say ("foo" ~~ /(foo)/).caps
14:17 p6eval rakudo 27b0b7: OUTPUT«0  foo␤»
14:17 masak omega: aye.
14:17 eiro say "$^nth time!" for 1..3  doesn't work ( $^nth ) ?
14:17 TimToady placeholders are only for use within bare curlies
14:18 eiro ok. thx for confirm it
14:18 pmichaud masak:  have the rt patch number handy?
14:18 masak pmichaud: hold on.
14:19 TimToady however, a bare block in a for gets executed immediately (in theory), so { say "$^nth time!" } for 1..3 should work
14:19 TimToady don't think rakudo does it yet though
14:19 TimToady rakudo: { say "$^nth time!" } for 1..3
14:19 hanekomu does it
14:19 p6eval rakudo 27b0b7: OUTPUT«1 time!␤2 time!␤3 time!␤»
14:20 TimToady wowee
14:20 TimToady paint me impressed
14:20 * pmichaud paints a hat on TimToady.
14:20 TimToady but you made it brown!?!
14:21 TimToady and now my shirt and pants are brown too!!!
14:21 pmichaud indeed.  :-)
14:22 masak pmichaud: no RT tickets, but there's an email from Ovid on Jan 22.
14:22 baest pmichaud: hmm, I don't get it. I have a "expr = regex(mob, 'tighter'=>'infix:') " which simply refuses to do anything. Maybe a misunderstood something
14:22 hanekomu rakudo: my $x = { "iteration $^nth" }.(1..3); say $x;
14:22 p6eval rakudo 27b0b7: OUTPUT«iteration 1 2 3␤»
14:23 hanekomu rakudo: my $x = { "iteration $^nth $^z" }.(1..3); say $x;
14:23 TimToady rakudo: my @x = ({$^nth ~ ' time} for 1..3); say @x
14:23 p6eval rakudo 27b0b7: OUTPUT«too few arguments passed (1) - 2 params expected␤current instr.: '_block21' pc 125 (EVAL_19:57)␤»
14:23 p6eval rakudo 27b0b7: OUTPUT«Statement not terminated properly at line 1, near "~ ' time} "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
14:23 hanekomu so it uses all args if you only have $^nth, but complains if you add $^z... hm.
14:24 TimToady no, only if you use a for
14:24 pmichaud std: sub if-abs($x) { say $x; };   if-abs(3) { say 'oops'; }
14:24 p6eval std 26260: OUTPUT«##### PARSE FAILED #####␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/mHJi2Frvog line 1:␤------> [32msub if-abs($x) { say $x; };   if-abs(3) [31m{ say 'oops'; }[0m␤    expecting any of:␤   infix or meta-infix␤
14:24 p6eval ..infix st...
14:24 hanekomu i didn't use a for up there
14:24 TimToady 1..3 is a single argument
14:24 hanekomu it's not an array?
14:24 TimToady an array is also a single argument
14:25 TimToady you'd have to use prefix:<|> before either of those to flatten
14:25 Limbic_Region joined #perl6
14:25 hanekomu rakudo: my $x = { "iteration first $^x second $^y third $^z" }.(1..3); say $x;
14:25 p6eval rakudo 27b0b7: OUTPUT«too few arguments passed (1) - 3 params expected␤current instr.: '_block21' pc 125 (EVAL_19:57)␤»
14:25 hanekomu ok
14:26 cosimo joined #perl6
14:26 hanekomu that's a source for confusion though :)
14:26 TimToady rakudo: my $x = { "iteration first $^x second $^y third $^z" }.(|1..3); say $x
14:26 p6eval rakudo 27b0b7: OUTPUT«argument doesn't array␤current instr.: 'infix:..' pc 10343 (src/classes/Range.pir:138)␤»
14:26 masak rakudo: my $x = { "iteration first $^x second $^y third $^z" }.(list 1..3); say $x
14:26 p6eval rakudo 27b0b7: OUTPUT«too few arguments passed (1) - 3 params expected␤current instr.: '_block21' pc 136 (EVAL_19:58)␤»
14:26 TimToady rakudo: my $x = { "iteration first $^x second $^y third $^z" }.(|[1..3]); say $x
14:26 p6eval rakudo 27b0b7: OUTPUT«iteration first 1 second 2 third 3␤»
14:27 hanekomu hm
14:27 hanekomu not so intuitive
14:27 TimToady what's not intuitive
14:28 DJ-DONGDOT joined #perl6
14:28 hanekomu having to use |[1..3] instead of just 1..3 when using three $^x variables
14:28 hanekomu ok, an array is a single arg, but still... hm
14:28 eiro wow! impressive!
14:29 hanekomu maybe i'm still thinking to much in perl 5
14:29 hanekomu but then i guess most people who'll switch to perl 6 will do :)
14:29 TimToady the whole autoflattening thing is inside out so that parameters like @foo and %bar behave correctly
14:29 dalek rakudo: 669fb45 | (Cory Spencer)++ | src/ (2 files):
14:29 dalek rakudo: Moved join method from builtins to setting.
14:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​69fb45ad25cb0b78390de3582c7b7df377db455
14:29 dalek rakudo: a58fce6 | (Cory Spencer)++ | :
14:29 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
14:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​58fce671d420c99c4f0c99646856331bbc46477
14:29 masak pmichaud: how was it again that one tied an actions class to a grammar?
14:29 masak I keep forgetting...
14:30 TimToady and context is lazily determined at binding time
14:30 eiro i just don't understand what |[1..3] can be
14:30 wayland76 eiro: [1..3] is an array reference
14:30 TimToady the | tells whatever follows to become multiple arguments
14:30 baest masak: parsefile('file', :action($object_of_action))
14:30 TimToady even in P5, [1..3] would be a scalar
14:31 masak pmichaud: does it work with parse as well?
14:31 wayland76 rakudo: [1..3]
14:31 hanekomu TimToady: yes, but 1..3 would be a list :P
14:31 p6eval rakudo 27b0b7:  ( no output )
14:31 wayland76 rakudo: say [1..3]
14:31 p6eval rakudo 27b0b7: OUTPUT«1 2 3␤»
14:31 wayland76 rakudo: say |[1..3]
14:31 pmichaud std:  if-abs(3) { say 'hello'; }
14:31 p6eval rakudo 27b0b7: OUTPUT«123␤»
14:31 p6eval std 26260: OUTPUT«##### PARSE FAILED #####␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/8qEfJN4mYs line 1:␤------> [32mif-abs(3) [31m{ say 'hello'; }[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard
14:31 p6eval ..stopper␤ term...
14:31 TimToady in P6 .. makes a Range object, which flattens, but only in list context
14:31 masak rakudo: grammar A { regex TOP { foo } }; class Act { method foo($/) { say "OH HAI" } }; A.parse("foo", :action(Act))
14:31 p6eval rakudo 27b0b7:  ( no output )
14:31 omega is there an example of a simple Grammar some place?
14:32 masak pmichaud: should that work?
14:32 TimToady and $^foo provides scalar context
14:32 hanekomu right
14:32 masak omega: see moritz_' perl5-to-perl6 blog.
14:32 TimToady likewise for parens
14:32 pmichaud masak: I think that should work.
14:32 masak omega: or S05.
14:32 wayland76 omega: You mean simpler than the one masak just posted?
14:32 hanekomu rakudo: my $x = { "got @^x" }.(1..3); say $x;
14:32 TimToady (1,2,3) interpolates in list context, but not item context
14:32 * masak submits rakudobug
14:32 p6eval rakudo a58fce: OUTPUT«got @^x␤»
14:32 hanekomu :)
14:33 masak hanekomu: so, arrays are only interpolated if they have [] after them.
14:33 masak hanekomu: but that's NYI in Rakudo.
14:33 TimToady which rakudo doesn't do yet
14:33 omega wayland76: well, a bit more complex than that :p
14:33 pmichaud (working on it :-)
14:33 omega masak: thanks :p
14:33 masak hanekomu: you can generally use a {} block, but not in this case.
14:33 TimToady but you can't put in {} either, since
14:33 masak omega: np
14:33 eiro so |[1..3] isn't intuitive: i agreed
14:33 TimToady that would have its own $^vars
14:33 masak hanekomu: since that creates a new block.
14:34 wayland76 ECANTKEEPUP
14:34 hanekomu me neither :)
14:34 baest masak: it works for me, maybe you need :action(Act.new())
14:34 eiro and in fact i'll tried *[1..3]
14:34 TimToady ARR, THEM THAT FALLS BEHIND GETS LEFT!
14:34 masak betterworld: no, I tried that, and it doesn't work either.
14:34 masak oops
14:35 imarcusthis TimToady: All kids left behind?
14:35 kcwu_ joined #perl6
14:35 hanekomu perl 6 takes no prisoners!
14:35 masak baest: no, I tried that, and it doesn't work either.
14:35 wayland76 Is it "Talk Like a Pirate" day already?
14:35 masak baest: can you make p6eval do it?
14:35 TimToady * hasn't been a prefix op for some time now
14:35 wayland76 Or is this a special because of the Pirate Bay case?
14:35 frettled I think I might like to fix one or two things in the POD files for the Perl 6 spec (syntax error, invalid characters in the character sets, invalid character set declaration, etc.), should the spec docs be in UTF-8 or Latin-1?
14:36 wayland76 UTF-8
14:36 wayland76 I could be wrong, but I doubt it
14:36 frettled Okay, so we need to lose the Latin-1 characters and remove the invalid UTF-8 strings, then.
14:36 TimToady think of the | as a sword cut into which you can stuff the extra arguments
14:37 masak rakudo: Grammar.parsefile("README")
14:37 p6eval rakudo a58fce: OUTPUT«The grammar has no TOP rule to invoke.␤current instr.: 'die' pc 17309 (src/builtins/control.pir:225)␤»
14:37 masak bug or feature? :P
14:38 TimToady is that an inclusive or?
14:39 wayland76 Well, hopefully replace them with something correct :)
14:39 frettled masak: does it wear a tie?
14:39 masak frettled: no, it wears a junction of a tie and a belt.
14:40 PhatEddy left #perl6
14:40 omega haha
14:40 frettled :)
14:40 omega is the regex named text bug still there?
14:40 wayland76 food afk &
14:40 masak omega: aye.
14:40 omega that explains why my grammar dies :p
14:40 masak I hope pmichaud fixes it in his next delve into PGE.
14:40 masak it's annoying.
14:41 masak text is a bloody common rule name.
14:41 wayland76 masak: the tie is supposed to hang with its tip just in front of the belt, not form a junction with it
14:41 wayland76 It's obviously not well enough dressed.  It's a bug :)
14:41 baest masak: hmm, i don't get it, it works for my test, but not for yours
14:41 masak wayland76: I didn't write that clothes collection, I just cargo-culted the dress code from someone else.
14:42 masak baest: you are obviously better at this than I am. :)
14:42 baest masak: well no if I can't yours.... Maybe I was lucky
14:42 baest +fix
14:43 masak well, I know it's not a local thing, because p6eval agrees with me.
14:44 baest yes, but your example doesn't work on my machine either. But something very similar although more complicated, does work
14:44 * pmichaud wonders why a rule called 'text' still dies.
14:44 pasteling "cosimo" at 87.238.45.12 pasted "IO::Socket!!" (71 lines, 1.3K) at http://sial.org/pbot/36058
14:44 masak baest: maybe the trick is to distract Rakudo and then just sneak it in while it's not looking.
14:45 masak cosimo++
14:45 baest masak: hehe, sure, try to lure it with a banana
14:46 pmichaud from within the Q:PIR you can also call 'fail' directly.
14:46 masak mberends: what do I need to run the Lobster, er, Nibbler on this?
14:46 pmichaud instead of .return (0) for the error.
14:46 pmichaud i.e.
14:46 pmichaud ERR:
14:46 cosimo masak: it's nowhere near to be good, but...
14:46 * masak goes to rename s/Lobster/Nibbler/
14:46 pmichaud 'fail'('Cannot open socket')
14:46 masak cosimo: I beg to differ. it's better than socat.
14:47 cosimo pmichaud: ok!
14:47 mberends masak: IO::Socket now has client, I'll work on server now.
14:47 masak mberends++
14:47 cosimo that's the interesting part :)
14:48 masak I'll spin up the Nibbler in the meantime.
14:48 masak s/spin/rev/ # English fail
14:49 xinming joined #perl6
14:50 baest rakudo: grammar A { regex TOP { <foo>  }; regex foo { foo {*} }}; class Act { method foo($/) { say "OH HAI" } }; A.parse("foo", :action(Act));
14:50 p6eval rakudo a58fce: OUTPUT«OH HAI␤»
14:51 masak OH!
14:51 * masak disqualifies rakudobug
14:51 * masak hangs head in shame
14:51 masak I don't drink coffee, but I'm thinking about starting now.
14:52 cosimo that's the interesting part :)
14:53 kimtaro joined #perl6
14:54 dalek rakudo: 2562758 | (Cory Spencer)++ | src/setting/Any-str.pm:
14:54 dalek rakudo: Add () signature to methods that were missing it.
14:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​5627582ea500d45a4953582ac690e3ae5620446
14:54 szabgab rakudo: prompt("How is the Hackathon?")
14:54 p6eval rakudo a58fce: OUTPUT«How is the Hackathon?»
14:54 szabgab rakudo: say 42
14:54 p6eval rakudo a58fce: OUTPUT«42␤»
14:57 LylePerl hi szabgab
14:57 szabgab rehi
15:02 masak rakudo: grammar A { rule TOP { ( <term> )* }; token term { \d } }; my $m = A.parse("8"); say $/[0]<term>
15:02 p6eval rakudo a58fce: OUTPUT«Null PMC access in invoke()␤current instr.: 'postcircumfix:{ }' pc 5501 (src/classes/Associative.pir:131)␤»
15:02 * masak submits rakudobug
15:02 justatheory joined #perl6
15:04 pasteling "cosimo" at 87.238.45.12 pasted "LWP::Simple, requires IO::Socket" (44 lines, 1.1K) at http://sial.org/pbot/36059
15:05 skids joined #perl6
15:05 cosimo i think i start to like perl6
15:05 cosimo :)
15:06 mberends cosimo++
15:06 masak cosimo++
15:06 masak cosimo: are you planning to put any of these on github?
15:06 arnsholt cosimo: Indeed. Even though trying to make sense of the Synopses currently makes my brain go *wibble* =)
15:07 cosimo masak: i have no idea
15:08 cosimo i just sent everything over to jnthn
15:08 frettled arnsholt: heh :)
15:09 frettled arnsholt: now you can imagine how I feel when I want to cram something about internal data representation in there somewhere.
15:10 frettled For instance, the built-in data types are defined in S02, operators in S03, and sized types in S09.
15:10 payload joined #perl6
15:15 dalek rakudo: bbd14b2 | (Carl Masak)++ | src/classes/Associative.pir:
15:15 dalek rakudo: fixed bitrot in namespace in Associative.pir
15:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​bd14b252481f2a64449deec0ec15e2089a721bf
15:17 c9s joined #perl6
15:18 cosimo left #perl6
15:21 pugs_svn r26261 | masak++ | [S05] s/\./::/ in grammar rule call
15:21 pugs_svn r26261 | masak++ |
15:21 pugs_svn r26261 | masak++ | according to TimToady on IRC, "it's :: because what's really going on
15:21 pugs_svn r26261 | masak++ | is Cursor.Grammar::rule()"
15:24 DemoFreak joined #perl6
15:25 omega invoke() not implemented in class 'Capture'
15:25 omega ?
15:25 omega http://gist.github.com/97652
15:26 omega I think my head is stopping
15:26 masak omega: ok, so invoke() is the under-the-hood name for calling things.
15:27 masak omega: that can't be the whole code.
15:27 baest masak: well, I didn't see the {*} for very long and I had working code with it in, so I would say fair enough (refering to the whole action call thing)
15:28 omega masak: well, I call render
15:28 masak omega: also, you could use 'fail "could not...' instead of 'return "could not...'
15:28 masak baest: aye.
15:28 masak omega: please re-paste.
15:29 omega http://gist.github.com/97654
15:30 masak omega: hehe, you just re-invented my Test::InputOutput :)
15:30 masak omega: (see the November repo)
15:31 omega :p
15:31 masak omega: ok, I don't see the error immediately. let me set up and try to reproduce it.
15:32 omega coolio
15:33 omega does \w include \s?
15:33 masak omega: no.
15:34 masak they are disjunct but not exact opposites.
15:34 omega mhm
15:35 masak I can now reproduce the bug.
15:35 masak minimizing it...
15:37 omega I feel retarted, I can't even write a simple tokenizer :p
15:40 masak omega: I've isolated your bug.
15:40 masak it's not your fault, it's Rakudo's.
15:40 masak rakudo: class A { method x { B.parse("") } }; grammar B { rule TOP { foo } }; A.new.x
15:40 p6eval rakudo bbd14b: OUTPUT«invoke() not implemented in class 'Capture'␤current instr.: 'parrot;A;x' pc 168 (EVAL_20:79)␤»
15:42 masak oh, it's actually much simpler than that.
15:42 masak rakudo: say B; grammar B {}
15:42 jbt joined #perl6
15:42 p6eval rakudo bbd14b: OUTPUT«invoke() not implemented in class 'Capture'␤current instr.: '_block14' pc 59 (EVAL_19:41)␤»
15:42 masak omega: so, try and re-order the class and the grammar, and you should be fine. :)
15:42 omega ahh :p
15:42 masak just put the grammar before the class.
15:42 * masak submits rakudobug
15:43 eternaleye joined #perl6
15:43 omega EasyCMS::Template::Grammar.parse($in)
15:43 omega #$in ~~ /EasyCMS::Template::Grammer::TOP/
15:43 * baest has a Deja vu
15:43 omega shouldn't those to be pretty much the same?
15:43 masak omega: well, you need /<...>/, not just /.../
15:44 omega argh
15:44 omega sleep :/
15:45 Psyche^ joined #perl6
15:45 omega still, there is a difference
15:47 omega whoho
15:52 LylePerl I've implemented an extremely basic but working $*CWD
15:53 LylePerl Now I'm trying to implement a working chdir, but I'm not sure where to put it
15:54 LylePerl It would be easy to add it to src/builtins/io.pir
15:54 masak sounds as good as any right now.
15:55 LylePerl but S29 says chdir should be in an IO module and not builtin
15:56 masak ah, right.
15:56 masak src/setting/Io.pm, perhaps?
15:56 masak s/o/O/
15:57 LylePerl Or /src/class/io.pir?
15:57 masak well, is it PIR or Perl 6?
15:57 LylePerl I know how to do it in PIR
15:57 masak ok.
15:57 masak sure, io.pir is fine, I guess.
15:58 masak some things in the setting are just Q:PIR { ... }
15:58 masak I'm not 100% certain of the rule about what goes where.
16:00 LylePerl I'm a bit lost. It's all still very new to me :s
16:01 masak LylePerl: it's fairly new to me as well.
16:01 masak I understand more PIR than I did this summer, but not as much as I'd like.
16:05 LylePerl just noticed that unlink is in /src/builtins/io.pir, and that's in the same non default list as chdir in S29
16:05 LylePerl So maybe it is ok to add it there...
16:06 LylePerl We'll I'll just add it there because that's easiest and see what happens :)
16:08 Tene LylePerl: best to add it there now, and it can be moved somewhere more appropriate when someone else gets around to it.
16:08 Tene better to have it in the wrong place than not at all
16:08 Tene masak: why not in #november-wiki?
16:09 rblasch1 joined #perl6
16:09 FurnaceBoy joined #perl6
16:09 masak Tene: I'm coming. :)
16:13 Killian joined #perl6
16:14 Killian left #perl6
16:14 scook0 joined #perl6
16:15 scook0 someone please tell me that "autothreading" still means distributing an operation over the elements of its junctive argument
16:15 scook0 and has nothing to do with whether or not that distribution might be parallelized by a sufficiently-smart-compiler
16:16 iblechbot joined #perl6
16:17 skids scook0: autothreading means that MP is not guaranteed, but MP might occur.
16:18 skids but in any case functionally when there's no chance for MP inconsistency it reduces to just distributing the operation.
16:18 skids The take away is that you shouldn't expect side effects to work well.
16:20 scook0 yeah, I'm just having an Internet Argument about whether the term "autothreading" in P6 refers specifically to the distribution or the parallelism
16:20 scook0 back when I was involved it was always about the distribution
16:21 skids Mostly to the distribution, but with parallelism caveats.  e.g. (1,2).>>say might say "2 1"
16:22 skids But then with junctions order is not guaranteed in the first place.
16:24 skids Most importantly with junction is side effects.  e.g. my $j = 1|2|3|4; rot(@a, $j); where rot is something like @a[0,1,2] = @a[2,0,1]; might wind you up with unexpected results.
16:25 scook0 yeah yeah, I get junctions, believe me ;)
16:26 masak scook0: would you please explain them to the rest of us, then? :)
16:26 scook0 touche
16:37 justatheory joined #perl6
16:40 omega rakudo: 'ape' ~~ /p/; say $/.orig;
16:40 p6eval rakudo bbd14b: OUTPUT«Method 'orig' not found for invocant of class 'Match'␤current instr.: 'parrot;P6metaclass;dispatch' pc 662 (src/classes/ClassHOW.pir:171)␤»
16:41 LylePerl Right, I've got a working chdir
16:42 LylePerl any chance of getting commit on githut?
16:42 LylePerl or do I need to submit a patch to someone/somewhere?
16:42 masak LylePerl: you could submit a patch to rakudobug.
16:43 masak LylePerl: or you could fork on github, push your patch to your forked repo, and do a pull request.
16:43 masak LylePerl: finally, you could simply send an email with the patch to p6c.
16:43 LylePerl masak: Lots of options :)
16:43 masak an embarassment of riches. :)
16:44 LylePerl masak: Just need to sort findbin and I'll be able to get november running right on Vista ;)
16:44 LylePerl masak: IIS
16:44 masak LylePerl: cool.
16:45 baest scary :)
16:46 omega can I know if I am at the end of a for loop or not?
16:48 skids omega: LEAVE and LAST blocks, though not sure if implemented, see S04
16:49 Tene omega: explain what you're trying to do here?
16:52 omega implement a really simple template toolkit lookalike :p
16:52 cosimo joined #perl6
16:52 omega All tests successful.
16:52 omega I fixed it another way
16:52 omega basicly I wanted to only add a space if I was NOT at the end of the loop
16:53 dalek joined #perl6
16:53 omega but I just removed the last space at the end
16:55 meppl good night
16:55 skids omega: you make want to play with the fact for loops return Lists, or if that's not flexible enough, do a join on a "gather for"
16:58 nihiliad joined #perl6
16:58 omega skids: ok, I didn't understand that, but thanks :p
17:13 pugs_svn r26262 | cosmicnet++ | added spec for $*CWD
17:13 masak LylePerl++
17:14 LylePerl Thanks. I'll try and write some tests before I fork git
17:15 masak sounds like a plan.
17:16 omega http://gist.github.com/97699
17:17 omega the problem is that $token<stmt><expr><var> looks good when I print it
17:17 omega but if I try to use it to get %args{ $token<stmt><expr><var> } it doesn't
17:17 omega if I put 'x' there in stead (which is what gets printed) it works
17:17 masak omega: try putting a ~ before the $
17:18 omega %vars{ ~$token<stmt><expr><var> }
17:18 omega ?
17:18 masak aye.
17:19 omega nope :/
17:19 masak no change?
17:19 omega nope
17:19 masak hm.
17:20 omega ahh fsck
17:20 omega there is a space
17:21 masak omega: do you get "Method 'postcircumfix:{ }' not found for invocant of class 'Failure'" ?
17:22 omega nope, I found the error, the value had a trailing space
17:22 omega so it was 'x ', not 'x'
17:22 masak aha.
17:22 masak there you go.
17:27 skids rakudo: join(' ', gather for 1..4 -> $a { take "foo $a"; "did $a".say }).say
17:27 p6eval rakudo bbd14b: OUTPUT«did 1␤did 2␤did 3␤did 4␤foo 1 foo 2 foo 3 foo 4␤»
17:27 skids omega: that's what I meant.
17:28 LylePerl How can I run parrot code from within perl6?
17:28 nwc10 joined #perl6
17:28 omega skids: ahh
17:28 skids LylePerl: Q:PIR{}
17:28 nwc10 Is there a viewcvs installation, or something like that, for http://svn.pugscode.org/pugs/  ?
17:28 LylePerl skids: thanks
17:28 skids LylePerl: for examples see src/setting/*
17:30 skids nwc10: just browse http://svn.pugscode.org/pugs
17:32 skids or do you mean something you can look at revisions with?
17:32 nwc10 yes, the latter
17:33 masak nwc10: just check out Pugs?
17:33 skids http://dev.pugscode.org/browser
17:35 xinming joined #perl6
17:35 dalek rakudo: 512df4a | jnthn++ | src/parser/grammar.pg:
17:35 dalek rakudo: Parse --> in a signature.
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​12df4a1795ae126680fe780c53b7fd6585e2eb3
17:35 dalek rakudo: e453f45 | jnthn++ | :
17:35 dalek rakudo: Merge branch 'master' of git@github.com:/rakudo/rakudo
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​453f45c0c33893fa472640fe579c406c493720a
17:35 nwc10 masak: I wanted a way to make URLs
17:35 nwc10 thannks skids
17:35 nwc10 left #perl6
17:36 masak jnthn: you should try doing 'git pull --rebase' instead of just 'git pull'.
17:36 jnthn Don't blame me for git's sucky defaults.
17:36 jnthn :-P
17:36 masak I don't. :)
17:37 jnthn Will try and remember to do that in the future, though.
17:37 * skids is still astounded at the number of 'git-' prefixed commands in his path.
17:37 jnthn git-kitchen-sink
17:37 masak skids: you'll want to upgrade to 1.5.
17:37 jnthn btw Rakudo has sockets now, cosimo++
17:37 jnthn (The start of anyways...)
17:38 masak jnthn: mberends and I are working on putting IO::Socket::INET in the setting.
17:38 skids Awesome.
17:38 skids Now, if I only had a buf to unpack datagrams :-)
17:38 masak skids: I know how to start working on Buf.
17:39 masak skids: just haven't found the time for it.
17:41 jnthn masak: The work Cosimo did?
17:42 jnthn I already comitted it...
17:42 * masak looks
17:42 jnthn but dalek didn't show it :-(
17:42 jnthn Sorry, didn't know you guys were working on that.
17:42 masak jnthn: it's OK, we'll see what we can do.
17:43 jnthn I guess pull and integrate your changes ;-)
17:43 skids If I am not mistaken the only blocker to zip() and roundrobin() is slices.  Would it be OK to put a zip(), roundrobin(), in with a proto of @ that expects Array of Array in the meantime, being only the proto would need to change?
17:43 masak jnthn: I think we're slightly more ambitious than you are over here.
17:43 skids By OK I mean would pmichaud take it :-)
17:44 jnthn masak: Ambition FTW. :-)
17:44 pmichaud it's not only the proto that would have to change
17:44 pmichaud we'd also have to be able to correctly handle semilist args
17:45 skids right but once that was done, just change the proto on the implementation I mean.
17:45 pmichaud I guess I don't quite understand what zip/roundrobin would do then.
17:46 skids Until slice/semilist you'd have to invoke it as zip([\@a,\@b,\@c])
17:47 pmichaud if you create it as a slurpy argument, then   zip(\@a, \@b, \@c) would work.
17:47 skids Right, so it would be there, but different than the spec zip(@a;@b) until slices, would that be OK?
17:48 skids Then at least the body is done and just needs to be tweaked.
17:48 pmichaud I guess I'm okay with that.  We might want to call it something slightly tweaked from zip() though.
17:48 pmichaud so that it's extra-clear that it's not the official zip.
17:49 skids OK.
17:49 * skids wants roundrobin renamed to "whip" anyway :-)
17:52 masak skids: there will be modules.
17:52 skids :-)
17:55 cosimo masak, mberends: cool, let me know (socket). i might be able to help a bit tomorrow too, and maybe on monday
17:57 masak cosimo: here's the status: we're adding IO::Socket::INET, and making the server part working.
17:57 masak we're about to go eat.
17:58 cosimo can i see the code somewhere?
17:58 masak cosimo: there's really no code to talk about yet. just check in S32/IO.pod
17:58 masak that's what we've added so far. :)
18:09 cosimo cool
18:26 elmex joined #perl6
18:53 hanekomu joined #perl6
18:55 kirillm joined #perl6
18:59 sri_kraih joined #perl6
19:19 iblechbot joined #perl6
19:27 stas_ joined #perl6
19:42 rgs joined #perl6
20:05 araujo joined #perl6
20:11 stas_ joined #perl6
20:18 argggh left #perl6
20:23 diakopter left #perl6
20:27 Whiteknight joined #perl6
20:54 mikehh rakudo (e453f45) on parrot r38198 - make test/make spectest PASS on Ubuntu Intrepid i386
20:58 rblasch joined #perl6
20:58 cosimo left #perl6
21:01 ejs joined #perl6
21:10 rblasch1 joined #perl6
21:18 ilogger2 joined #perl6
21:22 ilogger2 joined #perl6
21:24 ejs joined #perl6
21:38 nsh joined #perl6
22:15 brunov joined #perl6
22:26 SamB joined #perl6
22:44 mikehh_ joined #perl6
22:46 meppl joined #perl6
22:47 nsh- joined #perl6
22:58 lambdabot joined #perl6
23:11 hanekomu joined #perl6
23:18 sitaram joined #perl6
23:24 dduncan joined #perl6
23:24 dduncan left #perl6
23:30 kate21de1 joined #perl6
23:42 shachaf joined #perl6
23:59 LylePerl perl6: say $*PROGRAM_NAME
23:59 p6eval rakudo e453f4: OUTPUT«/tmp/xgVDA5bctq␤»
23:59 p6eval ..elf 26262, pugs: OUTPUT«␤»

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

Perl 6 | Reference Documentation | Rakudo