Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-22

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:01 ruoso hmm... $i++ isn't a postfix
00:03 justatheory joined #perl6
00:05 ruoso std makes ++$i and $i++ different then =$i
00:05 ruoso which solves part of the mistery
00:06 ruoso and maybe solves it all
00:06 ruoso prefix, postfix and postcircumfix are unary
00:06 ruoso and can, therefore, be seen as methods
00:06 ruoso infix is binary (or have list associativity
00:07 ruoso therefore needs to be seen as a sub
00:07 ruoso does it make sense?
00:12 * ruoso just had a blackout in his neighborhood, but as the modem is in a no-break, he has internet, but no light... cool
00:12 * ruoso later &
00:15 |jedai| joined #perl6
00:20 aindilis joined #perl6
00:23 Psyche^ joined #perl6
00:39 justatheory joined #perl6
00:54 Patterner joined #perl6
00:54 tux300181 joined #perl6
00:54 buubot joined #perl6
00:54 simcop2387 joined #perl6
00:54 pjcj joined #perl6
00:54 s1n joined #perl6
00:54 Jedai joined #perl6
00:54 wolverian joined #perl6
00:54 dalek joined #perl6
00:54 gbacon joined #perl6
00:54 c1sung joined #perl6
00:54 yahooooo joined #perl6
00:54 Matt-W joined #perl6
00:54 drbean_ joined #perl6
00:54 edenc joined #perl6
00:54 broquaint joined #perl6
00:54 lambdabot joined #perl6
00:54 nothingmuch joined #perl6
00:54 japhb joined #perl6
00:54 jiing joined #perl6
00:54 preflex joined #perl6
00:54 TimToady joined #perl6
00:54 cognominal joined #perl6
00:54 kanru joined #perl6
00:54 kisu joined #perl6
00:54 estrabd joined #perl6
00:54 Ehtyar joined #perl6
00:54 Maghnus joined #perl6
00:54 Eevee joined #perl6
00:54 jnthn joined #perl6
00:54 Trey joined #perl6
00:54 rafl joined #perl6
00:54 [particle]1 joined #perl6
00:54 Whiteknight joined #perl6
00:54 xinming joined #perl6
00:54 pdcawley joined #perl6
00:54 avar joined #perl6
00:54 Aisling joined #perl6
00:54 szabgab joined #perl6
00:54 nipotan joined #perl6
00:54 buu joined #perl6
00:54 baest joined #perl6
00:54 ingy joined #perl6
00:54 jjore joined #perl6
00:54 lisppaste3 joined #perl6
00:54 zostay joined #perl6
00:54 cotto joined #perl6
00:54 AzureStone joined #perl6
00:54 Helios joined #perl6
00:54 literal joined #perl6
00:54 moritz_ joined #perl6
00:54 pasteling joined #perl6
00:54 silug joined #perl6
00:54 PerlJam joined #perl6
00:54 charsbar_ joined #perl6
00:54 aindilis joined #perl6
00:54 Limbic_Region joined #perl6
00:54 icwiener joined #perl6
00:54 c9s_ joined #perl6
00:54 jan_ joined #perl6
00:54 spx2_ joined #perl6
00:54 rhr joined #perl6
00:54 khatar joined #perl6
00:54 On joined #perl6
00:54 mj41_ joined #perl6
00:54 viklund joined #perl6
00:54 alester joined #perl6
00:54 p6eval joined #perl6
00:54 integral joined #perl6
00:54 hcchien joined #perl6
00:54 sepheebear joined #perl6
00:54 jrockway joined #perl6
00:54 namenlos joined #perl6
00:54 ayrnieu joined #perl6
00:54 meteorjay joined #perl6
00:54 idemal joined #perl6
00:54 dh_ joined #perl6
00:54 krunen joined #perl6
00:54 diakopter joined #perl6
00:54 Caelum joined #perl6
00:54 kolibrie joined #perl6
00:54 shachaf joined #perl6
00:54 awwaiid joined #perl6
00:54 felipe joined #perl6
00:54 cls_bsd joined #perl6
00:54 smg joined #perl6
00:54 Khisanth joined #perl6
00:54 Lunchy_ joined #perl6
00:54 tcliou|Away joined #perl6
00:54 ilogger2 joined #perl6
00:54 BinGOs joined #perl6
00:54 rakudo_svn joined #perl6
00:54 pugs_svn joined #perl6
00:54 clkao joined #perl6
00:54 LCamel_ joined #perl6
00:54 Gothmog_ joined #perl6
00:54 pmichaud joined #perl6
00:54 perlbot joined #perl6
00:54 Maddingue joined #perl6
00:54 araujo joined #perl6
00:55 sunnavy joined #perl6
00:55 REPLeffect joined #perl6
00:55 ft joined #perl6
00:55 sjn joined #perl6
00:55 orafu joined #perl6
00:56 alanhaggai joined #perl6
00:58 km2 joined #perl6
00:59 lumi joined #perl6
01:00 hercynium joined #perl6
01:02 |jedai| joined #perl6
01:02 LimbicRegion joined #perl6
01:03 cj joined #perl6
01:05 r0bby joined #perl6
01:06 Limbic_Region joined #perl6
01:20 hercynium joined #perl6
01:43 aindilis joined #perl6
01:44 [particle] joined #perl6
01:52 _jedai_ joined #perl6
02:03 TimToady @tell ruoso they're all multi subs, including the unaries, except the .fooish ones; this is so the language is in charge of the meaning of operators, not the object
02:03 lambdabot Consider it noted.
02:19 PZt joined #perl6
02:36 Helios joined #perl6
02:36 cognominal joined #perl6
02:40 |jedai| joined #perl6
02:47 shinobi-cl joined #perl6
02:50 legis joined #perl6
02:54 chrisdolan joined #perl6
02:55 chrisdolan rakudo: my Int $n = +"1";
02:55 p6eval rakudo 35875: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 16793 (src/builtins/control.pir:204)␤»
02:56 shinobi-cl hi..... anyone knows where can i find info about reading binary files? (seek, and that kind of stuff)
02:56 chrisdolan That's surprising to me.  But if I say "Num" instead of "Int", it's OK.
02:57 chrisdolan Is that a Rakudo limitation or have I misunderstood numification?
02:59 mtve joined #perl6
03:01 |jedai| joined #perl6
03:05 dduncan joined #perl6
03:08 araujo joined #perl6
03:33 pugs_svn r24995 | putter++ | [elfparse] New std.pm layout (pods instead of commenting) to simplify staying in sync with STD.pm.
03:45 shinobi-cl left #perl6
03:50 SamB joined #perl6
03:56 shinobi-cl joined #perl6
03:59 agentzh joined #perl6
04:04 [particle]1 joined #perl6
05:01 agentzh joined #perl6
05:02 kisu_ joined #perl6
05:06 alester_ joined #perl6
05:19 shinobi-cl left #perl6
05:26 |jedai| joined #perl6
05:28 meppl joined #perl6
05:34 smallfish joined #perl6
05:38 alester_ nslookup git.petdance.com
05:44 spinclad joined #perl6
05:56 agentzh joined #perl6
06:07 mberends joined #perl6
06:21 agentzh left #perl6
06:24 agentzh joined #perl6
06:33 eternaleye joined #perl6
06:34 eternaleye joined #perl6
06:46 [particle] joined #perl6
06:51 ashizawa joined #perl6
06:54 DemoFreak joined #perl6
07:12 justatheory joined #perl6
07:17 pugs_svn r24996 | moritz++ | [t/spec] don't pick 'tempfile' as file name, we might be bitten by race
07:17 pugs_svn r24996 | moritz++ | conditions.
07:18 jhuni joined #perl6
07:22 moritz_ chrisdolan: I think it's a bug
07:31 dduncan left #perl6
07:58 bahaa2008 joined #perl6
08:22 bahaa2008 joined #perl6
08:23 spx2 joined #perl6
08:27 maerzhase joined #perl6
08:38 jhuni rakudo: say;
08:38 p6eval rakudo 35875: OUTPUT«say requires an argument at line 1, near ";"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:39 jhuni rakudo: my Scalar $x = 512; $x.WHAT.say;
08:39 p6eval rakudo 35875: OUTPUT«Scope not found for PAST::Var '$x' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
08:40 jhuni pugs: my Scalar $x = 512; $x.WHAT.say;
08:40 p6eval pugs: OUTPUT«Int␤»
08:40 moritz_ pugs doesn't do type enforcements at all
08:40 moritz_ pugs: my Int $x = [1, 2]; say $x.perl
08:40 p6eval pugs: OUTPUT«\\(1, 2)␤»
08:40 moritz_ obviously that should die
08:41 jhuni ya
08:41 jhuni I just noticed
08:42 moritz_ and since Scalar is a container type, 'my Scalar $x' doesn't really make sense
08:42 moritz_ 'my $x is Scalar' should work, though
08:43 jhuni What is wrong with the rakudo version?
08:43 moritz_ I guess that the type Scalar isn't implemented
08:43 moritz_ which leads to a weird mis-parse
08:44 moritz_ rakudo: eval 'my Scalar $x'; say $!
08:44 p6eval rakudo 35875: OUTPUT«Scope not found for PAST::Var '$x' in ␤»
08:45 jhuni I don't know what that means
08:45 moritz_ I guess that should give a nicer error message instead, for example 'No type name Scalar'
08:45 moritz_ std: my UnknownTypName $x; say $x.WHAT
08:46 p6eval std 24996: OUTPUT«Unknown routines:␤     UnknownTypName called at 1 ␤      my called at 1 ␤00:06 87m␤»
08:46 jhuni That is better
08:47 moritz_ afk
08:48 jferrero joined #perl6
08:50 kanru joined #perl6
08:52 Matt-W Morning
09:11 lisppaste3 joined #perl6
09:11 zostay joined #perl6
09:11 cotto joined #perl6
09:11 AzureStone joined #perl6
09:11 literal joined #perl6
09:11 moritz_ joined #perl6
09:11 pasteling joined #perl6
09:11 silug joined #perl6
09:13 masak joined #perl6
09:17 viklund masak: hey
09:17 masak viklund: aloha
09:18 masak do we dare announce the upgrade here? :)
09:19 * viklund thinks so
09:19 masak ok.
09:19 * moritz_ looks at the page - cool!
09:19 masak the page in question is november-wiki.org
09:20 masak it's a bit slow...
09:20 masak ...but worth waiting for.
09:20 moritz_ "Perl 5 was my rewrite of Perl. I want Perl 6 to be the community's rewrite of Perl and of the community." — Larry Wall
09:20 moritz_ that — could use some fixing
09:20 masak indeed.
09:20 masak I'm surprised the tests don't catch that.
09:21 masak investigating.
09:22 schmalbe joined #perl6
09:30 duke_leto joined #perl6
09:32 Matt-W So november-wiki.org is running on November on Rakudo? Cool!
09:33 masak we like to think so, yes.
09:33 khatar :)
09:33 Matt-W That's great
09:33 khatar using mod_parrot  ?
09:33 masak khatar: no, not yet.
09:33 Matt-W I assume those * under "Why use Perl 6" should have been rendered as a <ul>, but I know it's not perfect
09:33 masak we're planning to deploy it on mod_perl6
09:33 khatar ok
09:33 masak Matt-W: checking.
09:34 masak Matt-W: oh. yes.
09:34 masak hopefully get that fixed within the week.
09:34 Matt-W Excellent
09:34 masak we aim to please.
09:34 Matt-W I'd say I'd take a look at it, but I've not got time for the next few days
09:35 masak Matt-W: no worries. it'll be there for you when you have the time.
09:35 Matt-W In a concert on Sunday so I've got to spend a moderately excessive amount of time rehearsing
09:36 Matt-W Music's a lot like software, that last bit of polish seems to take all the time...
09:38 masak :)
09:39 moritz_ another software + music geek
09:39 Matt-W There are a lot of us
09:39 khatar masak, is november based on a wiki grammar or a classical tons of regex approach
09:39 Matt-W Seems to work somehow
09:39 khatar ?
09:39 masak khatar: neither, in fact.
09:39 khatar ok :)
09:39 masak khatar: I do use a grammar, but only for tokenizing.
09:40 masak khatar: see my blog posts from last year.
09:41 masak this one especially: http://use.perl.org/~masak/journal/37988
09:41 jnthn morning!
09:41 khatar thx
09:41 masak jnthn: dobru... morning!
09:42 jnthn masak: "dobre rano"
09:42 masak hahah, "rano" :)
09:42 masak that's "frog" in Esperanto.
09:42 jnthn nice!
09:43 moritz_ jnthn: your blog post is so last year... *SCNR*
09:43 moritz_ erm, I meant masak
09:43 moritz_ sorry
09:43 masak moritz_: it is. I've since moved on. :P
09:43 masak nowadays I'm mostly doing 3D work in abstract board games.
09:44 moritz_ you program abstract board games?
09:44 jnthn masak: Seems the bullet points on the november wiki page don't render?
09:44 masak moritz_: I program Druid.
09:44 jnthn masak: But full marks for the pretty picture at the top of the page!
09:44 masak jnthn: I'm about to fix the bullet points.
09:44 masak jnthn: thanks!
09:45 masak looks count.
09:45 jnthn masak: Is it running under mod_perl6?
09:45 viklund masak: do we have any tests for the bullet-points?
09:45 viklund jnthn: no, not yet
09:45 masak jnthn: no.
09:45 masak viklund: no.
09:46 masak I don't seem to have implemented that yet.
09:46 masak shouldn't be too hard.
09:46 Matt-W masak: that post about your tokeniser has just given me the solution to a problem of my own!
09:46 masak just one snag: a contiguous set of <li> paragraphs need to be post-processed to have an <ul> around them.
09:46 jnthn masak: Ah. When it can be, that should get a speed-up. As it is, it's not awefully slow. :-)
09:47 masak Matt-W: I'll send you the invoice. :P
09:47 Matt-W masak: you can have a picture of a banknote
09:47 masak jnthn: I think caching by the application itself might help in the short term.
09:47 masak the markup parser currently sucks up a lot of load time.
09:48 jnthn sub render is cached { ... } # ;-)
09:48 moritz_ can we conditionally load modules already?
09:48 masak jnthn: I wish.
09:48 jnthn masak: It's spec'd. ;-)
09:49 masak jnthn: oh :)
09:51 masak but not implemented, I take it?
09:53 masak rakudo: sub foo($n) is cached { for ^1e6 {} }; say time; foo(7); say time; foo(7); say time
09:53 p6eval rakudo 35875: OUTPUT«1232618023.5415␤»
09:54 masak rakudo: sub foo($n) is cached { for ^1e4 {} }; say time; foo(7); say time; foo(7); say time
09:54 p6eval rakudo 35875: OUTPUT«1232618053.33669␤123261​8055.60139␤1232618058.60821␤»
09:54 masak not implemented, then.
09:55 masak jnthn: but it will not work anyway before we start using mod_perl6 or equivalent...
09:56 jnthn masak: Not implemented, no.
10:05 jnthn moritz_: On those sometimes-failing tests - I haven't been running them in parallel.
10:05 jnthn So that's probably why.
10:10 iblechbot joined #perl6
10:16 masak (use MONKEY_PATCHING)++
10:16 masak how many other languages have that, I ask? :)
10:18 moritz_ maybe we should propose it for LOLCODE
10:18 * masak shudders
10:18 moritz_ but first we'd have to mis-spell it
10:19 masak I AM IN UR CLASS PATCHING UR MONKIS
10:19 moritz_ s/I AM/IM/
10:20 masak oops, yes of course.
10:21 jnthn IM A CLASS Cat EXTENDIN UR Animal
10:21 jnthn Not sure lolcode even has OO syntax...yet.
10:22 masak brainfuck can do OO, so why not LOLCODE?
10:22 jnthn Parametric roles for LOLCODE? ;-)
10:24 xinming_ joined #perl6
10:27 moritz_ perhaps CLAZ instead of CLASS? :-)
10:28 masak ooh, classy.
10:28 moritz_ jnthn: parametric roles for lolcode would give us a certain advantage over other implementors :-)
10:28 masak IMA CLAZ Cat EXTENDIN UR Animal
10:30 moritz_ IMA CLAZ Animal ... GOAWAY
10:39 jnthn moritz_: Maybe in another few months...when my brainz can take it again. :-)
10:39 masak jnthn: oh, you're finished with parametric roles?
10:39 masak jnthn: what's next?
10:40 jnthn masak: I'm not 100% there, but mostly.
10:40 * masak is not 100% there, either
10:40 masak :)
10:40 moritz_ rakudo: my Int @x = (1, "2"); say @x.perl
10:40 p6eval rakudo 35875: OUTPUT«get_iter() not implemented in class 'Integer'␤current instr.: '_block14' pc 54 (EVAL_17:39)␤»
10:40 jnthn Yeah but I was talking about the parametric roles. ;-)
10:40 masak jnthn: I know. :)
10:40 moritz_ rakudo: my  @x = (1, "2"); say @x.perl
10:40 p6eval rakudo 35875: OUTPUT«[1, "2"]␤»
10:41 masak what was that first error?
10:41 masak rakudobug material?
10:41 jnthn Basically, the remaining task is to make Array and Hash (well, Mapping and List) into roles.
10:41 jnthn I guess postcircumfix:[ ] is gonna be one too.
10:41 jnthn Thing is, I really don't want to hand-role parametric roles in PIR.
10:41 moritz_ masak: typed arrays are a TODO feature...
10:42 moritz_ masak: so I don't think a bug report is appropriate
10:42 jnthn So I'm waiting for Perl 6 prelude until this.
10:42 masak moritz_: fair enough.
10:42 moritz_ masak: but chrisdolan posted an example of another bug earlier
10:42 Matt-W jnthn: I believe there's still a ticket on making @.someattribute[*-1] work
10:42 Matt-W (hint hint)
10:42 masak oh yes. that one.
10:43 jnthn Once we have that, Array and Hash can become the parametric roles, and then it'll be a small bit of work to make typed arrays and hashes.
10:43 jnthn That said, I might now get my Int @x is MyArray { } sorta working.
10:43 masak .oO( in MY day, we had neither array attributes nor whatever indexing... and we were happy )
10:43 jnthn So I can prototype it all in there.
10:43 moritz_ masak: can you submit the 'my Int $x = +"2"' bug please?
10:43 * masak submits
10:44 jnthn rakudo: my Int $x = +"2";
10:44 p6eval rakudo 35875: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 16793 (src/builtins/control.pir:204)␤»
10:44 masak rakudo: my Int $x = +'2'
10:44 p6eval rakudo 35875: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 16793 (src/builtins/control.pir:204)␤»
10:44 jnthn rakudo: say WHAT +"2";
10:44 p6eval rakudo 35875: OUTPUT«Num␤»
10:44 jnthn meh.
10:44 jnthn That's why.
10:44 moritz_ it should be a bit smarter
10:44 masak moritz_: + numifies.
10:44 masak it doesn't intify.
10:45 jnthn masak: I know, but it's not the most helpful behavior...
10:45 masak true.
10:45 jnthn Well, the most dwim anyway.
10:46 _jedai_ joined #perl6
10:46 moritz_ masak: right. But since Int conforms to the Num type, it's more DWIM if it does int directly, where appropriate
10:46 moritz_ rakudo: my Int $x = int "2";
10:46 p6eval rakudo 35876: RESULT«2»
10:47 masak right.
10:47 jnthn moritz_: Int ~~ Num, but not Num ~~ Int.
10:47 moritz_ jnthn: that's what I meant :-))
10:47 jnthn :-)
10:47 masak that's how I understood you.
10:48 * jnthn looks at his Hague grant task list
10:48 moritz_ that looks visually similar to "Huge task list" somehow :-)
10:48 masak haha
10:49 jnthn moritz_: It used to be, but with auto-threading, type registry, parametric roles, the 'of' keyword (apart from on subs), submethods and most of the 'handles' trait verb all done now, it's a lot smaller...
10:50 masak jnthn++
10:51 * jnthn is optimistic of finishing his grant on time
10:54 ruoso joined #perl6
10:55 ruoso TimToady, does that mean that $foo{$bar} actually calls "multi postcircumfix:<{ }>($foo, $bar)" ?
10:56 ruoso that was unexpected..
10:57 moritz_ I'd also expect a method, because methods don't have to be exported into every package
10:58 jnthn $foo.postcircumfix:<{ }>($bar) # is what I thought...
11:02 ruoso that actually causes a circularity problem in the bootstrap
11:02 ruoso because a multi must receive the postcircumfix:<( )> call
11:02 ruoso and if postcircumfix:<( )> is a multi
11:03 ruoso how do you call it on a multi?
11:03 ruoso I was assuming that for every postcircumfix operator, actually
11:03 ruoso as well as every prefix and postfix, with less certain
11:04 ruoso (actually with some certain, after I found out that ++$i and $i++ are not prefix and postfix
11:07 masak they're not?
11:07 ruoso std parses them specially
11:07 masak because of the lvalue thing?
11:07 ruoso because it actually replaces the value inside $i
11:08 masak right.
11:08 masak that's what I meant.
11:10 rakudo_svn r35878 | jonathan++ | [rakudo] Remove unused @?PACKAGE and $?NS (we init the first and never use it, then use the second but never init it, thus I guess it was useless).
11:10 ruoso jnthn, does rakudo implements prefix:<=> already? is it a multi sub or a method?
11:11 jnthn ruoso: checking
11:11 jnthn ruoso: multi sub
11:12 ruoso hmm
11:12 ruoso I was guessing it would be
11:12 ruoso a mehtod
11:12 jnthn why?
11:13 ruoso because it's an unary
11:13 ruoso the same way as postcircumfix
11:14 jnthn Hmm
11:14 jnthn But S13 shows things like
11:14 jnthn multi prefix:<~> is deep {...}
11:15 jnthn That's the only unary example I can ee in S13 unless I'm missing something though. :-|
11:17 pugs_svn r24997 | jnthn++ | [t/spec] Rename nested.t for roles to crony.t, to reflect what it's actually testing.
11:18 ruoso jnthn, I don't understand the 'is deep' in S13 at all
11:18 jnthn ruoso: I wasn't really showing it for the is deep
11:18 jnthn More that it shows a unary operator being declared as a multi sub.
11:18 ruoso I know...
11:18 jnthn Not a multi method.
11:19 ruoso but in fact...
11:19 ruoso it only shows that example to show it is a bad example
11:19 ruoso that must mean something
11:19 ruoso ;)
11:20 jnthn I guess for unary ops, multi-dispatch is rather less useful.
11:20 jnthn So it's not really a hardship if they're methods.
11:25 maerzhase joined #perl6
11:30 mberends joined #perl6
11:33 ruoso jnthn, so... let's lobby with TimToady so he changes his mind? :)
11:33 jnthn ruoso: Is it actually a problem if they are multis?
11:33 jnthn There's something to be said for consistency...
11:34 ruoso well, current scheme seems inconsistent
11:34 ruoso postcircumfix are methods (in S13)
11:34 ruoso what's the fundamental difference between postcircumfix and prefix and postfix?
11:34 ruoso but there is a fundamental difference between them and infix
11:35 ruoso jnthn, but the bigger problem is that returning an Iterator for a list
11:35 ruoso my $iterator = =@list
11:35 ruoso is supposed to return something that is private to the list
11:36 ruoso sorry, that line was wrong
11:36 ruoso my $item = =@list
11:36 jnthn Hmm, yes.
11:36 jnthn But of course, you could write it as a multi-method *and* export it.
11:37 ruoso which looks like 99% of the cases
11:37 ruoso so, why not making it just a method?
11:37 jnthn But it still leaves the inconsistency with postcircumfix...
11:37 ruoso it is already going to be dispatched based on the type of one object
11:37 ruoso that looks like a method
11:38 jnthn Aye.
11:38 jnthn Well, TimToady's call really. :-)
11:38 jnthn The reasoning whichever way he calls it, will be interesting.
11:39 jnthn But yes, method makes sense to me too.
11:39 mberends jnthn, could I bug you to try to fix $*ERR ? RT#62540, I miss my debugging friend
11:40 pugs_svn r24998 | jnthn++ | [t/spec] Roles on .WHAT should stringify to name, like classes do, rather than Role.
11:46 kanru joined #perl6
11:46 jnthn mberends: Hmm. It's not obvious why it's broken...
11:46 jnthn (As in, I can reproduce it. I just can't see why it's happening...)
11:47 masak mberends: oh, and a third thing: SVG.pm -- I'm working on it. slowly. might have something to show by the weekend.
11:51 masak having SVG.pm will open up a vista of possibilities for Perl 6 web programming.
11:53 ruoso masak, why would anyone want a vista if there's the beta 7 already ;) ? ;)
11:53 masak ruoso: it was with some trepidation I used that word, yes.
11:54 masak it's a pity. used to be a positive word.
11:54 ruoso heh
11:54 pmurias joined #perl6
11:55 masak Microsoft is in decline. the only reason it hasn't fallen yet is because it's so huge.
11:55 ruoso just wait for it to get momentum
11:55 ruoso ;)
11:56 masak one of my better decisions in the past decade is not waiting for Microsoft to do anything.
11:57 masak that way, I'm never disappointed.
11:59 jnthn moritz_: An easy one to close maybe ;-) http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=61978
12:00 rakudo_svn r35879 | jonathan++ | [rakudo] What's installed in the namespace for a role should probably act like a proto-object a bit more; this makes it stringify in the same kinda way.
12:01 |jedai| joined #perl6
12:10 rakudo_svn r35881 | bernhard++ | [codingstd] trailing_space.t
12:17 ejs joined #perl6
12:23 * jnthn tests a patch that may clsoe many masakbugs
12:23 jnthn Well, 3 of 'em.
12:25 |jedai| joined #perl6
12:27 mberends masak: sorry, afk for a while. looking forward to SVG.pm
12:28 * jnthn -> lunch
13:10 rakudo_svn r35884 | jonathan++ | [rakudo] Improve support for nested packages; gets the issues in various RT tickets resolved.
13:12 pugs_svn r24999 | jnthn++ | [t/spec] Tests for nested classes.
13:15 pugs_svn r25000 | jnthn++ | [t/spec] Tests for grammars nested in classes.
13:18 DJ-DONGDOT joined #perl6
13:31 Matt-W masak: SVG.pm being a library for generating SVG graphics?
13:31 masak Matt-W: a minimal version of the CPAN equivalent.
13:32 masak Matt-W: I already have semi-concrete plans for another module that uses SVG.pm but is much more DWIMmy.
13:32 Matt-W nice
13:32 Matt-W I keep thinking, wouldn't it be cool if we had GTK bindings, but I'm not sure we're up to that yet :)
13:32 masak Matt-W: there's nothing stopping you from trying.
13:32 Matt-W just time
13:33 masak I've never ventured into that kind of programming.
13:33 Matt-W GObject Introspection does make the whole thing much easier
13:33 masak otherwise I might have attempted it also.
13:33 Matt-W In theory, you can generate the entire binding automatically
13:33 Matt-W A simple one, anyway
13:33 Matt-W I might try it one day
13:34 mberends very well done on http://november-wiki.org/ !
13:34 masak gracias.
13:35 masak as they say, people don't react until you update the GUI :)
13:35 ruoso Matt-W, SMOP might be specially interesting to experiment with Glib, since it started with "representation polymorphism" as its core...
13:35 * mberends plans to create a pod6 -> mediawiki translator
13:35 Matt-W ruoso: oh?
13:36 masak mberends: is there a pod6 -> plaintext translator?
13:36 mberends yes, in the current perl6-examples
13:36 ruoso Matt-W, you just need to implement a ResponderInterface for Glib objects, that implements Glib introspection
13:37 masak mberends: excellent. will play with it this weekend.
13:37 Matt-W ruoso: ooooh
13:37 Matt-W ruoso: so it generates bindings at runtime?
13:37 ruoso Matt-W, it doesn't need to generate
13:37 ruoso it can just use it
13:38 ruoso in theory, a Glib responder interface would provide the needed introspection so that you could
13:39 ruoso my $x = Int.bless(Glib.CREATE, :value(1)); and you would have an Perl 6 Int as a Glib object
13:41 * jnthn afk - slovak
13:43 moritz_ ruoso: and what is the 1 in your example?
13:43 ruoso a native int?
13:44 moritz_ perl6: say 1.WHAT
13:44 p6eval elf 25000, pugs, rakudo 35888: OUTPUT«Int␤»
13:44 masak they agree! \o/
13:45 moritz_ they all seem to think that 1 is an Int, not an int
13:45 * SamB is a bit surprised that that parses
13:45 masak SamB: why?
13:45 SamB I'd have expected the . to be mistaken for part of the numeric literal
13:45 moritz_ SamB: it's actually quite hard to produce a snytax error in Perl 6 :-)
13:45 masak SamB: ah. no, it's special-cased.
13:46 ruoso moritz_, but it can be autoboxed into a native int while being bound in the signature
13:46 ruoso that considering
13:46 masak moritz_: unless you like to put spaces before parens and stuff.
13:46 ruoso role Int { has int $.value }
13:46 moritz_ masak: right
13:46 moritz_ std: while (my $x = <STDIN>) { print }
13:47 p6eval std 25000: OUTPUT«############# PARSE FAILED #############␤This appears to be Perl 5 code at /tmp/m6RbkwCql6 line 1:␤------> [32mwhile (my $x = <STDIN>[31m) { print }[0m␤    expecting whitespace␤00:04 71m␤»
13:47 moritz_ std: while (my $x = <STDIN> ) { print }
13:47 p6eval std 25000: OUTPUT«############# PARSE FAILED #############␤This appears to be Perl 5 code at /tmp/hAAHLy76Qy line 1:␤------> [32mwhile (my $x = <STDIN>[31m ) { print }[0m␤    expecting whitespace␤00:05 71m␤»
13:47 moritz_ the "expecting whitespace" is a bit weird IMHO
13:47 masak aye.
13:47 SamB what's that
13:48 masak the rest is good.
13:48 masak SamB: coloring.
13:48 SamB eh ???
13:48 masak ANSI.
13:48 SamB oh, that's ESC
13:48 masak aye.
13:48 SamB why isn't it translated to mIRC format ?
13:48 moritz_ because nobody implemented it :-)
13:48 masak SamB: because you haven't implemented an ANSI->mIRC translator yet, silly :P
13:49 moritz_ SamB: patches welcome :)
13:49 moritz_ afk
13:49 masak (but please don't belch mIRC colors into the #perl6 channels. that makes baby Jesus cry.)
13:49 masak it's bad enough with the ESC codes.
13:49 SamB but I heard he was all growed up
13:50 masak SamB: nevertheless.
13:53 lsyx joined #perl6
13:54 lsyx left #perl6
13:57 Lunchy joined #perl6
14:11 duke_leto left #perl6
14:13 Exodist joined #perl6
14:18 vixey joined #Perl6
14:23 zamolxes joined #perl6
14:25 [particle] joined #perl6
14:36 ejs joined #perl6
14:38 ejs1 joined #perl6
14:54 bahaa2008 joined #perl6
14:55 bahaa2008 left #perl6
15:00 kcwu joined #perl6
15:08 masak this .pick[0] thing -- could it also be solved by defining .pick as a multimethod?
15:08 [particle] joined #perl6
15:09 masak letting .pick() return an Any and .pick($n) return a List
15:09 masak since that seems to be an obvious solution, I suppose there's something wrong with it -- but I can't really see what.
15:11 moritz_ what's the problem?
15:12 masak moritz_: I don't know, but something made people in the know reach for a solution involving returning a Capture.
15:13 masak so I guess I'm also wondering what's the problem.
15:13 masak the obvious problem, of course, is the current behaviour of .pick() :)
15:13 masak (it returns a List of 1 element)
15:14 moritz_ if all List methods are in Any, there's no harm in returning a single item
15:14 masak right.
15:15 masak but there is sufficient harm in not doing it.
15:17 moritz_ it would be consistent, because <foo> is also a Str, not a List
15:17 masak indeed.
15:18 moritz_ rakudo: say list(1|2|3).WHAT
15:18 p6eval rakudo 35888: OUTPUT«List␤»
15:18 moritz_ rakudo: say list(1|2|3).perl
15:18 p6eval rakudo 35888: OUTPUT«[any(1, 2, 3)]␤»
15:18 masak rakudo: say <foo>.WHAT
15:18 p6eval rakudo 35888: OUTPUT«Str␤»
15:19 moritz_ rakudo: sub f(*@a) { @a }; say f(1|2|3).perl
15:19 p6eval rakudo 35888: OUTPUT«[any(1, 2, 3)]␤»
15:19 moritz_ it's correct that slurpy args don't autothread
15:20 ruoso rakudo: my Float $x = +"1";
15:20 p6eval rakudo 35888: OUTPUT«Scope not found for PAST::Var '$x' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
15:20 moritz_ but should the junction flatten into a list? or remain as an item?
15:20 ruoso isn't there a Float?
15:20 moritz_ not in Rakudo
15:21 moritz_ spack Float\b
15:21 ruoso what other type of Num there is, then
15:21 moritz_ spack: Float\b
15:21 moritz_ what's the spec-ack command?
15:21 ruoso buubot, spack Float\b
15:21 buubot ruoso: Sorry, I couldn't find any matches for: Float\b
15:21 ruoso buubot, spack Float
15:21 buubot ruoso: Sorry, I couldn't find any matches for: Float
15:22 ruoso rakudo: my Rat $x = 1;
15:22 p6eval rakudo 35888: OUTPUT«Scope not found for PAST::Var '$x' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
15:22 moritz_ I also did it on the command line => no match
15:22 ruoso buubot, spack Rat\b
15:22 buubot ruoso: S02-bits.pod:4 S03-operators.pod:4
15:23 ruoso does rakudo support any other type of Num?
15:23 moritz_ no.
15:24 moritz_ Complex, Num, Int, no more numeric types (afaik)
15:24 ruoso ah.. it supports comples
15:24 ruoso complex
15:24 ruoso rakudo: my Complex $x = 1;
15:24 p6eval rakudo 35888: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 16815 (src/builtins/control.pir:204)␤»
15:25 moritz_ rakudo: say 1i ~~ Complex
15:25 p6eval rakudo 35888: OUTPUT«1␤»
15:25 masak rakudo: say 1 ~~ Complex
15:25 p6eval rakudo 35888: OUTPUT«0␤»
15:25 moritz_ ruoso: I think your example should autopromote to Complex
15:25 ruoso in Math, isn't Int a subset of the Complex numbers?
15:26 ruoso rakudo: my Complex $x = 1 + 2i;
15:26 moritz_ it is, but class relations aren't subset relations
15:26 p6eval rakudo 35888: RESULT«1+2i»
15:26 ruoso moritz_, that probably means the classes are miss-related then
15:27 moritz_ A isa B means "objects of A behave the same as B"
15:27 ruoso not at all
15:27 masak moritz_: well, almost.
15:27 ruoso A isa B means " A extends B"
15:28 ruoso where extends might mean replace behavior
15:28 moritz_ ruoso: we've known for long that our concept of classes doesn't fit well into the mathematical world (which bothers me)
15:28 Matt-W "A can be spoken to in the same way as B", I would think
15:28 moritz_ ruoso: "same" in a very liberal sense
15:28 moritz_ Matt-W++ # much better phrasing
15:28 ruoso Matt-W, moritz_, that is what .does does
15:28 ruoso not .isa
15:29 Matt-W this is true, my definition doesn't require them to be part of the same inheritance tree
15:29 Matt-W which isa generally does
15:29 ruoso that's the point
15:29 Matt-W because otherwise they could just be two things that implement the same role
15:30 ruoso 1 ~~ Complex should be true
15:30 ruoso as well as 1 ~~ Rat
15:30 ruoso and 1 ~~ Int
15:30 ruoso but 1.1 ~~ Int should be false
15:30 duke_leto joined #perl6
15:30 duke_leto left #perl6
15:30 Matt-W one would hope 1.1 !~ Int, yes :)
15:31 masak actually, I can't think of a good reason why 1 ~~ Complex shouldn't be true...
15:31 ruoso there isn't
15:31 ruoso because in the Math world
15:31 ruoso you have sets
15:31 ruoso and subsets
15:31 ruoso Int is a subset of Rat
15:31 ruoso and Rat is a subset of Complex
15:31 masak no, I meant besides that.
15:31 masak I don't necessarily buy into the subset idea of class hierarchies.
15:32 masak because objects have methods.
15:32 Matt-W it doesn't mean we should model the class heirarchy that way, but the numbers need to behave that way...
15:32 ruoso exactly...
15:32 masak Matt-W: yes, that's another good point.
15:32 ruoso including being able to call methods of complex in 1
15:32 masak ~~ doesn't need to behave like isa
15:32 ruoso it doesn't behave like isa at all
15:33 masak ruoso: I suggest you submit a rakudobug for '1 ~~ Complex'
15:33 masak and see what happens. :)
15:33 moritz_ rakudo: say 1 ~~ Num
15:33 p6eval rakudo 35888: OUTPUT«1␤»
15:36 _jedai_ joined #perl6
15:39 ruoso maybe this is all solved by "all built-ins are roles"
15:39 ruoso and then 1 is composed as does Int does Rat does Complex
15:41 Matt-W Maybe
15:42 moritz_ but is still of class Int, because that's what the user expects
15:42 Matt-W I'm envisaging horrible method collisions
15:42 masak Matt-W: such as...?
15:43 Matt-W Well I don't know, do Int and Rat and Complex have any same methods?
15:43 Matt-W infix:<+> perhaps?
15:43 moritz_ Matt-W: since I'm not an implementor in the strict sense, I'll leave that to those who have to worry about it :-)
15:43 Matt-W or is that a multi sub
15:43 moritz_ those are all multis
15:43 Matt-W ah k
15:43 Matt-W so that should be okay then
15:43 masak multis solve all our problems :)
15:43 SamB joined #perl6
15:43 Matt-W and we'd get ~~ for free
15:44 Matt-W Is our multiple dispatch any different to the kind of thing C++ does with overloaded functions?
15:44 Matt-W I keep thinking it is, but then I'm not sure how
15:44 moritz_ basically there's a multi infix:<+>(Any, Any) that coerces both args to Num, and any num type may provide more specialized multis
15:45 Psyche^ joined #perl6
15:45 moritz_ Matt-W: I think it's much more flexible, in many ways
15:45 moritz_ Matt-W: iirc in C++ it's an error to call an overloaded function with an argument list that fits to two functions
15:46 moritz_ whereas in Perl 6 the narrowest wins
15:46 PerlJam C++ doesn't really do multiple dispatch does it?
15:46 moritz_ PerlJam: no, it resolves at compile time
15:48 Matt-W C++ resolves the narrowest at compile time
15:48 Matt-W I know Perl 6 does it at runtime, which does change things a bit
15:50 moritz_ it changes in so far as dispatch happens wrt actual type, not declared type
15:50 moritz_ in C++ if foo() returns Any, Any is used to dispatch, even if the actual value is a Foo which inherits from Any
15:53 samlh joined #perl6
15:56 Matt-W aaaah
15:56 Matt-W yes, that's definitely requiring runtime resolution
16:03 maerzhase joined #perl6
16:08 justatheory joined #perl6
16:10 nihiliad joined #perl6
16:26 stephenlb joined #perl6
16:29 spx2 joined #perl6
16:40 rakudo_svn r35891 | pmichaud++ | [rakudo]: spectest-progress.csv update: 294 files, 6500 passing, 11 failing
16:40 rakudo_svn r35891 | pmichaud++ | Failure summary:
16:40 rakudo_svn r35891 | pmichaud++ |     S12-role/namespaced.t aborted 3 test(s)
16:40 rakudo_svn r35891 | pmichaud++ |     integration/99problems-21-to-30.rakudo aborted 8 test(s)
16:42 ejs joined #perl6
16:45 [particle]1 joined #perl6
16:51 km2 joined #perl6
16:52 ruoso moritz_, notice that now we have "multi infix:<+>(*@args)" instead
16:52 ruoso making it look more like lisp
16:55 pmurias joined #perl6
16:58 moritz_ has + list associativity?
16:59 ruoso all infex gained list associativity in a recent change in STD
17:00 pmurias ruoso: hi
17:00 ruoso hi pmurias
17:00 ruoso moritz_, that doesn't seem to have made to the specs yet, but TimToady was very happy with the idea
17:00 ruoso (and I'm happy too, actually)
17:02 ruoso pmurias, in use Foo:from<perl5>, you could make the p5 package available (as the p5 string) as the type in Perl 6
17:02 ruoso then you could simply call Foo.method
17:02 ruoso it's just making it bind
17:03 ruoso &Foo := sub { $P5Interpreter.eval("Foo") };
17:03 ruoso Foo := $P5Interpreter.eval("Foo");
17:03 ruoso Foo:: := $P5Interpreter.eval("Foo");
17:03 ruoso (of course that can be simplified
17:04 pmurias would Foo:: work?
17:04 ruoso yes, Foo:: is how the packages are stored in mildew
17:04 ruoso they keep the sufix "::"
17:04 ruoso while the type doesn't have it
17:04 pmurias $Foo::bar would end up "Foo"->{'bar'} in perl5 land
17:05 ruoso right... that means it isn't so simple
17:05 ruoso but at least the other two should work
17:05 moritz_ ruoso: and what about infix:</> and infix:<**> and all the like?
17:05 moritz_ where associativity actually matters?
17:06 ruoso moritz_, I'm not 100% sure, maybe it's better to look at std source
17:07 ruoso moritz_, but I could say that the order of the arguments could make the difference
17:08 sjn joined #perl6
17:08 pmurias ruoso: is class Foo {} defining &Foo actually specced somewhere?
17:08 ruoso pmurias, in STD... ;)
17:09 ruoso even Array.new is parsed as Array().new()
17:10 ruoso and Array is a type known by STD
17:10 pmichaud not all infix are list associative
17:10 pmichaud at least, not according to STD.pm.
17:10 pmichaud all list_infix are list associative.
17:11 ruoso pmichaud, could you enumerate them?
17:11 pmichaud constant %multiplicative  = (:prec<u=>, :assoc<left>,  :assign);
17:11 pmichaud constant %additive        = (:prec<t=>, :assoc<left>,  :assign);
17:11 |jedai| joined #perl6
17:13 pmurias ruoso: you have seen all the is_types sprinkled around to forbid things such as Array 1,2,3?
17:14 ruoso pmurias, yes, but that doesn't include Array.new
17:15 pmurias TimToady: does class Foo {} declare a &Foo?
17:16 ruoso if you try to do Foo.new STD will warn about unknown Foo routine
17:16 ruoso and return a parse tree exactly equal as Array.new
17:18 pmichaud that's not what I see.
17:18 pmichaud I.e., I don't see that Array is treated as a listop.
17:19 ruoso hm?
17:19 ruoso I tried to parse "Foo.new" and "Array.new"
17:20 ruoso and the result was considerably the same
17:20 pmichaud sure, they should be the same.
17:20 pmichaud I'm saying that Array.new isn't the same as Array().new()
17:21 ruoso pmichaud, right... but blabs.blobs should work if blabs is a sub
17:21 pmichaud sure, in that case it's a listop.
17:22 pbuetow joined #perl6
17:22 ruoso I've just outputted the parse tree for "Array.new" and "Fooey.new"
17:22 ruoso and ran a diff on the output of them
17:22 ruoso and the only difference is the actual text
17:22 pmichaud where Fooey is a bareword or it's also a class?
17:23 ruoso where STD complains it is an unknown routine
17:23 pmichaud I suspect a bug in STD.pm.
17:23 pmichaud I haven't see anything to suggest that typenames are listops.
17:24 pmichaud std:  Array 1,2,3
17:24 p6eval std 25000: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/SKEr7flaQB line 1:␤------> [32mArray [31m1,2,3[0m␤    expecting any of:␤      infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤00:05 85m␤»
17:24 ruoso that's a parse failure because STD knows Array is a type
17:25 ruoso std: Fooey 1,2,3
17:25 p6eval std 25000: OUTPUT«Unknown routines:␤     Fooey called at 0 ␤00:06 104m␤»
17:25 pmichaud sure, barewords are treated as listops.
17:25 araujo joined #perl6
17:25 pmichaud std:  xyz 1,2,3
17:25 p6eval std 25000: OUTPUT«Unknown routines:␤     xyz called at 0 ␤00:06 104m␤»
17:27 ruoso pmichaud, the reason I think it's not a bug in STD is that TimToady is aware of the way it is parsed...
17:27 ruoso this issue was raised before
17:27 pmichaud okay, I'll ask a different question:  Why do you think that  Array.new is equivalent to Array().new ?
17:29 ruoso because it would require me to eventually make two lookups to tell what it is
17:29 ruoso so I make only one
17:29 pmichaud I don't understand.
17:29 pmichaud "make two lookups"?
17:29 ruoso Array.new in mildew currently renders into
17:29 pmichaud we know at parse time if what we have is a type.
17:29 ruoso LexicalScope<&Array>.postcircumfix:<( )>().new()
17:30 pmichaud that sounds like a bug in mildew then.
17:31 ejs joined #perl6
17:31 mberends joined #perl6
17:32 pmichaud it's entirely possible that an implementation could choose to do it that way, however.
17:32 pmichaud haven't thought about it much.
17:34 ruoso pmichaud, it allows me to make Array(Int) easily, tho
17:34 pmurias pmichaud: the main problem is "if class Foo {};say &Foo" works?
17:35 pmichaud I don't think that "class Foo"  should define &Foo, no.
17:35 pmichaud std:  class Foo {};  say &Foo;
17:35 p6eval std 25000: OUTPUT«00:05 83m␤»
17:35 pmurias ruoso: we have to make a lookup at compile time to check if &Array is defined too
17:35 pmichaud I wonder if that means something other than &Foo.
17:36 [particle]1 just because that parses doesn't mean it'll find &Foo
17:36 ruoso std: &Foo # will it issue a warning?
17:36 pmichaud ruoso: I can make Array(Int) easily also -- I just define a postcircumfix:<( )> on protoobjects.
17:36 p6eval std 25000: OUTPUT«00:05 87m␤»
17:37 pmichaud but postcircumfix on protoobjects is handled specially anyway
17:37 pmurias shouldn't Array(Int) be &Array.(Int)
17:37 pmurias ?
17:39 pmurias s/be/be treated as/
17:41 hercynium joined #perl6
17:50 rakudo_svn r35893 | coke++ | Revert add of Range.pick; while the no argument version here does better for
17:50 rakudo_svn r35893 | coke++ | the simple case of (1..10000000).pick; it fails to handle other variants, causing
17:50 rakudo_svn r35893 | coke++ | spec test regressions.
17:50 mberends please could someone explain this Rakudo message: Method 'ACCEPTS' not found for invocant of class 'PGE;Match'
17:51 pmichaud what were you doing that generated it?
17:52 moritz_ shouldn't PGE;Match be hidden from the user these days?
17:52 pmichaud moritz_: it's a parrot error message.
17:52 pmichaud within rakudo they're known as "Match", but Parrot generates the 'method not found' messages so it uses the internal type name.
17:53 pmichaud alas, I have to leave for a while -- bbiaw
17:53 aindilis joined #perl6
17:54 spinclad joined #perl6
17:54 mberends within Pod::Parser from perl6-examples, not able to pinpoint the line because $*ERR is broken. Probably a $string ~~ / <Grammar::regex> / test, or passing the $/ from that as a method parameter.
17:55 TimToady Type() is a special form, it is not a function call
17:55 TimToady likewise Type{}, in fact, they're somewhat related
17:55 moritz_ std: my UnknownType $x;
17:56 p6eval std 25000: OUTPUT«Unknown routines:␤     UnknownType called at 1 ␤ my called at 1 ␤00:05 85m␤»
17:56 TimToady hmm, that's an interesting buglet
17:56 moritz_ that could be much more helpful ;-)
17:57 TimToady probably from backtracking too aggresively
17:57 TimToady let's see.  not all infix are list assoc, as pmichaud pointed out
17:58 TimToady all non methodcall operators are multi in the abstract, but the optimizer can know at compile time what the list of candidates is
17:59 TimToady therefore if the candidates are known to implement in terms of a method, the method can just be called directly
17:59 TimToady and at the moment I'm thinking that the '.' of .foo is an abstract multi call to the dispatcher, and the 'foo' is an argument to that dispatcher
18:00 TimToady but that will certainly want to get optimized away whenever possible
18:00 TimToady likewise it will be rare for a language to override any postcircumfix multi, so most of those disappear
18:01 TimToady but if a lexical scope *does* override postcircumfix:<{ }>, we have to respect the new language
18:02 pugs_svn r25001 | pmurias++ | [mildew]
18:02 pugs_svn r25001 | pmurias++ | prefix:<=> is a method call
18:02 pugs_svn r25001 | pmurias++ | accessor have a correct signature
18:02 pugs_svn r25001 | pmurias++ | fixed AST::If.pretty
18:02 pugs_svn r25001 | pmurias++ | [Multi.pm]
18:02 pugs_svn r25001 | pmurias++ | &ROUTINE.back.lexical is traversed if exists
18:02 pugs_svn r25001 | pmurias++ | we don't overwrite a named param
18:02 pugs_svn r25001 | pmurias++ | changed @variables to $variables
18:03 TimToady ahem. prefix:<=> is *not* a method call
18:03 TimToady ++ and -- are also multi, just on an lvalue, not an rvalue
18:04 TimToady pmurias: see discussion above
18:04 pmurias seen it after commiting
18:05 TimToady :)
18:05 ruoso TimToady, you're just breaking my legs
18:05 ruoso ;)
18:05 pmurias mildew doesn't implement multis yet so we can safely optimize prefix:<=> to a method call ;)
18:05 TimToady heh
18:06 ruoso SMOP is too much object oriented for we to think about dot as a multi
18:07 pmurias maybe SMOP should have been multi oriented from the start...
18:07 ruoso yeah... let's throw it away and restart it ;)
18:12 * ruoso needs to think how that will change the state of things...
18:12 * ruoso later &
18:14 TimToady ruoso: note you already have to be able to handle ."$foo" as a kind of argument to the '.' dispatcher
18:19 moritz_ perl6: class A is Str { method b ($x) { say "{self}:$x" } }; my $y = A.new; b($y: 'foo');
18:20 p6eval pugs: OUTPUT«<obj:A>:foo␤»
18:20 p6eval ..elf 25001: OUTPUT«Undefined subroutine &GLOBAL::infix_58_58 called at (eval 126) line 11.␤ at ./elf_h line 4333␤»
18:20 p6eval ..rakudo 35894: OUTPUT«Statement not terminated properly at line 1, near "($y: 'foo'"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:20 rindolf joined #perl6
18:20 pmurias TimToady: the method call opcode takes the method name from a register in smop
18:26 TimToady so semantically the "." is already a separate notion
18:26 TimToady the question is whether we allow a lexical scope to override the meaning of ".'
18:26 moritz_ perl6: sub f ($x as Str) { say $x.WHAT }; f(2)
18:26 p6eval pugs: OUTPUT«*** ␤    Unexpected "as"␤    expecting "?", "!", trait, "=", default value, "-->" or ")"␤    at /tmp/qSmmPVmqet line 1, column 11␤»
18:26 p6eval ..elf 25001: OUTPUT«Parse error in: /tmp/g8S06O31Bx␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: sub f ($x as Str) { say $x.WHA␤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'␤
18:26 p6eval ..STD_r...
18:26 p6eval ..rakudo 35894: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near "as Str) { "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:27 jhorwitz joined #perl6
18:27 TimToady arguably . .* .? etc are all different dispatcher operators
18:30 pmurias it wouldn't be very hard to handle overwriting on the compiler level
18:32 TimToady well, that's throwing the control knob the other way completely
18:32 TimToady but multi dispatch gives a way to finesse overriding on a type basis
18:32 TimToady so some types might use the overridden . while others use the base .
18:33 TimToady and again, if there is no multi override, the compiler knows this, and can optimize the multi dispatch away entirely
18:34 TimToady this is why we no longer look for multi defs in any package
18:34 TimToady only in lexical scopes
18:34 TimToady (including outer preludey scopes)
18:35 TimToady if you want to increase the dynamism of multi dispatch to include run-time-modifiable packages, that would have to be a lexically scoped pragma
18:35 TimToady which then calls the pessimizer on your code :)
18:36 maerzhase joined #perl6
18:40 DemoFreak joined #perl6
18:42 Psyche^ joined #perl6
18:52 moritz_ std: sub f(:@a) { @a }
18:52 p6eval std 25001: OUTPUT«00:05 84m␤»
18:57 spx2_ joined #perl6
19:03 moritz_ perl6: sub f(:@a) { say @a.WHAT }; f(:a<b c>);
19:03 p6eval rakudo 35894: OUTPUT«Array␤»
19:03 p6eval ..pugs: OUTPUT«Array::Const␤»
19:03 p6eval ..elf 25001: OUTPUT«Can't locate object method "b" via package "c" (perhaps you forgot to load "c"?) at (eval 122) line 5.␤ at ./elf_h line 4333␤»
19:06 [particle]1 joined #perl6
19:15 rob joined #perl6
19:39 icwiener joined #perl6
19:47 Maghnus joined #perl6
19:51 |jedai| joined #perl6
20:28 On joined #perl6
20:35 ruoso TimToady, pmurias, I think I'll leave unary ops override to be implemented after compiler bootstrap
20:36 ruoso so, for starts, mildew presumes there is no multi override for the unary ops
20:41 ruoso even after we implement multi
20:57 * ruoso later &
21:17 Eaglexx joined #perl6
21:17 Eaglexx Good evening to all User ;-)
21:18 mberends howdy Eaglexx, wotcha doin' with perl6?
21:19 mberends somethin' I said?
21:20 pdcawley joined #perl6
21:21 Casan joined #perl6
21:25 eric256 joined #perl6
21:27 [particle] joined #perl6
21:28 eric256 left #perl6
21:37 bcallis joined #perl6
21:43 bcallis joined #perl6
22:04 ejs joined #perl6
22:09 meppl good night
22:09 wknight8111 joined #perl6
22:15 ovid joined #perl6
22:21 pbuetow joined #perl6
22:31 donaldh joined #perl6
22:52 moritz_ perl6: say eval q[my $x = 3; END { $x *= 4 }; $x];
22:52 p6eval pugs, rakudo 35896: OUTPUT«3␤»
22:52 p6eval ..elf 25001: OUTPUT«Unknown rule: statement_control:END␤It needs to be added to ast_handlers.␤ at ./elf_h line 2036␤»
22:53 moritz_ how do I test the availability of lexicals in an END block if I can't use outer lexicals?
22:59 mberends pmichaud: ping
23:01 spx2 joined #perl6
23:03 pugs_svn r25002 | moritz++ | [t/spec] test that outer lexicals are visible in END { .. } blocks
23:05 zamolxes joined #perl6
23:08 moritz_ rakudo: say eval 'my $x = 3; END { 2 * $x }'
23:08 p6eval rakudo 35896: OUTPUT«_block37␤»
23:09 moritz_ rakudo: say (eval 'my $x = 3; END { 2 * $x }').()
23:09 p6eval rakudo 35896: OUTPUT«6␤»
23:09 moritz_ pugs: say eval 'my $x = 3; END { 2 * $x }'
23:09 p6eval pugs: OUTPUT«3␤»
23:10 rakudo_svn r35898 | moritz++ | [rakudo] add tests for RT #62260 (outer lexicals in END) to t/spectest.data
23:13 pugs_svn r25003 | moritz++ | [t/spec] unfudge @.a[*-1] tests for rakudo
23:21 ovid joined #perl6
23:48 [particle]1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo