Camelia, the Perl 6 bug

IRC log for #parrot, 2009-12-12

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:00 chromatic Always use bufstart.
00:00 cotto_work for now, getting it out of code not in src/string would be great
00:00 chromatic Fix substr to copy, not COW.
00:00 cotto_work are there any other priorities?
00:01 cotto_work It's better to list more than we can do than to have bored hackers.
00:01 Whiteknight japhb: I suspect you would be using some sort of inference engine or topological sort
00:02 darbelo joined #parrot
00:02 chromatic I'm going to work on compile-time constant exception handlers attached to Subs.
00:02 Coke chromatic: is it safe to consider COW purely an implementation detail?
00:02 chromatic Yes.
00:02 japhb Whiteknight, it's beginning to look like the current standard is conversion to SAT (Boolean Satisfiability), and running the analysis there.
00:02 Coke hokay. that'll do it, then.
00:03 * Coke wonders if there was any benchmarking done before strings were made COW, or if they appear that way, full formed.
00:03 chromatic I undid COW and did some benchmarking.  Deep hurting.
00:03 * Coke wasn't paying attention to the C back then.
00:03 Whiteknight chromatic: that seems like a special case of a much-needed improvement in constants handling
00:03 Coke chromatic: ... but if we remove it now, won't it hurt again?
00:03 Whiteknight exception handlers aren't the only type that stand to gain
00:04 chromatic We only have to remove it for the substr case.
00:04 chromatic As far as I know, I fixed a lot of constants.
00:05 chromatic EHs that are in scope for the entire sub are definitely fixable.
00:05 chromatic That applies to a lot of P6-style control exceptions.
00:05 chromatic We can avoid the cost of creating the exceptions, setting its handled types, and pushing it into the context.
00:06 chromatic s/exceptions/exception handler/
00:06 Whiteknight japhb: I've wanted to write a robust rule engine for Parrot since I joined the project
00:06 Whiteknight a nice Rete implementation would be nice
00:07 tetragon joined #parrot
00:07 Whiteknight (and would be a nice building block for adding a prolog compiler, eventually)
00:07 ascent_ joined #parrot
00:07 japhb Whiteknight, well ... one of us is probably going to have to do it in the not too distant future
00:08 japhb Plumage needs it.
00:08 japhb I can keep hacking edge cases away, but fperrad++ will keep finding new edges.  Or I can just do it right.
00:20 slash left #parrot
00:25 dalek tracwiki: v12 | cotto++ | AllHackathons
00:25 dalek tracwiki: document what's planned for the hackathon tomorrow
00:25 dalek tracwiki: http://trac.parrot.org/parrot/wiki/All​Hackathons?version=12&action=diff
00:37 Zak joined #parrot
00:40 patspam joined #parrot
00:40 Whiteknight when did the tomorrow hackathon plan get made?
00:40 chromatic You were on diaper duty.
00:40 Tene Whiteknight: it's been discussed a few times earlier this week
00:40 Tene just casually in IRC
00:41 Whiteknight chromatic: I'm always on diaper duty!
00:42 chromatic TMI
00:45 pmichaud Coke: (commit less)  No, restructuring won't reduce my commit rate.
00:45 pmichaud remove cow for substr case.... that will hurt PGE and regexes bigtime
00:46 cotto_work Whiteknight, it's on the wiki
00:47 cotto_work http://trac.parrot.org/parrot/wiki/AllHackathons
00:47 cotto_work nm.  saw "where"
00:50 japhb pmichaud, aren't you dependent on substr to save regex performance for variable-length encodings?
00:50 pmichaud in nqp-rx, we use that as an optimization, yes.
00:50 japhb s/you/PGE & NQP-rx/
00:50 pmichaud pge doesn't have that optimization
00:50 japhb right, that's what I was thinking
00:51 pmichaud but we also have to do substr for any sort of literal string match
00:51 pmichaud as well as case-insensitive matches
00:53 chromatic That'll take some clever thinking then.
00:54 pmichaud why the push to eliminate cow for strings?
00:54 chromatic It's a push to slim parrot_string_t by at least two pointers.
00:55 pmichaud and that's an advantage because...?
00:55 chromatic You run the GC a lot less.
00:55 chromatic We're not talking about removing all COW.
00:56 chromatic It's the specific case where s->bufstart and s->strstart differ due to substr COW that gets hurt if we merge bufstart and strstart.
00:56 chromatic Other COW is unaffected.
00:56 pmichaud a lot of pge and regex stuff was designed around the knowledge that substr tended to be cow
00:58 pmichaud i.e., that taking a substr of something wasn't going to make a lot of buffer duplicates
00:58 chromatic And it shouldn't.
00:58 he joined #parrot
00:58 Whiteknight why are we merging buf_start and string_start again?
00:58 chromatic There's probably a way to reduce the size of parrot_string_t while allowing substr COW.
00:58 Whiteknight because both have real uses
00:58 pmichaud oh, would substr still use the same buffer?
00:58 pmichaud oh, in that case I'm much less concerned.
00:58 chromatic It can.
00:59 pmichaud -however-
00:59 pmichaud if this is a quick fix, I say go for it (more)
00:59 pmichaud if it ends up being at all involved, perhaps we should wait for a strings overhaul
00:59 pmichaud we still don't have good unicode support on systems w/o icu
00:59 chromatic We're at the point of improving encapsulation right now, so there won't be any removal in the short term.
01:04 chromatic If we had to, we could make a parrot_substr_string_t with space for the additional pointer.
01:04 kid51 joined #parrot
01:06 * kid51 posts a question he first posted 12 hours ago ...
01:07 kid51 Does anyone know the final plans for the online Roadmap meeting this weekend?
01:07 kid51 If so, we should post on list and change the channel topic.
01:08 chromatic 19:30 UTC, I believe.
01:09 mtk joined #parrot
01:09 kid51 That's on Sunday Dec 13, correct?
01:09 chromatic Correct.
01:12 Topic for #parrotis now Parrot 1.8.0 Zygodactyly released | Online Parrot Roadmap Meeting:  Sunday 13 December, 19:30 UCT
01:14 dalek tracwiki: v131 | jkeenan++ | WikiStart
01:14 dalek tracwiki: http://trac.parrot.org/parrot/wiki/W​ikiStart?version=131&action=diff
01:15 kid51 time
01:15 kid51 clock
01:15 kid51 purl, clock?
01:15 purl kid51: LAX: Fri 5:15pm PST / CHI: Fri 7:15pm CST / NYC: Fri 8:15pm EST / LON: Sat 1:15am GMT / BER: Sat 2:15am CET / IND: Sat 6:45am IST / TOK: Sat 10:15am JST / SYD: Sat 12:15pm EST /
01:21 mtk left #parrot
01:29 Coke pmichaud: can one do inline regexn in nqp-rx yet?
01:30 pmichaud I think nqp-rx repo has that capability, I'm not sure if it's been imported into parrot trunk yet
01:30 pmichaud it undoubtedly will be before the evening is out, unless I get tired
01:41 cotto_work chromatic, ping
01:41 ascent joined #parrot
01:41 chromatic pong
01:42 DrForr joined #parrot
01:42 cotto_work chromatic, I'm looking at the callgrind profile when using annotations and PackFile_Annotations_lookup is eating 33% of the time.  Is there a way to look up annotations iteratively to lower that overhead?
01:42 cotto_work (i.e. would PackFiles be amenable to such an approach)
01:43 cotto_work (that's with no output)
01:47 dalek tracwiki: v132 | jkeenan++ | WikiStart
01:47 dalek tracwiki: http://trac.parrot.org/parrot/wiki/W​ikiStart?version=132&action=diff
01:50 Whiteknight I figured annotations must be expensive, but 33%?
01:50 cotto_work That's just for looking them up.
01:51 cotto_work (and without any output, which takes up about 29% when it's active.
01:52 cotto_work I'm checking what it'd be with output, but it'll probably be done long after my weekend has started.
01:55 cotto_work Interestingly, using the iterator interface is pretty cheap.  I'll probably switch to messing more directly with the hash, but it's not nearly as expensive as I'd have expected.
02:01 particle what's robert kuo's handle?
02:01 cotto_work bubaflub
02:01 purl bubaflub is mailto:bobjkuo@gmail.com
02:01 cotto_work is his cla in?
02:02 particle yep, today
02:02 cotto_work that'll make him happy
02:03 particle i plan to be online for the sunday meeting, text me if i'm not around
02:04 dalek tracwiki: v13 | jkeenan++ | AllHackathons
02:04 dalek tracwiki: Move last month's hackathon to newly renamed Previous Hackathons section
02:04 dalek tracwiki: http://trac.parrot.org/parrot/wiki/All​Hackathons?version=13&action=diff
02:06 chromatic Nice list of ->strstart, kid51!
02:07 kid51 Thanks.  Any other prep work you can think of?
02:07 kid51 grep is my friend :-)
02:08 chromatic Might be good to paste them somewhere on the wiki we can check them off, but I don't remember the right page name for that.
02:09 pmichaud just a note that (as posted on parrot-dev)  I probably won't make it to the meeting until 20:30 utc
02:12 kid51 How do I start a new page on this wiki?
02:13 chromatic cotto_work, we need to change the way we store annotations to make that faster.
02:13 dalek parrot: r43008 | pmichaud++ | trunk/compilers/pct/src/PAST/Compiler.pir:
02:13 dalek parrot: [past]: A few more opcode signatures.
02:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43008/
02:14 kid51 I want to start a new wiki page called:  PreDecemberReleaseHackathon
02:14 kid51 But simply entering that on http://trac.parrot.org/parrot/wiki/AllHackathons isn't cutting it.
02:17 chromatic Change the URL in place.
02:17 purl chromatic: that doesn't look right
02:21 cotto chromatic, do you think this would be helpful enough to other parts of parrot to be worthwhile?  It sounds like there'd be a lot of effort involved?
02:21 dalek tracwiki: v14 | jkeenan++ | AllHackathons
02:21 dalek tracwiki: http://trac.parrot.org/parrot/wiki/All​Hackathons?version=14&action=diff
02:21 dalek tracwiki: v15 | jkeenan++ | AllHackathons
02:21 dalek tracwiki: http://trac.parrot.org/parrot/wiki/All​Hackathons?version=15&action=diff
02:22 * cotto gets to upgrade his interwebs to be half as slow
02:22 chromatic It shouldn't be too difficult.  We have to change how we store annotations (one place), how we access them within libparrot (one place), and possibly ancillary utilities such as the PBC disassembler and pbc-merge.
02:23 cotto That'd be great.  How much effort do you think it'd take me to go from zero to understanding Packfiles enough to make the changes?
02:24 cotto it's a bit of yak shaving, but I'm surprised I haven't had to do more of that.
02:25 chromatic It shouldn't be too difficult.
02:25 chromatic The only tricky part is choosing the right data structure.
02:25 chromatic I think we need to switch to an array-based heap store, where we store the annotation by the pointer value in the PBC.
02:28 * cotto goes offline briefly
02:32 cotto joined #parrot
02:38 dalek tracwiki: v1 | jkeenan++ | PreDecemberReleaseHackathon
02:38 dalek tracwiki: Resources for Dec 12 2009 Development Hackathon
02:38 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=1&action=diff
02:41 kid51 context_unify3 branch current test failures:  See http://smolder.plusthree.com/app/pu​blic_projects/report_details/30822
02:54 dalek tracwiki: v133 | jkeenan++ | WikiStart
02:54 dalek tracwiki: http://trac.parrot.org/parrot/wiki/W​ikiStart?version=133&action=diff
02:54 dalek tracwiki: v2 | jkeenan++ | PreDecemberReleaseHackathon
02:54 dalek tracwiki: Add Smolder report on context_unify3 branch at r43007</a>
02:54 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=2&amp;action=diff
02:54 dalek tracwiki: v3 | jkeenan++ | PreDecemberReleaseHackathon
02:54 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=3&amp;action=diff
03:01 Topic for #parrotis now Parrot 1.8.0 Zygodactyly released | December 12 Development Hackathon:  http://tinyurl.com/ybrsgmp | Online Parrot Roadmap Meeting:  Sunday 13 December, 19:30 UCT
03:01 colomon joined #parrot
03:08 allison joined #parrot
03:20 TiMBuS joined #parrot
03:28 dalek tracwiki: v4 | jkeenan++ | PreDecemberReleaseHackathon
03:28 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=4&amp;action=diff
03:35 dalek parrot: r43009 | jkeenan++ | trunk/src/utils.c:
03:35 dalek parrot: Replace one instance of '->strstart'.  Attempts to replace the other three
03:35 dalek parrot: instances in this file did not succeed.
03:35 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43009/
03:36 kid51 1 down, 72 to go!
03:44 dalek tracwiki: v5 | jkeenan++ | PreDecemberReleaseHackathon
03:44 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=5&amp;action=diff
03:48 Coke pmichaud: whee. just moved some more PIR into NQP.
03:48 Coke annoyingly, it was some PIR that I had reverse engineering from NQP previously. =-)
03:49 dalek partcl-nqp: ce11002 | coke++ |  (4 files):
03:49 dalek partcl-nqp: move TclString's get_integer definition into NQP from PIR.
03:49 dalek partcl-nqp: - moves the TclString class into tcl;TclString instead of parrot;TclString
03:49 dalek partcl-nqp: - the :vtable is still in PIR, but it just dispatches to NQP.
03:49 dalek partcl-nqp: review: http://github.com/partcl/partcl-nqp/commit​/ce11002570874d3979373a85c7a6b0579b30c36f
03:52 dalek parrot: r43010 | jkeenan++ | trunk/src/oo.c:
03:52 dalek parrot: Replace three instances of '->strstart'.  Cf.:
03:52 dalek parrot: �http://trac.parrot.org/parrot/ticket/1370.
03:52 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43010/
03:57 dalek TT #1370 created by jkeenan++: ->strstart cleanup
04:01 dalek tracwiki: v6 | jkeenan++ | PreDecemberReleaseHackathon
04:01 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=6&amp;action=diff
04:12 plobsing joined #parrot
04:44 darbelo_ joined #parrot
04:54 Coke bah. I can't seem to move get_bool to getBoolean in tcl string.
05:07 dalek tracwiki: v7 | darbelo++ | PreDecemberReleaseHackathon
05:07 dalek tracwiki: Remove items that we can't be "cleaned up" yet, like GC bookeeping and assertions.
05:07 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=7&amp;action=diff
05:15 Coke AIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIGH
05:16 cotto someone needs a hug
05:19 Coke bit again by == working differently in NQP than it does in tcl.
05:20 Coke now I'm trying to figure out why try {} in NQP isn't catching an error.
05:21 * Coke adds an empty CONTROL block to resolve the issue.
05:52 Coke ugh. can't return from inside a try with a CONTROL {} block. whee.
05:54 dalek partcl-nqp: aaf6aba | coke++ | src/ (2 files):
05:54 dalek partcl-nqp: move guts of TclString's get_bool vtable into an NQP method.
05:54 dalek partcl-nqp: review: http://github.com/partcl/partcl-nqp/commit​/aaf6abafbea8578a3f38f6bfada268852d87f2f5
06:14 cotto joined #parrot
06:52 dalek parrot: r43011 | cotto++ | trunk/src/utils.c:
06:52 dalek parrot: [string] one more strstart removal that doesn't break anything.  The other two
06:52 dalek parrot: in this file will require a deeper fix.
06:52 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43011/
07:14 darbelo_ Hm. Speaking of that. Has anyone built a parrot with GC_VERBOSE turned on? It fails in spectacular ways for me.
07:14 darbelo_ s/that/deeper fixes/
07:18 cotto My need for deeper fixes has been overruled  by my need for sleep.  night.
07:18 darbelo_ Night. I should probably sleep too, now that you mention it.
07:25 dalek parrot: r43012 | pmichaud++ | trunk (2 files):
07:25 dalek parrot: [pdd]:  Add a proposed new draft for pdd31 -- HLL compiler and library interop
07:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43012/
07:25 dalek parrot: r43013 | pmichaud++ | trunk/docs/pdds/draft/pdd31_hll.pod:
07:25 dalek parrot: [pdd31]:  Improve the text of 'import' a bit.
07:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43013/
07:48 chromatic joined #parrot
07:58 fperrad joined #parrot
08:02 fperrad_ joined #parrot
08:06 jsut_ joined #parrot
08:29 iblechbot joined #parrot
08:55 plobsing joined #parrot
09:09 mikehh joined #parrot
10:00 jan joined #parrot
10:05 chromatic Hm, why should Buffer_bufstart() be void *?
10:08 dalek parrot: r43014 | mikehh++ | trunk/src/utils.c:
10:08 dalek parrot: fix src/utils.c to build with g++ - Buffer_bufstart is of type void *
10:08 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43014/
10:24 bacek joined #parrot
10:26 darbelo chromatic: It's a 'generic pointer' to an amourphous blob of data?
10:27 darbelo That and the (whatever *) -> (void *) -> (whatever *) roundtrip gurantee.
10:50 pjcj joined #parrot
10:57 dalek markdown: 43df65a | fperrad++ | markdown/grammar.pg:
10:57 dalek markdown: now parrot-nqp supports '\'', so remove \x27
10:57 dalek markdown: review: http://github.com/fperrad/markdown/commit​/43df65a5ba2095a8141e3bd433b56530e45fbe60
11:33 fperrad msg pmichaud when I trying to convert the Markdown grammar to NQP-rx,
11:33 fperrad I found that an empty string crashes NQP-rx.
11:33 purl Message for pmichaud stored.
11:33 fperrad See http://github.com/fperrad/markdow​n/blob/master/markdown/grammar.pg, lines 408, 455 & 589.
11:34 fperrad msg pmichaud when I trying to convert the Markdown grammar to NQP-rx, I found that an empty string crashes NQP-rx. See http://github.com/fperrad/markdow​n/blob/master/markdown/grammar.pg, lines 408, 455 & 589.
11:34 purl Message for pmichaud stored.
12:02 darbelo Hmm. s->strstart != Buffer_bufstart(s) indeed. If I change Parrot_str_to_cstring to return s->_bufstart everything breaks.
12:04 darbelo That's going to need some work to get fixed. But pmc_freeze is uglier, so it goes first.
12:07 lucian joined #parrot
12:18 nopaste "mikehh" at 81.149.189.7 pasted "code required to TODO failing tests in t/op/exceptions.t" (32 lines) at http://nopaste.snit.ch/19055
12:23 darbelo All tests successful. But editing pmc_freeze.c make me paranoid so testing of r43015 is appreciated.
12:26 darbelo Also, does anyone know if a PMC frozen in one machine should be able to be thawed on a machione of a different arch.
12:26 darbelo ?
12:34 dalek tracwiki: v8 | darbelo++ | PreDecemberReleaseHackathon
12:34 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=8&amp;action=diff
12:35 dalek parrot: r43015 | darbelo++ | trunk/src/pmc_freeze.c:
12:35 dalek parrot: Rewrite push_opcode_* to Use the string API. Perform weird PackFile contortions to maintain the stream format. This code will become less ugly after the next deprecation boundary.
12:35 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43015/
12:46 mikehh darbelo: had to add a couple of casts for g++ but after that it passes all tests inc fulltest
12:47 darbelo Agh. I keep forgetting about the c++ build.
12:47 darbelo mikehh++ # fixing the stuff I break.
12:52 Whiteknight joined #parrot
12:52 darbelo Whiteknight: ping
12:53 Whiteknight pong!
12:53 darbelo Do you know anything about building parrot with GC_VERBOSE turned on?
12:54 darbelo It causes all sorts of 'splosions for me.
13:06 riffraff joined #parrot
13:08 dalek parrot: r43016 | mikehh++ | trunk/src/pmc_freeze.c:
13:08 dalek parrot: fix src/pmc_freeze. for g++ build
13:08 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43016/
13:13 payload joined #parrot
13:16 Whiteknight darbelo: never tried it
13:16 Whiteknight i'ts very old, probably needs to come out
13:18 colomon__ joined #parrot
13:18 darbelo I can do that. Old, bitrotten, #ifdefs are my favourite deletion targets.
13:28 dalek markdown: 9cabe0a | fperrad++ | markdown/Compiler.pir:
13:28 dalek markdown: refactor (closer to NQP/Compiler.pir)
13:28 dalek markdown: review: http://github.com/fperrad/markdown/commit​/9cabe0a086d87e1f95a2b9b116e486a5beea7226
13:37 darbelo Damm. the shift_opcode_* functions are tricker than the push_opcode* ones
13:38 kid51 joined #parrot
13:38 darbelo Also, if we push() them in, why couldn'te pop() them out?
13:45 colomon__ joined #parrot
13:56 dalek tracwiki: v9 | jkeenan++ | PreDecemberReleaseHackathon
13:56 dalek tracwiki: credit mikehh for one revision
13:56 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecemb​erReleaseHackathon?version=9&amp;action=diff
13:56 dalek tracwiki: v10 | jkeenan++ | PreDecemberReleaseHackathon
13:56 dalek tracwiki: credit cotto for one revision
13:56 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=10&amp;action=diff
13:56 dalek tracwiki: v11 | darbelo++ | PreDecemberReleaseHackathon
13:56 dalek tracwiki: Tick another strstart use from the list.
13:56 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=11&amp;action=diff
13:57 dalek parrot: r43017 | darbelo++ | trunk (6 files):
13:57 dalek parrot: Remove unused and bitrotted GC_VERBOSE debugging output.
13:57 dalek parrot: That's also one less ->strstart to cleanup too.
13:57 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43017/
13:57 fperrad joined #parrot
14:03 kid51 darbelo ping
14:13 dalek tracwiki: v12 | jkeenan++ | PreDecemberReleaseHackathon
14:13 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=12&amp;action=diff
14:15 colomon___ joined #parrot
14:16 darbelo kid51: pong
14:18 kid51 Are you still looking at src/pmc_freeze.c?
14:19 kid51 I tried the Buffer_bufstart replacement in the 2nd of 4 groups, but it didn't work.
14:20 darbelo Not really, got sidetracked wth non-parrot stuff.
14:20 kid51 k
14:20 pmichaud ...is it noted somewhere that one cannot simply do a blind replacement of strstart with Buffer_bufstart ?
14:20 pmichaud at least, not until we refactor the substr opcode
14:21 kid51 pmichaud:  Could you add your thoughts on that to TT #1370?
14:21 pmichaud well, my thoughts on that are basically what I just wrote bove :)
14:21 pmichaud *above
14:21 kid51 If that is so, then we should stop where we are.
14:21 darbelo src/pmc_freeze.c is probably the hardest part to cleanup, since it plays scary tricks with strstart.
14:21 kid51 I'll have to check moritz's log.
14:22 pmichaud iiuc, one can replace uses of ->strstart with Buffer_bufstart when it's known that the given string isn't a substring
14:23 pmichaud I'm not sure one can always know when that's the case.  Otherwise we get to issues noted in the thread surrounding r42961.
14:23 darbelo pmichaud: 'external' strings can bring problems too.
14:23 pmichaud darbelo: yes, that also
14:24 darbelo pmichaud: But that's not the only replacements we're doing.
14:24 darbelo look at r43015 for example.
14:24 mikehh pmichaud: your docs/pdds/draft/pdd31_hll.pod is failing t/examples/pod.t
14:25 pmichaud darbelo: sure, r43015 doesn't fit the pattern I just mentioned, though.
14:25 mikehh pmichaud: all except the last examples fragment - the other PIR_FRAGMENTs appear to be more specifications rather than code
14:25 nopaste "kid51" at 70.85.31.226 pasted "src/pmc/eval.pmc: This strstart replacement passes 'make coretest'" (13 lines) at http://nopaste.snit.ch/19056
14:25 pmichaud i.e., it's not a blind replacement of ->strstart with Buffer_bufstart
14:27 darbelo I also plan on looking if there's a way we can make substr() work with _bufstart == strstart when I'm done with pmc_freeze.c
14:27 pmichaud just be careful that the solution doesn't end up being "create a new string buffer".  That will likely kill PGE and NQP performance (and everything that depends on them)
14:29 darbelo pmichaud: Yeah, other than that. The whole point of killing strstart is reducing gc pressure, creatings strings all over the place doesn't hep ther.
14:29 darbelo *help there.
14:30 kid51 pmichaud:  Could you test whether the replacements of strstart we have made in the last 15 hours have had negative effects onn PGE or NQP?
14:30 pmichaud kid51: not easily
14:30 * darbelo goes afk
14:31 kid51 Well, then, is Parrot's 'make test' inadequate for that purpose -- even though it's the only thing we have?
14:31 pmichaud I don't know how many operations are being tested using substring operands as opposed to whole strings.
14:33 pmichaud that's how I ended up with the failure case in r42961 -- the original change was assuming that substrings would never be used as an argument to that function
14:33 pmichaud it's not common to test every function for use with every possible type of string, at least not yet
14:34 pmichaud anyway, I wouldn't expect most of the changes made thus far to seriously impact PGE or NQP, but since (by necessity and design) they make heavy use of substrings, and they tend to produce a lot of substring results, it's entirely possible that some of the changes would cause things to break that we aren't testing.
14:35 pmichaud (substrings being the primary case where   ->strstart  != bufstart )
14:38 kid51 Do you mind if I quote what you've just said in TT #1370?
14:38 pmichaud not at all
14:39 pmichaud I'm by no means authoritative on this point, though.  :)
14:47 pmichaud mikehh: when does t/examples/pod.t get run?  (what make target runs it?)
14:48 pmichaud oh.... does pod.t run the PIR examples?
14:48 pmichaud ick
14:50 cconstantine joined #parrot
14:55 * kid51 needs to reboot
14:57 colomon___ joined #parrot
15:03 dalek parrot: r43018 | pmichaud++ | trunk/docs/pdds/draft/pdd31_hll.pod:
15:03 dalek parrot: [pdd31]:  Remove PIR_EXAMPLES pod directives from things that aren't examples.
15:03 dalek parrot: Reported by mikehh++ .
15:03 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43018/
15:10 mikehh pmichaud: It is part of make fulltest as well as make examples_tests as you no doubt found out
15:12 JimmyZ joined #parrot
15:12 JimmyZ left #parrot
15:13 JimmyZ joined #parrot
15:13 kid51 joined #parrot
15:14 Jimmy joined #parrot
15:14 Jimmy good evening, #parrot
15:24 slash joined #parrot
15:41 Psyche^ joined #parrot
15:44 patspam joined #parrot
16:19 theory joined #parrot
16:25 mikehh joined #parrot
16:32 darbelo WTF?
16:33 darbelo pmc_freeze keeps the suprises! I've just removed a big part of the image_io structure and everything works.
16:34 nopaste "kid51" at 70.85.31.226 pasted "Replacement of strstart in src/dynext.c -- passes make coretest and make test." (24 lines) at http://nopaste.snit.ch/19057
16:34 darbelo WTF is that packfile even there for?
16:34 mikehh_ joined #parrot
16:35 kid51 darbelo:  If you get a chance, could you look at that paste?
16:35 kid51 although it's a "blind replacement", it passes make test
16:35 kid51 so, other things being equal, we would commit it.
16:36 darbelo looking now...
16:37 mikehh joined #parrot
16:37 darbelo It seems subject to pmichaud's usual objection. If we don't solve the substr() issue we can't do that.
16:38 kid51 Alright, I'll put the patch in the ticket but won't apply it.
16:38 darbelo But, I think we can safely use Parrot_str_to_cstring() there.
16:38 * mikehh I keep dropping the internet connection - it's driving me crazy - gibber, gibber
16:39 kid51 Yeah, I was thinking, "mikehh - why not stick around for 60 seconds?"  ;-)
16:39 darbelo Parrot_str_to_cstring() uses ->strstart to build the cstring.
16:39 mikehh certainly try :-}
16:43 kid51 Hmm, I just realized that in src/dynext.c, the instances are in locations specific to Win32 or Cygwin -- which I can't test.
16:45 darbelo kid51: That's the reason they survived my first "kill strstart" push some time ago ;)
16:46 kid51 Am making note of that on wiki page: http://trac.parrot.org/parrot/w​iki/PreDecemberReleaseHackathon
16:56 nopaste "kid51" at 70.85.31.226 pasted "src/io/socket_unix.c: Replacement of strstart passes 'make test'" (13 lines) at http://nopaste.snit.ch/19058
16:56 kid51 darbelo:  There's another one for you to look at.
16:57 dalek nqp-rx: d851756 | pmichaud++ |  (4 files):
16:57 dalek nqp-rx: Add some HLL::Compiler capabilities, tests.
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​8517566efe0bf73e6ffaaf953013aea5f5186ec
16:57 dalek nqp-rx: 73f3c37 | pmichaud++ |  (2 files):
16:57 dalek nqp-rx: Update HLL::Compiler.get_exports, add t/hll/03-exports.t .
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7​3f3c37754a24b3d77340b4c2233bfb7cbf607c1
16:57 dalek nqp-rx: 5fa7530 | pmichaud++ |  (2 files):
16:57 dalek nqp-rx: Update HLL::Compiler.import, add tests.
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5​fa753035425fc99170c284959485e6c3d163799
16:57 dalek nqp-rx: 227aaf6 | pmichaud++ | build/PARROT_REVISION:
16:57 dalek nqp-rx: Bump PARROT_REVISION.
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/2​27aaf6a3434dcf9436cf2c64bb0b0ba73d7afdf
16:57 dalek nqp-rx: 31f41ef | pmichaud++ | src/ (12 files):
16:57 dalek nqp-rx: Update copyright information to The Perl Foundation.
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3​1f41ef24e37964b8c2e639583ab8eae7ab0e8d1
16:57 dalek nqp-rx: 9a9ea3d | pmichaud++ | README:
16:57 dalek nqp-rx: Update copyright information to The Perl Foundation.
16:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9​a9ea3dd16e00ae67769f77959c2968b425d794b
16:57 dalek nqp-rx: 782d140 | pmichaud++ | src/Regex.pir:
16:57 dalek nqp-rx: Update copyright information to The Perl Foundation.
16:58 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7​82d14054e9a4b6de36a36ba5782e687674d6b01
16:58 dalek nqp-rx: e2dd357 | pmichaud++ | src/stage0/ (4 files):
16:58 dalek nqp-rx: Update bootstrap.
16:58 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e​2dd3571aacd858c95ab26eb3e67b70dc2646a9e
16:59 dalek tracwiki: v13 | jkeenan++ | PreDecemberReleaseHackathon
16:59 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=13&amp;action=diff
16:59 dalek tracwiki: v14 | jkeenan++ | PreDecemberReleaseHackathon
16:59 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=14&amp;action=diff
16:59 dalek tracwiki: v15 | jkeenan++ | PreDecemberReleaseHackathon
16:59 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=15&amp;action=diff
17:03 kid51 afk
17:04 nopaste "darbelo" at 190.136.175.208 pasted "Wait, why isn't this failing?" (78 lines) at http://nopaste.snit.ch/19059
17:06 darbelo Both parrot and rakudo report "All tests successful" with http://nopaste.snit.ch/19059
17:06 darbelo Even the decnum-dynpmcs freeze-thaw test pass without a hitch.
17:09 payload joined #parrot
17:41 brooksbp joined #parrot
17:42 brooksbp hello
17:42 purl hola, brooksbp.
17:42 brooksbp is parrot based of any well-known virtual machine like SECD or CEK?
17:59 allison brooksbp: no, it's a new concept. SECD and CEK were both targeting functional languages
17:59 brooksbp so what is parrot based off?
17:59 moritz C :-)
17:59 allison brooksbp: the behavior of parrot is inspired by things like the Perl and Python interpreters, but it's not really like any of them
18:00 brooksbp So there's no close theoretical machine?
18:00 allison brooksbp: nope, it's a new idea
18:00 brooksbp Is there an explanation for how the machine works?
18:00 * brooksbp is hoping for anything but a pointer to the dev docs
18:01 allison brooksbp: no academic papers yet
18:01 allison brooksbp: what specifically are you interested in? it will help guide us in writing the papers
18:01 brooksbp Just a simple description of the parrot vm...
18:02 brooksbp I've been implementing SECD, SECD hybrid that operates on AST, ECD abstract machine, CEK, and looking into tail calls
18:02 allison brooksbp: in terms of what features it implements? or the architectural philosophy?
18:02 brooksbp just wondering what 'type' of vm/abstr-machine parrot is... or how it operates
18:02 brooksbp both, any, all
18:04 allison it's register-based, continuation-based, dynamic
18:04 allison garbage-collected, concurrent, supports exceptions, closures, continuations, coroutines
18:05 allison it has a global symbol table like Perl/Python
18:05 allison it natively runs a bytecode format and a low-level assembly language
18:05 brooksbp What are the main advantages over a simple machine like SECD?
18:06 allison tools for building dynamic languages, and a runtime that already includes most of the behavior needed for a dynamic language runtime
18:07 allison so, less development time needed to new dynamic languages up and running
18:07 allison (because less needs to be developed for a specific language)
18:07 mj41 joined #parrot
18:08 brooksbp Are there any ways to make the machine faster at the evaluation/transformation 'close to the metal' level?
18:09 allison tools to optimize a language during compilation, or optimizations for the virtual machine itself?
18:09 brooksbp the vm
18:33 chromatic joined #parrot
18:41 darbelo chromatic: ping
18:43 Whiteknight brooksp: we have optimization work yet to be done. Many of our systems are still young
18:44 chromatic pong
18:44 mikehh joined #parrot
18:45 darbelo Do you have any idea why is there a packfile in the imageio struct?
18:45 darbelo eh, image_io
18:46 darbelo the one that dirves freeze/thaw.
18:46 plobsing darbelo: its not really a packfile
18:46 chromatic I don't *know* for certain.  I've written some of the freeze/thaw code in PMCs, but I can't say that I understand the design or implementation.
18:46 darbelo I removed it (http://nopaste.snit.ch/19059) and nothing failed.
18:48 Whiteknight I don't think anybody really understands that system right now
18:48 darbelo It's a quick hack, but from what I see it's only there to put a 'header' at the start of the string.
18:48 Whiteknight not entirely
18:49 darbelo And it can do that by living in the initialization function instead of a persistant data structure.
18:50 Whiteknight darbelo: where should I be looking if I wanted to learn more, pmc_freeze.c?
18:50 darbelo Whiteknight: unfortunately, yes.
18:51 darbelo It's slightly less chtulian nowadays, but you should strill tread carefuly.
18:52 Whiteknight where is the entry point? All the functions I see there are static
18:53 Whiteknight oh nevermind, I found the public functions all the way at the bottom of the file
18:55 Whiteknight We really need to come up with a good duplicates detector, like what the freeze code uses (but more general for other places)
18:56 chromatic Isn't there a CPD plugin for C?
18:59 Whiteknight CPD?
18:59 purl CPD is probably Commission on Presidential Debates, http://www.debates.org/, which controls all Presidential debates or cut-and-paste detector http://pmd.sourceforge.net/cpd.html or run by the former chairs of the DNC and RNC with explicit purpose to exclude third-party candidates
19:00 darbelo Oh, and from the bad news department: the strstart removal blocks on a way to substr() that keeps _bufstart == strstart but doesn't totally suck performance-wise.
19:01 chromatic We need to figure out how to have slim STRINGs while still allowing for cheap substr() without buffer copies.
19:02 Whiteknight a second string header with an IS_SUBSTR flag pointing into the buffer of the first header
19:03 Whiteknight nevermind, you'd need a pointer back to the original header to prevent it from getting GC'd
19:03 darbelo Whiteknight: And a pointer to the first header, so we can mark it.
19:04 darbelo Whiteknight: exactly.
19:04 Whiteknight exactly, bad idea
19:04 darbelo Otherwise you would be able to implement it with the 'external' PObj flag.
19:05 Whiteknight parrot_string_representation_t
19:05 chromatic You don't need a pointer to the first header; it uses reference counts for COW.
19:05 Whiteknight I'm sure there are very limited numbers of combinations of encoding/charset, we could create objects to store those combinations together
19:06 Whiteknight we could also separate out the notion of a "string" and a buffer
19:06 Whiteknight where the buffer is storage, and strings point into it
19:07 Whiteknight it's an idea that would be able to save us more in terms of string constants than runtime strings though
19:07 darbelo That would make for smaller structs, but with more bookeeping.
19:07 chromatic Unless we have a clever duplicate buffer detector.
19:08 Whiteknight a build-time duplicate detector for CONST_STRINGs would be a major win, I think
19:08 Whiteknight at least in terms of memory footprint
19:08 Whiteknight but I've kicked that dead horse before
19:09 Whiteknight what's the difference between bufused and strlen?
19:10 chromatic Suppose your substr doesn't use the entire buffer.
19:10 chromatic I don't think we allow duplicate CONST_STRINGs now.
19:10 Whiteknight what if strings could have an attached "->window" object, that would provide a window on the buffer in the case of a substr?
19:11 Whiteknight if ->window != null, we have a substring and act accordingly
19:11 Whiteknight so we would have one pointer in place of strstart and strlen
19:12 chromatic I'd rather use polymorphism.
19:12 Whiteknight including the parrot_string_representation_t idea, STRING is down in size by 2 pointers, and only a little slower for the incommon cases
19:13 Whiteknight how would that work, if "$S0 = substr $S0..." would we create a new header or have to copy over the existing one?
19:14 chromatic That's an easy case; create a new parrot_string_substr_t and set a flag in the header.
19:14 chromatic Whether it's desirable to create a new struct for that case... meh.
19:14 mj41 joined #parrot
19:15 Whiteknight I was looking for literature in support of immutable strings, but most of what I found was against them
19:16 Whiteknight so I stopped looking
19:16 chromatic Really?
19:16 Whiteknight I'm reasonably sure I didn't google for "immutable strings are TEH SUXXOR", but those are the kinds of results I seem to remember seeing
19:16 Whiteknight probably need to search more
19:17 Whiteknight my memory is made of fail
19:18 chromatic Profile almost anything and see how many Parrot_str_new_COW() calls we have for cases where we know we shouldn't modify anything (such as getting the name of a class).
19:20 Whiteknight a case to be made for enforcing certain strings to be considered constant
19:21 Whiteknight create the COW reference only after we try to modify the constant string
19:21 chromatic Oh, did I mention that we have to analyze every STRING passed to subs?
19:21 chromatic If they're constant, we have to create COWs and pass those instead.
19:21 Whiteknight what do you mean by that?
19:22 chromatic STRINGs, even stored in registers, always have reference semantics.
19:22 chromatic We have no intrinsic string type with value semantics.
19:24 Whiteknight so what's the way to do all this right, if we had the opportunity to throw it out and start fresh?
19:24 chromatic Do not allow string modification in place.
19:25 bacek joined #parrot
19:25 chromatic Always return a new string header for operations which mutate.
19:25 Whiteknight without inplace modification you end up with a tonne of copies
19:25 chromatic Behind the scenes, play whatever buffer games you like.
19:25 Whiteknight </british for some reason>
19:25 chromatic We already have a ton of copies to *avoid* in-place modification.
19:26 chromatic When you find yourself working around your optimization because it breaks things, it's time to reconsider that optimization.
19:26 Whiteknight immutable strings seems to just be a more consistent COW scheme
19:27 chromatic If you need in-place modification, use a String PMC which can hide the fact that the STRING primitive is immutable.
19:27 Whiteknight that's a decent rule of thumb, but it really hides the idea that String should just be a boxed version of STRING
19:27 Whiteknight a StringBuilder would be better in my estimation
19:27 chromatic PMCs have reference semantics.
19:27 Whiteknight but that's nitpickery on my part
19:29 darbelo Except that we try to fake value semantics at the PIR level for PMCs
19:29 chromatic For fun, remove lines 614-619 of src/call/args.c.
19:29 chromatic Watch tests fail.
19:29 chromatic Debug.
19:30 chromatic darbelo, that's because we don't have intelligible lvalue semantics for PMCs.
19:30 chromatic (also because we can't store primitives in certain places such as lexpads)
19:32 mj41 joined #parrot
19:32 darbelo (args.c) That's... ugh.
19:33 chromatic See also key_string() and src/pmc/class.pmc +587
19:34 darbelo Ouch.
19:34 Whiteknight I guess I really dont understand the lvalue semantcs problem
19:34 chromatic For PMCs?
19:35 Whiteknight yeah
19:35 darbelo Whiteknight: It's easy, what happens to a PMC on the left side of a '=' ?
19:35 Whiteknight I never looked into it, only saw what was said on list
19:35 darbelo If you can't tell, then you don't have clear semantics.
19:36 Whiteknight well "=" is a syntax issue. we have set and assign ops
19:39 darbelo And what does each one do? Is the PMC a value or a reference?
19:39 chromatic What if the PMC is an aggregate?
19:41 Whiteknight ok, point illustrated.
19:41 Whiteknight again, how do we make it sane?
19:42 chromatic The best idea I've heard is to figure out the appropriate vtable entries for the behaviors we want to support.
19:46 bacek Good morning
19:46 Whiteknight hello bacek
19:46 bacek aloha Whiteknight
19:47 darbelo Is it tomorow morning already? Damm.
19:47 darbelo bacek++ # Time travel.
19:53 Whiteknight so what lvalue semantics do we even want to support? I can think of two classes: "overwrite storage with new pointer", and "set value"
19:53 Whiteknight the former wouldn't be a vtable at all
19:53 chromatic pmichaud will know better.
19:55 Whiteknight so many things like this I think would benefit from being written down
19:56 chromatic Lots of failures still in context_unify3... not to the point of debugging yet.
19:56 bacek chromatic, I just added all this failures.
19:57 chromatic Oh, I thought we were removing failures today.
19:57 darbelo Well, we can't remove them if nobody add them, right?
19:57 dalek parrot: r43019 | bacek++ | branches/context_unify3 (2 files):
19:58 dalek parrot: Add Parrot_pcc_allocate_empty_context to allocate new context without
19:58 dalek parrot: registers.
19:58 purl registers is better http://www.theregister.co.uk/2005​/10/18/wikipedia_quality_problem/
19:58 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43019/
19:58 dalek parrot: r43020 | bacek++ | branches/context_unify3 (2 files):
19:58 dalek parrot: Expose init_context function.
19:58 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43020/
19:58 dalek parrot: r43021 | bacek++ | branches/context_unify3/src (2 files):
19:58 dalek parrot: First naive try to avoid creating of many useless CallContext objetcs
19:58 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43021/
19:58 * kid51 wakes up and reads 3 hours of backscroll
19:58 moritz purl: forget registers
19:58 purl moritz: I forgot registers
19:58 bacek chromatic, no you have a lot of opportunities to remove them!
20:00 bacek s/no/now/
20:05 kid51 Is this instance of replacement of strstart valid?  http://nopaste.snit.ch/19058
20:05 mikehh joined #parrot
20:11 pmichaud Whiteknight: (assignment versus bind)  http://trac.parrot.org/parrot/wiki​/WhyDoesNQPGenerateInefficientCode
20:16 chromatic What's next on the branch, bacek?
20:16 bacek chromatic, figure out how to pass args/results...
20:17 chromatic Do you have a list of tasks we can help?
20:17 chromatic Whiteknight's not doing anything interesting at the moment.
20:17 cotto me too
20:18 * darbelo is doing something frustrating at the moment.
20:19 darbelo I welcome any excuses to get away from this goddam file.
20:20 bacek Ok, I'm dcommiting current code from my local branch.
20:20 bacek Main "task" is to understand clearly where we should push new context, how argument passing should work, etc.
20:21 bacek Next task - fix tailcall.
20:25 chromatic Let's take the context pushing out of Sub.invoke.
20:26 chromatic I can't think of anything that breaks if the new context is already in place when we call invoke.
20:28 bacek chromatic, I tried it.
20:28 bacek "invokecc"
20:28 bacek op invokecc.
20:28 bacek If Sub.invoke doesn't push context, than invokecc has to push it
20:28 chromatic Why not the *param ops?
20:29 bacek set_params?
20:29 bacek It's called way too early to push created context.
20:31 allison bacek: too early to push it, yes but not too early to create it
20:31 chromatic Where do we store it if it's created but not pushed?
20:31 bacek allison, it's actually created in set_args
20:31 dalek parrot: r43022 | bacek++ | branches/context_unify3/src/call/args.c:
20:31 dalek parrot: clone_key_arg can accept NULL
20:31 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43022/
20:31 dalek parrot: r43023 | bacek++ | branches/context_unify3/src (2 files):
20:31 dalek parrot: Move pushing of context into Sub.invoke instead of invoke_from_sigobject
20:31 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43023/
20:31 dalek parrot: r43024 | bacek++ | branches/context_unify3/src/ops/core.ops:
20:31 dalek parrot: Update passing of args/results to use current context
20:31 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43024/
20:32 bacek chromatic, ctx->current_sig
20:32 bacek same as in trunk
20:32 allison chromatic: same place we store the signature object now
20:32 bacek t/op/calling.t (Wstat: 2560 Tests: 97 Failed: 10)
20:32 bacek Failed tests:  23, 37-39, 52, 61-62, 91, 96-97
20:32 bacek Non-zero exit status: 10
20:32 bacek oookey. Much better now
20:33 chromatic Oh, I thought we removed that.  Easy enough for now.
20:33 bacek Ok, tailcall is broken.
20:33 nopaste "kid51" at 70.85.31.226 pasted "What we've committed to trunk since in last 18 hours" (613 lines) at http://nopaste.snit.ch/19060
20:33 bacek Looks like simple args/results passing works
20:34 bacek (my family waking up)
20:36 chromatic kid51, I don't think http://nopaste.snit.ch/19058 is right.
20:39 chromatic ./src/pmc/sub.pmc:390: warning: ignoring return value of ‘Parrot_pcc_init_context’, declared with attribute warn_unused_result
20:40 bacek chromatic, fixed
20:42 chromatic When building PCT: src/call/context_accessors.c:301: failed assertion 'ctx'
20:43 chromatic tailcalls?
20:43 purl tailcalls are borked
20:45 bacek tailcalls
20:45 purl tailcalls are borked
20:47 dalek parrot: r43025 | bacek++ | branches/context_unify3/src/pmc/sub.pmc:
20:47 dalek parrot: Initialize context before pushing.
20:47 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43025/
20:47 dalek parrot: r43026 | bacek++ | branches/context_unify3 (2 files):
20:47 dalek parrot: Update Parrot_pcc_init_context guards
20:48 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43026/
20:51 kid51 chromatic:  That warning:  Are you getting it in 'make coretest' or 'make test'?
20:51 * kid51 is not getting that warning on Linux/i386
20:51 kid51 Correction:  During 'make corevm' or 'make'?
20:51 bacek kid51, it's on context_unify3 branch
20:51 dalek tracwiki: v16 | jkeenan++ | PreDecemberReleaseHackathon
20:51 dalek tracwiki: http://trac.parrot.org/parrot/wiki/PreDecembe​rReleaseHackathon?version=16&amp;action=diff
20:52 bacek fib.pir is passing on r43027
20:52 kid51 Alright, then; chromatic, what problem do you see in paste 19058
20:53 chromatic kid51, if the string used in IO is the result of a substr() operation, the logical string will not start at the start of the buffer.
20:53 bacek have to go. I'll try to fix tailcalls if no-one beat me
20:53 chromatic Any advice on what to do next, bacek?
20:55 chromatic Hm, we can get rid of ->buflen.
20:55 chromatic Probably ->bufused too.
20:56 chromatic By which I mean "move them into the buffer *before* the memory location to which ->bufstart points."
20:57 chromatic Yes, that does mean the macros to access those values have to use negative offsets... but that's acceptable C black macro magic.
20:59 darbelo chromatic++ # black macro magic
21:00 Zak joined #parrot
21:04 dalek parrot: r43027 | bacek++ | branches/context_unify3/src/call/context.c:
21:04 dalek parrot: Clear registers after allocation.
21:04 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43027/
21:25 bacek joined #parrot
21:27 chromatic Oh, I see.  Create the signature (which implies a context), then fetch and push that later.
21:34 naypalm joined #parrot
22:26 Whiteknight "black macro magic" <- my favorite santana song
22:26 bacek chromatic, indeed
22:28 chromatic For the buffer we store { INTVAL refcount; INTVAL buflen; INTVAL bufused; void *bufstart; } and in the STRING we point to bufstart.
22:29 Whiteknight that doesnt decrease overall memory usage
22:29 chromatic We have to do some compile-time calculations in the header to figure out the appropriate math for the offsets to avoid any struct padding/alignment issues on weird platforms, but the macros are trivial.
22:29 chromatic Sure it does.
22:29 Whiteknight just makes accessing those fields harder
22:30 chromatic We don't have to have four bytes for buflen and four bytes for bufused in parrot_string_t.
22:30 chromatic We shrink that from 36 bytes to 28.
22:31 chromatic We fit 22% more STRING headers in the same amount of space and we don't hurt substr.
22:32 Whiteknight we can do that now inplace
22:32 chromatic Our buffer allocations get 8 bytes larger apiece, but we have the same number of allocations overall.
22:33 chromatic Combine that with compile-time combinations of encoding/charset, and we can fit 33% more STRING headers in the same amount of space.
22:33 chromatic That's like making the GC 33% more efficient.
22:39 chromatic Hah, and we could take a trick from the old tile-based video games.
22:39 chromatic Store all of the constant string text in the constant segment of the object file.
22:39 chromatic Make one buffer pointing to that.
22:40 chromatic All constant strings point to that buffer but have a different ->strstart and ->strlen.
22:40 chromatic Try to modify a constant string in place?  BLAM!
22:41 chromatic <crickets>C'mon, someone appreciate my evil brilliance.</crickets>
22:42 pmichaud +1
22:42 purl 1
22:42 Tene +1
22:42 purl 1
22:42 pmichaud chromatic: we've come to always expect such brilliance from you
22:42 Tene pmichaud: it's still nice to express appreciation.
22:44 pmichaud Tene: oh, absolutely!
22:44 purl Oh my, yes.
22:44 pmichaud I was waiting to see it in code first :-)
22:47 chromatic It's difficult to tell if I've dazzled everyone with bad ideas, with ideas fully-formed in my own mind, or if you're all at the grocery store or changing diapers.
22:51 pmichaud Ah.  I think it makes excellent sense that the buffer information be stored along with the buffer.  I'm a little surprised it wasn't that way already :-)
22:52 chromatic Yeah, we have to access it all in the same spot, and there aren't many of those.
22:52 Tene chromatic: I think it's a great idea.
22:56 colomon___ joined #parrot
22:56 pmichaud afk, time to take the family to dinner
22:56 pmichaud (no diapers here anymore, fortunately.)
23:05 davidfetter joined #parrot
23:08 chromatic The goodnews is that ->bufstart and ->buflen have macro encapsulation.  ->bufused does not.
23:21 colomon joined #parrot
23:47 mikehh joined #parrot

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

Parrot | source cross referenced