Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-11-03

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:07 flightrecorder joined #perl6
00:09 havenn joined #perl6
00:13 dalek rakudo/nom: 58fd8fa | jnthn++ | src/Perl6/Grammar.pm:
00:13 dalek rakudo/nom: Eliminate a workaround.
00:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58fd8facfd
00:23 jnthn sleep &
00:24 dalek rakudo/nom: 2bb3029 | jnthn++ | src/Perl6/Grammar.pm:
00:24 dalek rakudo/nom: Add class/methods in preparation for heredocs.
00:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2bb3029764
00:32 fgomez joined #perl6
01:23 fgomez joined #perl6
01:38 colomon heredocs!  \o/
02:12 mst joined #perl6
02:16 benabik joined #perl6
02:41 plobsing joined #perl6
02:47 kurahaupo joined #perl6
02:51 benabik joined #perl6
03:11 orafu joined #perl6
03:23 tokuhiro_ joined #perl6
03:30 benabik joined #perl6
03:31 tff joined #perl6
03:31 tff left #perl6
03:45 benabik joined #perl6
04:00 tokuhiro_ joined #perl6
04:28 dayangkun joined #perl6
04:28 kurahaupo joined #perl6
05:00 thou joined #perl6
05:03 jaldhar joined #perl6
05:07 xinming joined #perl6
05:10 cognominal joined #perl6
05:35 grondilu joined #perl6
05:35 grondilu rn: class Foo {...}; class Bar is Foo {}; class Foo { }; say Bar.new;
05:35 p6eval niecza v22-15-gc600005: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Two definitions found for symbol ::GLOBAL::Fooâ�¤â�¤  first at /tmp/fAbrdWXbwj line 1â�¤  second at /tmp/fAbrdWXbwj line 1 at /tmp/fAbrdWXbwj line 1:â�¤------> [32mo {...}; class Bar is Foo {}; class Foo [33mâ��[31m{ }; say Bar.new…
05:35 p6eval ..rakudo 2bb302: OUTPUT«No such method 'new' for invocant of type 'Bar'␤  in block  at /tmp/cQGUxSzlKp:1␤␤»
05:36 sorear apparently it only works for my-classes
05:40 benabik joined #perl6
06:27 kaare_ joined #perl6
07:15 azawawi joined #perl6
07:15 azawawi hi
07:15 azawawi tadzik: ping
07:45 tokuhiro_ joined #perl6
07:51 benabik joined #perl6
08:07 GlitchMr joined #perl6
08:19 Mescale joined #perl6
08:42 domidumont joined #perl6
09:06 domidumont joined #perl6
09:38 SamuraiJack joined #perl6
09:47 sorenso joined #perl6
09:50 nyuszika7h joined #perl6
09:52 kaare_ joined #perl6
10:03 nyuszika7h joined #perl6
10:03 havenn joined #perl6
10:06 nyuszika7h joined #perl6
10:10 rindolf joined #perl6
10:24 araujo joined #perl6
10:24 araujo joined #perl6
10:25 masak good antenoon, #perl6
10:25 leont joined #perl6
10:29 tadzik hello hello
10:29 tadzik ...and it's still morning! \o/
10:30 * masak does some air quotes
10:31 * leont denies it's morning. It's still night and he's still asleep :-S
10:32 masak r: macro greet($t) { quasi { say "good " ~ {{{$t}}} ~ "!" } }; greet "morning"; greet "day"; greet "evening"; greet "night"
10:32 p6eval rakudo 2bb302: OUTPUT«good morning!␤good day!␤good evening!␤good night!␤»
10:32 masak \o/
10:32 masak though this example, just as many others, is Better Written As Sub.
10:33 tadzik (:
10:33 tadzik macros macros
10:33 masak wanted: macro examples which are not Better Written As Sub.
10:33 tadzik can they be exported now?
10:33 masak good question.
10:33 masak my guess is "no", but please go ahead and try ;)
10:34 tadzik yay, rakudo update time
10:34 masak also, if y'all keep naming your macros "marco", I will eventually release the ferrets on you.
10:34 tadzik (:
10:35 cognominal will christmas come early this year? macros, heredoc…
10:36 masak tadzik: exporting macros seems to work, yes.
10:36 tadzik ossum
10:37 tadzik # these will be macros one day, yet macros can't be exported so far
10:37 tadzik I wrote that 2 years ago :)
10:37 masak next to what?
10:38 tadzik next to 'sub RESET is export { "\e[0m" }' and friends in Term::ANSIColor
10:39 * masak looks
10:40 masak sure, you could make those macros. but honestly, they look like highly inline-able functions to me, and so it shouldn't really matter.
10:41 masak by the principle of least power, you should probably keep them as subs and lobby for excellent inlining.
10:44 tadzik hm
10:44 tadzik indeed, being inlinable subs they'll probably end up being the same thing in the generated code
10:45 masak right.
10:45 masak so... Better Written As Sub. :)
10:45 * masak finds it quite ironic that he first gives the Perl 6 world macros and then chooses that as his slogan
11:05 jnthn Rakudo may well already be inlining that RESET fwiw :)
11:05 masak \o/
11:06 masak is there any way to find out?
11:07 jnthn Only trawling through the generated code :)
11:08 spider-mario joined #perl6
11:08 masak doesn't sound so bad.
11:11 snearch joined #perl6
11:11 masak r: macro foo($code) { quasi { {{{$code}}}() } }; my $c = 0; my &inc = -> { $c++ }; foo &inc; say $c
11:11 p6eval rakudo 2bb302: OUTPUT«1␤»
11:11 masak everything just... works! \o/
11:14 havenn joined #perl6
11:14 masak Missing test file: t/spec/S03-operators/andthen.t
11:15 masak commit c82a6d5436c75978a29300367ac4c09933e9cdbf, Author: Moritz Lenz <moritz@faui2k3.org>, "implement infix:<andthen>"
11:15 masak added S03-operators/andthen.t to t/spectest.data
11:16 masak but there's no corresponding file in roast.
11:18 PZt joined #perl6
11:20 jnthn r: macro infix:<pos-or>(*@asts) is assoc('list') { my $result = @asts.pop; for @asts.reverse { $result := quasi { {{{$_}}} > 0 ?? {{{$_}}} !! {{{$result}}} } } $result }; sub foo() { say "oops"; 4 }; say -5 pos-or 3 pos-or foo;
11:20 p6eval rakudo 2bb302: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}' at line 2, near "for @asts."␤»
11:20 masak jnthn: semicolon
11:20 jnthn r: macro infix:<pos-or>(*@asts) is assoc('list') { my $result = @asts.pop; for @asts.reverse { $result := quasi { {{{$_}}} > 0 ?? {{{$_}}} !! {{{$result}}} } }; $result }; sub foo() { say "oops"; 4 }; say -5 pos-or 3 pos-or foo;
11:20 p6eval rakudo 2bb302: OUTPUT«3␤»
11:21 jnthn Using two of the month's new features together :P
11:21 masak that's pretty impressive.
11:21 jnthn Sadly, fixing the double evaluation exposes a bug.
11:22 masak "the double evaluation"?
11:22 jnthn r: macro infix:<pos-or>(*@asts) is assoc('list') { my $result = @asts.pop; for @asts.reverse { $result := quasi { my \x = {{{$_}}}; x > 0 ?? x !! {{{$result}}} } }; $result }; sub foo() { say "oops"; 4 }; say -5 pos-or 3 pos-or foo;
11:22 p6eval rakudo 2bb302: OUTPUT«Lexical 'x' not found␤  in  at /tmp/tiE6e4uirM:1␤  in block  at /tmp/tiE6e4uirM:1␤␤»
11:22 masak sounds like you're referring to a known RT ticket.
11:22 jnthn masak: It evalutes the macro argument twice.
11:22 masak oh!
11:22 masak how do you know?
11:22 jnthn masak: Because I wrote it that way
11:22 masak oh!
11:22 masak (phew)
11:22 MayDaniel joined #perl6
11:22 jnthn {{{$_}}} > 0 ?? {{{$_}}} !! ...
11:23 masak nodnod.
11:23 masak yes, each {{{}}} evaluates once.
11:23 jnthn And I wanted to just do it once, but when I try to stick it in a temporary variable, it busts.
11:23 masak as above. I see.
11:23 masak maybe declaring variables in quasis doesn't work?
11:23 jnthn Seems so
11:23 jnthn Still, pretty neat that list associative macros work :P
11:24 masak r: macro foo { quasi { my $a = "OH HAI"; say $a } }; foo
11:24 p6eval rakudo 2bb302: OUTPUT«Cannot assign into a PMCNULL container␤  in  at /tmp/sUPrYDDbdi:1␤  in block  at /tmp/sUPrYDDbdi:1␤␤»
11:24 * masak submits rakudobug
11:24 jnthn Aside from running into that, it pretty much worked as I expected first time :)
11:29 cognominal joined #perl6
11:30 MayDaniel joined #perl6
11:32 masak r: macro apply($code, $arg) { quasi { {{{$code}}}({{{$arg}}}) } }; apply sub ($t) { say $t }, "OH HAI"
11:32 p6eval rakudo 2bb302: OUTPUT«OH HAI␤»
11:32 masak \o/
11:32 masak (but Better Written As Sub)
11:34 am0c joined #perl6
11:35 cognominal joined #perl6
11:36 masak r: sub apply($code, $arg) { $code($arg) }; apply sub ($t) { say $t }, "OH HAI" # like this
11:36 p6eval rakudo 2bb302: OUTPUT«OH HAI␤»
11:38 masak r: (sub ($t) { say $t })("OH HAI")
11:38 p6eval rakudo 2bb302: OUTPUT«OH HAI␤»
11:38 masak r: sub ($t) { say $t }("OH HAI")
11:38 p6eval rakudo 2bb302: OUTPUT«===SORRY!===␤Confused␤at /tmp/_JIW9Kguk5:1␤»
11:38 masak thought so.
11:45 xinming joined #perl6
11:49 PacoAir joined #perl6
11:51 dalek rakudo/nom: 203f97e | masak++ | src/Perl6/Actions.pm:
11:51 dalek rakudo/nom: [Perl6::Actions] unify macro code paths
11:51 dalek rakudo/nom:
11:51 dalek rakudo/nom: Three code paths are now one code path. Finally!
11:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/203f97e264
11:52 masak some nice additions having to do with error reporting, added by moritz++ to one of the code paths, is now avaiable in all three kinds of macro call syntax.
11:52 jnthn yay, 50 lines of stuff gone :)
11:52 masak yep.
11:52 masak there was a lot of repetition in there.
11:53 jnthn Indeed.
11:53 masak the only code that turned out to be parametric was "how to collect arguments". because we were in different rules in the grammar.
11:53 masak so we just pass that in as a callback :)
11:53 masak callbacks++
11:59 cognominal joined #perl6
12:01 masak r: macro f { my $a = "OH HAI"; quasi { say $a } }; f
12:01 p6eval rakudo 2bb302: OUTPUT«OH HAI␤»
12:03 dalek rakudo/nom: 4925c91 | jnthn++ | src/Perl6/ (2 files):
12:03 dalek rakudo/nom: Eliminate leftover quoting code; unused since Q.
12:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4925c91d7b
12:06 dalek features: 8a6cb6c | masak++ | features.json:
12:06 dalek features: [features.json] Rakudo does hygiene now
12:06 dalek features: review: https://github.com/perl6/f​eatures/commit/8a6cb6c2de
12:07 jnthn masak: The coment on "Basic macros" says "no placeholders yet", but we have those now. Also worth an update?
12:15 * masak fixes
12:16 masak jnthn++
12:16 dalek features: ea70272 | masak++ | features.json:
12:16 dalek features: [features.json] rakudo has placeholders now
12:16 dalek features: review: https://github.com/perl6/f​eatures/commit/ea70272855
12:17 cognominal joined #perl6
12:48 Lola_91 joined #perl6
12:49 Lola_91 is the maintainer of fedora perl6 rakudo package here? i tried to install from the repo and keep getting this on fedora 17 PARROT VM: Could not load bytecode Could not load oplib `nqp_ops' :s
12:49 masak Lola_91! \o/
12:50 masak Lola_91: I recognize that error message.
12:50 masak it happens when installed versions of Parrot/nqp/Rakudo are out of sync.
12:50 Lola_91 masak: hiiii!^____________^
12:50 masak :D
12:50 masak Lola_91: nice to see you pop in now and then :)
12:51 Lola_91 masak: i might be no more a programmer but i can not leave you alone here without passing by :P
12:52 jnthn hi Lola_91 :)
12:52 Lola_91 jnthn: Helooooo :)
12:52 jnthn Maybe a source install is easier...if you've a C compiler handy :)
12:53 rindolf joined #perl6
12:54 Lola_91 jnthn: I have gcc and the needed tool to compile but I found it fancier to use the repo :(
12:55 nebuchadnezzar joined #perl6
12:55 Lola_91 so the fedora packages are mmm..  rakudo star 0.0.2012.08_4.7.0-2.fc17 and parrot 4.7.0-1.fc17.1 .. they seem old too i think
12:56 jnthn Those aren't terribly old
12:56 jnthn And they look like they should be compatible too...odd.
12:57 Lola_91 jnthn: mmm if it seems odd to the gurus then i should just build from source :P
12:58 jnthn Lola_91: I'm only the compiler writing guru. I don't know much at all about packaging... :)
12:59 masak it's a bit of a blind spot among the compiler writers, I guess. we tend to always build directly from source.
13:00 Lola_91 masak: i can manage creating the rpms i think i still remember how i used to do it ^__^
13:00 masak cool.
13:05 Psyche^ joined #perl6
13:06 Lola_91 i tried on a couple more of my virtual machines, fedora17 perl6 rakudo does not work :( will remove and install from source
13:07 Lola_91 someday I will buy a mac :P
13:07 jnthn shop, bbl &
13:09 Lola_91 ops i burned my lunch :( must go see you soon ! :)
13:12 Chillance joined #perl6
13:25 cognominal joined #perl6
13:42 tokuhiro_ joined #perl6
14:10 rindolf joined #perl6
14:29 sorenso joined #perl6
14:32 cognominal joined #perl6
14:38 skids joined #perl6
14:40 grondilu do you guys use an IDE?  Padre, maybe?
14:41 thou joined #perl6
14:42 rindolf grondilu: hi.
14:42 rindolf grondilu: I'm using gvim mostly.
14:43 masak grondilu: I do most of my coding in vim. it has excellent hooks to the shell, pulling in things like `sort` and `perl` naturally.
14:44 grondilu ok.  I'll stick to vim as well then.  I thought I was missing something by not using an IDE.
14:46 masak chances are you are. :)
14:46 masak though personally, those things that I'm missing haven't yet been convincing enough to make me adopt an IDE.
14:49 flussence (at what point does vim become an IDE? it still loads in under a second for me...)
14:52 grondilu Do you use special vim-scripts/plugins for Perl?
14:53 flussence I'm using vim-perl for the slightly more up to date syntax stuff, but nothing fancy
14:54 xinming joined #perl6
15:02 grondilu r: say [ 1, @([2, 3]) ].perl
15:02 p6eval rakudo 4925c9: OUTPUT«[1, 2, 3]␤»
15:02 grondilu r: say [ 1, list [2, 3] ].perl
15:02 p6eval rakudo 4925c9: OUTPUT«[1, [2, 3]]␤»
15:03 grondilu do I really need to use the @() notation for dereferencing?
15:03 masak r: say [ 1, [2, 3].list ].perl
15:03 p6eval rakudo 4925c9: OUTPUT«[1, 2, 3]␤»
15:04 masak list != .list
15:04 grondilu oh
15:04 grondilu ok
15:09 Mescale joined #perl6
15:12 TimToady r: say [ 1, [2,3][] ].perl
15:12 p6eval rakudo 4925c9: OUTPUT«[1, 2, 3]␤»
15:21 Chat0237 joined #perl6
15:22 grondilu r: say [ 1, [,] [2, 3] ].perl
15:22 p6eval rakudo 4925c9: OUTPUT«[1, [2, 3]]␤»
15:22 grondilu rn: say [ 1, [,] [2, 3] ].perl
15:22 p6eval rakudo 4925c9, niecza v22-15-gc600005: OUTPUT«[1, [2, 3]]␤»
15:22 TimToady [2,3] is still a single item to the list that is the argument to [,]
15:23 TimToady zen slice is the shortest way that I know of, as I did above
15:23 TimToady but if it's a literal [], why not use () instead?
15:23 TimToady and if it's not a literal, why isn't it in a @ var?
15:24 grondilu it is not a literal.
15:24 grondilu I used a literal here to make the example clear
15:24 TimToady nr: my $aref := [2,3]; say [ 1, @$aref ].perl
15:25 p6eval rakudo 4925c9, niecza v22-15-gc600005: OUTPUT«[1, 2, 3]␤»
15:25 TimToady don't need the parens, even if it's in a $ var
15:25 grondilu the code I had in mind was more like:   [ 1, some-function-returning-an-array().list ]
15:25 TimToady why isn't the function returning a list instead of an array?
15:26 grondilu hang on
15:26 Mescale /quit Failed to hang on
15:26 TimToady this often means the function should be using gather/take rather than pushing to an array :)
15:26 grondilu indeed it should return a list in my example, not an array.
15:27 grondilu my bad
15:27 TimToady though 'return @array' should be returning it as a list
15:28 TimToady no problem; we're all still trying to figure this out on one level or another... :)
15:28 grondilu the thing is my function as returning a list of arrays, and at some point this confused me into thinking I should dereference the output.
15:28 grondilu which was wrong.
15:29 TimToady I prefer the word "suboptimal"...
15:31 TimToady gah, I give one talk and it sets me back four days in backlogging...
15:32 jnthn That was either a very long talk, or a serious amount of prep :)
15:32 azawawi joined #perl6
15:32 TimToady well, driving here took one day
15:33 jnthn Oh...
15:33 TimToady I shouldn't blame only the talk; been fighting with the email forwarding from my home server to my ISP as well
15:33 * jnthn doesn't know where stuff is much in California :)
15:33 jnthn I know the sea is to the west and there's this fault line through the middle and that's about it :)
15:34 TimToady well, California is kinda longish
15:35 TimToady I wonder if there's a way to quantify long-and-skinny-ness
15:35 TimToady dunno how you'd do that, especially for states that curve like Florida
15:36 TimToady Tennessee is pretty straight though...
15:36 azawawi jnthn: Is Perl6::Compiler accessible from within a Perl 6 script?
15:36 jnthn azawawi: No
15:37 jnthn Well, OK, not by that name. :)
15:37 jnthn That'd be a confusion of compiler vs compilee scope :)
15:37 jnthn If you want to get hold of the compiler object, pir::compreg__Ps('perl6') will get you it
15:37 TimToady perimeter over area would be one way, but as we know perimeter is fractally indeterminate when you have a coastline
15:37 azawawi jnthn: hmm.. so what's the new name?
15:38 jnthn TimToady: Hm, I keep forgetting that California goes all the way up from Mexico to Oregon.
15:38 jnthn awwaiid: You can get it using compreg like I showed.
15:38 TimToady unless it goes the other direction...
15:38 jnthn :)
15:38 jnthn awwaiid: What are you wanting to do with it, out of curiosity?
15:39 azawawi jnthn: cool thx
15:40 azawawi jnthn: It would be nice to have that valuable info in https://github.com/rakudo/rakudo​/blob/nom/src/Perl6/Compiler.nqp :)
15:46 xinming_ joined #perl6
15:52 bowtie joined #perl6
15:52 am0c joined #perl6
15:53 * grondilu has edited http://rosettacode.org/wiki/Permutations#Perl_6
15:54 grondilu the Perl5 version was actually simpler than the Perl6 one.  That was no good, imho.
15:56 TimToady interesting use of smartmatch semantics
15:58 TimToady I wonder which is faster...
16:02 TimToady phenny: tell hoelzro that the eject symbol (in yellow) is in there primarily for people who are colorblind.  it used to just switch from green to red at that point.
16:02 phenny TimToady: I'll pass that on when hoelzro is around.
16:02 awwaiid wrong tabcomplete, jnthn
16:03 * awwaiid is awoken from his slumber
16:06 havenn joined #perl6
16:06 jnthn awwaiid: oops, sorry
16:07 masak grondilu: that is possibly the nicest recursive implementation of permutations I've ever seen.
16:10 TimToady nr: sub postfix:<.fakemeth> ($n) { "faked method on $n" }; say 42.fakemeth
16:10 p6eval niecza v22-15-gc600005: OUTPUT«Potential difficulties:â�¤  &postfix:<.fakemeth> is declared but not used at /tmp/xLtyeAaicT line 1:â�¤------> [32msub postfix:<.fakemeth> [33mâ��[31m($n) { "faked method on $n" }; say 42.fa[0mâ�¤â�¤Unhandled exception: Unable to resolve method fakemeth in type …
16:10 p6eval ..rakudo 4925c9: OUTPUT«No such method 'fakemeth' for invocant of type 'Int'␤  in block  at /tmp/vuZameO8_l:1␤␤»
16:10 TimToady hmm
16:11 TimToady arguable
16:12 jnthn r: 'awwaiid'.comb.categorize({$_}).map({ $^c.key => $c.value.elems }).perl.say; 'azawawi'.comb.categorize({$_}).map({ $^c.key => $c.value.elems }).perl.say # :-)
16:12 p6eval rakudo 4925c9: OUTPUT«("a" => 2, "w" => 2, "i" => 2, "d" => 1).list␤("a" => 3, "z" => 1, "w" => 2, "i" => 1).list␤»
16:12 TimToady pugs: sub postfix:<.fakemeth> ($n) { "faked method on $n" }; say 42.fakemeth
16:12 p6eval pugs: OUTPUT«*** No such method in class Int: "&fakemeth"␤    at /tmp/JUAl2l7_Pc line 1, column 60 - line 2, column 1␤»
16:13 jnthn TimToady: Hm, wonder why LTM doesn't land us in the postfix...
16:14 TimToady it seems to me that the ability to declare fake methods would be a feature, kinda sorta
16:14 TimToady see .WHAT et al.
16:15 dalek rakudo/nom: 0268805 | masak++ | src/Perl6/Actions.pm:
16:15 dalek rakudo/nom: make macro expansion ignore empty ASTs
16:15 dalek rakudo/nom:
16:15 dalek rakudo/nom: Fixes RT #115506.
16:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/02688057bb
16:19 grondilu masak: thanks :)
16:23 TimToady jnthn: because LTM comes out to the same length, and <dotty> comes before <postop> in the alternation, I think
16:25 jnthn TimToady: ah...right.
16:25 jnthn yeah, of course, the identifier of the method name is declarative...
16:27 TimToady yes, moving <postop> to the top of the alt inside POST fixes it, at least in STD
16:28 dalek std: 04216b1 | larry++ | STD.pm6:
16:28 dalek std: fake-method postfixes can override real methods
16:28 dalek std: review: https://github.com/perl6/std/commit/04216b1eb1
16:39 jnthn >  sub postfix:<.fakemeth> ($n) { "faked method on $n" }; 42.fakemeth
16:39 jnthn faked method on 42
16:40 jnthn TimToady: Seems swapping them is enough in Rakudo too
16:40 jnthn spectesting to see if causes any fallout
16:40 masak *why* is swapping them enough? I thought LTM... oh, is this a case when earliest alternative wins?
16:40 havenn joined #perl6
16:42 flussence I guess it works like CSS, most specific one wins usually, then there's some obscure rules not many people remember after that...
16:42 jnthn masak: Same length by LTM
16:42 jnthn masak: So fall back to ordering
16:42 masak right.
16:42 masak then it makes sense.
16:42 huf joined #perl6
16:42 masak blog post! \o/ http://strangelyconsistent.org/blo​g/macros-progress-report-d2-merged
16:42 jnthn Which is a bad idea to rely on for protoregexes, but for alternations is pretty safe
16:43 masak aye.
16:44 havenn_ joined #perl6
16:45 dalek rakudo/nom: 170c90f | jnthn++ | src/Perl6/Grammar.pm:
16:45 dalek rakudo/nom: Chase an STD change.
16:45 dalek rakudo/nom:
16:45 dalek rakudo/nom: Fake-method postfixes can override real methods.
16:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/170c90f1f4
16:46 jnthn TimToady: no spectest reggies
16:52 xinming joined #perl6
16:52 TimToady "reggies"?
16:52 TimToady oh, regressions
16:53 TimToady No amount of caffiene makes up for certain forms of stupidity...
16:54 TimToady so far niecza has no reggies either, nearly done
16:55 masak in an alternate universe, each new spectest has to be registered with Microsoft in order to be trusted, and "reggies" refers to this process... :)
16:55 TimToady sometimes this universe is an alternate universe...
16:56 masak one person's actual universe is another person's alternate universe. :)
16:57 jnthn hmmm
16:57 jnthn my %r = %$self;
16:57 jnthn $r{_herelang} = $self;
16:57 jnthn bless \%r, $::LANG{Q};
16:58 jnthn TimToady: What's this actually doing? :)
16:58 jnthn Or, more to the point: why does it have to bless back into %*LANG<Q> here?
16:58 TimToady parsing the quoted part of q:to 'foo' using Q, and saving the actual derived quote language for the heredoc
16:59 jnthn OH!
16:59 masak nice.
16:59 jnthn Right, we don't want to parse the terminator with the derived.
16:59 * jnthn doesn't really read Perl 5 well any more...
16:59 mikec_ joined #perl6
16:59 jnthn And certainly not non-Moose OO :)
17:00 masak it never occurred to me that heredocs, somewhat perversely, contain a nested q or qq quote.
17:00 masak yo dawg.
17:00 TimToady one of those places where the implementor takes on vicarious suffering for the user...
17:02 jnthn Yeah...just need to figure out a way to do this that's less of a hack :P
17:03 jnthn Think I got something figured.
17:04 topo` joined #perl6
17:04 TimToady Note to any future historian who collects my sayings from the irclogs: Please feel free to fix my capitalization at the beginnings of sentences without editorial notations.
17:04 jnthn Hm, gonna have to be really careful the quote language cache doesn't go caching on the :to...
17:04 masak in the future, everything is lower-case, anyway.
17:04 * TimToady hates things like [W]e are not amused.
17:05 TimToady past historians can do whatever they like, however...
17:07 dalek niecza: 4c016f5 | larry++ | src/STD.pm6:
17:07 dalek niecza: allow fakemethods
17:07 dalek niecza: review: https://github.com/sorear/niecza/commit/4c016f5398
17:07 TimToady next thing you know, people are going to want 'my method' to declare fakemethods...
17:08 TimToady but maybe only in one of masak's alternate universes...
17:08 * TimToady wonders if he's in one of those
17:09 masak depends what you mean by "you".
17:10 TimToady pronouns is tricky, not to mention verbs
17:11 masak ;)
17:13 sorear o/
17:13 masak sorear! \o/
17:14 TimToady
17:15 TimToady (which looks rather different in the log)
17:15 sorear meh, english is case insensitive
17:15 * sorear idly wonders if german channels capitalize more
17:16 jnthn o/ sorear
17:17 masak TimToady: is that a light saber?
17:18 TimToady well, gnome-term doesn't overlay it at all, so it looks like o/ on my terminal
17:18 masak .u o̸
17:18 phenny U+006F LATIN SMALL LETTER O (o)
17:18 phenny U+0338 COMBINING LONG SOLIDUS OVERLAY (◌̸)
17:18 TimToady in the log it shows up here as an o with a diagonal line totally within the o.
17:19 TimToady but if I past to a text box in the browser, it has the overlay close to right, except that the solidus is a bit up and to the left of the middle of the o
17:19 TimToady *paste
17:20 TimToady xterm does it pretty close to right
17:21 sorear iterm2 also gets it pretty close to right
17:22 geekosaur it's wrong in xchat, but that's more or less normal
17:38 flussence that looks more correct here in urxvt than it does in chromium...
17:47 xinming_ joined #perl6
17:52 lex_ joined #perl6
17:52 kurahaupo joined #perl6
17:59 spanner_ joined #perl6
18:01 topo`_ joined #perl6
18:01 xdbr_ joined #perl6
18:01 pmichaud joined #perl6
18:01 krunen_ joined #perl6
18:02 Lex__ joined #perl6
18:02 grondilu_ joined #perl6
18:06 colomon joined #perl6
18:09 Lex9_ joined #perl6
18:13 wk joined #perl6
18:14 domidumont joined #perl6
18:23 dalek rakudo/nom: 7c0820a | jnthn++ | src/Perl6/Grammar.pm:
18:23 dalek rakudo/nom: Tweak whitespace parsing to be more STD-like.
18:23 dalek rakudo/nom:
18:23 dalek rakudo/nom: Not a huge change, but provides a place to hang heredoc parsing off.
18:23 dalek rakudo/nom: Also gets us the version control marker detection.
18:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c0820a5e9
18:30 masak version control marker detection! \o/
18:39 sorear masak++ bloggage
18:40 masak it made sense? nice. :)
18:41 nwc10 masak: the macro definition has this: {{{$code}}}( {{{$argument}}} );
18:42 nwc10 but your expansion is this: (sub ($t) { say $t })("OH HAI");
18:42 nwc10 why did the extra? set of () appear?
18:43 flussence std: sub ($t) { say $t }('arf')
18:43 p6eval std 04216b1: OUTPUT«ok 00:00 45m␤»
18:43 flussence ...well if that's the case I dunno
18:43 flussence r: sub ($t) { say $t }('arf')
18:44 p6eval rakudo 170c90: OUTPUT«===SORRY!===␤Confused␤at /tmp/K4oZTuuAdM:1␤»
18:44 masak nwc10: I tried it without the parens in Rakudo while writing the post, and it didn't work without the parens.
18:44 * nwc10 admits to being impatient and not reading everything carefully before asking..
18:44 flussence n: sub ($t) { say $t }('arf')
18:44 p6eval niecza v22-16-g4c016f5: OUTPUT«arf␤»
18:44 masak nwc10: but the real answer is that the transformation is not textual, but on the AST level. so the parens are just there for clarity, they don't change the AST topology.
18:44 * masak submits rakudobug
18:44 nwc10 ah OK
18:44 flussence tbh, I really didn't expect that to work in niecza
18:45 flussence (nice that it does :)
18:45 masak well, since it parses in STD, it should mean something :)
18:47 xinming joined #perl6
18:52 masak woot, the blog post seems to have triggered another email from the scala macros guy! \o/
18:53 masak r: macro test { my $a = "OH HAI"; quasi { $a } }; say test
18:53 p6eval rakudo 170c90: OUTPUT«OH HAI␤»
18:58 sorear masak: yay
18:59 masak I think my reply to him may be interesting for others to read, too. I might gist it when I'm done.
19:07 masak r: for 1..10 -> $i { our sub foo { say $i } }; our &foo; foo
19:07 p6eval rakudo 170c90: OUTPUT«10␤»
19:07 masak r: for 1..10 -> $i { our sub foo { say $i }; last }; our &foo; foo
19:07 p6eval rakudo 170c90: OUTPUT«1␤»
19:07 masak r: for 1..10 -> $i { BEGIN { say $i } }
19:07 p6eval rakudo 170c90: OUTPUT«Mu()␤»
19:07 masak Mu!
19:08 masak r: my $i; say $i
19:08 p6eval rakudo 170c90: OUTPUT«Any()␤»
19:09 masak so "Mu()" there means "really, really undefined"! :P
19:09 masak can anyone explain why I'm not getting "Any()"?
19:09 masak oh!
19:09 masak it's a loop parameter, right?
19:09 masak r: my $i = 42; BEGIN { say $i }
19:09 p6eval rakudo 170c90: OUTPUT«Any()␤»
19:10 masak yep.
19:10 masak r: my $i = 42; BEGIN { say $i }; say $i
19:10 p6eval rakudo 170c90: OUTPUT«Any()␤42␤»
19:16 masak r: my $x = 42; role R { method foo { $x } }; class C is R {}; say C.new.foo
19:16 p6eval rakudo 7c0820: OUTPUT«42␤»
19:16 masak \o/
19:16 masak n: my $x = 42; role R { method foo { $x } }; class C is R {}; say C.new.foo
19:16 p6eval niecza v22-16-g4c016f5: OUTPUT«42␤»
19:16 masak rakudo++ niecza++
19:16 masak p: my $x = 42; role R { method foo { $x } }; class C is R {}; say C.new.foo
19:16 p6eval pugs: OUTPUT«42␤»
19:17 masak pugs++
19:24 masak r: my $x = 42; macro foo($value) { quasi { say {{{$value}}} } }; foo $x
19:24 p6eval rakudo 7c0820: OUTPUT«42␤»
19:29 fgomez joined #perl6
19:30 dalek nqp: d27844e | jnthn++ | src/QRegex/Cursor.nqp:
19:30 dalek nqp: Add a !cursor_pos, for explicitly setting pos.
19:30 dalek nqp: review: https://github.com/perl6/nqp/commit/d27844eb8d
19:30 raiph joined #perl6
19:31 masak r: sub foo { my $greeting = "OH HAI"; quasi { $greeting } }; macro bar { quasi { say {{{foo}}} } }; bar()
19:31 p6eval rakudo 7c0820: OUTPUT«Mu()␤»
19:31 masak interesting.
19:31 masak jnthn: bug?
19:31 masak r: sub foo { my $greeting = "OH HAI"; quasi { say $greeting; $greeting } }; macro bar { quasi { say {{{foo}}} } }; bar()
19:31 p6eval rakudo 7c0820: OUTPUT«Mu()␤Mu()␤»
19:32 masak r: sub foo { my $greeting = "OH HAI"; -> { say $greeting } }; BEGIN { foo()() }
19:32 p6eval rakudo 7c0820: OUTPUT«OH HAI␤»
19:35 jnthn masak: I think I'd expect that one to work. Not sure why it doesn't...
19:35 * masak submits rakudobug
19:35 jnthn masak: Not sure where I suggest you look to track it down either... :S
19:35 masak jnthn: looks like the quasi in foo is getting the static lexpad. but why?
19:35 jnthn masak: Yeah, that's what I'm not sure about.
19:36 jnthn masak: Maybe something to do with the way quasis get their fixups?
19:36 masak maybe.
19:36 masak r: sub foo { my $greeting = "OH HAI"; quasi { say $greeting } }; BEGIN my $gast = foo; macro bar { $gast }; bar()
19:37 p6eval rakudo 7c0820: OUTPUT«OH HAI␤»
19:37 masak *that* works.
19:37 masak so, essentially, it's not foo's fault.
19:37 masak it's the fact that foo is called inside of {{{ }}}
19:38 jnthn That's odder still.
19:38 jnthn Though at least also more isolated...
19:38 masak yeah.
19:47 xinming_ joined #perl6
19:50 masak here's the reply email I just wrote to the Scala macros guy: https://gist.github.com/c97c37efa09d0d72ad9e
19:53 TimToady why did you say class C is R instead of 'does'?
20:00 Friendofafriend joined #perl6
20:01 Friendofafriend so... whens perl 6 coming out?
20:01 Friendofafriend ALSO where are some good tutorials for learning perl 5
20:01 Friendofafriend ?
20:01 TimToady coming out of what?
20:01 Friendofafriend Larry Wall's brain
20:02 flussence by "release", do you mean 10 years ago, or 4 years ago?
20:02 TimToady Larry Wall's brain doesn't even know when Perl 6 will quit flowing outward...
20:03 TimToady the flow seems to have slowed considerbly over the last couple years, and the implementations are starting to catch up
20:03 Friendofafriend gotcha
20:04 TimToady bbq &
20:04 Friendofafriend well in that case.. do you know of any good perl 5 tutorials / books ?
20:04 Friendofafriend im trying to learn perl
20:04 rking Friendofafriend: I still advocate the Camel book.
20:05 Friendofafriend which one?
20:06 masak the latest one :)
20:06 rking Friendofafriend: http://www.amazon.com/Programming-Perl-​Unmatched-processing-scripting/dp/05960​04923/ref=sr_1_1?ie=UTF8&amp;qid=135197​3164&amp;sr=8-1&amp;keywords=camel+perl
20:06 Friendofafriend haha thanks for the link
20:06 Friendofafriend yeah Larry Wall just talked at my school, so im kinda motivated
20:06 rking Friendofafriend: What did he talk about?
20:07 Friendofafriend just how perl came to be.
20:07 Friendofafriend and why it is the way it is
20:07 Friendofafriend it was a great talk
20:07 Friendofafriend he explained the linguistic origins of perl
20:08 Friendofafriend it was very cool
20:08 masak oh, Westmont college?
20:08 Friendofafriend indeed
20:09 masak we think Perl is cool, too.
20:09 Friendofafriend haha
20:09 Friendofafriend how did you know about westmont?
20:09 masak Larry Wall is a friend of a friend... :P
20:09 masak I agree that the Camel book is hard to beat in terms of learning material.
20:10 masak it's sitting here on my shelf within arm's length.
20:10 Friendofafriend haha yeah, Im pretty good friends with his son, lewis
20:10 masak I know him as quietfanatic, but yes, I talk to him sometimes, too.
20:10 rking Friendofafriend: The `perldoc` information is actually excellent.
20:10 masak `perldoc` is excellent, but kinda difficult to bootstrap up from 0 with.
20:11 masak IIRC `perldoc` is actually based on the Camel book somehow?
20:11 Friendofafriend yeah hes a great guy, I pair program with him quite a bit, and have learned so much
20:11 rking Friendofafriend: What kind of programming is he into?
20:11 masak Friendofafriend: this is kind of the "future department" of Perl, in case you're wondering. we've been inventing the future of Perl for the past 12 or so years.
20:12 Friendofafriend just mostly school projects
20:12 Friendofafriend ie weather servers written in raw c
20:12 Friendofafriend blah
20:12 masak Friendofafriend: I've taken to discussing language design with him, which is also very interesting.
20:12 Friendofafriend yeah, hes started writing his own language
20:12 havenn joined #perl6
20:12 masak yeah. me too.
20:13 Friendofafriend check out his github profile
20:13 Friendofafriend anyways thanks for everything guys, I gotta go. Best of luck
20:13 masak o/
20:13 * rking swoops in and waves at masak so he isn't left hanging. o
20:14 raiph "Metacircularity is not about self-interpretation at all. Rather, it's an engineering approach to re-using as much code as possible between different parts of a toolchain (including compiler, runtime and debugger)." (from http://www.inf.usi.ch/postd​oc/kells/blog/2012/06/01/) Anyone care to agree/disagree/comment on this perspective and/or its applicability to Perl 6?
20:15 masak raiph: we've definitely been seeing that aspect of metacircularity now and then, both in Niecza and Rakudo, I think.
20:15 masak though whether to elevate it to what metacircularity "is about", I don't know.
20:16 jnthn raiph: Well, in my meta-programming in Perl 6 talk, I define meta-circularity as extending the langauge using the language itself.
20:16 jnthn raiph: Which seems compatible with that point of view.
20:16 masak raiph: take val() as a recent example. it figures both internally (in the handling of <> qw-like lists and MAIN arguments) and in userspace.
20:17 raiph oh. gotta run. will backlog. thanks for your answers.
20:28 masak "Metacircularity is awesome because it is metacircular!"
20:36 sizz_ joined #perl6
20:44 dalek rakudo/nom: 08436b7 | jnthn++ | src/Perl6/Grammar.pm:
20:44 dalek rakudo/nom: Apply stopper role after tweaks role.
20:44 dalek rakudo/nom:
20:44 dalek rakudo/nom: Same ordering as STD; turns out it matters for heredocs.
20:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/08436b775f
20:44 dalek rakudo/nom: f643fba | jnthn++ | src/Perl6/World.pm:
20:44 dalek rakudo/nom: Factor out compile-time nabbing of nibbles.
20:44 dalek rakudo/nom:
20:44 dalek rakudo/nom: Generalizes things a bit, to be useful in heredoc implementation.
20:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f643fba57b
20:44 dalek rakudo/nom: 7d32387 | jnthn++ | src/Perl6/ (2 files):
20:44 dalek rakudo/nom: Get heredoc parsing in place.
20:44 dalek rakudo/nom:
20:44 dalek rakudo/nom: Trimming of the parsed document not yet implemented, but seems to do
20:44 dalek rakudo/nom: about the right thing aside from that.
20:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d323874b1
20:45 masak "nabbing of nibbles" :)
20:45 masak jnthn: trimming? isn't it just a question of using the spec'd/built-in Str.indent method?
20:46 masak r: say "    foo;\n        bar;\n        baz".trim(*)
20:46 p6eval rakudo 7c0820: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method trim at src/gen/CORE.setting:4324␤  in block  at /tmp/Il89zPC6uJ:1␤␤»
20:46 masak er.
20:46 masak r: say "    foo;\n        bar;\n        baz".indent(*)
20:46 p6eval rakudo 7c0820: OUTPUT«foo;␤    bar;␤    baz␤»
20:47 xinming joined #perl6
20:47 sorenso joined #perl6
20:47 jnthn masak: Yeah, but we should see if we can do it at compile time or not too, I think.
20:49 masak ah.
21:12 masak 'night, #perl6
21:12 awwaiid gnight
21:18 havenn joined #perl6
21:25 havenn joined #perl6
21:33 Lex9_ joined #perl6
21:42 spider-mario joined #perl6
21:43 * [Coke] yawns
21:44 Mescale joined #perl6
21:47 xinming_ joined #perl6
21:50 ChoHag joined #perl6
21:57 dorlamm joined #perl6
22:27 [Coke] jnthn - latest nqp/parrot build and I can run partcl on it.
22:27 [Coke] brrt++ jnthn++
22:28 dalek perl6-roast-data: bf61ef6 | coke++ | / (4 files):
22:28 dalek perl6-roast-data: today (automated commit)
22:28 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/bf61ef60ea
22:28 dalek perl6-roast-data: 09e4d92 | coke++ | / (2 files):
22:28 dalek perl6-roast-data: today (automated commit)
22:28 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/09e4d92699
22:28 jnthn yay :)
22:28 [Coke] jnthn: (that roast data is old. fixing that up now.)
22:29 jnthn Yeah
22:29 jnthn shows
22:29 jnthn ""      ,      ,      ,      ,      ,      ,
22:29 jnthn for Rakudo :)
22:29 jnthn Grr, that heredoc parsing thing I comitted is wonkier than I first realized...
22:29 [Coke] I didn't even look at it, I just pushed any pending commits. whoops. :)
22:29 jnthn Though doesn't break anything at least :)
22:29 [Coke] I'll just delete those.
22:30 dalek perl6-roast-data: a1856b6 | coke++ | perl6_pass_rates:
22:30 dalek perl6-roast-data: Remove bad/stale data.
22:30 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/a1856b6f3e
22:37 HarryS joined #perl6
22:37 [Coke] jnthn: I'm going to change the daily run to check everything out fresh to avoid the weird not-always updating bug that hit rakudo.
22:38 [Coke] Will also change it so that all 3 tests run the same version of roast. (instead of a fresh copy per run.)
22:38 [Coke] er, per instance.
22:43 havenn joined #perl6
22:50 [Coke] would it be helpful to have the sha1 of the repo used for the testing?
22:50 [Coke] or is just the date close enough?
22:50 [Coke] (I am putting roast's sha1, now that it's shared.)
22:51 jnthn [Coke]: It'd certainly make it easy to diagnose "didn't update the repo" issues
22:53 havenn joined #perl6
22:59 [Coke] I'm trying to get Pugs.hs building again. Getting this error:
22:59 [Coke] * Missing (or bad) header file: perl5/p5embed.h
23:01 [Coke] is there a way I can just wipe out anything I've done with cabal?
23:01 [Coke] is rm ~/.cabal sufficient?
23:01 [Coke] (-rf)
23:02 dalek rakudo/nom: 4bab771 | jnthn++ | tools/build/NQP_REVISION:
23:02 dalek rakudo/nom: Get NQP with !cursor_pos.
23:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bab771279
23:02 dalek rakudo/nom: 1585d5a | jnthn++ | src/Perl6/ (2 files):
23:02 dalek rakudo/nom: Fix heredoc parsing, and add indent handling.
23:02 dalek rakudo/nom:
23:02 dalek rakudo/nom: This gets us passing all the various heredoc tests in S02-literals, so
23:02 dalek rakudo/nom: seems fairly complete.
23:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1585d5af4f
23:02 flussence yay
23:02 dalek rakudo/nom: 1dc622c | jnthn++ | docs/ROADMAP:
23:02 dalek rakudo/nom: ROADMAP update.
23:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1dc622c7ef
23:03 dalek roast: eacb839 | jnthn++ | S02-literals/quoting.t:
23:03 dalek roast: Heredoc and other quoting unfudges.
23:03 dalek roast:
23:03 dalek roast: Also harden the heredoc tests for Windows.
23:03 dalek roast: review: https://github.com/perl6/roast/commit/eacb839266
23:04 dalek features: 80d8df3 | jnthn++ | features.json:
23:04 dalek features: Rakudo has heredocs.
23:04 dalek features: review: https://github.com/perl6/f​eatures/commit/80d8df37e3
23:05 [Coke] https://gist.github.com/4009237 - `last` of pugs configure failure.
23:05 [Coke] it's complaining about libutil.h
23:06 [Coke] is that something we can get installed on feather? (Or am I just misconfigured to miss it?)
23:08 [Coke] aha.
23:10 [Coke] found the header in /usr/include/bs, but see no way to get Pug.hs building with that piece of information. Any help greatly appreciated.
23:10 dalek rakudo/nom: 68460ce | jnthn++ | docs/ChangeLog:
23:10 dalek rakudo/nom: Some more ChangeLog additions.
23:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68460cede4
23:10 [Coke] er, *bsd
23:36 fgomez joined #perl6
23:38 flightrecorder joined #perl6
23:41 jnthn [Coke]: No idea how to help, but good luck!
23:41 jnthn 'night, #perl6
23:47 adu joined #perl6
23:47 xinming joined #perl6

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

Perl 6 | Reference Documentation | Rakudo