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