Camelia, the Perl 6 bug

IRC log for #perl6, 2010-05-11

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 * sorear is trying to implement := in the general case
00:00 sorear unfortunately, this means eliminating infix:<:=>
00:00 sorear since := on variables has to be a parser special
00:00 sorear so I want to understand the sig-binding stuff so I can port it into the parser
00:01 sorear but this helps.
00:03 jnthn It doesn't have to be parser specific, I don't think.
00:04 jnthn er, parser special
00:05 sorear it actually should be a macro
00:05 sorear ;)
00:06 sorear what's the correct way to use perl6 --target=parse?
00:07 jnthn There's an incorrect way? :-)
00:07 jnthn I usually just perl6 --target=parse and then type in the thing I want the parse tree for into the REPL
00:07 sorear It's acting buggy, and IIRC it's a known bug
00:07 sorear yeah, that gave me get_pmc_keyed() not implemented in class 'Undef'
00:07 jnthn Oh, ouch. :-(
00:08 sorear not a known bug ?
00:08 jnthn That means that something we're parsing somewhere is too reliant on the actions.
00:08 jnthn Probably
00:08 jnthn Well, --target=parse is a delicate balancing act.
00:08 jnthn (of keeping enough in grammar.pm)
00:09 jnthn It's intended to work, but sometimes things go awry.
00:09 sorear I thought --target=parse ran the actions, but dumped $/ instead of $/.ast
00:09 jnthn No
00:09 jnthn It doesn't run the actions
00:09 jnthn Thus why it's a little "fun" to get right :-)
00:09 jnthn --target=past runs the actions and dumps the PAST.
00:09 jnthn I don't know of a way to run the actions but then dump the parse tree.
00:10 * sorear currently is trying to find out how my ($x, $y) := (1, 2); say $y   parses
00:10 jnthn Does --target=parse work generally
00:10 jnthn ?
00:10 jnthn oh
00:10 jnthn It *may* be that bindcheck (or whatever it's called - the reducecheck thingy for :=) wants to look at the AST
00:10 jnthn And doesn't handle the case where there isn't one.
00:11 sorear looking at the PIR, I see that a Signature is being constructed and passed to infix:<:=>
00:11 lue o hai!
00:11 sorear I want to see the grammar/action code responsible for parsing my ($x, $y) as a Signature constructore
00:12 sorear hmm.
00:12 sorear rakudo: my %*COMPILING; say pir::typeof__SP(Perl6::Compiler.compile("2+2", target=>"past"))
00:12 p6eval rakudo 3d3893: OUTPUT«PAST;Block␤»
00:13 sorear er, no, got that backward
00:13 lue how's := going?
00:14 jnthn sorear: It's parsed that way because declarator parses a <signature> there
00:14 jnthn The reducecheck for bind is what decides to actually use the produced signature of the LHS rather than to just use the list
00:15 jnthn (Since it may be instead a list assignment.)
00:15 * lue wanders what the japanese for "way of the camel" is.
00:15 jnthn rakudado, iirc
00:17 * lue tries WWWJDIC again, it didn't say that last time :/
00:18 lue I get different types of camels...
00:19 sorear How did I not know before today that reducechecks exist?
00:21 * diakopter seems to recall sorear mentioning reducecheck previously
00:22 sorear I was going to implement a different but related feature that I happened to choose the same name for
00:22 sorear *very closely related
00:22 diakopter heh :)
00:23 sorear closely related enough that neither I nor TimToady became confused as a result
00:23 diakopter hah.
00:23 diakopter TimToady handles ambiguity well.
00:24 yinyin joined #perl6
00:25 lue Yes it does.
00:30 * sorear wanders off to read the source of EXPR
00:30 Tene I read that as "reducechucks" at first.
00:31 sorear I look forward to the day we kill PIR.
00:32 * diakopter no comment
00:32 lue me too :)
00:33 lue more specificially, all of rakudo's .pir files.
00:33 lue (PMC death is a good first step maybe, if you want to kill PIR)
00:34 sorear PMCs and classes are going to be unified eventually
00:34 sorear so e.g. Int will just become a built-in class with methods written in C
00:35 lue .oO(it'd be nice to kill C dependency as well [more])
00:35 sorear I wonder if Perl6 rules are strictly more powerful than LALR(1)
00:35 lue .oO(then rakudo would be an autonomous anarcho-syndicalist commun— compiler)
00:35 sorear I suspect not, but finding the corner case that proves this could be hard
00:39 diakopter [Coke]: thanks for adding my blog
00:40 TimToady strictly speaking, Perl 6 grammars can *include* any bottom-up parser including LALR(n) if they choose, just as STD incorporates an operator precedence parser.  :)
00:41 sorear *include*?
00:41 [Coke] diakopter: np.
00:42 TimToady a grammar is just a set of methods
00:42 TimToady well, maybe not "just" :)
00:42 sorear So I can write a subclass of Grammar with an extra parsing engine.  I see.
00:42 sorear TimToady: Can I get your input on the aggregate binding thing?
00:43 TimToady not if it involves PIR :)
00:43 sorear No, no
00:43 sorear This is a semantic issue, the kind you could spectest
00:43 sorear What part of the aggregate API is used for bindings?
00:44 sorear $my-object[1] := $foo;  # What method or multisub do I need to implement for this?
00:45 lue TimToady: what's japanese for "way of the camel"? It's bugging me.
00:45 TimToady you need to put $my-object[1] into a context that its array knows it should return a bvalue (using ruoso++'s terms)
00:46 jnthn (bvalue) Ah, yes, that's the word I was trying to recall when I was thinking that infix:<:=> as a normal multi going away felt wrong.
00:46 sorear TimToady: How do I spell the bvalue form of postcircumfix:<[ ]> ?
00:46 TimToady where 'bvalue' indicates one *less* level of indirection than lvalue, basically
00:47 sorear one *less* level of indirection than a lvalue is an rvalue, no?
00:47 TimToady no, that's one more level
00:47 TimToady er, wait
00:47 TimToady too many negatives
00:47 TimToady yes
00:47 spinclad lue: you've heard that already, rakuda-do
00:48 TimToady I think he wants 駱駝道
00:49 sorear so, bvalues are being added to Perl6.  How do I spell the bvalue equivalent to "is rw" in signatures and subs?
00:49 lue alright. Just have no idea where the dash goes. I remember a while ago you saying something about that.
00:50 TimToady it's not clear to me that there is a Perl 6 notation for that, other than :=
00:50 spinclad raku/da/do
00:50 * spinclad guesses
00:51 TimToady but if there were, it would be something the current :exists modifier on subscripts
00:51 sorear TimToady: If there's no Perl 6 notation for returning bvalues, how am I to implement an array-like class with bindable elements?
00:51 TimToady or :delete, either of which are about the higher level of indirection
00:52 sorear so perhaps postcircumfix:<[ ]>($my-object, 1, :bind($foo)) ?
00:52 TimToady by having methods that return pointers instead of pointees
00:53 spinclad how do those adverbs attach to the right level of indirection?
00:53 TimToady we haven't defined a user-visible pointer type
00:54 TimToady spinclad: that's getting dangerously close to the circularity saw
00:54 TimToady the location of which is something Perl 6 does not mandate
00:54 sorear So... what would the method which makes $foo[1] := $bar   work, look like?
00:54 sorear Or is it not possible to implement in user code?
00:54 TimToady Perl 6 DOESN'T CARE
00:54 TimToady officially
00:55 jnthn sorear: It's guts. At least, for now.
00:55 TimToady until you make me change my mind :)
00:55 jnthn If multiple implementations all end up doing something that can easy enough be unified, otoh...
00:55 sorear Oh, I was going on the "It should be possible to implement user classes which behave like any standard type" premise
00:55 jnthn ...then there's probably a case for spec.
00:56 sorear but I can see this being a post-6.0 thing
00:56 TimToady sure, but that's for the implementors to negotiate, not me
00:56 * sorear goes off and implements the easiest solution
00:58 * TimToady goes off to stir-fry on behalf of someone too short to do so comfortably...
00:58 lue that's not fair... 駱駝道 doesn't show up in any kanji dictionary except WWWJDIC, and they don't provide stroke order! :(
00:59 spinclad one aspect of the circularity saw is using it to remove its own guards (so you can do the fine/hard work) without slicing off your own fingers
01:01 * spinclad wanders off dinner-ward
01:02 lue Why doesn't the recursive saw exist? :)
01:02 spinclad the circularity saw is _definitively_ recursive!
01:02 Tene lue: because it can only cut itself, and already did.
01:03 * spinclad likes Tene's answer
01:05 plobsing joined #perl6
01:05 lue Implement := to bind functions to implement := to bind functions... (wonder how accurate that is...)
01:14 diakopter but what if the circularity saw is a bandsaw that thinks it's a jigsaw aspiring to be a circular saw?
01:15 lue .oO(Banjo-Tooie...)
01:15 lue Circle is bandsaw thinks is jigsaw wants circular.
01:15 diakopter "I want to rotate, but I think I'm reciprocating [but I'm actually revolving)"
01:16 lue diakopter: if that's the case, then it has fulfilled its dream.
01:16 diakopter (]
01:16 lue [b,g)
01:17 lue y = (x+3)/5 if x+b = g-2
01:21 * lue gets the urge to implement this in P6 --> http://netninja.com/files/robotfindskitten/
01:24 lue afk
01:27 * jnthn digs into sorting through his 1200+ Iceland photos
01:29 lisppaste3 joined #perl6
01:31 colomon pictures!
01:31 colomon :)
01:42 jonrafkind joined #perl6
01:54 diakopter plobsing: I replied while you were gone; say something so phenny tells you the message
01:58 jonrafkind joined #perl6
02:16 plobsing something
02:16 phenny plobsing: 10 May 14:36Z <diakopter> tell plobsing actually yes, I did consider tail-recursive invocation of the frames, since supposedly that's enforced much more consistently on .NET4 and recent Mono, but I haven't gotten there yet.  It would actually be a very simple change.
02:16 plobsing cool
02:44 elmex joined #perl6
02:45 sorear rakudo: proto sub foo($) { say "TOP" }; multi sub foo(Mu $) { say "Mu" }; multi sub foo(Any $) { say "Any" }; foo(pir::new__PS('StringBuilder'));
02:45 p6eval rakudo 3d3893: OUTPUT«Mu␤»
02:45 sorear rakudo: proto sub foo($) { say "TOP" }; multi sub foo(Mu $) { say "Mu" }; multi sub foo(Any $) { say "Any" }; foo(pir::new__PS('ResizablePMCArray'));
02:45 p6eval rakudo 3d3893: OUTPUT«Mu␤»
02:53 fda314925 joined #perl6
02:58 agentzh joined #perl6
03:01 plobsing joined #perl6
03:01 mj41_ joined #perl6
03:04 oskie joined #perl6
03:04 aindilis joined #perl6
03:06 gabiruh joined #perl6
03:07 bbkr joined #perl6
03:07 TimToady joined #perl6
03:10 athomason joined #perl6
03:14 diakopter wheh
03:14 sorear whey!
03:15 szabgab joined #perl6
03:15 s1n joined #perl6
03:18 bbkr joined #perl6
03:20 literal joined #perl6
03:25 gfx joined #perl6
03:26 szabgab joined #perl6
03:29 snarkyboojum joined #perl6
03:32 diakopter I got blogsome again  http://diakopter.blogspot.com/2010/05/wh​ats-implemented-in-perlesque-whats.html
03:34 sorear diakopter: you forgot to label it "perl6", so it's not showing on planet
03:34 diakopter ooops
03:34 diakopter thanks
03:35 diakopter fixed :D
03:35 lue how do you label it perl6? My blog's not on planet,  but still.
03:35 diakopter on blogspot there's a field below the rich text editor area
03:36 lue what if you don't use blogspot?
03:36 lue is it just a tag?
03:37 diakopter yes; a tag
03:38 * lue is having a hard time finding stroke order for these characters: 駱駝道 and it's annoying
03:38 * lue , if it gets critical, may have to use (*_gulp_*) a book
04:06 JimmyZ joined #perl6
04:13 meppl joined #perl6
04:19 snarkyboojum joined #perl6
04:32 lue *cough* gitorious is a lot shinier than github. It's also worth noting KDE went (or will go) github->gitorious
04:34 snarkyboojum diakopter++ # another exciting blog post! :)
04:35 snarkyboojum lue: gitorious is shinier? how so? I find it clunkier..
04:35 snarkyboojum .
04:36 lue the front page was shiny.
04:36 snarkyboojum haha
04:36 lue I meant it literally.
04:36 snarkyboojum oops - wrong window
04:36 snarkyboojum :)
04:37 lue And when I signed up for github a while ago, I was a little put off by the payment plans to get more features. (Orange-)Red flags go off in my head.
04:39 lue rakudo: say abs(-3)
04:39 p6eval rakudo 3d3893: OUTPUT«3␤»
04:40 lue rakudo: multi sub circumfix:<| |>($a){abs($a);}; say |-5|; my $b = 32; say |$b|;
04:40 p6eval rakudo 3d3893: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 46202121␤Confused at line 11, near "say |-5|; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
04:40 lue ō.o
04:41 JimmyZ o
04:41 phenny JimmyZ: 10 May 16:47Z <TimToady> tell JimmyZ your eval at http://irclog.perlgeek.de/​perl6/2010-05-09#i_2311370 doesn't work because {...} interpolates into double quotes before the eval ever runs
04:42 * JimmyZ wonders whether it's a bug or not. and how he could make it working.
04:45 snarkyboojum complaining about "Could not find sub 28_1273553089.93674" definitely looks bug-ish, if only error message bug-ish
04:45 snarkyboojum :)
04:46 lue the magic of generated PIR code.
04:46 snarkyboojum and "Null PMC access in get_string()" definitely looks bug-ish
04:46 snarkyboojum :)
04:46 snarkyboojum rakudo: eval "use MONKEY_TYPING; class Foo{ }; augment class Foo { my method Str() { 'hi'; } } ; say ~Foo"
04:46 p6eval rakudo 3d3893: OUTPUT«Null PMC access in get_string()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
04:47 lue I've always wondered; what kind of access is null?
04:47 lue must be very cold-hearted :)
04:48 am0c joined #perl6
04:49 * lue feels that his prolonged exposure to Perl 6 has forever infected him to compusively include t/ folders. He seems them everywhere
04:50 TimToady rakudo: eval 'use MONKEY_TYPING; class Foo{ }; augment class Foo { my method Str() { "hi"; } } ; say ~Foo'
04:50 p6eval rakudo 3d3893: OUTPUT«Foo()␤»
04:50 TimToady note the difference if you swap the single and double quotes
04:50 TimToady JimmyZ: ^^
04:50 JimmyZ rakudo:  my $a = time; (1,1, * + *, ... *).batch(28).perl.say; say time-$a;
04:50 p6eval rakudo 3d3893: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 18062 (src/builtins/Junction.pir:481)␤»
04:51 JimmyZ rakudo:  my $a = time; (1,1, * + * ... *).batch(28).perl.say; say time-$a;
04:51 p6eval rakudo 3d3893: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811)␤0.248106002807617␤»
04:52 TimToady it is not a bug for curlies to interpolate into double quotes, but it is a bug for you to expect them not to.  :)
04:52 JimmyZ rakudo: eval 'use MONKEY_TYPING; class Foo{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo'
04:52 p6eval rakudo 3d3893: OUTPUT«Foo()␤»
04:52 lue .oO(PEBKAC!)
04:54 JimmyZ I think it's a bug.
04:54 JimmyZ rakudo: $a = Foo; eval 'use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo'
04:54 p6eval rakudo 3d3893: OUTPUT«Symbol '$a' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
04:54 JimmyZ rakudo: $a = Foo; eval "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo"
04:54 p6eval rakudo 3d3893: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Symbol '$a' not predeclared in <anonymous>␤current instr.:
04:54 p6eval ..'perl…
04:55 JimmyZ rakudo: my $a = Foo; my $b = "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo"; eval $b
04:55 p6eval rakudo 3d3893: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Could not find sub &Foo␤current instr.: '_block14' pc 29
04:55 p6eval ..(EVAL_1…
04:55 TimToady you can't use double quotes like that
04:55 JimmyZ rakudo: my $a = Foo; my $b = "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo"; eval $b
04:55 p6eval rakudo 3d3893: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Could not find sub &Foo␤current instr.: '_block14' pc 29
04:55 p6eval ..(EVAL_1…
04:55 TimToady you can't use double quotes like that
04:56 JimmyZ rakudo: my $a = Foo; my $b = 'use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { "hi" } } ; say ~Foo'; eval $b
04:56 p6eval rakudo 3d3893: OUTPUT«Could not find sub &Foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
04:56 JimmyZ rakudo: my $a = 'Foo'; my $b = 'use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { "hi" } } ; say ~Foo'; eval $b
04:56 p6eval rakudo 3d3893:  ( no output )
04:56 lue something seems suspicious about putting that long line of code in double quotes, I don't what....
04:57 JimmyZ TimToady: why does {...} interpolate into double quotes?
04:57 TimToady curlies interpolate in double quotes
04:57 TimToady because that's what curlies do in Perl 6
04:57 lue afk (compiling)
04:58 JimmyZ rakudo: eval 'use MONKEY_TYPING; class Foo" "; augment class Foo { method Str() { "hi"; } } ; say ~Foo'
04:58 p6eval rakudo 3d3893:  ( no output )
04:58 sorear joined #perl6
05:03 JimmyZ hmm, the error message is not as expecting
05:05 TimToady rakudo: eval 'use MONKEY_TYPING; class Foo" "; augment class Foo { method Str() { "hi"; } } ; say ~Foo'; say $!
05:05 p6eval rakudo 3d3893: OUTPUT«Malformed package declaration at line 1, near "\" \"; augme"␤»
05:05 snarkyboojum rakudo: sub foo() { say "hi" }; say "foo()";
05:05 p6eval rakudo 3d3893: OUTPUT«foo()␤»
05:05 snarkyboojum rakudo: sub foo() { say "hi" }; "{foo()}";
05:05 p6eval rakudo 3d3893: OUTPUT«hi␤»
05:06 TimToady rakudo: "blah blah blah blah blah { method Str() { 'hi'; } } blah blah blah blah"
05:06 p6eval rakudo 3d3893: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤»
05:06 TimToady that message?
05:07 TimToady or the one I printed out with 'say $!'?
05:08 broquaint joined #perl6
05:10 sorear Why is the error generated twise?
05:10 snarkyboojum rakudo: my $t = Q<use MONKEY_TYPING; class Foo { }; augment class Foo { method Str() { "Foobar!" } }; say ~Foo.new>; eval $t
05:10 p6eval rakudo 3d3893: OUTPUT«Foobar!␤»
05:19 iblechbot joined #perl6
05:19 TiMBuS joined #perl6
05:24 diakopter <open discussion/thoughts about a p6 runtime>
05:26 diakopter my initial idea to making the p6 runtime on the CLR is to start out by doing absolutely no compilation/optimization, and reifying literally everything the specs, er, reify.
05:26 diakopter without exception
05:27 diakopter that is, not limiting what's visible to the user to the things spec'd
05:27 diakopter but making the entire runtime transparent
05:27 diakopter so everything runs at the same level
05:28 diakopter no encapsulation, no stratification
05:28 diakopter and once it's "working" from there (as a definitional interpreter of sorts), begin to look for optimization opportunities.
05:29 diakopter this strategy is, per my understanding, similar to the one taken by google's chrome.
05:30 diakopter STD will JIT the code to perlesque, which perlesque will JIT to CIL, which the CLR will JIT to machine code, all "inline".
05:31 diakopter each compilation unit.
05:31 diakopter er
05:32 diakopter scratch that first step; it's not really necessary; STD will JIT the p6 code to CIL via runsharp (not via perlesque via runsharp), sorry, I forgot.
05:33 diakopter my rationale for making everything run at the same level is that there are no barriers, nothing to prevent global visibility, and things can be JFDId much more straightforward,ly
05:34 diakopter then the barriers can be erected and optimizations/compilations put in place
05:35 diakopter e.g. there will be a CLR class for every VAST class in viv.
05:36 diakopter and the ones viv generates based on STD.
05:36 * diakopter drowned out by a symphony of crickets; it must be cricket mating season and the perfect temperature.
05:36 diakopter er, cacophony, not symphony
05:45 diakopter </open discussion/thoughts about a p6 runtime, from me at least>
05:45 bakedb__ joined #perl6
05:46 Su-Shee joined #perl6
06:01 snarkyboojum joined #perl6
06:05 quester_ joined #perl6
06:05 sorear diakopter: I'm not going to work on any other Perl6 implementation until R* is out
06:11 JimmyZ TimToady: Useless declaration of has-scoped Method in a module
06:14 japhb joined #perl6
06:16 uniejo joined #perl6
06:16 viklund joined #perl6
06:23 * snarkyboojum bought the dragon book yesterday :)
06:25 * sorear plays with git rebase -i for the first time
06:32 snarkyboojum FWIW, it got a laugh out of me in the Preface, so that's a good sign.. I think
06:45 [mark] joined #perl6
06:50 jhuni joined #perl6
06:59 sorear rakudo: my ($x, $y) := (1, 2)
06:59 p6eval rakudo 3d3893:  ( no output )
06:59 sorear hmm.  I think I broke i
07:00 sorear ah, turning off $*AUTOPRINT unbreaks it
07:02 JimmyZ joined #perl6
07:05 molaf joined #perl6
07:10 dalek rakudo: 53fda34 | sorear++ |  (3 files):
07:10 dalek rakudo: Enable support for --stagestats in Rakudo
07:10 dalek rakudo: This consists of a bugfix analogous to 9d4c8a9 in NQP-rx, and changes the
07:10 dalek rakudo: Makefile system to pass --stagestats to Rakudo when compiling the setting
07:10 dalek rakudo: and Test.pm in --makefile-timing builds.
07:10 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
07:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​3fda34299c377c7dbe229715fcf5723537af8d9
07:11 sorear that was fast
07:14 moritz_ I try to give patch authors feedback very fast
07:14 moritz_ but I can only do that for fairly trivial patches :(
07:15 * JimmyZ has a fairly trivial patche in RT
07:15 simcop2387 joined #perl6
07:15 * sorear finds that many patch queues have an average wait time greater than the code churn half-life, making them useless
07:15 * sorear is very pleased now
07:16 dalek rakudo: efbcce6 | plobsing++ | src/pmc/p6opaque.pmc:
07:16 dalek rakudo: De-dup item_str in p6opaque.pmc
07:16 dalek rakudo: Eliminates build warnings
07:16 dalek rakudo: Closes RT #74996
07:16 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
07:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​fbcce6e8ae07d0fbf4faad88ea5874989226a63
07:16 \\shade\\ joined #perl6
07:16 sorear What's the big secret on rt.perl.org?  While trying to find my ticket, I got a lot of "No permission to view ticket" stuff
07:16 moritz_ the spam queue hides tickets from everybody
07:17 broquaint joined #perl6
07:17 sorear aha.
07:19 quester_ left #perl6
07:21 moritz_ JimmyZ: your patch in RT #74434 adds a BOM to src/builtins/Str.pir that makes the build fail
07:21 JimmyZ it's not my patch
07:22 aesop joined #perl6
07:22 moritz_ you're not 'jimmy' in RT?
07:22 moritz_ sorry then
07:22 JimmyZ it's rurban
07:22 JimmyZ yes, I'm jimmy
07:22 * moritz_ confuses stuff
07:23 moritz_ sorry, I gave the wrong ticket number
07:23 JimmyZ the RT #74434 is not mime.
07:23 moritz_ RT #74942
07:24 JimmyZ moritz_: http://github.com/rakudo/rakudo/commit/3​0ef6fac01afdc51e5ff269ad13442665d7b8024
07:24 moritz_ is this the same as your patch?
07:25 JimmyZ yep
07:25 eternaleye (backlogging) moritz_: that new programming jargon link is wonderful. I particularly like Pokémon Exception Handling (When you've gotta catch 'em all!)
07:26 JimmyZ moritz_: it's in branch
07:27 moritz_ it doesn't seem to be merged
07:27 moritz_ otherwise I would have gotten a conflict
07:27 JimmyZ moritz_: it was ignored.
07:28 Bzek joined #perl6
07:28 JimmyZ 30ef6fac01afdc51e5ff269ad13442665d7b8024 is the only worth one for merge
07:31 moritz_ uh, what branch is this?
07:31 JimmyZ immutable_strings
07:31 * moritz_ thought that was merged
07:32 JimmyZ nope
07:32 moritz_ otherwise we couldn't have built
07:32 eternaleye (still backlogging) moritz_: (masak and lichtkind aren't here) re augment and supersede, I can see at least supersede being useful on multi methods, not just roles, classes, and grammars. It would allow you to replace a multi rather than creating an ambiguous dispatch.
07:32 JimmyZ actually, jnthn didn't know there is a new replace op.
07:43 sorear moritz_: I'm deliberately not ticketing my macro attempts, as they're very prototypey and I expect to completely redo them at some point after I have full operator overloading working
07:58 moritz_ eternaleye: since multi method dispatch works by looking in most derived classes first, you'll never get an ambiguous dispatch between multis of a parent and a child class
07:58 moritz_ sorear: but please ticket your lexical-persistence-in-REPL patch(es)
08:00 sorear moritz_: I already have
08:01 sorear I think
08:01 moritz_ 17 minutes ago :-)
08:01 moritz_ no wonder I didn't see it earlier
08:06 eternaleye moritz_: Whoops, I meant multi sub. Sorry.
08:06 moritz_ std: superseed sub foo () { }
08:06 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'superseed' used at line 1␤Check failed␤FAILED 00:01 113m␤»
08:06 moritz_ std: superseede sub foo () { }
08:06 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'superseede' used at line 1␤Check failed␤FAILED 00:01 111m␤»
08:06 moritz_ std: supersede sub foo () { }
08:06 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't supersede symbol &foo without MONKEY_TYPING at /tmp/Y6xx23pZHi line 1:␤------> [32msupersede sub foo[33m⏏[31m () { }[0m␤Potential difficulties:␤  Can't supersede symbol &foo because it doesn't exist at /tmp/Y6xx23pZHi line 1:␤------>
08:06 p6eval ..[32msu…
08:06 * moritz_ can't type
08:07 moritz_ std: use MONKEY_TYPING; supersede sub foo () { }
08:07 p6eval std 30614: OUTPUT«ok 00:01 110m ./lib/MONKEY_TYPING.pm6␤Potential difficulties:␤  Can't supersede symbol &foo because it doesn't exist at /tmp/lnOGAgimum line 1:␤------> [32muse MONKEY_TYPING; supersede sub foo[33m⏏[31m () { }[0m␤ok 00:01 111m␤»
08:07 moritz_ std: sub foo() { use MONKEY_TYPING; supersede sub foo () { }
08:07 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse block at /tmp/Tsw9JYajdo line 1:␤------> [32msub foo() {[33m⏏[31m use MONKEY_TYPING; supersede sub foo ()[0m␤Couldn't find final '}'; gave up at /tmp/Tsw9JYajdo line 1 (EOF):␤------> [32m MONKEY_TYPING; supersede sub foo () {
08:07 p6eval ..}[3…
08:07 moritz_ std: sub foo() ; use MONKEY_TYPING; supersede sub foo () { }
08:07 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/005pednk1I line 1:␤------> [32msub foo() [33m⏏[31m; use MONKEY_TYPING; supersede sub foo ([0m␤    expecting any of:␤  block␤  routine_def␤        trait␤Parse failed␤FAILED 00:01 111m␤»
08:07 moritz_ std: sub foo() {}; use MONKEY_TYPING; supersede sub foo () { }
08:07 p6eval std 30614: OUTPUT«ok 00:01 111m␤»
08:07 eternaleye std: multi sub foo( Int $i ) { say $i; }; use MONKEY_TYPING; supersede sub foo( Int $i ) { say -$i; }; foo( 3 );
08:07 p6eval std 30614: OUTPUT«ok 00:01 113m␤»
08:08 eternaleye rakudo: multi sub foo( Int $i ) { say $i; }; use MONKEY_TYPING; supersede sub foo( Int $i ) { say -$i; }; foo( 3 );
08:08 p6eval rakudo 3d3893: OUTPUT«"supersede" not yet implemented at line 11, near " sub foo( "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
08:08 eternaleye :(
08:10 moritz_ sorear: the lexical persistence patch is suprisingly non-intrusive :-)
08:20 dalek rakudo: d47ce57 | jimmy++ | src/builtins/Str.pir:
08:20 dalek rakudo: use replace instead of substr
08:20 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
08:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​47ce57681cc88eb4cb094683fffd46edf65819c
08:20 dalek rakudo: 75b3762 | rurban++ | build/Makefile.in:
08:20 dalek rakudo: Install man page
08:20 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
08:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​5b3762c6448e327fbfccd40685cf3159844cb2a
08:21 JimmyZ_ joined #perl6
08:23 * snarkyboojum git pulls
08:27 IllvilJa joined #perl6
08:27 IllvilJa o/
08:28 snarkyboojum \o
08:32 snarkyboojum oooh - shiny new man pages :)
08:33 snarkyboojum it'd be be nice to specify the --target stages in the man page perhaps? seeing how they're not really documented anywhere that I know of
08:34 moritz_ snarkyboojum: sure
08:34 moritz_ snarkyboojum: a patch that lists the stages you know of would already be a great start
08:35 snarkyboojum moritz_: sure thing
08:37 dakkar joined #perl6
08:41 snarkyboojum moritz_: I'm not sure I'm qualified to explain each --target option though :)
08:43 moritz_ snarkyboojum: listing them is already a good start
08:43 moritz_ parse = a representation of the parse tree
08:43 moritz_ PAST = an intermediate, internal format
08:43 moritz_ POST = another intermediate, internal format, a bit more low level than PAST
08:43 moritz_ PIR = parrot-level assembler
08:43 moritz_ PBC = byte code
08:44 moritz_ (not sure if all of them are supported)
08:44 snarkyboojum these are the targets I know about
08:44 snarkyboojum parse past post pir evalpmc
08:45 Su-Shee POPCORN = perl object packer calculating object's Rat number. ;)
08:45 * moritz_ doesn't know anything about evalpmc
08:45 moritz_ :-)
08:45 snarkyboojum I've never used it, just cleaned it from HLLCompiler.pir a while back
08:45 snarkyboojum perhaps not worth documenting
08:45 snarkyboojum s/cleaned/gleaned/
08:50 snarkyboojum moritz_: http://gist.github.com/397080
08:51 JimmyZ_ joined #perl6
08:51 pnu joined #perl6
08:56 moritz_ snarkyboojum: thanks, will apply soon
08:56 moritz_ (doing other things right now)
08:56 snarkyboojum moritz_: o/
08:58 iblechbot joined #perl6
08:59 moritz_ http://nopaste.snit.ch/20525 next "This week's contribution to Perl 6" challenge
08:59 moritz_ feedback welcome
08:59 agentzh joined #perl6
09:00 snarkyboojum moritz_: raising the bar on the last challenge :)
09:00 masak joined #perl6
09:00 snarkyboojum I like
09:00 masak oh hai
09:00 snarkyboojum masak: o/
09:01 IllvilJa masak: hai
09:01 moritz_ Applying: Added valid --target stages
09:01 moritz_ fatal: corrupt patch at line 10
09:01 snarkyboojum :O
09:01 moritz_ :( somehow my git doesn't like snarkyboojum's patch
09:01 snarkyboojum :(
09:03 snarkyboojum moritz_: I generated it via 'git format-patch HEAD^'
09:03 snarkyboojum moritz_: have had success with that in the past
09:03 moritz_ snarkyboojum: so I thought... but my git is older than yours
09:03 snarkyboojum moritz_: oic :(
09:03 moritz_ snarkyboojum: I guess it trips over the dots on empty lines
09:04 moritz_ I'm used to seeing blanks there
09:04 moritz_ masak: http://nopaste.snit.ch/20525 review/suggestions welcome
09:04 snarkyboojum moritz_: oh right - you obviously know more about patches than I do :)
09:05 snarkyboojum seems quite a blunder to create patch backwards incompatibility between git versions
09:05 moritz_ aye
09:05 moritz_ I've now applied it by hand :/
09:05 snarkyboojum moritz_: o/ :)
09:07 masak moritz_: 'However it uses' is not the same as 'However, it uses'.
09:07 * moritz_ adds a comma
09:09 masak moritz_: 'sub directory' -> 'subdirectory'
09:09 * moritz_ deletes a blank
09:09 moritz_ masak++
09:09 masak the rest looks good. moritz_++
09:10 moritz_ http://perlgeek.de/blog-en/perl-6/​contribute-now-fix-up-a-test.html
09:11 dalek rakudo: 8236cef | snarkyboojum++ | docs/running.pod:
09:11 dalek rakudo: Document valid --target= command line options
09:11 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
09:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​236ceff2ad09588c60ff0b562006ffb345f01ab
09:13 snarkyboojum masak: when you have time - what obvious/newbie thing am I doing to break my tardis tests :) http://gist.github.com/397105
09:17 am0c joined #perl6
09:18 masak http://ostatic.com/blog/guest-post-w​hy-perl-isnt-going-away-soon-or-ever
09:18 masak seems like a well-written article.
09:18 masak I love to see the 'sibling' meme take root ♥
09:21 snarkyboojum "but the language is alive, well, and still holding the Internet together" :)
09:28 xinming joined #perl6
09:34 * moritz_ submitted the link to reddit/programming
09:35 moritz_ szabgab++ already submitted it perl/, but the perl people already know it's alive :-)
09:35 szabgab yeah, it should be under programming so we can get all the FUD from the snake people :-)
09:37 szabgab moritz_, do you take moritz++ or moritz_++ ?
09:37 moritz_ szabgab: yes :-)
09:37 moritz_ I don't care much either way
09:38 moritz_ moritz_ collects my IRC karam, moritz my commit karma
09:38 masak as in Perl 6, the underscore indicates that something is 'internal' :)
09:39 moritz_ no, it indicates that the name without the _ is already taken :*
09:39 moritz_ s/\*/(/
09:39 masak :)
09:44 rurban joined #perl6
09:47 rurban joined #perl6
09:49 snarkyboojum the comments on http://blogs.perl.org/users/leon_timmerm​ans/2010/04/why-perl-6-is-different.html seem to be FUDish :(
09:50 * snarkyboojum clones masak to set the comment record straight :)
09:51 * moritz_ wonders if that was a deep or a shallow clone
09:52 masak seems not to have worked on this end :/
09:53 masak 'You know, that's the one thing that bothers me about Perl 6. Like Lisp, it's too flexible.' -- that's not FUD, that's praise. :)
09:53 masak they might as well have said "Perl 6 is too awesome!"
09:54 * moritz_ doesn't understand why use of macros should make Perl knowledge any less portable than a classic (OO or procedural) API
09:56 masak snarkyboojum: I didn't think the comments were so bad, overall. there were a few honest questions about how Perl 6 will do homoiconicity, and a few comments questioned the premise of the article. I don't see that as FUD.
09:57 snarkyboojum masak: maybe I'm introducing FUD about so-called FUDish comments
09:58 snarkyboojum masak: I guess what I was reaching for was "It'd be nice for an educated Perl 6 voice to be present" or something along those lines
09:58 snarkyboojum if that doesn't sound too FUDish :)
09:59 * moritz_ feels not educated when it comes to macros
09:59 masak well, I agree with many of the hesitations and criticisms :)
09:59 masak and sorear's recent experiments have, I believe, corroborated that macros are underspecified.
10:00 masak er, I mean "sorear++'s"
10:00 moritz_ which is no surprise at all
10:01 * snarkyboojum is glad is classified his statement with an -ish suffix :P
10:02 * moritz_ agreesish
10:02 snarkyboojum :P
10:03 masak another comment in favour of the recent proto/multi spec change: I've often (wrongly) assumed that I'd still retain the Mu.new method when only adding multi .new methods in my classes. that wasn't so, but with the new spec (and if Mu.new is a multi method), it is.
10:10 drbean joined #perl6
10:14 masak sushi &
10:26 fridim joined #perl6
10:28 DG joined #perl6
10:32 dalek rakudo: 9f1395c | moritz++ | src/pmc/p6lowlevelsig.pmc:
10:32 dalek rakudo: fix build with g++, patch courtesy of mikehh
10:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​f1395c3602639b28da8da5270818d34a3f2f3fd
10:33 kaare joined #perl6
10:36 Arroz_ joined #perl6
10:52 Su-Shee ah. that posting.
10:54 Su-Shee ah that two postings. (which are both wrong imho.. ;)
11:05 snarkyboojum Su-Shee: which one?
11:07 colomon moritz_++ for getting those patches committed.
11:08 snarkyboojum colomon: o/
11:08 Su-Shee snarkyboojum: the one of "perl 6 is the new lisp" and "perl isn't going away soon"
11:08 colomon \o
11:08 snarkyboojum Su-Shee: ah
11:09 iblechbot joined #perl6
11:14 gpw joined #perl6
11:37 araujo joined #perl6
11:40 pmurias joined #perl6
11:46 sundar joined #perl6
11:49 takadonet morning all
11:49 sundar takadonet: \o
11:50 takadonet sundar: how's your project going >
11:50 takadonet ?
11:50 sundar why does this week's challenge explicitly ask people to commit directly? is the idea to examine the patch before giving the commit bit? j
11:50 sundar takadonet: which project?
11:50 takadonet sundar: any of them? :)
11:54 moritz_ sundar: the pugs repo has always encouraged people to commit directly
11:54 colomon sundar: I think the goal (as much as anything) is to get new people up and running with making changes to the spectests.
11:54 moritz_ it has worked pretty fine so far
11:54 sundar takadonet: :) have recently been hibernating since I'm shifting places.. been especially quiet on the Perl 6 side, been days since I joined the channel even.
11:55 moritz_ and in my experience people ask for review before committing anyway, if they are not sure
11:55 snarkyboojum moritz_: what is the saying - forgiveness rather than permission?
11:55 moritz_ right
11:55 colomon and version control makes it easy enough to undo
11:55 sundar moritz_: oh ok.. but in this case, if there are multiple people taking up the challenge, and miss to check commit logs..
11:56 moritz_ sundar: if they change the same file, they'll get a merge error from svn
11:56 moritz_ sundar: and if the 'svn up' to the newest version, they *see* that something has changed
11:58 sundar moritz_: Ok.. guess I've become too used to catering to the lowest denominator. :)
11:59 snarkyboojum sundar: don't let me slow you down :P
12:04 envi^home joined #perl6
12:08 bluescreen joined #perl6
12:19 ruoso joined #perl6
12:24 moritz_ in ruby, you can do  4.times BLOCK
12:24 moritz_ somehow I always felt it is wrong to let numbers do control flow
12:25 moritz_ is there any formalized version of this complaint?
12:25 masak in Python, you can do '-'.join(list) :)
12:26 moritz_ it feels wrong, but I have a hard time putting it into a solid argument
12:26 masak Separation of Concerns, perhaps?
12:27 moritz_ that was my first thought too
12:27 masak things should Do One Thing, and Do It Well.
12:28 am0c joined #perl6
12:37 rgrau_ joined #perl6
12:44 SmokeMachine joined #perl6
12:56 snarkyboojum moritz_: isn't it that you expect BLOCK, the subject, to be first e.g. BLOCK 4 times c.f. 4 times BLOCK?
12:57 moritz_ snarkyboojum: it's not about linguistics (or syntax)
12:57 moritz_ snarkyboojum: it's just that I don't feel repetition of a block is an appropriate method for class Int
12:58 masak right. Int doing control flow is the weird bit.
12:58 masak unless, I guess, it's a Church numeral in some deeper sense. then I guess it's quite natural. :)
12:59 moritz_ it feels a bit like "my number '4' knows how to wash my car... 4 times"
13:00 masak well, it knows how to &wash-my-car, at least.
13:00 snarkyboojum or take masak's example -  '-'.join(list) - it feels more natural to say "list joined with -" c.f. "not - joined over list" - list being the subject again
13:00 masak strictly speaking, 4.say is also a bit suspect.
13:00 moritz_ aye
13:01 moritz_ you might have noticed that I don't use the method form of .say very often in my examples
13:04 pmurias 4.say very suspicious to me
13:04 phenny pmurias: 10 May 22:13Z <diakopter> tell pmurias utf32?  surprised you ran into that   it might be a bug in my UTF32String.cs
13:04 masak it's an interesting question whether the convenience gained by having .say 'outweighs' the breach in SoC.
13:04 scottmilt joined #perl6
13:04 snarkyboojum for the same reason no? 4 isn't the subject
13:04 masak right.
13:04 masak 4 really has nothing to do with $*OUT
13:04 masak and yet it can print to it.
13:04 snarkyboojum but it's say that's printing...
13:05 moritz_ actually I only use the method form of say when I say .say (ie operate on $_)
13:05 masak snarkyboojum: and it's a method on Int (well, Any, really).
13:05 moritz_ or with an explicit IO object
13:05 moritz_ Mu
13:05 snarkyboojum true, but say is the verb
13:05 moritz_ rakudo: say (1|2).say
13:06 p6eval rakudo 9f1395: OUTPUT«any(1, 2)␤1␤»
13:06 snarkyboojum rakudo: say say ''
13:06 moritz_ must be Mu for that to work
13:06 p6eval rakudo 9f1395: OUTPUT«␤1␤»
13:06 masak ah.
13:06 pmurias weren't all the convenience methods supposed to go to a special class
13:06 pmurias ?
13:06 masak snarkyboojum: sure, but subroutines are 'global' verbs, whereas methods are verbs limited to certain classes of objects.
13:07 moritz_ pmurias: right, too Cool
13:07 snarkyboojum are global verbs limited to a global context? :)
13:07 moritz_ pmurias: but not all of them...
13:07 pmurias which ones stayed in Mu?
13:07 moritz_ pmurias: for example the List convenience methods stay in Any, as per TimToady
13:07 moritz_ and print/say stay in Mu
13:08 pmurias can't we remove the .say/.print?
13:08 snarkyboojum there's a difference between 4.say and 4.times blah
13:08 pmurias 4.say is worse
13:08 * moritz_ would move them to Cool
13:08 pmurias perl6: $*OUT.say("hi")
13:09 p6eval pugs, rakudo 9f1395: OUTPUT«hi␤»
13:09 p6eval ..elf 30614: OUTPUT«␤»
13:09 moritz_ snarkyboojum: boths violate SoC
13:09 snarkyboojum SoC?
13:09 moritz_ Separation of Concerns
13:09 masak http://en.wikipedia.org/wi​ki/Separation_of_concerns
13:09 snarkyboojum oh right
13:09 snarkyboojum yay acronyms :)
13:09 moritz_ or Summer of Code, for that matter
13:09 * masak was just about to say that :P
13:09 pmurias moritz_: because Mu.say/Mu.print colide with IO.say/IO.print
13:09 mathw or System on a chip
13:10 masak mathw! \o/
13:10 mathw hi masak
13:10 snarkyboojum yeah, yay acronyms
13:10 mathw I thought I'd take a break from fuming at press coverage of the election results
13:10 masak mathw: when are we going to sit down and do a lot of cool hacking on Form.pm?
13:10 pmurias moritz_: and don't offer any real benefits to make up for that
13:10 mathw and talk to clever people instead
13:10 mathw masak: hmm. After my concerts are done.
13:10 masak mathw: deal.
13:10 masak when is that?
13:10 moritz_ pmurias: the only reasons in convenience, since the sub form doesn't default to $_ anymore
13:10 mathw last one's on the 21st
13:11 pmurias is say $_ that bad?
13:11 moritz_ yes :-)
13:11 masak there should be a convenient way to say 'run this sub on $_'...
13:11 moritz_ say _
13:11 masak not convenient enough :)
13:11 mathw ,say
13:12 moritz_ ugh
13:12 masak yes, well...
13:12 masak that's not really a sub, is it? :P
13:12 mathw say!
13:12 pmurias do you really want to introduce a special form to save 2 characters?
13:12 moritz_ 3
13:12 masak mathw: now we're talking :)
13:12 masak say! for @values;
13:12 moritz_ :-)
13:12 moritz_ don't discount the extra space
13:13 moritz_ because say$_ is ugly
13:13 pmurias yes
13:13 masak std: say$_
13:13 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/E5VDwpGzyl line 1:␤------> [32msay[33m⏏[31m$_[0m␤    expecting any of:␤  POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier
13:13 p6eval ..loop␤Other potential difficulti…
13:13 moritz_ ... and is disallowed :-)
13:13 ruoso joined #perl6
13:13 pmurias moritz_: re .say being convenient it also breaks when $_ is an IO object
13:13 moritz_ right
13:13 masak that's the corner case.
13:14 snarkyboojum std: std *
13:14 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'std' used at line 1␤Check failed␤FAILED 00:01 110m␤»
13:14 snarkyboojum std: say *
13:14 p6eval std 30614: OUTPUT«ok 00:01 110m␤»
13:14 pmurias masak: Perl 6 is not supposed to have corner cases
13:14 masak d'oh!
13:14 moritz_ pmurias: nope; convience is rated higher than lack of corner cases
13:14 masak I mean, that's the place where the waterbed bulbs up and hits you on the chin... :)
13:14 moritz_ pmurias: example: smart matching
13:16 pmurias why can we have the zero argument say then?
13:16 moritz_ we can't
13:16 snarkyboojum worked in alpha
13:17 moritz_ alpha: say
13:17 pmurias moritz_: why not?
13:17 snarkyboojum alpha: say
13:17 p6eval alpha 30e0ed: OUTPUT«say requires an argument at line 10, near ""␤in Main (file src/gen_setting.pm, line 2593)␤»
13:17 p6eval alpha 30e0ed: OUTPUT«say requires an argument at line 10, near ""␤in Main (file src/gen_setting.pm, line 2593)␤»
13:17 snarkyboojum oh :|
13:17 masak that's for hysterical raisins.
13:17 masak too easy for people to write 'say for @values'.
13:17 snarkyboojum I'm sure I had "say" printing newlines for me at one stage :)
13:17 moritz_ pmurias: because sometimes our priorities are twisted?
13:18 moritz_ alpha: say()
13:18 p6eval alpha 30e0ed: OUTPUT«say requires an argument at line 10, near ""␤in Main (file src/gen_setting.pm, line 2610)␤»
13:18 moritz_ rakudo: say
13:18 p6eval rakudo 9f1395: OUTPUT«␤»
13:18 moritz_ "works"
13:18 snarkyboojum oh, maybe it was master
13:18 snarkyboojum :S
13:19 moritz_ some of us are too young to have properly witnessed 'alpha' times... :-)
13:19 snarkyboojum :)
13:19 * masak can sometimes feel he could have use for bare 'say'
13:19 snarkyboojum or we watched from a great distance
13:20 moritz_ masak: me too
13:20 masak use Bare::Say;
13:20 masak I guess.
13:20 moritz_ masak: which is why I want to write a module at some point that disable p5 warnings that interfer with "normal" Perl 6 code
13:20 pmurias TimToady: can we remove .say/.print from Any as it collides with .say/.print on IO, violates seperation of concern and all it saves is a few chars
13:20 masak moritz_: I applaud that idea.
13:21 moritz_ masak: and also allows empty < >
13:21 moritz_ std: <>
13:21 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of <>; in Perl 6 please use lines() to read input,␤  or ('') to represent the null string,␤  or () to represent Nil at /tmp/0nYna1EstC line 1:␤------> [32m<[33m⏏[31m>[0m␤Parse failed␤FAILED 00:01 109m␤»
13:21 moritz_ std: < >
13:21 p6eval std 30614: OUTPUT«ok 00:01 110m␤»
13:21 masak moritz_: and allows the use of a lot of otherwise banned variable names.
13:21 PZt joined #perl6
13:22 moritz_ masak: example?
13:22 masak pmurias: the only objection I have then is that 'say $_ for @values' fails to hide $_ in a way that Perl 5 often succeeds in doing. '.say for @values' hides it, but at the cost of all the disadvantages you mentioned.
13:23 masak moritz_: I'll have a look. I know that STD.pm6 disallows a bunch.
13:23 pmurias masak: why is hiding $_ considered a good thing?
13:23 moritz_ it explicitly carps about $\ $, $" etc.
13:23 sundar left #perl6
13:23 moritz_ which can be annoying in string interpolations
13:24 moritz_ pmurias: if you want to mention a variable, you use a named variable
13:24 moritz_ pmurias: if you use $_, you don't want to write it explicitly
13:24 masak pmurias: I don't know if it's universally considered a good thing. but it's one of the things I personally like about $_.
13:24 moritz_ it's just two different ways of doing the same thing
13:24 moritz_ and providing no easy way to print $_ without mentioning $_ effictively destroys one of these ways
13:25 masak in that sense, .say compensates for bare 'say' no longer defaulting to $_.
13:25 Bzek joined #perl6
13:25 masak but it does it only on a whitelisting basis, which is actually quite sad.
13:25 masak Perl 5 has loads of subs defaulting to $_.
13:26 moritz_ and some which unexpectedly don't
13:26 pmurias joined #perl6
13:27 moritz_ some are also plain weird
13:27 moritz_ for example split defaults to $_ on the second argument
13:27 christine joined #perl6
13:28 masak moritz_: $^I, or $^ followed by most capital letters.
13:29 moritz_ by all, actually
13:29 masak aye.
13:34 tedv default p5 split doing a split on characters always confused me
13:35 moritz_ tedv: huh? default split splits on whitespace
13:35 tedv maybe I'm going crazy, one moment
13:36 moritz_ $ echo 'a b  cd' | perl -nE 'say join "|", split'
13:36 moritz_ a|b|cd
13:36 moritz_ split   is the same as   split ' ', $_
13:36 tedv oh I'm confusing it with split //
13:37 moritz_ aye
13:37 tedv so I guess that's a meta confusion
13:37 tedv maybe I've been infected with cargo cult coding after seeing so many instances of "split ' '" in my coworkers code
13:38 moritz_ :-)
13:38 PerlJam I always thought the most confusing thing about split for most people was understanding that the first this is always a regex except when it's just ' '
13:38 snarkyboojum I guess the pronoun "it" should be implicit in most cases, unless the context isn't known?
13:39 PerlJam s/this/thing/
13:39 masak snarkyboojum: aye, should :)
13:40 tedv isn't the " " split token also just shorthand for a special regexp
13:40 tedv and a bit of bonus code to shave off start and ending null strings?
13:40 moritz_ afaict it's really special
13:40 moritz_ and starting null strings too
13:40 tedv just for the bonus start-and-end code though, right?  Or is it super optimized in some way?
13:41 tedv I thought scalar(split " ", "") == 0
13:41 masak the u4x page for split should say "It's highly probably that you want 'comb', not 'split'." :)
13:41 PerlJam masak++
13:41 moritz_ tedv: split in scalar context does something entirely different too
13:41 moritz_ it splits into @_
13:41 pmurias masak: "Consider using comb instead"
13:41 moritz_ hooray for special cases!
13:41 tedv oh perl...  why do you hate me so!
13:42 tedv hmm I've never used split in scalar context then, or I would have remembered that
13:42 pmurias moritz_: they save characters don't they?  ;)
13:42 PerlJam tedv: @foo = split "x*y", $string;   # it tends to surprise people that "x*y" is a regex because it looks so much like a string  too  :)
13:42 moritz_ pmurias: loads
13:42 PerlJam Perl warns about implicit splitting into @_ (if you've got warnings on)
13:43 moritz_ pmurias: great for golfing
13:43 tedv well "xy" is also a regexp right?
13:43 tedv or do you have to explicitly qualify that as /xy/
13:43 am0c joined #perl6
13:43 masak pmurias: well, that makes it sound like comb is just a better split. that's not quite true.
13:43 PerlJam tedv: if it's the first arg to split it is
13:43 tedv yeah
13:43 moritz_ but notice that split / /   and split ' ' are different
13:43 masak pmurias: sometimes you really do want split.
13:43 tedv yeah I do know that
13:51 moritz_ $ perldoc -f split | wc -l
13:51 moritz_ 125
13:51 clintongormley joined #perl6
13:52 moritz_ that is 5 display pages
13:56 plobsing joined #perl6
13:58 * masak .oO( correlation between popular functions and cornerspecialcasecruft )
13:59 wasy left #perl6
13:59 XaeroOne joined #perl6
14:01 XaeroOne is it now possible to use for my $var @arr {...} in perl6?
14:01 masak XaeroOne: yes, but it's no longer written like that.
14:01 masak XaeroOne: since $var belongs more to the block, it's written `for @arr -> $var { ... }`
14:01 XaeroOne use -> i know
14:02 masak std: for my $var @arr { ... }
14:02 p6eval std 30614: OUTPUT«Use of uninitialized value $FATALS in numeric gt (>) at STD.pm line 100780.␤[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/wUDyqIrv8m line 1:␤------> [32mfor my $var [33m⏏[31m@arr { ... }[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤      trait␤Parse
14:02 p6eval ..failed␤F…
14:02 snarkyboojum std: foreach my $var (@arr) { }
14:02 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of 'foreach'; in Perl 6 please use 'for' at /tmp/a7QxxKxMtF line 1:␤------> [32mforeach[33m⏏[31m my $var (@arr) { }[0m␤Parse failed␤FAILED 00:01 109m␤»
14:02 snarkyboojum :)
14:02 XaeroOne but why? is is easier that way
14:02 moritz_ XaeroOne: no, you're just used to the old way
14:02 masak XaeroOne: the $var is now part of the block signature.
14:02 masak XaeroOne: which has new advntages and simplifications.
14:03 moritz_ also  for my $var @list   is essentially two terms in a row
14:03 moritz_ which is forbidden in most areas of the language
14:03 XaeroOne ok, I dunno perl a lot but the python style "for a in b" is easy to read
14:03 masak it's not forbidden in special forms, of which 'for' is one. but yeah.
14:03 snarkyboojum std: for @array -> my $item {...}
14:03 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable @array is not predeclared at /tmp/pFvCqpgwlY line 1:␤------> [32mfor @array[33m⏏[31m -> my $item {...}[0m␤In parameter declaration, typename 'my' must be predeclared (or marked as declarative with :: prefix) at /tmp/pFvCqpgwlY line
14:03 p6eval ..1:␤---…
14:04 snarkyboojum std: for @array -> $item {...}
14:04 p6eval std 30614: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable @array is not predeclared at /tmp/Kin9CO9P8d line 1:␤------> [32mfor @array[33m⏏[31m -> $item {...}[0m␤Check failed␤FAILED 00:01 111m␤»
14:04 masak snarkyboojum: read the error messages.
14:04 XaeroOne so then what will happen to all the cpan modules?
14:04 masak XaeroOne: they will continue to run under Perl 5.
14:04 snarkyboojum masak: no kidding :)
14:05 moritz_ there's actually an effort to use perl 5 modules from Perl 6
14:05 XaeroOne perl6 without cpan, are you kidding?
14:05 masak XaeroOne: hopefully there will be ways to use Perl 5 from Perl 6.
14:05 XaeroOne something like the python 2to3 script?
14:05 moritz_ nope, not conversion
14:05 masak XaeroOne: no, more like parallel runtimes.
14:05 moritz_ linking the perl5 interpreter into Perl 6
14:06 moritz_ and then cross-talking between the two
14:06 moritz_ hilarity ensured
14:06 XaeroOne omg more complications
14:06 moritz_ oh, you can also re-write the good modules in Perl 6, if you like that better
14:06 masak XaeroOne: sorry, you thought this was an easy mission? :P
14:06 XaeroOne how long before p6 is production ready? rought estimate?
14:06 masak XaeroOne: we don't do estimates. :)
14:06 moritz_ depends on your definition of "production"
14:06 XaeroOne please?
14:07 masak XaeroOne: we're working as fast as we can.
14:07 PerlJam XaeroOne: What do you want to use it for?
14:07 XaeroOne i am just about learning perl5
14:07 moritz_ for some values of "production", it's usable today
14:07 moritz_ for others, not
14:07 XaeroOne was wondering if it would be better to learn perl6 itself?
14:07 masak XaeroOne: keep learning Perl 5. you won't regret it. but learn Perl 6 too if you want to see what the future holds.
14:07 PerlJam XaeroOne: Learn as much as you can :)
14:07 masak XaeroOne: also, try Rakudo. it might be more done than you think.
14:08 masak XaeroOne: did you know that there is one release of Rakudo Perl 6 each month?
14:08 XaeroOne rakudo is like a perl distribution right?
14:08 XaeroOne does it need parrot?
14:08 moritz_ a perl 6 compiler
14:08 moritz_ yes
14:08 PerlJam XaeroOne: Rakudo is a Perl 6 compiler that targets parrot
14:09 XaeroOne oh so I need both rakudo and parrot vm?
14:09 XaeroOne and parrot vm can do python too?
14:09 moritz_ yes; but rakudo can install and compile parrot for you
14:09 masak XaeroOne: if you download it from http://github.com/rakudo/rakudo/downloads and follow the instructions, it will get Parrot for you.
14:09 moritz_ or even http://rakudo.org/how-to-get-rakudo
14:09 PerlJam XaeroOne: There is a python compiler called pynie that targets parrot, yes
14:10 moritz_ but it's not shippped with parrot; you need to get it separately
14:10 tedv how optimized is parrot these days?
14:10 XaeroOne so where does that leave perl vs python err.. "discussions"?
14:10 PerlJam tedv: some, but not enough :)
14:10 PerlJam XaeroOne: what do you mean?
14:11 XaeroOne :P ok not funny
14:11 moritz_ XaeroOne: probably at the same state as the "hammer vs. screw driver" discussions
14:11 tedv Yeah
14:11 colomon sorear++'s lexical persistence patch just hit my e-mail...
14:11 tedv I think of Python as the language I want all my coworkers to code in
14:11 tedv and Perl as the language I want to code in
14:11 masak XaeroOne: people in here tend to be inclusive rather than exclusive, so it's hard to get real language flamewars going :)
14:12 moritz_ except about C++ :-)
14:12 masak well, there are exceptions to everything.
14:12 tedv you mean java!
14:12 moritz_ there'a slways somebody williing to speak up against C++ or java :-)
14:12 XaeroOne i'm reading the perl5 to perl6 article and it looks very good
14:12 XaeroOne love it
14:12 moritz_ thanks
14:12 PerlJam The only language that really grates on my brain is COBOL.
14:13 masak PerlJam: been reading too little bf and INTERCAL lately?
14:13 snarkyboojum PerlJam: about about Brainf*ck :)
14:13 XaeroOne keep up the good work and thanks for the help
14:13 tedv The only real beef I have with Java is that it thinks people will be safer programmers if they have to type more, which just isn't true.
14:13 XaeroOne gotta run
14:13 masak XaeroOne: \o
14:13 tedv So you end up with wordy code that's just as buggy as in any other language, except even harder to read.
14:13 PerlJam masak: no, those are "toy" languages, so they're okay.  :)
14:14 masak INTERCAL is very serious!
14:14 tedv P6 needs to implement the Brainf*ck grammar in a package
14:14 moritz_ grammar? brainfuck has grammar?
14:14 tedv well its executions are well defined, right?
14:14 moritz_ that's news to me
14:14 tedv it's just that the grammar involves heavy use of punctuation
14:14 masak PerlJam: INTERCAL even pioneered threading by removing the restriction of 'only one COME FROM per label' :)
14:14 moritz_ :-)
14:15 arnsholt moritz_: It's not a very complicated grammar (might even be regular, I think) =)
14:15 masak probably regular.
14:15 arnsholt Essentially m/[$ops]*/
14:15 masak well, and loops.
14:15 moritz_ it might be that [ and ] need to be matched
14:15 arnsholt Right. Possibly context free, then
14:16 masak :)
14:16 moritz_ :-)
14:16 * masak wishes he knew those terms by heart
14:16 masak and the automata they correspond to.
14:16 dalek joined #perl6
14:16 moritz_ masak: just attend a lecture "formal languages and automata" or so
14:16 moritz_ masak: it helped me a lot
14:16 masak thanks for the tip.
14:17 moritz_ (only about 1/4 of it is actually relevant to any of the discussions here, but it's still a high ratio for a university course)
14:17 PerlJam The class is called "Theory of Computation" around here
14:18 bubaflub joined #perl6
14:19 PerlJam moritz_: But, those who don't understand history are doomed to repeat it or something, so even that 3/4 that isn't directly relevant is still useful.  :)
14:20 arnsholt masak: The extremely short explanation: context-free means that there is some kind of structure that has to match up like parens "left-part whatever right-part"
14:20 arnsholt Corresponds to push-down automata
14:20 moritz_ or the memory-model: it needs a stack of linear size
14:21 arnsholt Regular is anything that can be matched by a regular expression (d'uh =). Essentially, you can only specify how a single element can be repeated
14:21 arnsholt No counting and corresponding that to some other element. Corresponds to finite state automata
14:21 moritz_ memory model: constant memory
14:22 arnsholt (deterministic and non-deterministic FSAs are equivalent. Not so with push-down automata)
14:22 bubaflub moritz_: i noticed your blog post about fixing up a test and i'd like to try my hand at it
14:22 moritz_ bubaflub: great
14:22 PerlJam bubaflub++
14:22 PerlJam moritz++
14:22 moritz_ bubaflub: do you have a commit bit already?
14:22 bubaflub moritz_: to the parrot repo, not to anything rakudo related
14:22 masak arnsholt: thanks. all this sounds familiar, but I'm not sure I'd be able to repeat it offhand.
14:22 moritz_ bubaflub: then you need one for the pugs repo (the tests live in there)
14:22 moritz_ bubaflub: please tell (or /msg) me your email address
14:22 tedv Things I Like About Perl 6: Using ?? !! instead of ? :
14:23 masak thought: what's the closest approximation to an 'abstract class' in Perl 6 OO?
14:23 arnsholt masak: The important thing (IMO) is to know that there's a difference. And for bonus points, being able to see when you have a context-free problem
14:23 masak is it "just don't instantiate it, silly!", or something more elaborate?
14:24 moritz_ bubaflub: invitation sent; welcome
14:24 bubaflub moritz_: thanks
14:24 masak arnsholt: how do you know when you have a context-free problem?
14:24 arnsholt Just knowing there are things that can't be matched by regexes gives you a bit of spider senses to know what to ask for when your regexes just refuse to work
14:24 PerlJam arnsholt: Even CS PhDs get confused on that sometimes
14:24 moritz_ masak: anything which requires arbitrary nesting
14:24 masak arnsholt: guess what you've been saying is part of this: http://en.wikipedia.org/wiki/Chomsky_hierarchy
14:25 arnsholt masak: The key bit is the "parenthesis structure". You have a head element and a tail element, and inside those you have something with the same structure
14:25 moritz_ masak: parenthesis, xml tags, stuff like that
14:25 masak ah, ok.
14:25 masak I think I can recognize those.
14:25 moritz_ another example is a string + its reverse
14:25 moritz_ it basically nests arbitrary characters
14:26 tedv What's the difference between Cool-num and Num?
14:26 moritz_ Cool-num.pm contains methods that are in class Cool, but deal with numbers
14:26 arnsholt Context-sensitive is where you have overlapping, but not nested parenthetical structure, like ( [ ) ], or a**n b**n c**n
14:26 moritz_ or xml tags of arbitrary length
14:27 moritz_ (you can't parse those with context free grammars unless you tokenize first)
14:27 tedv what is the "Cool" class supposed to encapsulate?
14:27 moritz_ the notion of certain wide class of built-ins
14:27 arnsholt Fun fact: Requiring names to be predeclared, like in C, C++, Java, whatever, is actually context-sensitive
14:27 moritz_ that coerce to the proper type
14:28 moritz_ memory model: linear, arbitrary access
14:28 arnsholt A parser usually cheats by maintaining a bit of extra state to do the checking
14:28 masak sorear++ # RT #75030
14:29 arnsholt But yeah, this is all essentially the Chomsky hierarchy
14:29 moritz_ now you can do fun things, like describe regular languages with a certain class of predicate logic
14:29 moritz_ or proof that co-LBA == LBA
14:30 * moritz_ forgot that proof pretty quickly
14:30 arnsholt *shudder* I'm taking a class in modal logic this semester
14:30 arnsholt The prof is really keen on simulating Turing machines with logic and so on. Very theoretical
14:31 * moritz_ only remembers "inductive counting" or such a similar buzzword
14:31 moritz_ anyway, was a fun class and gave me a good grade
14:32 masak interesting list: http://en.wikipedia.org/wiki/​Special:WhatLinksHere/Perl_6
14:35 JimmyZ joined #perl6
14:36 circuitbreaker joined #perl6
14:36 masak the wp article 'Coroutine' claims that coroutines are native to Perl 6. I'm not sure I agree with that.
14:36 masak unless you count the gather/take mechanism as implementing coroutines.
14:36 moritz_ then please add a [citation required]
14:37 * masak does so
14:37 snarkyboojum joined #perl6
14:37 snarkyboojum masak: examples of what breaks in tardis/yapsi integration -> http://github.com/masak/tardis/b​lob/yapsi-integration/t/ticks.t
14:38 masak snarkyboojum: excellent; thank you.
14:38 bubaflub moritz_: perl6 built, tests downloaded, and now i'm reading the synopsis for S05 - i'll probably have some questions in a bit
14:38 snarkyboojum masak: welcome - buzz me with any ideas as to what I'm doing wrong :)
14:39 moritz_ bubaflub: sure, shoot when you have them
14:42 JimmyZ joined #perl6
14:43 masak snarkyboojum: do you use the Makefile in that branch? because I can't, it seems; it doesn't find Yapsi.
14:43 snarkyboojum masak: I do
14:44 masak unmodified? when I change it a bit, it works.
14:44 masak maybe I should ask: how does it find the Yapsi module on your box? :)
14:44 snarkyboojum but I use yapsi in ~/.perl6/lib if that makes any sense
14:44 moritz_ bubaflub: if you know the NQP or PGE grammars, they are a subset of the Perl 6 grammars
14:44 masak snarkyboojum: ah -- I suspected that.
14:44 bubaflub moritz_: only a little bit
14:44 masak snarkyboojum: that's probably quite a nice solution. require Yapsi to be installed.
14:44 snarkyboojum masak: I "install" yapsi when I need a new version
14:44 masak *nod*
14:45 masak let's leave it that way for now.
14:45 moritz_ it fits SoC :-)
14:45 snarkyboojum masak: ok
14:45 bubaflub moritz_: i'm still reading the Synopsis looking for where the .parse and .parsefile methods are specified
14:45 masak moritz_: it does indeed. hardcoding paths is not fun.
14:45 masak snarkyboojum++
14:45 snarkyboojum :)
14:45 moritz_ bubaflub: last paragraph of http://perlcabal.org/syn/S05.html#Grammars talks about .parse
14:46 moritz_ bubaflub: .parsefile is the same, but takes a filename to read from... seems to be specced by cultural knowledge rather than synopsis text
14:46 bubaflub moritz_: okey dokey
14:46 moritz_ which is bad, and should be changed
14:47 moritz_ but I don't want to make spec changes part of challenges to newcomers
14:47 moritz_ too scary :-)
14:47 masak snarkyboojum: both for the 'install' idea and for the nice test file.
14:47 snarkyboojum masak++ # for appropriating test file ideas :)
14:47 masak I'm getting a runtime panic from Yapsi when I run that. somewhere around test 5 in t/ticks.t
14:47 masak no idea why.
14:48 masak yet.
14:48 snarkyboojum masak: because it doesn't like var initialisation in a block
14:48 masak hm, but it used to have no problem with that, I think.
14:48 snarkyboojum locate-variable doesn't work in that case
14:48 masak ah, ok.
14:48 masak it's that part that blows up. that makes sense.
14:48 snarkyboojum yep
14:48 masak you've even mentioned it before.
14:49 snarkyboojum yeah
14:49 masak except for the part where my time this week is severely rationed, I think that's an easy fix.
14:49 snarkyboojum I put that in as an example of a failing test case
14:49 masak especially now that we have tests.
14:49 snarkyboojum cool :)
14:49 masak I'm also increasingly itching for functions. that would be cool to start hacking on.
14:50 snarkyboojum communicating via tests.. I like :)
14:50 snarkyboojum masak: agreed :)
14:50 * masak should write a ROADMAP for Yapsi
14:51 snarkyboojum that'd be v. cool
14:53 pmichaud good morning, #perl6
14:53 phenny pmichaud: 10 May 23:49Z <sorear> tell pmichaud  What would you think of me implementing the mixin subset of role functionality in NQP-rx?  This would allow slangs in Rakudo, bringing our grammar closer to STD while fixing operator overload scoping and enabling lexical macros
14:55 pmichaud phenny: tell sorear  I'm not eager to try to get roles working in nqp-rx... nqp-rx is supposed to remain simple.
14:55 phenny pmichaud: I'll pass that on when sorear is around.
14:56 bubaflub moritz_: i'm getting a strange error + backtrace, one sec i'll get a gist of it
14:56 ash__ joined #perl6
14:57 bubaflub moritz_: http://gist.github.com/397407
14:57 bubaflub or perhaps that's just the result of trying to improperly set an integer
14:58 * moritz_ boggles at the backtrace
14:59 moritz_ it's from the module loader
14:59 moritz_ oh
15:00 masak pmichaud: http://rt.perl.org/rt3/Tic​ket/Display.html?id=75030
15:00 masak pmichaud: it would be really, really good if this patch made it into Rakudo.
15:00 pmichaud masak: looking
15:00 alester joined #perl6
15:01 pugssvn r30615 | moritz++ | [t/spec] a fudge which hides a weird error
15:01 moritz_ bubaflub: it's related to the 'grammar Integer' definition late in the file
15:01 pmichaud masak: the patch is too big for me to do a quick review --- I'll have to review it more thoroughly a bit later
15:01 moritz_ bubaflub: I've just committed somethiing to fudge it out, it should be a less confusing error now... hopefully
15:02 pmichaud I don't like that it changes the parameters to !UNIT_START, though.
15:02 masak pmichaud: I understand. just letting you know that people on the sidelines are cheering this patch on.
15:02 masak oh, and I can't vouch for the actual changes it does, because I haven't looked at it.
15:02 masak and might not understand everything even if I had.
15:03 pmichaud Also, since I've been working on fixing closures over the weekend, I'm a bit concerned this patch won't work anyway.
15:03 pugssvn r30616 | moritz++ | [t/spec] fix previous commit
15:03 moritz_ bubaflub: and another patch to fix the previous one... please 'svn up' in the t/spec dir
15:04 moritz_ bubaflub: if you run 'make t/spec/S05-grammar/parse_and_parsefile.t' it actually passes some of the tests
15:05 pmichaud actually, there are quite a few nits with that particular patch. :-(
15:05 moritz_ sorry for the inconvenience :/
15:05 moritz_ pmichaud: did you have any success with closures?
15:06 ash__ Can you use "return" in a pointy block?
15:06 pmichaud moritz_: depends on how one defines "success"  :)
15:06 moritz_ ash__: that will return from the surrounding routine
15:06 bubaflub moritz_: np.
15:06 pmichaud moritz_: I know where the problems are and how to fix them, unfortunately Parrot's current opcodes are fundamentally wrong.
15:06 ash__ ah, that explains it
15:07 moritz_ ash__: leave() is meant for leaving blocks
15:07 PerlJam ash__: IIRC, you can "leave" a pointy block
15:07 ash__ rakudo: my $a = 123; my $b = -> { return -> { return $a }; }; say $b()(); # that was a bit confusing, but i see why it happened now
15:07 p6eval rakudo 9f1395: OUTPUT«No exception handler and no message␤current instr.: '&return' pc 17919 (src/builtins/Junction.pir:414)␤»
15:07 bubaflub moritz_: ok, now i see the problem.  the parse either matches the entire line or it matches nothing
15:07 bubaflub the test is setup to match substrings
15:07 moritz_ bubaflub: correct
15:08 bubaflub should i change the expected values of the test or should i rewrite the tests so we have examples that don't fial
15:08 bubaflub *fail
15:08 moritz_ pmichaud: which opcodes? the newclosure, capturelex etc.?
15:08 pmichaud moritz_: yes.
15:08 pmichaud it's also an issue that parrot only provides a notion of static outerness but not dynamic outerness
15:08 moritz_ bubaflub: that's up to you, as long as in the end there are some tests for matching grammars, and some for non-matching
15:09 ash__ pmichaud: did alpha have to cheat or something then? (didn't it have closures working properly?)
15:09 bubaflub moritz_: ok.  i'll fix the existing ones and add more tests
15:09 pmichaud ash__: alpha just never tested the cases that would fail, I suspect.
15:09 moritz_ uhm
15:09 moritz_ alpha passed the man-or-boy test
15:09 pmichaud sure, it passed that.
15:10 moritz_ as well as some other closure tests that master fails
15:10 pmichaud that doesn't mean it'll pass the case I've come up with.
15:10 ash__ pmichaud: is that test in the t/spec now? or viewable online?
15:10 pmichaud ash__: I'm writing it up as an example to share with the parrot folks
15:11 pmichaud i.e., it's an example of a place where parrot cannot support a needed semantic without some really undesirable workarounds
15:11 masak pmichaud: master has definitely regressed in some way when it comes to closure cloning.
15:11 pmichaud masak: yes, I know
15:11 pmichaud the basic problem with master is that we no longer clone values on assignment
15:11 pmichaud and alpha was relying on the "assignment makes a copy" semantic for subs
15:11 masak ah.
15:12 pmichaud nowadays, assignment in master simply associates a value with a container
15:12 masak AFAIU, it's the entry into the surrounding block that makes a copy. at least on some theoretical plane of explanation.
15:12 [Coke] I am bemused at the first and last sections of the topic.
15:12 pmichaud masak: yes, but it really wants to be a copy of the lexical pad, not the subroutine itself.
15:13 masak right.
15:13 pmichaud and parrot doesn't give us a way to get a lexical pad before a subroutine has been invoked
15:13 moritz_ which I found out painfully when trying to set $/ in yet-to-be-called subroutine
15:13 moritz_ for s///
15:14 molaf joined #perl6
15:15 pmichaud masak: RT #75030  many of the basics are correct there, but it's got too many nits for me to accept the patch as-is.
15:15 masak pmichaud: sounds like a partway win, anyhow.
15:15 masak pmichaud: looking forward to the remaining nits being resolved.
15:17 pmichaud I don't like (the way) that it suppresses output on statements and blocks
15:18 pmichaud or that the ast ends up being different depending on the setting of $*AUTOPRINT
15:18 ash__ for proper closure support, when you capture a closure, how much of the world will it freeze? for instance: my $a = 123; my $b = -> { -> { $a, eval "$a" }; }; my $a = 124; say $b()();    should that print
15:18 rv2733 joined #perl6
15:18 ash__ should that print 123124 or 124124 or 123123?
15:19 pmichaud well, there's a redeclaration of $a there
15:19 moritz_ perl6: my $a = 123; my $b = -> { -> { $a, eval "$a" }; }; my $a = 124; say $b()();
15:19 p6eval elf 30616: OUTPUT«AST handler circumfix:pblock partially unimplemented at ./elf_h line 3549␤»
15:19 p6eval ..pugs: OUTPUT«124124␤»
15:19 p6eval ..rakudo 9f1395: OUTPUT«Redeclaration of symbol $a at line 11, near " = 124; sa"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
15:19 pmichaud rakudo++
15:20 moritz_ alpha: my $a = 123; my $b = -> { -> { $a, eval "$a" }; }; my $a = 124; say $b()();
15:20 p6eval alpha 30e0ed: OUTPUT«Redeclaration of variable $a␤»
15:20 pmichaud alpha++
15:20 ash__ oops, i guess the second my needs to go
15:20 pmichaud :-)
15:20 ash__ pugs: my $a = 123; my $b = -> { -> { $a, eval "$a" }; }; $a = 124; say $b()();
15:20 p6eval pugs: OUTPUT«124124␤»
15:21 pmichaud pugs is right there.
15:21 moritz_ it's pretty much what I expected too
15:21 moritz_ the variable is captured, not the value in the variable
15:21 pmichaud rakudo: my $a = 123; my $b = -> { -> { $a, eval "$a" }; }; $a = 124; say $b()();
15:21 p6eval rakudo 9f1395: OUTPUT«124124␤»
15:21 pmichaud rakudo is correct also.
15:22 ash__ I wasn't sure if it some how was supposed to freeze $a when it made the pointy block $b into a closure or not
15:23 pmichaud it doesn't freeze the value, no.
15:23 pmichaud it freezes the binding of the name to the container
15:26 ash__ got ya, how much freezing of the bindings should happens though? does it freeze the world when it makes a new closure? or does it freeze the current lexpad? or the lexpads its aware it uses?
15:26 TimToady phenny: tell pmurias no, we will not remove .say from Any; you seem to have lost track of the idea that the main point of superclasses is to *lose* the separation of concerns imposed by the subclasses.  Language design is more about *balance* of concerns.
15:26 phenny TimToady: I'll pass that on when pmurias is around.
15:28 bubaflub moritz_: i've got a patch for the spec file, i'd like to have you take a look at it before i commit
15:28 bubaflub moritz_: it's pretty basic and some of the tests seem a bit repetitive, but it gets the job done
15:29 moritz_ bubaflub: sure, just paste the output of 'svn diff' somewhere
15:29 bubaflub moritz_: i'll reuse the gist, one sec
15:29 bubaflub moritz_: http://gist.github.com/397407
15:30 masak #rs tonight?
15:31 moritz_ bubaflub: looks fine... one possible improvement is to use  ok( !Foo.parse('abc123xyz'), ...) instead of is ( Foo.parse('abc123xyz'), '', ...)
15:32 moritz_ the match object that is returned is False in boolean context, so you can use that property rather than relying on the string representation of the failed match
15:32 moritz_ but it's also OK as it is right now
15:35 pmichaud aha!  Parrot's capture_lex isn't using the static outer marker after all!
15:35 pmichaud *whew*
15:35 pmichaud okay, that makes fixing closures much easier.
15:36 TimToady \o\ /o/
15:36 pmichaud (not easy, just easier)
15:36 TimToady \o /o
15:37 moritz_ o, expressive dancing
15:37 TimToady o  o   <-- arms tired
15:37 TimToady "ascii comic strips"
15:38 ash__ now you just need to make a youtube video of you singing to a song...
15:39 TimToady <o?  !o!  ...o>
15:39 TimToady hard to draw a running head
15:40 ash__ !o! makes me think if giving someone thumbs up for some reason
15:41 JimmyZ joined #perl6
15:41 moritz_ actually it looks more like thumbs down to me
15:41 [Coke] o O % .
15:42 bubaflub moritz_: does the perl6 test library have not_ok?
15:42 moritz_ lemme check
15:42 moritz_ I think it's spelled nok()
15:42 pmichaud afk for a bit
15:42 moritz_ yes, nok() exists
15:42 bubaflub moritz_: yep
15:42 bubaflub moritz_: cool.  i'll change those to nok() and submit the patch
15:43 moritz_ bubaflub++
15:44 jnthn o/ folks
15:44 moritz_ \o
15:45 JimmyZ \o/
15:46 pugssvn r30617 | bubaflub++ | [t/spec] bring parse_and_parsefile.t up to date
15:47 bubaflub moritz_: sweet.  that wasn't too scary.  is there another spec i should start hacking on?
15:48 moritz_ bubaflub++
15:49 moritz_ bubaflub: I'll take a look for low-hanging fruits...
15:49 snarkyboojum !o! looks like someone chasing me with two baseball bats
15:49 moritz_ rakudo: multi sub infix:<foo>($a, $b) {$a + $b}; my $x foo= 6; say $x
15:49 p6eval rakudo 9f1395: OUTPUT«Null PMC access in invoke()␤current instr.: '!assign_metaop' pc 17668 (src/builtins/Junction.pir:291)␤»
15:50 moritz_ bubaflub: that example should live, and have 6 in $x
15:50 jnthn rakudo: our multi sub infix:<foo>($a, $b) {$a + $b}; my $x foo= 6; say $x
15:50 p6eval rakudo 9f1395: OUTPUT«No applicable candidates found to dispatch to for 'infix:<foo>'. Available candidates are:␤:(Any $a, Any $b)␤␤current instr.: '!assign_metaop' pc 17668 (src/builtins/Junction.pir:291)␤»
15:50 moritz_ bubaflub: you could add that as a TODO'ed or skipped test in t/spec/S06-operator-overloading/subs.t
15:51 moritz_ jnthn: I know where the problem is, needs probably just one or two lines of fix
15:51 moritz_ jnthn: at least with your version :-)
15:51 moritz_ both could use tests
15:52 jnthn moritz_: The first issue is a bit tricky
15:52 moritz_ aye; it's the second I know how to fix
15:53 moritz_ and maybe I'll post that as another challenge
15:53 Lorn joined #perl6
15:53 moritz_ bubaflub: here's an idea...
15:53 * jnthn needs to finish up a presentation and unglacialify some Excel export thingy today before he can look at Perl 6 bits
15:53 moritz_ bubaflub: in Perl 6 you can create Pair objects with various syntaxes
15:53 snarkyboojum_ joined #perl6
15:54 moritz_ bubaflub: for example my $x = 'foo'; :$a   is another way to write   a => 'foo'
15:54 moritz_ bubaflub: this should also work with variables with twigils, ie :$^a, :$*a, :$!a etc
15:55 moritz_ bubaflub: currenlty there are no sysstematic tests for that
15:55 moritz_ a good place to add them would be S02-literals/pairs.t
15:55 pmichaud afk for lunch
15:56 bubaflub moritz_: okey dokey.  i'll add the tests to S06-operator-overloading/sub.t and then check out Synopsis 2 about the pairs
15:56 moritz_ cool
15:56 masak bubaflub++
15:57 TimToady moritz_: s/my $x/my $a/
15:57 masak so, #rs in three hours, yes?
15:57 moritz_ masak: yes
15:57 masak \o/
15:57 moritz_ TimToady: context?
15:57 TimToady 3 minutes ago
15:58 moritz_ oh yes
15:58 moritz_ thanks
15:58 jnthn masak: Yes
15:58 masak \o/
15:58 jnthn masak: That feels early, but only because my sleep times are a tad off at the moment.
15:58 dalek rakudo: ed24098 | moritz++ | t/spectest.data:
15:58 dalek rakudo: enable test file for Grammar.parse, bubaflub++
15:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​d2409863f5ba94197cc31734db963594036ef7f
15:58 masak jnthn: din sömn är kass! :)
15:58 jonrafkind joined #perl6
16:00 jnthn masak: Min flygg var kass.
16:00 takadonet someone already did the challenge?!?!!
16:00 masak jnthn: 'mitt flyg'. yes, I read as much on Twitter.
16:01 masak takadonet: amazing, isn't it?
16:01 jnthn Huh, I have to learn spelling AND gender?
16:01 jnthn ;-)
16:01 moritz_ takadonet: yes
16:01 takadonet masak: Indeed,  Was not planning to do it since I want others to get involved
16:01 masak gender is easy. a flyg is obviously a t-word. :P unless you're Dansih, then it's probably the other way.
16:02 takadonet moritz_: Added your post to http://perl6.cz/wiki/Perl_6_and_Parrot_links#2010 :)
16:02 masak others really seem to get involved, too.
16:02 arnsholt masak: Is fly not neuter in Danish?
16:03 masak arnsholt: I don't know, and I wouldn't know where to check. but generally, it feels like n-words and t-words are often reversed in Swedish vs Danish.
16:04 masak nom &
16:06 Bzek joined #perl6
16:10 bubaflub moritz_: http://gist.github.com/397483 for the first todo test you mentioned
16:12 moritz_ bubaflub: it's better to omit the eval, and put a #?rakudo skip 'reason' before it
16:12 bubaflub moritz_: ok, i'll edit it up and update the gist
16:13 moritz_ so the test just reads  is $x, 6, 'foo= works for custom operators';
16:14 cdarroch joined #perl6
16:14 cdarroch joined #perl6
16:15 bubaflub moritz_: ok, check out the gist again
16:16 moritz_ looks perfect
16:16 justatheory joined #perl6
16:19 bubaflub moritz_: cool.  should i add another todo block for jnthn's example?
16:19 moritz_ bubaflub: yes (but please use a different operator name this time)
16:19 bubaflub moritz_: roger that
16:20 moritz_ so that the tests don't accientally interfere
16:22 bubaflub moritz_: ok, check out the gist one more time.  is this what we want?  also, what should be the skip reason?
16:23 moritz_ skip reason "dies" or "not yet implemented"
16:23 moritz_ bubaflub: it would be better to put each test in a block of its own
16:23 moritz_ so that one can run even if the other fails
16:24 bubaflub moritz_: okey dokey, editing
16:25 moritz_ bubaflub: I'm about to decommute, feel free to commit without explicit consent... I'll review it later on
16:25 moritz_ bubaflub: and thanks for your patches!
16:25 k23z__ joined #perl6
16:25 bubaflub moritz_: okey dokey. np. i'll get those other todo tests as well soon.
16:29 pugssvn r30618 | bubaflub++ | [t/spec] add skipped tests for custom operators
16:34 dalek csmeta: r264 | diakopter++ | trunk/Sprixel/src/ (2 files):
16:34 dalek csmeta: [perlesque] back out a change
16:34 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=264
16:55 ash__ are there any tests in nqp-rx for lexical variables acting properly in closures? if not, i'll look for perl6 ones
16:59 sorear pmichaud++ prompt review
16:59 phenny sorear: 14:55Z <pmichaud> tell sorear  I'm not eager to try to get roles working in nqp-rx... nqp-rx is supposed to remain simple.
17:03 PacoLinux joined #perl6
17:12 ash___ joined #perl6
17:20 sorear to reply to an RT reply, I just reply to the mail, right?
17:20 moritz_ right
17:29 sorear done.
17:30 * moritz_ hates the mail delays that RT + mailing lists impose
17:38 baest joined #perl6
17:42 Tene joined #perl6
17:42 Tene joined #perl6
17:44 patspam joined #perl6
17:58 IllvilJa joined #perl6
18:04 IllvilJa left #perl6
18:06 cognominal joined #perl6
18:10 moritz_ I have some nice lasagna in the oven
18:10 cognominal that's better than spaghetti in your  code :)
18:11 moritz_ there's no contradiction between the two :/
18:12 jnthn If only writing good code just came from having a lasagna in the oven.
18:12 moritz_ speaking of good code
18:12 moritz_ raakudo fails some tests on new parrot
18:12 moritz_ because for anonymous parameters and lexicals  it emits .lex '$'
18:12 moritz_ and parrot now complains about two lexicals of the same name
18:13 moritz_ rakudo: my ($, $)
18:13 p6eval rakudo ed2409:  ( no output )
18:13 moritz_ given an IMCC error on newest parrot
18:13 moritz_ *gives
18:15 jnthn D'oh
18:15 jnthn Should be fixable without too much pain.
18:19 * moritz_ eats tasty lasagna
18:25 masak hm, haven't seen this one before: http://github.com/gymbrall/ruby_perl6grammar
18:26 iblechbot joined #perl6
18:27 ash___ masak: interesting
18:27 masak meanwhile on Twitter, someone says "Perl 6 is Vietnam for Perl". someone else (not me) answers: "Vietnam? Perhaps the Can Gio Mangrove Forest." :)
18:28 ash___ i have been working what other languages could do that would allow them to have something like grammars in perl6, most languages don't really have an easy way of making anything grammar like
18:28 ash___ s/working/wondering/
18:28 masak I've also been toying with reimplementing something like GGE or nqp-rx in Ruby (or Java, or C...)
18:29 moritz_ what's wrong with 'just' emitting a class?
18:29 ash___ masak: ooo, pick clojure?
18:29 masak :)
18:30 masak that would be interesting. Perl 6 regexes in clojure.
18:30 moritz_ masak: btw I quoted you duriing the talk yesterday
18:30 jnthn #rs in ~30mins.
18:30 masak moritz_: cool. what did I/you say?
18:30 moritz_ masak: in one my examples, I accidentally type 'class' instead of 'grammar' (inheriting from another grammar)...
18:31 moritz_ masak: and somebody from the audience asked why it still worked
18:31 moritz_ and I said that a grammar is just a class with a funny meta class :-)
18:31 masak hah :)
18:31 jnthn The meta class is so hilarious that it only adds a default parent of Grammar.
18:31 moritz_ plus a bit of explaining, and proper attribution :-)
18:32 masak moritz_++
18:32 moritz_ jnthn: yes, I figured; which is my 'class Foo is Bar' works fine if Bar is a grammar
18:32 moritz_ even in Foo is meant to be a class
18:32 jnthn Aye :-)
18:32 ruoso joined #perl6
18:34 lisppaste3 ruoso pasted "Some ideas for the "Object has an owner thread" threading model" at http://paste.lisp.org/display/99095
18:34 ruoso TimToady, ^
18:36 ruoso in fact... anyone interested in the threading model problem, please take a look at the above notes...
18:40 ShaneC joined #perl6
18:40 dalek book: 1868ad6 | moritz++ | src/operators.pod:
18:40 dalek book: [ops] start talking about comparison operators
18:40 dalek book: review: http://github.com/perl6/book/commit/18​68ad61c419c95e2b6f49da1ff9c908b68e98b3
18:40 ShaneC left #perl6
18:50 circuitbreaker left #perl6
18:51 cotto_w0rk joined #perl6
19:00 Psyche^ joined #perl6
19:00 jnthn #rs time
19:12 smash_ joined #perl6
19:12 smash_ hello everyone
19:12 moritz_ hi
19:14 masak hi
19:15 ethel joined #perl6
19:24 cognominal joined #perl6
19:27 rv2733 joined #perl6
19:27 dalek book: fb682c4 | masak++ | src/subtypes.pod:
19:27 dalek book: [subtypes.pod] added poker hand example
19:27 dalek book: Should have done this ages ago.
19:27 dalek book: review: http://github.com/perl6/book/commit/fb​682c4115443f857e027c202536d781cb20acdc
19:29 jaldhar_ joined #perl6
19:32 Casan joined #perl6
19:32 Casan 'perl6: say cheers!;'
19:32 moritz_ perl6: say 'cheers!'
19:33 p6eval elf 30618, pugs, rakudo ed2409: OUTPUT«cheers!␤»
19:33 Casan merci
19:36 moritz_ de rian
19:36 moritz_ erm
19:36 moritz_ de rien
19:36 Casan nice.
19:37 Casan I've been off the channel for a while @other_work. but still reading every blog post there is.
19:40 kaare_ joined #perl6
19:43 moritz_ nice :-)
19:44 Casan thought of any real world use cases for classify yet?
19:45 moritz_ lots of good comments on that blog :-)
19:45 moritz_ 10, in fact
19:45 Casan ohh good, lemme just get uptodate on that too
19:45 takadonet moritz_: classify will be a useful method
19:46 moritz_ a very real-life one contained a link to a page which a list of authors, grouped by author...
19:46 moritz_ and each part of the list had a heading with the first letter of the authors in that list
19:51 Casan and judged by the comments, people are using perl6 in their daily projects already. nice.
19:52 moritz_ I can't really read that from the comments
19:53 takadonet left #perl6
19:56 Casan the comment by Sam on Set::Relation gave me the impression, but maybe its just wishful reading on my part.
19:57 Casan ahh he was referring to the perl5 counterpart
19:57 moritz_ yes
19:59 Casan I was wondering if anyone have given thoughts on plack and rakudo?
20:00 moritz_ not really... what does it take to implement a Plack interface?
20:00 moritz_ reading from STDIN? signals? sockets?
20:01 Casan good question. I'm reading on plackperl.org now
20:05 moritz_ seems like it needs both a server side adaption and a client
20:06 ash__ joined #perl6
20:08 moritz_ http://en.wikipedia.org/wiki/Black_Perl wow, didn't know about that
20:09 diakopter imho that's misconstrued/misconstruable
20:12 TimToady funny thing is, I'm not allowed to just go in and say "I wrote it".  In a sense everything on wikipedia has to be hearsay.  :)
20:13 moritz_ TimToady: did you? :-)
20:13 * diakopter finds the link for that irclog line
20:14 TimToady I've told any number of people already, but it's the April Fool's joke that lives on and on...
20:26 [Coke] ... i wonder if we can get a list of everything we want verified in wikipedia and get an interview at yapc or oscon to just say "yes, uh-huh, yes, yup"
20:27 * moritz_ just patched up the wiki page
20:27 moritz_ with a link to the IRC logs
20:27 Tene [Coke]: Just make sure to publish it in dead-tree format, to satisfy wikipedia's fetish with wood and ink.
20:27 pmichaud spinclad: what do you want to know about closures?
20:29 gpw joined #perl6
20:33 colomon moritz_: bet that wiki patch is undone within the week.
20:34 diakopter yeah. it's not like he directly/explicitly affirmed it.
20:34 diakopter just somewhat ambiguously implied.
20:35 [Coke] here, let me try:
20:35 [Coke] Larry, did you write the Black Perl poem?
20:36 [Coke] (and thank you, btw, for your patient with the internets.)
20:36 patrickas joined #perl6
20:37 patrickas hello
20:37 TimToady .oO("Tell us plainly, are you the Christ?"  "I already told you, but you didn't listen.")
20:38 TimToady patrickas: sorry, that wasn't to you.  :)
20:38 masak patrickas: hi! \o/
20:38 * patrickas is flabergasted
20:39 PerlJam TimToady: Now there's some hubris!  Implying that you're the Christ ...    ;-)
20:39 masak patrickas: welcome to #perl6 :)
20:39 spinclad pmichaud: oh, let's see.  1) one way to handle lexicals (dating back to Algol 60) is with displays, and parrot's newclosure/find_lex seem somewhat off the mark for implementing that  (more)
20:40 TimToady PerlJam: I was just too lazy to pick a better metaphor
20:40 diakopter lol.
20:40 patrickas now I have got to go read the irc log! I forgot what I wanted to ask anyway!
20:40 spinclad 2) i want to look under the hood at what parrot does there, and can you point me where to start looking  (more)
20:41 patrickas maska thanks :) yes I wanted to ask you about proto
20:41 patrickas i mean masak
20:42 masak patrickas: how may I sir you, serve?
20:42 patrickas still shaken by TimToady 's revelation
20:42 masak er I mean
20:42 masak :)
20:42 patrickas I wanted to use it to install some modules
20:42 masak patrickas: by they way, nice job on the logotypes!
20:42 masak patrickas: oh no... :)
20:43 patrickas well it was about time i tried using what have been working on all week :-P
20:43 * masak fills up with trepidation :)
20:43 diakopter spinclad: 3) ?
20:44 patrickas but if I understand correctly what happened is that proto assumes it was used to install rakudo in ~/.perl6/parrot_install/bin/perl6
20:44 patrickas where as I had already installed rakudo and just wanted to install the modules
20:44 masak that should be possible.
20:45 masak just modify the config file.
20:45 patrickas so I need to edit the configuration file
20:45 patrickas yes
20:46 patrickas the point is, since proto is not mentioned at all in http://rakudo.org/how-to-get-rakudo
20:47 patrickas it seemed like a strange default...
20:47 PerlJam patrickas: why would proto be mentioned there?
20:49 patrickas I don't know why it would :-)
20:49 masak patrickas: the idea is that people who find proto first can just install a module, and Rakudo/Parrot would come tumbling in with it.
20:49 masak or something like that.
20:50 patrickas yea that's what confused me .. the assumption that people will find proto before rakudo
20:50 patrickas a bit like people who find cpan before perl
20:51 patrickas actually it confused me so much
20:51 patrickas that I did type "./proto install rakudo" like the page says while in my head i was typing "install proto into rakudo" or something
20:52 patrickas then I realized none of what I was doing made sense because I had rakudo already installed
20:52 PerlJam patrickas: so, you think proto's docs should change to reflect an already-installed-rakudo scenario and then, just in case, mention that you can also install rakudo via proto?
20:52 patrickas so i came here to tell you that the readme page confused this noob
20:52 patrickas EXACTLY
20:52 masak sounds like a good idea.
20:52 spinclad yes, 3), if my slow brain will get me there,  if you could take time to talk through what you currently plan, what changes, and will it give us full proper-level sharing among related closures.
20:53 masak patrickas: would you be willing to make such a change? I'd be delighted.
20:53 patrickas since people who search for how to install rakudo will almost always land on http://rakudo.org/how-to-get-rakudo and later learn about proto after they have rakud already installed
20:54 masak indeed.
20:54 patrickas ok i'll do that.
20:54 masak \o/
20:55 colomon I tried to get proto to work with an already installed Rakudo a few days ago and failed miserably.
20:56 colomon so I'd say  (changes to readme)++
20:56 patrickas Unfortunately this doesn't seem like one of those tasks I can write a perl script to automate it for me :-)
20:56 boigaz joined #perl6
20:56 masak a year ago, when I wrote proto, the problem was that rakudo could be built anywhere, and there was no install target.
20:56 colomon :)
20:57 patrickas ha! I knew there was a method to your madness !
20:57 masak the easiest thing was just to install it locally.
20:57 patrickas :-)
20:57 masak nowadays, there's a default location for rakudo, so proto should probably have that as a default in proto too.
20:57 masak well, it was important for me to have something that worked 'out of the box'.
20:58 stephenlb joined #perl6
20:58 masak I didn't want people saying 'proto doesn't work' just because they had installed a module and they didn't have Rakudo.
20:59 patrickas heheh now you got people saying proto doesn't work cause they already had rakudo ... damned if you do ...
20:59 pmichaud spinclad: sorry, was afk for a bit
21:00 masak patrickas: yeah :) well, conditions change.
21:00 pmichaud spinclad: essentially, every Parrot Sub with lexicals has a LexInfo object associated with it
21:00 spinclad pmichaud: np, took me a while
21:01 pmichaud the LexInfo object identifies the names and register mappings for the lexicals declared in the sub
21:01 orafu joined #perl6
21:01 pmichaud when a sub is invoked, a new context object is created that contains slots for the registers used by the sub
21:02 pmichaud and if the sub has a LexInfo object, then a LexPad hash is created that maps lexical names to register slots
21:02 spinclad (map from names to accessors) just for this lexical level?
21:02 pmichaud yes, only for the lexicals defined in the sub
21:02 SmokeMachine joined #perl6
21:02 pmichaud the context is initialized with a pointer to the context of the outer scope
21:02 pmichaud (called the "outer_ctx")
21:03 spinclad so you have a chain of them
21:03 pmichaud correct
21:03 pmichaud and a lexical lookup involves following the chain of outer contexts until the lexical is found
21:04 spinclad (a classical display keeps the chain in an array, cloned and extended by an entry with each new closure)
21:04 diakopter (note: sprixel does the same thing, except there's more than slot to outer_ctx, one for each outer level (since that's known at compile time))
21:05 spinclad (so a lexical lookup is env[level][regno])
21:06 diakopter oh, yes, that's analogous to how sprixel does it.  sorry to butt in.
21:06 masak Yapsi too. and I'm sorry too. :)
21:07 pmichaud well, Parrot provides a way to look up the outer chain by level, but by default it just keeps the chain around
21:07 spinclad so, you walk two lists, a list of hashes (LexInfo s) and a list of contexts
21:07 pmichaud no
21:07 pmichaud just a list of contexts
21:08 pmichaud we don't ever walk the LexInfos
21:08 jnthn There's on LexPad per Hash
21:08 jnthn gah
21:08 jnthn per Context
21:08 pmichaud there's one LexPad per context
21:08 pmichaud the LexInfos are simply used when creating the LexPad
21:08 spinclad oh, the context points to its LexInfo?  that works too...
21:08 pmichaud no, the context points to its LexPad
21:08 pmichaud LexInfos are basically schemas, they don't hold any values
21:09 pmichaud there's one LexInfo per sub, one LexPad per sub invocation
21:09 spinclad sorry, where do you look up the name to see if its in this level?
21:09 pmichaud LexPad
21:09 pmichaud the LexPad isa Hash
21:10 spinclad ok, that gets copied when creating the LexPad, gotcha
21:10 pmichaud anyway, what capture_lex does is to tell a sub "the next time you're invoked, use the current context as your outer_ctx"
21:11 patrickas masak: in the document the first commend mentioned in "./proto configure" is that obsolete too ?
21:12 pmichaud so, what normally happens is that an outer sub starts by calling capture_lex on all of its inner nested blocks, so that if any of them are invoked, they will use the current invocation of the outer sub as the outer context.
21:13 spinclad 'use _this_ context (passed now)' or 'find the current sub's current context then'?
21:13 pmichaud the current sub's context
21:13 pmichaud the "current context" -- i.e., the one that we're currently in when capture_lex is called
21:14 masak patrickas: in which document? the README?
21:14 masak hm, it might be.
21:15 pmichaud It *used* to be that Parrot would perform checks at this point to verify that the :outer() flag on the inner block matched the sub of the current context.  But those checks got removed, thankfully.
21:16 spinclad so does it squirrel the current context away now, or leave a note to get it from the 'current sub' later, on invocation?
21:17 spinclad (and is 'current sub' the static object, or the current invocation?)
21:18 pmichaud it sets the outer_ctx pointer in the sub object
21:18 pmichaud rephrase
21:18 pmichaud it sets the outer_ctx pointer in the sub object of the inner sub
21:18 pmichaud *inner block
21:18 pmichaud when that inner block is executed, it creates a new context, and sets the outer_ctx of the context to the outer_ctx of the sub
21:19 pmichaud it's much easier if we give the subs names
21:19 pmichaud so, let's call the outer sub A and the inner sub B
21:19 pmichaud when A is invoked, it gets a new context
21:19 pmichaud A then calls capture_lex on B, which sets the outer_ctx pointer of B to the current context (i.e., the one that is running A)
21:20 pmichaud when B gets invoked, it gets a new context.  That new context gets its outer_ctx pointer set to the same value as outer_ctx on B
21:21 pmichaud if A exits before B is invokved, its context continues to live because B retains a pointer to it
21:21 spinclad when A is invoked, _the new closure_ gets a new context
21:22 pmichaud ?
21:22 pmichaud I don't follow that.
21:24 pmichaud I haven't covered cloning yet, no.
21:24 pmichaud what needs to change in PCT is that whenever a PAST::Block is used as an rvalue, we need to have the option of cloning the returned sub
21:26 pmichaud so, at the point where the Parrot sub gets used as an rvalue, we clone it first and then do capture_lex on the cloned sub
21:26 diakopter when would that option be used and when wouldn't it be
21:26 spinclad (i'm wondering if we should distinguish the static sub &A (with its LexInfo etc)  and the closure !A (with its context) )
21:27 pmichaud spinclad: in that sense, "closure" and "context" seem synonymous with me.
21:27 spinclad ok
21:27 pmichaud but yes, we can speak of &A as the static sub, and !A as being a specific invocation of &A
21:28 pmichaud diakopter: I generally don't want to clone a sub when it's going to be invoked immediately
21:28 spinclad and you can have multiple !A's active simultaneously
21:29 pmichaud so, we wouldn't clone the sub when it's in void context (because the clone will simply be discarded)  or when it's going to be immediately executed
21:30 spinclad so one !A calls capture_lex on &B, which sets up a new !B with an outer_ctx pointer to !A
21:31 pmichaud no
21:31 pmichaud contexts aren't created until a sub is invoked.  (Arguably this is a parrot misdesign.)
21:31 pmichaud so we don't get a new !B until &B is invoked
21:31 pmichaud !A calls capture_lex on &B, which sets the outer_ctx property of &B to !A
21:31 diakopter perlesque's model is a tad different; a class exists for each block, and a new instance of that class is "new'd up" (as they say) upon declaration/appearance, taking the current context as its argument. there's no such thing as "cloning", then.
21:32 pmichaud then when &B is invoked, it creates a !B that has its outer_ctx initalized to the same value as &B's outer_ctx (i.e., !A)
21:32 pmichaud so that !B has !A as its outer context.
21:33 pmichaud so, here's an example
21:33 pmichaud sub A($a) { -> { say $a } }
21:33 pmichaud the outer sub is &A, the pointer block is &B
21:34 spinclad then... two !A's can return &B's, except they are the same, because they aren't !B's yet...
21:34 pmichaud spinclad: yes, that's PCT's current issue.  Here's how it gets fixed...
21:34 spinclad ok
21:34 pmichaud when we invoke &A, that creates a !A that has a $a slot in its LexPad with the current value of $a
21:35 pmichaud the inner block is being used as an rvalue (it's being returned), so we first clone &B and then perform capture_lex on the cloned &B.  This cloned &B gets returned to &A's caller
21:36 pmichaud if &A gets invoked a second time, we get a new !A with a new $a.  But this doesn't affect the cloned &B, which still has the first !A as its outer_ctx
21:37 pmichaud so when the cloned &B is invoked, it still sees the original !A as its outer context
21:38 spinclad good, !A is bound into the !B at the right time (creation, not invocation)
21:38 spinclad (creation of !B)
21:39 spinclad if i understand you
21:39 pmichaud close
21:39 pmichaud !A is bound into the cloned &B
21:39 pmichaud and the !B is created from the cloned &B
21:40 pmichaud so one can think of cloning &B as "creating a closure that capture's the current outer context"
21:40 pmichaud and invoking &B then simply creates a !B context that has !A as its outer context
21:41 pmichaud note that we really can't create a context for &B at the time it's cloned, because contexts are per-invocation
21:41 wknight8111 joined #perl6
21:41 [Coke] w/in 6
21:41 pmichaud in particular, if I have   my $x = A(4);     it's perfectly valid for me to call $x() multiple times -- each call will need its own context
21:41 * masak hugs [Coke], good irssi user :)
21:41 diakopter [Coke]: Esc, 6  doesn't work?  it's what I use.
21:42 [Coke] diakopter++ you just saved me a ton of typing.
21:42 jnthn Oh wow, I've been using Alt + 6 for years.
21:42 pmichaud in my irssi client, Alt+6 works just fine
21:42 jnthn TMTOWTCW.
21:43 * diakopter didn't know about Alt+6; seems a little more efficient than Esc,6
21:43 spinclad right.  let's call #B the clone, now pointing to !A, and invocations of #B will be !B's.
21:44 pmichaud yes.
21:44 pmichaud and another invocation of &A will result in a new &B clone
21:44 Tene Oh, people do that because they don't know about the hotkey?  I always thought people did that out of preference.
21:44 pmichaud and that &B clone will have the new invocation of &A
21:44 diakopter hotkey*s*
21:44 spinclad this sounds good.  each #B knows !A, and each !B knows its params and locals.
21:45 pmichaud correct.
21:45 pmichaud anyway, PCT can almost handle all of this already
21:45 * diakopter curious: does this require a parrot change to make work?
21:46 Tene [Coke]: run /bind with no args to get a list of current bindings.
21:46 pmichaud diakopter: Until this morning I was worried that it did need a change, because I was remembering the old capture_lex semantics
21:46 pmichaud but apparently when I "fixed" lexicals in 2008, I turned off the extra outer-scope checking that would cause all sorts of problems
21:46 pmichaud so it's a win :-)
21:47 diakopter ftW
21:47 spinclad let me give a deferred \o/ , and a present happy.
21:49 diakopter pmichaud: did you see perlesque passes (a strongly-typed edition of) man_or_boy.t (and speedily)(, even up to x=24)?
21:50 spinclad oh!  where is #B storing !A then?  ??in the outer-scope pointer?  isn't that part of the static &B??
21:51 spinclad or is that already dynamic since 2008?
21:51 spinclad (/me still confused)
21:52 spinclad (dynamic and per-instance)...
21:52 spinclad (per-clone)...
21:53 pmichaud #B is a clone of &B
21:53 pmichaud so it has its own outer_ctx pointer
21:53 pmichaud diakopter: no, I didn't see that. congrats!
21:54 spinclad ok, outer_ctx is a field of #B, not of &B, good.
21:55 pmichaud well, it's a field of &B also, it's just that we end up setting it on both :-)
21:55 pmichaud we set it on &B at the beginning of &A, and then we set it on #B at the point where &B is being used as an rvalue
21:56 pmichaud (i.e., we clone &B and capture_lex it)
21:58 spinclad ok, happy again then.   no more questions, your honor.  thank you for the explanation!
21:59 diakopter bailiff, you may escort the witness back to his cell
21:59 Tene pmichaud: so what work remains to be done, specifically?
22:00 pmichaud the code in PAST::Compiler.pir (line 985)  has to be refactored to allow the possibility of cloning a sub before it's capture_lex'd
22:00 pmichaud but this gets tricky because the register that holds the sub is currently a Parrot .const, and you can't clone in that case
22:00 pmichaud i.e., we'd need a new register
22:01 pmichaud so, a fair bit of register management in that code needs a bit of a refactor
22:02 pmichaud nothing too difficult for someone already familiar with the code :-)
22:02 pmichaud but after that's fixed, then nqp-rx has to be reworked to take advantage of it
22:02 pmichaud (so that we can avoid a parrot deprecation, too)
22:03 spinclad (i don't quite see the need to set !A in &B at A's start, could you not set it directly in #B when it's created (at rvalue time)?)  but one thing at a time
22:03 pmichaud you could, but we have the case of
22:03 pmichaud sub A($a) { say $a;  our sub B() { say $a; };   say 'done with A'; };    A(4);   B();
22:03 pmichaud where B isn't used/returned as an rvalue
22:04 pmichaud alas, I have to leave "right now" for family dinner.  I'll be back in 2 hrs
22:05 spinclad aye.  i think i could find an rvalue there too, but later.  dinner here too.
22:10 \\shade\\ joined #perl6
22:13 spinclad or else that it's fundamentally incoherent...  A(4); A(5); B();   there isn't a sensible channel from the sub B value inside A to the B() in the outer scope.  i would complain back to the spec, here.
22:14 spinclad afk &  # for real now!
22:16 diakopter std: our sub blue() { our sub blue() } }
22:16 p6eval std 30618: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of routine 'GLOBAL::<&blue>' (from line 1) at /tmp/aK5Ob9q3r1 line 1:␤------> [32mour sub blue() { our sub blue[33m⏏[31m() } }[0m␤Missing block at /tmp/aK5Ob9q3r1 line 1:␤------> [32mour sub blue() { our sub blue()
22:16 p6eval ..[33m⏏[3…
22:16 diakopter rakudo: our sub blue() { our sub blue() } }
22:16 p6eval rakudo ed2409: OUTPUT«Malformed our at line 11, near "sub blue()"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
22:16 diakopter rakudo: our sub blue() { our sub blue() { } }
22:16 p6eval rakudo ed2409:  ( no output )
22:17 diakopter std: our sub blue() { our sub blue() { } }
22:17 p6eval std 30618: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of routine 'GLOBAL::<&blue>' (from line 1) at /tmp/Zdp5HETcNl line 1:␤------> [32mour sub blue() { our sub blue[33m⏏[31m() { } }[0m␤Check failed␤FAILED 00:01 111m␤»
22:19 ash__ so... in pmichaud's example above, calling &A twice would result in an error the second call?
22:19 \\shade\\ joined #perl6
22:20 diakopter rakudo: sub A($a) { say $a; our sub B() { say $a; };   say 'done with A'; };    A(4);   B();
22:20 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in B␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
22:21 ash__ alpha:  sub A($a) { say $a; our sub B() { say $a; };  say 'done with A'; };    A(4);  B();
22:21 p6eval alpha 30e0ed: OUTPUT«4␤done with A␤4␤»
22:21 diakopter alpha: sub A($a) { say $a; our sub B() { say $a; };   say 'done with A'; };     B();
22:21 p6eval alpha 30e0ed: OUTPUT«Null PMC access in type()␤in Main (file <unknown>, line <unknown>)␤»
22:22 ash__ alpha: our &B; sub A($a) { say $a; &B = sub () { say $a; };  say 'done with A'; };    A(4);  B();
22:22 p6eval alpha 30e0ed: OUTPUT«4␤done with A␤4␤»
22:26 ash__ so... is it a safe assumption that the only time you have to create a closure is when you use a function as an rvalue?
22:31 diakopter ash__: or declaring a named sub in a routine that has its own context enclosed by another function
22:33 ash__ are there any others maybe more edge cases?
22:33 diakopter pugs:  sub a($d) { sub b($e) { say $e }; return sub($e) { b($e + $e) } }; my $g = a(4); $g(5);
22:33 p6eval pugs: OUTPUT«10␤»
22:34 diakopter oops
22:34 diakopter pugs:  sub a($d) { sub b($e) { say $d + $e }; return sub($e) { b($e + $e) } }; my $g = a(4); $g(5);
22:34 p6eval pugs: OUTPUT«10␤»
22:34 diakopter that's incorrect
22:35 KyleHa joined #perl6
22:35 diakopter rakudo:  sub a($d) { sub b($e) { say $d + $e }; return sub($e) { b($e + $e) } }; my $g = a(4); $g(5);
22:35 p6eval rakudo ed2409: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)␤»
22:36 ash__ alpha: sub a($d) { sub b($e) { say $d + $e }; return sub ($e) { b($e + $e) } }; my $g = a(4); $g(5);
22:36 KyleHa Problem with pugs svn right now?
22:36 diakopter that's... I don't know.
22:36 p6eval alpha 30e0ed: OUTPUT«14␤»
22:36 ash__ your missing a space
22:36 ash__ rakudo: sub a($d) { sub b($e) { say $d + $e }; return sub ($e) { b($e + $e) } }; my $g = a(4); $g(5);
22:36 p6eval rakudo ed2409: OUTPUT«14␤»
22:36 diakopter that's correct
22:36 diakopter pugsbug there
22:36 ash__ you had a sub( which it was confused by
22:36 diakopter ah
22:36 diakopter KyleHa: yeah it looks like feather got kilt
22:37 KyleHa Eta on return?
22:37 diakopter no idea... no way to contact Juerd except irc
22:37 diakopter and he uses irc through feather.
22:38 KyleHa Heh. Ok, thanks!
22:48 lisppaste3 BrowserUk annotated #99095 "POE does not implement a scheduler!" at http://paste.lisp.org/display/99095#1
22:57 Psyche^ joined #perl6
23:11 circuitbreaker joined #perl6
23:12 diakopter perlesque: sub a(int $d --> Callable[:(int --> int)]) { sub b(int $e --> int) { say($d + $e); return 1 }; return sub (int $e --> int) { b($e + $e); return 1 } }; my $g = a(4); $g(5);
23:12 p6eval perlesque: OUTPUT«14␤»
23:12 diakopter perlesquel: .
23:12 p6eval perlesquel: OUTPUT«14␤real 0.05␤user 0.05␤sys 0.00␤»
23:15 ruoso joined #perl6
23:17 spinclad rakudo: for ^4 -> $a { our sub blue() { $a; }; }; say blue;
23:17 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in blue␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:18 spinclad rakudo: sub A($a) { our sub B() { $a; }; }; for ^4 { A($_); }; say B;
23:18 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in B␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:20 spinclad phenny: tell ash__ i can argue that whenever you use a function you use it as a rvalue, so create a closure.
23:20 phenny spinclad: I'll pass that on when ash__ is around.
23:26 spinclad phenny: tell ash__ (even if thrown away in sink context) ... but pmichaud seemed to have a different point of view on #rs.
23:26 phenny spinclad: I'll pass that on when ash__ is around.
23:54 TimToady BTW, ALT+6 works on firefox tabs too, at least on my machine
23:55 TimToady well, you have to have at least 6 tabs for that particular one...
23:56 jnthn Hmm...doesn't on mine. That's too bad.
23:56 * jnthn would kinda like that.
23:57 sorear jnthn: Eventually, once we have metaclass compatibility, we're going to need a bit more magic - you need to rebuild LTM automata at class compose time
23:59 diakopter jnthn: Ctrl-6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs