Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-06

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:02 tokuhiro_ joined #perl6
00:02 thundergnat Anyway, I watch the logs pretty regularly so if anyone has any advice, I'll probably see it even if I'm not on IRC.
00:06 thundergnat left #perl6
01:16 sudokode joined #perl6
01:17 am0c joined #perl6
01:23 xinming joined #perl6
01:35 dayangkun joined #perl6
01:35 hypolin joined #perl6
01:38 scott_ joined #perl6
01:41 [Coke] nqp: my %foo; %foo<bar><baz> :=1 ;
01:41 p6eval nqp: OUTPUT«SixModelObject does not implement set_pmc_keyed_str␤current instr.: '' pc 72 ((file unknown):48) (/tmp/E25UcKdKAF:1)␤»
01:41 [Coke] phenny: tell pmichaud about nqp: my %foo; %foo<bar><baz> :=1 ;
01:41 phenny [Coke]: I'll pass that on when pmichaud is around.
02:06 * MikeFair_ waves.
02:18 orafu joined #perl6
02:24 japhb o/
02:24 japhb seen jnthn
02:24 aloha jnthn was last seen in #perl6 1 days 7 hours ago saying "tomorrow evening or so".
02:24 japhb dang
02:28 Pleiades` joined #perl6
02:40 Cofyc joined #perl6
03:02 benabik Completely OT, wasn't someone here an Amber player?
03:12 sorear Yes
03:13 Targen joined #perl6
03:13 * benabik remembers that he can search the logs.  D'oh
03:13 sorear http://irclog.perlgeek.de/​perl6/2012-03-27#i_5357813
03:17 colomon me
03:18 * colomon just realized he's been GMing Amber for over 20 years now.
03:18 sorear does GMing count as playing?
03:18 colomon sorear: yes.  and I've played, too.
03:19 sorear I mean I know you're a huge Zelazny fan and you've been going to Ambercon for 19 years, but this is the first time you used the p-word
03:20 colomon I've played in... hmmm... maybe ten Amber campaigns and who knows how many one-shot con games.
03:35 colomon benabik++
03:40 sorear what did benabik do?
03:41 benabik There's a Amber DRPG play by post starting up.  It is open invite if anyone else is interested.  (I don't want to post the URL publicly, it's on my dinky web server.)
03:42 benabik Not really #perl6, but "all work and no play"
03:46 sorear Ah.
03:55 adu joined #perl6
04:00 MikeFair_ [Coke]: You about, I think I might have a clue regarding the Resizable Array problem you were encountering...
04:01 kaleem joined #perl6
04:02 MikeFair_ [Coke]: I did an strace on the nqp --target=pir main.nqp build, and it seems that when loading the NQPHLL.pbc multiple times, the last one triggers this error
04:02 MikeFair_ [Coke]: Did you figure this one out?
04:42 thou joined #perl6
04:51 marmay joined #perl6
05:13 throughnothing joined #perl6
05:15 thou joined #perl6
05:27 erkan joined #perl6
05:27 erkan joined #perl6
05:36 moritz \o morning
05:44 sorear o/ moritz
05:51 wtw joined #perl6
05:54 MikeFair_ moritz: Good morning (though it's still an hour before I can officially say that ;) )
05:56 adu morning
05:56 tadzik thundergnat: you've found a rakudobug
05:56 tadzik good morning
05:57 tadzik phenny: tell jnthn serialization fail: https://gist.github.com/3651868
05:57 phenny tadzik: I'll pass that on when jnthn is around.
06:02 * MikeFair_ heads to sleep
06:22 SHODAN joined #perl6
06:28 adu joined #perl6
06:43 FROGGS__ joined #perl6
06:43 FROGGS joined #perl6
06:49 FROGGS morning
07:09 eternaleye joined #perl6
07:11 brrt joined #perl6
07:15 erkan joined #perl6
07:15 erkan joined #perl6
07:44 masak morning, #perl6
07:46 moritz \o masak, FROGGS, tadzik, adu
07:47 moritz masak: what's the state of the macro fixes?
07:49 lizmat joined #perl6
07:53 kresike joined #perl6
07:53 kresike good morning all you happy perl6 people
07:58 drbean joined #perl6
08:13 drbean joined #perl6
08:16 sorear good night all you 6perl folks &
08:19 drbean joined #perl6
08:23 FROGGS gnight sorear
08:24 FROGGS Hi masak, moritz and kresike
08:24 kresike hello FROGGS o/
08:24 FROGGS what are we doing today?
08:25 * kresike is working, and lurking in #perl6
08:25 Psyche^ joined #perl6
08:27 stepnem joined #perl6
08:28 leont joined #perl6
08:31 masak moritz: jnthn gave me some ideas yesterday, including what's wrong with the current patch. I might have time to look at it this evening; otherwise, in the weekend.
08:32 masak ooh: https://github.com/aanand/deadweight -- pcawley suggested that something like this be a killer app for Perl 6. that was two years ago, I believe.
08:40 fhelmberger joined #perl6
08:55 sergot probably not everyone saw this. http://feather.perl6.nl/~sergot/modules
08:55 sergot http://feather.perl6.nl/~sergot/mod​ules/module/Typed::Subroutines.html
08:55 sergot new feature ! :)
08:55 sergot please comment. :)
08:57 masak ooh
08:58 tadzik oh, oh
08:58 tadzik sergot: the top link is broken, I wanted to fix it last night, but I guess it'll require some per-server configuration
08:58 tadzik as $basedir = '/foo/bar' or so
08:58 tadzik also, links on the main page could now direct to module pages :)
08:59 xinming joined #perl6
09:00 sergot tadzik: oh, right,  I'll repair this. Thanks :)
09:00 dakkar joined #perl6
09:01 tadzik thank you :)
09:20 erkan joined #perl6
09:20 erkan joined #perl6
10:02 daxim joined #perl6
10:12 man joined #perl6
10:12 man hello
10:12 tadzik hi man
10:12 man hey
10:12 man can u help in perl problem
10:13 tadzik is that Perl problem, or Perl 6 problem?
10:13 man its a program in perl
10:13 tomaw_ joined #perl6
10:13 man i m a beginner
10:14 tadzik this channel is dedicated to Perl 6; for Perl 5, you may want to go to #perl
10:14 man i need to write a perl script to store every word in a file as a key in hash
10:15 tadzik is that a homework of some sort?
10:15 man i m a beginner and its a part of my project
10:16 man i tried doing a script but not getting the result
10:17 tadzik is that to be a Perl 5 program or Perl 6 program? Those are 2 different languages
10:17 tadzik not 2 versions of the same one
10:18 man perl 6
10:18 tadzik *shrug*
10:24 masak dang, I was curious what his problem was ;)
10:25 masak but most likely, it was 200 lines of horrific Perl 5. so, no big loss.
10:25 daxim tadzik, next time just ask for the code
10:25 tadzik daxim: I was about to do it after "perl 6"
10:25 daxim it saves you one step
10:27 tadzik right
10:29 * masak .oO( "no! don't paste it directly in the channel! noooooo...!" )
10:35 sudokode joined #perl6
10:36 daxim you're melting, you're melting?
10:39 masak :)
10:49 jaldhar joined #perl6
11:16 tokuhiro_ joined #perl6
11:18 Juerd What's the size of a build tree of your favorite perl6 implementation, after build?
11:18 Juerd (Rough estimates are okay)
11:19 moritz 460Mrakudo/
11:19 moritz 460M    rakudo/
11:19 Juerd For a new feather (physical box), I think it makes sense to investigate SSDs as an option.
11:22 moritz currently we have ~106GB?
11:26 JJ_Brain joined #perl6
11:28 Juerd Something like that
11:29 JJ_Brain gtg
11:30 crab2313 joined #perl6
11:55 pmichaud good morning, #perl6
11:55 phenny pmichaud: 05 Sep 22:10Z <[Coke]> tell pmichaud that "existkey" is metioned in the docs but doesn't exist.
11:55 phenny pmichaud: 01:41Z <[Coke]> tell pmichaud about nqp: my %foo; %foo<bar><baz> :=1 ;
11:56 masak pmichaud! \o/
11:57 pmichaud hmmm, my irssi or screen session is malfunctioning.  may need to restart.
11:59 henrys_ joined #perl6
12:00 moritz good am, pm
12:03 fgomez joined #perl6
12:04 att joined #perl6
12:05 dayangkun joined #perl6
12:24 dalek joined #perl6
12:40 lizmat Juerd: are SSD's reliable enough these days?  Or would it make sense to have a "classic" hard drive in the new feather as well?
12:40 tadzik I find them reliable :)
12:40 tadzik but I only use mine for about 3-4 months
12:40 lizmat :-)
12:41 brrt lizmat: afaik, its a price thing, you can have really reliable ssds butthey are pricey
12:41 lizmat ack, same here with Wendy's notebook
12:41 lizmat all ok so far… but she also has a hard disk for making backups  :-)
12:41 lizmat anyways, I need to be off for probably the rest of today
12:42 lizmat left #perl6
12:44 [Coke] morning, pmichaud.
12:45 dalek ecosystem: 13912e0 | (Alexandr Alexeev)++ | META.list:
12:45 dalek ecosystem: added Sitemap::XML::Parser
12:45 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/13912e054a
12:45 dalek ecosystem: d401129 | tadzik++ | META.list:
12:45 dalek ecosystem: Merge pull request #12 from afiskon/patch-1
12:45 dalek ecosystem:
12:45 dalek ecosystem: added Sitemap::XML::Parser
12:45 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d401129f2c
12:45 moritz tadzik: when you merge those pull requests, please keep a list of the github nick names
12:46 moritz tadzik: so that I can give them commit access later
12:46 tadzik I think there's a pull request history
12:46 tadzik yes, there is
12:47 moritz \o/
12:48 [Coke] sorear: OOC, why the interest in partcl on nqp?
12:51 * [Coke] wonders if there's a way to tell diff "pretend that any thing with a leading # removed is otherwise the same."
12:53 FROGGS [Coke]: man diff says:        -I, --ignore-matching-lines=RE
12:53 FROGGS ignore changes whose lines all match RE
12:54 moritz FROGGS++
12:54 FROGGS rtfm++
12:54 moritz fm++
12:55 FROGGS absolutely
12:56 PacoAir joined #perl6
12:59 sirrobert in: for @foo -> $bar { ... }
12:59 sirrobert is the $bar implicitly scoped with "my"?
12:59 sirrobert or should I get in the habit of doing it explicitly?
12:59 moritz it's scoped the signature and the block
12:59 [Coke] I don't want to ignore the line, just the leading #.
12:59 sirrobert it's scoped to the following block
12:59 sirrobert moritz: thanks
13:00 [Coke] so if I change #foo to bar, tell me, but not if I change #foo to foo.
13:00 moritz you can write   -> $bar, $flurb = $bar { }
13:00 [Coke] niche request. I can handle it maually.
13:00 timotimo WHOA. diff can output diffs with #ifdef? that's amazing.
13:00 masak sirrobert: yes. besides the slight differences between parameters other local variables, $bar is essentially my-scoped.
13:00 moritz .oO( #ifdiff )
13:00 masak sirrobert: you can't put 'my' before $bar, because it's a signature.
13:01 sirrobert makes sense, thanks
13:02 timotimo [Coke]: personally, i'd make a "transformation" where i remove initial # from all lines in both files and diff them
13:02 timotimo if that's at all feasible for you in this case
13:02 PacoAir joined #perl6
13:02 cognominal_ joined #perl6
13:03 timotimo you may need a backtransformation later to get a proper diff, though. that shouldn not be terribly much work, though, if your diff isn't terribly huge
13:06 moritz my new boss just told me to take longer to solve problems :-)
13:06 timotimo oh, that's a nice compliment, isn't it?
13:06 moritz aye
13:06 FROGGS or it means that it didnt work what you did and you should be more careful
13:06 moritz though there's some serious background: he has to explain quite a few things before I'm able to work on the stuff
13:07 FROGGS but hey, cant be, you are moritz  ;o)
13:07 timotimo oh, so by solving problems fast, you use up more of his time?
13:07 moritz timotimo: correct
13:07 moritz FROGGS: you don't know me very well, I'm actually quite sloppy
13:08 FROGGS I just can tell what I see, and that looks good to me
13:14 sirrobert I recall some operator that coerces to Bool (not !!)... any clues?
13:14 FROGGS so
13:14 colomon ?
13:14 sirrobert FROGGS: yes!
13:14 sirrobert thanks
13:14 FROGGS ;o)
13:14 FROGGS cool, I actually be of any help
13:14 colomon sirrobert: ? does as well
13:15 sirrobert colomon: ahh!  good to know
13:15 sirrobert are they perfectly synonymous?
13:15 moritz just difference precedence
13:15 colomon no.
13:15 moritz ? is tighter, so is looser
13:15 colomon what moritz said
13:15 moritz but the semantics are the same
13:15 sirrobert cool
13:15 sirrobert I want looser this time, but great to know
13:15 moritz http://faq.perl6.org/#so
13:16 sirrobert nice
13:18 bluescreen10 joined #perl6
13:20 sirrobert I think I'll write something like an interactive p6 grammar/syntax tool lookup
13:21 sirrobert are the doc.perl6.org generated out of the POD?
13:21 moritz yes
13:21 moritz script htmlify.pl in the perl6/doc repo
13:21 sirrobert nice
13:21 sirrobert looking
13:22 moritz feel free to integrate your tool with bin/p6doc in that same repo
13:22 moritz that's what it is supposed to do in the future
13:22 sirrobert ohhh cool
13:23 sirrobert even better
13:23 moritz though it'll be qutie some time until I get around to do it, so if you want to do parts of it, that would be really nice
13:23 sirrobert sure
13:23 sirrobert I'd much rather put my resources to an existing project
13:24 sirrobert need to finish my current task (a controller dispatcher for api requests... looking nice so far =)
13:26 sirrobert in "method foo:bar () { ... }"  is there anything weird happening with the colon?
13:27 sirrobert or is it just a name with a colon
13:27 timotimo r: method foo:bar(){...}
13:27 p6eval rakudo cc1858: OUTPUT«Useless declaration of a has-scoped method in mainline␤»
13:27 timotimo oh, duh :)
13:27 timotimo r: class A { method foo:bar(){...} }; say &A.foo:bar
13:27 p6eval rakudo cc1858: OUTPUT«No such method 'foo' for invocant of type 'Nil'␤  in block  at /tmp/yWJpwCybx7:1␤␤»
13:27 sirrobert r: class A { method a:b () { say 'foo'} }; A.new.a:b();
13:27 p6eval rakudo cc1858: OUTPUT«No such method 'a' for invocant of type 'A'␤  in block  at /tmp/VCZCfBN5q3:1␤␤»
13:27 timotimo okay, i'll figure it out!
13:27 sirrobert hmm
13:28 timotimo r: class A { method foo:bar(){...} }; my $a = A.new; say &A.foo:bar; say &A.foo; say &A.bar;
13:28 p6eval rakudo cc1858: OUTPUT«No such method 'foo' for invocant of type 'Nil'␤  in block  at /tmp/P8Ft4ltx4r:1␤␤»
13:28 sirrobert curiously it declares fine, and you can do MOP stuff with it
13:28 timotimo r: class A { method foo:bar(){...} }; my $a = A.new; say &($a.foo:bar); say &($a.foo); say &($a.bar)
13:28 p6eval rakudo cc1858: OUTPUT«No such method 'foo' for invocant of type 'A'␤  in block  at /tmp/wjWY0yp3HH:1␤␤»
13:29 timotimo i'm not good at this :(
13:29 sirrobert r: class A { method a:b () { say 'foo'} }; A.new."a:b"();
13:29 p6eval rakudo cc1858: OUTPUT«foo␤»
13:29 sirrobert I guess the parser gets confused because of the colon-for-args syntax
13:30 timotimo maybe A.new.a:b() parses as infix:<:>(A.new, b())?
13:30 sirrobert well, not *confused*
13:30 [Coke] nqp: my $foo := -> { say("eek") }; $foo();
13:30 p6eval nqp: OUTPUT«Missing block at line 2, near "-> { say(\""␤current instr.: 'panic' pc 19998 (src/stage2/gen/NQPHLL.pir:7314) (src/stage2/gen/NQPHLL.pm:325)␤»
13:30 sirrobert I think it gets parsed as:  A.new.a(b())
13:30 [Coke] r: my $foo := -> { say("eek") }; $foo();
13:30 p6eval rakudo cc1858: OUTPUT«eek␤»
13:30 timotimo oh, that makes some sense.
13:30 nnunley joined #perl6
13:31 timotimo we can test that!
13:31 sirrobert [Coke]:  what's := -> ?
13:31 moritz := is binding
13:31 timotimo -> is for lambdas, no?
13:31 moritz and -> introduces a pointy block
13:31 moritz aka lambda, yes
13:31 sirrobert didn't know either of those =)
13:31 moritz nqp: my $foo = { say('eeks') }; $foo()
13:31 p6eval nqp:  ( no output )
13:31 * [Coke] needs that in nqp for partcl-nqp to work, hethinks.
13:31 sirrobert oh, I guess it's the -> from a for loop
13:31 moritz nqp: my $foo := { say('eeks') }; $foo()
13:31 p6eval nqp:  ( no output )
13:31 timotimo r: class A { method foo:bar(){ say "foo bar called" }; method foo(){ say "foo called"} }; sub a() { say "a called" }; A.new.foo:bar()
13:31 p6eval rakudo cc1858:  ( no output )
13:32 timotimo oh, huh?
13:32 moritz nqp: say('sanity')
13:32 p6eval nqp:  ( no output )
13:32 moritz nr: say 42
13:32 p6eval rakudo cc1858, niecza v21-1-ga8aa70b:  ( no output )
13:32 moritz oh noez
13:32 timotimo whoopsie.
13:32 sirrobert heh
13:32 [Coke] nqp: say(3);
13:32 p6eval nqp:  ( no output )
13:32 [Coke] O_o
13:32 timotimo time for a test suite that sends a few basic eval lines to the bot in a query to see if everything works?
13:33 tadzik r: say " ( no output )
13:33 p6eval rakudo cc1858:  ( no output )
13:33 timotimo ah, it works!
13:33 timotimo but only for *some* outputs!
13:34 diakopter p6: boo
13:34 moritz let's try it with a bot restart
13:34 p6eval joined #perl6
13:34 timotimo r: say " ( no output )
13:34 timotimo why does that even work without an additional " at the end?
13:34 diakopter masakbot: poing
13:34 moritz because it's p6eval that produces ( no output )
13:34 moritz r: say 42
13:35 p6eval rakudo cc1858:  ( no output )
13:35 p6eval rakudo cc1858:  ( no output )
13:35 timotimo wouldn't it display an error instead? lie it did before?
13:35 diakopter moritz: did you see my unreported rabugkudo yesterday
13:35 timotimo oh, gotta run, bbl
13:35 [Coke] r: say "
13:35 p6eval rakudo cc1858:  ( no output )
13:35 moritz diakopter: no
13:35 colomon r: say '' this is a
13:35 p6eval rakudo cc1858:  ( no output )
13:35 moritz I don't know what's up with p6eval
13:36 moritz $ . ~/nom-inst/bin/perl6 -e 'say 42'
13:36 moritz -su: .: /home/p6eval/nom-inst/bin/perl6: cannot execute binary file
13:36 moritz any idea what would cause such a message?
13:37 moritz oh
13:37 moritz file ~/nom-inst/bin/perl6
13:37 moritz /home/p6eval/nom-inst/bin/perl6: ELF 32-bit LSB
13:37 moritz $ uname -a
13:37 moritz Linux feather3 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 GNU/Linux
13:37 masak mystery solved.
13:37 moritz did somebody just change the architecture of feather{1,3}?
13:38 diakopter heh
13:38 diakopter I thought 32-bit could run unmodified on 64-bit
13:39 diakopter or is that just Windows
13:39 moritz I dunno. /bin/echo is also a 32 bit ELF, and runs fine
13:39 arnsholt I think, 32-bit can run on 64-bit, but all the libraries have to be 32-bit as well, IIRC
13:40 diakopter what's the age of the kernel file
13:42 kresike moritz, don't you have disk read errors in dmesg ?
13:42 moritz no, just segfaults
13:43 GlitchMr joined #perl6
13:47 stopbit joined #perl6
13:50 moritz diakopter: I can't even find the kernel file
13:51 dalek Perlito: fa54da2 | (Flavio S. Glock)++ | / (2 files):
13:51 dalek Perlito: Perlito5 - javascript: update TODO (reference counting)
13:51 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/fa54da2d19
13:52 benabik joined #perl6
13:55 atrodo joined #perl6
13:59 FROGGS__ joined #perl6
14:11 FROGGS joined #perl6
14:11 thou joined #perl6
14:15 phenny joined #perl6
14:18 timotimo moritz: on my system, i have /proc/kcore, which seems to be the kernel image
14:18 timotimo kcore: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'BOOT_IMAGE=/vmlinuz-3.2.0-3-amd64 root=UUID=463414d4-50c5-49e7-855f-be37db23f378'
14:18 timotimo would that help at all?
14:20 diakopter some virtualization modes don't expose a kernel
14:22 timotimo oh, that makes sense, too.
14:24 benabik_ joined #perl6
14:25 skids joined #perl6
14:30 Circlepuller joined #perl6
14:33 Circlepuller_ joined #perl6
14:34 sjn joined #perl6
14:34 sirrobert Is there a builtin that converts a string to something numerical iff possible?
14:35 masak sirrobert: prefix:<+>
14:36 sirrobert oh, right
14:36 sirrobert thanks
14:36 masak rn: say +"42 penguins"
14:36 tadzik p6eval is down
14:36 masak oh, still? sorry to hear that.
14:37 masak locally:
14:37 masak $ nom -e 'say +"42 penguins"'
14:37 masak Cannot convert string to number: trailing characters after number in '42⏏ penguins' (indicated by ⏏)
14:37 masak $ nom -e 'say +"42"'
14:37 sirrobert I can use: (+$foo || $foo)
14:37 masak 42
14:37 masak sirrobert: infix:<//> is probably more what you mean there.
14:37 masak sirrobert: otherwise 0 will default back to the string.
14:38 sirrobert I thought it might be..
14:38 sirrobert ahh
14:38 sirrobert I couldn't think of the case that made the difference
14:38 masak that's the difference here.
14:38 masak infix:<||> defaults for all falsy values.
14:38 nwc10 joined #perl6
14:38 masak infix:<//> defaults for all undefined values (a subset of the falsy ones, most of the time)
14:39 sirrobert got it
14:39 sirrobert (+"0" // "0").WHAT # Int()
14:39 sirrobert (+"0" || "0").WHAT # Str()
14:40 masak right.
14:41 sirrobert what provides p6eval?  a bot running on ... perl6.org?
14:42 sirrobert we should definitely wire that into the interactive docs
14:42 raiph joined #perl6
14:43 GlitchMr sirrobert: feather3
14:43 sirrobert hmm
14:44 sirrobert looking
14:44 raiph hi all
14:44 GlitchMr It's running on feather3 sandbox
14:44 GlitchMr Also, https://github.com/perl6/evalbot
14:45 raiph i'm #perl6-warnocked on http://irclog.perlgeek.de/​perl6/2012-09-04#i_5961151
14:45 raiph got feedback from uvtc: http://www.reddit.com/r/perl/comments/zazl9/per​l6_highlights_for_week_ending_20120901/c63mjwc
14:46 telex joined #perl6
14:46 masak raiph: I wouldn't do red at all there, just bold.
14:46 masak raiph: or maybe a very dark green.
14:46 masak (but still bold)
14:46 raiph i hope to start preparing this week's summary tonight. i'm hoping for feedback before then.
14:47 raiph masak: thanks. agreed.
14:47 GlitchMr But perhaps it would be possible
14:47 masak "red" means "wrong" :)
14:47 masak at least in a lot of contexts.
14:48 FROGGS .oO( red is the color of love )
14:49 GlitchMr Perl 6 startup is slow (Rakudo is like 1.6s, Niecza is 1s) on empty script
14:49 GlitchMr But perhaps if Perl 6 would be already ran...
14:49 tadzik 1.6s? What hardware is that?
14:50 tadzik It's about 0.25 on my old laptop
14:50 GlitchMr feather1
14:50 FROGGS less then half a second on my box I'd say
14:50 tadzik is that a fresh nom on feather1?
14:51 GlitchMr I haven't checked with nom
14:51 GlitchMr I have checked 2012.08
14:51 GlitchMr Perhaps nom is faster, I don't know
14:51 tadzik 2012.08 is fresh
14:55 GlitchMr See http://tryhaskell.org/ for example
14:55 GlitchMr Everything reacts very quickly
14:58 sirrobert perl6 -e "" takes about 0.1 second for me
14:59 FROGGS perl -MTime::HiRes -e '$t=Time::HiRes::time; `perl6 -e ""`; print Time::HiRes::time-$t' # 0.241441965103149
14:59 GlitchMr wait what
14:59 sirrobert use: time perl6 -e ""
14:59 GlitchMr -e is way faster than reading code?
14:59 GlitchMr Why?
14:59 GlitchMr I know that filesystem IO could be slow, but not that slow
15:00 benabik It takes about 1.6s either way on my machine.
15:00 sirrobert time perl6 foo.pl #contains "use v6;"
15:00 sirrobert real0m0.325s
15:00 GlitchMr what?
15:00 sirrobert use: time perl6 -e ""  # real0m0.272s
15:01 GlitchMr real    0m0.291s
15:01 GlitchMr what
15:01 FROGGS GlitchMr: its the same speed for doing -e '' or using an empty file
15:01 FROGGS s/for/for me/
15:02 GlitchMr But now it's apperently faster
15:02 GlitchMr Even when reading empty file.
15:02 GlitchMr I don't know
15:02 daxim now = after the disk cache is hot?
15:02 FROGGS that wouldnt explain a whole second
15:03 GlitchMr https://gist.github.com/3657109
15:03 GlitchMr That was original result
15:03 GlitchMr But yeah, probably some random delay
15:03 GlitchMr It doesn't happen now
15:04 sirrobert nod
15:04 TimToady maybe it just hadn't had its morning coffee yet
15:04 GlitchMr The lesson being - don't trust single "time" run
15:05 FROGGS thats true for testing threads too
15:05 FROGGS I learned that the hard way
15:05 sirrobert that's true for testing anything ;)
15:05 daxim run this many times, throw the outliers away, then determine the median
15:06 GlitchMr But if 2 + 2 says you 5 then things are wrong anyways
15:06 GlitchMr Or perhaps definition of 2 has changed
15:06 FROGGS maybe its the operator now O.o
15:06 GlitchMr But perhaps you need additional runs...
15:07 dalek Perlito: 966c1c8 | (Flavio S. Glock)++ | / (4 files):
15:07 dalek Perlito: Perlito5 - javascript - bugfix (#5) - $| not predeclared
15:07 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/966c1c810e
15:07 kresike bye folks
15:14 kaare__ joined #perl6
15:21 sergot moritz, Juerd: is there any possibility to update rakudo on feather1 ?
15:21 sergot cron uses the old one
15:21 Juerd sergot: What's needed is someone who will compile it
15:21 Juerd sergot: The current one is a symlink to ingy's homedirectory. He hasn't maintained that Rakudo build in ages :)
15:22 Juerd I personally don't want to do it because then people will think I'll maintain things on feather, which I don't :)
15:22 Juerd But if you'll compile rakudo, I'll gladly point that symlink to your binary.
15:23 sergot Juerd: you can use p6eval bot's rakudo, can't you? :)
15:23 sergot It's /home/p6eval/nom/perl6
15:25 sirrobert r: 'a' ~~ / ^'b' /
15:25 Juerd I can do that. I'll symlink it.
15:25 sirrobert oh, right
15:26 sergot Juerd++ thanks. :)
15:26 Juerd Done
15:26 sirrobert ok:  how do I match "not char x" in a regexp?
15:26 FROGGS it was [^x]
15:26 FROGGS but I have no idea how it is now
15:26 sirrobert me neither =)
15:27 sirrobert I tried [^x] already
15:27 TimToady std: /[^x]/
15:27 TimToady ENOBOT
15:28 TimToady should say: [^x] appears to be an old-school character class; please use <-[x]> if you mean a character class
15:28 * masak .oO( today, we all have to be evalbots )
15:29 FROGGS that gives me true: perl6 -e 'say so "abc" ~~ /<-[b]>/'
15:29 TimToady yes, it found a character that was not b
15:29 * FROGGS .oO( thinks of a cool evilbot name for himself )
15:30 FROGGS -.-
15:30 FROGGS ya, I'm a bit stupid :o)
15:30 sirrobert I have something in the format 'foo/bar/baz'.  I want to catch bar and baz as args to foo
15:30 sirrobert (I'm using a grammar)
15:30 masak FROGGS: momentary stupidity happens to all of us. the trick is to do great stuff during one's similarly brief smart moments ;)
15:31 TimToady I'd use a subrule to match the latter two
15:31 sirrobert subrule... hm
15:31 FROGGS masak: I'll keep that in mind *g*, thanks
15:31 masak FROGGS: and then there are various ways to increase one's averages, and decrease the standard deviation...
15:31 TimToady even better if you can do the smart thing *because* of the stupid thing
15:31 TimToady being stupid is an opportunity :)
15:32 sirrobert TimToady:  I had something like:   token foo { 'foo' <arg> <arg> }
15:32 sirrobert is that ('arg') what you mean by subrule?
15:32 TimToady I've made a whole living from that...
15:33 sirrobert I see it in S05
15:33 TimToady but if it's variadic you want <arg>*
15:33 sirrobert ok.  I can't seem to get that set of rules/subrules to work.
15:33 sirrobert TimToady: nod
15:33 sirrobert still working on making the match work with a fixed number =)
15:33 masak sirrobert: are you using automated tests?
15:34 sirrobert masak yeah
15:34 sirrobert ^:
15:34 masak sirrobert: it's a really good combination with grammars.
15:34 sirrobert masak: yeah, we have a pretty strict test policy (integration and unit are required for all commits)
15:34 masak nice.
15:34 sirrobert a little looser on unit =)
15:35 sirrobert unit tests are weird with LISPs
15:35 masak nowadays when I develop a new grammar, I do it with test-first development.
15:35 masak it's one of the few situations where I prefer to iterate with strict TFD.
15:35 sirrobert yeah
15:35 masak and it works really well for that.
15:36 sirrobert I'm trying to get the aforementioned test to work =)
15:36 sirrobert foo/bar/baz to match:  token { 'foo' <arg> <arg> }
15:36 sirrobert haven't been able to so far (I guess the problem is in the definition of <arg>)
15:36 sirrobert but I can't figure out how to say 'match up to char x'
15:37 masak sirrobert: you realize that you're using 'token', not 'rule', so whitespace is not significant?
15:37 sirrobert masak: nod
15:37 masak good.
15:37 sirrobert found out about that Tuesday ;)
15:38 masak :)
15:53 ChoHag joined #perl6
16:03 MayDaniel joined #perl6
16:12 GlitchMr Grammars are amazing. You don't have to write ugly regexpes like
16:12 GlitchMr \A(?=\s*[[{])(\s*(?:("(?:[^\x00-\x1F\\"]|\\(​?:["\\/bfnrt]|u[0-9A-Fa-f]{4}))*")|-?(?:0|[1​-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?|​\{(?:(?-1):(?-2)(?:,(?-1):(?-2))*)?\}|\[(?:(​?-2)(?:,(?-2))*)?\]|true|false|null)\s*)\z
16:13 GlitchMr (ok, I know you can use /x, but grammars still look nicer)
16:18 masak well, PCRE-like regex syntax was designed over a long time and with severe constraints of backwards compatibility. so it's not so strange that grammars look nicer. :)
16:18 pat_js joined #perl6
16:19 pyrimidine joined #perl6
16:21 FROGGS__ joined #perl6
16:21 FROGGS joined #perl6
16:21 TimToady "Break everything that needs breaking", we said, and regexes are at the front of that line.
16:22 arnsholt First against the wall when the revolution came
16:23 nebuchadnezzar joined #perl6
16:23 mst regular expressions' compactness is a huge win for interactive whipuptitude
16:23 TimToady sure, but it should be optional, not required...
16:24 PerlJam That would make a good cartoon.   A bunch of coffee mugs labeled for various bits of Perl 5 that needed breaking for Perl 6 and someone throwing them against a wall and another someone using those pieces to build a big "Perl 6" or something
16:24 pat_js joined #perl6
16:24 mst grammars' expressivity is a huge win for long term manipulexity
16:24 mst I think what we're really breaking here is people's tendency to reach for regular expressions for things they just don't work for, at all
16:24 PerlJam mst: we can only hope that's the case.
16:24 mst http://api.metacpan.org/source/MSTROUT/We​b-Simple-0.020/lib/Web/Dispatch/Parser.pm
16:25 Juerd mst: In my experience, Perl 6 regexes are very typable. Especially (?:) that's optimized to [] is a big win, and so are <before ...> which I find easier to type than (?=...). The punctuation's tough.
16:25 pat_js joined #perl6
16:25 mst the way I use regexps in there isn't particularly horrible
16:25 TimToady "I know, I'll use regular expresssions.  Now I have 10 types of problems."
16:25 mst in that it'd probably be nicer using grammars, but it's not particularly unnice without
16:25 mst TimToady: "Now you have /(?:problem){2,}/s"
16:26 * masak .oO( another way to recognize p5ers... they say "regexps", not "regexes"... ) :P
16:26 Juerd Repetition sucks in p6regexes.
16:26 TimToady 'problem' ** 2..*  # you mean this?
16:26 Juerd masak: Nah, I switched to regexes long before I even heard about Perl 6 :P
16:26 mst but grammars seem to me to invite the user to apply the sort of discipline to your thinking that you only learn to apply to regexps through shooting yourself in the foot repeatedly
16:26 Juerd TimToady: Yes. I find that syntax hard to remember and hard to parse visually.
16:26 masak Juerd: sure. it's not a sure-fire way to recognize p5ers.
16:27 am0c joined #perl6
16:27 TimToady well, I'd argue that repetition of that form *should* be hard to read :)
16:27 masak Juerd: the mnemonic for infix:<**> is quite nice, I think. it's a kind of exponentiation, because 'xxx' is 'x ** 3'.
16:27 PerlJam Juerd: you get used to it after a while.
16:27 masak Juerd: but I use infix:<**> quite rarely.
16:28 Juerd masak: Oh, did the x operator go away?
16:28 PerlJam Juerd: also, once you "box it" in  your head correctly, it seems "natural"
16:28 TimToady which is why it should be hard
16:28 Juerd I don't use {4} much at all in p5, but I do use {4,} a lot.
16:29 TimToady well, we certainly weren't going to waste precious brackets on it
16:29 masak Juerd: the infix:<x> operator is for the main slang. infix:<**> is in the regex slang.
16:29 Juerd And going from xx{4,} to 'xx' ** 4..* feels like a huge step backward. I'll just have to get used to it, perhaps.
16:29 PerlJam maybe we should use postfix ^ to mean, "from here on"   so,   4^ is the same as 4..*   ;-)
16:29 Juerd masak: Sorry, I was confused for a second.
16:29 masak no prob :)
16:30 masak yeah, I don't see the huge step backward.
16:30 Juerd TimToady: I understand and agree. I've tried to come up with an alternative but couldn't think of any... except the backtick of course ;)
16:30 masak also xx{4,} would mean x(?:x{4,})
16:30 Juerd True.
16:31 pmichaud joined #perl6
16:33 bob___ joined #perl6
16:34 GlitchMr sub postfix:<^> { $^a .. * }
16:34 GlitchMr I guess it's something that shouldn't happen?
16:35 masak GlitchMr: I have no idea what you're asking.
16:35 GlitchMr perl6: sub postfix:<^> { $^a .. * }; (5^4).perl.say;
16:35 masak evalbot is down.
16:35 GlitchMr lol
16:36 masak but if that had run, I think you would get a TTIAR from the 4.
16:36 TimToady and that'd be two terms in a row
16:38 TimToady Juerd: also, there's some subtle editorial pressure here that if you've designed a language that has arbitrary repetition counts, yer doing it rwong.
16:39 xinming joined #perl6
16:40 TimToady there is no instance of ** repetition in the Perl 6 grammar, in fact
16:41 * TimToady recognizes that the write of the regex is not necessarily in charge of the design of language being parsed :)
16:41 TimToady *writer
16:42 TimToady and that languages designed for hardware often must enforce the arbitrary limits imposed by the hardware
16:44 TimToady otoh, merely failing to match is probably the wrong approach for situations where you want to give a better error message
16:44 TimToady "You provided 7 args, but only 4 are allowed here"
16:48 TimToady In general, catching semantic errors with syntax is not very user friendly.
16:50 Juerd TimToady: In a language, sure, but when parsing arbitrary text, looking for phone numbers for example, it's really useful to require at least N digits.
16:50 Juerd 4 is very unlikely to be a phone number, 12384877234 might be one, though.
16:51 TimToady yes, you didn't design that language
16:51 TimToady but if you're designing a phone to do autodialing, you have to allow for dialing short numbers too, in case you want to dial an extension
16:52 Juerd Yes, that is true.
16:53 TimToady I've seen lots of phones that assumed, for instance, north american telephone number schemes when they shouldn't
16:53 TimToady modem manufacturers usually got it right though
16:54 TimToady anyway, that's why it's merely a subtle editorial policy :)
16:54 arnsholt I was impressed with my clever phone the other day. It detected when I was dialling a US number (from a Norwegian phone) and grouped the digits 3/3/4
16:55 TimToady without a 1 on the front?
16:56 TimToady that seems a bit presumptious...
16:56 diakopter___ joined #perl6
16:56 TimToady *tuous
16:56 arnsholt No, with the +1
16:56 diakopter___ left #perl6
16:56 TimToady ah, well, then
16:56 arnsholt Wouldn't have worked without that, after all
16:57 TimToady NA still has a bit of weight in the world :)
16:57 TimToady the USA is important, and Canada is, well, big...  :)
16:58 TimToady very very big
16:58 arnsholt (And lucky enough to use the same phone numbers)
16:58 masak TimToady: they're bigger than Australia, and it's a continent! :P
16:58 TimToady +1
17:00 * TimToady thinks North Dakota is really Canada in disguise, sneaking a couple senators into Washington, D.C.
17:02 TimToady it used to be that phone exchanges in the US allowed you to leave the 1 off the front of long distance numbers because all area codes had 0 or 1 as the middle digit, and none of the exchanges did
17:03 TimToady but then they ran out of area codes
17:03 TimToady (of that form)
17:03 TimToady talk about design decisions that won't scale...
17:05 diakopter prefix-free phone numbers
17:06 arnsholt We have prefix-free phone numbers. Of course that means you always have to dial all eight digits =)
17:07 TimToady I wish, rather than overlaying area codes, that they'd just add more digits on the end
17:07 PerlJam which end?  :)
17:07 TimToady the right end :)
17:08 PerlJam I dunno.  I think in a few decades phone numbers won't be important enough to be part of the user interface anymore.
17:09 FROGGS thats not that simple, the numbers before that suffix mustn exist already
17:09 FROGGS I guess you will dial ipv6 "numbers" in a few years
17:09 FROGGS like :::6f:7 or what it looks like
17:10 TimToady as long as telemarketers have identifiable ipv6 numbers, I'm all for it
17:10 FROGGS right
17:11 PerlJam or you won't *dial* at all.
17:11 TimToady
17:11 TimToady ^ autopun of "That goes without saying."
17:12 PerlJam We're already talking to our cell phones, why not the others as well?
17:12 FROGGS my college's phone at home responses to a blacklist from web like "the number you dialed is not available"
17:13 FROGGS but he is some sort of guy that can check the temperature at from anywhere using his smartphone (nagios)
17:15 sirrobert What's the syntax for a named capture?
17:16 TimToady <foo> is the easiest
17:16 TimToady $<foo> = [ ... ] to get fancy
17:16 sirrobert What's the next easiest?
17:16 sirrobert ok, thanks
17:16 TimToady in between is <foo=.bar>
17:16 TimToady but that only works to name assertions that could already go inside <>
17:17 sirrobert r: say test
17:17 FROGGS no bot, no fun
17:17 TimToady of course, you *could* just read S05
17:18 sirrobert s05 reads more like a spec than a tutorial ;)
17:18 TimToady well, every time we explain something here, we don't explain something there :)
17:19 sirrobert heh nod.  It's just that the synopses are in engineering order, but I'm at the level of needing things in educational order.
17:19 TimToady ja
17:20 sirrobert still, I'm learning to use them better and better
17:20 PerlJam sirrobert: What's "education order" for you exactly?
17:20 TimToady tutorials should be designed to help you use the references :)
17:20 PerlJam (maybe that could be the start of a good tutorial)
17:20 sirrobert both: agreed
17:21 FROGGS PerlJam: arange it from a simple task (with a simple solution) to the harder ones
17:21 FROGGS well, we now know that there are no impossible things at all ;o)
17:21 PerlJam FROGGS: my simple and your simple will be two very different things.  It's the people who are actually in the midst of learning who know where the rough spots are.
17:22 TimToady Teach a man to burn a fish, and, er, it'll stay burnt after it's dead.
17:22 TimToady or something like that
17:23 TimToady It'll stay burnt after he's dead too...
17:23 FROGGS ohh, I can burn fish^^
17:24 FROGGS PerlJam: I guess there are some good articles on the net covering this problem (not perl specific ones)
17:24 * PerlJam thinks it's really time for "Learning Perl 6" to be written.
17:24 FROGGS PerlJam: ya, that would be sweet!
17:24 * TimToady is clever enough this morning to appreciate his own cleverness, without being clever enough to notice that it's not clever enough...
17:25 PerlJam I wonder how much prodding it would take to get bdf and merlyn to write stuff
17:25 FROGGS and this time I wont forget to ask TimToady for a sign when standing next to him holding a new copy of programming perl -.-
17:25 PerlJam (and would they be amenable to accepting stuff we've already written (even if just in our heads ;)
17:25 PerlJam )
17:26 am0c joined #perl6
17:27 PerlJam I bet you could get 4 or 5 chapters of LP6 from #perl6 without too much difficulty
17:27 FROGGS well, it dont has to cover everything
17:27 PerlJam Just like the "Using Perl 6" book though, the trick is putting it all together into a cohesive whole
17:27 sirrobert because of the breadth, I'd break it up into a series
17:28 FROGGS +1
17:28 TimToady there's that country code again
17:28 PerlJam heh
17:28 FROGGS hehe
17:29 masak "cohesive whole" is probably very related to "designed by a single mind". Fred Brooks talks about that.
17:30 PerlJam yep
17:30 TimToady +1 a capitalist memeplot to convince us that the US can only prosper through incremental growth
17:31 TimToady *is a
17:32 * TimToady should quit emitting random permutational humor (?) and go do something useful...
17:33 * TimToady usually goes depressive at the end of conference season, not manic...
17:34 masak well, I've never seen +1 inflation on IRC. maybe because in practice the uses of it take place in a contextual silo.
17:35 * TimToady thinks context works more like a stack than a silo, generally
17:36 * sirrobert agrees.
17:36 TimToady but if you keep your context in firefox tabs, all bets are off
17:36 masak don't I know it.
17:36 masak though I don't do that anymore. I'm a reformed taboholic.
17:38 TimToady -holic is a lovely productive suffix, unlike me.
17:41 sirrobert "Tabohol is a bitter drink"
17:43 FROGGS TimToady: I got much motivation from YAPC::EU, but being at work, hacking php sucks a bit...
17:44 FROGGS would like todo more stuff in perl5&6
17:46 FROGGS thats what I do when the kids are in bed
17:46 sirrobert Thankfully I get to p6 at $work
17:49 FROGGS ya, that would be better... but the tasks must be fun too
17:49 sirrobert Thankfully, they are =)
17:49 sirrobert (I get to make them up =)
17:49 FROGGS what are you doing?
17:49 sirrobert at the moment I'm writing a grammar-based api dispatcher
17:50 sirrobert "controller"
17:53 tokuhiro_ joined #perl6
17:54 sirrobert how do I call a method from a given object if I have the Method() object?
17:57 masak sirrobert: if your method is in $m, you can just do $m($obj, $arg1, $arg2, ...)
17:57 sirrobert wow, that's cool
17:57 pyrimidine joined #perl6
17:57 masak sirrobert: which would correspond to $obj.m($arg1, $arg2, ...)
17:58 moritz \o
17:58 masak moritz! \o/
17:58 sirrobert I did a much more convoluted:  ::("MyClass")."{$m.name}"(|@args);
17:58 pyrimidine joined #perl6
17:58 sirrobert (more or less)
17:58 sirrobert thanks
17:58 sirrobert hi moritz =)
18:00 masak hm, time to have another look at macros-d2.
18:01 p6eval joined #perl6
18:01 moritz p: say 42
18:01 moritz n: say 42
18:02 p6eval pugs:  ( no output )
18:02 p6eval niecza v21-1-ga8aa70b:  ( no output )
18:02 moritz the weird thing is, I can spawn the process on the command line
18:02 moritz at least the niecza process
18:03 moritz and rakudo works again too
18:03 moritz on the command line
18:03 sirrobert weird
18:03 FROGGS sounds like a permission problem
18:03 moritz I did it as the same user as the bot
18:03 FROGGS maybe the environment?
18:06 FROGGS I had problems lately running a job via cron as a user, then I've seen that the environment vars were not the same
18:07 moritz yes, but I launch the bot from the same shell where I try the commands
18:07 moritz so it inherits all the variables
18:07 FROGGS hmmm
18:08 moritz on windows I'd reboot
18:09 FROGGS on unix I would check the logs
18:09 FROGGS if there are any
18:10 sirrobert reboot anyway =)  couldn't *hurt*, right?
18:11 moritz sirrobert: it could not come up again
18:11 sirrobert heh
18:11 * moritz reboot anyway
18:12 moritz PSA: feather3 is going down for reboot NOW
18:12 * moritz waves
18:13 moritz ... and it's back
18:14 sirrobert =)
18:14 TimToady The delek is dead!  Long live the dalek!
18:14 moritz oh wait, dalek was also on feather3?
18:14 moritz oops
18:15 p6eval joined #perl6
18:15 moritz r: say 42
18:16 p6eval rakudo cc1858: OUTPUT«42␤»
18:16 moritz and it's also a mystery to me why the first command being execute is so slow
18:16 GlitchMr Why dalek in on feather3?
18:17 GlitchMr It doesn't evaluate code
18:17 TimToady std: race my @cars;
18:17 p6eval std b87ea13: OUTPUT«ok 00:00 42m␤»
18:17 sirrobert r: say 'foo'
18:17 p6eval rakudo cc1858: OUTPUT«foo␤»
18:17 moritz GlitchMr: hysterical raisins, I assume
18:17 sirrobert moritz: use 'Win32::Env'?
18:18 TimToady std: /[[-]/
18:18 p6eval std b87ea13: OUTPUT«[31m===[0mSORRY![31m===[0m�Invalid regex metacharacter (must be quoted to match literally) at /tmp/oYC2maRagQ line 1:�------> [32m/[[-[33m�[31m]/[0m�Unrecognized regex metacharacter / (must be quoted to match literally) at /tmp/oYC2maRagQ line 1:�------> [32…
18:18 TimToady std: use v5; /[[-]/
18:18 p6eval std b87ea13: OUTPUT«ok 00:00 53m␤»
18:19 masak \o/
18:21 TimToady std: use v5; /[a-b-c]/
18:21 p6eval std b87ea13: OUTPUT«ok 00:01 53m␤»
18:22 TimToady eval /[a-b-c]/
18:22 buubot_backup TimToady: No output.
18:22 TimToady I guess
18:22 TimToady std: /<[ a .. b .. c ]>/
18:22 p6eval std b87ea13: OUTPUT«[31m===[0mSORRY![31m===[0m�Range missing start character on the left at /tmp/DidfRPynTS line 1:�------> [32m/<[ a .. b ..[33m�[31m c ]>/[0m�Check failed�FAILED 00:00 43m�»
18:23 moritz sirrobert: sorry, I don't understand
18:23 moritz sirrobert: do you mean to imply that because a reboot fixed it, it's like a win32 environment?
18:31 Circlepuller joined #perl6
18:33 kst joined #perl6
18:34 Circlepuller__ joined #perl6
18:34 * masak grapples with a "level confusion" inside his macros fix that he apparently fell victim to yesterday
18:34 masak sometimes things are QAST nodes, and sometimes they're already compiled blocks.
18:37 masak most of what the compiler does is to produce the former. that's the compiler's job, after all.
18:37 masak but macros and quasis... straddle these two worlds.
18:40 fgomez joined #perl6
18:40 sirrobert moritz: was just referring to your prior comment:  14:08 < moritz> on windows I'd reboot
18:40 sirrobert the reboot seemed to have done something =)
18:44 sirrobert r: class A { $?PACKAGE.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; class B is A { }; B.new.foo;
18:44 p6eval rakudo cc1858: OUTPUT«No such method 'foo' for invocant of type 'B'␤  in block  at /tmp/deho0PTLCi:1␤␤»
18:44 sirrobert is that a bug?
18:44 sirrobert it works if the fallback is declard in B:
18:44 sirrobert r: class A { }; class B is A { $?PACKAGE.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; B.new.foo;
18:44 p6eval rakudo cc1858: OUTPUT«fallback␤»
18:45 masak moritz: also, I've realized I can't (in the long run) put the dynamic unquote-fixing closure at the macro call sites, like I did. simple reason: macros and quasis/unquotes are orthogonal constructs.
18:45 [Coke] what is "add_fallback" ?
18:46 sirrobert a meta-object method that let's you add a "fallback" method
18:46 moritz it's an undocumented feature
18:46 sirrobert a method executed if no suitable method is found in the class
18:46 sirrobert is the issue that I'm calling it from $?PACKAGE?
18:47 masak [Coke]: it's a method on ClassHOW.
18:48 sirrobert trying to hide some ugly code in a base class (or role would be fine)
18:48 sorear good * #perl6
18:48 sirrobert \o
18:49 masak another good thing about private attributes being strictly scoped to the class block: you can reason about them easily.
18:49 masak I guess that's what people mean by "proper encapsulation"...
18:49 sirrobert heh
18:51 colomon o/
18:51 sirrobert doing it with a role times out
18:52 sirrobert r: role A { $?PACKAGE.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; class B does A { }; B.new.foo;
18:52 p6eval rakudo cc1858: OUTPUT«(timeout)»
18:53 masak $?PACKAGE ? in a role?
18:53 masak feels wrong.
18:53 sirrobert just trying stuff =)
18:53 masak $?CLASS I could imagine working...
18:54 masak that's the one's generic in all roles.
18:54 sirrobert huh, didn't know that
18:54 masak r: role A { say $?CLASS }; class C does A {}; class D does A {}
18:54 p6eval rakudo cc1858: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Method 'gist' not found for invocant of class 'C'␤»
18:54 masak hm!
18:54 masak p6eval: it's good to have you back.
18:54 masak moritz++
18:55 sirrobert moritz++ indeed
18:55 masak r: role A { method foo { say $?CLASS } }; class C does A {}; class D does A {}; say C.new.foo; say D.new.foo
18:55 p6eval rakudo cc1858: OUTPUT«C()␤True␤D()␤True␤»
18:55 masak heh.
18:56 masak r: role A { method foo { $?CLASS.^name } }; class C does A {}; class D does A {}; say C.new.foo; say D.new.foo
18:56 p6eval rakudo cc1858: OUTPUT«C␤D␤»
18:56 masak there we go. generic.
18:56 sirrobert hmmm
18:57 sirrobert r: role A { $?CLASS.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; class B does A { }; B.new.foo;
18:57 p6eval rakudo cc1858: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Method 'dispatch:<.^>' not found for invocant of class 'B'␤»
18:57 popl joined #perl6
18:58 Circlepuller joined #perl6
18:59 moritz code directly inside a role body is... problematic
18:59 sirrobert makes sense ...
18:59 sirrobert I had tried doing things like defining: method _fallback () {...}
18:59 sirrobert but didn't find anything =)
19:00 moritz use a class (and inheritance) for the fallback
19:00 sirrobert or I guess method FALLBACK would be a good one
19:00 sorear don't you need to use $?ROLE ?
19:00 sirrobert class and inheritance doesn't work
19:00 sirrobert (that was the first example)
19:00 sirrobert r: class A { $?PACKAGE.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; class B is A { }; B.new.foo;
19:00 p6eval rakudo cc1858: OUTPUT«No such method 'foo' for invocant of type 'B'␤  in block  at /tmp/ovQ6RcXNza:1␤␤»
19:00 sirrobert unless you mean some different syntax?
19:01 moritz ok, you are right
19:01 sirrobert bummer =)
19:01 moritz r: role A { BEGIN A.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); }; class B does A { }; B.new.foo
19:01 p6eval rakudo cc1858: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤␤»
19:04 sirrobert here's a work-around (but it exposes the ugly bits a li'l)
19:04 sirrobert r: class A { method __add_fallback () { self.^add_fallback( sub ($a, $b) { True }, sub ($a, $b) { method () {say 'fallback'} }); } }; class B is A { }; B.__add_fallback(); B.new.foo;
19:04 p6eval rakudo cc1858: OUTPUT«fallback␤»
19:06 erkan joined #perl6
19:06 erkan joined #perl6
19:15 Edument joined #perl6
19:25 benabik joined #perl6
19:30 masak I would like to talk to someone about $*W.create_simple_code object.
19:30 masak I guess $someone is any(pmichaud, jnthn).
19:35 lotreck joined #perl6
19:36 lotreck hello. can anyone provide an update on perl6 ? Is it in prod status ? I've been reading about perl6 for a few years now. What's up ?
19:37 sirrobert I'm using it for my stuff and have no major problems =)
19:37 sirrobert (note:  I'm not a p6 dev; I'm a user)
19:38 lotreck is perl6 shipping w/ any linux distros ?
19:38 diakopter lotreck: many people have very different definitions of 'prod', so you'd have to give us your before we can answer
19:38 sirrobert lotreck:  I dunno
19:38 masak I'm mostly a user. I'm using Perl 6 in what I consider to be production, and I'm happy with it.
19:38 moritz lotreck: yes, it's included in several distributions
19:38 moritz lotreck: and for others there are third-party packages
19:40 masak lotreck: the future is mostly here, but unevenly distributed.
19:40 moritz the present is also here, and also unevenly distributed :-)
19:41 lotreck Thanks for the update. I've googled that rakudo.org is one implementation of perl6.
19:41 moritz it is
19:42 diakopter it's the one included in the distributions, but last I checked they were old.. moritz?
19:43 sirrobert there's always a lag behind distribution versions of stuff and up-to-date versions
19:43 diakopter I thought they were *very* old
19:43 sirrobert dunno =)
19:44 diakopter ok, looks like debian has it at 2012-04 and 2012-01
19:45 diakopter that's not terribly old
19:45 sirrobert old-ish, but not *very* old
19:46 tadzik I just saw that ideone has 2010.08
19:46 diakopter ubuntu has 2011-07
19:46 tadzik and there it says to take 80 MB for say $*PERL.perl
19:46 tadzik I checked the recent rakudo OOC, and it needs about 150 on my system
19:48 diakopter opensuse has 2011-06
19:49 sirrobert opensuse has 2013-04 # oneupsdistroship
19:49 moritz diakopter: iirc gentoo and/or arch linux are only behind a week usually
19:49 sirrobert moritz: cool
19:49 diakopter wow that's fast
19:50 lotreck my ubuntu 12.04 have perl 5.14.2
19:51 diakopter that's Perl 5; Perl 6 is a different language
19:51 tadzik contrary to popular belief, it's not the next version :)
19:53 leont joined #perl6
19:54 moritz does anybody know of any data about where open source programmers come from, broken down by country?
19:54 tadzik I wonder if GSoC stats are a good approximation
19:55 [Coke] moritz: just curious?
19:55 lotreck so to get perl6 onto ubuntu it's looks like one has to do a 'apt-get install rakudo'
19:55 moritz [Coke]: no, I'm being asked to answer some questions for the German parliament
19:55 [Coke] O_o
19:56 moritz tadzik: at least they are a data point, not just guesswork
19:56 diakopter http://www.econstor.eu/dspace/bits​tream/10419/32590/1/621705071.pdf
19:56 diakopter has a country breakdown
19:56 moritz tadzik: do you have some numbers about it? I've only seen the map, and don't want to count
19:56 moritz diakopter++
19:56 diakopter p10
19:57 tadzik moritz: I'll look for them
19:57 [Coke] lotreck: Depending on what sort of work you're doing, you might be better off installing your own more recent copy of rakudo, but that should get you started.
19:57 tadzik I remember seeing a pie chart
19:57 sorear comic sans in an acadeic paper?  never seen it before
19:57 sorear this is also imperfect because it uses sf.net data
19:58 moritz sorear: any such breakdown will be imperfect, and they are all better than no data at all
19:59 tadzik moritz: http://google-opensource.blogspot.com/2012/05/​google-summer-of-code-2012-by-numbers_10.html
19:59 * moritz wonders if  ohloh.net or github.com offer such stats
20:00 moritz tadzik++
20:00 sirrobert lotreck: I use ubuntu and get it from rakudo.org
20:00 tadzik what version does ubuntu have>?
20:01 prammer joined #perl6
20:01 diakopter 2011-07
20:01 moritz that's pre-nom
20:02 diakopter http://www.takhteyev.org/pap​ers/Takhteyev-Hilts-2010.pdf
20:02 sorear tadzik's list is very strange
20:02 sorear Sri Lanka above France?
20:03 diakopter moritz: that one seems to have a good survey of the field
20:03 moritz diakopter++
20:03 sirrobert tadzik: no idea
20:04 [Coke] seen jnthn?
20:04 aloha jnthn was last seen in #perl6 2 days ago saying "tomorrow evening or so".
20:04 sirrobert tadzik: looks like 12-04 (the distro's latest release date)
20:05 diakopter moritz: write some queries. :) http://www.blackducksoftware.com/knowledgebase
20:05 diakopter oh wait, it's not public; oops
20:08 moritz thanks diakopter and tadzik
20:09 moritz (and if anybody else knows about such data, or data about closed source programmers, please let me know)
20:10 japhb Was there ever a fix for the "Method 'seek' not implemented for type Socket in method send" bug that Net::IRC::Bot triggers?
20:11 diakopter this has a ton of info, but no stats by country that I could find: http://mitpress.mit.edu/boo​ks/chapters/0262562278.pdf
20:12 sirrobert http://programmers.stackexchange.com/questions/​19720/where-can-i-find-statistics-on-worldwide-​developers-and-software-companies/20300#20300
20:13 sirrobert has some good resources
20:14 * sorear is also curious about why the german parliament is going to moritz
20:15 benabik Why wouldn't they?
20:16 sorear There are an awful lot of other Germans
20:16 diakopter not all of them are awful!
20:17 sorear When one person is chosen from a population of 1e8 or so, I tend to assume there's a reason
20:17 Moukeddar joined #perl6
20:17 sorear o/ Moukeddar
20:18 Moukeddar \o/ guys , how are you all doing
20:18 masak Moukeddar! \o/
20:19 Moukeddar masak, My man
20:19 tadzik hi Moukeddar
20:22 Moukeddar hi tadzik
20:22 Moukeddar how's everybody ?
20:23 sorear I can't speak for everybody but I'm fine.
20:23 Moukeddar the most friendly IRC room ever :)
20:23 Circlepuller_ joined #perl6
20:24 japhb Moukeddar, we try.  :-)
20:24 sorear current topic is geographic distribution of open-source involved people
20:24 tadzik pretty good on my side :)
20:24 Moukeddar you're doing a damn fine job :)
20:24 japhb phenny, ask GlitchMr Was there ever a fix for the "Method 'seek' not implemented for type Socket in method send" bug that Net::IRC::Bot triggers?  Or did you find a workaround for it?
20:24 phenny japhb: I'll pass that on when GlitchMr is around.
20:25 sorear you were from Morocco, do I remember correctly?  a country which doesn't even show up on the lists we found :(
20:25 tadzik Moukeddar is working on fixing that, I think :)
20:25 Moukeddar yeah sorear , i'm from Morocco
20:25 Moukeddar what list ?
20:26 tadzik list of people involved in open source software, by country
20:26 tadzik moritz was looking for one (or two)
20:26 Moukeddar i know some guys involved in open source, they just aren't that much
20:28 Moukeddar i've found this DVCS
20:28 Moukeddar http://www.veracity-scm.com/
20:30 diakopter moritz: http://flossproject.org/rep​ort/Final4.htm#_Toc13908299
20:30 diakopter (10 years old)
20:31 Chillance joined #perl6
20:31 sirrobert wow, phenny is pretty cool
20:31 benabik Heh.  Git's Immutability Doctrine is liberal and mercurial's conservative?  I find that somewhat amusing...
20:33 ingin joined #perl6
20:33 ingin good morning perl6.
20:33 masak git takes immutability quite seriously.
20:33 masak good morning, ingin.
20:34 benabik People often confuse git-rebase with mutable history...  It's more creating an alternate history.
20:34 masak aye.
20:34 masak commits are immutable.
20:35 ingin \o/
20:35 benabik Mercurial implemented rebase and commit --amend by rewriting my history files.  Wasn't amused.
20:35 ingin masak: a small question
20:36 benabik file locks as a feature?  Oooookay...  I'm going to stop ranting about that now, other than to say I'm not impressed by veracity.
20:36 ingin my $f = open 'save', :w; $f.say('yes')'save'.IO.s==>the output is 0. why?
20:36 ingin my $f = open 'save', :w; $f.say('yes')';save'.IO.s==>the output is 0. why?
20:37 masak ingin: because you havn't flushed the contents yet?
20:37 colomon ingin: probably need to close the file
20:37 masak ingin: try closing the file.
20:37 Circlepuller_ joined #perl6
20:37 Moukeddar the author; eric sink was giving away a book called : Source control by example
20:37 ingin masak:I'll try
20:38 ingin masak: you are right!
20:38 masak \o/
20:39 ingin masak; /0/ \0\....thanks!
20:40 sorear this ingin fellow is sounding a lot like ingy
20:40 ingin not same one?
20:40 ingin bye.........perl6!
20:40 masak I don't see why ingy would take the nick ingin :)
20:41 benabik Huh.  Veracity supports versioned distributed databases.  That's far more interesting than the source control half.
20:41 masak ...or use freenode's webchat...
20:41 masak 'night, #perl6
20:41 FROGGS gnight
20:41 sirrobert o/
20:53 * ingy is not ingin
21:03 Circlepuller joined #perl6
21:09 jnthn evening o/
21:09 phenny jnthn: 05:57Z <tadzik> tell jnthn serialization fail: https://gist.github.com/3651868
21:11 jnthn tadzik: known
21:11 colomon \o
21:11 jnthn tadzik: Also, filed in RT already
21:12 * colomon is relieved to see jnthn++ back on the channel.
21:13 diakopter jnthn: here's a funny one:
21:13 diakopter r: 1 if 1 if 1 { say 4 }
21:13 p6eval rakudo cc1858: OUTPUT«4␤»
21:14 diakopter I didn't see masakbot submit it yet
21:14 jnthn colomon: Sadly, I'm (a) still sick and (b) have a schedule for the week to come that's likely to deprive me of the rest I need to get really better. :/
21:14 colomon doh!  take care of yourself!
21:16 jnthn r: say 1 if 1 if 1 { say 4 }
21:16 p6eval rakudo cc1858: OUTPUT«1␤4␤»
21:17 japhb jnthn, sorry to hear about nasty sick.  Hope you feel better soon.
21:18 jnthn diakopter: hah, I get that something eats the spaces after it, then eat_terminator has a || <?terminator> branch.
21:18 japhb jnthn, Unfortunately while phenny was out, I used lambdabot to message you, and now lambdabot is gone.  :-(
21:18 jnthn diakopter: And "if" is a terminator.
21:18 diakopter jnthn: you and I discussed that rule and this possibility a while back
21:18 diakopter well, something like it
21:18 jnthn maybe :)
21:19 jnthn Not sure what the "right fix" is off hand besides "see what STD's doing different"
21:19 jnthn hah
21:19 jnthn rule modifier_expr { <EXPR> }
21:19 jnthn It's right there.
21:20 jnthn japhb: Aww.
21:20 japhb jnthn, the message I sent via lambdabot: Is there a way to use multi *subs* from a Role?  Or does a Role even have a way of feeding multi subs to a composer?
21:21 japhb (The context BTW, is that I'm trying to factor a pile of common multi subs out of the Pod::To::* renderers into something common that they consume.)
21:21 jnthn subs are lexically scoped
21:22 jnthn You can put them in the role, but they'll only be visible lexically within the role.
21:22 sivoais joined #perl6
21:22 japhb If it was a class, I'd try exporting them.  But you can't do that with a role, can you?
21:23 jnthn I suspect things get awkward there
21:23 jnthn We have a problem with roles as packages
21:23 jnthn r: class Foo { our bar { say 42 } }; Foo::bar()
21:23 p6eval rakudo cc1858: OUTPUT«===SORRY!===␤Malformed our␤at /tmp/jdVY38FsDu:1␤»
21:23 jnthn r: class Foo { our sub bar { say 42 } }; Foo::bar()
21:23 p6eval rakudo cc1858: OUTPUT«42␤»
21:23 jnthn r: role Foo { our sub bar { say 42 } }; Foo::bar()
21:23 p6eval rakudo cc1858: OUTPUT«Could not find symbol '&bar'␤  in method <anon> at src/gen/CORE.setting:9815␤  in  at src/gen/Metamodel.pm:2317␤  in any find_method_fallback at src/gen/Metamodel.pm:2305␤  in any find_method at src/gen/Metamodel.pm:859␤  in  at src/gen/BOOTSTRAP.pm:826␤  in any  a…
21:24 jnthn There's multiple reasons that doesn't work.
21:25 jnthn (what if it mentions a type arg somewhere in it for one, but also because the Foo we install is not the individual role, but a "role proto" that can dispatch at composition time tot he correct role variant if there are many of the same name)
21:25 jnthn There's an RT for the above, but whenever I think about it, I'm inclined to simply disallow our-scoped things in roles with a good error and mark it wontfix. :)
21:26 japhb OK, so then what is the proper unit of decomposition here?
21:26 leont left #perl6
21:26 jnthn What are the Pod::To:: renderers? Classes?
21:26 jnthn Is there any reason they can't compose in a common role, if so?
21:27 japhb Right now, yes, "classes".  But they just have one method that makes a single call into a world of interacting multi subs that handle polymorphic rendering across a pile of different node types at different levels of the Pod tree.
21:27 jnthn (and you have them as methods)
21:28 japhb Yeah, I was wondering if the solution was to just s:g/multi sub/multi method/
21:28 jnthn And you don't want to promote them to multi methods for a reason?
21:28 jnthn That feels like the "obvious thing" to do at first blush
21:29 jnthn Import is lexical though so there's no reason you can't inside the class body import a bunch of multi subs from some other module
21:29 jnthn And they'll be included in the candiate list with any locally delcared multis.
21:29 jnthn *declared
21:30 sorear jnthn!
21:30 jnthn o/ sorear
21:30 japhb Ah, so it would be a 'module' that I would pool multi subs into ... Would they all need to be marked 'is export'?
21:30 * japhb is guessing yes
21:31 japhb As for why not to use multi methods, primarily because A) subs are what they're using now, and B) I wanted to know if multi subs were amenable to refactoring in that way.  Otherwise they become much less useful.
21:32 sorear jnthn: http://irclog.perlgeek.de/​perl6/2012-09-05#i_5962851
21:32 jnthn japhb: Yes, mark them "is export"
21:36 japhb OK, just so my current understanding is 'module Pod::To; multi sub render-node(Foo --> Str) is export { };' and then 'class Pod::To::Bar; use Pod::To; multi sub render-nod(Bar --> Str) { # part of same multi as the one from Pod::To }' ... correct?
21:36 jnthn presuming the second one was meant to be "node" also :)
21:37 japhb heh
21:37 TimToady you should render a nod
21:38 japhb ((:-))
21:38 TimToady not sure if that's a nod or a snow monkey...
21:39 japhb If this chat window could handle Unicode input properly, I'd use that.  :-)
21:40 TimToady ☊ ~ ☋
21:40 TimToady oh wait, that's node, not nod
21:43 TimToady actually, looks more like frog doing a barrel roll
21:46 japhb .oO( What would a Camelia barrel roll look like? )
21:49 TimToady »ö« ~ »o̤«
21:49 sorear »o̤«
21:50 * TimToady wins by an antenna
21:51 TimToady errands &
22:09 lizmat joined #perl6
22:12 lotreck joined #perl6
22:26 revdiablo joined #perl6
22:34 skids joined #perl6
22:55 lizmat joined #perl6
23:06 lizmat joined #perl6
23:34 japhb S06:77-81 specifies that a proto declaration for a given short name changes the default from only to multi for that short name.  This does not appear to work in current Rakudo.  NYI or S06 fossil?
23:36 sorear NYI
23:36 japhb sorear, OK, thank you.
23:45 whiteknight joined #perl6
23:54 japhb If class/module A exports a set of multi *sub* candidates, and these are imported into some other compilation unit, is there a way to replace (or just not import) one of the multi sub candidates from A? (Yes, I know if they were multi *methods* the answer is trivial.)
23:56 sorear as far as importation is concerned, multi subs and multi methods should be treated identically
23:58 japhb sorear, right, but if you want to replace the behavior of a given multi variant, it's trivial with the method (just write a new multi method with the same signature and allow normal method overriding to work), but with subs of course you get ambiguous dispatch by default.
23:58 * japhb shouldn't say 'of course' when dealing with something as complex as multidispatch.  ;-)

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

Perl 6 | Reference Documentation | Rakudo