Camelia, the Perl 6 bug

IRC log for #parrot, 2008-10-31

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:09 AndyA joined #parrot
00:33 bacek joined #parrot
00:38 bacek hi there
01:07 tetragon joined #parrot
01:34 Ontolog joined #parrot
01:37 Croke sydney... alias? damian?
01:49 bacek Croke?
02:01 Tene msg pmichaud If you check out the "!PMC_IS_NULL(iter) && VTABLE_get_bool(interp, iter)" loop in scheduler.c's Parrot_cx_find_handler_local, you'll see that it's never true for the second exception
02:01 purl Message for pmichaud stored.
02:03 Tene This looks to be because context->handlers is always null
02:03 Robrt left #parrot
02:04 Ademan joined #parrot
02:06 Tene Both calls to pcxfhl get the same context.
02:06 Tene The difference is that the first time through, it has a valid ->handlers
02:10 allison_ joined #parrot
02:12 cotto Netherlands++ #nerdiest currency ever
02:20 Tene anyone know how I can set a watch on memory location in gdb?
02:38 dmknopp left #parrot
02:48 petdance joined #parrot
02:58 allison_ joined #parrot
03:18 tetragon joined #parrot
03:42 bacek_ joined #parrot
03:53 Psyche^ joined #parrot
04:53 allison_ joined #parrot
05:46 cotto Tene, watch 0xcafef00d
05:47 cotto You can watch a symbolic name, but the breakpoint will be disabled once the variable goes out of scope.
05:57 tewk watch *(int*) 0xcafef00d sets a hardward watch and is much faster.
05:59 cotto happy!
06:05 MariachiElf joined #parrot
06:29 bacek_ joined #parrot
06:31 Bzek joined #parrot
07:27 uniejo joined #parrot
07:59 Ademan_ joined #parrot
08:31 cognominal joined #parrot
08:46 iblechbot joined #parrot
08:52 masak joined #parrot
09:21 cosimo joined #parrot
09:37 Lorn joined #parrot
10:09 kj joined #parrot
10:14 dalek r32246 | julianalbo++ | trunk:
10:14 dalek : fix for 't' string passing in jitted nci
10:14 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32246
10:20 tomyan joined #parrot
10:37 dalek r32247 | masak++ | trunk:
10:37 dalek : [rakudo] implemented .contains and ACCEPTS in Hash (RT #60234)
10:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32247
11:00 masak rakudo: sub alwaystrue { return 1 }; say 0 ~~ alwaystrue
11:00 ruoso joined #parrot
11:15 * masak misses some kind of evalbot
11:20 Ontolog joined #parrot
12:09 szabgab if I recall yesterday someone said that he has trouble installing wxPerl on Gentoo
12:10 szabgab I just IM-ed the guy who says he is the maintainer and he asked for bug reports on http://bugs.gentoo.org
13:03 tetragon joined #parrot
13:09 Lorn joined #parrot
13:16 Infinoid I didn't have a problem installing wxPerl, I just had a problem with their forcing a really old version of it.
13:21 Infinoid and I still haven't gotten it working after having rolled my own packages with newer versions... so I'm not really sure what the solution is yet
13:22 gryphon joined #parrot
13:28 Croke is there a channel for padre somewhere?
13:29 Croke (I don't see one here or on freenoe)
13:29 PerlJam heh, my ubuntu upgrade keeps saying "about 34 minutes remaining" then "about 2 hours remaining" then "about 9 hours remaining", then back to 30-something minutes.
13:32 dalek r32248 | rurban++ | pdd30_install:
13:32 dalek : [cage] fix svn props
13:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32248
13:39 Croke karma padre?
13:39 purl padre has karma of 2
13:40 Croke wow. padre is not responding. =-)
13:44 szabgab Croke: no channel so far
13:44 szabgab but often on #win32 chatting with Alias and sometimes tsee
14:07 tewk pmichaud,tene: ncigen is broken, what ::=>; changes do I need to make
14:08 particle what broke?
14:11 tewk 'Method 'type' not found for invocant of class 'c99AST;TypeDef
14:12 tewk make test doesn't run anymore.
14:12 particle a standard pct error
14:12 particle hrmm, i'll have a look
14:13 tewk src/c99AST.pir has my custom ast in it.
14:15 particle ok, i see struct and typedef test failures
14:22 PacoLinux joined #parrot
14:30 ben joined #parrot
14:34 grim_fandango joined #parrot
14:37 notbenh joined #parrot
14:42 Limbic_Region joined #parrot
14:48 polyglotbot joined #parrot
14:49 Tene lolcode: VISIBLE "OH HAI EVRYONE IM BACK!!!"
14:49 polyglotbot No output (you need to produce output to STDOUT)
14:49 Tene Ooo... segfault!
14:49 Tene That's... awkward.
14:50 particle tewk: $work has me chasing other bugs, but ncigen is on my list
14:50 Tene Let's try rebuilding parrot...
15:02 tewk particle: thanks
15:03 rdice joined #parrot
15:06 tewk 'Method 'type' not found for invocant of class 'c99AST;TypeDef make me think it has something to do with the way I define my AST classes in c99AST.pir, I modeled them after PAST nodes.
15:07 tewk 'type' should be inherited from c99AST::VarDecl
15:07 tewk correction c99AST::Node inherits from PCT::Node
15:08 tewk so I guess "I modeled them after PCT nodes"
15:10 * Tene looks a bit at ncigen
15:13 Tene looks like I've fixed it, checking a bit more...
15:15 gaz joined #parrot
15:18 Tene Still one test failure that I don't quite understand.
15:19 allison_ joined #parrot
15:21 dalek r32249 | tene++ | trunk:
15:21 dalek : [ncigen]: NameSpace updates
15:21 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32249
15:23 * Tene prods tewk
15:25 tewk Tene++, there might have been a failure or two
15:26 NotFound tewk: did you see my last nci fix?
15:28 tewk NotFound: yes
15:28 tewk NotFound++,
15:29 Croke anyone here know mod_rewrite?
15:29 PerlJam Croke: just what I read from google  :)
15:29 pmichaud I know a bit.
15:29 Tene I know a little bit
15:29 Croke when doing a rewrite, do you have access to the hostname or just the path?
15:30 Croke I want to do a rewrite substituting part of the hostname into part of the path.
15:30 Croke Ah. http://ubuntuforums.org/arc​hive/index.php/t-83594.html
15:31 Croke can I use %{HTTP_HOST} in the substitution?
15:32 Croke (trying to get http://foo-asdf.bar.baz/frob/stuff to map to http;//foo-asdf.bar.baz/frob-foo/stuff
15:32 pmichaud yes, you have the host name
15:32 pmichaud I have an example of that, I think
15:33 Croke (my problem is, I think, that I only want part of the hostname.
15:33 pmichaud doing a partial substitution might be tricky, though.
15:33 Croke ... though that doesn't matter, I think.
15:33 Croke yah, nevermind. =-)
15:33 Croke thank you. =-)
15:35 particle RewriteCond %{HTTP_HOST} ^subdomain.website.com$ [OR]
15:35 particle RewriteCond %{HTTP_HOST} ^www.subdomain.website.com$
15:35 particle RewriteRule ^(.*)$ http://http://www.website.com/~subdomain/ [R=301,L]
15:36 particle do you need it for multiple subdomains?
15:36 szabgab Croke: I opened #padre on irc.perl.org, let see if someone is coming
15:37 pmichaud In addition to plain text, the Substition string can include
15:37 pmichaud 1. back-references ($N) to the RewriteRule pattern 2. back-references (%N) to the last matched RewriteCond pattern
15:37 pmichaud so yes, there's a way to do a backreference to the RewriteCond
15:37 pmichaud so you can do
15:37 dalek r32250 | tewk++ | trunk:
15:37 dalek : [NCIGEN] a couple more :: -> ; fixes
15:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32250
15:38 pmichaud RewriteCond %{HTTP_HOST} ^([^-]*).*
15:38 pmichaud and then
15:39 pmichaud RewriteRule ^/frob   /frob-%1
15:39 particle is that first star greedy?
15:39 pmichaud they normally are, yes.
15:39 pmichaud (they're pcre)
15:39 pmichaud you could require the -, as in
15:39 pmichaud RewriteCond %{HTTP_HOST} ^([^-]*)-.*
15:40 pmichaud that would cause the rewrite to not occur if the hostname doesn't have a hyphen in it
15:40 pmichaud probably don't need that trailing .* anyway
15:40 particle yeah
15:42 Croke we can just use the full hostname in the sub; that's fine. just trying to map something that is typically meant for a standalone installation to work with some crazy reverse proxy setup they're using here.
15:42 Croke (I'm in app dev. I shouldn't have to help out the server guys with this. =-)
15:43 Croke rewritecond lets you mangle the hostname? hurm.
15:44 pmichaud rewritecond lets you grab parts of the hostname for later mangling
15:44 pmichaud (mangling takes place in rewriterule)
15:45 pmichaud or, more precisely, you can use rewritecond to capture things that you later wish to use in your mangling :-)
15:47 Croke I think this is enough information to make the server guys dangerous. excellent.
15:48 Croke pmichaud++
15:52 jonathan hi hi
15:59 grim_fandango_ joined #parrot
15:59 Theory joined #parrot
16:00 jonathan pmichaud: Any news yet on if you want/can have a Rakudo hacking one side of the Parrot summit?
16:00 pmichaud checking.  :-)
16:04 grim_fandango__ joined #parrot
16:05 pmichaud if so, it would probably be the day before.
16:07 pmichaud currently I arrive at SJC at 2:30pm
16:07 pmichaud I could change it so that I arrive there around 10:10am
16:07 pmichaud changing my existing ticket costs $180, though.
16:07 pmichaud (cancelling and rebooking might be cheaper -- haven't checked that yet.)
16:08 Tene I might be able to move my flight earlier too... I'll have to remember to check that when I get home.
16:09 tewk I'm comming in at noon
16:09 pmichaud anyway, I expect that meeting Friday before might be better than Monday after.
16:09 pmichaud Everyone's arriving on Friday anyway, we might as well make use of the Friday afternoon/evening.
16:09 pmichaud and it doesn't incur an extra hotel stay
16:10 pmichaud in your (jonathan's) case, you might arrive on thursday, so you have some rest time
16:10 tewk I saw that pmichaud was coming in the early afternoon, so I booked a noon flight
16:10 pmichaud then we could meet up early-ish on friday.
16:12 jonathan Yes, arriving on Thursday would maybe be better.
16:13 jonathan Don't want to be exhausted for the summit!
16:13 pmichaud I'll see if I can move my flight to earlier on Friday.  At any rate, I suspect friday will be the better meetup-hacking day, unless the summit organizers decide to try to do a friday event of some sort.  (I wouldn't advise it -- we can certainly do something sat evening if that's the case.)
16:24 jq joined #parrot
16:30 pmichaud changing my ticket will cost $180, and would give us an extra 4 hours.  I suspect it might be better to simply stick with my existing ticket, but plan to meet up about 4pm on Friday and spend the afternoon/evening hacking.
16:31 pmichaud (I hack much better in the evening anyway.)
16:31 jonathan Sure, and I will have had a bit of chance to adjust to the timezone.
16:31 jonathan OK.
16:32 pmichaud next we just need to figure out where we're all staying, but particle++ is reportedly working on that :-)
16:33 Tene No, he already took care of it.  The wiki says he's renting a van, remember?
16:33 Tene ;)
16:34 particle check the wiki, i've updated hotel info
16:35 kj jonathan: when you're flying?
17:02 mj41 joined #parrot
17:14 chromatic joined #parrot
17:15 chromatic joined #parrot
17:20 jonathan kj: NOt sure yet - will look soon.
17:39 ab5tract joined #parrot
17:42 jq joined #parrot
18:23 gryphon joined #parrot
18:36 gryphon joined #parrot
19:12 Croke chromatic: did you fix -t4 ?
19:13 Croke ah. I was running against an old version.
19:14 chromatic I haven't touched it yet.
19:15 tewk Croke: which version. If it isn't ancient, it might be helpful to run a bisect.
19:15 tewk Knowing where to look is half the battle
19:16 * Tene <3 git-bisect.
19:17 tewk Croke: even has his own svn-biset I believe, where is it again?
19:18 Croke a version which involved local changes which was never committed.
19:18 Croke I just didn't re-make after svn revert-ing.
19:19 tewk ah
19:19 * Croke opens a ticket with whatever information he has.
19:22 Croke which isn't much, but at least gives a way to reproduce the bug.
19:22 * Croke chromatics: "but a pir-only version would be helpful"
19:29 LimbicRegion joined #parrot
19:33 Limbic_Region joined #parrot
19:49 peepsalot joined #parrot
19:53 Croke quiet today. hope everything is getting all their neighborhood kids sugared up.
19:53 Croke s/everything/everyone/
19:53 * Croke wonders what the hell happened to his brain.
19:54 Tene Nah, I'm in an airport in PHL.
20:02 Croke brains?
20:02 purl NO BRAINS FOR YOU! NEXT!
20:17 rdice joined #parrot
20:17 * jonathan happily lives in a country that, some of the expat community aside, doesn't do Haloween. :-)
20:19 cotto I don't care for the costumes, but the candy is nice.
20:19 jonathan It not being haloween never stopped me eating candy. ;-)
20:24 gryphon joined #parrot
20:34 cognominal jonathan++ # Haloween has contaminated France
20:36 chromatic As if you could tell.
20:37 szbalint nov 1st is the day of the dead here
20:38 bacek joined #parrot
20:38 szbalint people go to cemeteries usually, visit the graves of dead loved ones
20:39 szbalint it clashes quite badly with the import haloween stuff
20:40 chromatic Take a shotgun and aim for the head.
20:40 NotFound But... today is not christmas?
20:41 Croke hah
20:42 NotFound (For those that are not *real* programmers (I hope there is no such people here) ): 31oct == 25dec
20:43 Croke (day of the dead) was happy to see una ofrenda at my kids school.
20:46 Croke (here in anglo suburbia)
20:46 Lorn joined #parrot
20:46 szbalint (hungary's day of the dead just shares a common name with the mexican day of the dead - it's entirely a separate thing)
20:47 Croke oh, sure, confuse me.
20:47 jonathan Tomorrow is a national holiday here - All Saint's Day.
20:47 Croke chromatic: -t4 goes squirrely in Parrot_Context_get_info
20:47 NotFound jonathan: all people in the country are saints?
20:48 szbalint I think it is ment to be the day of the saints which otherwise have no special day
20:48 szbalint or something like that :)
20:48 jonathan I think so, yes. :)
20:49 jonathan Erm, that was in response to szbalint, not NotFound. That can't be true. I live here. :-)
20:50 szbalint ah, you're in slovakia right? For some reason I always think of the UK when seeing your nick :)
20:52 jonathan Yes, I live in Slovakia now. But originally I'm from the UK.
20:52 NotFound That explains all. You are not saint because you are foreign ;)
20:54 * jonathan has been foreign for the last year. :-)
20:55 * Croke gets closer...
20:58 NotFound Croke: tcl does not compile with c++, and checking why I see that in C is giving warnings that looks like real problems.
20:59 NotFound src/binary.c | cc1: warning: ./include: No such file or directory
21:05 Croke probably not getting compiler flags set properly when the makefile is created.
21:05 NotFound I realclean and reconfigure
21:05 jonathan particle: Have worked out what flight to take.
21:05 jonathan And updated page with (current) exact cost.
21:06 NotFound Croke: I don't see any rule in Makefile related to src/binary.c
21:06 jonathan I'll go from Vienna rather than Bratislava - takes a little longer to get to, but is much cheaper.
21:08 NotFound Croke: if the default rule is used, there is a: CC_INC = -I./include that can be the reason for the message.
21:11 Croke have to run now, but have narrowed down the -t4 stuff to Parrot_full_sub_name's invocation of Parrot_ns_get_name
21:11 Croke ... which does a PCCINVOKE to get some information rather than just look it up in a hash, which may be what screws us up.
21:11 Croke -> halloween
21:14 NotFound Croke: I think the Makefile problem is the lack of the rule .c$(o)
21:18 dolmen joined #parrot
21:18 NotFound Mmmm... no. The rule is present, but is not exactly the same as the main
21:26 NotFound I've got it: the CC_INC = @cc_inc@ expands to a value intended to use from the parrot root, not from languages/tcl
21:27 chromatic That's true.
21:27 NotFound And the solution is... ?
21:30 chromatic Use a Tcl-specific include there?
21:31 NotFound -I../../include ?
21:31 chromatic Seems reasonable.
21:35 NotFound Simpler solution: drop it. The parrot include directory is already included elsewhere :?
21:36 particle jonathan++ for the update
21:38 NotFound The other problems where PMCNULL used instead of NULL with STRING *
21:39 NotFound purl: paset?
21:39 purl notfound: bugger all, i dunno
21:39 NotFound purl: paste?
21:39 purl i think paste is (see: nopaste) or like glue but a little safer to sniff. or http://nopaste.snit.ch:8001/ or http://scsys.co.uk:8001/ anywhere shadowpaste is or mmm, sticky paste or You there! Eating the paste. or <see> 2 girls, 1 paste
21:39 nopaste "NotFound" at 213.96.228.50 pasted "tcl fixes" (43 lines) at http://nopaste.snit.ch/14439
21:41 NotFound Croke: ping
21:49 chromatic Looks sane to me.
21:53 jonathan particle: Basically, I'm in the position now where if I can get it confirmed my travel can be funded, I can come.
21:54 jonathan particle: Do I have to fill some grant application in, or contact someone, or...?
21:56 allison jonathan: filling out the survey wiki page is the official application process, which I see you've done
21:58 allison mmmm... I see <pre> tags break the parrot.org template
21:59 jonathan allison: Ah. That's refreshingly unbeaurocratic. :-)
21:59 jonathan A month in Russia makes you forget how simple things *can* be. ;-)
21:59 allison jonathan: :)
22:00 Croke NotFound: pong
22:00 NotFound Croke: see the nopaste
22:01 Croke NotFound: does src/binary.c cause a build failure?
22:01 Croke or just warnings?
22:01 NotFound Croke: warnings in C, failure in C++
22:02 Croke as I just updated that to prevent an infinite loop somewhere.
22:02 NotFound Croke: but returning PMCNULL when must be NULL looks like a serious problem, anyway.
22:04 Croke Oh, It's quite likely I fixed it wrong.
22:04 Croke can you add the src/binary.c one as a patch to the partcl queue so I don't lose it?
22:05 NotFound I'll try, but I'm not familiarized with code.google.com
22:06 Croke partcl?
22:06 purl partcl is, like, tcl on parrot or http://code.google.com/p/partcl
22:06 Croke NotFound: http://code.google.com/p/partcl/issues/entry
22:06 Croke applied the other bit and added your nick to CREDITS
22:07 Croke And after halloween, I'll check it out and see if I can fix it the right way.
22:07 Croke ->
22:07 Croke (thanks)\
22:09 NotFound 69, nice number
22:20 Andy rakudo.org needsa  favicon.ico
22:29 TiMBuS joined #parrot
22:59 davidfetter joined #parrot
22:59 masak joined #parrot
23:09 dalek r32251 | allison++ | pdd22io:
23:09 dalek : [pdd22io] Keep revision history of old UNIX I/O file under new names.
23:09 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32251
23:10 tetragon joined #parrot
23:11 dalek r32252 | allison++ | pdd22io:
23:11 dalek : [pdd22io] Converted UNIX I/O for filehandles to new architecture.
23:11 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32252
23:23 dalek r32253 | allison++ | pdd22io:
23:23 dalek : [pdd22io] Partial conversion of UNIX I/O for sockets.
23:23 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32253
23:26 dalek r32254 | allison++ | pdd22io:
23:26 dalek : [pdd22io] Keep revision history of old Windows I/O file under new names.
23:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=32254
23:28 masak happy November, everyone!
23:29 jonathan November! :-D
23:29 jonathan It's Christmas soon.
23:30 tetragon Not November yet in Toronto
23:30 chromatic tetragon, Oct 31 == Dec 25
23:30 masak tetragon: you'll like it, just wait :)
23:30 masak jonathan: btw, nice to have you back.
23:30 jonathan Nice to be back. Am refreshed and ready for action. :-)
23:30 * tetragon brandishes the fork from the BSD stuff she wore to the office
23:30 chromatic Though if you asked me "Hey chromatic, do you know the difference between November and Dec?" I would have to say "Apparently not."
23:30 masak jonathan: sounds excellent.
23:31 jonathan Do I even want to know how many tickets are in the Rakudo RT queue now...
23:31 * masak whistles innocently
23:31 jonathan :-)
23:31 jonathan Will dig back into Rakudo next week.
23:31 masak aye.
23:32 masak I'll do my best to help.
23:32 chromatic jonathan, if Rakudo scares you, how about PCC?
23:32 jonathan Me too. :-)
23:32 jonathan PCC as in...the calling conventions?
23:32 chromatic Yes.
23:33 jonathan inter_call.c is one of the bits of Parrot that I occasionally try to fit into my head...and then fail.
23:33 jonathan Are they in need of changes, fixes, optimizations...or?
23:33 chromatic In particular, I wonder if it's necessary to create a new FixedIntegerArray PMC for subs where the type and number of arguments is static at compile time, rather than freezing a constant PMC into the bytecode.
23:33 chromatic Though I do remember you adding arity support to subs a while back.  Do we use that?
23:34 jonathan The FixedIntegerArray PMC represents the signature.
23:34 jonathan The arity stuff looks at this PMC, yes.
23:35 jonathan We use it to see the types of the arguments, and their flags.
23:35 jonathan By "create a new one", what do you mean?
23:35 chromatic I'm thinking of ways to reduce GCable elements in calls.
23:35 jonathan Oh.
23:35 jonathan I didn't think we created one during the calling?
23:35 jonathan I thought that we just had one as a constant PMC.
23:36 jonathan Or are you talking about calls from C?
23:37 jonathan e.g. PCCINVOKE and Parrot_PCCINVOKE?
23:37 jonathan Those do I suspect (or could believe) create one per call.
23:37 chromatic PCCINVOKE for sure.
23:37 jonathan Aha, OK.
23:38 jonathan I thought you meant call from one PIR sub to another PIR sub, in which case we should not be allocating these.
23:38 chromatic Like you, I can't keep src/inter_call.c in my head.
23:38 chromatic Right.  In theory, we shouldn't.
23:38 jonathan We don't have to, I figured a while ago there were ways to optimize it in the future, but it felt more optimization-ish and thus was a "worry about it later" thing. :-)
23:39 jonathan (Shouldn't have to allocate during PCCINVOKE, that is.)
23:39 * Theory sneezes
23:39 chromatic In Theory, it's too dark to read.
23:39 * jonathan hands Theory a tissue
23:39 * Theory wipes
23:40 jonathan chromatic: One option is to have a static (at a C level) variable per callsite, when we use PCCINVOKE inside a PMC.
23:40 jonathan And stash the array in that.
23:40 chromatic I realize we're brainstorming, but static variables... yick.
23:40 jonathan And just have some logic. "Do we have it?"
23:41 jonathan OK, I'll be more abstract.
23:41 jonathan We have some thingy that per callsite stores the fixed PMC array that we build from the signature. :-)
23:41 jonathan But actually the cost in Parrot_PCCINVOKE is muchly, I suspect, the building of the signature.
23:41 chromatic Is it the caller or callee signature?
23:42 jonathan From the character array.
23:42 jonathan Caller.
23:42 chromatic Does it get modified?
23:42 jonathan No.
23:42 chromatic Sounds cacheable.
23:42 jonathan Right, that's what I was failing to say. :-)
23:43 chromatic "PP->I" => FixedIntegerArray PMC
23:43 jonathan Yup. And if we can do that process once...
23:43 jonathan It's FTW.
23:43 chromatic Throw an Orcish Maneuver into PCCINVOKE, and everyone's happy.
23:44 jonathan Since those are C strings, maybe we can even use their memory addresses as cache keys rather than the string itself, but it depends how much the strings are shared across the Parrot binary.
23:44 chromatic Let's just use a cstring Hash.
23:44 jonathan That works too.
23:44 chromatic That way external code can use the cache too.
23:44 jonathan It'd cache more correctly.
23:45 jonathan True.
23:45 jonathan Good point.
23:45 allison before you head too far down this direction, the signature integer array is going away entirely, replaced by a CallSignature PMC
23:45 chromatic These strings will tend to run between two and ten characters long anyway, so hashing time is minimal.
23:45 jonathan allison: We'll still want to build that from the PI->P style strings, I suspect.
23:45 allison but, the CallSignature PMC is a container for the arguments, and so different for each call
23:45 jonathan erm.
23:46 jonathan You plan to create a new GC-able object per call?
23:46 allison and, yes, it is built from PI->P style strings
23:46 jonathan This sounds very much like the Perl 6 idea of a capture holding the arguments...
23:46 allison jonathan: yes, but only one. that's 2-3 fewer GC-able objects per call than we create now
23:47 jonathan What do we create per call now?
23:47 allison jonathan: it is very like it, CallSignature is a subclass of Capture (for the moment)
23:47 jonathan From PIR to PIR, I thought about nothing.
23:47 jonathan Other than a RetContinuation PMC which we generally recycle.
23:47 chromatic Sounds right.
23:47 allison currently, we create a integer args array, an integer returns array
23:48 jonathan We don't create them *per-call*.
23:48 jonathan From PIR to PIR.
23:48 jonathan Per call site, yes. Not per call.
23:49 allison on the static calls, true, they're constants
23:49 jonathan Where static call = the calls from one PIR sub to another = the common case.
23:49 allison (those aren't the only ones, but I'd have to dig up that code again)
23:50 jonathan Do you think we'll be able to re-cycle these CallSignature PMCs as an optimization in the future?
23:50 jonathan (Obviously, replacing their contents...)
23:51 jonathan Or see them as something that we can even optimize away the creation of?
23:51 chromatic Or cache?
23:51 purl cache is 1 => for that cached cursor?
23:51 allison jonathan: GC is recycling objects
23:52 allison jonathan we keep the PMC headers allocated, and reuse them
23:52 jonathan allison: I think we are talking about recycling in a different way. Here I mean, we don't have a CallSignature get collected at all.
23:52 allison having it GC'd is an advantage
23:53 chromatic Single-bucket GC (even concurrent or iterative) is lousy at recycling lots of frequently-recycled headers.
23:53 jonathan Indeed.
23:53 chromatic Turn off RetCont recycling sometime and see how much slower things go.
23:53 chromatic Alternately, write a C compiler that never stack allocates and always heap allocates.
23:53 jonathan Right. I am talking here about doing some recycling of these in the same meaning as we recycle RetConts.
23:54 Andy joined #parrot
23:54 allison it would be possible to have a lightweight signature recycling similar to RetConts, though I'm not sure either recycling scheme will hold up well under concurrency
23:54 chromatic Where we use PMCs as we would automatic variables in C, we can occasionally improve performance dramatically.
23:54 allison (I suspect they'll be a disaster in concurrency)
23:55 jonathan Oh, I'd expect to keep a cache or bunch of them to recycle per interpreter.
23:55 chromatic The only problem in concurrency is 1) if the GC isn't concurrency safe, which is a disaster elsewhere or 2) if other threads/processes/LWPs use the same PMC at the same time
23:55 jonathan Not recycle them across 'em.
23:55 allison all of this is predicated on the idea that we will continue to have an embarrassingly slow, non-generational, non-incremental GC
23:55 allison which isn't a good assumption
23:56 chromatic All of this is predicated on the idea that all PMCs come from the same PMC pool.
23:56 allison yes, non-generational (generational would have a "young" pool swept frequently)
23:56 jonathan I don't think that assuming some day we'll have such a blazingly fast GC we can just allocate as many short-lived objects as we like is much of a better idea to predicate stuff on...
23:57 chromatic That presumption only works if you can ensure that nothing in the older generation refers to anything in the younger generation.
23:58 allison chromatic: the problem with concurrency is that the custom recycled objects have a different lifetime than ordinary GC'd objects, so while ordinary GC may be made safe for concurrency, the custom GC may not
23:58 allison chromatic: for collecting, yes
23:59 chromatic add_pmc_to_free_pool() does need to be effectively atomic, but it should be atomic anyway.
23:59 allison and with CallSignatures you can guarantee it, they're short-lived and purely internal
23:59 chromatic See #1 in How To Screw Up Concurrency in Your GC above
23:59 jonathan That's just adding something to a linked list. If there's a CAS operation portably available, then it can be done atomically.
23:59 chromatic You need a lock around two pointer swaps.

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

Parrot | source cross referenced