#perl6 summaries for 2012-09-02

Please read about this report.

There are 26 #perl6 summaries for 2012-09-02.

Summaries of commits and other work

Summaries of bugs and other problems

Summaries of other discussion

26 #perl6 summaries for 2012-09-02

Parrot, NQP, and Perl 6 play by different rules. (summary by raiph) Full log
01:06 MikeFair I have a rule ... part of the rule never seems to get tested
01:14 TimToady I only know how Perl 6 works (or is supposed to (or I'm supposed to))

Next Gen Regexen. (summary by raiph) Full log
02:01 jeffreykegler S05 says you set the AST element via make. But looking at STD.pm, it seems to be almost never used
02:05 TimToady its action routines are written in Perl 5 (in viv), so it just emulates make, without using that feature of Perl 6 directly
02:06 TimToady STD is in kind of a funny place, because it's trying not to commit to any particlar AST representation
02:07 TimToady STD uses an Action package that dispatches to the same name as the rule that is being reduced
02:08 TimToady which actually doesn't scale terribly well to derived grammars
02:20 TimToady erasing the boundary between regex and grammar
02:21 TimToady the colonpair notation is meant to be an extension mechanism in any case, so you can make up your own
02:22 MikeFair I'm working on building up to establishing the AST as a service and using zmq's zero-copy mechanisms as a sort of in process SOA
02:26 TimToady mostly I just try to get this stuff close enough that smarter people can take it in various directions :)
02:30 TimToady there are usually several kinds of context floating around, and it's not always trivial to know which parts contribute to a given entity's uniqueness (that's Tagmemics 101, basically)
02:33 TimToady linguistically speaking, that's the whole etic vs emic distinction; which features contribute to identity, and which are merely epiphenominal in this current language

Perl 6 & xTalk (summary by raiph) Full log
05:09 MikeFair Perl6 is basically all the semantics of xTalk, with none of the syntax

Pugs fails with recent Haskell build. (summary by raiph) Full log
05:34 isBEKaml OHHAI, pugs-compat cabal build with GHC 7.4.1 shows failure ... I think the way to fix this would be to migrate code using IO module to using System.IO module.

Stefan O'Rear likely to focus on Rakudo/NQP porting effort! (summary by raiph) Full log
06:07 isBEKaml how's things with niecza?
06:15 sorear niecza is losing -Ofun for me, so I'm probably not going to be doing too much with it; my Perl 6 involvement in the future is likely to be with the Rakudo/NQP porting efforts

Moritz implements indirect names in Rakudo. (summary by raiph) Full log
06:21 Moritz n: constant name = 'a'; sub ::(name) { 42 }; say a()
06:21 p6eval niecza v21-1-ga8aa70b: OUTPUT«42␤»
06:32 dalek roast: basic test for declarations with indirect names
06:37 dalek rakudo/nom: run indirect name declaration tests
12:42 Moritz jnthn: any feedback on http://moritz.faui2k3.org/tmp/0001-fix-declaration-of-subs-with-indirect-name.patch? I realize it's incredibly hacky, but I don't quite know what do about it
12:46 jnthn moritz: Is there no way we can communicate the DYNAMIC thing into disect_longname (pass it a named arg or something)?
Moritz digs up and debugs another patch he had created earlier that anticipated jnthn's suggestion
14:07 Moritz \o/ it build the setting again. the code is now a bit longer and more robust
14:24 Moritz jnthn: do you have a feeling how many LongName objects we carry around? thing is, for better error messages I'd like to store a Match object per LongName. Is that OK? or too expensive?
14:28 jnthn moritz: I think LongName objects are fairly short lived. They shouldn't make it into the AST ever, for example.
16:07 dalek rakudo/indirect-subs: fix declaration of subs with indirect name
16:07 dalek rakudo/indirect-subs: typed exception for illegal use of pseudo packages in other names
16:08 Moritz that branch now mostly works ... offending line is if !$decl || ($decl eq 'routine') { if the backtrace can be trusted ... oh, the line annotations are off ... so, line numbers in NQP are off :(
16:19 dalek rakudo/indirect-subs: avoid a Null PMC Access
16:58 dalek rakudo/nom: fix declaration of subs with indirect name
16:58 dalek rakudo/nom: typed exception for illegal use of pseudo packages in other names
16:58 dalek rakudo/nom: avoid a Null PMC Access
16:58 dalek rakudo/nom: Merge remote branch 'origin/indirect-subs' into nom
16:58 dalek rakudo/nom: update ChangeLog
17:08 dalek roast: unfudge tests for indirect sub name declarations
19:37 dalek rakudo/nom: typed exception for import name clashes

TimToady improves STD's heredocs and STDs' "p5-in-p6". #p6p5 (summary by raiph) Full log
06:39 dalek std: parse <<END with correct quote language.
07:01 dalek std: allow p5 code to switch back to p6.

Regex backtracking control syntax. (summary by raiph) Full log
07:15 ingy what's the p6rules syntax for committing to a rule?

Looping backwards. (summary by raiph) Full log
08:07 masak for looping backwards along a range, I'd really recommend doing `for reverse ^.chars` or equivalent.
08:44 masak we used to have the :by adverb for ranges (in the spec). it got tossed by the wayside for philosophical reasons. basically, where we had :by previously, we now have infix:<...> (though I still prefer to reverse ranges in the :by(-1) case)

How does code know its name? (summary by raiph) Full log
08:44 MikeFair Is "the name of my function" available as a perl6 variable somehow?
I was confused by this dialog. Note p6doc Code.Str

arity and count. (summary by raiph) Full log
09:17 GlitchMr Why &sin doesn't have arity?
09:17 Moritz cause it's declared as proto sub sin(|) {*} in rakudo. which is the most extensible thing to do

Debugging GlitchMr's bot and news of Parrot's IO rewrite. (summary by raiph) Full log
09:45 GlitchMr I still wonder how it matched when it shouldn't
09:49 Moritz looks like a bug in the bot module
10:09 GlitchMr Perhaps https://github.com/TiMBuS/Net--IRC/tree/use-muevent will work
10:11 GlitchMr Timbus: I cannot get your Net::IRC::Bot module to work
10:12 GlitchMr I've tried using Freenodebot.pl, but it also doesn't work
10:12 Timbus might be worth looking at wrapping libev in zavolaj
10:12 Tadzik my wild guess was that we're too slow at receiving packets, and freenode stops sending them after a while
10:15 Timbus GlitchMr, cant seem to reproduce this on a slightly older rakudo
10:16 Moritz recently a branch was merged in parrot that re-did much of the IO subsystem. after the 2012.08 release
16:47 GlitchMr Timbus: would you consider this to be abuse of your module: https://gist.github.com/3601377
17:21 GlitchMr 19:20:57 SixtySixBot | GlitchMr: The future is already here — it's just not very evenly distributed.

Improving Zavolaj (Perl 6's FFI) (summary by raiph) Full log
09:57 arnsholt moritz: Could you take a look at the libnames branch in Zavolaj? The new test works on OS X, but because Linux does weird stuff with library names it doesn't work there. If you have any good ideas that'd be awesome
10:24 arnsholt since I want to make sure both dylibs and bundles work on OS X, I have to load a library I can be reasonably sure exists everywhere

jnthn helps lizmat work on Rakudo/NQP porting effort. (summary by raiph) Full log
10:31 phenny lizmat: 01 Sep 18:11Z tell lizmat le NQP branch merge is done, which unblocks your ops work :)
10:49 lizmat hhmmm… make test generates errors *after* it seems done?
10:52 jnthn lizmat: I'm guessing it invokes prove mutliple times
11:21 dalek nqp: Clean up test targets so they actually run all of the tests they're expected to and give a single summary at the end of doing so.
11:21 dalek nqp: Steal a couple of the tests that still makes sense from t/setting into t/nqp, then toss t/setting, which was largely bit-rotten.
11:31 lizmat All tests successful :-)
11:37 dalek nqp: Eradicated pir::does(...,'hash') for nqp::ishash
11:37 dalek nqp: Eradicated pir::get_who__PP for nqp::who
12:23 jnthn lizmat: nqp::isconcrete is safe only when you know you always have some kind of 6model object to hand. In NQP, arrays, hashes etc are still not that.
12:25 dalek nqp: Eradicated pir::defined__IP for nqp::defined
12:26 lizmat but they will be? so this is just a matter of delay?
12:28 jnthn lizmat: On @next-vm almost certainly.
12:47 dalek nqp: Dropped some bitrotten code from previous HLL interop thing

Perl 6 development server had 2 year old Rakudo; GlitchMr makes an up-to-date version available. (summary by raiph) Full log
12:10 GlitchMr why Perl 6 development server would have two years old version of Rakudo
12:16 lizmat after checking with Juerd, he says that it was basically the idea that everybody would compile their own. and that the system one was just something that you could use as a very basic bootstrap. I'll be seeing juerd IRL next Tuesday at the Amsterdam PM meeting, and discuss how to take feather onwards
16:11 GlitchMr I've Perl6 in ~/rakudo-star/ in case somebody would want to use it

Error while compiling block : Error while compiling block hello: Error while compiling block : Error while compiling block : ... (summary by raiph) Full log
14:39 spider-mario r: macro hello($name) {quasi { say "Hello { {{{$name}}} } !"; };}; hello("Rakudo");
14:39 p6eval rakudo 1f86d2: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling block hello: Error while compiling block : Error while compiling block : ...
14:41 jnthn spider-mario: The macros implementing is really rather new. So it'll be a bug in that.
15:23 spider-mario bug reported, it’s #114708

Syntax highlighting. (summary by raiph) Full log
14:38 lumi Would it be possible to run a grammar, and emit HTML with the original text surrounded by a tag with the matching rulename as a class?
14:39 lumi For cheap and fun syntax highlighting, I was thinking
14:49 lumi Maybe I'll try doing it, but I only have tuits in 2 weeks

jnthn cleans up after his recent QAST based NQP switchover. (summary by raiph) Full log
15:14 dalek nqp: Move CTXSAVE and EXPR that were temporarily subclassed in NQP::Actions back up into HLL::Actions (taking the QAST-using versions).
15:14 dalek nqp: Move QAST versions of quote_EXPR and quote_delimited up into HLL::Actions, eliminating them from NQP::Actions.
15:14 dalek nqp: Toss a bunch of now-dead code (replaced by a combination of QAST::WVal, bs and some of the logic moving into QAST::Compiler itself).
15:59 dalek nqp: Various P5Regex de-PASTifications.
15:59 dalek nqp: Start updating P6Regex to eliminate use of buildsub (now always uses qbuildsub) and turn some other PAST usages into QAST.
15:59 dalek nqp: Toss some now-dead code in P6Regex.
15:59 dalek nqp: Toss NFA.past.
15:59 dalek nqp: Eliminate a couple of mentions of PAST from HLL::Compiler.
16:18 dalek nqp: Clear up most remaining PAST usages in P6Regex.
16:18 dalek nqp: Final PAST eliminations in P6Regex.
16:18 dalek nqp: Final PAST eliminations in P5Regex.
16:18 dalek nqp: Various cleanups and simplifications to QAST::Compiler and HLL::Compiler now that it no longer has to cope with PAST and POST.
16:47 dalek rakudo/nom: Eliminate final PAST::Node usages in Perl6::Grammar's op generation, and update it to tall the QAST compiler rather than PAST::Compiler, use qbuildsub instead of buildsub, etc.
16:47 dalek rakudo/nom: Bump to latest NQP, with muchly reduced PAST usage.
16:47 dalek rakudo/nom: Unbust /< a aa >/.
17:13 dalek rakudo/nom: Add a note about having QAST-based NQP to the ChangeLog.

Regexes (//, rx//, etc., regex, rules, tokens) are Perl 6 methods written in regex slang (sub-language). (summary by raiph) Full log
16:51 GlitchMr perl6: class blah { has $.regex = /a/; method replace($a is copy) { $a ~~ s/$.regex/b/; $a } }; blah.new.replace('cake').perl.say
16:51 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method regex in type Cursor␤ at line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 566 (Cool.subst @ 37) ␤ at /tmp/UW7pC_Zppv line 1 (blah.replace @ 4) ␤ at /tmp/UW7pC_Zppv line 1 (ma…
16:51 p6eval ..rakudo 1f86d2: OUTPUT«No such method 'regex' for invocant of type 'Cursor'␤ in regex at /tmp/JCt62h5bHR:1␤ in method match at src/gen/CORE.setting:4021␤ in method subst at src/gen/CORE.setting:4083␤ in method replace at /tmp/JCt62h5bHR:1␤ in block at /tmp/JCt62h5bHR:1␤␤»…
16:52 jnthn GlitchMr: A regex is a kind of method.
20:44 sirrobert how would I add new tokens to a grammar dynamically? (runtime)
20:44 and corresponding actions to the grammar's action class, I guess
20:44 jnthn Whoa. :)
20:44 jnthn Well, they're just classes
20:44 So, same way you normally add methods to things
20:44 .^add_method and then remember to .^compose
20:45 jnthn (and tokens are just methods really)
20:45 sirrobert if I .^add_method and .^compose, do existing instances get affected?
20:45 jnthn Yes
20:45 jnthn If you want to do stuff per instance, use mixins
20:48 sirrobert I guess I have to re-write TOP to be able to handle the new token ...

Ping pong and dang (Put it in the thing you move $!orig/$!target into) (summary by raiph) Full log
18:13 pmichaud jnthn: I'm working on reducing the number of return values from !cursor_start; I can do all of them easily except I'm not sure how to efficiently get $?CLASS back
18:16 jnthn ah, dang
18:18 pmichaud but... dang
18:40 pmichaud okay, that gives me a good place to start.

Moar speed (summary by raiph) Full log
19:22 jnthn pmichaud: CORE.setting parse time and spectest times are currently at their lowest for quite a while :)
19:24 moritz nwc10: I was confused by your latest p6c email, it looked like parsing took much longer (?) than before?
19:26 nwc10 but yes, the overal build is faster

"swapping like a crazy swappy thing" (summary by raiph) Full log
19:27 nwc10 I have this suspicion that the kernel needed to swap something out in order to be able to free a bit more memory up in order to talk to the swap device.
19:30 sorear loopback swap is a Bad Idea for the reason you just mentioned, deadlocks
19:31 sorear you're looking for https://www.kernel.org/doc/Documentation/blockdev/nbd.txt

"Occasionally stuff gets fixed ;)" (summary by raiph) Full log
19:31 sirrobert how can I load a module at runtime (with, say, $module = "Foo::Bar") and check if anything gets loaded into the Foo::Bar space?
19:31 jnthn sirrobert: require. Then a late-bound lookup (maybe the ::('Foo::Bar') way)
19:32 sirrobert hm thanks. (weird... I had trouble with require a long time ago
19:32 jnthn Occasionally stuff gets fixed ;)

"when is http://blogs.perl.org/users/perl_6_reports/ going to be published?" (summary by raiph) Full log
19:48 szabgab also I am trying to figure out when is http://blogs.perl.org/users/perl_6_reports/ going to be published?
19:48 moritz szabgab: raiph has been doing that in the past
Er, that's me. This summary is just one day, and it's nearly 2 weeks late. But I have the Hubris to think my Laziness is more important than your Impatience. The new look of this summary (compare today's with last week's) is actually about making it much easier to do summarizing that suits both summarizers and readers.

Phasers (summary by raiph) Full log
20:31 sirrobert why is CATCH in all caps? (ooc)
20:31 moritz because that makes it stand out
20:31 all of our phasers are all-caps
20:32 sirrobert hmm... phasers?
20:32 moritz also it's kind of a mini-namespace
20:32 sirrobert: blocks or statements that are run at special times during the execution
20:32 phase-based blocks

Lightning Talk (5 minute video) on Rakudo Perl 6 progress in the last 2 years, especially speed, codebase, bus number, portability, stability, docs, modules, libs (summary by raiph) Full log
20:48 pmichaud yay, my lightning talk is (finally) online!
20:48 pmichaud http://www.youtube.com/watch?v[…]8Qfg&feature=plcp starting at 27:30
21:06 pmichaud gabor also gives a really good talk at 45:50

Toy Trucks (summary by raiph) Full log
20:56 sirrobert is there any sandboxing work being done in p6?
20:56 or I guess you could replace the main grammar with a crippled version?
20:56 jnthn A crippled setting is more likely to be useful
20:58 sorear rakudo and niecza both have sandboxes
20:58 and both sandboxes have holes big enough to drive trucks through

Rakudo & LLVM (summary by raiph) Full log
21:58 average_drifter and why you did not choose LLVM and Clang as the primary tools to build Rakudo
21:59 pmichaud several years ago, a number of people looked at LLVM as a possibility for a backend for Perl 6 in general and the consensus was that it wasn't yet sophisticated enough to be able to handle it.
21:59 pmichaud that may no longer be the case, but certainly it was the case in 2007/2008 when we were working on Rakudo.
22:00 today we're looking at making Rakudo work on multiple backends, and a few people have expressed an interest in LLVM as one of the backends.
22:01 diakopter see the "Lessons about LLVM" section of Unladen Swallow Retrospective
22:02 "Unfortunately, LLVM in its current state is really designed as a static compiler optimizer and back end. LLVM code generation and optimization is good but expensive. The optimizations are all designed to work on IR generated by static C-like languages."
22:03 pmichaud I don't have any plans to abandon Parrot in the future; we'll simply be supporting multiple backends. It's entirely possible that people will tend to prefer the backends other than Parrot, but we're waiting to see what actually happens rather than speculating at this point.
22:05 from discussions at yapc::eu a couple of weeks ago I'm led to believe that llvm may have better support for dynamic languages than it did previously, but I haven't had a chance to investigate that myself.
22:05 also, I'll be watching keenly to see what happens with the p5 on llvm effort (if one happens :)
22:13 pmichaud one of the things that happened at the perl reunification summit two weeks ago was to find ways that we can get perl 5 and perl 6 talking together; and one (of several) approaches will be to write a perl 5 system using perl 6 tools
22:13 TimToady++ already has a pretty good start on a perl 5 grammar
22:13 diakopter from the author: "Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them." just JIT. no GC; no object system; no interpreter.
22:15 diakopter the title of the commit message where he added that text? "llvm is not a vm"
22:16 sorear diakopter: at yapc someone tried to tell me that LLVM, in terms of features, was a drop-in replacement for the CLR
22:17 sorear I thanked him while privately thinking "you have no idea what you are talking about, do you"

About this report

To provide feedback, gmail me at raiph.mellor or use the comment feature on this blog.

Thanks all for your recent feedback. More big changes with this report:

  • Some readers said they did not like the shortened highlights version of the last summary. This report is a radical push in the oppostie (exhaustive and exhausting!) direction. Is 26 summaries in a single day too exhaustive? (Note that I've tried to list the most important summaries first so folk can just read the first few summaries and get the gist of the key activity and discussion of the day.)

  • The format of this report is very different to the one I've previously used. Compare with the last summary. What specific problems are there for readers with this new format, especially as compared to the old format?

  • From here forward, my focus will be on reports that cover a single day of discussion and activity on freenode IRC channel #perl6, the center of the Perl 6 community. Do we still want to generate a weekly summaries report? What would it look like? Note that we have an index to all reports.

  • I hand wrote this page by cutting and pasting from the full log. I'm hoping that we'll be able to modify the IRC logging software to enable automatic construction of this page based on simple annotations of the log. In the meantime, please let me know about broken links or other problems.


This format is great!

About the content, just make the summary really a summary. For example "Toy Trucks" isn't. "Sandboxing" would have been better.

Leave a comment

About Perl 6 Reports

user-pic I blog about Perl.