Camelia, the Perl 6 bug

IRC log for #perl6, 2010-05-28

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 slavik jnthn: as long as rules #1 and 2 are observed?
00:01 pmichaud ratcheting context cuts after each token.
00:01 pmichaud (I agree the spec isn't entirely clear on this point)
00:01 pmichaud but I've asked TimToady++ about it in the past and he said that was the intent.
00:01 dalek csmeta: r314 | diakopter++ | trunk/Sprixel/ (3 files):
00:01 dalek csmeta: [perlesque] more .Clone tidying/completeness
00:01 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=314
00:02 pmichaud so in the x/y/z case above, it wouldn't match because   token z would fail after matching <x> to "aa" and being unable to match <y>
00:03 pmichaud so far the only way to avoid it is to explicitly turn off ratcheting inside of z.  I've suggested that a postfix ! should also enable backtracking on a token, but I don't think that one was acted upon yet
00:03 pmichaud i.e.
00:03 pmichaud token z { <x>! <y> };
00:03 pmichaud allows backtracking into <x>
00:06 sorear **1..1* should also do it
00:06 pmichaud yes, but it also turns <x> into an array
00:08 pmichaud and I think you mean  **! 1
00:09 sorear If I make a minor clarification to a S**, should I edit AUTHORS and VERSION?
00:09 pmichaud for minor clarifications, probably no
00:10 pugssvn r30878 | sorear++ | [S05] clarify :ratchet behavior with input from pmichaud++
00:22 diakopter perlesque: my $x = 5; my $F = _cc.Clone(); say(1); goto $F; say('done');
00:22 p6eval perlesque: OUTPUT«1␤»
00:22 diakopter perlesque: my $x = 5; my $F = _cc.Clone(); $F.Instruction-=2; say(1); goto $F; say('done');
00:22 p6eval perlesque:
00:22 p6eval ..OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1�
00:23 diakopter interesting.
00:24 diakopter in the 2nd case, it doesn't leak memory at all (even though the frame is being cloned every time), b/c nothing holds a reference to the prior frame
00:26 * diakopter ponders what to do next
00:29 diakopter sorear: if I wanted to add a ->psq target to viv... how could/should I get started?
00:32 sorear first, you need to decide how (runtime typed) Perl 6 is going to map to psq
00:33 sorear then, go into VAST::Base, and copy p5 & emit_p5 but s/p5/psq/
00:33 sorear then, add a -q --perlesque command option
00:34 sorear then, start adding emit_psq overrides by analogy with emit_p5 where needed
00:34 sorear there's going to be a lot of duplicated code at first
00:34 sorear as it shows up, I'm going to add an extra level of indirection
00:35 sorear emit_p5, emit_p6, and emit_psq will be replaced (eventually) with emit_deep
00:35 sorear DEEP::* will have the p5/p6/psq targets
00:35 sorear but DEEP nodes are much fewer in number
00:35 jnthn whee
00:35 jnthn > say (* [*] *).WHAT
00:35 jnthn Block()
00:35 jnthn > say (* [*] *).(2,4)
00:35 jnthn 8
00:36 diakopter my guess is that the psq emitted by viv will be extremely verbose (almost entirely "java-style" expressions/invocations/accessors to a runtime API)
00:36 yinyin joined #perl6
00:36 ajs1 Well, githubs auto-pod-rendering hoses my Unicode bits, but http://github.com/ajs/rakudo/b​lob/ajslib-URI/ajslib/URI.pod is there now
00:39 diakopter http://github.com/ajs/rakudo/​raw/ajslib-URI/ajslib/URI.pod
00:40 ajs1 yeah, it would have been nice if their rendering did the right thing, but we can all read pod, I imagine ;-)
00:40 diakopter sorear: I don't expect there to be all that much duplicated code
00:40 diakopter from emit_p6 or emit_p5
00:41 sorear diakopter: emit_p5 implements a great deal of desugaring
00:41 diakopter I'll need to see some of the code viv's STD emits for STD
00:41 diakopter oh
00:41 diakopter maybe you can nopaste a sample? :)
00:41 diakopter (plz)
00:42 sorear a sample of what?
00:42 diakopter of greatly desugared p5 edition of STD
00:42 diakopter [a portion of] STD
00:42 diakopter maybe just 1 rule, perhaps
00:45 sorear pick a rule
00:45 sorear well
00:45 diakopter :) ok
00:45 sorear actually
00:45 sorear run 'make'
00:45 sorear then look in STD.pm5
00:45 sorear viv generates the same code in most cases
00:46 diakopter (eye roll).  yes I've studied gimme5's output a lot.
00:53 jnthn std: 1 .foo 2
00:53 p6eval std 30878: OUTPUT«[31m===[0mSORRY![31m===[0m␤Method call found where infix expected (omit whitespace?) at /tmp/vI7RieW6AC line 1:␤------> [32m1 [33m⏏[31m.foo 2[0m␤    expecting any of:␤        bracketed infix␤  infix or meta-infix␤Parse failed␤FAILED 00:01 115m␤»
00:53 jnthn std: 1 ++
00:53 p6eval std 30878: OUTPUT«[31m===[0mSORRY![31m===[0m␤Postfix found where infix expected (omit whitespace?) at /tmp/OuJZYVpe1L line 1:␤------> [32m1 [33m⏏[31m++[0m␤    expecting any of:␤        bracketed infix␤  infix␤  infix or meta-infix␤Parse failed␤FAILED 00:01 112m␤»
00:55 plobsing joined #perl6
00:57 diakopter sorear: but everytime I look at STD.pm5, I begin to suspect that it's much too tied to the Perl5 edition of Cursor to ever be separated
01:00 sorear sure - you should prefer editing 3000 lines in viv over 100000 lines in STD.pm5
01:03 diakopter well, there could be other emit schemes for STD's rules
01:03 diakopter to the api of another grammar engine that tries to emulate Cursor, I mean
01:04 sorear right, that's mostly where I'm going with DEEP
01:05 * diakopter gains a glimmer of hope
01:05 diakopter I'd love to hear(read) your ideas on how to structure that API
01:07 diakopter meanwhile, maybe I should consider fleshing out my grammar engine in Sprixel so that it has all the same primitives as Cursor
01:08 diakopter also, writing an interpreter edition to supplement the compiler edition
01:09 diakopter sigh.
01:09 diakopter maybe that does actually help the bootstrapping effort.  less directly though.
01:11 diakopter interesting. lexicals in Lua 5.2 are "state vars" by default, now.  they need _ENV marker to mean dynamic allocated.
01:12 sorear diakopter: DEEP is a tree-structured language much like NQP or Perlesque; it has a parse-type known type of "lazy list" which you need to provide somehow
01:12 diakopter you've documented it?
01:13 diakopter it==DEEP
01:17 sorear no
01:17 diakopter sorear: ok. so it's in your brain only. :) how do I get it out of your brain?
01:25 sorear talk.
01:26 diakopter DEEP is a language or an API?
01:26 sorear DEEP, as I currently envision it, has 3 features that aren't mentioned in the perlesque blogs
01:26 sorear it's a data structure
01:26 diakopter ok.
01:26 sorear the AST for a language that will probably never see a concrete syntax
01:26 diakopter oooo gimme the feature ideas
01:26 sorear 1. Roles
01:26 sorear 2. Lazy lists (as a builtin data type, not special syntax)
01:27 sorear 3. Dynamic typing
01:27 diakopter 1 seems to be quite tied to 3
01:27 sorear and by lazy lists, I really mean iterators
01:27 sorear as looping over the same list >once is never needed
01:27 eternaleye joined #perl6
01:28 dalek rakudo: da0437f | jonathan++ | src/core/operators.pm:
01:28 dalek rakudo: Remove cheating versions of whatever-ers that are no longer used.
01:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​a0437fea983a4abc7665a2b6f4198c0b09399a9
01:28 dalek rakudo: 0c65df6 | jonathan++ | build/PARROT_REVISION:
01:28 dalek rakudo: Bump to a PARROT_REVISION that's not busted on Win32.
01:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​c65df64fe708f15a234548ac1ae8cc9119dc372
01:28 dalek rakudo: e659dd5 | jonathan++ | src/Perl6/ (2 files):
01:28 dalek rakudo: Implement bracketed infixes.
01:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​659dd5b100815d6e18d8400a1181fa0daeb718c
01:28 diakopter sorear: ok, I think those would be excellent features to add to another layer on top of perlesque (another stage, I mean)
01:28 sorear in the general case, yes, 1 and 3 are tied
01:28 Tene A co-worker of mine has a weird perl habit.  He adds leading underscores to variable names for every nested lexical scope.  Anyone ever seen this before?
01:28 sorear STD.pm6 uses roles in a very stereotyped way though
01:28 diakopter it wouldn't be the sort of thing that would grow to *a p6 implementation*
01:29 Tene So everything in a sub is $_foo, and everything in the for loop in the sub is $__bar, etc.
01:29 sorear STD.pm6 treats a role as a set of method overrides
01:29 diakopter ok
01:30 sorear the role composition operator is: subclass of STD::X * tweak for X -> subclass of STD::X
01:30 diakopter as long as it's correctly covariant...
01:30 * diakopter blinks
01:30 * diakopter blinks again
01:31 sorear my Class[extends STD] $tweaked = $self.class but unbalanced(')')
01:31 sorear is Class[extends STD] a possible type in CLR-land?
01:31 sorear I might be able to fudge it into my STD $tweaked = $self but unbalanced(')')
01:32 diakopter are you declaring a class/type or an object
01:32 diakopter if class/type, then yes, but not how you're writing it
01:32 sorear a variable to hold classes
01:32 diakopter ah, ok
01:32 sorear does CLR reify classes as objects?
01:32 diakopter that's possible too
01:32 diakopter sortakinda, but perlesque extends that ability more
01:33 diakopter in C#, you have to express class-as-object with  typeof(System.Int32)  (  or  typeof(int)  )
01:33 diakopter but in perlesque, it's just    int
01:34 diakopter there's a detriment to that too, but it slips my mind atm
01:35 diakopter what is "$self.class" in your example
01:37 synth joined #perl6
01:38 diakopter sorear: oh, you mean this:
01:40 diakopter my Type $tweaked = class Tweaked is $self { method unbalanced( ... etc
01:40 diakopter sorear: ^^
01:40 [mark] joined #perl6
01:41 jnthn You can't write a scalar there. :-)
01:41 diakopter I can
01:41 jnthn oh, was I not meant to parse it as Perl 6? :-)
01:41 diakopter since the type of $self is known/being-constructed at parse-time, the parser can declare/vivify the Tweaked class as a subclass of the class of $self
01:42 diakopter well yeah, but I don't know whether p6 has a way to alias types
01:43 diakopter so I'm just suggesting _some_ way of expressing that the new class being declared derives from the type of $self
01:43 diakopter it's a placeholder for whatever correct syntax exists (or will be created)
01:44 diakopter :D
01:45 diakopter in the meantime, I can make perlesque recognize this syntax
01:47 diakopter decommute&
01:54 ajs If I have a variable that contains a ResizeablePMCArray and I want to copy it into a full-fledge, honest to goodness Perl 6 Array, how can I do that?
01:54 jnthn ajs: &circumfix:<[ ]> can probably help you
01:54 ajs ok
01:55 ethel joined #perl6
01:57 agentzh joined #perl6
01:58 JimmyZ joined #perl6
01:58 Trashlord hey ddes
01:58 Trashlord +u
02:07 snarkyboojum joined #perl6
02:09 lue saluton!
02:10 ajs rakudo: "abc" ~~ /[(b)]?/; say $/[0]
02:10 p6eval rakudo e40ee4: OUTPUT«␤»
02:10 ajs rakudo: "abc" ~~ /[(b)]?/; say $/
02:10 p6eval rakudo e40ee4: OUTPUT«␤»
02:10 ajs rakudo: "abc" ~~ /[(b)]+/; say $/
02:11 p6eval rakudo e40ee4: OUTPUT«b␤»
02:11 ajs ?
02:11 ajs that's just odd
02:11 pmichaud ajs: you said matching the b is optional
02:11 pmichaud so it chooses to match "" at the beginning of the string
02:11 ajs I did, but isn't longest matching supposed to win?
02:11 ajs Or did I misread S05?
02:11 pmichaud longest matching wins, yes, but left-most matching wins first
02:12 snarkyboojum joined #perl6
02:12 ajs A!
02:12 ajs Aha I mean
02:12 pmichaud it starts at position zero, tries matching one 'b', fails and backtracks, tries matching zero 'b', succeeds and reaches the end of the pattern and is done
02:12 ajs ok, yes
02:12 ajs rakudo: "abc" ~~ /a[(b)]?/; say $/
02:12 p6eval rakudo e40ee4: OUTPUT«ab␤»
02:12 ajs rakudo: "abc" ~~ /a[(b)]?/; say $/[0]
02:12 p6eval rakudo e40ee4: OUTPUT«b␤»
02:13 ajs that's saner, thanks
02:13 * sorear wanders back.
02:13 sorear diakopter: yes, the ability to write class definitions generally over superclasses = good enough
02:15 snarkyboojum_ joined #perl6
02:20 snarkyboojum joined #perl6
02:20 pugssvn r30879 | sorear++ | [viv] Simplify, de-break, and de-optimize ratchet handling
02:27 * jnthn was sure we had an RT ticket about bracketed infix operators
02:27 colomon joined #perl6
02:28 jnthn rakudo: say 1/7/7/7/7/7/7/7*7
02:28 p6eval rakudo e40ee4: OUTPUT«8.49985975231409e-06␤»
02:28 colomon rakudo: say (1/7/7/7/7/7/7/7*7).perl
02:28 p6eval rakudo e40ee4: OUTPUT«1/117649␤»
02:29 jnthn colomon: Was checking http://rt.perl.org/rt3/Tic​ket/Display.html?id=73264
02:29 jnthn Which it appears is now fixed
02:29 jnthn colomon: Also
02:29 jnthn rakudo: say 5 [+] 37
02:29 p6eval rakudo e40ee4: OUTPUT«Confused at line 11, near "say 5 [+] "␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
02:29 jnthn huh...not updated yet :-/
02:30 colomon jnthn++: I saw the git commit log.  \o/
02:30 jnthn It handles like R[+] and even R[R+] too
02:30 jnthn Probably will end up having some bug somewhere, but seems so far so good :-)
02:30 colomon jnthn: I'll bet moritz_++'s commit bafb6d95ed74f6272fc9 fixed that fraction RT.
02:30 colomon :)
02:30 * jnthn looks
02:31 jnthn oh!
02:31 jnthn Yes, me too
02:31 jnthn OK, well, I assigned it to moritz++ for spectests. :-)
02:31 jnthn colomon: How's the Numeric grant/work coming along overall?
02:31 colomon I think it's in really good shape.
02:31 jnthn Excellent.
02:31 jnthn colomon++
02:32 jnthn Not blocking on any role or multi nasties?
02:32 colomon I need to review it carefully (and code review), but I think the only major method area left to worry about is rand and srand.
02:32 colomon Probably still need a few more operators.
02:32 jnthn You seem to have flushed a bunch of bugs along the way. :-)
02:32 colomon most remaining work is probably coming up with improved tests.
02:32 jnthn OK, sounds good.
02:32 colomon you mean the role issues?
02:32 jnthn Yeah
02:33 colomon jnthn++ for fixing them.
02:33 jnthn And the Real ~~ Numeric one
02:33 colomon but yeah, seems like Numeric and Real may have been the first heavy duty roles used in current master.
02:33 jnthn Yeah, good we got those dealt with.
02:33 jnthn Probably makes masak++'s Stringy journey a little easier. :)
02:34 colomon hope so, I'm eager to see Stringy and Buf working.
02:34 jnthn Same. :-)
02:34 jnthn Very happy somebody has taken it up. :-)
02:34 colomon excuse me for a moment, I think I hear my wife calling.
02:35 jnthn :-)
02:39 colomon she needed another bottle of milk for the little guy.  his sleep schedule is all messed up, probably shouldn't have taken him to the pub last night.  :)
02:39 lue :(              )
02:40 colomon jnthn: anyway, will probably be finishing up the Numeric work next week, unless I get distracted by something else that needs doing for R*.
02:41 jnthn colomon: Wow, talk about starting 'em young. ;-)
02:41 * jnthn also has a messed up sleep schedule :-)
02:41 jnthn OK, sounds good. :-)
02:42 jnthn Spectesting a fix for 75368 ATM and then I'll attempt sleep.
02:42 jnthn We've got up to 640 RT tickets. :-O
02:43 colomon jnthn: we went to see a band there, had dinner and then Henry got to see his dad play with the band a bit.  :)
02:46 jnthn \o/
02:46 jnthn Sounds very nice :-)
02:46 colomon it was cool.
02:46 jnthn Mmm...pub food. :-)
02:47 colomon > 4 R[-] 5
02:47 colomon 1
02:47 jnthn :-)
02:47 colomon two features added in the last week in one REPL line.  :)
02:47 jnthn ;-)
02:47 lue I remember one time I bought a cheese sandwich in a pub, and gave it to a dog outside [Hitchhiker's text game from Infocom :)]
02:49 * jnthn misses the Slovak pub noms
02:49 dalek rakudo: 51874cc | jonathan++ | src/core/Any.pm:
02:49 dalek rakudo: Fix a spelink fel.
02:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​1874ccfd0f0c52113dcb5a06dd12acb10ebc9eb
02:49 colomon jnthn: did you turn on tests for your grand whatever patch yesterday?  how is that stuff tests?
02:49 colomon *tested
02:49 jnthn colomon: I didn't.
02:50 jnthn colomon: I was hoping to find an RT ticket for it and didn't and then went to sleep
02:50 colomon any notion where they are?
02:50 jnthn Given that we never had them in alpha and I don't think Pugs did them, it may be a case of "if they are". :-)
02:50 * colomon may be hoping to get another few dozen working tests.... ;)
02:51 colomon hmmm... I guess, where are they in the spce?
02:51 colomon *spec?
02:51 jnthn Well, if that's what you're up for, I've given a couple of tickets to moritz++ today that you could steal and do the tests for. :-)
02:51 jnthn almost certainly the test belong in S03.
02:52 colomon I really should be going to bed soon, probably (assuming Henry is asleep soon), but I always like seeing new tests work...
02:52 jnthn colomon: A quick search suggests
02:52 jnthn t\spec\S03-operators\nesting.t
02:52 jnthn Is worth a look
02:53 colomon only has four tests
02:53 jnthn rakudo: say &[+](1, 2)
02:53 p6eval rakudo e659dd: OUTPUT«3␤»
02:53 jnthn huh, I didn't know that was implemented :-)
02:53 jnthn At least it's implemented *and* tested. :-)
02:53 jnthn colomon: Yes, but it has one skipped test that should now pass
02:53 colomon jnthn: didn't you do that about a month ago?
02:53 jnthn colomon: I figure others can be added in the same kinda way.
02:54 jnthn colomon: er... :-)
02:54 jnthn ...maybe. :-)
02:54 colomon "others"?
02:54 jnthn colomon: more tests
02:55 jnthn Because is 1 [+] 2, 3, '[+] as an infix'; is hardly coverage. ;-)
02:55 colomon what are you envisioning in nested.t?
02:55 jnthn At least test that R[-] works, for example
02:55 jnthn That is, the bracketed infix forms work with meta-ops too.
02:55 jnthn Feel free to find a better place though.
02:55 pugssvn r30880 | colomon++ | [t/spec] Unfudge test that now works, jnthn++.
02:55 jnthn It's just the only one I found of that kind.
02:56 colomon hmmm.... does R[-] belong with the tests for [-] or the tests for Rop?
02:58 jnthn Maybe we want tests for bracketed infixes?
02:58 jnthn Can call it both ways I guess. :-)
02:58 jnthn (I meant, all the tests for bracketed infixes together.)
02:58 colomon jnthn: (and I was first thinking of tests for * + 2, seems like they belong in S02?)
02:59 colomon jnthn: okay, will add some doing it that way.  :)
02:59 jnthn Yes, S02 specs that.
02:59 colomon you can bracket the metaops too, can't you?
02:59 colomon (it works, at any rate!)
02:59 jnthn > say 2 [R-] 1
02:59 jnthn -1
02:59 jnthn ;-)
02:59 jnthn std: say 2 [R-] 1
02:59 p6eval std 30879: OUTPUT«ok 00:01 115m␤»
02:59 jnthn Yes. :-)
02:59 colomon we need to get out of the habit of say there, I did
03:00 colomon > say 4 [R-] 3
03:00 colomon -1
03:00 colomon :)
03:00 jnthn You've less years of the REPL to unlearn than me. ;-)
03:00 snarkyboojum joined #perl6
03:01 * jnthn has since 2007 to unlearn needing to write say ;-)
03:01 PerlJam why get out of the habit?  It still does the right thing doesn't it?
03:01 jnthn PerlJam: But...but...I could spend the time I spend typing, taking a sip of beer instead.
03:01 eternaleye joined #perl6
03:02 colomon whoops, toddler sleep fail. gotta go take a stab at putting him to sleep.  will try to sneak a few of these tests in in the morning.  :)
03:02 colomon o/
03:02 jnthn o/
03:02 jnthn .oO( grr...it's 5am and I'm not feeling especially tired...)
03:03 jnthn RT
03:03 jnthn #75368 fix pushed
03:04 jnthn OK, going to attempt sleep. :-)
03:04 jnthn bbiab :-)
03:05 jnthn .oO( it's almost sunny outside, night o/ feels wrong! )
03:06 lue good night jnthn o/
03:07 snarkyboojum good luck sleeping jnthn o/
03:07 PerlJam good morning jnthn!  :)
03:07 lue [maybe move to the US temporarily and get a regular sleep pattern :)]
03:07 lue It's 20:00 in PDT
03:08 dalek rakudo: 63c5a5c | jonathan++ | src/core/operators.pm:
03:08 dalek rakudo: Make ne consistent with !eq and != consistent with !==.
03:08 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​3c5a5cd238f5d1b732760909e7c503ad6dce188
03:09 * snarkyboojum likes how useable Perl 6 is becoming with all the work over the last couple of months and a auto printing/working REPL :)
03:11 lue Three day weekend coming up, then I should be able bleed my fingers from coding Perl 6 :D
03:14 snarkyboojum I wonder how helpful/relevant it would be in discussions about "which features you wish were you Perl", to point out how most of the wish list features people are talking about are in Perl 6...
03:15 snarkyboojum I find myself doing that more and more, not to proselytize per se, just to point out that they are in Perl
03:15 snarkyboojum albeit Perl 6
03:15 snarkyboojum oops "wish were you Perl" -> "wish were in Perl"
03:15 sorear colomon: "to put to sleep" doesn't quite mean what you think it does...
03:17 snarkyboojum sorear: my colleague used that phrase the other day about some code we were working on, and we snickered about it happily passing away in it's sleep
03:18 snarkyboojum apologies if I'm talking out of context.. too many coffees this morning
03:19 * PerlJam wonders if sorear had the same thought about colomon "taking a stab at putting the toddler to sleep"
03:19 snarkyboojum anyway, I hope my mentioning Perl 6 in those kinds of discussions doesn't annoy people (wouldn't want it to be counterproductive) - though it seems a valid thing to discuss
03:20 snarkyboojum whooops - didn't realise that was the context :)
03:25 PerlJam snarkyboojum: I tend to mention Perl 6 features in a Perl 5 context when the Perl 6 solution is interesting or obviously "better" along some axis.
03:26 PerlJam As long as you don't over do it, it won't be annoying :)
03:26 PerlJam that's MHO anywya
03:26 snarkyboojum PerlJam: aye. fortunately that's quite often the case re interesting or better :)
03:30 xinming joined #perl6
03:45 pugssvn r30881 | colomon++ | [t/spec] Add two obvious tests we were missing before.
03:55 pugssvn r30882 | colomon++ | [t/spec] More nesting tests.
04:19 pugssvn r30883 | sorear++ | [viv] Implement a tree AST reassociation optimizer pass.  output is 9.3% smaller!
04:31 sorear I am getting tired of writing visitor boilerplate
04:46 pugssvn r30884 | sorear++ | [viv] Refactor optimizer a bit using a common visitor
04:47 redicaps joined #perl6
04:47 redicaps left #perl6
05:16 Khisanth write something more reusable :)
05:24 kaare joined #perl6
05:45 pugssvn r30885 | sorear++ | [viv] Strip out AST values that aren't used at runtime - cuts output size by almost half
06:00 redicaps joined #perl6
06:02 pugssvn r30886 | sorear++ | [viv] Implement <a>: <b> syntax
06:02 pugssvn r30886 | STD.pm6 IS NOW TRANSLATED WITHOUT ERRORS
06:03 TimToady \o\ /o/ \o\ /o/
06:03 sorear don't get too excited.  perl5 doesn't like the output much
06:04 TimToady I'm just very happy that you're taking the ball and running with it
06:14 rgrau[1] joined #perl6
06:15 pugssvn r30887 | moritz++ | [t/spec] two unfudges for rakudo
06:15 pugssvn r30888 | moritz++ | [perl6.org] fix broken link, (John Gabriele)++
06:32 Ross joined #perl6
06:32 mathw joined #perl6
06:43 sjohnson rakudo: dance if $happiness
06:43 p6eval rakudo 63c5a5: OUTPUT«Symbol '$happiness' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
06:43 pugssvn r30889 | sorear++ | [viv] Prototype an additional layer between the regex compiler and Perl5, which will grow into DEEP
06:44 eternaleye joined #perl6
06:49 Su-Shee joined #perl6
07:12 TimToady rakudo: say 1 RR- 2
07:12 p6eval rakudo 63c5a5: OUTPUT«-1␤»
07:12 TimToady rakudo: say 1 RRR- 2
07:12 p6eval rakudo 63c5a5: OUTPUT«1␤»
07:13 TimToady rakudo: say 1 R[RR-] 2
07:13 p6eval rakudo 63c5a5: OUTPUT«1␤»
07:13 TimToady rakudo: say 1 R[R[R-]] 2
07:13 p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
07:14 TimToady rakudo: say 1 [R[R-]] 2
07:14 p6eval rakudo 63c5a5: OUTPUT«-1␤»
07:14 TimToady rakudo: say 1 [RR[R-]] 2
07:14 p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
07:14 TimToady rakudo: say 1 [R[RR-]] 2
07:14 p6eval rakudo 63c5a5: OUTPUT«1␤»
07:14 TimToady curious
07:17 TimToady zzz &
07:18 TiMBuS joined #perl6
07:20 moritz_ rakudo: say <a c b d>.sort: &infix:<Rcmp>
07:21 p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<Rcmp>␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
07:21 moritz_ rakudo: say 1 [+] 2
07:21 p6eval rakudo 63c5a5: OUTPUT«3␤»
07:24 gper joined #perl6
07:37 pugssvn r30890 | sorear++ | [viv] A DEEP Optimization - cut combination
07:39 plobsing_ joined #perl6
07:40 ejs joined #perl6
07:44 xinming joined #perl6
07:45 ejs joined #perl6
07:47 xinming joined #perl6
07:58 pugssvn r30891 | sorear++ | [viv] A DEEP optimization - eliminate many useless 'do'
07:59 moritz_ is DEEP the PAST of viv?
08:06 pugssvn r30892 | moritz++ | [t/spec] test that Rat literals are gone, RT #73264
08:09 redicaps left #perl6
08:14 sorear moritz_: sort of
08:17 pugssvn r30893 | sorear++ | [viv] Optimize out more useless do's and factor out sub logic
08:18 XaeroOne joined #perl6
08:22 moritz_ Mathematica has a subroutine attribute 'Listable', which makes function autothread over lists
08:23 moritz_ I wonder how hard it would be to do that with a per-parameter trait in Perl 6
08:23 moritz_ (as a module, of course)
08:26 clintongormley joined #perl6
08:35 dakkar joined #perl6
08:40 mahesh joined #perl6
08:41 pugssvn r30894 | sorear++ | [viv] Suppress double whitespace matching
08:58 Ross joined #perl6
09:03 sorear hmm.  'Actions.pm' is now my enemy.
09:04 moritz_ why? :-)
09:05 sorear because the right data is going in and the wrong data is going out
09:05 moritz_ a bug pipe!
09:05 sorear wrong means incomplete, so no downstream workarounds
09:05 Ross joined #perl6
09:05 Ross joined #perl6
09:06 ejs joined #perl6
09:17 am0c joined #perl6
09:20 codeTraveler___ joined #perl6
09:28 sorear unrelatedly, Actions.pm runs without strict or warnigns.
09:31 krr joined #perl6
09:33 masak joined #perl6
09:33 masak oh hai, #perl6
09:33 phenny masak: 27 May 22:01Z <jnthn> tell masak at the moment easiest to shift a PMC and then $I0 = $P0 it. We could implement shift_integer and shift_string in ParrotIter though.
09:33 masak ah, of course.
09:34 * masak tries the former
09:34 pugssvn r30895 | sorear++ | [viv] Fix HASH references in concise dumper
09:34 pugssvn r30895 | [Actions] Fix nested capture handling
09:45 pugssvn r30896 | sorear++ | [viv] Fix null list pretty-printing
09:45 ejs joined #perl6
09:53 pugssvn r30897 | sorear++ | [viv] Implement $<foo> = <bar> syntax
09:57 atomicstack joined #perl6
09:58 snarkyboojum joined #perl6
10:22 pugssvn r30898 | sorear++ | [viv] More fixes for embedded hashes
10:25 masak phenny: tell jnthn lol! http://gist.github.com/417012 -- it looks right to me, did I just find a Parrot memory bug?
10:25 phenny masak: I'll pass that on when jnthn is around.
10:26 envi^home joined #perl6
10:30 Ross joined #perl6
10:35 pugssvn r30899 | sorear++ | [viv] un6 ::X -> 'X'
10:35 pmurias joined #perl6
10:35 jnthn morning
10:35 phenny jnthn: 10:25Z <masak> tell jnthn lol! http://gist.github.com/417012 -- it looks right to me, did I just find a Parrot memory bug?
10:35 masak lol jnthn is awake!
10:35 jnthn Eww. I'm not looking at that until I've made coffee.
10:36 masak probably wise :)
10:36 * jnthn goes to negotiate with his favorite kitchen appliance
10:36 masak rakudo: say 1 R[R[R-]] 2
10:37 p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
10:37 masak rakudo: say 1 RR[R-] 2
10:37 p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
10:37 * masak submits rakudobug
10:37 masak courtesy of TimToady++.
10:39 jnthn ah shit.
10:40 masak coffee machine b0rken?
10:42 jnthn ...works after causing...small flood.
10:42 jnthn :-|
10:43 jnthn ooh, my Belgian Perl Workshop talk is accepted. \o/
10:44 jnthn masak: omg
10:44 jnthn masak: That's...epic fail.
10:45 jnthn masak: Think asking the Parrot folks may be easiest.
10:45 jnthn That's going to be perhaps a bit tricky to chase down.
10:46 Su-Shee why isn't perl 6 listed here? http://emerginglangs.com/speakers/
10:48 pugssvn r30900 | sorear++ | [viv] un6 invert, miscellaneous fixes
10:49 masak jnthn: I'll ask them after I've investigated exactly where it happened.
10:49 platypus43 joined #perl6
10:50 XaeroOne left #perl6
10:50 jnthn masak: Wonder if it's reproducable in a pure PIR example.
10:50 masak jnthn: I'll investigate that, too.
10:55 pugssvn r30901 | sorear++ | [viv] un6 elsif chains
10:55 * sorear calls it a night
10:55 sorear perl -c has gotten 10% through viv output
10:56 jnthn night sorear o/
10:57 masak sorear++ # 'night!
11:01 azert0x joined #perl6
11:01 azert0x hi
11:02 azert0x i've just a little question: why in perl6 it's not as python: do not type ";" at the end of the line, but do indentation?
11:02 azert0x it's not a bad idea, at the first view?
11:03 m6locks but obfuscation would not be possible then...
11:03 azert0x is it to keep the possiblity to obscure code :)
11:03 azert0x ok
11:03 azert0x just i prefer that, in the second view.
11:04 azert0x Perl6 seem to be harder than Perl5 (i'm seeing perl6.org tuto)
11:05 azert0x it's because we can do more things with it, or just because the interpreter change
11:06 masak azert0x: is the question why Perl 6 doesn't use indentation rather than braces to indicate nestedness?
11:06 Su-Shee it's not harder if you treat it like what rubyperl5pythonjavascript can do. only if you get beyond that it's getting new/different.
11:06 masak azert0x: a lot of people don't like using indentation for that. TimToady is one of them. I don't much like it either.
11:06 masak azert0x: that said, when it's possible, I'm going to write a grammar modification that allows you to write such code in Perl 6. :)
11:07 FardadJalili joined #perl6
11:07 FardadJalili left #perl6
11:08 azert0x ok, i just see more (lost of) things we can do. sorry for my bad english and my little noob question, i'm just a Perl5 little coders, but i use often, and want to know more about the futher: Perl6 -_-
11:08 Su-Shee you _can_ do them. you don't _have to_
11:09 mikehh_ joined #perl6
11:10 Su-Shee code forcefully using each and every feature isn't automatically better, good or more readable code. ;)
11:10 Su-Shee also, in a few years, there will be something like "perl 6 best practices" or "rakudo - the good parts" anyway. ;)
11:10 azert0x hum... i see. thanks for you answer! it's clearly for me, now. i'm going to learn more about Perl6 and stay here, so :)
11:11 Su-Shee just rewrite what you would do in perl 5 in perl 6 as a first step. actually use classes and methods. play with iterator mechanisms.
11:12 Su-Shee read the moose stuff if you totally don't get it.
11:15 * moritz_ back from pizza nom
11:17 casan joined #perl6
11:18 moritz_ azert0x: Larry borrows many principles from natural languages; having to end your statements explicitly (with tone in spoken language, and with a fullstop in written language) is much more in line with what we're used to
11:19 moritz_ azert0x: likewise there's often a semantic difference between no pause at all and a pause (which corresponds to the certain bit of whitespace sensitivy that Perl has)
11:20 moritz_ but counting whitespaces / measuring pause length isn't applicable in natural languages
11:22 pmurias what's a good CLI interface to enable passing options to backends/frontends
11:23 pmurias with the option set being determined on the backends/frontend choosen
11:24 azert0x okay :)
11:24 * pmurias reads through 19
11:25 azert0x so it's why, partly, Perl6 was born... i see.
11:27 azert0x i'm a unix-like system user for 10 years. i started to learn Perl for 4 - 5 years, and never learn Python or Ruby (i think they are not powerfull as Perl in Unix administration), it's why i just enjoy the fact that Perl evolve again.
11:32 pmurias nice S19 specs exactly what i want
11:32 Su-Shee you can do everything in python you can do in perl as an admin; it's really more about _how_ you do things.
11:34 moritz_ Turing strikes again :-)
11:34 azert0x yes, i know. has time i studied long and thoughtful about Perl - Python - Ruby and i finaly choose Perl. I did not never regretted. although many of my colleagues (eg community backtrack) I suggested we python.
11:37 Su-Shee after a very short period when I thought I should learn Java for jobs, I never looked back and learn only what I want or what I find useful.
11:38 moritz_ that approach has worked well for me too
11:41 Su-Shee I really invest the appropriate time to get a job I really want to have instead.
11:42 Su-Shee rather. not really.
11:43 azert0x I turned to computer security very soon. I think you should know: during my long period of learning (which is still not finished) I really enjoyed this: http://www.milw0rm.com/author/893
11:45 azert0x Afficher en écriture latine
11:45 azert0x I am sorry, I'll have to give you a link to my repository: http://repository.ut4z.free.fr/​doc/E-Zines/Perl%20Underground/ ;)
11:45 Su-Shee uiuiui a perl underground.. ;)
11:45 masak suddenly the channel feels very shady... :)
11:46 Su-Shee more or less all security folks I know do perl.
11:46 Su-Shee somewhat different in style compared to us though ;)
12:10 christine joined #perl6
12:14 ejs joined #perl6
12:17 takadonet joined #perl6
12:17 takadonet morning all
12:17 masak takadonet: \o
12:26 bluescreen joined #perl6
12:28 JimmyZ joined #perl6
12:29 pmichaud good morning, #perl6
12:29 jnthn morning, pmichaud
12:29 redicaps joined #perl6
12:29 takadonet pmichaud: morning
12:29 masak o/
13:00 [Coke] masak - looks like r47086 is a fix for you from bacek.
13:00 masak [Coke]: indeed. trying to make it work as we speak.
13:09 masak hm. I need to merge buf into master now. but I'll do it in a buf2 branch first, and if things go well, I'll sync with master.
13:10 jnthn \o/
13:10 jnthn masak: What's in the branch? :-)
13:10 masak Str.encode and Buf.decode
13:10 jnthn masak: Or will you blog en liten progressrapport? :-)
13:10 masak japp :)
13:10 masak that's on today's list of things to do.
13:10 jnthn yay!
13:10 [Coke] shame we can't buy this for YAPC:
13:11 jnthn I haven't blogged for AGES.
13:11 [Coke] http://www.yousuckatcraigslist.com/?p=4659
13:12 BrowserUk joined #perl6
13:16 plobsing joined #perl6
13:16 JimmyZ joined #perl6
13:20 gbacon joined #perl6
13:24 masak I rebased all of the week's changes into a single commit.
13:24 masak it's now pushed to master.
13:25 dalek rakudo: c5fdb17 | masak++ |  (4 files):
13:25 dalek rakudo: [Buf] Str.encode and Buf.decode
13:25 dalek rakudo: Also a few other goodies, such as the Stringy role.
13:25 dalek rakudo: A bunch of tests now pass in t/spec/S32-str/encode.rakudo.
13:25 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​5fdb17fb3e642ef2789fa4ef5b27be72295d267
13:25 jnthn masak: Does ~$foo now call $foo.Stringy?
13:25 masak no. not yet.
13:25 jnthn k
13:26 masak I'll see if I can change that without breaking anything.
13:27 moritz_ you probably need something similar to prefix:<+>
13:27 masak hm. also, now that things work, I have my first 'interesting' encoding mismatch: http://gist.github.com/417142
13:27 moritz_ where non-perl6 objects go through the vtable
13:27 masak have a look at test 8.
13:28 SmokeMachine joined #perl6
13:29 masak hm, it would do that if it treated each byte as an individual character...
13:30 * moritz_ just verified that the test is correct
13:31 moritz_ $ perl -CS -MEncode=decode_utf8 -wE 'say decode_utf8(chr(195) . chr(182))'
13:31 moritz_ ö
13:32 Ross joined #perl6
13:32 patspam joined #perl6
13:32 ejs joined #perl6
13:32 masak I'm starting to suspect that the fix in Parrot also closed off the ability to decode Bufs the way [Coke] originally suggested.
13:33 moritz_ did that test pass in alpha?
13:33 masak no, Buf.decode is new for this week.
13:34 masak it was written yesterday.
13:36 bacek StringBuilder doesn't work with "bytes".
13:36 bacek It always "chars"
13:37 masak bacek: ok, so my current code simply misses the point, then.
13:37 masak bacek: given a list of int values that either are identical to or can be translated to a list of bytes, how can I use Parrot to construct a Str?
13:38 bacek masak, what are you trying to do?
13:38 moritz_ the question boils down to "how do I decode a byte string?"
13:38 masak bacek: what I just described.
13:38 masak and what moritz_ said.
13:38 moritz_ the list of integers/buffers are the UTF-8 representation of a string
13:39 bacek ah.
13:39 bacek let me check it
13:39 * moritz_ fights with Mathematica
13:41 Lorn joined #perl6
13:41 [Coke] masak: my apologies; I misunderstood your original request.
13:42 masak no problem. it found us a bug :)
13:42 masak yeah, when I said list of bytes, I really meant a list of *bytes*. I know the word "byte" is very overloaded and sometimes used to mean "character". but I meant "bytes".
13:43 ejs joined #perl6
13:43 Su-Shee aren't we supposed to mean actual bytes, characters and so on from now on?
13:44 masak at least here in #perl6 :)
13:44 bacek ok. Looks like it's not quite possible with current APIs.
13:44 tomka joined #perl6
13:44 bacek It's a bad news.
13:44 * moritz_ suggests s/bytes/octets/
13:44 tomka print "Hiho ;-)";
13:44 masak bacek: yes.
13:44 bacek But there is good news
13:44 moritz_ bacek: uhm, why not? how does IO handle decoding?
13:44 [Coke] good news is that bacek the magic coding robot is awake!
13:45 bacek moritz_, it's not exposed to HLLs
13:45 moritz_ hi tomka
13:45 moritz_ so it "just" needs exposure?
13:45 Su-Shee masak: I personally think the distrinction makes it all easier.
13:45 bacek moritz_, not really.
13:45 bacek I think about adding .push_byte to StringHandle PMC.
13:45 masak Su-Shee: I'm not arguing. of course it makes it easier to have a non-confused model of things.
13:46 * Su-Shee looks forward for frontends using the bytes/chars/whatevers facitility for sorting mechanisms.
13:47 bacek but it's almost tomorrow here and I can't think clearly. Catch darbelo on #parrot - he is working on NFG and should know about strings
13:49 masak anyway, going from zero to "here's what we're blocking on now" is definitely a kind of progress, and definitely bloggable. :)
14:02 jaldhar joined #perl6
14:02 meppl joined #perl6
14:11 ruoso joined #perl6
14:28 cognominal \o
14:29 masak o/
14:29 masak lol I blogged: http://use.perl.org/~masak/journal/40369
14:29 pmurias diakopter: hi
14:30 pmurias diakopter: see failing test
14:31 jnthn masak-- # not sharing chocolate cake :-(
14:31 jnthn masak++ # nice report :-)
14:31 dalek csmeta: r315 | pawelmurias++ | trunk/Sprixel/ (7 files):
14:31 dalek csmeta: remove the sketched Perl 6 runtime classes written in C#
14:31 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=315
14:31 dalek csmeta: r316 | pawelmurias++ | trunk/Sprixel/t/why-does-that-fail.t:
14:31 dalek csmeta: failing test
14:31 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=316
14:31 cognominal no more taker for speaking at Calais?  http://journeesperl.fr/fpw2010/, mberends is almost signed in.
14:32 jnthn masak: +role Buf[::T = Int] does Stringy {
14:32 jnthn 2
14:32 jnthn +    has @.contents;
14:32 jnthn I guess that'll become has T @.contents; at some point - does that not work ATM?
14:34 masak jnthn: oh! didn't even try :)
14:34 masak I'm such a cynic. :P
14:34 masak jnthn++ # suggestion
14:34 * jnthn awaits a bug report ;-)
14:34 colomon joined #perl6
14:35 jnthn masak: I feel like I'm missing something somewhere in reading this.
14:35 * jnthn re-reads encode and decode
14:35 masak jnthn: oh?
14:36 jnthn masak: So when we have a Buf of UTF-8, what does it actually mean?
14:36 jnthn masak: That is, if I index into the Buf, at what level am I indexing?
14:37 masak jnthn: at the byte level, I should think.
14:37 * moritz_ dearly hopes so
14:37 jnthn Given öl
14:37 jnthn In UTF-8 that's
14:38 jnthn 0xC3 0xB6 0x6C
14:38 masak 195, 182, 108. yes.
14:39 jnthn So if I do say "öl".encode('UTF-8').[1]
14:39 jnthn I get 0xB6?
14:39 masak yes.
14:39 moritz_ you get 0xB6
14:39 jnthn .oO( Even if I'm running PPC? ;-) )
14:39 jnthn oh, B6, not 86
14:39 jnthn pun fail
14:40 masak heh :)
14:40 jnthn masak: OK, I'm now trying to fathom if the code actually does that. :-)
14:40 * moritz_ sighs
14:41 jnthn masak: The bit that's worrying me is in decode
14:41 jnthn $S1 = chr $I1
14:41 masak well, have you seen the discussion about it here and on #parrot?
14:41 jnthn That's presumably only "part" of a character potentially though?
14:41 jnthn Didn't see the Parrot one.
14:41 masak we're aware of the bytes != chars thing.
14:41 masak it's a problem.
14:41 jnthn OK
14:41 masak I even mention it in the blog post! :P
14:41 jnthn I'm not convinced that this wants to be done in terms of chr.
14:41 masak didn't you just read it?
14:42 masak was it too long? :)
14:42 jnthn All I can think about is not having cake. :-P
14:42 jnthn I'm just trying to catch up. :-)
14:42 masak jnthn: keep up :P
14:42 jnthn How could telling someone to keep up possibly help?
14:42 jnthn ;-)
14:43 masak sorry, I meant it in a rather nice way...
14:43 masak :-)
14:43 jnthn <chuckle>
14:43 [Coke] it's all my fault anyway for not knowing what masask wanted. =-)
14:43 jnthn masak: OK, I think I follow the issue now.
14:44 jnthn [Coke]: It almost feels like we may need a primitive for "get me the raw bytes that make up this chunk of string data".
14:44 masak on #parrot they suggested a ResizableByteArray.
14:44 jnthn [Coke]: I wonder about a PMC that could reference a STRING*
14:45 jnthn [Coke]: And provide a byte view of it.
14:45 jnthn Then we don't have to make a copy of the string.
14:45 jnthn We can just reference the original
14:45 jnthn Which, since strings are now immutable, would seem safe.
14:45 [Coke] at that point, wouldn't String.bytes() be a way to go?
14:45 jnthn Or at least as far as my rusty parrot guts knowledge goes.
14:45 jnthn [Coke]: Yes, but what would it return?
14:46 jnthn A PMC like I just described?
14:46 [Coke] something that does array that contains the bytes?
14:46 [Coke] and if it does something sneaky under the covers to avoid byte-ifying the whole string, we don't care.
14:46 [Coke] (but for now, let's just do that.)
14:46 moritz_ (or a string in "binary" encoding?)
14:46 jnthn $P0 = new ['StringBytifier']
14:46 * moritz_ shuts up
14:47 jnthn $P0 = 'öl';
14:47 mberends different encodings give different byte sequences for the same string
14:47 jnthn $I0 = $P0[1]
14:47 masak any such solution would have to parameterize on the actual encoding, since we're potentially interested in... what mberends said.
14:47 jnthn say $I0 # 182
14:47 [Coke] every String has an encoding, though.
14:48 jnthn Yeah, I guess I assumed there, that we have a chunk of memory containing the string encoded that way
14:48 jnthn Which wouldn't be the original string itself I guess, once the current NFG work is done.
14:49 [Coke] let me back up a sec - is this needed for R* ?
14:49 [Coke] or is this just NTH?
14:49 moritz_ [Coke]: it's needed for masak's gsoc project
14:49 jnthn No, not an R* blocker, but...what moritz_++ said.
14:50 [Coke] ok. perhaps I'll just sic our GSOC student on your GSOC student (or vice versa) and let them sort it out.
14:50 [Coke] ;)
14:50 masak :)
14:50 moritz_ though it would be nice indeed to ahve at least some basic binary data handling in R*
14:50 jnthn Hey, delegation. :-)
14:50 jnthn moritz_: Oh, indeed. It's desirable, just not blocking.
14:51 moritz_ class Coke { has $.gsoc-student handles <string-tasks>; }
14:53 [Coke] looks like this may be more of a bacek issue. I'll ping him when he wakes up.
14:55 jnthn OK, and I can perhaps quickly hack up a PMC like the one I was mentioning to (as a Rakudo dynpmc initially) if it sounds interesting.
14:55 jnthn It's probably a half an hour hack unless I'm missing something.
14:55 jnthn But I don't know it's a long term answer.
14:56 jnthn It's nice outside - going for a little stroll. bbs. :-)
15:00 SmokeMachine joined #perl6
15:09 redicaps left #perl6
15:11 nnunley joined #perl6
15:12 _kaare joined #perl6
15:19 ejs joined #perl6
15:29 ajs This makes my life far too complicated:
15:29 ajs rakudo: "abc" ~~ /[ 'a' $<b> = (b) ]?/; $/<b>.WHAT;
15:29 p6eval rakudo c5fdb1: OUTPUT«Method 'WHAT' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:29 colomon pick failures in spectest?
15:30 masak ajs: I know moritz_ has been working on fixing that and related issues.
15:31 masak ajs: http://rt.perl.org/rt3/Tic​ket/Display.html?id=73462
15:32 * jnthn back
15:33 ajs ah, cool Thanks
15:33 masak jnthn: a half-hour exploratory hack would be much appreciated. :)
15:34 masak fwiw, the #parrot people (NotFound and whiteknight) seem to have converged on a solution they call 'ByteBuffer'.
15:35 jnthn masak: Ah, OK.
15:35 jnthn masak: They may beat me to getting to said exploratory hack. :-)
15:35 jnthn (can't really do it until this evening - want to get some $dayjob finished first)
15:35 masak maybe.
15:35 masak I'm about to go home and make nom.
15:35 ejs joined #perl6
15:36 jnthn omnomnom
15:36 jnthn Enjoy :)
15:36 masak I might resurface later in the evening, if only for a short while.
15:36 masak thanks :)
15:36 masak o/
15:36 jnthn o/
15:37 azert0x joined #perl6
15:45 colomon rakudo: <a b c d>.pick(*).sort
15:45 p6eval rakudo c5fdb1: OUTPUT«Method 'sort' not found for invocant of class 'Block'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:46 colomon rakudo: <a b c d>.pick(*)
15:46 p6eval rakudo c5fdb1:  ( no output )
15:46 colomon rakudo: <a b c d>.pick(*).say
15:46 p6eval rakudo c5fdb1: OUTPUT«_block46␤»
15:47 jnthn :-/
15:47 jnthn rakudo: <a b c d>.pick(*).(Mu)
15:47 p6eval rakudo c5fdb1: OUTPUT«No candidates found to invoke␤current instr.: '_block46' pc 317 (EVAL_1:23161569)␤»
15:47 colomon rakudo: <a b c d>.pick(OInf).say
15:48 p6eval rakudo c5fdb1: OUTPUT«Could not find sub &OInf␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:48 colomon rakudo: <a b c d>.pick(Inf).say
15:48 p6eval rakudo c5fdb1: OUTPUT«dabc␤»
15:48 ajs http://github.com/ajs/raku​do/tree/ajslib-URI/ajslib/ -- all tests now pass. I'll add a few more tests tonight and clean up the docs a bit. Then I'm on to... something else? Perhaps I'll write Perl5.pm in my spare time ;-)
15:48 colomon jnthn:  in pick(*), the * either isn't becoming a Whatever or it isn't matching Whatever.
15:48 colomon (in dispatch)
15:49 jnthn colomon: How does it match?
15:49 colomon I'm just looking at this:
15:49 jnthn colomon: Where is pick implemented?
15:49 colomon multi method pick(Whatever, :$replace) {
15:49 colomon self.pick(Inf, :$replace);
15:49 colomon }
15:49 colomon Any-list.pm
15:49 jnthn rakudo: multi x(Whatever) { say 42 }; x(*)
15:49 p6eval rakudo c5fdb1: OUTPUT«42␤»
15:50 moritz_ rakudo: multi a(Whatever) { say "*" }; multi a($) { say '$' }; a(*)
15:50 p6eval rakudo c5fdb1: OUTPUT«*␤»
15:50 colomon rakudo: class X { method pick(Whatever) { say 'hello' }; }; X(*)
15:50 p6eval rakudo c5fdb1: OUTPUT«Could not find sub &X␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:51 colomon rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(*)
15:51 p6eval rakudo c5fdb1:  ( no output )
15:51 jnthn rakudo: say 1 ~~ *
15:51 p6eval rakudo c5fdb1: OUTPUT«_block46␤»
15:51 jnthn Ah. :-)
15:51 jnthn colomon: I think we need to add ~~ to the "do not curry" list. :-)
15:52 jnthn colomon: See whatever_curry in Actions.pm - it's easy to add
15:54 colomon jnthn: yes, I reviewed your code when you pushed it.  ;)
15:55 colomon compiling....
15:55 jnthn colomon++
15:55 * moritz_ is looking for tests
15:58 moritz_ colomon: I have a failing test for it... should I push?
15:58 colomon moritz_: better fudge it, I've still got issues here.
15:59 colomon > say  1 ~~ *
15:59 colomon 1
15:59 colomon but pick(*) still fails.
15:59 pugssvn r30902 | moritz++ | [t/spec] smartmatching against Whatever *
15:59 jnthn colomon: Guess that must be a seperate issue then...
16:00 jnthn colomon: The Whatever candidate certainly doesn't get called?
16:00 moritz_ rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(*)
16:00 p6eval rakudo c5fdb1:  ( no output )
16:00 moritz_ rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(Whatever)
16:00 p6eval rakudo c5fdb1: OUTPUT«hello␤»
16:00 colomon well, I haven't tried a say in the code, but ...
16:00 diakopter pmurias: I updated my blog post
16:01 colomon > <a b c d>.pick(Inf).say
16:01 colomon badc
16:01 colomon > <a b c d>.pick(*).say
16:01 colomon _block50
16:01 diakopter now you have coroutines as well as full continuations
16:02 colomon and pick(Whatever) just calls pick(Inf), so that's very suggestive.
16:02 colomon rakudo: say *.WHAT
16:02 p6eval rakudo c5fdb1: OUTPUT«Whatever()␤»
16:02 colomon rakudo: class X { method pick(Mu $a) { say $a.WHAT; say $a.perl }; }; X.new.pick(*)
16:02 p6eval rakudo c5fdb1:  ( no output )
16:03 colomon :\
16:03 colomon rakudo: class X { method pickle(Mu $a) { say $a.WHAT; say $a.perl }; }; X.new.pickle(*)
16:03 p6eval rakudo c5fdb1:  ( no output )
16:04 jnthn colomon: does different for me at command line
16:04 jnthn oh stf
16:04 jnthn *w
16:04 pmurias diakopter: seen the failing file?
16:04 jnthn > class X { method pick(Mu $a) { say "here"; }; }; X.new.pick(*)
16:04 jnthn _block67
16:05 colomon moritz_: well, your new test passes anyway.
16:05 jnthn colomon: Somehow doesn't even make it into the call?!
16:05 colomon jnthn: is it currying it?
16:05 colomon rakudo:  class X { method pick(Mu $a) { say "here"; }; }; X.new.pick(*)(Inf)
16:05 p6eval rakudo c5fdb1: OUTPUT«here␤»
16:06 jnthn ...
16:06 jnthn Yes. How on earth.
16:06 moritz_ magically modified singleton?
16:07 ejs joined #perl6
16:09 colomon I pushed the 1 ~~ * fixed.
16:09 colomon *fix
16:10 colomon without spectesting, but I'm pretty sure it makes things less broken rather than more.  :)
16:10 pugssvn r30903 | colomon++ | [t/spec] Unfudge moritz++'s new test.
16:10 moritz_ jnthn: might be related to RT #75302 (or might not)
16:10 jnthn ooooh!
16:11 jnthn ouch ouch ouch
16:11 diakopter pmurias: checking in your fix now
16:11 diakopter my fix, I mean
16:11 jnthn colomon: Think I know what it is.
16:11 jnthn lol
16:11 colomon \o/
16:12 dalek rakudo: ac1571f | (Solomon Foster)++ | src/Perl6/Actions.pm:
16:12 dalek rakudo: Don't whatever-curry infix:<~~>.
16:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​c1571fccdcc0fb95469a8cc3146086ff2d3e7e0
16:12 mberends moritz_: could you let hugme add contributors to http://github.com/mberends/fakedbi ?
16:13 moritz_ mberends: yes; you need to /msg or mail me your github API key for that
16:13 jnthn colomon: The PAST is...pretty telling :-)
16:13 mberends ok
16:13 jnthn colomon: Will fix it shortly.
16:14 moritz_ mberends: it changes when you change your github password
16:15 moritz_ mberends: and of course you need to tell me how should have meta committing access ("the usual crowd" works fine)
16:16 colomon jnthn: so, if one were to add a test for passing Whatever to a method, where would it go? S06-multi?  S06-advanced_subroutine_features?
16:16 moritz_ colomon: S12-something
16:16 mberends moritz_: yes, "the usual crowd" wfm
16:16 moritz_ method, not sub
16:16 colomon S12-methods...
16:17 jnthn colomon: It's not multi related
16:17 jnthn colomon: S12-methods/instance.t is often the all-sorts place
16:17 colomon jnthn: groovy
16:17 colomon jnthn++
16:18 jnthn .oO( too much curry...not as tasty as it first sounds )
16:19 * [Coke] wishes there was a local place to grab a curry.
16:19 hugme joined #perl6
16:20 moritz_ hugme: add moritz to fakedbi
16:20 * hugme hugs moritz. Welcome to fakedbi!
16:20 moritz_ mberends: looks good
16:20 mberends :-) ++moritz_
16:20 jnthn hugme: show fakedbi
16:20 hugme jnthn: the following people have power over 'fakedbi': PerlJam, TimToady, [particle], colomon, jnthn, masak, mberends, moritz_, pmichaud, sorear. URL: http://github.com/mberends/fakedbi/
16:21 moritz_ it's the hilight spammy feature :-)
16:22 [particle] i wonder if there's a way to make that less spammy...
16:22 jnthn rot13 the names ;-)
16:22 [Coke] add spaces.
16:22 moritz_ t/spec/S32-list/pick.rakudo .................................... Dubious, test returned 1 (wstat 256, 0x100)
16:22 moritz_ Failed 6/18 subtests  (less 2 skipped subtests: 10 okay)
16:22 [Coke] P-erlJam
16:22 moritz_ hey, what about non-printable characters?
16:23 [particle] yeah, let's include the bell
16:23 jnthn .u INVISIBLE SEPERATOR
16:23 phenny jnthn: Sorry, no results for 'INVISIBLE SEPERATOR'.
16:23 jnthn aww
16:23 moritz_ .u INVISIBLE
16:23 phenny U+2062 INVISIBLE TIMES (⁢)
16:23 [Coke] .u APL
16:23 phenny U+2374 APL FUNCTIONAL SYMBOL RHO (⍴)
16:23 diakopter .u INVISIBLE SEPARATOR
16:23 phenny U+2063 INVISIBLE SEPARATOR (⁣)
16:23 moritz_ jnthn: spelling halps :-)
16:23 [Coke] spelling FTW.
16:23 moritz_ rakudo: say "foo\c[INVISIBLE SEPARATOR]bar"
16:23 p6eval rakudo c5fdb1: OUTPUT«foo⁣bar␤»
16:24 jnthn lol
16:24 jnthn It's lol-compatible too ;-)
16:25 [Coke] ... I can still see it.
16:26 moritz_ [Coke]: how does it look like?
16:27 jnthn Here it sorta seems to put a box around the o...
16:27 ejs joined #perl6
16:28 * moritz_ is open to suggestions for other characters
16:28 hugme joined #perl6
16:29 moritz_ hugme: show fakedbi
16:29 hugme moritz_: the following people have power over 'fakedbi': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣berends, m⁣oritz_, p⁣michaud, s⁣orear. URL: http://github.com/mberends/fakedbi/
16:29 moritz_ did anybody get hilighted by that? (except mberends, who appears in the URL)
16:31 colomon moritz_: not I.  how does that work?
16:31 moritz_ colomon: \c[INVISIBLE SEPARATOR]
16:31 colomon oooooo
16:33 pugssvn r30904 | colomon++ | [t/spec] Add test for the mysterious method call currying.
16:36 patrickas joined #perl6
16:36 colomon afk # family all together now.  ;)
16:37 [particle] i did not get highlighted.  joy!
16:37 patrickas saba7o perlsixers :-)
16:37 moritz_ rakudo: my @x = <a b c d e>; say @x.map: *.succ
16:38 p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: 'perl6;Block;count' pc 549801 (src/gen/core.pir:90607)␤»
16:38 moritz_ rakudo: say (*.succ).params
16:38 p6eval rakudo c5fdb1: OUTPUT«Method 'params' not found for invocant of class 'Block'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:38 moritz_ rakudo: say (*.succ).signature.params
16:38 p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:40 jnthn moritz_: I didn't (intentionally) do anything with currying of those.
16:40 jnthn rakudo: say (*.foo).WHAT
16:40 p6eval rakudo c5fdb1: OUTPUT«Block()␤»
16:40 jnthn rakudo: say (*.foo).signature
16:40 p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:40 jnthn Though they evidently need fixing too.
16:41 cdarroch joined #perl6
16:41 cdarroch joined #perl6
16:43 * moritz_ takes a look at src/glue/dispatch.pir
16:44 moritz_ rakudo: say *.succ
16:45 p6eval rakudo ac1571: OUTPUT«!whatever_dispatch_helper␤»
16:45 moritz_ so is the problem that !whatevver_dispatch_helper doesn't have a signature?
16:45 jnthn moritz_: I suspect it's return a Parrot sub and not packaging it in a Perl 6 block
16:45 jnthn moritz_: Though maybe more sensible is to re-write whatever_dispatch_helper in Perl 6.
16:45 moritz_ jnthn: I'll give it a shot
16:46 jnthn Put it somewhere in src/glue/ if you do it.
16:46 jnthn And probably p6opaque.pmc needs an update.
16:46 moritz_ and I guess I have to rename it to something not starting with a !, right?
16:46 jnthn aye
16:50 ShaneC joined #perl6
16:50 ShaneC left #perl6
16:55 awwaiid is blizkost the current/only way to do perl5 from rakudo?
16:58 moritz_ you can also pipe CSV between the two processes, one perl 5, one Perl 6
16:59 jnthn Blizkost is probably the best bet.
16:59 jnthn It's the curernt suggested way to go, at least.
17:01 moritz_ jnthn: my local patch changes the Null PMC access to segmentation fault :-)
17:01 [Coke] that's not a good thing. :P
17:02 moritz_ I guess that maybe it doesn't find the Perl 6 sub
17:04 moritz_ #0  0x00007f00cafcd963 in Parrot_P6opaque_find_method () from dynext/perl6_group.so
17:04 jnthn moritz_: Did you update it?
17:04 moritz_ jnthn: yes
17:04 jnthn (P6opaque)?
17:04 jnthn Did you mark the sub "our" so it is put in the namespace too?
17:05 moritz_ yes
17:05 jnthn (P6opaque finds it that way)
17:05 jnthn Ah
17:05 jnthn OK, I guess it's maybe...a little less easy.
17:05 jnthn :S
17:06 lisppaste3 moritz_ pasted "failed attempt..." at http://paste.lisp.org/display/105735
17:07 [Coke] http://perlbuzz.com/2010/05/how​-to-shuffle-a-list-in-perl.html
17:08 jnthn moritz_: Hmm...now we can probably consider passing the name is as an argument rather than setting a property
17:09 jnthn I suspect the fail is somewhere related to that.
17:10 jnthn Instead of
17:10 jnthn VTABLE_setprop(interp, method, name_str, boxed_name);
17:11 jnthn Do like
17:11 jnthn PMC *call_sig = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
17:11 jnthn VTABLE_unshift_pmc(interp, call_sig, boxed_named);
17:11 jnthn Or something like that.
17:11 jnthn Then you get $name as the first argument to the Perl 6 sub
17:11 aesop joined #perl6
17:11 jnthn And it may be a bit happier.
17:12 jnthn (Parrot used to make it hard to do this, thus the properties approach, but now we can modify call sigs easily...)
17:14 * jnthn afk for a little bit
17:18 sorear TimToady: How hard would it be for STD to associate names in the AST with definition sites?
17:19 stephenlb joined #perl6
17:20 masonkramer joined #perl6
17:21 pugssvn r30905 | sorear++ | [viv] Translate parameterized role invocations
17:21 dalek csmeta: r317 | diakopter++ | trunk/Sprixel/ (5 files):
17:21 dalek csmeta: [perlesque] committing broken code; don't svnup to this revision
17:21 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=317
17:22 perlperson joined #perl6
17:22 perlperson who else here thinks we should rename Perl 6 to Perl++
17:23 moritz_ oh man, we've discussed this way too often already
17:23 pugssvn r30906 | sorear++ | [viv] ... and fix a regression on non-parameterized roles
17:23 perlperson because the Perl 5 folks are stuck noow
17:23 perlperson now
17:23 perlperson with like Perl 5.78.9
17:23 moritz_ they aren't any more stuck than before
17:24 moritz_ and renaming Perl 6 wouldn't make them unstuck
17:24 moritz_ because people would still associate the name "Perl 6" with what we call Perl 6 today
17:24 moritz_ bad luck.
17:24 perlperson and nobody will want to use Perl 5 because they will perceive that it is stale because of the crazy version numbers
17:24 * sorear sighs
17:24 moritz_ that's just crap
17:25 moritz_ emacs is also stuck at 2.$hugenumber of years
17:25 moritz_ or decades
17:25 perlperson yeah, and for that reason everyone uses vim now
17:25 moritz_ if version numbers are our biggest problem, we're really lucky
17:26 patrickas moritz_: why is emacs stuck ? do they have a similar story to perl6 ?
17:26 moritz_ patrickas: nope; I think they just figured that they don't want to change their major revision number anymore
17:27 * patrickas suggests perl 5.14 drops the 5. from the version number, this way they'll be ahead and we'll have to catchup :-)
17:28 moritz_ hey, Perl 5 still has numbers for about 490 stable releases left
17:28 Su-Shee moritz_: I've _just_ wanted to ask :)
17:29 moritz_ even if they increase the pace to two stable major releases per year, they won't run into any technical problems for a ridiculous long time
17:32 ruoso joined #perl6
17:33 pugssvn r30907 | sorear++ | [viv] Translate shorthand match variables
17:35 lisppaste3 moritz_ annotated #105735 "second attempt" at http://paste.lisp.org/display/105735#1
17:35 moritz_ still segfaults :(
17:36 moritz_ the pir::printerr is never reached
17:39 pmichaud fwiw, printerr is now a dynop
17:39 moritz_ I know, but it's loaded in Compiler.pir
17:41 pmichaud perlperson: the arguments you present have all been heard before.  I'm not saying they're wrong -- just that they seem to be insufficient to convince many more people to change.
17:41 moritz_ especially Perl 5 doesn't gain anything from renaming Perl 6
17:42 moritz_ the name will still taken in the people's minds
17:42 pmichaud moritz_: oh, that argument I might be able to agree with.  Perl 5 might gain something by renaming Perl 6 (but it wouldn't gain the ability to be "Perl 6")
17:42 moritz_ s/agree/argue/ ?
17:43 pmichaud but renaming Perl 6 to something else might make it clearer to uninitiated that Perl 5 isn't a dead-end.
17:44 pmichaud but just because a renaming might help Perl 5, doesn't automatically mean it would help Perl.
17:45 masonkramer joined #perl6
17:46 pmichaud I still think that Perl 5 ought to find a way to break out of the trap that any "next version" would have to be called "6".  One thing is clear (at this point), Perl 5 doesn't get to claim the entire mantle of the name "Perl" for itself forever.
17:47 moritz_ and neither will Perl 6
17:47 pmichaud correct.
17:47 pmichaud "Perl" is larger than either 5 or 6.
17:47 * moritz_ ponders making a book release
17:47 pmichaud rakudo:  say 'perl' gt 5|6
17:47 p6eval rakudo ac1571: OUTPUT«any(Bool::True)␤»
17:48 pmichaud see, rakudo agrees with me :-)
17:48 moritz_ :-)
17:48 pugssvn r30908 | sorear++ | [viv] Implement basic 'has' translation
17:49 pmichaud regardless, I think most of us working on Perl 6 basically gag at the name "Perl++"
17:49 pmichaud I know that I do.
17:49 moritz_ same here
17:50 pmichaud so someone that says "Perl 6 should change to '...'"  really needs to propose a name that most of us would like far better than the one we already have -- something much nicer than "Perl 6".  :-)
17:50 jnthn Me too.
17:50 pugssvn r30909 | sorear++ | [viv] Oops, that needs to be moose_has
17:51 pmichaud otherwise we're likely to say "no thank you, we like our current name better than '...'"
17:51 pmichaud (I'm guessing that perlperson is no longer actively monitoring the channel.  Oh well.)
17:52 patrickas not that it would matter but I think even if someone did find a "better" name, I think we got used to / got attached to the one we have so it wouldn't be easy,
17:52 envi_home2 joined #perl6
17:52 pmichaud patrickas: oh, I don't know about that.  I *really* like the name "Rakudo Perl"  :-)
17:52 pmichaud in many ways I like it better than "Perl 6"
17:52 pmichaud (I also like that I get to use both :-)
17:52 [particle]1 joined #perl6
17:53 patrickas ok then i'm probably wrong :-)
17:53 pmichaud by way of comparison, I also really like the names "Strawberry Perl" and "Vanilla Perl"
17:53 moritz_ not a matter of wrong and right
17:54 pmichaud for some reason, "Strawberry Perl" always strikes me as being a much friendlier and more mature thing than "Perl 5"
17:54 pmichaud it's like someone finally took this thing known as "Perl" and figured out how to market it to a wider audience.
17:54 patrickas well I mean obviously the name "Rakudo" came much later than perl6 and if people like it more than plain "perl 6" it means I was wrong in my theory. :-)
17:55 patrickas I have to admit that I LOVE theit webpage too ....
17:55 pmichaud right
17:55 patrickas their
17:55 pmichaud by way of analogy:   "Perl 5" and "Perl 6"   strike me as being like  "Buick 4" and "Buick 5"
17:56 pmichaud (or substitute whatever make/model scheme you want there)
17:56 SmokeMachine joined #perl6
17:57 pmichaud anyway, these are mostly the same-old arguments, I'm hoping someone brainstorms a new one someday.  :-)
17:58 Su-Shee I take everything as long as it doesn't get a nuisance like stallman and his "it's GNU/Linux!"
17:59 pmichaud yeah, I always felt that was a weak sort of argument
17:59 pugssvn r30910 | sorear++ | [viv] Handle twigilled variable assertions in regexes
17:59 Su-Shee sorear: are you finishing viv today? :)
17:59 pmichaud iiuc, the whole point of free software is that I can take your free code and use it to build my own bigger thing, as long as I make the code available.  There's nothing in the contract that says I have to market your name as well as mine.
18:01 Su-Shee pmichaud: I only know of exclusing clauses - like qmail. "take it, change it, do whatever you want, but don't call it qmail anymore"
18:01 pmichaud so what if Linux was built using a bunch of GNU tools?  That collection of GNU tools on their own in no way make them into "Linux"
18:01 Su-Shee excluding.
18:01 Su-Shee pmichaud: I'd say it's about recognition in case of GNU
18:02 pmichaud Su-Shee: yes, that's essentially what I'm saying too.  To me that just smacks of insecurity.
18:02 pmichaud or greed.
18:02 Su-Shee I agree. as if literally being installed everywhere isn't just enough.
18:04 mberends it's going for global attention domination
18:04 pmichaud anyway, I find the name "GNU/Linux" about as appetizing as names like "Java/OpenOffice", "PHP/PmWiki", "CPAN/any-significant-Perl-application", etc.
18:05 Su-Shee pmichaud: php/fi? ;)
18:05 pmichaud Su-Shee: :-)
18:05 moritz_ (FWIW only a very small part of OpenOffice is actually written in Java)
18:06 pmichaud anyway, just because I write a Perl application using huge parts of CPAN shouldn't imply that CPAN has to be in the name of my application.  No matter how successful it becomes.
18:06 pmichaud I think the same is true for Linux and GNU tools.
18:07 pmichaud *Perl application where significant portions come from CPAN
18:07 Su-Shee actually I'm hoping that the fuzz about p5/p6 stops some day when both are used on a regular base (or both went into blissfull oblivion ;)
18:08 pmichaud Su-Shee: I'm sure it will. Until then, I just tell people to read mst++'s excellent blog post about the whole issue.  :)
18:08 pmichaud off to lunch
18:08 * diakopter buries a time capsule so the next generation knows to do that.
18:08 Su-Shee oh, and what I wanted to mention in the first place before this discussion started again: more and more people asking on #perl for perl6. and many of them consider it as "should I learn python or perl 6?" which I find really interesting.
18:09 alester [Coke]: What made you post that perlbuzz link?
18:09 pmichaud ...perlbuzz link?
18:09 alester 1:02 ago
18:09 * pmichaud follows the buzz
18:10 pmichaud oh, you mean "pick"!  :-)
18:10 moritz_ the next one, probably
18:12 jnthn Ooh, it's stopped hailing.
18:12 * jnthn can go for dinner without getting drenched now :-)
18:13 jnthn bbiab
18:14 alester pmichaud: I still don't understand
18:15 pmichaud alester: "shuffle" is called "pick" in Perl 6 :-)
18:15 alester Why?
18:15 alester Or does pick get one at random?
18:15 alester shuffle actually reorders the list
18:15 pmichaud pick gets n at random
18:15 moritz_ rakudo: say <a b c d>.pick
18:15 p6eval rakudo ac1571: OUTPUT«d␤»
18:15 moritz_ rakudo: say <a b c d>.pick(*)
18:15 p6eval rakudo ac1571: OUTPUT«_block46␤»
18:15 pmichaud @list .= pick @list, *
18:15 moritz_ bah
18:16 moritz_ currently broken
18:16 * moritz_ curses
18:16 pmichaud alpha:  say <a b c d>.pick(*)
18:16 p6eval alpha 30e0ed: OUTPUT«dcab␤»
18:17 pmichaud alpha:  my @list = <a b c d>;   @list .= pick(*);   say @list;
18:17 p6eval alpha 30e0ed: OUTPUT«bdca␤»
18:17 pmichaud (I don't know the answer to your question of why Coke++ posted the perlbuzz link :-)
18:18 pmichaud pick also allows random selection with replacement
18:18 pmichaud alpha:  my @list = <a b c d>;  @list .= pick(15, :replace);  say @list;
18:18 p6eval alpha 30e0ed: OUTPUT«cbdcdcbcdbdbddb␤»
18:19 pmichaud and, of course,   .pick(*, :replace)  gives an infinite list of random selections :-)
18:20 pmichaud (at least it will once we get laziness implemented properly.)
18:20 moritz_ phenny: tell kraai that I've merged his 'book' branch with lots of typo corrections. Thank you very much!
18:20 phenny moritz_: I'll pass that on when kraai is around.
18:20 Su-Shee you're starting to sound like offering the menu to guests :)
18:20 sorear TimToady: Where in viv is the code which turns %X{'a'} into $X{'a'} ?
18:21 moritz_ rakudo: say <a b c>.pick(*, :replace).batch(10)
18:21 p6eval rakudo ac1571: OUTPUT«ccaacabbcb␤»
18:21 moritz_ pmichaud: works today, it seems
18:23 pmichaud moritz_++
18:23 pmichaud afk, lunch
18:23 dalek book: 70acc5b | (Matt Kraai)++ | src/operators.pod:
18:23 dalek book: Fix the "operator; x" index entry.
18:23 dalek book: review: http://github.com/perl6/book/commit/70​acc5b7d100e0a04734263bc4344cbc666a0ab8
18:23 moritz_ colomon++ more likely :-)
18:23 dalek joined #perl6
18:36 saaki doh
18:37 mdxi hyst got my first tshirt since coming back to my old job. thought some of you might appreciate the sentiment: http://mdxi.tumblr.com/post/641115787/yessssssssss
18:37 mdxi s/hyst/just/ # middle finger fencepost error
18:38 Woody2143 joined #perl6
18:39 moritz_ :-)
18:42 pugssvn r30911 | sorear++ | [viv] Common $OPT_log so Actions can use it
18:43 jrtayloriv joined #perl6
18:44 pugssvn r30912 | sorear++ | [viv] Fix duped output in --log
18:47 jrtayloriv I'm failing several of the spectests for the latest git revision -- http://pastebin.ca/1873454 -- don't know if this is useful ... just thought I'd let ya'll know.
18:48 SmokeMachine joined #perl6
19:14 [Coke] alester: I posted here because I figured someone would post the p6 oneliner that replaces it. good chance for marketing.
19:14 BrowserUk joined #perl6
19:15 alester well, good idea for perl101 at least
19:15 alester where I want to have p5 and p6 equivalents of everything
19:16 [Coke] perl101?
19:17 alester perl101.org
19:18 [Coke] yah, was trolling for the infobot that i forgot doesn't exist here. purl++
19:26 hercynium joined #perl6
19:36 moritz_ can I somehow trace vtable calls in parrot?
19:37 [Coke] sure, if it's written in PIR.
19:37 moritz_ it is
19:38 [Coke] if it's a C based vtable... you probably need callgrind.
19:38 [Coke] moritz_: then you can put a "trace 1" in the vtable to start, and trace 0 to end.
19:44 * sorear resorts to perl -d:Trace viv
19:49 mathw Evening
19:50 jnthn o/
19:50 * moritz_ has "fun" with vtables
19:50 * mathw has had "fun" with wooden knives at aikido
19:51 jnthn Are they actually any use for cutting stuff?
19:51 mathw also a few moments of "fun" with my face and the floor meeting each other with some rapidity
19:51 mathw nah
19:51 mathw but they poke
19:51 mathw and the knife disarms tend to be painful
19:52 jnthn Sounds like an evening of ouch.
19:53 mathw yeah but it's fun ouch
19:53 moritz_ and at the same time probably strangely satisfactory
19:53 mathw I got my blue/white belt today
19:53 jnthn Nice :-)
19:53 moritz_ congratulations
19:53 mathw Sensei said "well done, now you're nearly ready for the big boys' class where we get to kick your ass"
19:53 mathw this is also strangely satisfactory
19:54 moritz_ so, I have a set_pmc_keyed_int vtable that delegates to postcircumfix:<[ ]>
19:54 moritz_ and I call that on an array
19:54 jnthn *nod*
19:54 jnthn moritz_: A Perl 6 array?
19:54 moritz_ yes
19:55 moritz_ and I end up with an Any type object in $!rest (class Seq)
19:55 moritz_ and I don't even find the place where that $!rest attribute is ever set
19:55 jnthn moritz_: Well, probably just that
19:56 jnthn rakudo: class Foo { has $.rest; }; Foo.new.rest.say
19:56 jnthn ...
19:56 moritz_ jnthn: but if there's no location in the whole rakudo codebase that sets $!rest to a defined value... why do have it?
19:57 * jnthn is confused
19:57 jnthn "have an Any type object in $!rest"..."defined value"?
19:57 jnthn Or do you mean, nowhere ever sets $!rest to anything else?
19:57 moritz_ right
19:58 moritz_ I see that it's get set to null in some cases (in method !fill)
19:58 jnthn That may well be so - I'm not sure if our Seqs and Arrays are completely lazy yet
19:58 jnthn Parcel is
19:58 TimToady joined #perl6
19:59 moritz_ for now I'll work around it
19:59 moritz_ by testing for rest.'defined'()
19:59 jnthn moritz_: What's the actual problem, though?
19:59 moritz_ that it dies
19:59 moritz_ it calls rest.'get'()
19:59 jnthn Ah
20:00 moritz_ which it can't, if rest is Any
20:00 jnthn How is the array being created?
20:00 jnthn Array.new ?
20:00 moritz_ my $x = [3, 4]
20:00 moritz_ Q:PIR {
20:00 moritz_ $P0 = find_lex '$x' $P1 = box 'newstring' $P0[2] = $P1
20:00 moritz_ };
20:01 moritz_ now with my workaround that doesn't die anymore
20:01 moritz_ let's see if it brought us closer to match objects...
20:02 moritz_ ack shows that 'rest' (+ word boundaries) only appears in Seq.pir, apart from a comment
20:03 alester moritz_: You did that with "-w", right? :-)
20:03 moritz_ alester: yes
20:03 alester whew
20:07 pmichaud Seqs and Arrays are still terribly wrong
20:08 pmichaud moritz_: shall I see if I can get us real match objects?
20:08 moritz_ pmichaud: that would be awesome
20:09 moritz_ pmichaud: the mob5 branch works for named, non-quantified captures
20:09 pmichaud iiuc, the main problem with the existing match objects is that the arrays aren't really Rakudo arrays and the hashes aren't really Rakudo hashes?
20:09 moritz_ right
20:09 moritz_ and that $/.uc doesn't work
20:10 pmichaud that part is very fixable.
20:10 pmichaud let me update my rakudo repo and see what I can do quick-ish.
20:10 moritz_ so I thought :/
20:14 wasy_ joined #perl6
20:15 wasy_ left #perl6
20:18 sorear pmichaud: I'm having trouble with the (ideal, not Rakudo) semantics of Seq and lazy lists
20:18 sorear Under what conditions is map eager?
20:18 pmichaud map is never eager.
20:19 pmichaud map returns a lazy list, which in void context gets evaluated eagerly
20:19 sorear what is void context?
20:19 pmichaud okay, sink context.  :-)
20:19 sorear sink context confuses me
20:19 pmichaud basically, sink context is when the result value of a function/expression/statement is guaranteed not to be used
20:19 pmichaud for example
20:19 sorear my $list = $infinite-list
20:20 sorear the result value of the &infix:<=> is guaranteed not to be used
20:20 moritz_ rakudo: say my $x = 3
20:20 pmichaud sorear: oh, interesting point.
20:20 [Coke] buubot: seen audreyt?
20:20 buubot [Coke]: I don't think I've seen audreyt?.
20:20 jnthn Aye, but then the my isn't in sink context.
20:20 moritz_ uhm, where's p6eval?
20:20 [Coke] buubot: seen audreyt
20:20 buubot [Coke]: I don't think I've seen audreyt.
20:21 sorear jnthn: what context IS it in?
20:21 pmichaud jnthn: is the result of the assignment in sink context?
20:21 arnsholt Does that mean you can't do $a = $b = $c?
20:21 [Coke] who owns perlcabal.org ?
20:21 jnthn pmichaud: Hang on, which example? :-)
20:21 pmichaud jnthn: here:
20:21 pmichaud my $a;
20:21 pmichaud $a = $infinite-list
20:21 pmichaud is the assignment in void context?
20:22 [Coke] yay dig.
20:22 jnthn pmichaud: Yes. (more)
20:22 jnthn pmichaud: I think this is where the :pure annotations in STD help us not to do the wrong thing though.
20:22 moritz_ I think assignments and bindings need special-casing
20:22 * pmichaud looks
20:23 jnthn moritz_: It may just be that the :!pure is that special casing, though.
20:23 pmichaud what is :pure, ooc?
20:23 pmichaud hadn't seen that yet, it must be new-ish
20:23 pmichaud but yes, we could say that we don't do sink context on operators that are :!pure
20:24 jnthn I'm still trying to fit the full picture of it into my head. It's also related to our ability to say "useless use of foo in sink context" though.
20:24 sorear function calls are :!pure
20:24 sorear so what about sub { return $infinite-list; } sub()
20:25 jnthn sorear: Return value of the sub would then be in sink context.
20:25 pmichaud jnthn: except that invocations are apparently :!pure
20:25 jnthn Gotta be for sub foo { for 1..100000 { .say } }; foo(); # to do its thing
20:25 pmichaud and we just said that :!pure means no sink context
20:25 jnthn Ah. :-/
20:26 moritz_ I don't think function calls should be :!pure
20:26 pmichaud constant %methodcall      = (:dba('methodcall')      , :prec<y=>, :assoc<unary>, :uassoc<left>, :fiddly, :!pure);
20:26 jnthn yeah, just noticed that one.
20:26 jnthn Hmm.
20:26 jnthn OTOH, we don't want to go warning about useless use of function call. :-)
20:27 pmichaud I think it may need to be more than a binary proposition
20:27 pmichaud we have sink context warns
20:27 jnthn Yeah
20:27 pmichaud sink context doesn't warn
20:27 jnthn It's not always the same thing.
20:27 sorear jnthn: how is 'for' dependant on sink eagerness?
20:27 pmichaud and not sink context
20:27 pmichaud sorear: for maps to .map
20:27 pmichaud for @list { ... }   is equivalent to    list(@list).map({ ... })
20:28 jnthn sorear: What Pm said. And in the example I gave, it's the last thing in the block, so that means within the sub it's not in sink context.
20:28 pmichaud (as in *exactly* equivalent, according to the current thinking on #perl6)
20:28 jnthn To the point of "compiles down to a call to map" equivalent.
20:29 sorear this suprises me
20:29 sorear I would have expected for to run eagerly and return the last value from the block
20:29 jnthn It sinks in after a little bit.
20:29 pmichaud regardless,   the for statement is intended to be lazy in exactly the same way that .map is lazy
20:29 pmichaud no, return value from a for is the result of each invocation of the block -- i.e., it's a list
20:29 * sorear doesn't like sink context eagerness
20:29 pmichaud i.e., 'for' returns a list (the same that .map returns a list)
20:31 jnthn pmichaud: Anyways, the "it's not binary" thing sounds along the right lines.
20:31 jnthn pmichaud: Not sure if that implies we want two different flags though.
20:31 pmichaud could be a flag with multiple values
20:31 jnthn aye
20:31 jnthn or :sunk ;-)
20:31 pmichaud e.g., the same way that :assoc<...>  has multiple possibilities
20:31 jnthn = is already sunk
20:31 jnthn :-)
20:32 TimToady joined #perl6
20:32 Limbic_Region joined #perl6
20:32 tedv joined #perl6
20:32 pmichaud TimToady: we could use your reflections on http://irclog.perlgeek.de/​perl6/2010-05-28#i_2378871
20:34 tedv Where is the official spec for the pack/unpack functions?  The S32-Str entry on it is remarkably sparse on how the new token syntax works, and all that I found on google was some RFCs from 2000.
20:34 tedv Example: http://dev.perl.org/perl6/rfc/248.html
20:35 pmichaud tedv: pack/unpack functionality is still quite speculative at this point
20:35 p6eval joined #perl6
20:35 tedv that explains the lack of specifations and tests for it
20:35 Su-Shee cool. I can just think about it and it works? ;)
20:35 pmichaud tedv: a lot of it is in synopsis 9, but is listed as "compact structures"
20:35 jnthn I suspect masak++ may look at some of that as part of his GSoC grant.
20:36 tedv Is "compact structures" a superset of data packing, or a different name for it?
20:36 pmichaud see http://svn.pugscode.org/pugs/​docs/Perl6/Spec/S09-data.pod, search for "Compact structs"
20:38 tedv I see
20:38 tedv That's more of a high level "this is how things should work"
20:38 pmichaud right
20:38 diakopter joined #perl6
20:38 tedv basically you want full control over packing in memory
20:38 tedv which is important for optimization, obviously
20:38 pmichaud but essentially the idea is to move away from pack/unpack as function calls and instead you declare the exact structure you want
20:39 tedv would pack/unpack exist as ways to get data into/outof a compact struct though?
20:39 tedv it feels a bit artificial
20:39 pmichaud The packing serialization is performed by coercion to an appropriate
20:39 pmichaud buffer type.  The unpacking is performed by coercion of such a buffer
20:39 pmichaud type back to the type of the compact struct.
20:39 pmichaud (from S09)
20:40 tedv I guess sometimes you are doing quick-and-dirty programming and don't want to define a whole structure just to read something that's like... an int, two characters, and another int
20:40 * sorear is now confused by the dba/class handling
20:41 tedv Hmmm well I was looking for some helpful work to do over the weekend and was planning on spec tests for pack/unpack.  There are lots of cases which need defining and it doesn't require understanding much else of the system.
20:41 tedv but it seems like that's not an awesome choice anymore, since the spec isn't well defined.
20:42 tedv anyone have suggestions for other introductory tasks?
20:42 sorear tedv: you could try defining the spec
20:42 sorear not long ago, somebody wrote S32-temporal as an introductory task
20:42 tedv Hmmm that's probably a good idea
20:42 sorear (they bounced several drafts off perl6-compiler@)
20:43 tedv will take more than a weekend
20:43 tedv alright, I'll look at that.  I suppose I should sign up for perl6-compiler emails sometime too
20:43 moritz_ and perl6-language, if you like bikeshedding :-)
20:44 tedv I'm pretty pragmatic.  I'd just like to get things working
20:45 * pmichaud aliases perl6-language to perl6-bikeshed in his mail client.
20:45 moritz_ tedv: that's a helpful attitude
20:46 tedv only if it actually generates results!
20:46 tedv "liking to get things done" is not the same as "getting things done"
20:46 tedv not to be pedantic or anything. :)
20:46 moritz_ well, usually you can find areas where getting things done works pretty well
20:47 moritz_ like, writing tests
20:47 tedv yeah
20:47 pmurias joined #perl6
20:47 mberends tedv: I could use the help of a tester for FakeDBI
20:48 jnthn mberends: Is it ready for testing? ;-)
20:48 jnthn *excited look*
20:48 tedv What's FakeDBI?  section of code that pretends to operate as a real database?
20:48 mberends yes, the CRUD operations seem stable enough.
20:48 jnthn mberends++
20:48 diakopter weird; I guess i was offline for an hour
20:48 mberends http://github.com/mberends/fakedbi
20:49 mberends passingg over 80 P5 DBD::mysql tests locally now
20:50 wasy joined #perl6
20:50 jnthn \o/
20:50 wasy left #perl6
20:50 mberends tedv: it's real, just not the DBI v2 that's planned for Parrot
20:51 rv2733 joined #perl6
20:53 mberends just pushed another update
20:53 sorear pmichaud: What is the status of lexically aware rakudo repl?
20:56 pugssvn r30913 | sorear++ | [viv] Use STDERR more consistently for diagnostics
21:01 pugssvn r30914 | sorear++ | [viv] Correctly translate postcircumfixes on method calls
21:04 pmichaud sorear: I still want to refactor YOU_ARE_HERE a bit.  If you wanted to pick up from where I left off (and base it on what I have for NQP), I'd be glad to look at that.
21:06 pmichaud your idea of checking for an outer context and using that to decide what to do is exactly the direction I thought we should go in.  (and get rid of $*IN_EVAL)
21:06 pmichaud anyway, I'm not likely to get to it again until tonight or tomorrow sometime, so if you want to beat me to it, I think I'm likely to accept a patch from you :)
21:07 pugssvn r30915 | moritz++ | [t/spec] refudge a test for rakudo; one test fails, but it did not work before anyway
21:07 pugssvn r30916 | moritz++ | [joyofsix.org] skeleton for website
21:08 whiteknight joined #perl6
21:16 sorear I'm not likely to get back to it today either; I'm still on the trail of a different shiny thing
21:24 pmichaud sorear: either way, I expect one of us will get to it soonish.  Right now I'm focusing a bit on match objects for moritz, and then I'll either do repl, closures, or lists.
21:26 * moritz_ just brought thejoyofsix.org online, and has no idea what exactly to do with it
21:26 diakopter moritz_: when're you gonna do something with perlblog.org
21:27 moritz_ another domain I forgot *sigh*
21:30 moritz_ originally I wanted to set up something like blogs.perl.org
21:30 moritz_ but never came up with sufficient tuits/motivation
21:30 Su-Shee moritz_: it'll get some content when some content just wants to be put on that domain.
21:31 moritz_ content's not everything; we need a design too
21:37 * jnthn can only imagine how a "joy of six" logo design contest could end. :-)
21:37 pugssvn r30917 | sorear++ | [viv] Translate my ($x, $y); correctly
21:39 TimToady sorear: line 1117, if you didn't find it already
21:39 mathw jnthn: http://3.bp.blogspot.com/_YNb9r6Pzxks/SMjQ5kKe3​zI/AAAAAAAAA48/VfSlTY3SZDY/s400/number-six.jpg like that :)
21:41 pugssvn r30918 | moritz++ | [joyofsix] add camelia favicon
21:43 sorear TimToady: yes, it took me a while to figure out what Actions.pm was doing with dba
21:46 TimToady made it to San Diego with the quiz team.  fortunately they still seem to have the GuestWIFI set up here... :)
21:50 Guest5151 joined #perl6
21:53 sorear Where in San Diego?
21:54 TimToady Point Loma Nazarene University
21:54 TimToady which, oddly, is on Point Loma
21:55 sorear opposite side of the city from me, then
21:58 TimToady you can probably here the band from there though; I think it's playing at about 230db
21:58 TimToady I've been handing out free earplugs, knowing it would be that way :)
21:59 TimToady (it's not just a quiz meet...)
22:00 pragma_ I can here the band from hear.
22:01 TimToady I can't spell "hear" right when I'm wearing earplugs
22:02 dual joined #perl6
22:03 sorear not over a pair of 7 year old case fans I can't
22:03 sorear the gimme5 regex ~ implementation is confusing me
22:03 sorear it seems to only ever have worked because of a fortuitous accident involving the ratchet optimization
22:05 TimToady could well be
22:05 TimToady the backtracking code is not heavily stressed by STD
22:07 * diakopter winces
22:12 meppl joined #perl6
22:14 PenThrive joined #perl6
22:17 sorear TimToady: Will there be any pitfalls in rewriting ~ a b into [ :my $*GOAL = b; :lang(...); a [ b || failgoal ] ] ?
22:17 sorear a bracketed subexp with decls
22:19 TimToady I don't see a problem offhand, but then I've been blindsided by any number of don't-see-a-problems over the years... :)
22:20 sorear after gimme5 is dead I'm looking forward to doing a proper refactor of RE_ast
22:21 TimToady sure, I've always thought that that would be in conjunction with the refactor of the TRIE logic toward parallel NFA
22:21 TimToady the current string concat approach is just a prototype
22:22 sorear I've got a plan that I think will get us half the benefit
22:22 sorear but it'll need a full study of the existing code first
22:22 TimToady it was more important to me to see the patterns as they evolve than that they be fast
22:22 sorear yes
22:22 sorear debuggability is important
22:22 TimToady by the way, the new viv output is real purty
22:24 TimToady bbl &
22:25 awwaiid joined #perl6
22:25 patspam joined #perl6
22:31 pausenclown joined #perl6
22:37 pugssvn r30919 | sorear++ | [viv] Redesign and correctly implement regex ~
22:38 pausenclown rakudo: say "{ for 1, 2, 3 { print } }"
22:38 p6eval rakudo ac1571: OUTPUT«get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:38 pausenclown rakudo: std "{ for 1, 2, 3 { print } }"
22:38 p6eval rakudo ac1571: OUTPUT«get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:38 pausenclown std: say "{ for 1, 2, 3 { print } }"
22:38 p6eval std 30918: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'print'; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument at /tmp/3Yz5JY9oLp line 1:␤------> [32msay "{ for 1, 2, 3 { print[33m⏏[31m } }"[0m␤ok 00:01 115m␤»
22:39 pausenclown std: say "{ for 1, 2, 3 { .print } }"
22:39 p6eval std 30918: OUTPUT«ok 00:01 112m␤»
22:39 pausenclown rakudo: say "{ for 1, 2, 3 { .print } }"
22:39 M_o_C joined #perl6
22:39 p6eval rakudo ac1571: OUTPUT«123get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:39 pausenclown mmh. thats supposed to work, right?
22:41 sorear right
22:41 sorear er
22:41 sorear it sortof works
22:41 sorear for returns a lazy list
22:41 sorear this lazy list gets stringified in the {}
22:41 sorear and that's not quite implemented
22:42 pausenclown what about
22:42 Targhan joined #perl6
22:43 pausenclown ah no, it cant be nested.
22:44 sorear passed 10K lines accepted
22:44 pugssvn r30920 | sorear++ | [viv] Our output requires features 5.010
22:45 jferrero joined #perl6
22:47 sorear Something I don't quite follow in the Perl 6 treatment of contexts - why isn't my $a = @a; @a = $a;  a no-op?
22:52 pausenclown check this out:
22:52 pausenclown rakudo: my $a = 1; my @a = 2, 3; say $a.perl; say @a.perl; $a = @a; say $a.perl; @a = $a; say @a.perl
22:52 p6eval rakudo ac1571: OUTPUT«1␤[2, 3]␤[2, 3]␤maximum recursion depth exceeded␤current instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:97)␤»
22:52 sorear Not helpful.
22:53 sorear I don't want .perl, I want a rules laywer.
22:53 pausenclown i expected the fourth value to be [[2, 3]]
22:54 pausenclown basically u get bitten by 'magic' (de)?referencing.
22:54 jnthn sorear: Because putting an array in scalar context and putting a scalar in list context are not exactly the opposite of each other.
22:54 pausenclown like when u say $a = 1, 2, 3 and $a holds an array.
22:54 jnthn (Becase the $ says "don't flatten me")
22:54 sorear jnthn: I don't understand contexts very well
22:55 sorear jnthn: What is scalar context?
22:55 jnthn OK, it's called "item context" now really. :-)
22:55 sorear jnthn: if $foo and @foo are the same value, what do they do differently when referecnce?d
22:55 jnthn $foo has a a "I don't flatten" flag on it.
22:55 jnthn Or @foo has a "I flatten" flag
22:55 sorear I have my implementor hat on.  Simplistic explanations like that are fine for programmers
22:55 jnthn Forget exactly which way around we have it in Rakudo at the moemnt.
22:56 sorear hrm
22:56 jnthn I think the first.
22:56 sorear And what does that flag affect?
22:56 jnthn Yes, we *really* do have a flag on the container saying whether it's going to flatten or not.
22:56 masak joined #perl6
22:56 jnthn When something is put in list context (usually by calling .list on it), then it affects whether it flattens or not.
22:56 jnthn lawlitsmasak
22:56 sorear I thought that .list was called on the value, not the container
22:58 jnthn No, captures are "symbolic" in a sense.
22:58 pmichaud @foo has a flatten flag on it
22:58 pausenclown yeah, and why does @a = $a; above end up in a deep recursion?
22:58 pmichaud antyhing without the flatten flag doesn't flatten
22:58 masak ahoy, #perl6!
22:58 jnthn Otherwise is rw wouldn't work.
22:58 jnthn pmichaud: Heh. We did have it the other way around once, no? :-)
22:59 jnthn masak: dobry vecer :-)
22:59 * pausenclown gives masak a cookie
22:59 pmichaud jnthn: yes
22:59 jnthn pmichaud: Heh. I can't keep track. :-)
22:59 * masak has finally ported GGE to Rakudo master
22:59 jnthn pmichaud: Though given you're refactoring all of that again soon, maybe I'll wait a bit to catch up. ;-)
22:59 jnthn masak: Yay!
22:59 pmichaud .list always "flattens"
22:59 _kaare left #perl6
22:59 jnthn masak: Was it epic pain?
22:59 pmichaud note that list context is not .list
22:59 pmichaud list context is &list()
23:00 TimToady it's supposed to be .flat
23:00 masak jnthn: it was more work than I would have guessed.
23:00 Psyche^ joined #perl6
23:00 pmichaud okay, .flat (I'm still out of date with latest spec changes)
23:00 pmichaud items with the flatten flag will flatten in list context
23:00 * jnthn didn't know about .flat either :-/
23:00 pmichaud items without that flag will not
23:00 pmichaud the difference is with something like
23:00 jnthn Is .slice for non-flattening list context?
23:00 jnthn er, slice context
23:00 jnthn :)
23:01 sorear So, when I say @foo, I'm actually talking about the container?
23:01 jnthn Or what's that one called?
23:01 jnthn sorear: Yes
23:01 pmichaud my @a = <a b c>;  my $a := @a;   say (@a, $a).elems
23:01 sorear And value extraction only occurs when the container is put in item context?
23:01 pmichaud even though $a and @a are the same object, @a is flattening while $a is not
23:01 jnthn masak: Main difficulties being...?
23:01 pmichaud (so the result of the above would be 4)
23:02 sorear pmichaud: That doesn't make sense
23:02 pmichaud sorear: that's the spec.
23:02 masak jnthn: I'll probably blog about it soonish. but the main difficulty was that it was a large set of small changes in a big codebase.
23:02 pmichaud sorear: I didn't make that part of the spec -- I've been trying to cope with it for years.
23:02 jnthn masak: ah, ok
23:02 jnthn masak: near-death by a hundred cuts, as such.
23:02 sorear pmichaud: I'm not complaining.  I'm confused.
23:03 pmichaud flattening versus non-flattening behavior is determined by the container, not by the value.
23:03 sorear I want to understand what I'm implementing
23:03 masak jnthn: and it takes a while to run the test suite, which slows down even small refactors.
23:03 jnthn masak: Aye.
23:03 sorear pmichaud: but after $a := @a, the containers are the same, no?, so how can they have different flattening behaviors?
23:03 pmichaud I'm getting spectest fails in master... are these known?
23:04 pmichaud sorear: no, the containers are not the same
23:04 pmichaud $a and @a are still different
23:04 pmichaud they're separate containers referring to the same value
23:04 sorear I thought := was container assignment
23:04 pmichaud it's binding
23:05 jnthn pmichaud: In pick.t?
23:05 pmichaud that's one of them
23:05 pmichaud also in advent2000-day19
23:05 sorear so, after $a := $b, the containers are bound, but remain distinct as objects?
23:05 pmichaud and 99problems-21-to-30
23:05 pmichaud sorear: yes.  It's the same with subroutine parameter binding, too.
23:05 sorear pmichaud: so this is what ObjectRef is for *lightbulb*
23:05 pmichaud my $a = 4;  sub xyz($b) { say $b;  $a = 5;  say $b )
23:06 sorear bound containers...
23:06 pmichaud it's also why binding isn't a simple "store_lex ..."
23:06 pmichaud in my example above,  $b is readonly, while $a isn't
23:06 pmichaud yet they still both refer to the same value
23:06 jnthn pmichaud: Very possibly the same underlying thing.
23:07 pmichaud jnthn: I continue to work under the assumption that := will ultimately work the same as parameter binding.
23:07 pmichaud oh, sorry, wrong topic :)
23:07 pmichaud you're saying all of the failures are likely the same underlying problem
23:07 jnthn pmichaud: I was commenting on the test...yes. :-)
23:08 pmichaud okay, I guess it's a known failure though.   I started working on match object changes for moritz++ and said "huh?  how did my changes cause these failures...?"
23:09 jnthn pmichaud: I have what I can only fathom is a bizzare compiler quirk with the (very old) MS VC++ on my desktop. Since all works great on my laptop, but I get a bunch of test fails on my desktop even with clean checkout of everything.
23:09 jnthn Turns out I fail pick.t here even before my changes that broke it for everyone else.
23:09 pmichaud okay.
23:09 sorear It All Makes Sense Now.
23:09 * jnthn is currently attempting to build under a newer compiler. ;-)
23:09 sorear Now excuse me while I implement :=.
23:09 pmichaud :-)
23:10 pmichaud := is likely going to require a bit more than simply setting up objectrefs, though -- I suspect it impacts autovivify
23:10 pmichaud but a good first cut might be to simply establish the objectrefs :-)
23:10 pmichaud and then see what breaks
23:10 jnthn pmichaud: Aye, that's very possible.
23:10 jnthn pmichaud: Having our own binder makes this easily playwithable. :-)
23:10 pmichaud jnthn: correct.
23:11 pmichaud sorear: you'll also run across places where we have Perl6Scalar as well as ObjectRef
23:11 pmichaud those are left over from a time when we were trying to distinguish flattening by the type of reference
23:12 pmichaud turns out that it's not quite that simple, and having a flag property ends up being the way to go.  So I don't know if we still need a separate Perl6Scalar type, but haven't bothered to try to clean it up to find out until we get list laziness and flattening all worked out in the first place.
23:12 pugssvn r30921 | sorear++ | [viv] Implement flattening (very crude)
23:12 sorear Perl6Scalar has a huge difference from ObjectRef, AIUI
23:12 sorear Perl6Scalar is mutable
23:12 sorear a "rw" ObjectRef still propagates = to its inner
23:13 sorear a "rw" Perl6Scalar changes its inner on =
23:13 pmichaud oh, that may indeed be the difference now
23:13 pmichaud I haven't looked at that code since February.
23:13 pmichaud so many of the details are confused in my brane
23:13 sorear How did that detail use to work?
23:13 pmichaud I honestly don't remember (more)
23:14 pmichaud there have been at least four separate implementations in Rakudo of container, list, and flattening semantics
23:14 pmichaud each implementation has resulted in a change to the spec, invalidating the implementation and requiring another redesign
23:14 sorear wow, jumped all the way ahead to 43%
23:14 jnthn The check was an isa of some kind.
23:14 pmichaud in February I was in the middle of the latest set of dealing with issues when medical issues intervened
23:14 jnthn I think Perl6Scalar implied "do not flatten"
23:14 jnthn iirc.
23:14 pmichaud yes, at one point Perl6Scalar implied do not flatten
23:15 sorear also, ng
23:15 pmichaud that's no longer the case
23:15 pmichaud it's the flattening flag on the outermost reference that controls
23:15 pmichaud thus:  my $a = <a b c>;   my @a := $a;
23:16 pmichaud and:   my @a = <a b c>;  my $a := @a;
23:16 pmichaud both know how to flatten properly
23:16 pmichaud (@a always flattens, $a never flattens)
23:17 pugssvn r30922 | sorear++ | [viv] Translate 'note'
23:18 pmichaud jnthn: .pick(*) seems to be what is failing here.
23:18 jnthn pmichaud: Yup
23:18 jnthn pmichaud: The currier is...a little overeager.
23:19 jnthn pmichaud: Turns out methods calls show up in EXPR with a label POSTFIX too.
23:19 jnthn I didn't expect that. :-)
23:19 pmichaud well, of course :-)
23:19 jnthn :-P
23:19 pmichaud they *are* postfixish
23:19 TimToady but the * isn't what they're a postfix of
23:19 TimToady unless you say *.pick
23:20 jnthn TimToady: Aye, it's doing something very wrong. :-)
23:20 BrowserUk joined #perl6
23:20 pmichaud jnthn: which part is doing the wrong thing?  ;-)
23:20 pmichaud is it the curry-code, or the expr code?
23:20 jnthn pmichaud: The curry code.
23:20 jnthn pmichaud: Just a bad assumption. :-)
23:20 pmichaud okay, good, I'm off the hook :-)
23:20 sorear hmm
23:20 pugssvn r30923 | sorear++ | [viv] Translate True and False
23:20 sorear I'm getting lots of 'TOP redefined' errors'
23:21 sorear but.. TOP is only defined once
23:21 sorear s/TOP/$method/
23:21 diakopter backtracking... making it redefine things it sees again?
23:21 sorear no
23:21 sorear Perl5 errors
23:21 sorear Subroutine xblock redefined at STD.viv.pm5 line 28719.
23:22 diakopter hm
23:22 pmichaud jnthn: yes, whatever_curry is too eager.  :-)
23:22 diakopter someday I'll understand all the container/reference discussions
23:22 diakopter maybe I'm just scared to admit my tentative understanding could be correct.
23:23 diakopter or otherwise in denial.
23:23 jnthn pmichaud: I figure checking in the 2-arg case that we have a call rather than a callmethod node may well do it.
23:23 jnthn pmichaud: Alternatively, I could check that .name starts with postfix, infix or prefix.
23:23 pmichaud jnthn: that feels like a wrong test also
23:23 jnthn Rather than checking the LABEL
23:23 pmichaud I'd like to see whatever_curry have an argument that says how many things to check for currying
23:23 pmichaud in the case of prefix and postfix, the limit should be 1
23:23 pmichaud in the case of binary infix, the limit would be 2
23:24 pmichaud i.e., prefix and postfix should only ever check the first child for whatever-ness
23:24 jnthn pmichaud: Ah, and then EXPR decides what to pass there?
23:24 jnthn That'd work.
23:24 jnthn OK, I'll do it that way.
23:24 pmichaud that just feels more likely if we ever do currying on :assoc<list>
23:24 pmichaud and we know that in the case of prefix/postfix we only want to curry $0
23:25 jnthn *nod*
23:25 pmichaud (because they're unary)
23:25 jnthn hmm, I wonder if...
23:25 jnthn rakudo: my $x = *.[1]; my @y = 1,2,3; say $x(@y)
23:25 pmichaud it's also probably important to do it that way for when we ultimately start handling adverbs on operators
23:25 p6eval rakudo ac1571: OUTPUT«2␤»
23:25 sorear oh
23:25 sorear I see
23:26 sorear STD.pmc from gimme5 is being loaded into the same interpreter
23:26 jnthn pmichaud: I've tried to work out how on earth those are parsed...and failed.
23:26 pmichaud jnthn: yes, it's on my list, I know
23:26 pmichaud I'm glad my schedule is finally clearing up so I can work on those :)
23:26 jnthn pmichaud: Sure, I was more curious than planning to do it.
23:26 jnthn oh yay, it looks like using a later compiler is going to make my test run *much* cleaner.
23:27 pmichaud afk for a bit
23:27 PZt joined #perl6
23:28 * sorear passes 30K lines parsed
23:28 diakopter how many to go?
23:30 diakopter 30K lines of what?  STD.pm6 isn't that long
23:30 sorear 30K/65K lines of sandbox/STD.pmc have made it through perl5
23:31 sorear STD.pm6 itself is already fully translated, but some of the translations are wrong to the point of not parsing
23:31 sorear (incidentally, viv's output is considerably smaller than gimme5's)
23:32 ShaneC1 joined #perl6
23:32 ShaneC1 left #perl6
23:38 pugssvn r30924 | sorear++ | [viv] Fix phase error in submatch handling inside argument lists
23:59 * jnthn spectests fix for $embarassing_bug

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs