#parrot Parrot 2.2.0 "Like Clockwork" Released! | parrot.org/ | Channel log: irclog.perlgeek.de/parrot/today | Improve Rakudo rx and buildtime performance | Fix HLL bugs (TT #389, #1040) | Prioritize Rakudo Needs and roadmap items
Set by moderator on 30 March 2010.
00:00 snarkyboojum_ joined 00:10 Whiteknight joined
Whiteknight good evening, #parrot 00:18
00:36 tcurtis joined 01:03 abqar joined, snarkyboojum joined 01:05 elmex joined, preflex joined, darbelo joined, hercynium joined, cotto joined, cotto_work joined, jjore joined, theory joined, eternaleye joined, lucian joined, Coke joined, Patterner joined, pjcj joined, ascent joined, jan joined, cosimo joined, mj41 joined, wagle joined, silug joined, ingy joined, zostay joined, frodwith joined, rhr joined, szabgab joined, Maddingue joined, tcurtis joined 01:07 hudnix joined, jsut joined, tetragon joined, pmichaud joined, janus joined, Util joined, Essobi joined, slavorg joined, sorear joined, PacoLinux joined, sjn joined, jhelwig joined, ttbot joined, zibri joined, moritz joined 01:32 hermes_ joined 01:33 leprevost joined
kid51 Does anyone know if *any* Parrot-related proposal was submitted for YAPC::NA? (today was deadline) 01:52
01:55 Psyche^ joined 02:15 hicx174 joined 02:17 ash_ joined 02:36 janus joined 02:37 kid51 joined
dalek rrot: r45364 | jkeenan++ | trunk/config/auto/arch.pm:
Apply patch with approach suggested by AndyD re �trac.parrot.org/parrot/ticket/1504.
02:45
02:50 JimmyZ joined, ash_ joined
dukeleto msg kid51 i put in a YAPC::NA proposal about Blizkost 02:53
purl Message for kid51 stored.
sorear D: 02:55
dukeleto sorear: howdy 03:04
sorear should I be scared
dukeleto sorear: scared about what? 03:05
sorear this YAPC::NA Blizkost thingie
hmm, looks like getting Blizkost to the point where it can handle Tk will actually not involve that much more work
sorear notes the Parrot Tk grant failure 03:06
dukeleto sorear: i have not heard about the Parrot Tk grant failure, link? 03:07
sorear: it will just be a talk to let people know what we have been hackign on, where we are going and how they can get involved
sorear: and basically tell people that Perl 5 and Perl 6 are not totally disjoint communities 03:08
sorear dukeleto: news.perlfoundation.org/2010/03/gra...ss_in.html
dukeleto sorear: ah, so that is kind of old news, but recently floated to the top :) 03:19
03:21 leprevost joined
sorear Kind of old news? 03:21
2010/03
purl 670
JimmyZ Where is the new news? 03:22
:)
dukeleto sorear: i guess i meant that the grant was awarded a long time ago, but the news is new :) 03:23
03:25 bubaflub joined
dukeleto bubaflub: how are the gsoc apps coming along? 03:33
03:33 Mokurai1 joined
bubaflub dukeleto: i haven't done my second round of apps yet; my class was cancelled for thursday so i might do em then 03:33
though i don't really know anything about the parrot to RTEMS port
so i'll probably need to chat with ya about the status of that to help scope out the proposal 03:34
sorear Does NQP have any concept of module imports? 03:57
dalek rrot: r45365 | petdance++ | trunk/src/pmc/integer.pmc:
Fixed return flags on a func, and removed unused func
04:08
04:16 mj41_ joined 04:38 Andy joined
dukeleto bubaflub: www.rtems.com/wiki/index.php/Parrot_On_RTEMS 04:41
bubaflub dukeleto: great. what would be a good goal for 2 months work? 04:48
dukeleto bubaflub: good question. i think you should ask on the rtems mailing list and/or #rtems on freenode 04:49
Coke -> 04:50
msg cotto t/profiling/profiling.t (Wstat: 0 Tests: 12 Failed: 4) 04:52
purl Message for cotto stored.
sorear purl, kakapo 04:56
purl kakapo is, like, a program framework, runtime library, and collection of useful functions for NQP programs. or See code.google.com/p/kakapo-parrot/ for documentation and issue tracking, or gitorious.org/kakapo for source code
dalek rrot: r45366 | petdance++ | trunk (3 files):
fixing up a ton of function args
04:57
bubaflub dukeleto: i'm heading to bed here shortly but i'll hit up the IRC and list tomorrow 05:22
dukeleto bubaflub: +1 05:23
purl 1
dukeleto purl, go play in traffic
purl wanders off to dent some cars.
05:23 chromatic joined 05:34 Psyche^ joined
dukeleto what is the least crazy way to print the contents of a RPA from C? 05:38
sorear ($P1 :slurpy, $P2 :slurpy :named) = $P0() 05:45
.return ($P1 :flat, $P2 :flat :named)
ummm....
I love this code
cotto Coke, where is that? 05:47
dalek izkost: d1f979c | sorear++ | examples/tk.pl:
Add a Tk example (not yet working)
05:48
cotto Can someone on windows tell me if any t/profiling/profiling.t tests fail there? 05:52
cotto gets ready to disbelieve every news story published tomorrow 05:53
dalek izkost: 3f144cd | sorear++ | perl5.pir:
Actually use tailcalls instead of slurpy return copying...
05:54
chromatic ... thus demonstrating why CPS. 05:58
06:03 hudnix joined
sorear chromatic: How so? 06:05
chromatic It's super easy to package up the results of one call as the arguments to another. 06:06
06:09 davidfetter joined
dukeleto chromatic: what do you recommend for printing the contents of an RPA from C? 06:10
chromatic VTABLE_get_repr() 06:13
06:50 hudnix joined 06:56 fperrad joined
dalek parrot: edde9f2 | dukeleto++ | plparrot.c:
Naive float argument marshalling
06:57
sorear purl, partcl? 06:59
purl well, partcl is tcl on parrot or code.google.com/p/partcl
cotto msg coke Where are those profiling failures happening and which tests are failing? 07:04
purl Message for coke stored.
07:14 iblechbot joined 07:16 fperrad_ joined 07:26 bacek joined 07:45 fperrad_ joined 07:49 fperrad joined 07:54 JimmyZ joined
bacek aloha 08:05
chromatic morning 08:07
Have you run callgrind on the avl_string_cache branch? 08:10
08:13 he_ joined
bacek chromatic, nope. I didn't have time (yet) 08:13
Do you have any specific benchmarks?
chromatic Hello, world in Perl 6 is good as it loads a lot of PBC files with many duplicate strings. 08:14
It's some 11% slower on the branch, and most of the extra cost is performing memcmp.
bacek hmm... 08:16
chromatic I think because it's calling memcmp for 10 out of the 12 levels. 08:17
bacek but memcmp on optimized build should be pretty fast. 3-4 CPU instructions. 08:18
If GCC didn't break this optimization...
chromatic My profile says it calls bcmp, which I didn't expect.
bacek bcmp is valgrind replacement 08:19
(for memcmp)
chromatic That explains it.
purl Damn right it does.
bacek which isn't particulary fast due range checks
purl: 2**12 08:20
purl 4096
bacek about 4k strings.
order of magnitude more than before 08:21
chromatic valgrind.org/docs/manual/faq.html#faq.aliases 08:23
bacek ah...
interesting. 08:24
chromatic Maybe glibc isn't optimizing it. 08:26
bacek 37fc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 08:28
this is compiled code.
let me check something
chromatic, wanna joke? 08:30
try remove checks for encoding and charset and rerun valgrind
chromatic Will do.
7.933% faster 08:32
bacek yes. 08:33
chromatic That's one seriously skewed tree.
bacek gcc optimizer just bailed out on this function and put call to function instead of doing "repz cmpsb"
chromatic Yep, no bcmp there now. 08:35
nopaste "bacek" at 114.72.185.179 pasted "string/api.c patch for chromatic" (38 lines) at nopaste.snit.ch/20152 08:36
bacek chromatic, try this patch. It enforces separate call to __memcmp (note not static) which is properly optimized
chromatic Does that make a difference? 08:37
Slightly more expensive than without the encoding checks. 08:39
bacek comparing to original code? 08:41
chromatic 5.788% faster than the original code.
bacek sigh... "Optimization is hard, lets go shopping" 08:42
bloody gcc...
chromatic Yeah, marking __memcmp static undoes all of the goodness. 08:43
bacek exactly... 08:44
It generates same code as original 08:45
Do we use -march/-mcpu in optimized builds? 08:46
chromatic I don't see it. I'm using -O3. 08:47
bacek justin.harmonize.fm/index.php/2009/...ng-memcmp/ 08:48
chromatic -march and -mtune do help. 08:54
bacek not in this case... 08:57
gcc just generate slightly better code
chromatic 2.18% better if I recompile with those both set.
bacek you march only (it implies mtune) 08:58
you have to compare with trunk build with march
built 08:59
chromatic Right.
bacek which version of gcc?
chromatic 4.4.1 09:00
bacek 4.4.3 09:01
almost same in terms of optimization
chromatic trunk is still 5.53% faster 09:07
09:09 bacek_ joined
bacek_ -minline-all-stringops ftw 09:09
09:16 fperrad joined
bacek chromatic, we can't beat hash. 09:21
hashing string will require less CPU cycles than ~8 memcmps
chromatic That's why I think we shouldn't do memcmps. 09:22
bacek but... how?
chromatic We only have to compare one character at a time to figure out left, right, or compare more. 09:23
bacek It's what "repz cmpsb" do 09:24
chromatic Could we rewrite the recursive node searching into an iteration? 09:25
bacek chromatic, we can throw this AVL implementation away... It's not perfect in any sense. 09:26
chromatic It's fairly generic, and we can make it more specific.
bacek yeah.
(I don't think that manual iteration will help. Modern gcc should be pretty good in TCE) 09:27
But we can at least make all this functions static
chromatic And not call them through function pointers. 09:28
Before we go too far with this though, we should figure out why our memory fix for Rakudo slows things down. 09:30
We run the GC a lot more often for some reason.
nopaste "bacek" at 122.110.75.224 pasted "non-recursive TREE_FIND" (45 lines) at nopaste.snit.ch/20153 09:33
bacek (GC) because we allocate much more strings...
We do need immutable strings. 09:34
chromatic I don't think we do.
bacek Or at least rewrite str_replace to be immutable in all cases. Which will imply "deprecation" period
chromatic At least, I made one small change and we don't seem to.
Almost no measurable difference with the iterative version. 09:35
bacek exactly... TCE optimzation... 09:37
chromatic bacek: wgz.org/chromatic/tmp/mem_fix_callgrind.tar.bz2 09:59
If you can use Kcachegrind, you should see some differences.
bacek hang on 10:02
2M more PMCs???
chromatic Isn't that strange?
bacek it's... impassible
chromatic This is r45314 versus r45315. 10:03
bacek actually no
it's same amount of PMCs
moritz is that what makes rakudo compilation so slow? (and parsing) 10:04
bacek we just invoke GC more ofter.
or just more
chromatic Twice as much, it appears.
Patrick and I talked about a substring match with offset op; he's considering whether that would help. 10:05
moritz but why, when you use less memory?
bacek interesting. 10:07
gc_trace_roots invoked 460 vs 397 times
not so much difference
Generational GC ftw? 10:08
chromatic Yeah, those string headers live a LONG time.
There's so little reason to copy the buffers around, because the pool stays so full. 10:10
bacek Open gc_trace_root
Check callers
find Parrot_concat_p_p
This is major slowdown (with stupid GC)
And it was main point of impact by change 10:11
chromatic Anything that calls Parrot_str_append or Parrot_str_concat will show it. 10:13
I found the bug by looking into Parrot_str_append.
bacek Heh. There is no "append" in "before" 10:15
chromatic Lots more Parrot_gc_reallocate_string_storage calls. 10:17
1/3 more. That's a big difference.
All from Parrot_str_append. 10:18
Ah, the comment on line 604 explains it. 10:19
I have a crazy idea.
nopaste "chromatic" at 173.50.130.127 pasted "bacek: this is ugly, but ..." (12 lines) at nopaste.snit.ch/20154 10:21
chromatic It's all about knowing your access patterns.
bacek chromatic, it's... weird 10:22
chromatic Yeah, it's not quite right. 10:23
On line 519, we need to reify the COW string and also allocate enough space to hold what we're going to append to it.
bacek Better solution.
purl hmmm... better solution is to deny access to assholes
bacek Don't use str_copy/write_COW 10:24
Just allocate new non-COWed string which is big enough.
And it will be much faster due avoiding useless work
chromatic Okay, I can imagine that. 10:25
JimmyZ chromatic: Hello 10:33
purl hi, JimmyZ.
JimmyZ chromatic: use.perl.org/~chromatic/journal/40284, I guess phone date is wrong. 10:35
chromatic Will fix, thank you (mj41 noticed too).
JimmyZ Welcome. bye. 10:36
10:38 payload joined
chromatic moritz, please try this new version with Rakudo. 10:39
moritz chromatic: I will, once I get home... in some 6 hours or so :/ 10:40
can't try it here :(
10:42 iblechbot joined
bacek immutable string ftw... 10:42
dalek rrot: r45367 | chromatic++ | trunk/src/string/api.c:
[str] Optimized Parrot_str_concat() to avoid making a COW STRING of the wrong

proper size runs the GC a lot less.
10:43
chromatic Yep, that did it.
10:44 clinton joined
chromatic I touched src/gen/core.pm and rebuilt all in Rakudo, and it took ~2 minutes, which is a lot better than ~10. 10:44
moritz aye 10:46
chromatic++
bacek++
bacek chromatic, core.pm down to 1:44 from about 10 minutes on my box. Hooray! 10:48
chromatic We should look at other places we make COWs to see if they suffer similar problems. 10:49
bacek Or kill COW... 10:50
C'mon. It's few days work
:)
chromatic Shared buffers are good. It's mutable STRINGs that are the problem, and we'd likely suffer similar naïveté of implementation!
bacek I don't disagree with shared buffer. 10:51
10:59 payload joined 11:06 hudnix joined 11:11 hudnix joined
bacek chromatic, ping 11:25
dalek kudo: 0dcfc67 | (Solomon Foster)++ | src/core/Any-num.pm:
Rewrite Any.abs to dispatch to the proper Numeric role.
11:26
TT #1540 created by bacek++: Current COW strings to be replaced with immutable version. 11:31
TT #1540: trac.parrot.org/parrot/ticket/1540
rrot: r45368 | bacek++ | trunk/DEPRECATED.pod:
Deprecate COW strings.
11:34
11:45 mikehh joined
dalek rrot: r45369 | mikehh++ | trunk/src/library.c:
fix codetest failure - line length - src/library.c (ignoring CONST_STRING - needs fixing)
11:50
kudo: a1a04af | jonathan++ | build/PARROT_REVISION:
Bump to latest Parrot that includes build performance improvements.
11:55
12:02 whiteknight joined
fperrad bacek, branch avl_string_cache is ok with mingw, see smolder.plusthree.com/app/projects/...ails/32956 12:04
bacek fperrad, thanks. 12:05
whiteknight good morning, #parrot 12:07
bacek good night, #parrot 12:08
bacek going offline for 4 days
12:10 JimmyZ joined 12:14 ruoso joined 12:16 lucian joined
whiteknight Bacek? Offline for 4 days? nooooooooooooooooooooo!!!!!!!!!!!!!!!!!!!!! 12:18
bacek Mandatory robot's maintenance procedure. 12:19
after it I'll probably implement immutable strings in couple of hours. 12:20
And generational GC in few days.
But for now - good night. 12:21
And Happy Easter.
whiteknight bacek: We won't have any GSoC projects left! 12:22
bacek never understand human's idea about "holidays" based on simple reboot sequence.
whiteknight happy easter (see you later! Goodnight)
bacek whiteknight, no. You will not have GSoC ideas left. Not projects :) 12:23
see you!
dalek rrot: r45370 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
[distutils] refactor (_mk_path_exe & _mk_path_installable)
12:39
Coke msg cotto - the profiling failure happened on OSX 10.6 12:43
purl Message for cotto stored.
12:45 Mokurai1 joined 12:50 khairul joined
mikehh post-config test failure - t/steps/auto/arch-01.t - Failed test: 30 12:54
codetest failure - t/codingstd/pir_code_coda.t - for file t/profiling/profiling.t which is in fact nqp so the test is wrong
all other tests PASS (pre/post-config, make corevm/make coretest, smoke (#32959), fulltest) at r45369 - Ubuntu 10.04 beta amd64 (g++ with --optimize)
dalek rrot: r45371 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
[distutils] fix _mk_path_installable when subdirectory
12:55
12:56 atrodo joined
nopaste "coke" at 72.228.52.192 pasted "purl: msg cotto about this nopaste of profiling/profiling.t" (23 lines) at nopaste.snit.ch/20155 13:00
Coke suspects that didn't work as intended.
whiteknight Coke++ # "A" for effort 13:01
dalek kudo: b3e08f9 | jonathan++ | src/Perl6/Grammar.pm:
Add totally awesome error message for foreach.
13:07
rrot: r45372 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
[distutils] EXPERIMENTAL
13:13
13:19 patspam joined
Coke www.flickr.com/photos/franck_/sets/...447857405/ - github relationship graphs, including a few for the perl communities there. 13:24
atrodo I thought that was the coolest thing 13:25
dalek rrot: r45373 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
[distutils] missing part of r45370
13:29
13:54 riffraff joined 14:10 lucian joined 14:16 bubaflub joined 14:20 payload joined 14:22 GodFather joined 14:24 jsut|work joined 14:36 jan joined 14:45 theory joined 15:00 ash_ joined 15:10 Andy joined 15:14 khairul joined
Coke Andy: Morning. 15:14
Andy hoqsy
howdy even
Coke alpha? 15:18
purl I am the Alpha and the Omega, the begining and the end. I am the end of the begining and the begining of the end. Even a stopped clock shows the right time twice a day or a cool computer made by dec (now compaq (now HP)) or The name of the International Space Station.
Coke perl6 alpha?
perl 6 alpha?
moritz purl: rakudo alpha is the old rakudo version before the "ng" branch 15:19
purl OK, moritz.
Coke pyrimidine?
purl, botslap 15:20
purl Coke: huh?
15:23 elmex joined 15:36 davidfetter joined 15:43 khairul joined 15:57 Mokurai joined 16:06 Mokurai1 joined 16:32 payload joined 16:40 elmex joined 16:57 cotto_w0rk joined 17:03 patspam joined 17:07 darbelo joined 17:26 japhb joined
dukeleto 'ello 17:46
Coke dukeleto: hio. 17:49
whiteknight HELLO 17:52
purl hola, whiteknight.
whiteknight oops
dukeleto go to xkcd.com 17:59
and type "sudo make me a sandwich"
then, laugh heartily
davidfetter sudo: make: command not found 18:02
18:03 eternaleye joined
bubaflub davidfetter: type "make me a sandwich" first 18:06
davidfetter heh 18:07
szbalint type cat without any arguments 18:09
:)
davidfetter heh 18:10
bubaflub also "help" 18:23
18:39 riffraff joined
dukeleto also: "sudo shutdown -r now" 18:42
bubaflub: have you talked to anybody in #rtems yet? 18:43
bubaflub dukeleto: no, not yet
dukeleto makes it happen 18:45
bubaflub dukeleto++ 18:48
cotto_work svn co svn.github.com/leto/parrot.git 18:52
moritz if that works, it's the coolest april's fool joke I've ever seen 18:55
cotto_work it does
moritz aye, just checked
Coke cotto_work: WTF? 18:58
19:09 dngor_ joined 19:10 ash_ joined 19:17 sorear joined 19:27 joeri joined
whiteknight the weather outside is so nice 19:29
19:45 bubaflub left 19:46 payload left 19:48 payload joined 19:53 jan joined
sorear Coke: If I want to use partcl as part of my PDD31 testbed, should I work on partcl or -nqp? 19:55
19:55 riffraff joined
darbelo -nqp is the future. 19:55
Coke pdd31? 19:56
partcl-nqp is the future. however, partcl has the advantage of having more code. so it depends on what you're testing. 19:57
s/having/implementing/
20:00 chromatic joined
sorear Coke: cross-HLL imports 20:02
Coke partcl is eventually getting thrown away. partcl-nqp has much less in the way of working code to import. 20:06
(partcl-nqp doesn't do namespaces, e.g.)
...so... both?
dalek nxed: r441 | julian.notfound++ | trunk/winxedst1.winxed:
use init_int for fixed size arrays in stage 1
20:07
Coke if you're importing INTO tcl, you can probably just use partcl-nqp.
and then I can flesh it out later if needs be. 20:08
20:10 Austin joined
Austin Say hello to my little friend... 20:10
Coke Hi George! 20:19
20:28 lucian joined 20:31 particle joined 20:40 theory joined
dalek kudo: 833852d | moritz++ | (2 files):
implement note()
20:43
kudo: 06ac481 | (Solomon Foster)++ | src/core/ (5 files):
Move various versions of sign to Real.sign, clean up Any.sign a bit.
21:01
21:07 GeJ_ joined 21:13 leprevost joined 21:14 leprevost joined 21:15 Whiteknight joined 21:46 Austin joined
dalek kudo: 22f81c1 | moritz++ | (4 files):
implement .fmt enough to pass the tests

if Positional was written in Perl 6 (or .fmt in PIR, but I'm not masochist enough to do that after 11pm)
21:54
kudo: 4384e1b | moritz++ | src/core/operators.pm:
implement sub versions of the || and "or" operators
Whiteknight good afternoon, #parrot 22:09
chromatic Proof that immutable STRINGs will *help* performance in 3... 2... 1... 22:12
sorear -1 22:13
purl -1
dalek rrot: r45374 | chromatic++ | trunk/src/key.c:
[PMC] Removed a COW from key_string(); hopefully it's unnecessary. This gives

anything starts to go weird, this is the one we want to revert.
22:16
moritz "If anything starts to go weird, this is the one we want to revert." 22:19
moritz likes
chromatic Risk analysis. 22:22
Coke You know who is great at risk analysis? Sallah. 22:31
chromatic Speaking of Coke, how do I change my default Makefile settings for an optimized build? -O3 is much better than -O2, and -march=xxx is a huge benefit. 22:32
sorear Is implementing LexPad subclasses in a HLL as insane as it looks?
Coke perl Configure.pl --optimize=-O3 --ccflags="-march=xxx" . I think. 22:33
sorear: partcl-nqp does that.
I think. 22:34
sorear Coke: yes, I'm reading it now
chromatic Coke, LD_SHARE_FLAGS = -shared -O2 -g -L/usr/local/lib -fPIC 22:36
The other uses look good though.
Coke chromatic: it's probably pull that from p5.
"pulling"
lemmee see if we can override that. 22:37
chromatic: seems like the best way would be to add an option to Configure.pl to override the whole thing. 22:50
which is more than a 2m fix.
chromatic IWBNI... but I don't need it at the moment. 22:51
cotto_work tt? 23:03
purl tt is template toolkit or www.template-toolkit.org/ or #tt or usually n0t Text::Template or TrueType (usually: TTF)
23:10 jsut_ joined 23:15 elmex joined
dalek kudo: 5a74e09 | jonathan++ | src/Perl6/ (2 files):
Implement given statement modifier.
23:27
kudo: 022d8a9 | jonathan++ | t/spectest.data:
Turn on S04-statement-modifiers/given.t.
kudo: 63ff066 | jonathan++ | src/Perl6/Grammar.pm:
Whine about do...while style thingies.
23:29 eternaleye joined 23:58 dngor_ joined