Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-14

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:03 [particle]1 joined #perl6
00:06 Helios joined #perl6
00:27 hercynium joined #perl6
00:36 alc joined #perl6
00:49 gravity joined #perl6
00:51 alanhaggai joined #perl6
00:54 andrew_ joined #perl6
00:55 |jedai| joined #perl6
01:25 cspencer joined #perl6
01:43 mncharity2 joined #perl6
01:45 cspencer joined #perl6
01:46 agentzh joined #perl6
01:46 |jedai| joined #perl6
01:47 mncharity2 elf: say $?VERSION;
01:47 p6eval elf 24900: OUTPUT«Global symbol "$VERSION" requires explicit package name at (eval 117) line 3.␤ at ./elf_f line 3861␤»
01:50 mncharity2 elf: $*EXECUTABLE_NAME
01:50 p6eval elf 24900: RESULT«undef␤»
01:50 mncharity2 Looks like evalbot is still elf_f.  Puzzling.
01:52 mncharity2 Btw, <number> on misc/elfish/elfparse/elfgreen is working... it just requires a recent (bugfixed) version of 5.10.0 (at least on 64 bit).
02:11 cspencer left #perl6
02:13 [particle] joined #perl6
02:25 eternaleye joined #perl6
02:29 jimmy_ joined #perl6
02:32 a2n joined #perl6
02:40 a2n left #perl6
02:55 meppl joined #perl6
03:08 charsbar_ joined #perl6
03:15 |jedai| joined #perl6
03:19 Caelum joined #perl6
03:25 meppuru joined #perl6
03:36 mdxi joined #perl6
04:05 |jedai| joined #perl6
04:11 |jedai| joined #perl6
04:14 [particle]1 joined #perl6
04:32 hercynium joined #perl6
04:40 cspencer joined #perl6
04:44 mtnviewmark joined #perl6
04:47 xuser joined #perl6
04:50 |jedai| joined #perl6
04:53 japhb joined #perl6
04:55 cspencer perl6: my $x = "zz99"; say ++$x
04:55 p6eval elf 24900: OUTPUT«No viable candidate for call to multimethod prefix__43_43($) at (eval 119) line 4␤ at ./elf_f line 3861␤»
04:55 p6eval ..pugs, rakudo 35514: OUTPUT«aaa00␤»
04:57 cspencer perl6: my $x = "99aa"; say ++$x
04:57 p6eval elf 24900: OUTPUT«No viable candidate for call to multimethod prefix__43_43($) at (eval 119) line 4␤ at ./elf_f line 3861␤»
04:57 p6eval ..pugs, rakudo 35514: OUTPUT«99ab␤»
04:57 cspencer perl6: my $x = "99zz"; say ++$x
04:57 p6eval elf 24900: OUTPUT«No viable candidate for call to multimethod prefix__43_43($) at (eval 119) line 4␤ at ./elf_f line 3861␤»
04:57 p6eval ..pugs, rakudo 35514: OUTPUT«100aa␤»
05:00 masak joined #perl6
05:02 vanjuggler joined #perl6
05:23 veritos joined #perl6
05:24 veritos I have a functionality idea. Currently, we have case insensitive matching. What if we were to add case-fixing matching, so that s:fix/idol/idle/ would convert "idol"->"idle", "Idol"->"Idle", "IDOL"->"IDLE" and so on?
05:26 masak veritos: AFAIK, we have that already.
05:26 masak veritos: do you want me to find the reference for you, or can you browse S05 yourself?
05:27 veritos masak: I can find it; I skimmed too lightly, it seems.
05:27 masak I'm not 100% sure, but it does sound familiar.
05:29 veritos :ii or :samecase, apparently.
05:31 masak yes, there you go.
05:31 masak Perl 6 provides. :)
05:32 alester_ joined #perl6
05:34 veritos Are we still talking about having unit conversions as inherent capabilities of numbers?
05:34 masak veritos: it's not something I've heard about in a long time. but I don't think the idea was abandoned either.
05:36 cspencer joined #perl6
05:37 |jedai| joined #perl6
05:42 mtnviewmark oh - masak - you're here!
05:42 masak mtnviewmark: so it seems.
05:43 mtnviewmark heh - so "will" -- while it is in S04, it doesn't appear to be an operator
05:43 mtnviewmark at least not in the sense of it forming part of the expression grammar
05:43 masak that surprises me a lot.
05:43 masak it looks just like an infix operator to me.
05:44 mtnviewmark hmmm.... well, it isn't, as you point out, in S03 - and the only use of it in S04 is very tied to variable declarations
05:44 masak so what?
05:44 mtnviewmark any clue what precedence it would be?
05:44 masak 'but' works about the same.
05:44 masak no, no clues abotut precedence.
05:45 mtnviewmark well, 'does' and 'but' seem to have examples applied to values
05:45 masak but TimToady will need to be the arbriter about this anyway. so you might as well ask him.
05:45 mtnviewmark (... some big expression...) does (something else)
05:45 mtnviewmark makes sense
05:45 mtnviewmark but would "will" or "as" work there?
05:45 masak s/arbriter/arbiter/
05:46 mtnviewmark okay - what is the incantation to invoke the oracle of TimToady?
05:46 masak mtnviewmark: ah, you mean it only works in var decls? yes, that might be.
05:47 mtnviewmark I do worry that there are dozens of language pieces that look somewhat like operators.... but might be "special forms" ...
05:47 mtnviewmark and I'm not sure if they should be on the chart or no
05:47 masak mtnviewmark: I don't know of any special incantation that works, but this seems to be an issue where he'd reply something, sooner or later.
05:47 masak mtnviewmark: in the meantime, we should check what STD.pm says about 'will'.
05:48 masak ok, it classifies 'will' as a "trait auxiliary", with 'is' and 'does'.
05:49 mtnviewmark ah - and 'but' as well? there seems to be a whole, er, declension, of the verb to be in there
05:49 mtnviewmark where can I acquire my own copy of STD.pm?
05:49 masak haven't found 'but' yet.
05:49 masak mtnviewmark: got Pugs?
05:50 masak I mean, the SVN flavour.
05:50 mtnviewmark nope
05:50 masak mtnviewmark: start by acquiring a copy.
05:50 masak STD.pm is in src/perl6/
05:50 mtnviewmark even though it isn't being actively worked on?
05:51 masak mtnviewmark: well, there's Pugs itself, and there's community efforts on Perl 6...
05:51 masak the Pugs repo holds the former as well as the latter.
05:51 masak svn co http://svn.pugscode.org/pugs
05:52 mtnviewmark checkout in progress...
05:53 dukeleto mtnviewmark: the Rakudo test suite languages/perl6/t/spec  is an svn external to the pugs repo
05:54 masak traits are allowed in variable declarations, package definitions, routine definitions, method definitions, regex definitions, macro definitions, and paramter lists.
05:54 mtnviewmark okay - well, at the risk of being arbitrary (ha!) I'll claim those aren't full fledged operators
05:54 justatheory joined #perl6
05:54 mtnviewmark where as 'does' and 'but' are allowed in greater context?
05:55 masak 'doas' and 'but', however, are normal infix ops. yes.
05:55 mtnviewmark oooo the temptaion to type make is high.... but I bet that takes a LONG time.... :-)
05:55 masak it seems that 'does' works on both sides in this regard.
05:56 masak mtnviewmark: I haven't done that in a long time. :)
05:56 masak used to do it all the time.
05:59 mtnviewmark gasp!  SYN.pm claims <== and family are OPs!
05:59 mtnviewmark not terminators!
06:01 masak that's surprising.
06:01 mtnviewmark well - thank you for that reference - this is going to take some pouring over....
06:01 mtnviewmark and just when I was thinking I was close to done!
06:01 masak hehe.
06:01 masak I think you and STD.pm will like each other.
06:02 masak I should read it too.
06:02 mtnviewmark on other fronts -- I've been finding good places to have the chart printed in A1 .. or even A0 sized paper
06:02 kisu joined #perl6
06:04 cspencer perl6: my $x = "\xff"; say ++$x
06:04 p6eval elf 24900: OUTPUT«No viable candidate for call to multimethod prefix__43_43($) at (eval 119) line 4␤ at ./elf_f line 3861␤»
06:04 p6eval ..pugs: OUTPUT«Ā␤»
06:04 p6eval ..rakudo 35515: OUTPUT«ÿ␤»
06:05 cspencer perl6: my $x = "Ā"; say --$x
06:05 p6eval elf 24900: OUTPUT«No viable candidate for call to multimethod prefix__45_45($) at (eval 119) line 4␤ at ./elf_f line 3861␤»
06:05 p6eval ..rakudo 35515: OUTPUT«Ā␤»
06:05 p6eval ..pugs: OUTPUT«-1␤»
06:05 masak Pugs++ :)
06:05 cspencer heh
06:06 * masak wonders idly what babble, quibble, tribble and nibble are in STD.pm
06:07 jimmy_ perl6: my $x='b'; say --$x+$x+++++$x
06:07 p6eval pugs: OUTPUT«*** ␤    Unexpected "+++++$"␤    expecting "::", term postfix, operator, ":" or ","␤    at /tmp/zwE0dqmCoH line 1, column 23␤»
06:07 p6eval ..elf 24900: OUTPUT«Can't modify postincrement (++) in postincrement (++) at (eval 119) line 4, near ")++"␤ at ./elf_f line 3861␤»
06:07 p6eval ..rakudo 35515: OUTPUT«0␤»
06:07 jimmy_ perl6: my $x=4; say --$x+$x+++++$x
06:07 p6eval rakudo 35515: OUTPUT«11␤»
06:07 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "+++++$"␤    expecting "::", term postfix, operator, ":" or ","␤    at /tmp/t2fVUZCaOn line 1, column 21␤»
06:07 p6eval ..elf 24900: OUTPUT«Can't modify postincrement (++) in postincrement (++) at (eval 119) line 4, near ")++"␤ at ./elf_f line 3861␤»
06:07 masak std: my $a; $a+++++$a
06:08 p6eval std 24900: OUTPUT«00:05 86m␤»
06:08 masak I'll be danged.
06:08 * jimmy_ wonders what is std.
06:08 masak jimmy_: it's the official Perl 6 grammar.
06:08 mtnviewmark not to mention sibble and quasiquibble
06:09 masak mtnviewmark: right. :)
06:09 jimmy_ std: my $x=4; say --$x+$x+++++$x
06:09 p6eval std 24900: OUTPUT«00:08 126m␤»
06:09 masak I like TimToady names, but sometimes they can be a bit like quasibibble. :)
06:09 masak s/y/y's/
06:10 * jimmy_ still doesn't know what is std.
06:10 masak jimmy_: got Pugs?
06:10 jimmy_ I have no Pugs.
06:10 masak ok, hold on.
06:11 masak http://svn.pugscode.org/pugs/src/perl6/STD.pm
06:11 masak that's STD.
06:13 jimmy_ that's the perl grammar
06:15 masak jimmy_: yes, that's what I said. :)
06:17 jimmy_ std: my $x=10; say --$x-----$x+++++$x
06:17 p6eval std 24900: OUTPUT«00:08 126m␤»
06:25 [particle] joined #perl6
06:42 jhuni joined #perl6
06:50 diakopter masak: you around?
06:50 masak diakopter: I'm here.
06:51 diakopter t\spec\S04-closure-traits\next.
06:51 diakopter doesn't svn co on windows b/c windows doesn't like filenames ending in .
06:51 masak seems like a mistake to me.
06:51 masak I'll check the svn logs to see what happened.
06:51 ashizawa joined #perl6
06:52 masak in fact, it ends in '. '
06:52 moritz_ I'll move it to next.t
06:53 pugs_svn r24901 | moritz++ | [t/spec] move 'next. ' to next.t, that was surely a (my?) accident
06:53 diakopter thanks u2
06:53 diakopter :D
06:54 masak moritz_ is faster on the trigger. I analyze too much.
06:54 moritz_ shoot first!
06:55 * diakopter ponders "shoot first; ask questions later" vs. "'I have a question';'shoot'"
06:58 moritz_ that's the real problem with not asking questions, but asking to ask - you might get shot in between ;-)
06:59 masak ah, so _that's_ why people advise against asking to ask. I've always wondered about that.
06:59 masak it's for people's own safety.
06:59 masak let us try this, in the interests of public awareness.
06:59 diakopter shoot
06:59 masak may I ask a question? :)
07:00 * diakopter glances askance
07:00 * masak falls down on the ground, apparently lifeless
07:00 * moritz_ prepares masak's obituary
07:01 masak "he was a curious person, perhaps too curious..."
07:01 diakopter wait, so who shot masak?  I merely instructed him to shoot [the question to us]
07:01 masak diakopter: I think it must have been a magic bullet.
07:01 diakopter [before masak even asked, it should be noted]
07:02 moritz_ that masak seems to be a rather unstable person
07:02 diakopter though actually I was saying 'shoot' to moritz_
07:02 diakopter n-e-waz
07:02 masak diakopter: it only goes to show how dangerous that word is.
07:03 masak moritz_: I'm only unstable when being observed. that can make me collapse.
07:04 masak as with junctions and boxed cats, you should treat me with care.
07:04 moritz_ masak: maybe you'll be interested in a different interpretation of quantum theory that works without the collapse during observations
07:05 masak moritz_: I've heard about such things before. and yes, they do intrigue me.
07:05 moritz_ sometimes they are called "many-world theories", but they don't speculate about multiverses and stuff, they have a solid scientific base
07:06 diakopter oooooo... testable, even?
07:06 masak that was my line!
07:07 diakopter my pre-emption must have collapsed our link.
07:07 moritz_ diakopter: it's a different interpretation, not a differnt theory. All observables are the same, but they are explained in a slightly more intuitive way
07:07 diakopter ok
07:08 diakopter $.ok
07:08 diakopter $.ok()
07:08 moritz_ in that theory the process of measuring creats an entanglement between the measuring system and the measured object
07:08 moritz_ which allows a knowledge gain, which corresponds to the collopse of the wave function into an eigenstate
07:09 * diakopter pretends to follow
07:09 moritz_ well, I haven't fully understood it either
07:09 moritz_ but it's the pet topic of one of my mates in the office
07:10 moritz_ so I can't be 100% ignorant ;-)
07:10 diakopter interesting, svn update on that dir did in fact delete the file named "next" (which previously subversion said needed to be added, while also saying "next." was missing
07:10 diakopter )
07:11 moritz_ how surprising
07:12 moritz_ I somehow expected it to blow all up
07:12 masak svn--
07:12 diakopter I don't suppose anyone reading this (this doesn't mean you, bots) knows how to activate Intel VT on a BIOS-crippled Vaio FW170J
07:13 diakopter perl6: labelit:
07:13 p6eval elf 24901: OUTPUT«Undefined subroutine &GLOBAL::labelit called at (eval 121) line 3.␤ at ./elf_f line 3861␤»
07:13 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting Doc block, block declaration, declaration, construct or expression␤    at /tmp/F9irwOKIXN line 2, column 1␤»
07:13 p6eval ..rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near ":"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:13 moritz_ perl6: labelit: print 1;
07:13 p6eval elf 24901: OUTPUT«Can't locate object method "cb__Label" via package "EmitSimpleP5" at ./elf_f line 1595.␤»
07:13 p6eval ..pugs: OUTPUT«1»
07:13 p6eval ..rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near ": print 1;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:16 diakopter perl6: Superposition.Class.teleport()
07:17 p6eval elf 24901: OUTPUT«Can't locate object method "Class" via package "Superposition" (perhaps you forgot to load "Superposition"?) at (eval 115) line 3.␤ at ./elf_f line 3861␤»
07:17 p6eval ..pugs: OUTPUT«*** No such subroutine: "&Superposition"␤    at /tmp/dJ8LV1k4Ut line 1, column 1 - line 2, column 1␤»
07:17 p6eval ..rakudo 35518: OUTPUT«Could not find non-existent sub Superposition␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
07:17 diakopter elf thought Class was an object method?
07:17 diakopter (no parens?)
07:18 moritz_ that's the correct behaviour
07:18 moritz_ well, it woiuld, if Superposition where a known type name
07:18 moritz_ since it isn't, it's correct to parse Superposition as a sub call
07:19 diakopter I wasn't referring to rakudo
07:19 diakopter was referring to elf
07:19 spx2 joined #perl6
07:19 moritz_ yes, I know
07:20 diakopter which output is correct?
07:20 moritz_ rakudo's and pugs'
07:21 moritz_ they are basically the same, the format of the error message just differs
07:21 masak actually, I don't much like Rakudo's error. 'could not find non-existent sub'. it sort of says the same thing almost twice. 'no such' is nicer.
07:22 moritz_ right
07:22 masak can I change it? please? :)
07:22 diakopter I can't find non-existent things all the times
07:22 masak diakopter: oh, shut up. :)
07:22 diakopter in fact, I invariably fail to find non-existent things
07:23 masak diakopter: that's not the non-existent point.
07:23 moritz_ diakopter: that's because you neglect autovivification ;-)
07:24 diakopter rakudo's message begs the question, "why were you looking for something you knew to be non-existent"   or   "don't you mean 'found that sub to be non-existent'?"
07:25 diakopter how about "missing sub"  or  "lost sub"
07:26 diakopter or  "sub not found"
07:28 moritz_ or "FAIL: attempted to call non-existant sub 'foo'"
07:29 diakopter "voicemail: no answer from call to non-existent sub"
07:29 masak rakudo: my $x = :a<5>; say $x.map({.key => .value + 1}).perl
07:29 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 101 (EVAL_17:49)␤»
07:29 masak moritz_: would you expect map to work on a pair?
07:30 moritz_ masak: since we support it on Any, yes
07:30 masak so the above is surprising.
07:30 moritz_ rakudo: say 1.map({ say 2*$_ });
07:30 p6eval rakudo 35518: OUTPUT«2␤1␤»
07:30 moritz_ not just that...
07:30 moritz_ but also a...
07:30 masak rakudo: my $x = :a<5>; say $x.map({$^k.key => $^k.value + 1}).perl
07:30 p6eval rakudo 35518: OUTPUT«["a" => 6]␤»
07:30 moritz_ bug
07:30 * masak submits rakudobug
07:31 namenlos joined #perl6
07:31 moritz_ so $_ isn't set in the closure in the first example?
07:31 diakopter rakudobugmenot
07:32 masak moritz_: seems not.
07:33 moritz_ rakudo: say ({ .key => .value + 1}).arity
07:33 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 66 (EVAL_16:42)␤»
07:33 diakopter maybe it's not parsing it as a closure
07:33 moritz_ rakudo: say ({ .key => .value + 1}).WHAT
07:33 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 66 (EVAL_16:42)␤»
07:33 moritz_ right
07:34 moritz_ I don't know if that's a bug, or by design
07:34 diakopter rakudo: ({ .key => .value + 1}).WHAT
07:34 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 66 (EVAL_15:42)␤»
07:34 diakopter rakudo: ({ .key => .value + 1})
07:34 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 66 (EVAL_15:42)␤»
07:34 moritz_ according to the parsing rules I remember (beware...), it should be a hash constructor
07:34 moritz_ oh wait, no
07:34 moritz_ .key isn't and identifier
07:35 masak it's a method of Pair
07:35 maerzhase joined #perl6
07:36 moritz_ rakudo: given :a<5> { say {.key => .value + 1}.WHAT;
07:36 p6eval rakudo 35518: OUTPUT«Unable to parse block; couldn't find final '}' at line 1, near ""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:36 moritz_ rakudo: given :a<5> { say {.key => .value + 1}.WHAT;};
07:36 p6eval rakudo 35518: OUTPUT«Hash␤»
07:37 * diakopter peers to peers
07:38 masak rakudo: my $p = 'mary' => 8; say { .key => .value * 2 }.($p).WHAT
07:38 p6eval rakudo 35518: OUTPUT«Method 'key' not found for invocant of class 'Failure'␤current instr.: '_block14' pc 104 (EVAL_19:50)␤»
07:40 |jedai| joined #perl6
07:44 moritz_ rakudo: say "fo".chars
07:44 p6eval rakudo 35518: OUTPUT«2␤»
07:48 diakopter rakudo: say "\"fo\"".chars()
07:48 p6eval rakudo 35518: OUTPUT«4␤»
07:49 diakopter rakudo: say "\"fo\"".chars
07:49 p6eval rakudo 35518: OUTPUT«4␤»
07:49 vixey joined #Perl6
07:49 diakopter rakudo: say "\"fo\"".chars ()
07:49 p6eval rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near "()"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:50 diakopter rakudo: say "\"fo\"".chars\ ()
07:50 p6eval rakudo 35518: OUTPUT«4␤»
07:50 diakopter rakudo: say "\"fo\"".chars\  .()
07:50 p6eval rakudo 35518: OUTPUT«4␤»
07:50 masak long dots work?
07:50 * masak didn't know that
07:51 diakopter rakudo: say "\"fo\"".chars.()
07:51 p6eval rakudo 35518: OUTPUT«4␤»
07:51 diakopter !
07:52 meppl joined #perl6
07:52 diakopter rakudo: 4.()
07:52 p6eval rakudo 35518: OUTPUT«invoke() not implemented in class 'Integer'␤current instr.: '_block14' pc 62 (EVAL_17:40)␤»
07:52 diakopter rakudo: "fo".chars().()
07:52 p6eval rakudo 35518: OUTPUT«invoke() not implemented in class 'Integer'␤current instr.: '_block14' pc 71 (EVAL_17:41)␤»
07:53 masak don't provoke the integer!
07:53 diakopter rakudo: say "\"fo\"".chars..()
07:53 p6eval rakudo 35518: OUTPUT«␤»
07:53 diakopter rakudo: say "\"fo\"".chars...()
07:53 p6eval rakudo 35518: OUTPUT«␤»
07:53 diakopter rakudo: say "\"fo\"".chars. . . . . .()
07:53 p6eval rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near ". . . . . "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:54 diakopter rakudo: say "\"fo\"".chars. .()
07:54 p6eval rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near ". .()"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:54 diakopter rakudo: say "\"fo\"".chars .()
07:54 p6eval rakudo 35518: OUTPUT«Statement not terminated properly at line 1, near ".()"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:59 pugs_svn r24902 | masak++ | [u4x] fleshed out README a bit
08:00 masak yesterday, I had the idea that we could name the documentation tool 'psi', for 'Perl Six Whatever-the-"i"-means-in-"ri"'
08:00 masak ('information', it seems)
08:00 diakopter masak: wouldn't that be 'PSW'?
08:01 masak diakopter: how do I unescape things in explanations of abbreviations?
08:01 diakopter lol
08:01 * diakopter looks in the synopses
08:01 masak :)
08:02 masak we could even alias it to ψ
08:02 masak or symlink, I dunno.
08:02 diakopter 'psi' - the ultimate dwim - because it reads your mind directly.
08:02 masak diakopter: ooh, didn't think of that.
08:03 masak diakopter: yes, mind reading is one of the features.
08:03 diakopter ... as opposed to reading your mind indirectly.
08:03 masak see the latest addition to the README.
08:03 diakopter or
08:05 diakopter psi could also be the name of PerlSix[-In-PerlSix ... [] ]
08:05 diakopter though there's probably already a programming language [implementation] named that
08:05 diakopter hmm, no
08:05 ashizawa joined #perl6
08:06 diakopter oh wait, that'd be psip
08:06 diakopter pronounced 'ps-ype
08:07 diakopter or, to follow viv, vivi
08:07 diakopter TimToady: see vivi and cetera
08:08 diakopter vivivi
08:08 iblechbot joined #perl6
08:09 pugs_svn r24903 | masak++ | [u4x] it's official: the tool will be named 'psi'
08:12 pugs_svn r24904 | masak++ | [u4x] added inofficial goals to the README
08:13 was kicked by diakopter: no more drunk IRCing tonight
08:13 diakopter joined #perl6
08:23 broquaint joined #perl6
08:25 maerzhase joined #perl6
08:32 _jedai_ joined #perl6
08:38 alc joined #perl6
08:41 DemoFreak joined #perl6
08:45 [particle]1 joined #perl6
09:01 pmurias joined #perl6
09:07 mj41 joined #perl6
09:12 masak rakudo: my $x = "foo"; class A { my $.y = $x } # bug?
09:12 p6eval rakudo 35518: OUTPUT«Lexical '$x' not found␤current instr.: 'parrot;A;_block22' pc 113 (EVAL_19:58)␤»
09:14 ludan joined #perl6
09:14 ludan hi
09:15 masak ludan: greetings.
09:22 |jedai| joined #perl6
09:24 masak rakudo: our $x = "foo"; class A { my $.y = $x }
09:24 p6eval rakudo 35519: OUTPUT«Null PMC access in isa()␤current instr.: '!CALLMETHOD' pc 16769 (src/builtins/guts.pir:74)␤»
09:24 masak :(
09:24 masak don't we have tests for this
09:24 * masak submits rakudobug
09:24 moritz_ what is 'my $.x' supposed to do?
09:24 masak moritz_: that's a class attribute, sir.
09:25 moritz_ masak: and that has a . twigil?
09:25 masak moritz_: yes, it can.
09:25 masak then it gets a read accessor.
09:25 moritz_ rakudo: our $x = "foo"; class A { has $.y = $x }; say A.new.y
09:25 p6eval rakudo 35519: OUTPUT«Use of uninitialized value␤␤»
09:26 moritz_ rakudo: our $x = "foo"; class A { has $.y = 3 }; say A.new.y
09:26 p6eval rakudo 35519: OUTPUT«3␤»
09:26 moritz_ rakudo: my $x = "foo"; class A { has $.y = ++$x }; say A.new.y
09:26 p6eval rakudo 35519: OUTPUT«Lexical '$x' not found␤current instr.: 'parrot;A;_block22' pc 140 (EVAL_20:59)␤»
09:26 elmex joined #perl6
09:27 alc joined #perl6
09:40 donaldh joined #perl6
09:58 maerzhase joined #perl6
09:59 mberends joined #perl6
10:07 maerzhase1 joined #perl6
10:14 maerzhase joined #perl6
10:36 |jedai| joined #perl6
10:49 meppl joined #perl6
11:00 ruoso joined #perl6
11:00 elmex joined #perl6
11:00 |jedai| joined #perl6
11:01 ruoso Hello!
11:01 barney joined #perl6
11:04 Matt-W ruoso: hello!
11:04 * ruoso in a very hard month... barely working in Perl 6 development :(
11:05 [particle] joined #perl6
11:05 ejs joined #perl6
11:11 ft joined #perl6
11:13 |jedai| joined #perl6
11:16 Matt-W ruoso: these things happen sometimes unfortunately
11:20 tux300181 joined #perl6
11:20 krunen joined #perl6
11:39 maerzhase joined #perl6
11:40 araujo joined #perl6
11:45 maerzhase1 joined #perl6
11:49 braceta joined #perl6
11:51 |jedai| joined #perl6
12:42 |jedai| joined #perl6
12:44 masak on p6u, Richard Hainsworth proposes '.face' as the method for getting the string value of an enum value. while I don't understand the rationale for the method name, I definitely think there should be a method.
12:45 orafu joined #perl6
12:46 pugs_svn r24905 | masak++ | [u4x] added keywords to the README
12:52 mberends hi masak, how's Druid online coming along? I've done my part of the deal :)
12:52 masak mberends: OH HAI
12:53 masak mberends: well, I'm sort of ready to get going, but two components are needed still.
12:53 masak 1: SVG. I'm sort of writing that.
12:53 masak won't be that hard to do, I think.
12:54 masak 2: a proof-of-concept page running on feather.
12:54 masak mberends: do you think you could do that second part? it would make it much easier to know how to hook everything up.
12:54 mberends I think SVG may be like Postscript in an XML envelope
12:55 masak I understand each individual word in that sentence. but... what?
12:55 masak SVG is SVG.
12:56 mberends I'll add a proof of concept page to http://autoexec.demon.nl this evening
12:56 pmurias joined #perl6
12:56 mberends http://autoexec.demon.nl:8888
12:56 masak mberends: excellent. I'll try to speed things up on my end.
12:56 jnthn .oO( What is Druid anyway? )
12:57 masak jnthn: you haven't played it yet? for shame!
12:57 masak http://github.com/masak/druid/
12:57 jnthn masak: I'm too busy doing boring stuff, like implementing parametric roles and type registries. ;-)
12:57 masak jnthn: I understand. :)
12:57 jnthn ...and don't have a git client ;-)
12:57 masak you need to relax with this here board game.
12:57 masak jnthn: don't need one.
12:57 masak just click "download".
12:58 jnthn masak: FAIL!
12:58 jnthn http://github.com/tarballs/masak-druid-09e​6088ec3eaee0a9fc201e7d7090304d9285e3d.zip
12:58 jnthn That page doesn't exist!
12:58 masak :(
12:59 masak it does for me.
12:59 masak should I email you the .zip file?
13:01 jnthn Or the perl6 file ;)
13:01 jnthn masak: Oh, tried again and it worked this time.
13:01 masak oh, good.
13:05 |jedai| joined #perl6
13:25 [particle]1 joined #perl6
13:33 DemoFreak joined #perl6
13:49 Matt-W jnthn: parametric roles are not boring for the people who're going to use them!
13:49 moritz_ and who's going to use them? (except STD.pm)
13:50 jnthn Everyone who uses typed arrays? ;-)
13:51 moritz_ erm.
13:52 masak :)
13:52 ejs1 joined #perl6
13:52 masak jnthn: did the game work? /me is curious.
13:52 jnthn masak: I'm just doing some @other work at the moment...will get onto Rakudo stuff in 10 mins or so, then I'll try the game. :-)
13:52 masak :)
13:53 * moritz_ should try to get a grant for trying out all those Perl 6 games :-)
14:00 alexn_org joined #perl6
14:01 jnthn masak: I'm hoping my type registry addition didn't cause any pain for Druid/November.
14:02 masak jnthn: when did it slide in?
14:02 moritz_ yesterday
14:03 masak jnthn: in that case, no.
14:03 athenot joined #perl6
14:03 masak at least I think it didn't.
14:03 * masak recompiles Rakudo
14:03 masak I just got all the tests in November's master passing after the rvar branch.
14:07 jnthn masak++
14:08 masak :)
14:10 Matt-W November's been really helpful to me - looking at its code to figure out how to do stuff
14:11 moritz_ it's been also really helpful to all developers, it found dozens or even hundrets of bugs
14:11 literal random thought: can macros be used to remove debugging code during compilation so that it won't affect runtime performance?
14:11 moritz_ literal: yes
14:11 literal ok
14:12 masak Matt-W: let's make that step largely unnecessary by making u4x a huge success.
14:12 masak moritz_: maybe not hundreds, but surely over a hundred by now.
14:12 moritz_ masak: t/dispatcher/0{1,2} still fail for me
14:12 masak moritz_: nopaste perl6 run of it?
14:12 Matt-W masak: yes that would be a good idea :)
14:13 jnthn (1) Computer versus human
14:13 jnthn (2) Human versus computer
14:13 jnthn Hmm... :-)
14:13 masak jnthn: what? :)
14:14 jnthn Vertical: A
14:14 jnthn Nasty syntax
14:14 jnthn Hmm
14:14 masak a2
14:14 * jnthn should read the read-me
14:14 masak jnthn: it's under-documented, I know.
14:14 moritz_ masak: funny thing, it passes when I run it directly through perl6
14:14 masak the move syntax is like a2 or like b3-b5.
14:14 masak the rest is discoverable.
14:14 masak moritz_: :/
14:14 masak moritz_: ok, what warnings/errors do you get in prove?
14:15 jnthn masak: It appears to work! :-)
14:15 jnthn I don't know how to win though. :-)
14:15 moritz_ masak: http://nopaste.snit.ch/15304
14:15 * jnthn would hvve to read the docs for that
14:15 masak jnthn: if you're vertical, you're supposed to build a chain of pieces from top to bottom.
14:16 masak moritz_: that's from an older version of November.
14:16 Lorn joined #perl6
14:16 jnthn masak: Aha!
14:16 masak moritz_: MD5 (Dispatcher/Rule.pm) = 69e8914f10cdc32f1d4d1dd095b629c5
14:16 masak jnthn: and it's 3D.
14:17 moritz_ masak: same md5 here
14:17 masak moritz_: ok, strange.
14:17 masak moritz_: old Rakudo? :)
14:18 moritz_ masak: Rakudo svn up'ped and built today...
14:18 moritz_ masak: november git-pulled and
14:18 masak moritz_: perhaps even different versions when you run prove and perl6...
14:18 moritz_ make clean'ed
14:18 moritz_ and make'd
14:18 jnthn moritz_: Does your Rakudo pass all its tests?
14:18 masak moritz_: oh. I don't make.
14:18 * masak tries that.
14:19 moritz_ jnthn: I'll try
14:19 jnthn Also, one thing to beware of: I did change the root.in yesterday
14:19 jnthn So you need to perhaps make Makefile
14:19 moritz_ I did a realclean after that
14:19 jnthn Also I found some quirkiness with re-generating gen_builtins.pir
14:19 jnthn Ah, OK.
14:19 jnthn That should cover it.
14:20 masak moritz_: I can't make November. are you saying you can?
14:20 moritz_ jnthn: t/spec/S02-magicals/dollar_bang  dies with Null PMC access in isa()
14:21 moritz_ masak: so it seems :)
14:21 masak oddness.
14:21 jnthn moritz_: Odd. I didn't see that yestrday. Doing spectest run now.
14:21 masak my make dies on compiling November.pm, though I'm not sure the error is in that module.
14:21 |jedai| joined #perl6
14:22 * moritz_ stupid
14:22 moritz_ /home/moritz/tmp/rvar2/parrot /home/moritz/tmp/rvar2/languages/perl6/perl6.pbc --target=pir --output=Text/Markup/Wiki/Minimal.pir Text/Markup/Wiki/Minimal.pm
14:22 moritz_ wrong parrot
14:23 moritz_ jnthn: oh, and that test fails because I'm trying Ovid++'s Test.pm
14:24 jnthn moritz_: Ah, OK
14:24 jnthn Phew!
14:24 moritz_ now I caused very much unneeded confusion due to two stupid mistakes in a row
14:24 moritz_ time to do some physics
14:25 masak moritz_: ah. so November passes as well?
14:26 moritz_ masak: November doesn't build with current rakudo
14:26 masak moritz_: that's right.
14:26 masak do don't build it.
14:26 masak just run the tests.
14:26 * masak will try and figure out why November doesn't build
14:29 masak moritz_: do you also get 'Unable to parse role definition'? don't abort the physics for my sake, just asking for later.
14:31 jnthn masak: Is that something new that you've just got?
14:31 moritz_ masak: aye
14:31 * jnthn has been doing bits with roles
14:31 moritz_ t/01-cgi...........................1/23 too few arguments passed (0) - 2 params expected
14:32 masak jnthn: I have not been able to run make for a few days now. I don't remember when it started. I think the lists are in some november-wiki mailing list discussion.
14:33 jnthn masak: OK.
14:33 masak moritz_: oh, I'm getting that too now.
14:33 masak must be the latest Rakudo.
14:33 masak investigating.
14:33 moritz_ and many "non-dwimmy hyperops..."
14:34 masak moritz_: I don't get those (yet).
14:34 masak I do, however, get many 'too few arguments passed'
14:34 ruoso joined #perl6
14:34 masak something must have changed under our feet :)
14:35 moritz_ these seem to be related to grammar invokation
14:35 masak aye.
14:35 moritz_ do you use <Grammar::TOP>  to invoke it?
14:36 moritz_ t/markup/minimal/06-links..........Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.
14:36 jnthn masak: If you were using things like $foo ~~ Grammar::rule it *will* be broken now.
14:37 jnthn masak: And the wrong number arguments errors would match up with that.
14:40 masak oh, joy.
14:40 masak what's the correct way to do it?
14:41 jnthn masak: pmichaud had been saying it's wrong for a while. :-)
14:41 jnthn masak: $foo ~~ /<Grammar::rule>/ should work.
14:41 masak yes, I know, I know.
14:41 moritz_ 15:35 <@moritz_> do you use <Grammar::TOP>  to invoke it?
14:42 masak moritz_: apparently not :/
14:42 jnthn moritz_: I think I may break parametric roles up into a couple of test files.
14:42 moritz_ jnthn: feel free
14:43 alexn_org joined #perl6
14:43 jnthn moritz_: I want some more basic ones as well as your nice tricky ones. :-)
14:43 jnthn moritz_: Plus as mixins vs on a class etc.
14:43 moritz_ jnthn: I can very much understand that
14:47 |jedai| joined #perl6
15:02 exodist_ joined #perl6
15:03 Exodist joined #perl6
15:05 Casan joined #perl6
15:06 vixey joined #Perl6
15:23 hercynium joined #perl6
15:23 eric256 joined #perl6
15:31 ft joined #perl6
15:33 maerzhase joined #perl6
15:37 |jedai| joined #perl6
15:39 mberends joined #perl6
15:41 [particle] joined #perl6
15:43 masak if I use the new /<Foo::Bar::TOP>/ approach instead of the defunct Foo::Bar::TOP one, will $/ be affected in any way?
15:43 moritz_ masak: yes, there will be a $/<Foo::Bar::TOP>, which contains the same thing as the old $/
15:43 pmichaud yes, because the match would be   $/<Foo::Bar::TOP>
15:44 masak ok.
15:44 pmichaud I *think* the new official way to match a grammar is .parse, yes?
15:44 pmichaud at least I saw something like that scroll across my screens a few days ago
15:44 masak that explains all the sudden test failures after I fixed the first problems.
15:44 masak pmichaud: sounds familiar, yes.
15:44 moritz_ pmichaud: yes, .parse on the grammar
15:44 moritz_ and .parsefile
15:45 pmichaud it's not in S05 yet -- is there an IRC discussion I could look at?
15:45 eric256 my $parsed = Foo::Bar.parsefile($filename) ?
15:45 masak maybe I should hold out for that change -- putting long grammar names everywhere in working code makes me cringe a bit.
15:46 moritz_ eric256: yes
15:46 masak where $parsed would be a Match object, I guess.
15:47 Matt-W or whatever Foo::Bar::TOP returns with make...
15:47 Matt-W If I understand what make does correctly
15:47 masak right.
15:48 moritz_ Matt-W: it always returns a Match object
15:48 moritz_ Matt-W: but its scalar value can be an arbitrary object
15:48 Matt-W so make sets what that object will be
15:48 moritz_ aye
15:48 Matt-W such as the AST you've been building in the grammar rules
15:48 Matt-W handy
15:49 ruoso moritz_, I think "make" allows you to return something different from a match object
15:49 ruoso not only its scalar value
15:49 masak :)
15:49 ruoso but $/ will still be set, tho
15:50 moritz_ ruoso: I asked Larry why there's $/.text when ~$/ would do as well
15:50 moritz_ ruoso: the answer was "because the scalar value of $/ can be affected by make"
15:50 moritz_ (not word by word, though)
15:50 eric256 off topic: anyone have an idea what an average hourly rate for salesforce.com customization might be?
15:50 ruoso right... right,..
15:50 ruoso moritz_, I think that means that when you do "make" it will change the scalar value of $/
15:51 ruoso but not only that
15:51 ruoso it also returns that value from the token/rule instead of the match object
15:52 ruoso pugs: token a { . { make 123 } }; my $a = 'a' ~~ /<a>/; say $a.WHAT;
15:52 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runti...
15:52 ruoso meh
15:52 ruoso rakudo: token a { . { make 123 } }; my $a = 'a' ~~ /<a>/; say $a.WHAT;
15:52 p6eval rakudo 35528: OUTPUT«Statement not terminated properly at line 1, near "make 123 }"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:52 moritz_ pugs predates make
15:52 ruoso kp6: token a { . { make 123 } }; my $a = 'a' ~~ /<a>/; say $a.WHAT;
15:52 p6eval kp6 24905: OUTPUT«syntax error at position 40, line 1 column 40:␤token a { . { make 123 } }; my $a = 'a' ~~ /<a>/; say $a.WHAT␤                                        ^ HERE␤»
15:52 ruoso hmpf;
15:53 pugs_svn r24906 | masak++ | [u4x] want to handle special vars and pseudo-packages as well
15:53 pmichaud hmm, that's interesting.  I might've guessed that my $a = Grammar.parse() would result in $a getting the Match object itself.
15:53 pmichaud and then one does  $( $a ) to get at the result object.
15:53 moritz_ rakudo: token a { . {{ .return(23) }} }; my $a = 'a' ~~ /<a>/; say $a.PARROT
15:53 p6eval rakudo 35528: OUTPUT«Perl6Scalar->Match␤»
15:53 moritz_ pmichaud: that's my understanding as well
15:53 masak mine too.
15:53 ruoso and what if you "make @@a"
15:54 ruoso or... make grep { ... }, ...;
15:54 ruoso you'll be enforcing one context
15:54 ruoso where it could be assigned to any context
15:54 Matt-W rakudo doesn't support make yet, does it
15:54 pmichaud masak:  I think I can put .parse in fairly quickly if we can find the original discussion.
15:54 masak \o/
15:54 masak pmichaud: I'll go look for it.
15:55 pmichaud Note from #parrot, though -- as things currently stand the Parrot repo will be down starting 1900 UTC
15:55 Matt-W Oh dear. Any indication of how long for?
15:55 masak pmichaud: yes, I know.
15:56 jgoulah left #perl6
15:56 ruoso token a { . { make grep { $_ % 2 }, 1..10 } }; my @@a = 'a' ~~ /<a>/
15:56 moritz_ http://irclog.perlgeek.de/​perl6/2008-12-31#i_797318
15:56 moritz_ pmichaud: that was for you
15:56 pmichaud Matt-W: as much as 5 hours
15:56 pmichaud moritz++
15:56 masak moritz_++
15:57 Matt-W pmichaud: Thanks.
15:57 * Matt-W makes a note to svn up rakudo as soon as he gets home
15:58 ruoso Matt-W, that's when you want to be using git-svn
15:58 ruoso (or svk)
15:58 Matt-W Please don't make me overload my brain with more than its limited capacity, it's still trying to learn Perl 6...
15:59 Matt-W Also, if I start using git for anything at home, the svn setup at work is going to get even more intolerable
15:59 masak I just learned to use git. I still think git-svn is a bit tough to use.
16:00 ruoso still easier than svk...
16:00 Matt-W home &
16:05 mberends in r35522 (and for a few days already) there seems to be a difference between 'parrot perl6.pbc' and 'perl6' when applied to '--target=pir --output=Test.pir Test.pm' in languages/perl6. The former works (as used in make spectest), the latter segfaults here. is that a known problem?
16:06 pugs_svn r24907 | jnthn++ | [t/spec] The beginnings of some simple tests for parameterized roles - more to come.
16:06 masak mberends: no, but thanks for the tip. I've have problems building November, and that might be it.
16:07 moritz_ mberends: perl6 is more strict with memory checking than parrot perl6.pbc
16:07 moritz_ mberends: but if you have a short test case, please submit it as a rakudbug
16:08 mberends my suspicion is directed as pbc_to_exe
16:09 mberends the compile if Test.pm is a test case. gotta commute home soon, rakudobug later
16:09 mberends s/if/of/
16:10 rakudo_svn r35530 | jonathan++ | [rakudo] class C does R[param1, ...] { ... } now works insofar as it chooses the correct role.
16:10 |jedai| joined #perl6
16:12 ejs1 joined #perl6
16:14 stephens joined #perl6
16:32 jnthn std: role Foo[] { }
16:32 p6eval std 24907: OUTPUT«00:05 83m␤»
16:32 jnthn std: role Foo[] { }; class X does Foo[] { }
16:32 p6eval std 24907: OUTPUT«00:05 83m␤»
16:40 rakudo_svn r35531 | jonathan++ | [rakudo] Parse does Foo[] (STD.pm does).
16:42 Matt-W masak: reading the updated u4x readme, psi is going to benefit greatly from having STD.pm I think...
16:42 masak Matt-W: perhaps.
16:42 masak I was hoping that wouldn't be necessary, but maybe it is.
16:43 masak maybe we can get away with using a small part of it.
16:43 moritz_ masak: did you follow my earlier "perlhints" attempt?
16:43 masak moritz_: oh, it was you! yes, I remember it.
16:44 masak moritz_: I have unconsciously borrowed some ideas from it, methinks.
16:44 moritz_ I noticed some similarities
16:44 masak yes, that's because I liked the old idea.
16:44 moritz_ the idea was to have a chunk of documentation with much meta information
16:44 jnthn std: multi foo(::T) { }
16:44 p6eval std 24907: OUTPUT«00:05 83m␤»
16:44 jnthn std: multi foo(::T $x) { }
16:45 p6eval std 24907: OUTPUT«00:05 83m␤»
16:45 moritz_ enough so that a Perl 6 parser could emit HTML where you click on an element, and it gives you an explanation for this thing
16:45 masak moritz_: I've barely started to figure out how to structure the documentation.
16:46 masak moritz_: so far, I'm targetting the prompt and some sort of static web site.
16:46 eric256 http://irclog.perlgeek.de/​perl6/2009-01-13#i_829019  moritz_ and i where talking about being able to use the documentation for some thing like "use diagnostics" as wlel
16:46 masak (my role models being ri and perldoc, respectively)
16:47 masak eric256: sounds orthogonal to u4x, but a cool idea.
16:47 moritz_ well, if we organize it as some kind of database, it's available to every tool
16:48 PerlJam (available to all)++
16:48 PerlJam It occurs to me that whatever form that database takes it should probably use the same "database engine" that perl6 will use to manage modules/authors/revisions.
16:49 moritz_ for subs and method, they could just be available by name
16:49 masak moritz_: my only thought so far is that I'll have one directory with all the classes, one with all the operators, etc.
16:49 moritz_ masak: IMHO there's no reason to separate subs and operators
16:49 moritz_ masak: because ops are just subs with weird name and syntax
16:49 masak moritz_: agreed.
16:50 |jedai| joined #perl6
16:50 moritz_ what I worry more about, how do we index information to keywords?
16:50 masak as long as things can work as advertised, that's good.
16:50 moritz_ keyword:class perhaps?
16:50 masak moritz_: why not just 'class'?
16:50 masak 'psi class'
16:51 moritz_ masak: because it doesn't work for things like 'is'
16:51 masak moritz_: why not?
16:51 moritz_ masak: 'is' can be 1) traits 2) implementation type 3) inheritance 4) sub
16:51 masak moritz_: ok, so we need both the fuzzy term and a bunch of exact terms. yes.
16:52 masak the former will either turn up all matches, or a list of them.
16:52 moritz_ masak: that idea is incorporated in the `perlhints' data as well
16:52 moritz_ I use the rule names by which STD.pm matches
16:52 moritz_ as well as the syntax itself
16:52 masak moritz_: ooh, good idea!
16:53 moritz_ ie infix:<**> and **
16:53 masak exactly.
16:53 maerzhase joined #perl6
16:56 moritz_ PerlJam: re "Database Engine" maybe that's a good idea, but I'm not fond on waiting for such a thing
16:56 PerlJam moritz_: well, rather than waiting you could prototype something good :-)
16:57 * masak plans to use the file system as his database engine in the short term
16:57 moritz_ PerlJam: that would require good understanding of what's needed for Modules, and Design skills, and so on
16:57 moritz_ masak: as long as you don't create files named 'infix:<**>' :-)
16:58 PerlJam masak: what about dbm files (or bdb)?
16:58 moritz_ PerlJam: are they human readable
16:58 masak moritz_: oh. I'll have to think about that.
16:58 eric256 is that meta information about modules going to be stored in pod in the module? or externaly?
16:58 masak PerlJam: do you have a reference? I don't know anything about those formats.
16:59 PerlJam masak: it's basically a glorified hash on disk.  keys and values.
16:59 masak eric256: this is first and foremost for core things, not user-written modules. when we get as far as user-written modules, it'll be stored externally.
16:59 masak PerlJam: sounds nice.
16:59 masak PerlJam: why use that and not a Perl hash?
16:59 justatheory joined #perl6
16:59 moritz_ eric256: well, Perl 6 will have to have some kind of module database, because it must be able to locate modules by names that the file system doesn't support
16:59 PerlJam masak: you could tie the hash-on-disk to a perl hash if you want
17:00 PerlJam masak: perldoc -f dbmopenn # for the old-school method
17:00 PerlJam masak: perldoc -f tie
17:00 eric256 why can't core documentation be in the form of modules?  Array.pm, etc.  then once prelude gets going it loads all those
17:00 PerlJam er, s/dbmopenn/dbmopen/
17:00 masak PerlJam: right, right. I was thinking of doing this in Rakudo, however.
17:00 eric256 and instantly we can implement core functions in perl6 itself
17:00 moritz_ eric256: because we don't have Array.pm right now
17:00 masak eric256: also because there is not one Perl 6 implementation.
17:01 PerlJam masak: okay ... so you'd have to write the interface glue to attach a dbm file to rakudo.  That's a small strike against it I guess.
17:01 eric256 moritz_: doesn't mean that it couldn't be started just to house documentation?
17:01 PerlJam :-)
17:01 masak PerlJam: but the hash idea is good. that'll get us started.
17:02 moritz_ in my vision the documentation can be inside POD, and an external tool will extract that into a doc database
17:02 masak moritz_: yes, I want to use Pod.
17:06 masak admittedly, writing all of the Pod inside hash values sounds a bit cumbersome.
17:06 masak so maybe make the files pure Pod files instead...
17:07 masak ...and treat some level of heading like hash keys when loading them.
17:07 moritz_ that sounds nice
17:07 masak I like it, too.
17:09 masak so, starting from the list in the README file, which Pod files will we have?
17:10 masak subs, metaoperators, macros, keywords, special-variables, pseudo-packages...
17:10 moritz_ I'd rather structure it by topic
17:10 masak moritz_: please elaborate.
17:10 moritz_ Numbers, Arrays, Hashes, Objects, ...
17:11 moritz_ and Numbers would contain subs, methods, ops, macros (if any), ...
17:11 masak moritz_: I'm thinking of it from the viewpoint of fast access. how would pse know where to look?
17:11 maerzhase joined #perl6
17:11 moritz_ masak: it would read all files, build an index (or a db), ...
17:11 masak hm, maybe that really isn't a problem. or maybe it'll be a problem regardless...
17:11 |jedai| joined #perl6
17:12 masak moritz_: aye.
17:12 moritz_ masak: and that structure can be optimized for access
17:12 moritz_ what we write should be optimized for flexibility and writeability
17:12 masak indeed.
17:13 moritz_ that's also the route I took for perlhints
17:13 masak but I guess that was in Perl 5?
17:13 moritz_ the programs, yes
17:14 masak moritz_: do you see any reasons not to use Rakudo for this?
17:14 moritz_ but I consider them just a prove-of-concept
17:14 masak ok.
17:14 moritz_ much more effort went into the docs themselves
17:14 moritz_ masak: using Rakudo is good.
17:14 masak moritz_: where is perlhint?
17:15 moritz_ masak: misc/perlhints in the pugs repo
17:15 * masak has a look
17:16 moritz_ it has too much duplicate information right now
17:16 masak moritz_: why is that?
17:17 moritz_ masak: because I was unsure of how much I needed
17:17 moritz_ masak: for example token, name and id seem ... it seems overkill to have three of them
17:17 moritz_ s/seem/
17:18 masak moritz_: ah.
17:19 moritz_ but I like the label approach where you can say "this is an example", "this is a cross reference" etc.
17:20 masak I was thinking I'd use Pod for that.
17:20 masak haven't thought much about it, though.
17:21 moritz_ I found it a bit too clumsy for that
17:22 moritz_ but that's only personal preference
17:22 maerzhase1 joined #perl6
17:22 moritz_ that's why I used ultra-simplistic markup
17:23 masak ok.
17:23 masak will mull over this.
17:23 moritz_ that can be parsed with minimal effort, and learned with minimal effort
17:23 moritz_ (but doesn't offer rich possiblities - just key => value pairs)
17:24 masak why is it important that the markup be learned with minimal effort?
17:24 masak I mean, why is that more important than expressivity?
17:25 moritz_ it's not really all that important
17:25 moritz_ more important for me was that I could talk about all kinds of crazy Perl 6 syntax without interfering with markup
17:26 masak yes, I can see how that might be an issue.
17:26 moritz_ afk
17:26 masak to think that this was only a year and a half ago...
17:26 masak I think Rakudo is to thank for it feeling much longer.
17:27 masak (that's a compliment, by the way. Rakudo++)
17:30 * eric256 got pulled away to a metting
17:32 eric256 is there stuff in the pod spec for labeling methods, classes, etc, including paramters?  or was that just talk on the mailing list
17:32 eric256 hard to keep this stuff all straight some times
17:36 masak eric256: ISTR there was some talk about JavaDoc-like functionality. I don't know if Damian changed anything because of it.
17:36 masak to make matters worst, S26 is a draft and out of date.
17:37 masak I plan to read first S26 and then STD.pm to try to get an understanding of Pod.
17:50 rakudo_svn r35533 | pmichaud++ | [rakudo]: spectest-progress.csv update: 282 files, 6233 passing, 0 failing
17:50 rakudo_svn r35534 | jonathan++ | [rakudo] Ensure parse_name handles names with type-parametric parts.
17:51 [particle]1 joined #perl6
17:51 pdcawley joined #perl6
17:51 athenot joined #perl6
18:00 rakudo_svn r35535 | jonathan++ | [rakudo] Handle the case where we have something like multi foo(::T) { ... } or role Foo[::T] { ... }. Added an assertion that isn't in STD.pm, but makes things somewhat easier when building the AST (otherwise we'd get a bogus empty node in the Signature - maybe STD.pm avoids
18:00 rakudo_svn ..this in some other way, but I can't quite see how).
18:02 moritz_ I don't think STD.pm really avoid the creation of empty nodes
18:03 [particle]2 joined #perl6
18:04 [particle]2 rakudo: my $s = '+a ++b-b -c d ++b ++/b-b +++c -d -e ++c -f ++/c +++/c -g'; $s ~~ / [ \b ('+''+'+)(<.ident>['-'<.ident>]*) \b ] ~ [ \b $0 '/' $1 \b ] .*? /;
18:04 p6eval rakudo 35532: OUTPUT«Statement not terminated properly at line 1, near ".*? /;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:04 [particle]2 feh.
18:05 [particle]2 rakudo: my $s = '+a ++b-b -c d ++b ++/b-b +++c -d -e ++c -f ++/c +++/c -g'; $s ~~ / [ \b ('+''+'+)(<.ident>['-'<.ident>]*) \b ] (.*?) [ \b $0 '/' $1 \b ] /;
18:05 p6eval rakudo 35532: RESULT«Method 'perl' not found for invocant of class 'Match'␤current instr.: '_block14' pc 74 (EVAL_17:43)␤»
18:05 masak that's a known bug, I think.
18:05 [particle]2 rakudo: my $s = '+a ++b-b -c d ++b ++/b-b +++c -d -e ++c -f ++/c +++/c -g'; $s ~~ / [ \b ('+''+'+)(<.ident>['-'<.ident>]*) \b ] (.*?) [ \b $0 '/' $1 \b ] /; say $/[1];
18:05 p6eval rakudo 35532: OUTPUT«Use of uninitialized value␤␤»
18:05 [particle]2 what's known, the failure of goal matching syntax to work with non-string args?
18:05 [particle]2 or .perl?
18:07 masak that .perl isn't available on Match objects.
18:07 moritz_ [particle]2: it's known that <atom> ~ <atom> [ ... ] fails
18:07 [particle]2 ah, both :)
18:08 moritz_ [particle]2: if you're looking for a small project, a dump of Match objects would be *very* nice
18:08 [particle]2 thank larry there's more than one way to do it. if this were guido's language, we'd be screwed.
18:09 moritz_ even if eval($/.perl) wouldn't recreate the match object exactly, some dump as debuggin info would be great
18:09 [particle]2 moritz: i'm prototyping the api and grammar for a command-line parser atm
18:10 moritz_ I guess that's also necessary
18:10 [particle]2 agreed that Match.perl is highly desirable
18:10 [particle]2 it's necessary for me to get paid :)
18:12 avar somehow I read that as s/p/l/
18:13 masak Freudian slip of the eye.
18:13 Psyche^ joined #perl6
18:20 dalek joined #perl6
18:24 jnthn joined #perl6
18:27 masak ok, so I'm about to port SVG.pm from Perl 5 to Perl 6.
18:28 masak I find that the test suite doesn't really cover a lot of the module's functionality.
18:28 masak from what I can tell, it may even have grown as a sort of guard against regressions.
18:28 masak it definitely does not exercise all possible ways of using SVG.
18:29 masak so, what to do? just start from scratch? any ideas?
18:30 PerlJam I'd start with the tests that are there and incrementally adds ones to cover the functionality as it is ported
18:31 avar Or, if you just want to port something and don't need SVG in particular port something with proper tests
18:31 avar 99% of cpan probably has "stuff that was screwed at one point" as opposed to anything near 100% coverage though:)
18:32 spx2 joined #perl6
18:35 masak thank you both.
18:35 masak I do need SVG in particular.
18:48 iblechbot joined #perl6
18:57 pugs_svn r24908 | jnthn++ | [t/spec] More tests for parametric roles, including use of parameters in methods.
18:59 jnthn OK, back in a bit...that patch gets parametric roles and methods within them working out about right, I think.
18:59 jnthn Some weird issue with attributes within them though.
19:00 rakudo_svn r35542 | jonathan++ | [rakudo] Parametric roles now clone methods, meaning that we get them attached to the right parameters.
19:04 maerzhase joined #perl6
19:26 pmurias joined #perl6
19:26 pmurias hi
19:29 moritz_ hi pmurias
19:30 masak hello pmurias
19:31 [particle]2 left #perl6
19:38 szabgab rakudo: my $x; $x //= 'DEFAULT'; $x.say;
19:38 p6eval rakudo 35545: OUTPUT«Use of uninitialized value␤␤»
19:39 moritz_ szabgab: //= doesn't work atm
19:39 moritz_ szabgab: there's a ticket for that already
19:41 szabgab moritz_: thanks
19:43 braceta joined #perl6
19:47 pmurias is code i intend to port to p6 when it's finished off-topic for the pugs repo?
19:49 moritz_ pmurias: the pugs repo has a fairly loose defintion of topic ;-)
19:49 jnthn pmurias: If it's useful to your work on p6 related stuff, then I'd say it's fine. :-)
19:50 moritz_ I certainly won't feel offended
19:51 moritz_ TimToady: we've been discussing built-in testing and adverbs a few months ago - would you mind if I take the disucssion to p6l?
19:54 pmichaud moritz_: I think the answer will be "I don't mind", or "no need to ask".  :-)
19:54 pmichaud I don't speak for TimToady, but that's my guess.
19:55 * jnthn is back from dinner
19:55 moritz_ pmichaud: probably, but since I have no hurry, it doesn't hurt to ask
19:55 pugs_svn r24909 | masak++ | [perlhints] fixed small typo
19:55 jnthn pmichaud: I just put a chunk of inline PIR into actions.pm, because we need to spit out the newclosure in the right place, so I couldn't put it in some PIR.
19:55 jnthn (IIUC)
19:56 jnthn pmichaud: If that's hateful to you, suggestions for how to do better welcome. :-)
19:57 pmichaud okay.  But you should also be able to do a :pirop('newclosure') somehow, instead of the inline PIR.  Still, I'm not adamantly apposed to the inline PIR.
19:57 pmichaud I'll review it a bit later to double-check.
19:59 TimToady moritz_: well, depends on how much bikeshedding you want :)
19:59 moritz_ TimToady: I know, but I want to hear opinions
20:00 TimToady I don't have a problem with it, at least not yet...
20:00 moritz_ and maybe if we give them some food for thought, they spend less energy on .trim ;-)
20:00 moritz_ (ok, that's only wishful thinking)
20:02 jnthn pmichaud: Review and let me know. There's a bit more to it than I can see being able to handle with a :pirop.
20:02 [particle] joined #perl6
20:04 pmichaud jnthn: that's kinda what I figure.  :-)
20:10 dh_ joined #perl6
20:11 szabgab rakudo: if 1 { say 'ok' }
20:11 p6eval rakudo 35545: OUTPUT«ok␤»
20:12 szabgab strange, that does not work for me, checking
20:12 moritz_ szabgab: there are a few known parse failures when an 'if' or 'for' or 'while' is directly after a class (or sub?) definiton
20:13 szabgab ah, then that's the reason, thanks
20:13 moritz_ they are always WTF moments when I encounter them
20:13 szabgab adding a ; after the sub declaration helps
20:14 szabgab is there a test with this ?
20:15 moritz_ szabgab: there's a test case in the ticket, but not in the suite
20:15 szabgab I guess it is still in RT?
20:16 moritz_ aye
20:16 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=58544
20:17 moritz_ no, that's the wrong one
20:17 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=57876
20:18 szabgab thanks
20:19 moritz_ np
20:21 pbuetow joined #perl6
20:26 pugs_svn r24910 | moritz++ | [t/spec] basic tests that bare print and say die
20:32 szabgab rakudo_svn: @a=(1,2); say @a[-1];
20:32 szabgab rakudo: @a=(1,2); say @a[-1];
20:32 p6eval rakudo 35545: OUTPUT«Scope not found for PAST::Var '@a' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
20:32 szabgab rakudo: my @a=(1,2); say @a[-1];
20:32 p6eval rakudo 35545: OUTPUT«Use of uninitialized value␤␤»
20:32 moritz_ rakudo: my @a=(1,2); say @a[*-1];
20:32 p6eval rakudo 35545: OUTPUT«2␤»
20:33 szabgab ah, I see now, thanks
20:33 szabgab but that's ugly :-(
20:34 moritz_ I won't argue on this one :/
20:34 szabgab actually what index -1 means here ?
20:34 szabgab just another slot before the 0th ?
20:34 moritz_ I think so, yes
20:34 moritz_ S09 has the gory details
20:35 moritz_ but mostly it was to avoid accidental indexing from behind
20:35 szabgab yeah, looking at it
20:39 mberends joined #perl6
20:40 ovid joined #perl6
20:40 szabgab I have very strange problem in this script: http://svn1.hostlocal.com/szabgab/​trunk/Perl6-Cookbook/eg/04_Arrays/​02_Printing_a_List_with_Commas.p6
20:41 szabgab it works now, but if I comment out the @_.perl.say;
20:41 szabgab part in the first line of the sub, it starts printing foobarbaz
20:41 ovid End blocks in Test.pm are not firing. Well, I can put a say() statement in there and it sometimes fires ... at the beginning of the test script.
20:42 ovid This means I can't implement no_plan for Test.pm
20:42 szabgab ovid: hi
20:42 ovid HI Gabor :)
20:42 mberends masak: RAKDO CAN HAZ SVG! http://autoexec.demon.nl/svg/
20:42 mberends masak: RAKDO CAN HAZ SVG! http://autoexec.demon.nl:8888/svg/
20:43 moritz_ szabgab: I remember there was a problem with nested ?? !! - don't know if that still persists
20:43 eric256 mberends++
20:43 moritz_ szabgab: but it doesn't really look like that's the problem
20:43 szabgab moritz_: the strange thing is that it works if I have the first say in there
20:43 moritz_ szabgab: aye
20:44 moritz_ szabgab: seems to be an array passing problem of some sort
20:44 jnthn ovid: Is that a pre-compiled Test.pm?
20:44 moritz_ szabgab: if you 'say commify_series(|@names);' it works
20:44 * jnthn wonders how END blocks and pre-compilation go together...
20:45 szabgab what is that | there ?
20:45 ovid jnthn: All I know is that when I alter it, I can type make $test_name and all alterations are picked up, so I think it's being output as Test.pir and then run.
20:45 szabgab reading @09 ?
20:45 jnthn ovid: Ah.
20:45 donaldh joined #perl6
20:45 ovid ../../parrot  perl6.pbc --target=pir --output=Test.pir Test.pm
20:45 jnthn ovid: I have a suspicion that END blocks and pre-compilation don't go together.
20:46 ovid Ouch :(
20:46 eric256 szabgab: i added a sig (@s) and s/_/s/g and it works too
20:46 jnthn ovid: Give me a few minutes... :-)
20:46 ovid Heh.  OK.
20:46 moritz_ ovid: plan(*) is probably the more Perl6ish version of 'no_plan'
20:47 ovid I can change it once END blocks work.
20:47 moritz_ ovid: oh, and please keep the subs (like ok()) multis, even if you make the description optional
20:47 moritz_ ovid: that way they are easier to extend/override
20:47 szabgab but I assume it *should* work the way I wrote too , without the |, or the @s right ?
20:47 ovid My friend Gabrielle is flying in and I won't have much time to work on Perl 6 for the next couple of weeks, so I hope to get Test.pm done before then :)
20:48 moritz_ szabgab: I think it should, because @_ should be slurpy
20:48 ovid moritz_: why so?  We've got the core testing API stabilized for years. How will this help?  (Not that I mind.  Just curious)
20:48 szabgab oh, the data is there and it works iff I have the first say :-)
20:48 ovid It just seems like an awful lot of duplicated code.
20:48 szabgab ok, I am going in loop
20:48 szabgab s
20:49 moritz_ ovid: when somebody wants to write another 'is' sub that compares things of a specific type, they can add a multi much easier if is() is declared to be a multi
20:50 moritz_ ovid: that doesn't imply that you have to duplicate any code, just add a 'multi ' before the sub, and keep the default value for the description
20:50 rakudo_svn r35547 | bernhard++ | [codingstd] trailing spaces
20:50 ovid Ah! I see what you mean.  So long as I have $desc="" in the sig, that seems ok.
20:52 moritz_ (ideally we'd just declare protos, but I'm not sure how well rakudo does them atm)
20:53 jnthn moritz_: protos only work as tie-breakers at the mo.
20:53 jnthn Hope to get that aspect of them in shortlyish though. :-)
20:53 jnthn ovid: svn up and give it a try - may have fixed the lexicals in END blocks issue too with that patch.
20:54 ovid ok
20:54 moritz_ jnthn: no hurry
20:54 jnthn moritz_: It's on my Hague grant todo list. :-)
20:54 moritz_ ah ;)
20:54 jnthn moritz_: So if I want to have money for beer a couple of months down the line, hurry. ;-)
20:55 ovid Recompiling everything now (and hoping) :)
21:00 rakudo_svn r35548 | jonathan++ | [rakudo] Try to fix END blocks to work with pre-compiled modules and with lexicals.
21:00 rakudo_svn r35549 | jonathan++ | [rakudo] Fix make test by tracking roles change in PIR tests for Perl6MultiSub.
21:00 rakudo_svn r35550 | moritz++ | [rakudo] add test for bare 'say' being an error to t/spectest.data
21:03 ovid I assume that with parrot, others are getting regular failures with t/library/protoobject.t? (test 8)
21:03 ovid Wow.  languages/perl6 make test just imploded quite spectacularly :)
21:04 ovid I did make realclean, but checking out a clean parrot just to be sure.
21:05 jnthn ovid: Really?
21:05 jnthn ovid: Where?
21:05 ovid Yeah. Tons of failures looking just like this:
21:05 ovid 'Sub'
21:05 ovid current instr.: 'parrot;Any;evalfile' pc 2908381 ((unknown file):-1)
21:05 ovid t/spec/S02-builtin_data_types/mixed_multi_dimensional.rakudo ... Dubious, test returned 1 (wstat 256, 0x100)
21:05 ovid No subtests run
21:06 ovid Like I said, I'm checking out parrot into a new directory and will try again there, just in case I diddled something I should not have.
21:07 jnthn ovid: With no local diffs I get well past that in the spectests, so may be your working copy or something.
21:08 moritz_ works here too
21:08 ovid Yeah, I borked Test.pm and forgot to revert it :)
21:08 moritz_ ovid: I did the same mistake today already ;-)
21:09 ovid I need to build better tools to manage this.  i already have an alias to handle this, but I need it to run 'svn status' and abort if grep ^M
21:09 ovid Actually, I need to write a bash script to do this. My alias is too long already.
21:12 simcop2387 joined #perl6
21:16 ovid Whee!  My new 'reparrot' command works beautifully :)
21:16 jnthn Wow! The original Test.pm actually has an END block. Which now gives output...
21:17 ovid Sweet!
21:17 * jnthn just ran a test invidivually and observed this
21:18 jnthn Sadly, the test failed. :-|
21:18 * jnthn tries to work out the next bug with attributes in roles...
21:19 moritz_ can I use a parameterized role everywhere instead of a normal type?
21:20 jnthn Not *yet*. :-)
21:21 moritz_ but in theory I can?
21:21 justatheory hem?
21:21 jnthn Depends what you mean by "everywhere" :-)
21:21 pmichaud and "theory"  :-)
21:21 pmichaud and "can"  :-)
21:21 moritz_ jnthn: for example in signatures
21:21 justatheory Can I what?
21:21 jnthn moritz_: Yes.
21:21 jnthn moritz_: I believe so.
21:22 jnthn But that's still very much todo.
21:23 moritz_ rakudo: role A[$x] { method f { 2 * $x } }; class B does A[3] { }; B.new.f
21:23 p6eval rakudo 35551: RESULT«6»
21:23 moritz_ jnthn++
21:23 moritz_ that's really cool
21:24 ovid Sweet :)
21:24 moritz_ rakudo: role A[$x] { method f { 2 * $x } }; my $x = "foo" but A[5]; say $x.f
21:24 p6eval rakudo 35551: OUTPUT«elements() not implemented in class 'Perl6Role'␤current instr.: 'postcircumfix:[ ]' pc 2656 (src/classes/Positional.pir:108)␤»
21:24 jnthn moritz_: Note done the mix-in form yet.
21:24 jnthn *not
21:26 pasteling "ovid" at 91.85.167.13 pasted "t/library/protoobject.t has been failing for a while now" (14 lines, 250B) at http://sial.org/pbot/34477
21:26 ovid That output doesn't make a lick of sense to me.
21:26 moritz_ Exited with error code: [SIGNAL 10]
21:27 moritz_ it's a bit confusing that the got/expected is shown even though it matches
21:27 jnthn The fact that it...yes, that.
21:27 ovid Whitespace?  I doubt it, but since there aren't any quotes, tough to say.
21:28 moritz_ ovid: the test script runs individual .pir files, and one of them parrot died, after it produced the desired output
21:29 ovid joined #perl6
21:29 ovid Missed me?
21:29 moritz_ ovid: run './parrot t/library/protoobject_8.pir' to get more information
21:29 ovid Will do in a moment.
21:30 pasteling "ovid" at 91.85.167.13 pasted "Bus error" (5 lines, 70B) at http://sial.org/pbot/34478
21:31 wolverian joined #perl6
21:31 moritz_ ovid: https://trac.parrot.org/parrot/newticket if you please ;-)
21:31 ovid Will do :)
21:32 ovid Ah, sheesh.  I don't know if I have an account there. Let me try various pass/email combos.
21:32 moritz_ it's pretty new
21:33 ovid Yeah, I don't have an account on that (that I can tell)
21:36 thepler joined #perl6
21:37 ovid no_plan now works :)
21:38 ovid I'll submit a bug to parrotbug until I get a Trac account.
21:40 jnthn ovid: Great!
21:40 jnthn ovid: Lexicals probably should work in end blocks too, if that was getting in your way before.
21:41 jnthn Turns out attribute initialization in non-parameterized roles didn't work, let alone the parameterized ones. :-)
21:41 jnthn (Though there was an extra special bug for paramterized ones too. ;-))
21:43 |jedai| joined #perl6
21:43 szabgab rakudo: qw(A B C D).pick(5, 1).say;
21:43 p6eval rakudo 35551: OUTPUT«CBDDD␤»
21:43 szabgab rakudo: qw(A B C D).pick(5).say;
21:43 p6eval rakudo 35551: OUTPUT«DACB␤»
21:43 szabgab should not the latter give an error ?
21:44 moritz_ dunno
21:44 * jnthn didn't know that pick took a second argument...what is that?
21:44 szabgab allows repetition
21:45 jnthn Ah, OK.
21:45 szabgab default is no repetition so picking 5 out of 4 is sort of, impossible
21:47 moritz_ szabgab: qw() shouldn't work in Perl6, everything of the form identifier() is a sub call
21:47 moritz_ szabgab: use <a b c d> instead
21:47 TimToady note that's supposed to be a named-only parameter
21:47 pugs_svn r24911 | jnthn++ | [t/spec] Test for attributes in roles having a default value.
21:47 TimToady rakudo: <A B C D>.pick(5, :repl).say
21:47 p6eval rakudo 35553: OUTPUT«DACBD␤»
21:47 moritz_ rakudo and parrot are too permissive in that respect
21:47 TimToady so the positional call to it should be disallowed
21:48 pugs_svn r24912 | jnthn++ | [t/spec] Tsts for using role parameters for attribute initialization.
21:48 szabgab moritz_: wel,, now qw() works in rakudo   but I stop using it then :-)
21:49 maerzhase1 joined #perl6
21:50 TimToady std: qw(42)
21:50 p6eval std 24912: OUTPUT«Unknown routines:␤     qw called at 1 ␤00:05 85m␤»
21:50 rakudo_svn r35559 | jonathan++ | [rakudo] When composing attributes into a role, we need to carry any properties along with them, otherwise default values and traits and so forth don't work.
21:50 rakudo_svn r35560 | jonathan++ | [rakudo] Since when we are parsing a signature we may be doing it for a package now (e.g. a parameterized role), we may already have got a block created. So check for this and use the existing one if so (otherwise we lose $block<pkgdecl>).
21:51 kisu joined #perl6
21:51 szabgab TimToady: so you say that 1 as the second param should not be allowed just :repl ?
21:51 jnthn TimToady: Heh, I was about to say, "wouldn't it be better to make it named..." :-)
21:51 jnthn OK, that's enough parametric roles hacking for one day.
21:52 TimToady jnthn: also the parameter to the role needs to be treated as constant
21:52 TimToady found this necessary in STD
21:52 TimToady so that I could say match $stopper and have it treated as part of the token
21:53 jnthn TimToady: Clarify what you mean by "constant"
21:53 jnthn TimToady: Do you mean that
21:53 jnthn role Foo[$x] { ... }
21:53 jnthn class A does Foo['a'] { ... }
21:53 jnthn class B does Foo['b'] { ... }
21:54 jnthn Will not trample on each others $x?
21:54 TimToady the optimizer can bank on those not changing for the particular instantiation
21:54 TimToady in particular, regex semantics need to know what's part of the token, and that implies knowing that the parameter effectively constant
21:55 TimToady also means that the constant folder can go to work
21:55 jnthn Ah, OK. So you're saying that class A does Foo[$thingy_that_can_change] { ... } should be forbidden?
21:55 moritz_ or that a snapshot should be taken from $thingy_that_can_change?
21:56 jnthn Or rather, that we take a copy of it as it is at the time we do the role?
21:56 TimToady probably is nonsense to have an "is rw" param there
21:56 jnthn It's like an is copy but still readonly kinda thing. :-)
21:56 TimToady but since there is just one call for the given instantiation, is effectively constant
21:57 jnthn TimToady: Is moritz_ snapshot statement about right?
21:57 pasteling "ovid" at 91.85.167.13 pasted "Known bugs with *?" (25 lines, 1.5K) at http://sial.org/pbot/34479
21:57 ovid Tried to implement plan * as 'no_plan'
21:57 TimToady didn't see it
21:57 jnthn 22:55 <@moritz_> or that a snapshot should be taken from $thingy_that_can_change?
21:57 jnthn Basically, is it like we take a snapshot of what the value was?
21:58 TimToady yes, snapshot
21:58 jnthn OK.
21:58 jnthn That makes sense.
21:58 pmichaud ovid: those look like rakudobugs to me.
21:58 ovid Known? If not, I'll file 'em.
21:58 pmichaud I don't think known.
21:58 ovid OK.
21:58 pmichaud okay to file, even if they're dups :-)
21:58 moritz_ rakudo: multi sub plan(Whatever $x) { say "1..0" }; multi sub plan(Int $x) { say "1..$x" }; plan(4); plan(*)
21:58 p6eval rakudo 35553: OUTPUT«1..4␤1..0␤»
21:58 TimToady otherwise I see little benefit of normal parameterized code
21:58 jnthn I don't remember seeing a ticket, but I've seen the first bug.
21:59 ovid Ah.  I'll stop bugging people about known bugs then :)
21:59 TimToady s/of/over/
21:59 jnthn TimToady: Indeed.
21:59 [particle] ovid is a known bugger
21:59 jnthn Makes sense.
21:59 cspencer joined #perl6
21:59 TimToady $dayjob &
21:59 ovid particle:  shhh! Don't tell anyone!
22:02 ovid Actually, that first one I think is a known bug because I seem to recall seeing it in some code where a trailing semi-colon is required.  If I supply that, I get the second error.
22:03 wknight8111 joined #perl6
22:03 ovid Ah, so as long as I specify the type with a multi-sub , it works.  Strange.  I'll try that.
22:05 iblechbot joined #perl6
22:08 cspencer rakudo: my $x = *; say $x
22:08 p6eval rakudo 35553: OUTPUT«Whatever<0xb5fa2218>␤»
22:08 cspencer rakudo: my Int $x = *; say $x
22:08 p6eval rakudo 35553: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 15870 (src/builtins/control.pir:204)␤»
22:13 [particle]1 joined #perl6
22:16 ovid Damn it.  How many times am I going to send in patches and forget to attach them?
22:17 PerlJam as many times as it takes  ;)
22:18 ovid :)
22:18 PerlJam ovid: since you're here and I'm curious ... Did you convince the BBC or are there other forward thinking people in there that all agreed to help perl 6 ?
22:19 ovid This chat is logged.  I plead the fifth.
22:19 PerlJam fair enough
22:19 PerlJam ovid++ anyway  :)
22:19 ovid Let's just say there was a lot of internal support and excitement about it.
22:19 ovid Thanks :)
22:20 ovid Mmmm ... profanity (apropos of nothing, of course ...)
22:25 |jedai| joined #perl6
22:32 ovid What I CAN say, and it can be repeatedly publicly so long as it's made extremely clear that this is my opinion and I'm not speaking for the BBC is that we have many excellent developers who are quite excited about Parrot and Perl 6 and they're very excited about its development and how we might use it in the future.
22:32 jnthn :-)
22:33 ovid The problem is that the BBC cannot be seen to endorsing "products" as this can distort the market.  Just because the developers are excited about Parrot/Rakudo does not mean that it will be adopted.
22:33 dh_ if it ever gets released in the future, and when this happens, hopefully it is as least as fast as perl 5 :)
22:33 ovid Again, my opinion and not speaking for the BBC :)
22:39 PerlJam dh_: It'll be faster because programmers will be able to do more while writing less.
22:41 moritz_ dh_: I don't think that the first versions will be faster than Perl 5, because that has 20 years of optimizing behind it
22:42 ovid Yes, developer performance != CPU performance.
22:42 jnthn Indeed. It would be a huge diss to the Perl 5 developers to suggest that an unoptimized Perl 6 would beat a Perl 5 that's had so much effort put into it in terms of runtime performance.
22:43 moritz_ and I think that Perl 6 compilation will never be as fast as Perl 5 compilation
22:43 moritz_ simply because in Perl 5 the compilation phase doesn't do all that much
22:43 moritz_ heck, it's even faster to recompile a perl script than to dump the byte code to disk, and re-read it again
22:44 jnthn Aye. The parsing will speed up notably over where we're at now in Rakudo. But I agree with moritz_ - we're doing a lot more at compile time.
22:45 jnthn *but* running from the bytecode should be good :-)
22:45 jferrero joined #perl6
22:46 jnthn (Again, maybe not Perl 5 competitive at first. But I think over time we will have a good chance there.)
22:46 jnthn Optimzing before we have a *lot* of regression tests would also be a very bad idea.
22:46 moritz_ aye
22:47 moritz_ and writing a type aware optimizer is probably a big task
22:47 araujo ovid, so when you guys in BBC plan to start migrating to Perl 6?
22:47 araujo :-D
22:47 ovid Christmas.
22:47 PerlJam heh
22:49 ovid Well, hey ... that was just begging for that response :)
22:49 jnthn moritz_: Aye, I think there will be much fun to be had on type-based optimizations. But...later.
22:49 jnthn Parametric roles have hurt my brain enough this week.
22:50 moritz_ yes, such an optimizer is a well-past-rakudo-1.0-task
22:50 * araujo packs the logs and send them to BBC ... (with a typo fix)
22:50 * jnthn hopes to still be around to participate in writing such an optimizer
22:51 * ovid hopes to be around after araujo sends those logs :)  I was careful about what I said. I doubt they'll be too worried so long as I have enough disclaimers.  Of course, that's only my opinion and not the official opinion of the BBC.
22:51 araujo haha
22:52 ovid jnthn: Are you worried you'll be gone for a while?
22:52 dh_ are you guys saying it is not possible to design a language that is both equally effecient for the programmer and computer resources?
22:53 ovid dh_ Optimization of dynamic languages still lag for behind optimization of static languages.
22:53 araujo ovid, don't worry, you are safe here ...
22:53 araujo we even have TimToady
22:53 moritz_ dh_: I don't say it's impossible, I just say that it'll be a whole lot of work to optimize Perl 6
22:54 jnthn ovid: I don't see anything that'll cause me not to be involved in Rakudo for the foreseeable future, but who knows what life will throw.
22:54 ejs1 left #perl6
22:54 jnthn Right now, it's the most interesting project I work on. :-)
22:54 moritz_ dh_: otoh Perl 6 has many more possible hooks for optimization than Perl 5, so after some years or decades I guess that Perl 6 execute speed will be better than Perl 5's, hopefully way beyond
22:55 ovid Oh, and if anyone is concerned about my use of 'static' and 'dynamic', I like this description:  http://www.pphsg.org/cdsmith/types.html
22:56 dh_ moritz, that's good to hear, that's what i am hoping for
22:56 PerlJam moritz_: it'll be hard to optimize the parser so much I think.
22:56 dh_ i certainly wouldn't expect perl6 to be faster right away
22:57 dh_ or as fast
22:57 moritz_ PerlJam: don't forget that the parser can, in theory, use pre-compiled DFAs for many regexes
22:58 PerlJam moritz_: let's just say I'm hopeful but pessimistic.
22:58 moritz_ ;-)
22:59 PerlJam I mean, I *know* the parser might be able to use pre-compiled DFAs ... I just think it's going to be a while before we get there and there will be other factors involved in parsing speed that may negate the advantages.
23:01 PerlJam ask me about it again after the LTM gets integrated ;)
23:02 ovid I figure some developers might find this useful:  http://use.perl.org/~Ovid/journal/38290
23:03 * moritz_ reviews and tests ovid++'s Test.pm
23:03 justatheory werd up, ovid
23:03 ovid I'm trying to add the diagnostics, but so many bugs ... (including one that I can't replicate in a smaller test case!)
23:03 ovid Thanks David :)
23:04 justatheory fer what?
23:05 moritz_ ovid: is there a good reason for plan(Whatever) not to set $testing_started?
23:05 ovid moritz_ Hmm, didn't think about that.  Didn't impact the test suite passing, though.
23:06 ovid I'll look again.
23:06 moritz_ ovid: afaict the only difference is that it will never output the "Looks like you failed $num_of_tests_failed tests of $num_of_tests_run" message, I think
23:06 pmichaud when looking at Test.pm, keep in mind two items:  (1)  there's a good case to be made that it should remain simple, so that other budding Perl 6 implementations can use it;  (2)  we expect/hope many of these functions to become part of the Perl 6 specification.
23:06 ovid justatheory:  I thought "werd up" was a compliment.  My bad.
23:06 ovid :)
23:07 pmichaud (in which case Test.pm becomes obsolete, or part of the prelude)
23:07 ovid pmichaud:  Interesting point.  I thought about incorporating some of the new TAP diagnostics, but I thought a) they're not finalized and b) Test.pm needs to go away because it's too primitive.
23:07 moritz_ ovid: t/spec/S03-junctions/boolean-context.t fails with your Test.pm, but passes with the old one
23:08 ovid Hmm, not getting that failure.  I'll look again.
23:08 pmichaud there's a purpose for having a primitive Test.pm (the idea that these may become part of the spec)
23:08 moritz_ pmichaud: from my POV it's ok to sacrifice some simplicity to get good diagnostics
23:08 pmichaud this isn't to say that there can't be a more sophisticated testing harness -- we just don't want to make that a requirement for using the spectest suite
23:09 justatheory ovid: Just saying hello.
23:10 pmichaud I'd like to avoid (or help others avoid) the problem I run into with Python-on-Parrot.  Python has a test suite, but you can only use it if you have a fully implemented version of Python.
23:11 ovid pmichaud:  the test harness consumes TAP. Test.pm produces it.  Different things. That being said, I completely understand your point.  Maybe I should write a different Makefile target which uses a more fully featured Test.pm (renamed, of course) to avoid said issues?
23:11 moritz_ pmichaud: sure, but that shouldn't keep us from improving Test.pm... as long as it's not hard to write a very primitive Test.pm when we start a new implementation
23:11 pmichaud moritz_: we're agreeing.  :-)
23:11 moritz_ good ;-)
23:12 pmichaud thus I said "keep in mind" as opposed to "don't do it because..."  :-)
23:13 pmichaud I'm very receptive to improvements to Test.pm
23:13 ovid pmichaud: I agree, too.  That's why I'm thinking there should be a separate Makefile target for the spectests and a better "Test.pm".  I welcome other strategies, though. (And the fact that I'm soon on vacation and may not have much time is a frustration. I want to keep working on this) :)
23:14 pmichaud ovid: the issue will likely still be around when you return from vacation :-)
23:14 jnthn pmichaud: Fixing END blocks in pre-compiled modules gets tests spitting out a little more diagnostics at the end when run individually. :-)
23:14 justatheory ovid: Work on it during your vacation.
23:14 ovid Stop.  Yer killin' me :)
23:14 pmichaud I'm find with separate makefile targets for a while.
23:14 pmichaud *fine
23:15 moritz_ ovid: the tests that cause problems for me are of the form
23:15 moritz_ (1|$undef && pass '1|undef in boolean context') || flunk '1|undef in boolean context';
23:15 ovid OK.  I'll have to reconfigure vim to not kill all tabs.  I'll take a s(tab) at it.
23:15 pmichaud make sure that the test functions accept Object and not Any
23:15 moritz_ ovid: in this case, poss pass() and flunk() are run
23:15 ovid moritz_: Ah, I just fixed that.  The 'sub proclaim' needs to return '$cond' or "$passed" or whatever it's called.
23:15 moritz_ ovid: I thought along the same lines
23:16 moritz_ ones that's fixed, I'm positive to check it in (awaiting pmichaud's veto)
23:16 moritz_ but now: bed
23:18 jnthn pmichaud: ping
23:18 pmichaud pong
23:18 jnthn hi
23:18 jnthn Does PGE yet handle interpolating variables into tokens/rules/regexes?
23:18 jnthn As in token foo { $x }
23:21 pmichaud no.
23:21 pmichaud that's coming relatively soon.
23:21 jnthn OK.
23:21 jnthn OK.
23:21 pmichaud (because when PGE was written, lexicals didn't work.  Like, at all.)
23:21 jnthn *nod*
23:21 jnthn Will it be smart about things marked constant?
23:21 pmichaud you mean for assignments?
23:21 jnthn Once we define a way of marking thingies constant... :-)
23:22 pmichaud I'm confused.
23:22 jnthn In my example above, if you know the variable $x cannot change, it'd be able to take its value at compile time and inline it?
23:22 jnthn As in, match its content as a literal.
23:22 ovid Since the test explicitly say 'use Test', is there yet a way to get Perl 6 to pick up a different path (e.g. perl6 -l lib/Test.pm)?  I can't think of any other way for the tests to pick up a better Test.pm.
23:23 moritz_ ovid: set PERL6LIB env variable
23:23 pmichaud ovid:  change PERL6LIB env var
23:23 ovid Ah.  Thanks!
23:23 moritz_ ovid: or BEGIN { @*INC.push('/path/') }
23:23 pmichaud jnthn: I'm not sure that we can assume that $x doesn't change.
23:23 pmichaud anyway, inlining it won't really be that big an improvement, I don't think.
23:23 jnthn pmichaud: In the case when we _know_ it can't?
23:24 pmichaud jnthn: I don't think there's a significant speed difference between looking up the PMC and simply having a string constant.
23:24 jnthn Maybe I should just point you upwards to earlier discussion with TimToady on this. :-)
23:24 ovid Gotta hit the hey.  Thanks for everyone's help!
23:24 ovid s/hey/hay/
23:24 jnthn But basically, when you pass parameters to a parametric role they become "constant".
23:24 jnthn As in, snapshot-ish.
23:24 pmichaud sure, I followed that part.
23:25 pmichaud oh, you want the _grammar_ to do the substitution for you?
23:25 jnthn No, no.
23:25 jnthn Well, I don't *think* so. :-)
23:25 pmichaud let me phrase it this way
23:25 jnthn I don't quite follow what needs to happen for the parsing stuff to work out.
23:26 pmichaud PGE will take  "token foo { $x }" and compile it to a sub that does a lexical lookup of $x and attempts to match that value.
23:26 jnthn I just want to make sure however I make this happen, it's going to tie up with what you need.
23:26 pmichaud because PGE is really a regular expression compiler.
23:27 jnthn OK
23:27 jnthn Then I'll just make sure, you can do that. :-)
23:27 pmichaud it's possible that at the point of compilation we might know that $x is constant.  But in the general case we don't know that, and in order to figure it out PGE would have to be smart enough to look at the outer PAST::* scopes to figure out that $x is really a constant lexical.
23:27 jnthn I was thinking more than if know we can label it with a properly.
23:27 jnthn *property
23:27 Limbic_Region joined #perl6
23:27 pmichaud (and yes, it does mean we have to figure out how to handle the case where $x is a package scoped variable)
23:28 pmichaud by the time we get around to executing the regex, we could check if the variable has a constant property, but the regex itself is already compiled.
23:28 jnthn This is the difficultly I was seeing.
23:28 TimToady point is that the regex compiler has to know it
23:29 jnthn This is what I was picking up.
23:29 pmichaud okay.
23:29 TimToady or, actually, just the code that harvests the longest token
23:29 pmichaud that's a point I hadn't foreseen and we'll fix it.
23:29 TimToady (is how Cursor does it)
23:29 pmichaud oh, harvesting the longest token I had thought about handling, yes.
23:29 pmichaud I knew I would have to handle that.
23:29 TimToady in particular, STD uses it for tokens embedded in parametric roles
23:30 TimToady expecting starters and stoppers to become part of LTM
23:30 pmichaud no problem.
23:30 pmichaud PGE doesn't come anywhere close to handling that now.
23:30 pmichaud It will.
23:30 TimToady line 2298 in STD.pm for instance
23:31 pmichaud (the "It will" part might be a problem for _me_, but I'm willing to tackle it when I get to that point.)
23:31 moritz_ TimToady: speaking of which, should the ~ combinator backtrack to find the terminator? so will 'a' ~ 'a' 'a'* ever match?
23:31 moritz_ (I don't care either way, just want to know if my test cases are correct)
23:32 |jedai| joined #perl6
23:32 TimToady I suppose it depends on :ratchet, but probably it would be dwimmier if it didn't autoratchet :)
23:33 pmichaud TimToady: S05 currently has
23:33 pmichaud $<OPEN> = '(' <SETGOAL: ')'> <expression> [ $GOAL || <FAILGOAL> ]
23:33 pmichaud which means after parsing an expression  (greedy 'a'* ),   we either match the goal or fail.
23:33 pmichaud I'm thinking it should be
23:33 pmichaud $<OPEN> = '(' <SETGOAL: ')'> [ <expression> $GOAL || <FAILGOAL> ]
23:33 pmichaud (perhaps)
23:34 TimToady or something.  STD doesn't even handle non-string goals yet...
23:34 pmichaud so that <expression> can backtrack if we don't immediately find the goal (and if expression is backtracking, which depends on :ratchet)
23:34 pmichaud PGE is currently implementing the first version, which is what moritz++ is seeing.
23:35 TimToady I suspect we should do it right rather than wrong :)
23:35 pmichaud we're curious what "right" is :-)
23:35 pmichaud I lean towards the second, but didn't know if there was a side effect I'm not seeing.
23:35 TimToady me too
23:36 pmichaud we can make it the second for now and see what side effects pop up :-)
23:36 TimToady TIAS
23:36 pmichaud okay, we'll do that.  moritz:  I'll make the change later tonight or early tomorrow.
23:36 TimToady also have an issue with the notion that make replaces what is returned by a rule, because under STD it must always be a Cursor that is returned
23:37 moritz_ pmichaud: ok
23:37 TimToady so currently it only replaces the scalar element
23:37 TimToady and then maybe we pull that out at the last moment somehow
23:37 TimToady otherwise we have a type issue
23:38 pmichaud "make replaces what is returned" ... you mean something other than the result object?
23:38 TimToady since we always have to return the new match state in order to continue anyway
23:38 TimToady the result object is in $($/), doesn't replace $/
23:38 pmichaud right.
23:38 TimToady is what I'm saying
23:38 pmichaud that's the way I've always understood it to be.
23:39 TimToady I think S05 isn't always clear on the subject
23:39 pmichaud okay.
23:39 pmichaud certainly rakudo relies on that behavior.
23:40 pmichaud but rules return Cursor objects, or Match objects, or there's a relationship between Match and Cursor I haven't detected?  (I haven't looked at STD Cursor objects yet.)
23:40 pmichaud because PGE/Rakudo has rules always returning Match objects.
23:41 TimToady maybe Cursor does Match, or something
23:43 pmichaud anyway, I've always understood "make" to set an element of a Match object, and not set the return of the match itself.
23:43 pmichaud (where that element is the Match object's scalar value)
23:43 pmichaud (or more precisely, how a Match evaluates if explicitly given an item context)
23:44 TimToady which is, unfortunately, somewhat ill defined
23:44 pmichaud yes.
23:45 TimToady a strong argument for an object always behaving as *itself* in item context
23:45 pmichaud anyway, over the next couple of weeks I expect to review STD Cursor (in order to do something similar in PGE), so I can hopefully speak on this more usefully then.
23:45 TimToady I'll be glad to answer Qs
23:46 pmichaud I'm certain I'll have them :-)
23:46 eric256 left #perl6
23:46 pmichaud afk for me for a bit
23:48 Limbic_Region pmichaud - when you come back, do any of the rakudo spec tests open a network socket?
23:49 Limbic_Region the test suite is hanging for me, and the only thing I can come up with is my firewall is interfering
23:49 spx2 joined #perl6
23:50 jnthn Limbic_Region: AFAIK we don't implement socket IO in Rakudo yet.
23:51 Limbic_Region jnthn - I didn't think so either
23:54 wknight8111 joined #perl6
23:57 |jedai| joined #perl6
23:57 pasteling "Limbic_Region" at 68.48.165.70 pasted "rakudo spectest output on Win32/MinGW with latest rev" (69 lines, 4.4K) at http://sial.org/pbot/34484
23:57 Limbic_Region jnthn - does that look right to you?
23:58 * Limbic_Region hasn't been running spectest for quite a while

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

Perl 6 | Reference Documentation | Rakudo