»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 bluescreen__ joined 00:02 keeth left 00:04 benabik joined 00:20 Moukeddar joined
sorear good * #perl6 00:23
00:31 athomason left 00:32 athomason joined 01:14 beppu left 01:15 mtk left 01:19 alester left
sorear TimToady++ # making STD self-aware 01:19
01:24 mtk joined
sorear Why is $` considered a problem, but not $/.orig.substr(0, $/.from) ? 01:33
TimToady $` doesn't know what the last pattern was, so pessimizes any pattern match in the whole program 01:35
01:58 bluescreen100 left 01:59 bluescreen__ left, bluescreen10 left 02:02 whiteknight left 02:06 cotto joined 02:08 beppu joined 02:16 cotto left 02:17 woosley joined 02:31 araujo joined 02:35 cotto joined 02:44 cooper joined 03:03 Moukeddar left 03:04 agentzh joined 03:13 pamera joined
Khisanth still? O_o 03:22
03:26 Su-Shee left 03:28 Su-Shee joined 03:52 wooden left 03:54 jaldhar left 03:55 geekosaur left, jaldhar joined 04:11 geekosaur joined 04:12 kaare_ joined, formalin14 joined 04:21 kaare_ left 04:22 nymacro joined 04:24 envi joined 04:41 satyavvd joined
sorear Khisanth: ? 04:53
05:05 sftp joined 05:21 birdwindupbird joined 05:28 mkramer left 05:29 mkramer joined
sorear std: q{foo} 05:31
p6eval std b9c20c5: OUTPUT«ok 00:01 112m␤»
05:32 jaldhar left
dalek d: 69bef71 | sorear++ | / (2 files):
Remove use of $*ORIG in STD.pm6
05:36
cxreg had minidbi broken then?
05:37 birdwindupbird left 05:38 jaldhar joined
sorear cxreg: ??? 05:41
cxreg i just saw it was removed from last month's r*
05:43 jaldhar left 05:44 Tedd1 joined 05:47 birdwindupbird joined 05:51 wtw joined 06:02 wamba joined 06:03 sftp left 06:07 Helios left 06:12 Helios joined
sorear std: "aab" ~~ token { a* ab } 06:19
p6eval std b9c20c5: OUTPUT«Potential difficulties:␤ 'token' declaration outside of grammar at /tmp/RPh5mJ8W0O line 1:␤------> "aab" ~~ token ⏏{ a* ab }␤ok 00:01 115m␤»
sorear std: $¢ 06:20
p6eval std b9c20c5: OUTPUT«===SORRY!===␤Variable $¢ is not predeclared at /tmp/QURYEuuoB9 line 1:␤------> <BOL>⏏$¢␤Check failed␤FAILED 00:01 112m␤»
sorear TimToady: updating STD broke niecza's tests due to the latter
06:22 JimmyZ joined
JimmyZ tell jnthn conference.perlchina.org/bjpw2011/ 06:23
sorear phenny:
JimmyZ phenny: tell jnthn conference.perlchina.org/bjpw2011/
sorear perhaps msg
JimmyZ phenny: msg jnthn conference.perlchina.org/bjpw2011/
:(
sorear phenny: tell JimmyZ test 06:24
phenny sorear: I'll pass that on when JimmyZ is around.
sorear I guess it only works for me
JimmyZ phenny: tell jnthn conference.perlchina.org/bjpw2011/
phenny JimmyZ: I'll pass that on when jnthn is around.
JimmyZ: 06:24Z <sorear> tell JimmyZ test
JimmyZ space bug
sorear oh, hah
JimmyZ bye 06:25
06:25 JimmyZ left
perigrin phenny is very picky about the prefix 06:25
he had a space in his first attempt 06:26
06:31 thou joined 06:33 finanalyst joined, satyavvd left
dalek ecza: 1ec7256 | sorear++ | / (2 files):
Update to latest STD

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