Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-05-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 frettled joined #perl6
00:13 whiteknight joined #perl6
00:20 raiph joined #perl6
00:20 cognominal___ joined #perl6
00:31 lichtkind_ joined #perl6
00:42 pat_js joined #perl6
00:53 mtk joined #perl6
00:56 fgomez joined #perl6
01:12 replore_ joined #perl6
01:13 scott_ joined #perl6
01:21 domidumont joined #perl6
01:21 diakopter joined #perl6
01:21 ashleydev joined #perl6
01:21 Exodist joined #perl6
01:21 tokuhiro4 joined #perl6
01:21 kst joined #perl6
01:21 jlaire joined #perl6
01:21 renormalist joined #perl6
01:21 Maddingue joined #perl6
01:21 tokuhirom joined #perl6
01:26 Facefox joined #perl6
01:30 domidumont joined #perl6
01:30 diakopter joined #perl6
01:30 ashleydev joined #perl6
01:30 Exodist joined #perl6
01:30 tokuhiro4 joined #perl6
01:30 kst joined #perl6
01:30 jlaire joined #perl6
01:30 renormalist joined #perl6
01:30 Maddingue joined #perl6
01:36 Facefox joined #perl6
01:46 ggoebel joined #perl6
01:55 dalek tablets: 30e9777 | (Herbert Breunung)++ | docs/tablet-3-variables.txt:
01:55 dalek tablets: codeblocks cant have links
01:55 dalek tablets: review: https://github.com/perl6/tablets/commit/30e9777734
01:57 libertyprime joined #perl6
02:09 tokuhirom joined #perl6
02:09 lestrrat joined #perl6
02:10 leprevost joined #perl6
02:17 lestrrat joined #perl6
02:20 orafu joined #perl6
02:24 araujo joined #perl6
02:24 araujo joined #perl6
02:30 benabik joined #perl6
02:33 fgomez joined #perl6
02:37 fgomez joined #perl6
02:44 baest joined #perl6
02:48 cognominal___ r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; doit(&a)
02:48 p6eval rakudo dca0fa: OUTPUT«Int 1␤»
02:49 cognominal___ now suppose I want to pass to doit only the sub with the Int signature, what is the syntax to do that?
02:55 domidumont joined #perl6
02:55 diakopter joined #perl6
02:55 ashleydev joined #perl6
02:55 Exodist joined #perl6
02:55 tokuhiro4 joined #perl6
02:55 kst joined #perl6
02:55 jlaire joined #perl6
02:55 renormalist joined #perl6
02:55 Maddingue joined #perl6
02:55 Facefox joined #perl6
02:57 leprevost joined #perl6
02:59 fgomez joined #perl6
02:59 fgomez_ joined #perl6
03:03 sorear cognominal: the syntax is &a:(Int).  However, the full syntax is impossible to implement (by reduction to Rice's theorem), and i don't think any implementation has even a partial version yet
03:03 sorear r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; say &a.candidates
03:03 p6eval rakudo dca0fa: OUTPUT«sub a(Int $i) { ... } sub a(Str $i) { ... }␤»
03:04 sorear r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; say &a.candidates.first(/Int/)
03:04 p6eval rakudo dca0fa: OUTPUT«No values matched␤  in method gist at src/gen/CORE.setting:9059␤  in sub say at src/gen/CORE.setting:6802␤  in block <anon> at /tmp/oi7j5kxZbd:1␤␤»
03:04 sorear r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; say &a.candidates.first(rx/Int/)
03:04 p6eval rakudo dca0fa: OUTPUT«No values matched␤  in method gist at src/gen/CORE.setting:9059␤  in sub say at src/gen/CORE.setting:6802␤  in block <anon> at /tmp/UbRpZyidam:1␤␤»
03:04 sorear r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; say &a.candidates.first({ .signature.gist ~~ /Int/ })
03:04 p6eval rakudo dca0fa: OUTPUT«sub a(Int $i) { ... }␤»
03:04 sorear r: multi sub a(Int $i) { say "Int $i" }; multi sub a(Str $i) { say "Str $i" };  sub doit(&f) { f(1) }; doit(&a.candidates.first({ .signature.gist ~~ /Int/ }))
03:04 p6eval rakudo dca0fa: OUTPUT«Int 1␤»
03:05 sorear cognominal: is that a viable workaround?
03:06 adu joined #perl6
03:09 lestrrat joined #perl6
03:21 xinming joined #perl6
03:21 fgomez joined #perl6
03:23 derrazo joined #perl6
03:23 derrazo left #perl6
03:27 cognominal that's ok. I did not know about Rice theorem.
03:27 cognominal sorear++
03:58 cognominal joined #perl6
04:04 fgomez joined #perl6
04:07 adu joined #perl6
04:10 flussence joined #perl6
04:14 sisar joined #perl6
04:15 sisar o/
04:15 phenny sisar: 22 May 22:45Z <diakopter> tell sisar  < benabik> Parrot builds with debugging by default and nqp/Rakudo use the same options as Parrot.
04:20 sisar https://twitter.com/chromatic​_x/status/205049596118962178   :|
04:26 spaceships joined #perl6
04:52 moritz \o
04:54 sorear o/ moritz
05:05 cognominal_ joined #perl6
05:07 birdwindupbird joined #perl6
05:13 adu joined #perl6
05:38 flussence joined #perl6
05:39 wtw joined #perl6
05:58 kaleem joined #perl6
06:01 cognominal joined #perl6
06:04 brrt joined #perl6
06:19 adu joined #perl6
06:21 dalek star: 7d37beb | moritz++ | skel/docs/announce/2012.05:
06:21 dalek star: [announce] whoops, spin back two years
06:21 dalek star: review: https://github.com/rakudo/star/commit/7d37beba55
06:27 moritz star released, announcements sent
06:36 adu cool
06:37 brrt left #perl6
06:38 mucker joined #perl6
06:50 NamelessTee joined #perl6
06:59 tadzik \o/ moritz++
07:06 brrt joined #perl6
07:06 frettled moritz++ - goodie!
07:31 stol_ joined #perl6
07:53 fhelmberger joined #perl6
08:26 sisar mortz++
08:26 dakkar joined #perl6
08:26 sisar who controls this account: https://twitter.com/#!/perl6 ? It needs to be revived.
08:28 * moritz has no idea
08:28 tadzik great. Perl is now self-conscious, and it wants to be Perl 6
08:32 mucker joined #perl6
08:33 frettled tadzik: what? :)
08:33 tadzik ;)
08:42 masak PerlJam: forethought isn't some alternative side-story in the coffee-mug incident. it's right there in canon. "This was the most perfectly planned tantrum you have ever seen. If any of you know Jon, he likes control. This was a perfectly controlled tantrum." http://strangelyconsistent.org/bl​og/happy-10th-anniversary-perl-6
08:43 moritz eeks, it seems we have regressed on -M and nobody noticed :/
08:46 frettled So there's a test missing?
08:46 moritz aye
08:46 frettled quick, group hug!
08:46 moritz and it was me who broke it. Of course.
08:46 moritz hugme: hug me
08:46 * hugme hugs moritz
08:46 moritz hugme: hug everybody
08:46 * hugme hugs everybody
08:48 stol_ joined #perl6
08:52 dalek rakudo/nom: a90efc7 | moritz++ | src/Perl6/Grammar.pm:
08:52 dalek rakudo/nom: unbreak -M command line option
08:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a90efc7730
08:55 moritz ... and Test::Util doesn't support passing command line arguments before the script file name
08:56 frettled oops
09:03 moritz I'm currently coding a bit in matlab
09:04 moritz and overall it seems to be a quite nice language for its domain
09:04 moritz but what I hate is that it uses the same bracketing for calling a function and for indexing into arrays/vectors/matrices
09:04 moritz m(1, 2) # could call a function with two arguments, or index into an at-least-2D matrix
09:06 moritz that's surprising, especially if you consider that matlab is mostly used for math stuff, and in math you have quite different notation for functions and for indexing
09:11 lestrrat joined #perl6
09:18 lestrrat joined #perl6
09:20 * sisar too remembers being surprised by that
09:24 masak VB is famous for overloading its () syntax, too.
09:25 moritz r: module A { constant b is export(:const) = 5 }; import A :const; say b
09:25 p6eval rakudo a90efc: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&b' called (line 1)␤»
09:25 masak but in a way it makes a lot of sense. any of these container types could be seen as a function of sorts.
09:25 masak I agree it's a crappy unification, but it's a unification :P
09:26 moritz r: module A { my $b is export(:const) = 5 }; import A :const; say $b
09:26 p6eval rakudo a90efc: OUTPUT«===SORRY!===␤Variable $b is not declared␤at /tmp/jsFBz0PuU8:1␤»
09:27 masak yay! it is a good backlog when Rice's theorem gets mentioned :)
09:27 moritz but I didn't quite understand its relevance there
09:28 moritz if you declare   sub f(Int &foo) { }   then the signature doesn't restrain &foo to functions that return ints, but to functions that declare that they return an Int
09:28 moritz which is easy to check; no need to invoke Rice's theorem
09:28 masak troo
09:28 moritz or did I misunderstand the context?
09:28 masak I just assoomed it had something to do with the intractability of where clauses.
09:29 masak but maybe that's entirely beside the point.
09:30 moritz ah, I'm missing the point too
09:30 moritz it's about selecting one specific multi
09:30 moritz which is very possible, if you stick to nominal types
09:30 masak aye.
09:30 moritz which is the example that cognominal++ wanted
09:30 masak right, and sorear only said that a generalized version is impossible.
09:31 masak which shouldn't stop us from doing the nominal-type cases.
09:31 moritz maybe we can give multis with where-clauses explicit names, and use those
09:32 jqb joined #perl6
09:32 moritz multi a(Int $x where * > 0 ) is named('positive ints') {  }; my &cand := &a:named('positive ints'); cand(3)
09:33 moritz and the compiler can enforce uniqueness of names at compile time
09:33 frettled Is that syntax there specced?
09:33 moritz no, I'm speculating
09:34 frettled I think it could use a little bit more sugar.
09:34 moritz I'm not sure. It's not a feature you're supposed to use often
09:34 frettled But if you already know which candidate multi to use, then it seems to me that it would be better if it wasn't a multi.
09:35 moritz it falls in the category "hairy things that should be possible"
09:35 frettled I'm not sure it should.
09:35 moritz frettled: but there are good use cases
09:35 moritz frettled: for example if you implement a subclass of a numeric type
09:36 bbkr joined #perl6
09:36 moritz something like   class MyInt is Int { }
09:36 moritz and then you want a   multi sub infix:<+>(MyInt, MyInt) that reuses the parent classes' infix:<+>, but then casts the result into a MyInt
09:37 moritz then you explicitly want to call infix:<+>(Int, Int)
09:38 frettled Why would you want to do that if the Int in question satisfies MyInt?
09:38 moritz and you can't just use callsame(), because you'll also specify an infix:<+>(MyInt, Int) and a (Int, MyInt) candidate
09:38 moritz frettled: so that you can fiddle the return type into a MyInt
09:38 moritz frettled: the parent's infix:<+> returns an Int, not a MyInt
09:39 moritz frettled: and because rakudo doesn't allow that, Instant isn't a subclass of Rat in Rakudo, but has-a Rat
09:39 kresike joined #perl6
09:39 kresike morning all
09:39 moritz though inheritance would have made other stuff much less effort
09:40 moritz \o kresike
09:40 kresike moritz, o/
09:40 frettled morning, kresike :)
09:41 * kresike .oO(these o/ signs are so nice)
09:41 kresike morning frettled
09:41 frettled moritz: but knowing that, why wouldn't you just recast as Int?
09:41 moritz frettled: because that's not the return type I want
09:42 * moritz confused
09:42 frettled Wait, you just said that you wanted an Int as a return type instead of the MyInt
09:42 moritz no, the other way round
09:42 moritz I want MyInt + MyInt to return a MyInt
09:42 moritz sorry if that didn't come out clear
09:42 frettled So you want an infix:<+>(MyInt, MyInt) that returns Int?
09:42 frettled s/want/ don't want/
09:43 moritz so, I need to re-dispatch to the Int + Int -> Int operator, and then change Int -> MyInt
09:43 moritz and this re-dispatching is an IMHO valid use case for dispatching to a specific multi candidate
09:44 frettled I see your point, but why wouldn't infix:<+>(MyInt, MyInt) return a MyInt in the first place?
09:44 frettled I guess that's my barrier for the example.
09:44 moritz frettled: how would you write infix:<+>(MyInt, MyInt) ?
09:44 frettled moritz: I wouldn't :D
09:45 moritz well, I'd write it as
09:46 moritz sub infix:<+>(MyInt $a, MyInt $b) { MyInt( infix:<+>:(Int, Int).($a, $b) ) }
09:46 moritz and for that I need to select a candidate
09:46 moritz I wouldn't know how else to write it, except by re-inventing addition
09:47 daxim_ joined #perl6
09:49 nebuchadnezzar joined #perl6
09:51 frettled I think I can come up with a better contrived example.
09:52 moritz that's nice. I don't have a claim on the best contrieved example :-)
09:52 frettled You have a custom type called Nat (for natural numbers), and one called NegNat, which are defined by: Int $x where * > 0  and  Int $x where * < 0
09:52 frettled NOW you get a selection problem.
09:52 frettled Before, you hadn't, because your "where" candidate was the only one using "where", therefore being more specific than the one that didn't.
09:53 moritz right, my example didn't cover that case
09:53 moritz I was just arguing for the need to select multis at all
09:53 sisar joined #perl6
09:53 frettled Still, it would be feasible to automatically select a candidate with a little bit of effort.  You just can't do so generally for bazillions of candidates.
09:54 moritz one could always pass concrete values along with the types to do the selection
09:55 moritz &foo:(Int):val(-1) # gets the NegNat candidates
09:55 moritz modulo confusion, of course :-)
09:57 frettled It still looks like there is something wrong with the problem itself, though.
09:59 frettled I'll go grab some lunch, and if I can come up with anything clever, I'll say it in a bit more than an hour or so.  :)
09:59 frettled moritz: thanks for the challenge :)
10:00 moritz frettled: :-)
10:00 moritz fwiw in the setting, I'd solve this problem with   nqp::box_i(nqp::add_i(nqp::unbox_i($a), nqp::unbox_i($b)), MyInt)
10:01 moritz but that's not portable
10:07 am0c joined #perl6
10:10 moritz wow, matlab has closures and anonymous functions
10:10 moritz I'm starting to like it even more :-)
10:21 sisar phenny, tell jnthn, i did obtain a backtrace (https://gist.github.com/2774389). Also see my comments on the gist for how I obtained it. Most importantly, I have no idea how the process works, I just worked on my intuition . So if you want me to rerun in some other way, do let me know.
10:21 phenny sisar: I'll pass that on when jnthn is around.
10:23 nebuchadnezzar joined #perl6
10:24 moritz maybe     perl6 --ll-exception /home/siddhant/.perl6/bin/panda install LWP::Simple   is also interesting (though gives a backtrace on a quite different level)
10:24 * moritz has no idea about the context
10:24 donaldh joined #perl6
10:25 sisar I was trying to investigate the non-deterministic module build failures we've been seeing lately with Panda
10:25 moritz sisar++
10:26 sisar I had no idea about --ll-exception !
10:26 sisar oh it is mentioned in `man perl6` !
10:26 dakkar joined #perl6
10:27 nebuchad` joined #perl6
10:28 [hds] joined #perl6
10:30 sisar phenny, tell jnthn, moritz++ gave me the idea for --ll-exception, so here is the gist for `perl6 --ll-exception /home/siddhant/.perl6/bin/panda install LWP::Simple` : https://gist.github.com/2774471.
10:30 phenny sisar: I'll pass that on when jnthn is around.
10:31 moritz sisar: I'm afraid that's not too useful
10:31 sisar oh
10:31 moritz sisar: because it gives the backtrace from inside panda, not from inside the perl6 process that tries to build the module
10:31 moritz my fault
10:32 moritz so the correct approach is to see what shell commands build() launches
10:32 sisar maybe the backtrace will help then...
10:32 moritz and add the --ll-exception option to that buid step
10:33 moritz so probably something like perl6 --ll-exception --target=pir --output=blib/lib/LWP/Simple.pir lib/LWP/Simple.pm
10:34 sisar moritz: maybe, before we load jnthn with so much information, I'd like to wait for his opinion on the backtrace :)
10:35 moritz maybe :-)
10:36 * sisar afk
10:37 mucker joined #perl6
11:00 JimmyZ_ joined #perl6
11:02 frettled moritz: maybe NQP should be made portable ;)
11:11 masak frettled: portable!? why do you hate Parrot so much? :P
11:11 tadzik :>
11:14 frettled masak: :D
11:14 frettled Maybe we should just skip Perl 6 and go for NQP instead, everything seems much simpler there.  ;)
11:15 masak I think NQP will grow up to be quite a mature little language.
11:15 frettled yup
11:16 masak maybe a course could be focused around teaching NQP, and then adding on the Perl 6-specific parts in the second "half".
11:22 frettled That would be pretty cool.
11:23 frettled Or, if someone hasn't done so already: give a introductory talk about NQP, then publish the talk.
11:30 dakkar joined #perl6
11:32 adu joined #perl6
11:39 moritz Woodi: a blog post for you: http://perlgeek.de/blog-en/perl-6/2012-n​ews-in-rakudo-2012-05-release.writeback
11:40 masak moritz++
11:41 mikemol joined #perl6
11:53 jaldhar joined #perl6
11:55 tadzik moritz: nice one :)
11:55 tadzik I, for one, adore -MGrammar::Tracer
11:55 moritz except that it's broken in the release :(
11:56 tadzik aw
12:03 bbkr moritz++ # nice blog post about lib.pm
12:11 moritz thanks everybody
12:18 donaldh joined #perl6
12:28 stol_ joined #perl6
12:37 daxim_ moritz, 2012-news-in-rakudo-2012-05-release.html =~ s/epxort/export/
12:38 moritz daxim_: thanks, fixed
12:38 moritz daxim_++
12:43 bluescreen10 joined #perl6
12:47 pat_js joined #perl6
12:52 PacoAir joined #perl6
12:53 thou joined #perl6
13:00 PerlJam masak: Sure ... *now* it's canon.  But it wasn't at the time it happened.  The "true story" for those of us who weren't there didn't come out until later.
13:01 PerlJam masak: my point was that all of my memories will be tainted by what I learned, thought or felt afterwards.
13:06 Util joined #perl6
13:06 fglock joined #perl6
13:07 Psyche^ joined #perl6
13:07 jerome_ joined #perl6
13:10 bluescreen10 joined #perl6
13:21 lichtkind joined #perl6
13:24 mikemol_ joined #perl6
13:28 skids joined #perl6
13:34 masak PerlJam: consented.
13:35 masak I wasn't there, so my memory of that day is 100% what I learned, thought or felt afterwards ;)
13:35 am0c joined #perl6
13:35 * moritz vividly remembers not being there
13:36 * masak .oO( "I was facing north at the time." )
13:36 ggoebel joined #perl6
13:40 shinobicl joined #perl6
13:40 Facefox joined #perl6
13:42 Facefox joined #perl6
13:50 * masak implements loops in QAST
13:50 tadzik yay!
13:52 colomon go masak!
13:53 tadzik go masak! go masak! go masak! go masak! ...
13:53 frettled ooh
13:56 JimmyZ_ push! push! push!
13:58 masak heh.
14:00 kresike masak, commit first, then push :)
14:00 masak nqp occupies that sweet spot in that it's clearly a high-level language and flexible and expressive, but it's also close enough to the "metal" of the VM that it's suitable for implementing a compiler.
14:01 masak I mean, I could just imagine swearing over code like this in PIR. here, it's wonderful.
14:02 masak in some regards, nqp feels like Python, actually.
14:03 masak Only One Way, regularly. fairly strict typing. looks more Serious and Official than Perl.
14:04 daxim_ serious business
14:05 masak maybe it's the feel of "we gave you a reduced set of things to work with For Your Own Good" that's underlying all those things.
14:06 masak maybe I should say "manual type conversion" rather than "strict typing".
14:12 masak specifically, having this OO API for emitting backend code... lovely.
14:13 masak I wish *I* had thought of that! :)
14:13 masak pmichaud++ jnthn++
14:14 moritz now, is that OO API for emitting backend code copyrightable? :-)
14:15 masak I believe a book could easily be written on top of that idea.
14:17 * moritz looks forward to masak++'s commit
14:17 masak http://www.chris-granger.com/201​2/05/21/the-future-is-specific/ -- makes some interesting points.
14:17 colomon and it seems Perl 6 is well-positioned to take advantage of the trends he sees.  :)
14:18 masak coincidentally :)
14:18 masak but actually taking advantage of those trends requires us to actively move into those domains, of course.
14:20 Timbus|Away joined #perl6
14:23 kaare_ joined #perl6
14:29 adu joined #perl6
14:35 * masak has now managed to make a while loop that loops at most once :)
14:35 masak just need to make it a little more powerful :P
14:36 Woodi moritz: thanx, looks I should at least have candidate what 'lib.pm' can be :)
14:38 HarryS joined #perl6
14:40 geekosaur joined #perl6
14:40 sudokode joined #perl6
14:41 mtk joined #perl6
14:42 kaleem joined #perl6
14:44 replsos joined #perl6
14:45 replsos joined #perl6
14:46 masak warning: nqp suffers from the "variables can be used before they're declared in a lexical scope" problem.
14:46 masak nqp: say $a; my $a
14:46 p6eval nqp: OUTPUT«Confused at line 1, near "say $a; my"␤current instr.: 'nqp;HLL;Grammar;panic' pc 22008 (src/stage2/gen/NQPHLL.pir:7047) (src/stage2/gen/NQPHLL.pm:329)␤»
14:46 masak nqp: say($a); my $a
14:46 p6eval nqp: OUTPUT«␤»
14:47 masak it just bit me, and I was wondering why the thing I expected to be filled with a nice object was Undef.
14:47 moritz right, it keeps track of them per-scope
14:47 masak nqp: say($a.WHAT); my $a
14:47 p6eval nqp: OUTPUT«Can only use get_what on a SixModelObject␤current instr.: '_block1000' pc 39 ((file unknown):43) (/tmp/Aw6bNQw9xb:1)␤»
14:47 masak meh.
14:47 moritz and only complains on codegen
14:47 moritz nqp: say($a.WHAT); my $a := 5;
14:47 p6eval nqp: OUTPUT«Can only use get_what on a SixModelObject␤current instr.: '_block1000' pc 39 ((file unknown):43) (/tmp/wMoaIusvKH:1)␤»
14:49 replsos basic pdf
14:50 masak replsos: intermediate word document
14:51 masak advanced LaTeX
14:51 moritz an IRC channel is not a search box :-)
14:51 dalek nqp/toqast: 694648e | masak++ | / (2 files):
14:51 dalek nqp/toqast: [qast] implement while/until
14:51 cognominal_ joined #perl6
14:51 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/694648e1b8
14:52 masak well, that was fun.
14:52 masak what's the next thing on the list? :)
14:58 NamelessTee joined #perl6
14:59 sirrobert joined #perl6
15:00 sirrobert are there any web frameworks in development for perl6?
15:01 sirrobert I've searched around a bit, but didn't see anything.
15:01 PerlJam sirrobert: Bailador
15:01 felher sirrobert: https://github.com/tadzik/Bailador/
15:01 sisar sirrobert: look for "Bailador"
15:01 felher *lol* :)
15:01 sirrobert heh thanks; looking now
15:01 tadzik :)
15:02 tadzik that PoC has got some reputation
15:02 felher tadzik++ is to blame for Bailador :) There was also an AdventPost about it, i think.
15:02 sirrobert heh
15:02 tadzik I think it was just tadzikpost
15:02 sirrobert quick related question...
15:02 tadzik http://ttjjss.wordpress.com/2012/​01/06/state-of-dancer-on-perl-6/
15:02 sirrobert I love perl5 (though I haven't been able to use it for a little over a year).  I've followed perl6 for a few years.
15:03 sirrobert Now I've started my own tech startup... I *think* I want to use perl6.  Help me convince myself? =)
15:03 tadzik huh, a brave one
15:03 sirrobert (my business partner really LOVES ruby and rails, but I ... don't =)
15:03 tadzik what do you need to use Perl 6 for?
15:03 PerlJam sirrobert: Use Perl 6 for what exactly?  What does the startup do?
15:04 tadzik I'm afraid it may not be ready for your usage, especially as a Ruby on Fails replacement
15:04 tadzik * Rails
15:04 sirrobert Well, the heavy lifting that's speed dependent would be in C libs
15:04 sisar .oO ( intentional typo ? )
15:04 sirrobert I would have us write the front-end (which is an internal-network web-based tool) in whatever.
15:04 sirrobert I'm not especially daunted by the lack of a major web front-end... we could contribute to a project like that.
15:06 sirrobert in a nutshell, we do "big-data" style performance monitoring on applications in arbitrarily large networks.
15:06 PerlJam sirrobert: and you'd want to use Perl 6 for the web front-end?
15:06 masak sirrobert: if you go with Perl 6 in your startup, you have to prepare for various potholes in the road.
15:06 sirrobert initially, anyway.
15:07 PerlJam sirrobert: and you wouldn't care if requests were serviced slightly slowly?
15:07 sirrobert Yeah, I'm not too worried about potholes.
15:07 sirrobert Well, depends on what "slowly" means =)
15:07 masak sirrobert: I would advise you to use Perl 6 for minor scripts first, and then migrate slowly to things like web frontends.
15:07 masak sirrobert: you're not worried about potholes? welcome to #perl6! :D
15:07 sirrobert heh
15:08 sirrobert hmm.
15:08 sirrobert So, I've written some small stuff in perl6 (a year ago, using Rakudo*).  Why start there?
15:08 * tadzik decommutees
15:08 masak sirrobert: I would just suggest not taking too large a first bite. that's a common way to get nowhere.
15:09 masak better to start with small things that work and migrate up/out to larger things that work.
15:09 masak you will hit various scaling issues.
15:09 * PerlJam is dubious but hopeful
15:09 sirrobert masak: sure... I get that.  hmm.
15:10 sirrobert My thought is something like, "Until someone uses it for serious stuff it won't get used for serious stuff."
15:10 PerlJam sirrobert: you'd certainly get lots of help from #perl6 I'll warrant.
15:10 PerlJam sirrobert++
15:10 colomon sirrobert: well said
15:11 sirrobert (reading Bailador stuff now)
15:11 sirrobert Thanks all, btw.
15:12 sirrobert I really loved Catalyst chaining (once I understood it).
15:13 masak sirrobert: it will be an "interesting" journey, in that you will have to write a lot of framework infrastructure yourself.
15:13 masak but that's really the main obstacle I see.
15:13 sirrobert Yeah, I actually see that as a positive.
15:13 masak sirrobert: if you do this, I personally guarantee to help you as much as I can.
15:13 sirrobert masak:  thanks =)
15:14 TimToady where's your startup located, btw?
15:14 sirrobert My CTO is on vacation for a month with his wife, so now is the time ;)
15:14 PerlJam sirrobert: heh!
15:14 masak sirrobert: we need early adopters just like you, who are willing to roll with it and use Perl 6 in production environment.
15:14 sirrobert We're in NC, USA
15:14 masak environments*
15:14 brrt sirrobert: what server will you use?
15:14 sirrobert The good news is our product is targeted (initially) at high tech startups and larger enterprise companies.
15:15 sirrobert It's internally facing, not publicly consumable.  Might be a really good candidate.
15:15 benabik joined #perl6
15:15 TimToady indeed
15:15 sirrobert Is there some kind of design doc for Bailador (besides the repo itself)?
15:15 brrt because i'm in the process of building mod_parrot, which will run parrot - and by extension, rakudo - in the apache web server
15:15 PerlJam sirrobert: Dancer :)
15:15 sirrobert PerlJam: heh
15:16 driador joined #perl6
15:16 TimToady might be better to go the fastcgi route if you don't want to fight possible memory leaks so much
15:17 TimToady though that's a lot more stable these days
15:18 sirrobert TimToady:  mem leaks in Bailador, you mean?
15:18 TimToady I mean, as code gets tweaked in rakudo/parrot, write barriers could go missing temporarily
15:18 sirrobert Ah, fair enough
15:19 TimToady and long-running processes with multiple tasks will tend toward fratricide in those cases
15:19 TimToady but independent processes can be individually restarted more easily
15:23 DreamingInCode joined #perl6
15:23 TimToady DreamingInCode: o/
15:25 DreamingInCode Morning TimToady
15:27 diakopter anyone around who uses parrot/nqp/rakudo on mac os x?
15:27 estrai I'm but currently I'm not on os x
15:28 TimToady my church in Cupertino is the wrong religion for that... :)
15:28 adu diakopter: me
15:29 TimToady well, not exactly wrong, just orthogonal
15:29 diakopter I'm trying to follow the recommended procedure.  It's a fresh mac os x.  I've just installed xcode (that took a while), now I've gone to Preferences..Downloads..Install Command Line Tools (gcc? clang?)
15:30 * benabik uses OS X.
15:31 benabik Yes, you have to install the command line tools, either from XCode or from the dev center.
15:32 vlixes joined #perl6
15:33 diakopter what's the recommended git (package/dmg?)
15:33 benabik I tend to install things via homebrew.
15:34 diakopter is that like macports or fink (both of which I fought years ago)
15:34 benabik It's vaguely similar to macports, but I've found it somewhat better behaved.
15:36 kaleem joined #perl6
15:37 benabik But fink/ports/brew is the typical way to grab libraries and tools.
15:37 diakopter I'm trying out brew. macports and fink made me cry when I used a mbp 3 years ago
15:38 benabik Yeah.  I loved fink for a while, but it's starting to both lag and try to duplicate piles of system libraries and tools.
15:38 diakopter seems I don't need to be root to install packages
15:39 benabik brew's preference is to install somewhere owned by the user.  I just chowned /usr/local to myself.
15:40 cognominal joined #perl6
15:42 sirrobert Are perl6 modules installed globally (as with Perl5/Ruby) or locally to a project (as with node.js)?
15:42 moritz sirrobert: we currently default to installing per-user
15:43 sirrobert moritz:  per-*user*?  where can I read about that?
15:43 sirrobert I'm looking at the ecosystem repo, but I don't see info about that...
15:44 am0c^ joined #perl6
15:44 colomon sirrobert: it installs to ~/.perl6
15:44 moritz sirrobert: the module installer is called panda, and that's what responsible for chosing the installation location
15:44 sirrobert colomon:  Ah, I see what you mean.
15:45 moritz sirrobert: we just have Rakudo pick up modules in ~/.perl6/lib/ by default (as well as in its own installation location), so it is a kind of obvious installation target
15:45 sirrobert moritz:  Thanks
15:45 moritz sirrobert: it was more evolution than design :-)
15:46 sirrobert moritz:  Yeah, that makes sense.  I like how node.js installs to .node_modules in the project directory.
15:46 sirrobert heh nod
15:46 moritz the design approaches we tried suffered from over-design and under-working :-)
15:46 sirrobert heh
15:46 TimToady and nobody has quite implemented what S11 specs for officially installed modules yet
15:46 moritz TimToady: you mean the immutability thingy?
15:47 TimToady for one
15:47 TimToady but maybe the increasing git mindfluence will move people toward that notion of identity
15:48 TimToady basically, official modules are values, not containers :)
15:49 moritz for that to work, our compilers need to become values too
15:49 brrt that is true for parrot
15:50 stol_ joined #perl6
15:51 tokuhirom joined #perl6
15:52 sirrobert gotta go.  thanks all =)
15:53 TimToady we need to encourage startups to take more risks :)
15:53 TimToady btw, is this "Catalyst chaining" something like what our .* does/did?
15:56 * TimToady is still thinking about how to hang declarative traits on a vertical slice of methods of the same name
15:56 TimToady at least we generally know the parentage at compile time, which is something
15:56 PerlJam TimToady: catalyst chaining is hooking together subroutines to be executed based on the URL matching that happens.  So a URL with /foo/5/bar/baz/27   might actually execute some setup sub for the "/foo/5" portion, then another sub for the "/bar" and another for "/baz/27"  (the subs are "chained" together)
15:56 PerlJam s/with/of/
15:57 TimToady okay, so might turn into .* with constraints, if it didn't fail non-bindings
15:58 TimToady which was discussed here some days ago
15:58 TimToady well, perhaps not done with inheritance, but with .*@methodrefs or some such
16:00 PerlJam that sounds about right
16:04 diakopter hm
16:04 diakopter trying to build rakudo from git checkout
16:05 diakopter I give it a --with-nqp and it ignores it and starts building its own nqp. then fails to find parrot even though I provide a --with-parrot=
16:05 * TimToady can't help, always uses --gen-parrot
16:06 diakopter I did use --gen-parrot for nqp; that worked
16:06 tadzik diakopter: I use neither --with-nqp nor --with-parrot, I just have both installed
16:08 diakopter hm, there we go. I needed to make install nqp (which installs it to nqp/install/bin)
16:11 colomon grammar experts: Right now the ABC grammar is entirely regexes.  That works fine as long as the ABC file is correct.  But when there is an error in the file, it seems to effectively go into an infinite loop.  I'm assuming that is all backtracking and trying other options.  How do I work around that?
16:12 masak use tokens instead of regexes.
16:12 masak to a first approximation.
16:12 TimToady is the ABC grammar ambiguous enough to require backtracking?
16:12 colomon TimToady: I don't think so.  Not in the large, for sure.
16:12 PerlJam colomon: put in calls to panic as one of the alternatives?
16:13 TimToady that's the other thing
16:13 TimToady see STD for prior art
16:14 colomon what exactly does using token do?
16:14 masak enables :ratchet
16:14 colomon ...which means?  :)
16:14 masak that is, makes all backtracking constructs non-backtracking by default.
16:14 TimToady S05 is your (big) friend :)
16:14 * colomon did try reading up on this in S05, honest
16:15 masak there are three backtracking modes: greedy (which starts long and shrinks), frugal (which starts short and grows), and ratchet (which starts long and stays that way).
16:16 am0c joined #perl6
16:16 TimToady you might find it runs faster if it doesn't have to remember all the choice points too
16:19 colomon I guess, at a first approximation, what I'm hoping to have it do is say, "I've recognized that's a bar of music.  I'm never  going to backtrack and try to interpret it as something else.
16:19 masak right.
16:19 colomon Is it enough to just change "regex bar" to be "token bar"?
16:19 TimToady probably
16:19 masak as long as your tests still pass, yes.
16:19 PerlJam colomon: that's exactly what ratchet is for
16:19 masak most large languages have this trait, that they're one-pass or mostly one-pass.
16:20 masak garden paths are confusing to human readers as well, so language designers tend to avoid them.
16:21 colomon all my tests still pass.  But that doesn't seem to have helped my problem.
16:21 TimToady somewhere you might want: <bar> || <.panic: "An A, B, and C unwalk into a bar">
16:21 TimToady try changing all your regex to token
16:22 TimToady course, it could just be an normal garden-variety infinite loop too
16:22 colomon Hmm... that at least gets me an error!
16:22 masak \o/
16:23 PerlJam could he say :ratchet on the grammar to make all regex act as token decls?
16:23 TimToady now to get the right error, add more ||
16:23 TimToady why?  "token" is just as short as "regex"
16:23 colomon ...but now two of the test files fail.  :(
16:24 TimToady so maybe you're depending on backtracking for one or two items, like Perl 6 does :)
16:24 PerlJam TimToady: just curiously exploring the option space.
16:24 colomon TimToady: sounds right.  :)
16:24 TimToady PerlJam: seems like multiplying entities to me
16:25 PerlJam probably.  I just never know when that's bad or good  ;)
16:25 TimToady and likely to confuse anyone who sees "regex" and doesn't realize it means "token"
16:25 TimToady that's kinda like the feature in COBOL that could rename labels
16:26 diakopter hm, nieza startup/nop time is 1.2s; rakudo is .28s
16:26 arnsholt moritz: Thanks for merging the cstr branch. My brane has been elsewhere lately
16:26 PerlJam You've just invoked a Godwinesque law by mentioning COBOL
16:26 colomon first thing that's failing is a test of this: token inline_field { '[' <alpha> ':' $<value>=[.*?] ']' }
16:26 TimToady unlike Hitler, COBOL didn't kill COBOL.
16:27 arnsholt Renaming labels? Nifty. Almost as cool as changing the value of literals =)
16:27 colomon the token conflicts with the .*? somehow (he guessed?)
16:27 TimToady or maybe it did...
16:27 diakopter think of all those poor Hitlers who had to change their name
16:27 sorear good * #perl6
16:27 colomon sorear!  \o/
16:28 colomon hmmm, changing just that one token back to a regex fixed all the test errors.
16:28 PerlJam colomon: Is the grammar at https://github.com/colomon/ABC/​blob/master/lib/ABC/Grammar.pm up-to-date except for the token changes?
16:28 colomon that actually kind of makes me worried...
16:29 colomon PerlJam: give me a moment, looks like it may be a day or two old
16:29 TimToady think of all those poor COBOLs who had to change their name...
16:29 colomon nope, that's the latest (minus the token changes)
16:30 TimToady I think most of 'em changed their name to Java
16:31 diakopter COBOL->Oak->Java
16:31 PerlJam colomon: at a guess I'd say it's because of ambiguous prefixes that start with '['
16:32 colomon PerlJam: that's what I was thinking originally myself, but I got the fails when directly testing the inline_field regex/token
16:32 PerlJam completely by itself?
16:32 colomon turns out the error message I was getting was because I was just assuming the alleged ABC file would match the grammar.
16:32 colomon PerlJam: yes
16:34 colomon TimToady: tried your panic code, got the message Unhandled exception: Unable to resolve method panic in class Grammar
16:34 colomon :(
16:40 fridim_ joined #perl6
16:43 REPLeffect joined #perl6
16:49 moritz panic isn't built-in
16:58 colomon moritz: ah
16:59 colomon btw, TimToady++ masak++ PerlJam++ # not going into a near infinite backtracking loop whenever an error is hit is a HUGE improvement in the ABC parser.
16:59 am0c_ joined #perl6
17:00 PacoAir joined #perl6
17:03 cognominal_ joined #perl6
17:06 dalek book: 7ca6798 | (Przemysław Wesołek)++ | src/ (2 files):
17:06 dalek book: Removed underscores from A<>'s and Z<>'s. Closes #68.
17:06 dalek book: review: https://github.com/perl6/book/commit/7ca6798e96
17:14 kresike bye all
17:15 wolfman2000 joined #perl6
17:19 estrabd joined #perl6
17:19 colomon ooo, I think switching from regex to token has made the ABC code about 5% faster!
17:21 felher What does the 'Q' in QAST stand for?
17:21 NamelessTee joined #perl6
17:21 PerlJam P++
17:22 felher Okay, what did the P stand for? :D
17:23 tadzik Parrot, Perl/
17:23 felher okay, thnx u2
17:23 tadzik yw
17:45 uniejo joined #perl6
17:47 cognominal___ joined #perl6
17:52 masak <TimToady> unlike Hitler, COBOL didn't kill COBOL.
17:52 * masak pictures Hitler killing COBOL
17:52 sorear o/ masak
17:53 masak sorear! \o/
17:53 masak felher: the "P" always stands for "Patrick Michaud" :P
17:55 masak felher: the gradual spread of the letter "Q" in the entire toolchain is a reflection on the fact that Patrick Michaud is upgrading from his ordinary, impressive self to a superhuman cyborg with capabilities that defy physics as we know it.
17:55 masak or so I've heard.
17:56 felher Of course! I should have known that! :)
17:56 TimToady masak: hearing voices now, are we?
18:00 masak TimToady: it would be quite awesome to be hearing voices, if the voices were really into strong AI and a hard Singularity takeoff.
18:01 TimToady you mean like Kurzweil hears voices?  :)
18:03 TimToady typical pianist, thinks the piano's voice is a substitute for all other voices...
18:04 TimToady ショッピング &
18:05 * masak kana read that without augmented tooling :)
18:06 masak phenny: jp en "ショッピング"?
18:06 phenny masak: "Shopping" (ja to en, translate.google.com)
18:06 masak shuo2 ping4 :)
18:07 adu TimToady: I would have said kaitoki
18:08 cognominal joined #perl6
18:22 tokuhirom joined #perl6
18:24 * [Coke] backscrolls, and suggests: Quantum Michuad.
18:25 snearch joined #perl6
18:26 masak that does sound like a superhero. a bit like Dr Manhattan.
18:26 PerlJam Coke++
18:29 masak Quantum Abstract Syntax Tree works quite well, too. practically a necessity if your language supports junctions :P
18:29 stol_ joined #perl6
18:31 REPLeffect joined #perl6
18:32 colomon But Quantum Abstract Syntax Tree does *not* sound like a superhero.  :(
18:32 PerlJam As long as we don't start having files with a .qm suffix ...
18:33 masak no, only Quantum Michaud is allowed to have those.
18:34 masak colomon: maybe we should start referring to them as Awesome Syntax Trees instead. I never quite got what's so abstract about them -- I think the "abstract" was put in to make it a TLA.
18:35 colomon Quantum Awesome is a Good Combination.  :)
18:35 PerlJam masak: well, they are a little more abstract than the definite syntax you used to write the code in the first place.
18:35 PerlJam (just maybe not abstract in the right direction for you?)
18:35 masak probably not.
18:36 masak ASTs feel quite concrete to me.
18:39 colomon diakopter++
18:40 diakopter for #perl6 perusal: http://host02.appflux.net/p6/Pe​rl_6_S05_Syntax_Cheat_Sheet.pdf  with fixes from TimToady++ & sorear++
18:41 colomon cause and effect reversed!  ;)
18:41 colomon I'm tempted to print that out and hang it on my wall
18:42 sorear cause and effect reversed?
18:42 masak colomon upping diakopter's karma before diakopter's announcement on-channel.
18:43 colomon what masak says.
18:43 PerlJam diakopter++ nice
18:43 masak I think there's a simple explanation, such as colomon-diakopter privmsg.
18:43 colomon indeed.  :)
18:43 masak no reason to bring in heavier hypotheses than that... oh, nice ;)
18:44 PerlJam diakopter: the goal-matcher description confuses me.
18:44 masak in related news, I think Bell's theorem is rather nice. :)
18:44 Chillance joined #perl6
18:44 dalek emmentaler: 2411e04 | tadzik++ | / (2 files):
18:44 dalek emmentaler: Sort modules by workingness
18:44 dalek emmentaler: review: https://github.com/tadzik/e​mmentaler/commit/2411e04b7f
18:45 REPLeffect joined #perl6
18:45 colomon wait, actually lue's presence for so long disrupted #perl6's causality.  yeah, that's the ticket...
18:45 diakopter PerlJam: any suggestions?  maybe specify "ternary"?
18:45 sorear masak: I think it's amazing how many people have problems with Bell's ...
18:46 PerlJam diakopter: maybe
18:47 masak sorear: Aaronson had a *really* nice, short explanation in a blog post comment of his. I'll see if I can find it.
18:47 PerlJam diakopter: what works in my head is a template  A ~ B C and then talk about A B and C
18:47 masak it boils Bell's down to a level where it's hard to see any alternative to it.
18:48 sorear masak: yes, I am in part referring to Aaronson's last couple of comments
18:48 diakopter oh, oops, I got the Nth thing wrong. fixing.
18:48 masak ah, here: http://www.scottaaronson.co​m/blog/?p=993#comment-43869
18:49 masak sorear: I find those two threads fascinating. not because it's hard to take sides, but because the topics are intriguing.
18:49 sorear you actually read that comment thread?
18:49 snearch joined #perl6
18:50 masak about half of it.
18:50 masak I am quite interested in QM and QC.
18:53 PerlJam quantum mechanics and quality control?  :)
18:53 masak Quantum Computing ;)
18:53 masak and I'm reluctantly fascinated with debates in which scientists deconstruct kooks.
18:55 masak one nice realization of those threads was "if there's no way to express your physical theory as a computer simulation, then that probably means that it's not a physical theory".
18:56 diakopter PerlJam: see if you like the next version
18:58 kubrat jnthn: masak: kudos for the amazing p6 tutorial at the IT meetup last week
18:59 kubrat you've won yourself a new recruit ;)
18:59 masak kubrat: \o/
19:00 masak kubrat: it was our pleasure. so nice to make a tutorial outside of the Perl bubble for once.
19:01 masak we do feel that we have something amazing with Perl 6. the general sense of the audience at the IT meetup was such that it confirmed that feeling. that makes us come back with renewed energy, ready to redouble our efforts.
19:04 PerlJam diakopter: better I think.
19:07 PerlJam diakopter: your original version of the nth() forms would also have worked btw.  :1st  or :st(1)  or :st(5) or :nth(2) or :5th or any of the original forms or the new forms.
19:07 PerlJam diakopter: (though, you have "N:st" rather than ":Nst")
19:10 stephenlb joined #perl6
19:10 diakopter oops
19:16 Facefox joined #perl6
19:17 Facefox joined #perl6
19:25 lexu joined #perl6
19:26 brrt joined #perl6
19:28 pernatiy_ joined #perl6
19:30 masak TimToady: S05 refers to "eager" but not "frugal". (discovered by diakopter++) mind if I make "frugal" the primary term in S05, while also referring to "eager"?
19:31 masak further digging reveals that "minimal" is actually the predominant term in S05 for that kind of backtracking.
19:32 PerlJam masak: ask forgiveness.  :)   I like the term "frugal" too
19:32 * masak makes it so
19:33 birdwindupbird joined #perl6
19:34 diakopter I prefer "minimal"
19:34 PerlJam diakopter: you like the dichotomy between "maximal" and "minimal" ?
19:35 masak if greedy matching were ever referred to as "maximal", I might prefer "minimal" too.
19:35 diakopter yeah.. I can't actually make the greedy/frugal dichotomy work as a metaphor in my head.
19:35 diakopter I can see how greedy means taking as much as possible
19:36 brrt left #perl6
19:36 dalek specs: cac7e30 | masak++ | S05-regex.pod:
19:36 dalek specs: [S05] prefer term "frugal" to "eager"/"minimal"
19:36 dalek specs: review: https://github.com/perl6/specs/commit/cac7e30356
19:36 diakopter but I don't see how frugal can mean take as little as possible
19:36 masak diakopter: maybe the resource being spent is $/ allocation memory :)
19:36 diakopter eager is in there 3 other times
19:37 masak yes, but for other things.
19:37 masak as in, eager list context.
19:37 REPLeffect joined #perl6
19:38 diakopter oh.
19:38 diakopter what is eager list context
19:39 PerlJam diametric opposite of lazy list context ;)
19:39 masak nah, it's more of a sliding scale... :)
19:39 diakopter I don't see how eager meant frugal, then, in what masak replaced
19:39 masak lazy -- egaer -- hyper -- race
19:40 masak eager*
19:40 PerlJam diakopter: it didn't.
19:40 masak diakopter: sorry, I was unclear. I replaced those where "eager" meant "frugal". I kept those where it meant "non-lazy".
19:40 diakopter masak: maximal is used in S05, right before one of the minimals you replaced
19:40 masak oh dang.
19:41 masak shoulda checked that.
19:41 masak 5 uses of "greedy", 2 uses of "maximal" (but only one of them in context)
19:42 diakopter PerlJam: why did masak replace eager with frugal, then?
19:43 diakopter was eager previously misused there?
19:43 dalek specs: 68718e6 | masak++ | S05-regex.pod:
19:43 dalek specs: [S05] ss/<(maximal)> matching/greedy/
19:43 dalek specs:
19:43 dalek specs: Now in a new, even more consistent flavor!
19:43 dalek specs: review: https://github.com/perl6/specs/commit/68718e6ad7
19:43 PerlJam diakopter: I think so.  It doesn't make enough sense to me in that paragraph.
19:44 masak which line are you referring to?
19:44 diakopter the one where you replaced eager with frugal
19:44 cognominal I have written a nice routine to debug a match but it fails when I replace the block 'for' with a postfix one :  https://gist.github.com/2777326
19:44 diakopter To force the preceding atom..
19:45 cognominal do I miss something or is this a bug?
19:45 cognominal s/fails/does not behave as the pristine version/
19:46 masak cognominal: sounds like you're onto something.
19:46 PerlJam diakopter: it's "eager" in terms of success.  As soon as the first match is found, it eagerly stops.  That's partly why like talking in terms of greedy/frugal since those terms are about consumption
19:46 masak cognominal: would appreciate a golfed version, svp.
19:47 cognominal also, the routine could make it into Match.pm  with a more appropriate name
19:48 diakopter PerlJam: I suppose I can see that.
19:48 diakopter but it's confusing because eager can also be taken to mean eagerly take as much it can
19:49 diakopter someone would have to know about eager list context to get the reference, in other words.  like I didn't.
19:49 diakopter I mean, I'd heard of eager list context, I've just never really learned it.
19:52 masak that's yet another reason not to refer to both the list context and the quantifier backtracking mode as "eager".
19:52 masak one means "take as little as you can at first", the other mean "take it all".
19:53 diakopter so you're saying you're reversing your commit?
19:53 diakopter I'm cornfused :/
19:53 PerlJam no, no, I think his commit makes the confusing less so
19:54 masak I removed one of the senses of "eager" from S05, so the current state should be less confusing.
19:54 PerlJam Though, I suppose we could remove the part of the sentence where it mentions "eager matching"
19:55 masak well, the reason I put that in is that some parts of the industry use the term "eager".
19:55 masak and we're in a minority to call it "frugal".
20:00 benabik joined #perl6
20:00 cognominal what is the rakudo flag to disable optimization?
20:01 tadzik -O 0 maybe
20:02 tadzik it's not in --help thoug
20:03 cognominal --optimize=0 according to src/Perl6/Optimizer.pm
20:04 masak should probably be in --help
20:04 * masak looks into it
20:05 cognominal too bad, my code work the same unoptimized. I can't blame jonthn   :)
20:06 masak heh :)
20:09 PerlJam Hrm.  does --target=PAST not work anymore?
20:10 masak you might get different results for --target=PAST and --target=past
20:10 masak but I almost never get anything sensible out of those.
20:25 PerlJam cognominal: what's the difference in behaviors between the regular for loop and the statement modifier version?
20:25 sporous joined #perl6
20:27 cognominal apparently it exits the loop after the first element.
20:27 timotimo how can i yadayadayada a method of a class and implement it later? i tried this:
20:27 dalek rakudo/nom: 3aba24b | masak++ | src/Perl6/Compiler.nqp:
20:27 dalek rakudo/nom: [Perl6::Compiler] add --help line about --optimize
20:27 dalek rakudo/nom:
20:27 dalek rakudo/nom: tadzik++, cognominal++, for discovering that it was missing, and
20:27 dalek rakudo/nom: what it should be, respectively.
20:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3aba24b1f0
20:27 timotimo r: class A { method foo($a) { ... } }; method A::foo($a) { say "hello"; }; A().foo(1);
20:27 p6eval rakudo a90efc: OUTPUT«Useless declaration of a has-scoped method in mainline␤No such method 'A' for invocant of type 'Parcel'␤  in <anon> at src/gen/BOOTSTRAP.pm:804␤  in <anon> at src/gen/BOOTSTRAP.pm:801␤  in any <anon> at src/gen/BOOTSTRAP.pm:796␤  in block <anon> at /tmp/85FdivhewN:…
20:28 cognominal Perljam, but I can't golf the conditions to  trigger it
20:28 cognominal r:  my $s; my $tits = '00' ~~ /(.)(.)/;    $s ~= $_.key if $_.value ~~ Match  for $tits.caps; say $s
20:28 p6eval rakudo a90efc: OUTPUT«01␤»
20:28 cognominal this one works correctly
20:28 tadzik might be worth to note what's the default level
20:28 dalek rakudo/nom: 5e7559a | masak++ | src/core/Match.pm:
20:28 dalek rakudo/nom: [src/core/Match.pm] changed <> to q[] in .gist
20:28 dalek rakudo/nom:
20:28 dalek rakudo/nom: Suggested by pmichaud++. It may or may not be worth it to also
20:28 dalek rakudo/nom: escape all ']' in the matched text itself.
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e7559acf7
20:28 dalek rakudo/nom: 7f40758 | masak++ | src/core/Match.pm:
20:28 dalek rakudo/nom: [src/core/Match.pm] removed root-level '=> '
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7f40758ab4
20:29 dalek rakudo/nom: 038718f | masak++ | docs/ChangeLog:
20:29 dalek rakudo/nom: [docs/ChangeLog] mention Match.gist
20:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/038718f7d6
20:30 cognominal but I am proud, of the call  $tits.caps
20:30 masak (that was the match-gist-fixup branch rebased/merged onto nom. we said we'd do that after release. feel free to test it a little if you like.)
20:30 diakopter cognominal: what
20:30 diakopter 's the one that doens't work
20:32 cognominal diakopter, see https://gist.github.com/2777326 with a non trivial match
20:32 PerlJam cognominal: Try:  do { $s ~= sprint $_.value, $_.key, $indent++ } if $_.value ~~ Match for $m.caps;
20:33 REPLeffect joined #perl6
20:34 PerlJam oh, that probably won't work.
20:34 cognominal Unsupported use of do...for;  in Perl 6 please use repeat...for
20:35 PerlJam Hrm.
20:35 masak why are you programming by proxy? can't you just use p6eval?
20:36 diakopter r:  my $s; my $tits = '00' ~~ /(.)(.)/;  for $tits.caps { $s ~= $_.key if $_.value ~~ Match }; say $s
20:36 p6eval rakudo a90efc: OUTPUT«01␤»
20:40 diakopter cognominal: what's the error with a non-trivial Match
20:40 countley joined #perl6
20:41 diakopter or wrong output
20:41 Facefox joined #perl6
20:42 bluescreen10 joined #perl6
20:45 [Coke] kubrat++ # welcome aboard.
20:46 jnthn morning
20:46 phenny jnthn: 10:21Z <sisar> tell jnthn i did obtain a backtrace (https://gist.github.com/2774389). Also see my comments on the gist for how I obtained it. Most importantly, I have no idea how the process works, I just worked on my intuition . So if you want me to rerun in some other way, do let me know.
20:46 jnthn er
20:46 phenny jnthn: 10:30Z <sisar> tell jnthn moritz++ gave me the idea for --ll-exception, so here is the gist for `perl6 --ll-exception /home/siddhant/.perl6/bin/panda install LWP::Simple` : https://gist.github.com/2774471.
20:46 jnthn evening
20:46 jnthn ...
20:46 jnthn Yeah, I'm tired. :)
20:46 masak jnthn! \o/
20:47 stephenlb joined #perl6
20:47 diakopter cognominal: example of a non-trivial match?
20:47 diakopter sprint ("FOO" ~~ /(F(O(O)))/)  seems to do the right thing
20:48 stephenlb joined #perl6
20:49 masak why are you discussing program input by proxy? :)
20:49 cognominal diakopter I pushed my code into  https://github.com/cognominal/p6peg ;  perl6 Grammar.pm works correctly except with the postifx 'for'
20:50 cognominal well correctly, meaning it print what is expected but my grammar is still wrong. I wrote sprint in the process of debugging it.
20:50 diakopter haha; expletives
20:51 cognominal masak, don't blame diakopter but me for not providing all the context.
20:51 masak just pointing out that you're doing this the hard way. :)
20:52 masak golfing a bug should be a speed dive towards minimal program and minimal input.
20:52 PerlJam cognominal: https://gist.github.com/2777720
20:52 muixirt joined #perl6
20:53 Facefox joined #perl6
20:53 PerlJam If jnthn or someone who can explain what's going on will vet the patch, I'll commit it  :)
20:53 Facefox joined #perl6
20:53 diakopter it's not supposed to indent like that
20:54 diakopter so another thing is not working as intended
20:54 cognominal Perljam: I added the expletives because when parsing a grammar with itself, I got confused between the parser and the parsee
20:55 PerlJam well, at least it doesn't just stop at the  first one :)
20:55 Facefox joined #perl6
20:56 diakopter the $indent++ needs pulled out of the for loop to work as it seems to be intended
20:56 PerlJam oh, the identation is a bug in the original co
20:56 PerlJam er, cod
20:56 PerlJam eCODE!
20:56 PerlJam blah
20:56 skids .o0(grammar YosemiteSam)
20:56 REPLeffect joined #perl6
20:56 cognominal perljam: sorry I pushed with the two loop one in another
20:56 jnthn PerlJam: The patch looks a lot less fishy than your typing.
20:57 muixirt hi, bug #108508 seems to be fixed in latest rakudo star
20:57 Facefox joined #perl6
20:59 diakopter cognominal: why regexes and not tokens and rules? ooc
20:59 cognominal diakopter. yes, the indent code is wrong.
20:59 PerlJam cognominal: reload https://gist.github.com/2777720 for the bug fixed output
20:59 cognominal that was a blind attempt at fixing code. This did not change anything.
21:01 jnthn muixirt: Thanks; I've tagged that ticket testneeded.
21:03 diakopter cognominal: typo classChaRange in regex class
21:05 cognominal I can I allow you tu push into my depot?
21:05 cognominal *How can I
21:07 cognominal jnthn, diakopter, perljam. you can push into the p6peg depot
21:08 REPLeffect joined #perl6
21:09 PerlJam jnthn: I really have no idea what to put for a commit message on that patch.  "Wrap a lexical environment around the target statement of a for modifier" ???  something like that?
21:09 PerlJam I only have mild guesses without much definite knowledge
21:10 jnthn PerlJam: You're just making it a closure to pass to map
21:10 jnthn PerlJam: We normally pass closures to map so that makes sense.
21:11 PerlJam so, if it wasn't a closure before, how did statement_mod_for even work?
21:12 jnthn PerlJam: Incorrectly in some cases :)
21:12 sjn o/
21:12 jnthn sjn! \o/
21:13 jnthn PerlJam: I think it didn't capture the lexical environment properly
21:13 * sjn is looking for our Polish friends who haven't sent their reimbursement stuff after the hackathon
21:13 jnthn And cognominal's case exposed it
21:13 sjn tadzik: you're hereby reminded again :)
21:14 cognominal I don't think that's the first time I got bitten by that bug. So thx very much.
21:14 dalek rakudo/nom: 558fd04 | duff++ | src/Perl6/Actions.pm:
21:14 dalek rakudo/nom: Make statement into a closure for map
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/558fd0416a
21:14 sjn how did the "leave a message to someone who's not here" bot work again?
21:16 PerlJam phenny: tell sjn to do as I do
21:16 phenny PerlJam: I'll pass that on when sjn is around.
21:17 sjn hi!
21:17 phenny sjn: 21:16Z <PerlJam> tell sjn to do as I do
21:17 sjn yay!
21:17 PerlJam afk
21:18 wolfman2000 joined #perl6
21:18 sjn phenny: tell sergot Send sjn the reimbursement receipts! :)
21:18 phenny sjn: I'll pass that on when sergot is around.
21:21 tadzik sjn: yeah, I know. WizzAir's still blind to emails, there are plans to just call them and lay stuff out
21:21 sjn tadzik: ok, then send me what you have in Polish :)
21:22 sjn and put some red circles around the important numbers
21:22 tadzik hehe
21:23 tadzik where do I find this now...
21:28 cognominal_ joined #perl6
21:38 alester joined #perl6
21:47 whiteknight joined #perl6
21:49 stol_ joined #perl6
21:50 masak 'night, #perl6
21:50 tadzik g'night
21:51 cognominal_ 'nigh
21:51 cognominal_ 'night!
21:53 tyatpi joined #perl6
21:54 lestrrat joined #perl6
22:15 replsos joined #perl6
22:20 PZt joined #perl6
22:25 jnthn sleep &
22:25 thou joined #perl6
22:26 * sorear wanders back
22:27 thou joined #perl6
22:32 REPLeffect joined #perl6
22:37 Facefox joined #perl6
22:39 Facefox joined #perl6
22:39 Chillance joined #perl6
22:40 stol__ joined #perl6
22:40 skids joined #perl6
22:43 replsos_ joined #perl6
23:01 tokuhirom joined #perl6
23:06 Khisanth joined #perl6
23:10 sisar joined #perl6
23:15 replsos_ joined #perl6
23:36 replsos_ joined #perl6
23:46 helloworld joined #perl6
23:52 DreamingInCode joined #perl6
23:55 preflex joined #perl6

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

Perl 6 | Reference Documentation | Rakudo