Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-05-13

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:00 bluescreen__ joined #perl6
00:02 keeth left #perl6
00:04 benabik joined #perl6
00:20 Moukeddar joined #perl6
00:23 sorear good * #perl6
00:31 athomason left #perl6
00:32 athomason joined #perl6
01:14 beppu left #perl6
01:15 mtk left #perl6
01:19 alester left #perl6
01:19 sorear TimToady++ # making STD self-aware
01:24 mtk joined #perl6
01:33 sorear Why is $` considered a problem, but not $/.orig.substr(0, $/.from) ?
01:35 TimToady $` doesn't know what the last pattern was, so pessimizes any pattern match in the whole program
01:58 bluescreen100 left #perl6
01:59 bluescreen__ left #perl6
01:59 bluescreen10 left #perl6
02:02 whiteknight left #perl6
02:06 cotto joined #perl6
02:08 beppu joined #perl6
02:16 cotto left #perl6
02:17 woosley joined #perl6
02:31 araujo joined #perl6
02:35 cotto joined #perl6
02:44 cooper joined #perl6
03:03 Moukeddar left #perl6
03:04 agentzh joined #perl6
03:13 pamera joined #perl6
03:22 Khisanth still? O_o
03:26 Su-Shee left #perl6
03:28 Su-Shee joined #perl6
03:52 wooden left #perl6
03:54 jaldhar left #perl6
03:55 geekosaur left #perl6
03:55 jaldhar joined #perl6
04:11 geekosaur joined #perl6
04:12 kaare_ joined #perl6
04:12 formalin14 joined #perl6
04:21 kaare_ left #perl6
04:22 nymacro joined #perl6
04:24 envi joined #perl6
04:41 satyavvd joined #perl6
04:53 sorear Khisanth: ?
05:05 sftp joined #perl6
05:21 birdwindupbird joined #perl6
05:28 mkramer left #perl6
05:29 mkramer joined #perl6
05:31 sorear std: q{foo}
05:31 p6eval std b9c20c5: OUTPUT«ok 00:01 112m␤»
05:32 jaldhar left #perl6
05:36 dalek std: 69bef71 | sorear++ | / (2 files):
05:36 dalek std: Remove use of $*ORIG in STD.pm6
05:36 dalek std: review: https://github.com/perl6/std/commit/69bef71dc1
05:36 cxreg had minidbi broken then?
05:37 birdwindupbird left #perl6
05:38 jaldhar joined #perl6
05:41 sorear cxreg: ???
05:41 cxreg i just saw it was removed from last month's r*
05:43 jaldhar left #perl6
05:44 Tedd1 joined #perl6
05:47 birdwindupbird joined #perl6
05:51 wtw joined #perl6
06:02 wamba joined #perl6
06:03 sftp left #perl6
06:07 Helios left #perl6
06:12 Helios joined #perl6
06:19 sorear std: "aab" ~~ token { a* ab }
06:19 p6eval std b9c20c5: OUTPUT«Potential difficulties:␤  'token' declaration outside of grammar at /tmp/RPh5mJ8W0O line 1:␤------> [32m"aab" ~~ token [33m⏏[31m{ a* ab }[0m␤ok 00:01 115m␤»
06:20 sorear std: $¢
06:20 p6eval std b9c20c5: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $¢ is not predeclared at /tmp/QURYEuuoB9 line 1:␤------> [32m<BOL>[33m⏏[31m$¢[0m␤Check failed␤FAILED 00:01 112m␤»
06:20 sorear TimToady: updating STD broke niecza's tests due to the latter
06:22 JimmyZ joined #perl6
06:23 JimmyZ tell jnthn http://conference.perlchina.org/bjpw2011/
06:23 sorear phenny:
06:23 JimmyZ phenny: tell jnthn http://conference.perlchina.org/bjpw2011/
06:23 sorear perhaps msg
06:23 JimmyZ phenny: msg jnthn http://conference.perlchina.org/bjpw2011/
06:23 JimmyZ :(
06:24 sorear phenny: tell JimmyZ test
06:24 phenny sorear: I'll pass that on when JimmyZ is around.
06:24 sorear I guess it only works for me
06:24 JimmyZ phenny: tell jnthn http://conference.perlchina.org/bjpw2011/
06:24 phenny JimmyZ: I'll pass that on when jnthn is around.
06:24 phenny JimmyZ: 06:24Z <sorear> tell JimmyZ test
06:24 JimmyZ space bug
06:24 sorear oh, hah
06:25 JimmyZ bye
06:25 JimmyZ left #perl6
06:25 perigrin phenny is very picky about the prefix
06:26 perigrin he had a space in his first attempt
06:31 thou joined #perl6
06:33 finanalyst joined #perl6
06:33 satyavvd left #perl6
06:38 dalek niecza: 1ec7256 | sorear++ | / (2 files):
06:38 dalek niecza: Update to latest STD
06:38 dalek niecza:
06:38 dalek niecza: This adds self-awareness and better errors for misplaced has-statements,
06:38 dalek niecza: also some improvements to variable handling.
06:38 dalek niecza: review: https://github.com/sorear/niecza/commit/1ec72568c4
06:38 sorear I've fixed both STD bugs in Niecza's STD
06:38 sorear now I'll backport them
06:39 Helios left #perl6
06:39 TimToady すごい。
06:42 Helios joined #perl6
06:43 sorear TimToady: have you decided on a spec way to construct Match objects?
06:43 sorear nibbler and EXPR are both heavily modified in niecza's STD to not use _REDUCE and friends
06:51 * TimToady has no opinion
06:54 cotto left #perl6
06:58 dalek std: 905614c | sorear++ | STD.pm6:
06:58 dalek std: Fix nameless methods being considered has for warnings, $¢ predeclaration error
06:58 dalek std: review: https://github.com/perl6/std/commit/905614c0be
06:59 cooper left #perl6
07:00 Helios left #perl6
07:01 Helios joined #perl6
07:06 bessarabov joined #perl6
07:08 sorear TimToady: how do you feel about $cursor.new_match(:action("what to call"), :captures([$pair1, $pair2, $pair3]), :from(24), :to(42)) ?
07:16 mj41 joined #perl6
07:17 fhelmberger joined #perl6
07:18 fhelmberger_ joined #perl6
07:18 fhelmberger left #perl6
07:24 masak joined #perl6
07:24 masak perl 6 hackathon in .ru!
07:24 p6eval left #perl6
07:26 nebuchadnezzar hello guys
07:26 sorear hi.
07:26 sorear o/ masak
07:26 p6eval joined #perl6
07:32 masak sorear: \o
07:32 masak and hi, nebu! :)
07:33 tadzik privet!
07:33 tadzik ...right? :)
07:34 nebuchadnezzar hi masak
07:35 masak phenny: "Превед"?
07:35 phenny masak: "Hello" (ru to en, translate.google.com)
07:35 masak :)
07:38 masak finanalyst: oh hai :D
07:39 jnthn Moscow! \o/
07:39 phenny jnthn: 06:24Z <JimmyZ> tell jnthn http://conference.perlchina.org/bjpw2011/
07:39 shemale_explorat joined #perl6
07:40 shemale_explorat hi, you're on screen at the hackathon in Moscow! :)
07:40 formalin14 left #perl6
07:40 masak sadly, "shemale_exploration" was too long a nick... :P
07:40 jnthn ...wtf. :)
07:41 finanalyst masak: hi there welcome to moscow
07:41 phenny finanalyst: 24 Dec 22:59Z <moritz_> tell finanalyst please try rm -rf parrot_install to get rid of the incomptaible core_ops versions
07:41 shemale_explorat is now known as hackathon_screen
07:41 sorear do I need to kick anyone now?
07:42 dur-randir joined #perl6
07:42 ilyuha joined #perl6
07:42 finanalyst jnthn: meta object link?
07:42 masak sorear: sorry; just a very inside joke... ;)
07:43 ash joined #perl6
07:43 bessarabov Hello from Perl 6 hackathon =)
07:43 masak dur-randir, ilyuha, ash, bessarabov: hi! :)
07:43 ilyuha hi )
07:44 ershov joined #perl6
07:44 jnthn finanalyst: finanalyst See http://jnthn.net/papers/2011-nlpw-classes.pdf
07:44 jnthn finanalyst: also http://jnthn.net/papers/2010-osdc.fr-rakudo.pdf
07:44 finanalyst rakudo: my %h = < a b c > Z 1 .. 3; .perl.say for %h
07:44 p6eval rakudo 678ad3: OUTPUT«"a" => 1␤"b" => 2␤"c" => 3␤»
07:44 AlexKotov joined #perl6
07:44 jnthn finanalyst: Then look at https://github.com/perl6/nqp/blob/932f6dae6a20e5dc01219b3863e9774b2ab59b5e/src/how/NQPClassHOW.pm
07:44 AlexKotov Hello, World!
07:45 ershov Hi there! (@hackaton)
07:45 corax joined #perl6
07:45 jnthn Привет! ;)
07:45 ershov Заспамим на русском! :)
07:46 AlexKotov My "rakudo" is still compiling....
07:46 jnthn \o/
07:46 masak AlexKotov: how much RAM do you have?
07:46 mvm joined #perl6
07:46 mvm hi
07:46 ershov AlexKotov: I'm done but failed one UNICODE test
07:47 ershov already submitted a bugreport :)
07:47 * sorear is sadly not there
07:47 masak ershov++
07:47 AlexKotov 1GB RAM
07:47 masak mvm: hi!
07:47 jnthn AlexKotov: Oh, that should be plenty.
07:47 masak AlexKotov: should be alright, then.
07:47 masak AlexKotov: the gen-core part is the one that takes time.
07:47 jnthn AlexKotov: Is it compiling core.pm? That's the step that usually takes a while.
07:47 AlexKotov Intel Atom 1.60Hz
07:47 mishnik joined #perl6
07:47 nordicdyno joined #perl6
07:47 sorear AlexKotov: how long have you been waiting?
07:47 ilyuha mishnik, hi!
07:48 mishnik hi everybogy
07:48 AlexKotov Yes, core.pm right now
07:48 sorear It shouldn't take more than an hour on that hardware
07:48 masak :P
07:48 Helios left #perl6
07:49 mishnik ilyuha: Hi too;))
07:49 formalin14 joined #perl6
07:49 sorear hi all.
07:49 sorear welcome to #perl6.
07:49 finanalyst jnth: if i have parrot already, do i need the --gen-parrot for the make in nqp
07:49 Helios joined #perl6
07:50 ershov finanalyst: try without it first
07:50 jnthn finanalyst: Maybe - depends if your Parrot it up to date enough.
07:50 jnthn finanalyst: You may need to tell it where your Parrot is. --parrot-config=...
07:51 nordicdyno hi, hackathon's people. peace ✌ )
07:51 finanalyst jnthn: today's version of parrot
07:51 jnthn finanalyst: oh, should be just fine :)
07:51 ershov nordicdyno: V! :)
07:51 sorear How many folks are there?
07:52 finanalyst 17
07:52 sorear oof.
07:52 sorear nice.
07:52 masak yeah, nice turnout.
07:52 AlexKotov I think even more than 17 ))
07:52 masak sorear: and already one bug submitted :)
07:55 mishnik http://typewith.me/nLRD0C9uJQ
07:56 tadzik oh, so many new guys
07:56 ershov AlexKotov: there are many people virtually with us!
07:57 masak tadzik: a whole hackathon of new guys ;)
07:57 jnthn Anyone here want to work on an NCurses module? Come say hi to masak or I for some hints :)
07:58 AlexKotov masak: this commit ?
07:58 AlexKotov https://github.com/rakudo/rakudo/commit/678ad30975f217aa46b822f019b4f3a4bd840e16
07:58 tadzik I've started, but not much success
07:59 tadzik I think getch() wasn't doing anything
08:00 AlexKotov BTW, today is Friday, 13!
08:00 tadzik it's friday, frida... oh wait
08:00 masak AlexKotov: a great day for finding bugs! :P
08:01 tadzik so, what are people hacking on currently?
08:01 ash left #perl6
08:01 masak AlexKotov: yes; what about that commit?
08:02 AlexKotov masak: could you please describe briefly what 'gcd' is about ?
08:03 TiMBuS greatest common divisor?
08:03 dionys joined #perl6
08:04 AlexKotov Hi, Denis!
08:04 jnthn rakudo: say 18 gcd 6
08:04 p6eval rakudo 678ad3: OUTPUT«6␤»
08:04 jnthn rakudo: say 18 gcd 3
08:04 p6eval rakudo 678ad3: OUTPUT«3␤»
08:04 TiMBuS rakudo: say 18 gcd 12
08:04 p6eval rakudo 678ad3: OUTPUT«6␤»
08:04 AlexKotov gcd is perl6 operator :) fantastic!
08:04 jnthn AlexKotov: It's greatest common divisor, as TiMBuS said.
08:04 tadzik wait, there's more!
08:04 jnthn AlexKotov: Really cool is that means you can use it with reduction meta-operator
08:04 tadzik rakudo: say [gcd] 5, 3, 7, 9
08:04 p6eval rakudo 678ad3: OUTPUT«1␤»
08:05 TiMBuS ooh thats why its a metaop
08:05 tadzik bah, bad example
08:05 jnthn hehe :)
08:05 mishnik Unfortunately I go to work,exuse me, Deutsche Bank expects ;(( but i look irc from work
08:05 TiMBuS uh. infix op
08:05 jnthn We have lcm too (lowest common multiple)
08:05 TiMBuS hows that different to gcd 5, 3, 7, 9
08:05 TiMBuS ?
08:05 tadzik TiMBuS: gcd is two-argumental
08:06 mishnik per6 say 3
08:06 TiMBuS it is?
08:06 tadzik TiMBuS: well, masak changed it too slurpy but then pmichaud strongly opposed, with regard to performance
08:07 tadzik (is that gramatically correct?)
08:07 TiMBuS correct enough for me
08:08 * sorear out
08:08 nordicdyno left #perl6
08:08 nordicdyno joined #perl6
08:08 bessarabov Sorry for simple question, but what docs do you reccoment to read about perl6. I've compiled perl6 and reading http://perl6advent.wordpress.com/2010/12/03/day-3-file-operations/ but dir doesn't seem to work in the current version as described.
08:08 bessarabov actually if there something like perl6doc -f dir?
08:08 tadzik doesn't it?
08:08 tadzik no perl6doc yet
08:09 * tadzik whistles and looks otherplace
08:09 TiMBuS bessarabov, oh man i wish we had that
08:09 TiMBuS isn't the IO synopses really bad? or has it been cleaned up
08:09 tadzik > dir
08:09 tadzik bin .mc toprint .startupscript.sh .NERDTreeBookmarks .swp fortunes .xmodmap
08:09 tadzik > dir 'bin'
08:09 tadzik niecza youtube-dl wylacznik menudaemon winxed lesspipe.sh
08:09 tadzik works for me, both cases
08:10 tadzik IO synopses are quite different to the reality I think
08:10 TiMBuS did we still have =$ iterators back in 2010 or
08:10 bessarabov my bad
08:10 bessarabov i thougt that dir 't' lists files with 't' in them, not the directory content
08:10 ershov left #perl6
08:11 TiMBuS oh
08:11 ershov joined #perl6
08:11 bessarabov =)
08:11 tadzik you may want to look at File::Find
08:11 mishnik thanks to all see tomorrow
08:11 TiMBuS is perl6 going to have a glob
08:11 tadzik though even I'm not sure in which repo it lives now, and I'm sure you don't want to use neutro to install it
08:11 sorear niecza: say self
08:11 p6eval niecza v5-5-g1ec7256: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤'self' used where no object is available at /tmp/Kk5eOK67_v line 1 (EOF):␤------> [32msay self[33m⏏[31m<EOL>[0m␤␤Unhandled exception: Check failed␤␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 413 (CORE die @ 2)␤  at
08:11 p6eval ../home/p6eval/niecza/sr…
08:12 tadzik I feel like http://perl6advent.wordpress.com/2010/12/09/day-9-%E2%80%93-the-module-ecosystem/ needs to be updated
08:12 sorear niecza: say $!foo
08:12 p6eval niecza v5-5-g1ec7256: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Variable $!foo used where no 'self' is available at /tmp/p5dxxSzghT line 1:␤------> [32msay [33m⏏[31m$!foo[0m␤␤Unhandled exception: Check failed␤␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 413 (CORE die @ 2)␤  at
08:12 p6eval ../home/p6eval/niecza/src/…
08:12 AlexKotov OK, rakudo compilation is finished!
08:12 tadzik yay!
08:13 sorear masak: niecza is self-aware now (TimToady++, for both the code and the pun)
08:13 TiMBuS heh
08:13 AlexKotov Me and Denis will probably work on some Perl6 modules today (@hackaton)
08:13 tadzik great!
08:14 sorear rakudo: say $!x
08:14 p6eval rakudo 678ad3: OUTPUT«Null PMC access in get_attr_str()␤  in main program body at line 2:/tmp/1pzn9HXAJS␤»
08:14 sorear rakudo: $!x
08:14 p6eval rakudo 678ad3: OUTPUT«Null PMC access in get_attr_str()␤  in main program body at line 2:/tmp/Dt8lboI4wt␤»
08:15 sorear someone was asking earlier for the shortest code to trigger a NPMCA...
08:15 * sorear out for real
08:15 wamba left #perl6
08:17 mishnik left #perl6
08:19 dur-randir anyone wants to hack on low-level stuff (nqp/nci)?
08:21 masak sorear: that sounds interesting. I'll go look at the commit log.
08:22 masak oh, I think I see the pun. but I can't find the commit :)
08:24 jnthn dur-randir: yes! ;)
08:24 * moritz sense a hackathon coming up :-)
08:25 masak moritz: it's already underway :)
08:26 masak sorear: oh is it the '$ok ||= $first eq '¢';' line?
08:26 jnthn dur-randir: Did you grab http://github.com/jnthn/zavolaj/ ?
08:27 masak ah, no. it's probably the 'self.orig' commit.
08:30 AlexKotov I'm taking bugs in Perl6 LWP::Simple for today's hackaton. This task looks clear.
08:32 jnthn AlexKotov: nice
08:32 moritz AlexKotov: I might be available for merging your changes, I have commit access to the lwp-simple repo
08:32 moritz AlexKotov: just submit pull requests on github
08:34 masak rakudo: $()
08:34 p6eval rakudo 678ad3:  ( no output )
08:36 masak we should have a top-10 list of "shortest known programs that trigger NPA". and then it'll be an arms race between the Rakudo devs and clever blackhat golfers.
08:37 AlexKotov moritz: ok )) my plan: 0) install LWP::Simple 1) Run tests 2) write advanced tests 3*) fix binary files downloading 4*) fix infinite redirections 5) pull request on github (within next 5 hours)
08:38 nordicdy_ joined #perl6
08:38 nordicdyno left #perl6
08:39 mvm left #perl6
08:41 AlexKotov BTW, does anybody know how to install modules on compiled Perl6? https://github.com/tadzik/Pies/ has not clear description
08:41 ershov left #perl6
08:41 ershov joined #perl6
08:42 tadzik AlexKotov: what's unclear?
08:42 masak tadzik: there are no real instructions for installing Pies.
08:42 masak tadzik: the README just says "here's how you use it when it's installed".
08:42 tadzik hmm, right
08:42 tadzik my bad
08:42 tadzik AlexKotov: run ./bootstrap.sh if you're on something Unixy
08:43 tadzik and, patches welcome, to docs too :)
08:43 Helios left #perl6
08:44 Helios joined #perl6
08:46 ershov perl6: say "qwe"
08:46 p6eval pugs, rakudo 678ad3, niecza v5-5-g1ec7256: OUTPUT«qwe␤»
08:46 ershov perl6: say "юникод"
08:47 p6eval rakudo 678ad3, niecza v5-5-g1ec7256: OUTPUT«юникод␤»
08:47 p6eval ..pugs: OUTPUT«decodeUTF8': bad data: '\1102'␤decodeUTF8': bad data: '\1085'␤decodeUTF8': bad data: '\1080'␤decodeUTF8': bad data: '\1082'␤decodeUTF8': bad data: '\1086'␤decodeUTF8': bad data: '\1076'␤юникод␤»
08:47 ershov wow!
08:47 ershov it doesn't work here, too! :) http://rt.perl.org/rt3/Public/Bug/Display.html?id=90512
08:48 ershov perl6: say "ö"
08:48 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\246'␤ö␤»
08:48 p6eval ..rakudo 678ad3, niecza v5-5-g1ec7256: OUTPUT«ö␤»
08:49 ershov perl6: say "π≠ε"
08:49 p6eval rakudo 678ad3, niecza v5-5-g1ec7256: OUTPUT«π≠ε␤»
08:49 p6eval ..pugs: OUTPUT«decodeUTF8': bad data: '\960'␤decodeUTF8': bad data: '\8800'␤decodeUTF8': bad data: '\949'␤π≠ε␤»
08:49 phenny p6eval: 08:49Z <nyuszika7h> tell p6eval test
08:51 ilyuha where is the perl6 cpan?
08:51 phenny ilyuha: 08:48Z <nyuszika7h> tell ilyuha foo
08:51 ilyuha if there is any
08:51 tadzik not really, but see modules.perl6.org
08:52 ilyuha ok, thanks
08:54 bessarabov What is the name for the ??? operator?
08:55 masak bessarabov: not sure it has a name.
08:55 masak bessarabov: term:<...> is called yadda-yadda-yadda.
08:55 bessarabov masak, thx
08:55 masak bessarabov: but the term:<!!!> and term:<???> variants don't have individual names.
09:00 moritz bang bang bang and hu? hu? hu? :-)
09:00 baest I had problems building nqp from github.com/perl6/nqp, both against parrot 3.3 and parrot head. rakudo compiled without problems. Is that a known problem or just my setup that doesn't work?
09:01 mvm joined #perl6
09:01 masak moritz: "huh? huh? huh?" sounds like someone being provocative. :)
09:01 moritz or maybe ??? is the 'WTF?' operator :-)
09:01 moritz baest: what problems did you have?
09:01 masak moritz: maybe "ouch ouch ouch!" for the term:<!!!> one? :)
09:03 moritz masak: or just 'ouch term'
09:03 baest moritz: a failed assertion. I have the output here: http://pastebin.com/kpe7xVKA
09:03 mtk left #perl6
09:04 masak moritz: or that. but that steps away from the triplication of yaddayaddayadda.
09:04 moritz baest: sounds like some GC WTF
09:04 moritz baest: how new was your parrot HEAD?
09:05 wamba joined #perl6
09:05 baest moritz: from yesterday evening (central eu time). I tried 3.3 first and then against head
09:05 * tadzik bbl
09:06 baest aka 5e2f1613f5b77a6afe64d51d48f45c16693485c8
09:06 moritz bacek: take a look at http://pastebin.com/kpe7xVKA when you have some time (building nqp on recent parrot)
09:06 moritz baest: should be new enough
09:06 moritz baest: what platform is that?
09:06 baest moritz: osx
09:08 macroz1 joined #perl6
09:09 baest I can poste the whole build if that helps
09:11 ershov_ joined #perl6
09:11 ershov left #perl6
09:11 mtk joined #perl6
09:15 Mowah joined #perl6
09:16 JimmyZ joined #perl6
09:17 JimmyZ jnthn:  http://trac.parrot.org/parrot/wiki/ParrotDeprecationsFor3.6, hope that helps you
09:17 thou left #perl6
09:19 thou joined #perl6
09:25 jnthn JimmyZ: I know about it but it's no help really
09:26 JimmyZ :(
09:31 masak rakudo: say DateTime.now.WHAT; say DateTime.now.^methods.join(" ")
09:31 p6eval rakudo 678ad3: OUTPUT«DateTime()␤new check-time now clone clone-without-validating Instant posix offset truncated-to whole-second in-timezone utc local Date Str perl is-leap-year days-in-month daycount-from-ymd ymd-from-daycount get-daycount day-of-month day-of-week week week-year week-number
09:31 p6eval ..weekday-of…
09:31 ilyuha rakudo: $_='mOkjOkl'; tr/O/0/; .say;
09:31 p6eval rakudo 678ad3: OUTPUT«===SORRY!===␤Confused at line 22, near "tr/O/0/; ."␤»
09:32 masak std: $_='mOkjOkl'; tr/O/0/; .say;
09:32 p6eval std 905614c: OUTPUT«ok 00:01 115m␤»
09:32 masak right. so tr/// isn't in the Rakudo grammar yet.
09:32 bessarabov Do we have some hash tag for moscow yapc event?
09:33 mvm_ joined #perl6
09:35 mvm left #perl6
09:38 masak rakudo: my $i; sub foo { say $i if ++$i %% 50; eval "foo" }; foo # jnthn++ for suggesting this
09:38 nordicdy_ left #perl6
09:39 p6eval rakudo 678ad3: OUTPUT«50␤100␤150␤»
09:39 nordicdyno joined #perl6
09:39 masak locally, it goes up to 194 and then dies without a peep.
09:39 * masak submits rakudobug
09:39 jnthn heh
09:39 mathw oh that's just evil
09:40 masak no, it's just evAl :P
09:40 mathw I hope nobody's planning on using eval like that in real code!
09:40 masak it's not about normal usage; it's about abnormal usage.
09:40 jnthn It won't be high on my list of things to fix :P
09:41 mvm_ left #perl6
09:43 Mowah_ joined #perl6
09:44 formalin14 left #perl6
09:45 moritz eval is known to leak memory
09:46 perigrin left #perl6
09:51 mvm joined #perl6
09:51 perigrin joined #perl6
09:58 moritz http://www.slate.com/id/2293056/ that made me think about a Perl 6 ACME module which disallows "...", restoflist  and forces you to write "...," restoflist  :-)
09:59 agentzh left #perl6
10:02 woosley left #perl6
10:05 masak :P
10:08 JimmyZ left #perl6
10:09 nordicdy_ joined #perl6
10:09 nordicdyno left #perl6
10:12 ershov joined #perl6
10:12 ershov_ left #perl6
10:20 Helios left #perl6
10:21 Helios joined #perl6
10:22 yegor joined #perl6
10:28 ershov ./perl6 -e 'say "фыв"'
10:28 ershov perl6: say "ййцу"
10:29 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\1081'␤decodeUTF8': bad data: '\1081'␤decodeUTF8': bad data: '\1094'␤decodeUTF8': bad data: '\1091'␤ййцу␤»
10:29 p6eval ..rakudo 678ad3, niecza v5-5-g1ec7256: OUTPUT«ййцу␤»
10:33 sjn left #perl6
10:34 bacek moritz, is it brand new shiny nqp?
10:34 tadzik another LHF for the hackathon if anyone's interested: complete Shell::Command (https://github.com/tadzik/perl6-File-Tools/blob/master/lib/Shell/Command.pm)
10:35 * tadzik gone again
10:35 * AlexKotov irc test
10:36 bacek ershov, you've got bad locale/icu version. It works as expected on my box.
10:38 AlexKotov I've didn't manage to install Pies in Windows environment.
10:38 AlexKotov Firstly, it generates wrong command for wget if $HOME contains spaces (C:/Documents and Settings)
10:39 AlexKotov Secondly, after redefining $HOME not to contain spaces, it goes further and fails near by 'e is not a command', I don't know what it means.
10:39 nordicdy_ left #perl6
10:39 nordicdyno joined #perl6
10:39 AlexKotov However, I've managed to install LWP::Simple by simple copying it into Perl6 lib dir
10:41 Juerd What's "Pies"?
10:42 Juerd Pies means urine in Dutch...
10:42 ershov left #perl6
10:42 ershov joined #perl6
10:43 dur-randir left #perl6
10:43 AlexKotov https://github.com/tadzik/Pies/
10:43 masak Juerd: it's the latest flavour of Perl 6 module installer.
10:47 Juerd It might not be the best of names...
10:48 bacek msg moritz jfyi, I reproduced assert on my box. Looking.
10:51 dur-randir joined #perl6
10:54 jaldhar joined #perl6
10:55 wamba left #perl6
10:56 masak` joined #perl6
10:56 masak left #perl6
10:58 mishnik joined #perl6
10:58 mishnik Hi
10:58 masak` mishnik: hi!
10:58 masak` bacek: what does "bad icu version" mean? shouldn't Parrot complain if the version is wrong?
10:59 mvm left #perl6
10:59 bacek masak`, it was wild guess. I mostly suspect non-utf8 locale.
10:59 masak` well, that was the first thing we checked.
10:59 ershov bacek: LANG="en_US.UTF-8"
11:00 bacek ershov, hmm. Works with en_AU.utf8 on my box (Debian/testing)
11:00 jaldhar left #perl6
11:00 ershov bacek: in command line?
11:01 bacek ershov, in gnome terminal.
11:01 ershov mm
11:01 ershov bacek: colud you try the standard terminal?
11:02 ershov bacek: or iTerm?
11:02 masak` moritz: you might want to have a look at https://github.com/perl6/nqp/issues/13
11:02 jaldhar joined #perl6
11:03 bacek ershov, there is no iTerm on Debian :) And I don't have other terminals installed.
11:03 Patterner left #perl6
11:03 ershov :)
11:03 ershov bacek: I see. The problem is on MacOS
11:04 yegor left #perl6
11:05 masak` is now known as masak
11:05 bacek ershov, iTerm was pretty bad with i18n when I last time tried it. Ask bobuk which one to use or setup iTerm :)
11:06 ershov bacek: perl5 works well. perl6 and nqp don't.
11:06 masak right.
11:06 masak which makes it feel like something else than a mere locale problem.
11:07 Psyche^ joined #perl6
11:07 Psyche^ is now known as Patterner
11:08 bacek ershov, afaik perl5 treat incoming string as byte-sequence. Not perl6 (or at least rakudo which depends on parrot which is quite different beast).
11:08 _jaldhar joined #perl6
11:09 jaldhar left #perl6
11:09 nordicdy_ joined #perl6
11:09 nordicdyno left #perl6
11:12 _jaldhar left #perl6
11:12 _jaldhar joined #perl6
11:12 ershov left #perl6
11:12 ershov_ joined #perl6
11:16 donri joined #perl6
11:18 risoh joined #perl6
11:18 bacek msg moritz nqp Makefile is really bad...
11:20 risou_awy left #perl6
11:21 risou_awy joined #perl6
11:24 jnthn bacek: What's wrong with it?
11:25 bacek jnthn, kind of changing one file rebuilds whole .so from scratch.
11:25 dalek nqp: 34e9e7c | bacek++ | src/pmc/sixmodelobject.pmc:
11:25 dalek nqp: Make compiler little bit more happy.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/34e9e7cee4
11:26 dalek nqp: ba5200b | bacek++ | src/ops/nqp.ops:
11:26 dalek nqp: Add couple more write_barriers when we poke into DispatcherSub directly.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/ba5200b90b
11:26 jnthn bacek: Note that it has to go through all of the bootstrap phases. but yeah, it shouldn't rebuild the dynops
11:26 jnthn unless it needs to
11:27 wamba joined #perl6
11:28 bacek jnthn, check DYNPMC target for example. It rebuilds all pms when only one changed.
11:28 bacek not a big deal. Just not perfect :)
11:29 jnthn bacek: oh, I think that was inherited from rakudo's makefile or something :)
11:30 bacek jnthn, definitely not from parrot :)
11:30 baest bacek++ # fixing nqp my compile problem
11:31 bacek baest, it's still crashes. But I'll fix it.
11:31 baest bacek: still it compiles now, it's shipable :)
11:32 bacek Someone (looking at jnthn) poking too much into PMC guts avoiding all help from parrot in terms of write barriers
11:32 Helios left #perl6
11:32 bacek baest, not yet. But we are getting there :)
11:34 jnthn bacek: Yeah, I tend to do stuff a bit differently now I know there's write barriers to worry about :)
11:34 Helios joined #perl6
11:34 bacek jnthn, you was warned 4+ months ago :)
11:35 jnthn bacek: Doesn't mean I understood 4+ months ago ;)
11:37 AlexKotov "prove -e perl6" is a great command ))
11:37 jnthn :)
11:37 AlexKotov All 72 tests in 9 files for LWP::Simple passed successfully.
11:38 AlexKotov Total time: 7m38s
11:38 jnthn whoa :)
11:39 jnthn Need a faster Rakudo. But nice htat there's lots of tests :)
11:39 masak \o/
11:40 masak when the processors for handling really awesome languages finally hit the market, we'll be ready :)
11:40 nordicdy_ left #perl6
11:40 nordicdyno joined #perl6
11:40 donri huh what's those tests doing that takes almost eight minutes
11:40 masak boiling an egg? :P
11:40 AlexKotov mostly, loading LWP::Simple
11:40 ymasory left #perl6
11:40 donri haha
11:41 masak AlexKotov: you could precompile to PIR, then it'll be faster.
11:41 AlexKotov test.pl that contains 'use LWP::Simple;' executes 14 seconds more than without this line
11:41 masak o.O
11:41 masak I shouldn't be surprised. we had similar results with November.
11:41 donri and it's doing that for each test?
11:41 Helios left #perl6
11:41 jnthn AlexKotov: perl6 --target=pir LWP/Simple.pm > LWP/Simple.pir
11:41 masak donri: each test file, yes.
11:42 Helios joined #perl6
11:42 donri but that's just two of eight minutes then
11:42 ershov_ left #perl6
11:42 ershov joined #perl6
11:44 AlexKotov jnthn: much faster, thnx!
11:45 jnthn AlexKotov: \o/
11:45 jnthn masak: Is this ticket still relevant: http://rt.perl.org/rt3/Public/Bug/Display.html?id=68346
11:46 masak jnthn: it looks rejectable to me.
11:47 jnthn grr, I didn't log in
11:47 * jnthn does so
11:50 [Coke] left #perl6
11:50 JimmyZ joined #perl6
11:51 AlexKotov 4m59s instead of 7m38s with precompiled LWP::Simple
11:52 AlexKotov Now I'm going to precompile Test.pm :)
11:53 [Coke] joined #perl6
11:56 ymasory joined #perl6
11:57 AlexKotov 1m42s with pre-compiled Test.pm. Fantastic speed-up!
11:58 masak :)
11:58 pernatiy left #perl6
11:59 macroz1 left #perl6
12:01 risoh left #perl6
12:09 flussence (on a test-related tangent, smolder.parrot.org seems to have been broken for several days now.)
12:10 mj41 left #perl6
12:11 bluescreen10 joined #perl6
12:11 ilyuha left #perl6
12:11 [Coke] left #perl6
12:12 ilyuhan joined #perl6
12:12 ilyuhan is now known as ilyuha
12:13 ershov_ joined #perl6
12:13 ershov left #perl6
12:13 bessarabov is it right that there is difference between "%result.push (%capitals.invert);" and "%result.push(%capitals.invert);" (space between push and '(')?
12:13 masak yes.
12:13 bessarabov ok.
12:13 bessarabov going to read more docs =)
12:13 masak see S02.
12:13 masak I'll find it for you.
12:13 bessarabov thank you
12:13 [Coke] joined #perl6
12:14 ershov_ left #perl6
12:16 TiMBuS http://perlcabal.org/syn/S02.html#Whitespace_and_Comments
12:16 TiMBuS In general, whitespace is optional in Perl 6 except where it is needed to separate constructs that would be misconstrued as a single token or other syntactic unit.
12:16 masak TiMBuS++
12:17 TiMBuS we get this question a lot
12:17 masak but here it's not really about the whitespace being optional, it's about the whitespace changing the semantics.
12:17 TiMBuS it needs an anchor in the syn
12:18 masak the real answer is that if the parens are to mean 'function call parens' and not 'grouping parens', they need to come directly after the sub name, not with whitespace in between.
12:18 [Coke] left #perl6
12:18 masak Perl 5 allowed whitespace in between, which confuses people in cases like 'print (1 + 2), 3;'
12:19 molaf joined #perl6
12:19 masak $ perl -wE 'say (1 + 2), 3'
12:19 masak say (...) interpreted as function at -e line 1.
12:19 masak Useless use of a constant in void context at -e line 1.
12:19 masak 3
12:19 masak rakudo: say (1 + 2), 3
12:19 p6eval rakudo 678ad3: OUTPUT«33␤»
12:19 masak \o/
12:20 masak (ill-chosen values, sorry 'bout that) :)
12:20 woosley joined #perl6
12:20 TiMBuS perl -E 'say +(1 + 2), 3 #auuugh'
12:20 TiMBuS 33
12:20 masak :)
12:20 [Coke] joined #perl6
12:21 bessarabov TiMBuS, thank you for the description
12:21 _twitch joined #perl6
12:22 JimmyZ left #perl6
12:23 TiMBuS bessarabov, no problem.
12:23 bluescreen10 left #perl6
12:23 TiMBuS i should ask: have you been pointed toward the perl book?
12:23 bluescreen10 joined #perl6
12:24 TiMBuS https://github.com/perl6/book/ this one
12:24 TiMBuS https://github.com/perl6/book/issues/53
12:24 TiMBuS oh boy.
12:24 TiMBuS lol
12:27 f00li5h left #perl6
12:29 moritz oh hai
12:30 bessarabov lol
12:30 bessarabov Yes, I know about this book, but I haven't read it. Now I'm walking through perl6 advent calendar.
12:32 masak that's a really good idea. bessarabov++
12:32 masak don't hesitate to report things that don't work.
12:32 masak we want to keep the examples in the advent calendar up-to-date.
12:35 moritz baest: please try again (building nqp) after bacek++'s last nqp fixes
12:36 [Coke] left #perl6
12:36 Tedd1 left #perl6
12:37 domidumont left #perl6
12:37 ilyuha left #perl6
12:37 ershov joined #perl6
12:38 _twitch left #perl6
12:38 [Coke] joined #perl6
12:39 baest moritz: I did, it compiles now. But it crashes now. bacek++ said he would look into it
12:39 Holy_Cow joined #perl6
12:39 AlexKotov will it work in Perl6? print (length $a);
12:40 moritz AlexKotov: print chars $a;
12:40 nordicdyno left #perl6
12:40 nordicdyno joined #perl6
12:40 AlexKotov moritz, thanks!
12:40 masak rakudo: say chars "OH HAI"
12:40 p6eval rakudo 678ad3: OUTPUT«6␤»
12:40 Tedd1 joined #perl6
12:40 masak rakudo: say "OH HAI".chars
12:40 p6eval rakudo 678ad3: OUTPUT«6␤»
12:40 moritz AlexKotov: "length" is bad because it doesn't imply a unit (is it bytes? or chars? or list elements? or words?)
12:41 masak rakudo: "OH HAI".chars.say
12:41 p6eval rakudo 678ad3: OUTPUT«6␤»
12:41 masak more than one way :)
12:41 AlexKotov And if I need exactly bytes?!
12:41 Holy_Cow left #perl6
12:41 masak well, a string is not made of bytes.
12:41 ab5tract joined #perl6
12:41 masak a string is made of characters.
12:41 AlexKotov But character may be binary :)
12:41 masak the translation from characters to bytes is, in a general setting, undefined.
12:42 masak nope, in Perl 6 characters are characters and bytes are bytes.
12:42 masak if you want a sequence of bytes, you'd use Buf.
12:42 masak Buf has a .bytes method.
12:42 AlexKotov I.e. "say buf $a;" ?
12:43 masak no, more like say "OH HAI".encode('utf-8').bytes
12:43 masak rakudo: say "OH HAI".encode('utf-8').bytes
12:43 p6eval rakudo 678ad3: OUTPUT«Method 'bytes' not found for invocant of class ''␤  in main program body at line 22:/tmp/394ZnVzvLd␤»
12:43 masak o.O
12:43 masak I might have misspoken.
12:44 masak rakudo: say "OH HAI".encode('utf-8').elems
12:44 p6eval rakudo 678ad3: OUTPUT«6␤»
12:44 masak hey hackathoners! :)
12:44 bessarabov rakudo: say "тест".encode('utf-8').elems
12:44 p6eval rakudo 678ad3: OUTPUT«8␤»
12:44 masak \o/
12:44 masak easy low-hanging fruit: go into src/core/Buf.pm and add a 'bytes' method that calls 'elems'.
12:44 masak I promise I'll push it to rakudo and credit you.
12:45 masak you'll be famous :)
12:46 baest :)
12:47 AlexKotov ===SORRY!===
12:47 AlexKotov Confused at line 16, near "say Buf $h"
12:47 masak std: my $h; say Buf $h
12:47 p6eval std 905614c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/61JxRgCREm line 1:␤------> [32mmy $h; say Buf [33m⏏[31m$h[0m␤    expecting any of:␤   bracketed infix␤        infix or meta-infix␤    statement modifier loop␤Parse failed␤FAILED 00:01 115m␤»
12:47 masak AlexKotov: see above. "Two terms in a row".
12:47 smash joined #perl6
12:48 smash hello everyone
12:48 masak smash: hi!
12:49 masak AlexKotov: to convert $obj to a SomeType in Perl 6, use $obj.SomeType
12:49 AlexKotov $obj.binary ?
12:50 masak $obj.encode($encoding)
12:51 daxim encoding scheme MIME-Header and codepoint fallbacks PERLQQ/HTMLCREF already implemented?
12:52 AlexKotov Ok. I have binary content in $obj - content of, for example, md5sum.exe, from 1st to last byte. I want to have digit the same as file size. How to print it?
12:52 leprevost joined #perl6
12:52 bessarabov masak, actually the fruit of 'bytes' is hanging not so low. Are in the rakudo git reposiory tests for src/core/Buf.pm ?
12:52 daxim I think method bytes returns that, AlexKotov
12:52 Helios left #perl6
12:52 jnthn bessarabov: Tests are in a separate repo
12:53 jnthn But make spectest gives you a checkout of it
12:53 bessarabov got it. thx
12:53 jnthn It's at https://github.com/perl6/roast
12:54 masak bessarabov: oh, adding a test too? even better. :)
12:54 AlexKotov daxim: thnx - I need exactly 'bytes' ))
12:54 yegor joined #perl6
12:55 Helios joined #perl6
12:55 masak moritz: where's hugme? we need to add people to projects :)
12:56 masak (and hug people, of course)
12:57 ilyuhan joined #perl6
12:57 yegor left #perl6
12:57 jnthn std: sub foo;
12:57 p6eval std 905614c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/FAbxzIFLLa line 1:␤------> [32msub foo[33m⏏[31m;[0m␤    expecting any of:␤       new name to be defined␤ routine_def␤    trait␤Parse failed␤FAILED 00:01 111m␤»
12:58 masak std: sub MAIN;
12:58 p6eval std 905614c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/bO26W7tdwe line 1:␤------> [32msub MAIN[33m⏏[31m;[0m␤    expecting any of:␤      new name to be defined␤ routine_def␤    trait␤Parse failed␤FAILED 00:01 111m␤»
12:58 masak TimToady: ^^
12:59 jnthn masak: What should it do?
12:59 jnthn masak: Was looking at http://rt.perl.org/rt3/Public/Bug/Display.html?id=68710
12:59 masak jnthn: 'sub MAIN;'? it's the only semicolon form of sub declarations that's allowed.
12:59 jnthn It's...allowed? :)
12:59 masak jnthn: the rest of the file is inside 'sub MAIN {}'
12:59 jnthn OK
12:59 Gothmog_ left #perl6
13:00 jnthn STD doesn't seem to think so ;)
13:00 masak but the spec says so.
13:00 jnthn OK
13:00 masak not sure I think it's worth it, tbh.
13:00 jnthn Is it...useful? :)
13:00 jnthn me either
13:00 masak I'd rather have consistency there.
13:00 masak as to useful, what use is a newborn baby, etc.
13:00 jnthn Playing catch?
13:00 jnthn ;)
13:00 masak :P
13:01 masak it's only by seeing it grow up that we will know if it's a prodigee or a brat. :P
13:01 masak er, prodigy*
13:01 jnthn :P
13:01 * masak , it seems, isn't one at spelling
13:01 jnthn sub BRAT;
13:01 jnthn .oO( sub BRATWURST; # the worst behaved kind of saussage )
13:02 AlexKotov I want to call 'md5_hex' method of Digest::MD5. How to do it ?
13:02 * masak .oO( sub БРАТ )
13:02 AlexKotov perl6 -MDigest::MD5 -e "say Digest::MD5::md5_hex('1')" doesn't work
13:02 masak AlexKotov: looking.
13:03 TiMBuS AlexKotov, you're in luck, because thats exactly what i've done
13:03 jnthn AlexKotov: Is it an our-scoped method?
13:03 masak nope.
13:03 jnthn That'll be why.
13:03 jnthn In Perl 6 methods have lexical scope by default
13:03 masak AlexKotov: Digest::MD5.new.md5_hex('1')
13:04 jnthn gah
13:04 jnthn *subs* have lexical scope by default
13:04 jnthn oh, it's a method :)
13:04 masak AlexKotov: or without the '.new', seems to be fine too.
13:04 TiMBuS oh i thought he was talking about using perl5's one
13:05 ab5tract left #perl6
13:05 jnthn Don't think it should be a class really. IMHO. :)
13:05 AlexKotov But it will be comfortable to use in this case )
13:06 wknight8111 joined #perl6
13:07 AlexKotov Works both with .new and without .new
13:08 AlexKotov with dot as a separator
13:08 jnthn AlexKotov: Yes, one can call a method that doesn't access attributes on the type object itself.
13:08 jnthn rakudo: sub foo($a = 1, $b) { say $a }; foo(3)
13:08 p6eval rakudo 678ad3: OUTPUT«===SORRY!===␤Cannot put required parameter after optional parameters at line 22, near ") { say $a"␤»
13:09 AlexKotov but why this is not work with perl6 -e?
13:09 AlexKotov perl6 -MDigest::MD5 -e "say Digest::MD5.new.md5_hex('1')"
13:10 AlexKotov this works inside perl file but not works with -e
13:10 moritz -M ist not implemented
13:10 masak and it's not low-hanging fruit :(
13:10 nordicdyno left #perl6
13:10 dalek nqp: 509350b | moritz++ | t/setting/01-resizablepmcarray.t:
13:10 dalek nqp: [t/setting] delete an outdated test
13:10 dalek nqp: review: https://github.com/perl6/nqp/commit/509350bc23
13:10 nordicdyno joined #perl6
13:10 moritz masak: have you tried?
13:11 masak no, I'm assuming it's not trivial because it spans Rakudo and PCT.
13:12 bluescreen100 joined #perl6
13:12 moritz might not be too hard if you accept a space
13:12 moritz ie -M Modulename
13:13 jnthn http://rt.perl.org/rt3/Ticket/Display.html?id=71110 # needs tests, if anybody fancies writing them
13:13 masak moritz: well, I mean, it feels like a thing that needs to be defined in PCT, but then maybe not all HLLs will want it, and then it needs to be tied into Rakudo's module loader... :/
13:15 JimmyZ joined #perl6
13:16 f00li5h joined #perl6
13:17 jnthn rakudo: class class is class { }
13:17 p6eval rakudo 678ad3: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Routine $r, Any :default($default)!)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤:(Mu $type where ({ ... }), Any
13:17 p6eval ..:rw($rw)…
13:17 jnthn masak: I think that provided PCT can be configured to parse it, then it'll be easy enough to do in Rakudo.
13:18 jnthn It's just something at the start of the parse to look for such declarations and say "oh, pretend we saw 'use'"
13:20 jnthn nqp: class class is class { }
13:20 p6eval nqp: OUTPUT«maximum recursion depth exceeded␤current instr.: 'nqp;NQPClassHOW;parents' pc 20506 (src/stage2/gen/nqp-mo.pir:7169)␤»
13:20 jnthn meh!
13:22 lue left #perl6
13:22 lue joined #perl6
13:23 kaare_ joined #perl6
13:24 jnthn rakudo: rakudo: my Int (Str $x); say $x.WHAT
13:24 p6eval rakudo 678ad3: OUTPUT«===SORRY!===␤Confused at line 22, near "rakudo: my"␤»
13:24 jnthn rakudo: my Int (Str $x); say $x.WHAT
13:24 p6eval rakudo 678ad3: OUTPUT«Int()␤»
13:24 jnthn heh
13:25 dalek nqp: ad31d07 | jonathan++ | src/how/NQPClassHOW.pm:
13:25 dalek nqp: Forbid classes inheriting from themselves.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/ad31d07dbe
13:28 kappa joined #perl6
13:28 nordicdyno left #perl6
13:29 bluescreen100 left #perl6
13:29 bluescreen10 left #perl6
13:30 dalek rakudo/nom: 9ab0356 | jnthn++ | src/Perl6/Metamodel/MultipleInheritance.pm:
13:30 dalek rakudo/nom: Prevent a class from inheriting from itself.
13:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ab035692e
13:32 yarp joined #perl6
13:33 jnthn rakudo: my $a = 1; sub foo() { my $a = 2; our sub bar($x where $a) { say $x } }; bar(1); bar(2)
13:33 p6eval rakudo 678ad3: OUTPUT«Null PMC access in type()␤  in <anon> at line 22:/tmp/4z0R7DPogV␤  in 'Block::ACCEPTS' at line 6354:CORE.setting␤  in 'bar' at line 22:/tmp/4z0R7DPogV␤  in 'bar' at line 22:/tmp/4z0R7DPogV␤  in main program body at line 22:/tmp/4z0R7DPogV␤»
13:33 pernatiy joined #perl6
13:33 jnthn no, not fixed yet...
13:34 ershov left #perl6
13:34 ershov joined #perl6
13:35 wamba left #perl6
13:35 wamba joined #perl6
13:38 _jaldhar left #perl6
13:38 dur-randir left #perl6
13:40 envi left #perl6
13:44 bluescreen100 joined #perl6
13:44 bluescreen10 joined #perl6
13:51 pmichaud good morning, #perl6
13:53 drbean joined #perl6
13:54 drbean left #perl6
13:55 moritz good morning pmichaud
13:56 kappa left #perl6
13:56 yarp left #perl6
13:57 am0c joined #perl6
13:58 AlexKotov Is hex ( 0x0A ) works in Perl6??
13:58 moritz AlexKotov: 0x0A is already hex
13:58 moritz rakudo: say hex '0A'
13:58 p6eval rakudo 678ad3: OUTPUT«Could not find sub &hex␤  in main program body at line 22:/tmp/BYWhlMl_Hw␤»
13:58 moritz rakudo: say :16('0A')
13:59 p6eval rakudo 678ad3: OUTPUT«10␤»
13:59 kappa joined #perl6
13:59 pmichaud rakudo:  say :2('10111')
13:59 p6eval rakudo 678ad3: OUTPUT«23␤»
14:00 corax left #perl6
14:00 masak rakudo: say 255.base(16)
14:00 p6eval rakudo 678ad3: OUTPUT«FF␤»
14:00 xxxyyy joined #perl6
14:01 xxxyyy left #perl6
14:02 ilyuhan left #perl6
14:02 envi joined #perl6
14:02 AlexKotov OK, is split(/0x0A/) the same as split(/\n/) ?
14:04 masak std: /0x0A/
14:04 p6eval std 905614c: OUTPUT«ok 00:01 113m␤»
14:04 moritz nqp: hash(a => 1)
14:04 p6eval nqp: OUTPUT«too few positional arguments: 0 passed, 1 (or more) expected␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:04 masak rakudo: say '0x0A' ~~ /0x0A/
14:04 moritz nqp: hash(1, 2)
14:04 p6eval rakudo 678ad3: OUTPUT«0x0A␤»
14:04 p6eval nqp: OUTPUT«too many positional arguments: 2 passed, 1 expected␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:04 moritz nqp: hash(1)
14:04 p6eval nqp: OUTPUT«get_attr_str() not implemented in class 'Integer'␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:04 masak AlexKotov: no, /0x0A/ matches an actual string '0x0A'.
14:05 masak rakudo: say "\n" ~~ /\x0A/
14:05 p6eval rakudo 678ad3: OUTPUT«␤␤»
14:05 masak AlexKotov: that's probably what you want.
14:05 AlexKotov I think so..
14:06 wamba left #perl6
14:07 wamba joined #perl6
14:08 wtw left #perl6
14:08 moritz nqp: foo()
14:08 p6eval nqp: OUTPUT«Could not find sub foo␤current instr.: '_block11' pc 29 ((file unknown):48670660)␤»
14:08 moritz nqp: hash("foo")
14:08 p6eval nqp: OUTPUT«get_attr_str() not implemented in class 'String'␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:09 moritz jnthn: there seems to be a sub hash in scope somehow in nqp, and I have no idea where it comes from
14:09 AlexKotov left #perl6
14:11 bessarabov For me hackathon is over and I want to thank you! =)
14:11 bessarabov left #perl6
14:12 * moritz hopes that bessarabov had fun
14:14 bluescreen10 left #perl6
14:14 jnthn nqp: hash
14:14 p6eval nqp:  ( no output )
14:14 jnthn nqp: say hash
14:14 p6eval nqp: OUTPUT«Confused at line 1, near "say hash"␤current instr.: 'nqp;HLL;Grammar;panic' pc 26292 (src/stage2/gen/NQPHLL.pir:7011)␤»
14:14 jnthn nqp: say(hash)
14:14 p6eval nqp: OUTPUT«␤»
14:15 jnthn hm :)
14:15 moritz jnthn: src/stage0/NQPCORE.setting-s0.pir has .sub "hash" :subid(...)
14:15 bluescreen100 left #perl6
14:15 jnthn moritz: Oh, so it'd be somewhere in core/*.pm
14:15 masak nqp: say(hash(1,2,3,4))
14:15 p6eval nqp: OUTPUT«too many positional arguments: 4 passed, 1 expected␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:15 masak nqp: my @a = 1,2,3,4; say(hash(@a))
14:15 p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " 1,2,3,4; "␤current instr.: 'nqp;HLL;Grammar;panic' pc 26292 (src/stage2/gen/NQPHLL.pir:7011)␤»
14:15 dionys left #perl6
14:15 masak nqp: my @a := 1,2,3,4; say(hash(@a))
14:15 p6eval nqp: OUTPUT«get_attr_str() not implemented in class 'Integer'␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:16 moritz jnthn: that's the curious part, the only hash is a *method* in src/core/NQPCapture.pm
14:16 masak nqp: my @a := "1",2,"3",4; say(hash(@a))
14:16 p6eval nqp: OUTPUT«get_attr_str() not implemented in class 'String'␤current instr.: 'hash' pc 6880 (src/stage2/gen/NQPCORE.setting.pir:2171)␤»
14:16 masak bleh :)
14:16 masak what is an attr_str anyway? :)
14:16 jnthn oh wtf, I can't find it
14:16 woosley left #perl6
14:16 moritz method hash() { %!hash }
14:17 moritz gets compiled to
14:17 moritz .sub "hash"  :subid("47_1304523726.548") :outer("43_1304523726.548")
14:17 moritz note no :method
14:17 jnthn method?!
14:17 jnthn right but...it shouldn't get a lexpad entry or some such
14:18 moritz it seems to be placed in the namespace
14:18 jnthn nqp: BUILD()
14:18 p6eval nqp: OUTPUT«too few positional arguments: 0 passed, 1 (or more) expected␤current instr.: 'BUILD' pc 6821 (src/stage2/gen/NQPCORE.setting.pir:2148)␤»
14:18 jnthn oh lawl
14:18 jnthn I, er...think it's time to change the way we find subs :)
14:18 jnthn e.g. to only look in the lexpad!
14:18 moritz why do you compile methods to subs?
14:19 moritz why not just add as :method?
14:19 moritz or :anon?
14:19 jnthn moritz: :anon would make sense
14:19 jnthn :method is tied into Parrot's idea of OO
14:19 kappa left #perl6
14:19 moritz nqp: new(NQPCapture)
14:19 p6eval nqp: OUTPUT«Null PMC access in find_method('CREATE')␤current instr.: 'new' pc 6770 (src/stage2/gen/NQPCORE.setting.pir:2116)␤»
14:19 jnthn Which isn't anything that uses 6model's idea of OO
14:19 moritz ok
14:19 jnthn Yes, adding anon would help and be the easier patch
14:20 jnthn Though changing sub dispatch to find_lex would also help :)
14:21 ymasory left #perl6
14:23 cognominal joined #perl6
14:27 bluescreen100 joined #perl6
14:27 bluescreen10 joined #perl6
14:28 * moritz doesn't care either way, as long as he can add a custom sub hash(*%new) to the setting to fix t/setting/02-hash.t
14:30 moritz how do I add the :anon flag to a PAST::Block?
14:31 jnthn .pirflags(':anon')
14:31 moritz ah, just found it by ack'ing, thanks
14:31 colomon hackathoning?
14:32 orafu left #perl6
14:33 * moritz at home, but the poeple in .ru are hackathonging
14:35 colomon \o/
14:36 * moritz fails at adding :anon
14:38 moritz I've added it to src/NQP/Actions.pm after line 812 to an if $*SCOE eq 'our { ... } else { # here  } close
14:38 sftp joined #perl6
14:40 jnthn moritz: failed at? :)
14:40 jnthn I hope you menat $*SCOPE :)
14:40 moritz /home/moritz/p6/rakudo/parrot_install/bin/parrot --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/NQPHLL.pir \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/gen/NQPHLL.pm
14:40 moritz Cannot have a multi candidate for Str when an only method is also in the class
14:40 moritz current instr.: 'nqp;NQPClassHOW;_block1568' pc 18910 (src/stage2/gen/nqp-mo.pir:6485)
14:41 moritz yes, $*SCOPE
14:41 jnthn er
14:41 jnthn hm
14:41 jnthn Oh
14:41 hercynium joined #perl6
14:41 jnthn Maybe $block.pirflags($block.pirflags() ~ ' :anon') is safer :)
14:41 jnthn I suspect we lost another flag that matters.
14:43 jnthn ah, yes
14:43 jnthn The dispatchersub thingy got lost.
14:46 jnthn nqp: my $a := 1; $a++; say($a)
14:46 p6eval nqp: OUTPUT«2␤»
14:46 jnthn aw~!
14:46 jnthn Forgot to remove that...
14:46 colomon remove?
14:46 alester joined #perl6
14:46 jnthn the ++
14:46 jnthn Makes no sense in nqp
14:47 jnthn masak++ just reminded me about it :)
14:47 masak right. exTERminate!
14:47 cognominal left #perl6
14:47 masak nqp only has binding; it has no rw containers on which to do the ++ing
14:47 colomon ah.  I wondered how it worked.
14:47 jnthn colomon: By diddling a constant.
14:47 colomon tisk, tisk
14:47 jnthn Which is going to work out GREAT when I implement constant folding ;)
14:48 masak nqp: say ++5
14:48 p6eval nqp: OUTPUT«Null PMC access in add_float()␤current instr.: '_block11' pc 0 ((file unknown):1)␤»
14:48 masak hah!
14:48 masak oh wait.
14:48 masak nqp: say(++5)
14:48 p6eval nqp: OUTPUT«␤»
14:48 masak huh.
14:48 jnthn nqp: say(5++)
14:48 p6eval nqp: OUTPUT«5␤»
14:48 masak nqp: say(++5); say(5)
14:48 p6eval nqp: OUTPUT«␤5␤»
14:49 masak "yes, we mutate our constants. but that's OK because we make new ones all the time!" :P
14:49 jnthn :P
14:49 cotto joined #perl6
14:50 colomon is nqp: the old nqp or nqp-nom?
14:50 jnthn nqp-nom
14:51 Trashlord left #perl6
14:51 jnthn nqp: role Yes { method oh_my() { say("why yes, I'm nom") } }; class Woo does Yes { }; Woo.oh_my
14:51 p6eval nqp: OUTPUT«why yes, I'm nom␤»
14:52 masak showoff! :P
14:52 jnthn nqp: role Yes { method oh_my() { say("why yes, I'm got composed into $?CLASS") } }; class Woo does Yes { }; Woo.oh_my
14:52 p6eval nqp: OUTPUT«why yes, I'm got composed into Woo()␤»
14:52 masak woo!
14:53 masak rakudo: role Yes { method oh_my() { say $?CLASS } }; class Woo does Yes {}; Woo.oh_my
14:53 p6eval rakudo 678ad3: OUTPUT«===SORRY!===␤Symbol '$?CLASS' not predeclared in oh_my (/tmp/X5Eg6frRGH:22)␤»
14:53 sbp nqp is getting qp
14:54 masak well, -er
14:54 Trashlord joined #perl6
14:54 jnthn There's a bunch of stuff it'll never do. but it kinda needs roles. :)
14:54 jnthn the entire Rakudo metamodel is factored as roles.
14:54 ab5tract joined #perl6
14:55 masak jnthn++
14:56 moritz error:imcc:syntax error, unexpected $undefined, expecting '\n' (':') in file 'src/stage2/gen/nqp-mo.pir' line 1554
14:56 moritz error:imcc:syntax error, unexpected $undefined, expecting '\n' (':') in file 'src/stage2/gen/nqp-mo.pir' line 1554
14:57 jnthn moritz: eww
14:57 jnthn moritz: What do those lines look like?
14:58 am0c left #perl6
14:59 cognominal joined #perl6
15:02 moritz $ ./nqp -e 'say(1)'
15:02 moritz Could not find sub EXPR_reduce
15:02 moritz $ ./nqp -e 'say(1)'
15:02 moritz Could not find sub EXPR_reduce
15:02 jnthn omg
15:02 moritz sorry
15:02 jnthn :)
15:02 moritz the first was : anon
15:02 jnthn moritz: How does that get called?
15:02 moritz because I was stupid
15:03 moritz 7654:            .const 'Sub' reduce = 'EXPR_reduce'
15:03 moritz from src/stage0/HLL-s0.pir
15:03 jnthn .const 'Sub' reduce = 'EXPR_reduce'
15:03 jnthn oh
15:03 jnthn yeah, hm
15:04 jnthn wait what
15:04 jnthn self.reduce(termstack, opstack)
15:04 jnthn Why isn't that
15:04 jnthn self.'EXPR_reduce'(termstack, opstack) ?
15:04 moritz I'll try that
15:04 jnthn Maybe optimization but 6model method lookup is kinda fast :)
15:04 moritz what does the  capture_lex reduce  in the liine before it do?
15:05 jnthn oh...
15:05 jnthn brb
15:06 jnthn .const 'Sub' reduce = 'EXPR_reduce'
15:06 jnthn could be
15:06 jnthn .local pmc reduce
15:06 jnthn reduce = find_lex 'EXPR_reduce'
15:07 jnthn Though there's still something...weird...that it wants to treat the thing as an "inner method"...
15:07 moritz can you look up methods as lexicals?
15:08 moritz HLL::Grammar has method EXPR_reduce($termstack, $opstack) {
15:08 moritz fwiw if I remove those capture_lex calls I don't get any new test failures
15:09 jnthn oh :)
15:09 moritz I'll bootstrap and test again
15:10 jnthn moritz: Yeah, I don't see any usage of outer lexicals in EXPR_reduce either
15:10 jnthn I think they can go
15:10 jnthn And we just do the method call approach.
15:10 moritz if the tests are clean after bootstrap I'll just commit it
15:10 jnthn moritz++
15:13 jnthn moritz: er, I have another patch from somebody that wants to bootstrap also... :)
15:15 moritz jnthn: I'll just test the bootstrap without committing it
15:15 moritz just had some local f*ckup that made me redo the compilation, so I'm not done yet
15:16 jnthn moritz: ah, I can apply the patch I have in two parts so it won't be an issue
15:16 wamba left #perl6
15:16 jnthn Getting it sent to me like that
15:16 jnthn finanalyst++
15:18 dalek nqp: bb72006 | moritz++ | src/ (2 files):
15:18 dalek nqp: compile methods to anonymous PIR subs
15:18 dalek nqp: review: https://github.com/perl6/nqp/commit/bb720069e2
15:19 risou_awy is now known as risou
15:20 HarryS left #perl6
15:23 masak time to go for post-hackathon nom!
15:23 masak left #perl6
15:26 dalek nqp: c9dd840 | moritz++ | / (2 files):
15:26 dalek nqp: install hash() constructor, make t/setting/02-hash.t pass again
15:26 dalek nqp: review: https://github.com/perl6/nqp/commit/c9dd840160
15:26 HarryS joined #perl6
15:27 dalek nqp: ad4a452 | moritz++ | .gitignore:
15:27 dalek nqp: ignore .so files
15:27 dalek nqp: review: https://github.com/perl6/nqp/commit/ad4a4523bd
15:28 hackathon_screen left #perl6
15:28 alester We still have the concept of tainted data in Perl 6, don't we?
15:28 TimToady a concept is all we have, alas
15:28 finanalyst left #perl6
15:29 alester !
15:29 TimToady nobody's implemented it
15:31 * colomon just switched back to Rakudo 2011.03 so that he can have a working zavolaj again....
15:32 * moritz doesn't believe in taint mode
15:33 TimToady what, you want multi-level secure?  :P
15:35 * TimToady now pictures attaching ACLs to every piece of data...
15:36 * TimToady now pictures a type system that distinguishes untrusted data without a run-time taint flag...
15:37 ab5tract left #perl6
15:38 TimToady "Sorry, untrusted strings aren't Cool at line 42."
15:39 colomon TimToady++ # It's just not cool to be untrusted.  :)
15:39 * tadzik is back
15:40 tadzik seen AlexKotov
15:40 aloha AlexKotov was last seen in #perl6 1 hours 30 mins ago leaving the channel.
15:40 tadzik crap
15:40 tadzik all the hackathoners left already
15:40 woosley joined #perl6
15:41 TimToady they're nomming, though it's not clear what condition they might return in  :)
15:45 colomon one hopes happy.  :)
15:48 molaf left #perl6
15:58 alester Data tainting is the #1 defense against the Bobby Tables problems out there.
15:59 alester Well, smart programming is.  Data tainting is the #1 defense against forgetting to do the smart programming.
15:59 daxim left #perl6
16:02 kurkale6ka joined #perl6
16:03 colomon Do the TDD advocates support getting 156 failing tests before trying to fix them?  ;)
16:04 TimToady I suspect that's a tortoise/hare problem
16:10 risou is now known as risou_awy
16:10 risou_awy is now known as risou
16:14 Moukeddar joined #perl6
16:21 Guest28808 joined #perl6
16:24 meteorjay joined #perl6
16:24 Gothmog_ joined #perl6
16:24 kurkale6ka left #perl6
16:28 risou left #perl6
16:28 Guest28808 left #perl6
16:28 risou_awy joined #perl6
16:28 risou_awy is now known as risou
16:28 TimToady rakudo: q
16:28 p6eval rakudo 678ad3:  ( no output )
16:28 colomon std: q
16:28 p6eval std 905614c: OUTPUT«Invalid class name (STD::stop::) at /home/p6eval/perl5/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64-linux/Class/MOP.pm line 92␤   Class::MOP::load_first_existing_class('STD::stop::') called at
16:28 p6eval ../home/p6eval/perl5/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64-linux/C…
16:29 colomon :O
16:29 TimToady er, wow
16:29 Guest28808 joined #perl6
16:30 Chillance joined #perl6
16:30 TimToady std's message is really a two-page stack trace
16:31 risou left #perl6
16:31 colomon woo-hoo, down to 80 failures!
16:32 risou_awy joined #perl6
16:32 risou_awy is now known as risou
16:35 colomon 4 failures?
16:36 colomon Doh!  -1 + 1 = -0 according to Math::BigInt
16:36 moritz that's correct, if you assume -0 == 0
16:36 moritz and why shouldn't it be? what's the difference?
16:36 colomon which it doesn't, in Math::BigInt
16:36 TimToady -0 is smaller :)
16:36 thou left #perl6
16:37 Guest28808 left #perl6
16:39 thou joined #perl6
16:39 Chillance left #perl6
16:40 colomon all tests pass!  \o/
16:43 cdarroch joined #perl6
16:43 cdarroch left #perl6
16:43 cdarroch joined #perl6
16:43 ershov moritz: TimToady: 1/0 = +inf but 1/-0 = -inf - this is the difference!
16:45 moritz ershov: so what's 0 + -0?
16:46 sbp “In ordinary arithmetic, −0 = +0 = 0.”
16:46 sbp http://en.wikipedia.org/wiki/Signed_zero
16:46 ershov moritz: you have Math::BigInt :) I don't
16:47 * moritz still remembers the proof that addition can only have one neutral element :-)
16:47 ershov even more I'd like to know what is -0/+0 :)
16:48 Moukeddar left #perl6
16:49 sbp
16:49 sbp The expression
16:49 sbp :<math>\frac{0}{0}=\,?</math>
16:49 sbp requires a value to be found for the unknown quantity in
16:49 sbp :<math>?\times 0=0.</math>
16:49 sbp Again, any number multiplied by 0 is 0 and so this time every number solves the equation instead of there being a single number that can be taken as the value of 0/0.
16:49 sbp
16:49 sbp from http://en.wikipedia.org/wiki/Division_by_zero#Division_as_the_inverse_of_multiplication
16:50 sbp so every number solves -0/+0 algebraically, according to Wikipedia at least
16:50 mtk left #perl6
16:50 TimToady well, that depends on how big you think the interval 0±ϵ is  :)
16:50 ershov left #perl6
16:51 mtk joined #perl6
16:51 sbp if it's long enough to use the restroom, it'll sell
16:51 flussence random thought: is there any way to get at the bits of a floating point number directly?
16:52 colomon ah, 96 failing tests again.  :)
16:52 sbp I always thought .eps files were something to do with grammars
16:54 woosley left #perl6
16:55 kaare_ left #perl6
16:57 colomon zero is really a pain in the neck...
16:58 envi left #perl6
16:58 * TimToady sighs and wishes he had zero pain in the neck...
16:58 envi joined #perl6
16:59 birdwindupbird left #perl6
17:06 yegor joined #perl6
17:06 Helios left #perl6
17:07 Helios joined #perl6
17:09 JimmyZ left #perl6
17:14 dalek std: 6e81878 | larry++ | STD.pm6:
17:14 dalek std: detect absent (or null) q delimiter
17:14 dalek std: review: https://github.com/perl6/std/commit/6e81878713
17:18 colomon rakudo: say 1 div 0
17:18 p6eval rakudo 678ad3: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3801:CORE.setting␤  in main program body at line 22:/tmp/K9GZeMkKbY␤»
17:20 Chillance joined #perl6
17:24 TimToady rakudo: say (1 div 0).perl
17:24 p6eval rakudo 678ad3: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3801:CORE.setting␤  in main program body at line 22:/tmp/Ww6Fxe4mvE␤»
17:24 TimToady I don't think that exception should be thrown
17:25 TimToady it should merely fail
17:26 sorear good * #perl6
17:26 TimToady o/
17:32 pernatiy left #perl6
17:33 bluescreen10 left #perl6
17:33 sorear TimToady: how do you feel about $cursor.new_match(:action("what to call"), :captures([$pair1, $pair2, $pair3]), :from(24), :to(42)) ?
17:34 TimToady not sure what :action means
17:35 sorear what action method to call, also what to put in .reduced
17:36 TimToady well, * works
17:36 pmichaud rakudo:  say (1/0).perl
17:36 p6eval rakudo 678ad3: OUTPUT«1/0␤»
17:37 TimToady but div can't return a Rat, so it needs to return a failure
17:37 pmichaud right -- I was just seeing what infix:</> did.
17:37 TimToady or an Inf mebbe
17:37 moritz rakudo: say (1/0e0).perl
17:37 p6eval rakudo 678ad3: OUTPUT«Divide by zero␤  in 'infix:</>' at line 3775:CORE.setting␤  in 'infix:</>' at line 3776:CORE.setting␤  in main program body at line 22:/tmp/stPDAl1spZ␤»
17:37 TimToady or -Inf for 1 div -0   :)
17:38 pmichaud which do you want, fail or Inf?  ;-)
17:38 * moritz wants Inf to be a special fail()
17:38 TimToady rakudo: say Inf.defined
17:38 p6eval rakudo 678ad3: OUTPUT«Bool::True␤»
17:38 moritz either fail('Cannot devide by zero') or fail('Number too large') or so
17:39 TimToady it's probably better if we just have a Failure, since it's really kinda ±Inf
17:39 pmichaud I did   fail "Cannot div by zero"   for now
17:39 sorear mildew: say "alive"
17:39 p6eval mildew: OUTPUT«sh: /home/mildew/perl5/perlbrew/bin/perl: not found␤»
17:39 pmichaud > say (1 div 0).perl
17:39 pmichaud undef
17:40 TimToady O_o
17:40 pmichaud I think our Failures currently perlify as undef
17:40 pmichaud rakudo:  sub f() { fail "because"; };   my $x = f();  say $x.perl;
17:40 p6eval rakudo 678ad3: OUTPUT«undef␤»
17:40 TimToady urque
17:40 pmichaud I'm open for changing that, of course :)
17:41 pmichaud > say (1 div 0).WHAT
17:41 pmichaud Failure()
17:41 TimToady it seems evil for .perl to throw away info
17:41 pmichaud I think there are some cases where it must throw away info
17:41 pmichaud unless/until we have a way to completely serialize a failure
17:41 TimToady it could try harder in this case :)
17:42 * colomon would grumble that that's exactly what the Rat spec asks .perl to do, but he's rather busy trying to make Math::BigInt handle negative numbers....
17:42 TimToady Perl is supposed to know how to deal with interesting values of undef, so .perl should too
17:42 smash left #perl6
17:43 thou hello, friends! anyone know the state of the art in documentation? I am *just* starting to read synopses and had the idea to perhaps improve whatever docu is around while I do that. i see p6 tablets, Perl6::Doc, etc., but all of them seem to be somewhat inactive. is there one place that's most likely to be useful for the community for me to put some effort?
17:44 pmichaud state of the art is pretty much the synopses, I think
17:44 moritz thou: the book "Using Perl 6" is the most up-to-date and maintained documentation apart from the synopsis
17:44 TimToady we need some normal user documentation though, like the p5 manpages
17:45 thou moritz, ok, i have been reading that, too. so Per6::Doc is dead at the moment?
17:45 TimToady fsvo "normal"
17:45 pmichaud aha.  Failure.perl ends up trying to perlify the underlying exception
17:45 pmichaud and Exception.perl is currently undef
17:45 TimToady we should make an exception for exceptions...
17:45 pmichaud not sure what it should be there
17:45 moritz thou: https://github.com/perlpilot/perl6-docs is not too active, but high quality - contributions would be highly welcome
17:45 lue left #perl6
17:46 moritz thou: Perl6::Doc is mostly software, not documentation
17:46 lue joined #perl6
17:46 thou yes, my personal (and very green) opinion is that i would prefer to work on something that eventually would be part of the standard core docs
17:46 pmichaud we could create a rakudo-doc repo and start it there
17:46 pmichaud or even perl6-man
17:46 moritz oh wait, I'm confusing things
17:46 pmichaud perl6-docs
17:47 moritz thou: when we'll compile a set of "core" docs, we will surely import from existing documentation
17:48 moritz thou: docs/u4x/ in the mu repo is an attempt to start "core" docs from scratch
17:48 pmichaud thou: I think that some people have also been waiting for some implementation of Perl 6 POD
17:48 moritz thou: contributions to any of the projects I mentioned so far are very worthwhile, and perl6-docs and u4x have good chances to become "official" to some degree
17:50 thou okay, that gives me some purchase on the scene. i'll have a look through what's in those two now, with an eye on augmenting them if i get a hit while traipsing through the synopses.
17:50 rblackwe left #perl6
17:50 thou thanks, everyone!
17:51 moritz you're welcome. Have fun!
17:54 yegor left #perl6
17:55 larks left #perl6
17:57 dalek book/first-example-more-robust: e83af18 | moritz++ | src/basics.pod:
17:57 dalek book/first-example-more-robust: [basics] further wording changes after the s/split/words/ refactor
17:57 dalek book/first-example-more-robust: review: https://github.com/perl6/book/commit/e83af18ca2
17:58 moritz I'd appreciate it if somebody could cast a quick look over that branch, and tell me if anything else needs updating
18:02 * PerlJam looks
18:03 fhelmberger_ left #perl6
18:05 mkramer1 joined #perl6
18:05 mkramer1 left #perl6
18:06 mkramer left #perl6
18:06 pernatiy joined #perl6
18:07 PerlJam I'm not sure what to do (if anything) about the repeated explanation for invocant, but it caught my eye.
18:07 PerlJam I guess it's not the same explanation each time, but it still seems a little redundant.
18:08 mkramer joined #perl6
18:10 thou left #perl6
18:28 mkramer left #perl6
18:38 mishnik left #perl6
18:47 pmichaud comment on exceptions draft:
18:48 pmichaud "All built-in exceptions live in the X:: namespace.
18:48 pmichaud "
18:48 pmichaud that seems somewhat reversed from practice in other applications, where the X_ prefix is typically used to denote the user-defined attributes instead of the builtin ones :-)
18:48 pmichaud or, more precisely, the X- prefix.
18:49 pmichaud X-My-Private-Header: ...
18:50 pmichaud also, where do control exceptions fit?
18:50 pmichaud are they completely outside of the X:: space?
18:51 MayDaniel joined #perl6
18:53 envi_ joined #perl6
18:54 ymasory joined #perl6
18:54 thou joined #perl6
18:55 envi_ left #perl6
18:57 envi left #perl6
19:04 risou is now known as risou_awy
19:07 [hercynium] joined #perl6
19:09 hercynium left #perl6
19:09 [hercynium] is now known as hercynium
19:09 sorear TimToady: Does the thing that STD.pm6:4699 do have a name?
19:10 sorear The _MATCHIFYr call takes an existing Match object, and then converts it in-place into a different sort of Match object
19:10 sorear s/«do»/does/
19:11 dalek std: a71faea | sorear++ | / (2 files):
19:11 dalek std: Switch :$*endsym to a trait
19:11 dalek std: review: https://github.com/perl6/std/commit/a71faead24
19:11 sorear diff $std_STD $niecza_STD | wc -l is now under 1400
19:13 hercynium left #perl6
19:16 Helios left #perl6
19:17 Helios joined #perl6
19:18 TimToady well, it used to do more, but now it looks like it's mostly just cutting away subsidiary xact states
19:19 birdwindupbird joined #perl6
19:23 masak joined #perl6
19:23 masak lol hi zebras
19:24 tadzik masak \o/
19:25 masak yes, we're returning in a happy condition. :)
19:26 pmichaud jnthn: ping
19:26 masak as it turns out, finanalyst isn't just a frinedly guy on IRC; he's also a friendly guy AFK. :)
19:27 jnthn pmichaud: pong
19:27 pmichaud lib/NativeCall.pm6:53  seems to claim that $!unmanaged is an UnManagedStruct, but to me it looks like it's a ResizableIntegerArray
19:27 pmichaud what am I mising?
19:28 pmichaud besides an 's' in "missing"?  ;-)
19:28 MayDaniel left #perl6
19:28 jnthn lemme look
19:28 pmichaud more broadly -- does zavolaj make use of UnManagedStruct?  Because that's been deprecated also.  :-)
19:28 masak jnthn and I have a neat way to solve the Bobby Tables problem, by the way. :) it involves making a Little Language out of SQL, which can then (1) be compiled at compile-time, and (2) interpolate variables with automatic escaping.
19:29 TimToady gee, we should do the same thing with regexen...oh wait...
19:29 jnthn pmichaud: I am just about sure it's an unmanaged struct.
19:30 pmichaud okay... where does the struct come from, then?
19:30 jnthn pmichaud: It's not the most elegant imaginable solution, but it works
19:30 pmichaud i.e., what creates the unmanaged struct?
19:30 spq joined #perl6
19:30 jnthn pmichaud: Well, at the time I implemented this at least, a plain old pointer coming back from C land got wrapped in one of those.
19:31 * pmichaud looks
19:32 jnthn pmichaud: UnmanagedStruct is going away too??
19:32 pmichaud eligible in 3.4, yes.
19:32 jnthn Fine. I'll just write my own NCI impl.
19:32 pmichaud http://trac.parrot.org/parrot/ticket/2035
19:32 pmichaud I was going to comment on this on the mailing list, but before bringing up UnManagedStruct I wanted to make sure we were actually using it
19:33 jnthn yeah, we are
19:33 pmichaud so I needed to figure out where it's coming from
19:33 jnthn See update-desc-to-index
19:33 jnthn And yes, it's evil, but it's the best we had. Apart from now that's getting taken away too :/
19:33 pmichaud I'm not at all remarking on quality-of-code here :)
19:33 pmichaud I actually think it's quite clever.
19:33 jnthn pmichaud: I meant the approach is evil. :)
19:34 pmichaud I actually think it's quite clever.
19:34 jnthn Those aren't opposites. :P
19:34 thou left #perl6
19:35 pmichaud okay, so are you saying that the dlfunc opcode (sometimes) returns an UnManagedStruct?
19:36 masak left #perl6
19:36 pmichaud no, wait
19:36 pmichaud the NCI pmc returns ....
19:36 pmichaud (dlfunc returns an NCI pmc)
19:36 jnthn no
19:36 jnthn the call to dlfunc when the return signature is a p will result in an UnmangedStruct
19:36 jnthn iii = pass two ints, get an int back
19:37 jnthn pii = pass two ints, get an UnmanagedStruct back
19:37 pmichaud dlfunc returns a Sub that returns a ...
19:37 pmichaud because dlfunc returns a Sub
19:37 pmichaud (that can be invoked)
19:37 masak joined #perl6
19:38 jnthn dlfunc returns something that can be invokved
19:38 pmichaud and that something is the thing that returns an unm ?
19:38 jnthn When invoked, that thing returns an UnmangedStruct
19:38 pmichaud got it
19:38 jnthn Depending on the signature
19:38 jnthn The first letter in the sig string is the return type.
19:38 pmichaud yes, I got that part
19:38 jnthn ok :)
19:39 sorear TimToady: _MATCHIFYr also calls _REDUCE, which calls the action method as well as setting up .reduced and .from
19:40 pmichaud jnthn: okay, I found what I needed.  Many thanks.
19:40 pmichaud Essentially, any nci thunk that has a 'p' as the return type in the signature is going to return an UnManagedStruct
19:40 pmichaud and afaict there's no alternative to that yet
19:41 jnthn pmichaud: That's so far as I understand too.
19:41 jnthn pmichaud: I also found today that the NCI thunk generator no longer works on Win32, and that the suggested workaround for "t" being gone won't either.
19:41 colomon ugh.
19:41 pmichaud I'm arguing that Parrot really needs a 't'
19:42 pmichaud it's completely silly to not have one
19:42 jnthn pmichaud: Becuase they both rely on dlfunc NULL, "sig" looking stuff up in the current executable
19:42 jnthn pmichaud: I totally agree.
19:42 jnthn pmichaud: There *is* a genuine issue of who is responsible for freeing the memory.
19:42 pmichaud even plobsing++ makes the case when he notes that pcre is pretty useless without the ability to process strings
19:42 jnthn e.g. does t free it after the call, or let the caller free it?
19:43 sorear derandomization of rand, removal of t - at what point do you plan to drop Parrot support from Rakudo?
19:43 pmichaud sorear: when we have a viable alternative, probably.
19:43 jnthn sorear: We don't yet ...what Pm said.
19:43 pmichaud that alternative might end up being called "niecza", though.  :-)
19:43 tadzik masak: will the hackathon continue, will there be more hacking?
19:44 jnthn tadzik: 2 days of conference now.
19:44 sorear hmm, I seem to be in a bad mood today
19:44 tadzik ok cool
19:44 sorear setting output filters to "extra strict"
19:44 masak tadzik: I've been boring all day. still hacking on my slides. :/
19:44 tadzik masak: another presentation software?
19:44 jnthn Yeah, I wanted to go drink vodka, but no, masak wants to do slides! ;)
19:45 sorear o/ masak
19:45 sorear TimToady: STD.pm6:5356 looks a little dubious to me
19:46 masak jnthn: wuh...? you never said... :)
19:46 masak sorear: \o
19:46 jnthn masak: :P
19:46 jnthn masak: 'sok, I actually kinda need a good night's sleep. :)
19:46 masak tadzik: amazingly, no. instead it's another round with Failure, my old system.
19:47 jnthn masak: You called a presentation system Failure?
19:47 masak yes...
19:47 tadzik what a Failure!
19:47 masak jnthn: you've seen presentations done in it several times, I'm sure.
19:47 sorear TimToady: $_ isn't localized by anything in find_stash, so it looks like it's making a very long-lived reference to the metaobject
19:47 masak it's actually quite nice. :)
19:47 sorear Is Failure the insane SVG one?
19:47 guru joined #perl6
19:48 masak no, that's Infinite Canvas.
19:48 masak this one does do some SVG transforms, but only in order to gradually build slides.
19:48 guru is now known as Guest53174
19:48 sorear .o( Is the step after Infinite Amount of Canvas, Black Hole? )
19:48 masak ooh :)
19:48 jnthn That'd suck...
19:48 tadzik and then it expands
19:48 masak you guys are so distracting. I'm trying to work here. :P
19:48 tadzik jnthn: yeah, but people will stick to it
19:49 jnthn Yeah, they'd get drawn in.
19:49 TimToady sorear: um, in Perl 6, $_ is supposed to be lexical.  maybe the p5 translator needs to emit a 'my $_' or some such?
19:49 diakopter bah dum
19:49 jnthn So...does my example language still work on latest nqp... :)
19:49 tadzik bah dum tss!
19:50 TimToady in honor of the .ru hackathon, perhaps we should avoid the term "black hole"?
19:51 diakopter unilarity
19:51 Guest53174 left #perl6
19:52 * TimToady also had to remember not to make the OK sign in Brazil last week...
19:54 nymacro left #perl6
19:54 birdwindupbird left #perl6
19:57 sorear TimToady: AIUI, $_ is lexical to UNIT:: in the absense of topicalizers
19:58 TimToady are you talking about p5 or p6?
19:58 sorear p6
19:59 masak TimToady: a question on the exact definition of "slang" in Perl 6: is it (1) any variation of the original MAIN/Q/Quasi/Regex/Trans/P5Regex languages, or (2) any sublanguage one might embed into Perl 6, original or not?
19:59 sorear default is equivalent in every way to "when *", right?
19:59 TimToady no
19:59 jnthn masak: If it's just an embedded language it might *not* be a sublanguage.
19:59 TimToady when * -> sig
19:59 TimToady must match sig
20:00 jnthn It may be a comletely different one.
20:00 Helios left #perl6
20:00 TimToady and $_ is supposed to be much more, er, lexical than just UNIT
20:00 sorear TimToady: what constructs introduce a new $_?
20:00 Helios joined #perl6
20:00 TimToady all of them
20:00 masak jnthn: I mean "embed" as in "the parser switches over to the sublanguage but carries the lexical surroundings with it", like the regex language does.
20:01 TimToady it just defaults to the OUTER, is the original idea, if there's no explicit topicalizer
20:01 jnthn masak: I was objecting to "sublanguage" mostly - I tend to read it as "a language which is a subclass of another language"
20:01 sorear TimToady: it defaults to *aliasing* the OUTER
20:02 cooper_ joined #perl6
20:02 masak jnthn: 'gather/take' wasn't introduced in S04. it was introduced in S12, in 2004.
20:02 sorear TimToady: { { { { { $_ = 5 } } } } }; say $_ # as STD inteprets it, this says 54
20:02 sorear *5
20:02 TimToady sub defs just start with $_ as undef
20:02 masak jnthn: oh! I should've said "little language". sorry.
20:02 pmichaud I think we decided that any Routine gets its own $_
20:03 Helios left #perl6
20:03 sorear pmichaud: is a Routine something you can return() from?
20:03 pmichaud although it may have been Sub
20:03 TimToady Routine is correct, and it's what you can return from
20:03 yegor joined #perl6
20:04 masak jnthn: oh, and interestingly, the only use of gather/take in A12 is non-lazy.
20:04 pmichaud I remember we also speculated that file scope would also introduce its own $_
20:04 masak jnthn: because it's being assigned to an array and then returned.
20:04 pmichaud I don't remember how that turned out
20:04 sorear pmichaud: whereas, non-Routines either use $OUTER::_ or the first argument ?
20:04 TimToady pmichaud: that doesn't work so well for -n and -p settings
20:04 pmichaud TimToady: makes sense
20:05 pmichaud non-routines act like   -> $_ is rw { ... }    iirc
20:05 pmichaud there are some exceptions
20:05 Helios joined #perl6
20:05 pmichaud sorry
20:05 masak jnthn: ah! I see now what you're saying. essentially that 'sublanguage' is to be understood as 'subclass', something derived from something that existed already.
20:05 pmichaud -> $_ is rw = $OUTER::_ ...
20:05 sorear -> $_ is parcel = $OUTER::_
20:05 jnthn masak: YES
20:05 jnthn oops
20:05 jnthn *yes
20:05 jnthn :)
20:05 masak jnthn: I SEE
20:06 pmichaud yes, could be "is parcel" now.  I'm still working from the summer 2010 mental model, I think.
20:06 * TimToady isn't sure which year he is in...
20:06 cooper_ is there/will there ever be an "official" perl 6 compiler/interpreter?
20:06 TimToady some kind of superposition, no doubt...
20:07 TimToady cooper_: there will be lots of them
20:07 cooper_ but not an official one?
20:07 TimToady there will be lots of official ones :)
20:07 masak cooper_: do you have an urgent need for an official one? :)
20:07 cooper_ no, why?
20:07 masak :D
20:07 pmichaud btw, after re-reading "The Innovator's Dilemma"  I'm going to start calling Rakudo "official"  :)
20:07 masak I suggest you try one of the underground, black market compilers in the meantime.
20:07 tadzik People seem to like formalisms
20:07 pmichaud I'm also thinking of calling it "production"
20:08 jnthn pmichaud: Yay, we can be the second one after Yapsi :)
20:08 masak pmichaud: +1
20:08 cooper_ so which one would most of you recommend?
20:08 masak "Yapsi, the *first* official compiler."
20:08 pmichaud "disruptive" means that we should be defining what we mean by "production"
20:08 TimToady cooper_: at the moment, rakudo is more feature complete, but rather slow
20:08 masak "disruptive" means we should be tearing things apart.
20:08 TimToady niecza is faster, but rougher
20:09 TimToady pugs is...stable...
20:09 masak Yapsi is extremely rough and very slow :P
20:09 cooper_ yeah, i've been playing with rakudo. it also seems to use a large amount of memory
20:09 pmichaud "tearing things apart" == "defining our own target market"
20:09 masak "masochists"
20:09 masak :P
20:09 TimToady cooper_: that's one of the reasons it's slow
20:10 masak cooper_: speed is the primary concern of the current work being done on Rakudo.
20:10 TimToady should help the memory footprint too
20:10 jnthn Indeed
20:11 jnthn The two are often interlinked.
20:11 pmichaud Rakudo has had a 10% speed improvement since the 2011.04 release.
20:11 jnthn Produce more garbage = use more memory and take time clearing it up again.
20:11 pmichaud I've been looking at call profiles lately.
20:12 jnthn pmichaud: Nice. Any surprising hot paths?
20:12 pmichaud The switch in Rat.pm to using a gcd() function instead of pir::gcd__III directly resulted in 10% more function calls in sin.t
20:12 cooper_ is now known as cooper
20:12 pmichaud (and no, that's not where the 10% improvement mentioned above comes from.  the 10% improvement is from an optimization in Parrot's GC)
20:13 pmichaud jnthn: I've been wondering how difficult/worthwhile it would be to add code to bind_llsig to report the number of times it's called from each Rakudo sub
20:13 pmichaud then we could have rakudo-sub-level-profiling, at least.
20:14 pmichaud since I don't think we'll get anything soon for Parrot-level-sub-counts
20:14 masak it would definitely be interesting. is it difficult to do?
20:14 masak oh, that's what you asked. sorry :P
20:15 pmichaud I've been trying to figure out what the correct output mechanism should be
20:15 pmichaud at one level, it could simply report the name of each sub as it's invoked
20:15 jnthn pmichaud: I may be able to do something better/easier in nom.
20:15 jnthn pmichaud: llsig can give number of times called but not time spent.
20:15 jnthn oh, that's what you wanted :)
20:15 pmichaud right
20:16 jnthn I thought you meant time spent :)
20:16 pmichaud I'd like that *too*, but that's much harder
20:16 jnthn pmichaud: Only so much.
20:16 pmichaud as a first cut just knowing number of times called would be a big benefit
20:16 jnthn *nod*
20:16 pmichaud even just knowing total number of calls (without knowing which subs) has been helpful
20:16 jnthn Should be trivial. Let me know what output you want.
20:17 pmichaud maybe just an option so that the name of each sub goes to a logfile, I'd guess.
20:17 pmichaud (as it's invoked)
20:17 pmichaud that gives us a rudimentary call chain, too.
20:17 pmichaud (doesn't show nesting, but...)
20:18 jnthn I'll see what I can hack up tomorrow when I'm failing to understand talks in Russian. :)
20:18 pmichaud okay
20:18 pmichaud I expect the file to get huge
20:19 jnthn *nod*
20:19 pmichaud as an example, for sin.t  Rakudo_binding_bind_llsig was called 277K times.
20:19 sorear pmichaud: you should make it output like %s\t%s\n for each call
20:19 jnthn That's OK,  we can process it
20:19 jnthn omg what.
20:19 jnthn pmichaud: OK, I want to know what we're calling :)
20:19 sorear pmichaud: where the first string is the *current* function, and the second is the function being called
20:19 starcoder TimToady: Rakudo's RAM usage is about triple OpenJDK JVM's for me :p
20:20 starcoder well, nearly triple, anyway
20:20 pmichaud sorear: by the time we get to bind_llsig, we're already in the called function.  so we can output the name of the current sub and the name of the caller
20:20 sorear pmichaud: once you've done that, you can pipe the output file through perf/call-log-analyze.pl in the Niecza repository
20:20 pmichaud but the name of the caller isn't necessarily a rakudo sub
20:20 masak oh, S12 says gather/take might have a lazy context. so lazy gather/take was on the horizon from the start.
20:20 pmichaud we could walk up the caller chain and find the nearest rakudo sub, I guess.
20:20 jnthn could, yes
20:21 pmichaud jnthn: oh, if you want to output subid instead of / in addition to sub name, that's fine also.
20:21 pmichaud subid could be more unique
20:21 jnthn true but also less meaningful :)
20:21 colomon ideally you want the number of times a sub is called, and who called it, right?
20:21 pmichaud colomon: I'm trying to avoid having the perfect be the enemy of the good
20:22 pmichaud just knowing the total number of calls to all subs was a big help for finding the gcd issue :)
20:22 sorear colomon: he gets that for free if he makes the output format %s\t%s\n
20:22 pmichaud I agree with all of the suggested improvements, yes.
20:22 jnthn pmichaud: Doing what sorear is suggesting is probably easy enough.
20:22 pmichaud but since I'm not the one implementing, I don't want to say "do this" if it makes the problem significantly harder
20:23 pmichaud I think that's one of the reasons parrot is stuck without a profiler -- nobody wants to add anything if it doesn't have, well, everything.
20:25 pmichaud I *am* curious to know the distribution of those 277K rakudo-sub-calls, though.  :-)
20:26 pmichaud jnthn: subid is less meaningful yes but relatively easy to look up
20:26 pmichaud also, for methods it's more useful than simply just ".perl"
20:26 pmichaud or "Str"
20:27 masak I wonder if the call tree can be inferred given some knowledge about the dependencies between subs...
20:27 colomon sorear: I appear to have missed an entire screen of the conversation when I posted.  :)
20:28 wknight8111 left #perl6
20:29 pmichaud maybe  subid + name is a useful key
20:29 sorear $_ = 1; if True { $_ := 2 }; say $_; # What do people expect to see here?
20:29 masak sorear: 2
20:29 pmichaud 1
20:29 pmichaud (because of the rebind)
20:29 masak oh!
20:29 masak yes.
20:29 colomon pmichaud: can you easily generate that 277k rakudo-sub-calls information?  I can suggest some simple experiments which might go a long way toward figuring out where they are coming from.
20:29 noganex joined #perl6
20:30 pmichaud colomon: it's not too hard, no.
20:30 pmichaud it take longer for a run, though.
20:30 pmichaud *takes
20:30 masak well, wait. do 'if' blocks have their own $_ ?
20:30 masak they don't topicalize...
20:30 pmichaud the curlies get their own $_, iirc
20:30 jnthn masak: All blocks do
20:30 colomon pmichaud: if you can tell me how to do it, I can experiment here.  or I can give suggestions for experiments to you.
20:31 pmichaud colomon: basically, I run perl6  with valgrind, then use kcachegrind to determine the number of calls to Rakudo_binding_bind_llsig
20:31 starcoder is now known as starparrot
20:31 pmichaud there are probably other surrogates that could be used (perhaps number of invocations of the bind_llsig op)
20:32 colomon pmichaud: oh!  so gprof can probably do the same thing, no?
20:33 pmichaud colomon: if you want to get parrot + rakudo compiled with profiling enabled, yes.
20:33 starparrot is now known as starcoder
20:33 pmichaud and I suspect that becomes incredibly slow.
20:33 noganex_ left #perl6
20:33 pmichaud (I'd be happy to be proved wrong about this.)
20:33 colomon pmichaud: actually, I'll bet it's a lot faster than valgrind -- but it's surely much harder to set up, too.  good point.
20:33 pmichaud well, I'm thinking not only the time to run the perl6 program, but the time needed to build parrot, nqp, and rakudo.
20:33 colomon pmichaud: so you're doing valgrind --tool=callgrind  ?
20:34 pmichaud since all of those end up being profiled, iiuc.
20:34 pmichaud I suppose if we get just libparrot compiled with -pg it's not quite so bad
20:34 masak left #perl6
20:34 pmichaud (and perl6 executable, of course)
20:35 pmichaud colomon: alias cg='time valgrind --tool=callgrind --dump-instr=yes --trace-jump=yes'
20:35 pmichaud cg ./perl6 t/spec/S32-trig/sin.t
20:35 colomon pmichaud++
20:35 pmichaud kcachegrind callgrind.out.*
20:36 sorear I guess to make $_ work properly I'll need some kind of OUTER:: support
20:36 dalek niecza: 777dc18 | sorear++ | src/niecza:
20:36 dalek niecza: Ignore () signatures on protoregexes
20:36 dalek niecza: review: https://github.com/sorear/niecza/commit/777dc18471
20:37 pmichaud sorear: that was our experience, yes.
20:38 mtk left #perl6
20:41 pmichaud hmmm, for some reason it didn't occur to me that I could use subid to index into a hash at runtime and keep the counts there.
20:41 pmichaud then just output the hash at the end.
20:41 pmichaud (and can have a second hash with the subid->Sub mapping, to be able to produce real signatures)
20:41 jnthn :)
20:42 pmichaud jnthn:  if you can get the basic idea going, I'm sure I can add enhancements :)
20:42 pamera left #perl6
20:42 jnthn :)
20:42 pmichaud I could probably do the basic implementation too; I just didn't know how I wanted to enable/disable/specify log file/etc.
20:43 pmichaud afk for a bit
20:43 flussence argh
20:44 flussence I spent an hour staring at the valgrind manpage looking for how to profile stuff the other day
20:44 flussence it doesn't list --tool anywhere :(
20:46 tylercurtis flussence: that's odd. On the machines on which I've used it, it does.
20:46 flussence searching for "--tool" comes up with nothing...
20:46 jnthn sleep &
20:47 flussence it's v3.6.1, if that makes any difference
20:49 jlaire joined #perl6
20:49 colomon flussence is right, at least on my Linux install -- valgrind man page talks about other tools, but never mentions --tool=.  Weird.
20:49 thou joined #perl6
20:51 tylercurtis sorear: CATCH isn't yet implemented in niecza. Is there any way to work around this? (Being able to recover from syntax errors and such in the niecza REPL would be quite convenient, but not worth losing error messages.)
20:55 leprevost left #perl6
20:56 sorear tylercurtis: you can catch errors using try {} and then inspect $!
20:57 dalek niecza: 00f93bd | sorear++ | / (2 files):
20:57 dalek niecza: Implement default { } blocks
20:57 dalek niecza: review: https://github.com/sorear/niecza/commit/00f93bdf72
20:58 Mowah left #perl6
20:58 tylercurtis sorear: great.
20:58 sorear tylercurtis: the main reason the REPL doesn't use try is because try loses stack trace information
20:59 sorear I'm waiting for moritz++ to finish designing exception objects
20:59 sorear right now what you get out of try is exactly what you put into die
20:59 sorear usually a Str
21:01 yegor left #perl6
21:05 spq left #perl6
21:06 * pmichaud figures out how he wants to instrument bind_llsig, and begins.
21:23 dolmen joined #perl6
21:25 bacek left #perl6
21:25 kjeldahl joined #perl6
21:26 rainerschuster joined #perl6
21:38 whiteknight joined #perl6
21:41 * sorear back from walk
21:41 sorear it looks like my next priority should be making it possible to inline blocks with dynamic variables, then making $_ dynamic
21:44 zamolxes left #perl6
21:45 zamolxes joined #perl6
21:46 bluescreen100 left #perl6
21:51 Helios left #perl6
21:51 Helios joined #perl6
21:57 rainerschuster left #perl6
22:01 sorear also need a new sigelem flag for init_from_outer_topic, and a new outerlex op
22:02 sorear this reminds me I also need a unified system to handle both $Package::foo and $OUTER::foo, but that's too much for today.
22:07 dolmen left #perl6
22:16 kjeldahl left #perl6
22:16 donri left #perl6
22:22 * colomon doesn't seem to have kcachegrind installed.  :(
22:22 ymasory left #perl6
22:23 flussence it's a kde thing
22:23 flussence not part of the core apps iirc
22:26 Helios left #perl6
22:26 keeth joined #perl6
22:27 Helios joined #perl6
22:27 colomon hmmm, maybe callgrind_annotate?
22:30 sorear you want kcachegrind
22:30 sorear it's not part of valgrind; it's a third party app
22:30 sorear it's called *k*cachegrind because it's based on libqt
22:31 sorear it's a profile visualizer
22:31 dsouza is now known as servente
22:32 colomon errr... is there a reason callgrind_annotate isn't a perfectly functional command-line replacement for this usage?
22:33 colomon I believe it's telling me there are 66mil calls to Rakudo_binding_bind_llsig (which is admittedly quite different from what pmichaud saw).
22:33 colomon that's in a run of sin.t
22:33 sorear presumably pmichaud tried it and it didn't work...?
22:36 colomon I'm sure kcachegrind is better if you have it handy.  but the machine I'm using is a headless box which doesn't have it installed, which seems like two strikes against it.
22:36 flussence but... shiny! :)
22:37 pmichaud afaict, callgrind_annotate only describes the number of instructions run... it doesn't give the number of calls
22:37 servente is now known as dsouza
22:37 colomon ah
22:39 colomon hmmm
22:39 pmichaud but yes, when I run it, I get a number of 73 million
22:39 pmichaud so I think that means that Rakudo_binding_bind_llsig ran 73 million instructions
22:39 pmichaud (inclusive of subroutines)
22:40 [Coke] left #perl6
22:40 colomon so I'm in the right ballpark there, anyway.
22:40 colomon I'm install kcachegrind on my mac, we'll see if that works.  :)
22:40 pmichaud I'm getting pretty close to having a counter/tracer in bind_llsig
22:40 pmichaud (had to take for a very important family Monopoly(TM) game)
22:41 pmichaud *take a break
22:41 colomon I just had to change a siding to the mainline so that Thomas and the Santa Fe Super Chief don't get lost.  :)
22:41 [Coke] joined #perl6
22:42 pmichaud Santa Fe Super Chief?
22:42 nebuchadnezzar good night guys
22:42 nebuchadnezzar SIGBED
22:42 pmichaud g'nite
22:44 colomon pmichaud: our wooden train layout includes several non-Thomas trains, including the Little Blue Engine (That Could) and a pair of circa-1950 Santa Fe diesel engines that Henry calls the Super Chief (since the look like the engines that pulled the Super Chief).
22:44 pmichaud ah, that makes more sense :)
22:44 pmichaud pmichaud@kiwi:~/rakudo$ wc -l bind.log
22:44 pmichaud 262634 bind.log
22:45 pmichaud looks like it works, and agrees closely with kcachegrind :)
22:45 pmichaud now to make it have more useful information than just a "count"
22:45 rainerschuster joined #perl6
22:45 colomon you said 277K before?
22:45 pmichaud This time I'm counting calls to bind_llsig (the opcode) rather than Rakudo_binding_bind_llsig
22:46 colomon ah, so slightly different?
22:46 pmichaud yes
22:46 pmichaud especially if there are nested sig bindings or things like that
22:46 [Coke] left #perl6
22:46 pmichaud or places where a binding fails and has to be retried, or ....
22:46 pmichaud I figure bind_llsig is a little closer
22:46 pmichaud although perhaps I should only count when the bind succeeds
22:48 [Coke] joined #perl6
22:48 pmichaud I think I'll count only the successful binds
22:49 colomon gack.  have kcachegrind slowly building on my mac, and my second callgrind run running slowly on my Linux box.
22:49 pmichaud so, perhaps 262K bind is more accurately described as 262K binding *attempts*... it doesn't mean they all actually succeeded
23:04 ymasory joined #perl6
23:09 _jaldhar joined #perl6
23:23 Exodist left #perl6
23:30 pernatiy left #perl6
23:40 keeth left #perl6
23:42 rainerschuster left #perl6
23:49 cdarroch left #perl6
23:59 Helios left #perl6
23:59 Helios joined #perl6

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

Perl 6 | Reference Documentation | Rakudo