Camelia, the Perl 6 bug

IRC log for #parrot, 2012-07-03

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
01:55 Coke chromatic++
01:58 Coke pmichaud: wow, that link is subtle.
01:58 Coke Danke.
02:16 dukeleto chromatic++ lives!
04:31 alvis_ joined #parrot
04:49 fperrad joined #parrot
05:04 alvis_ joined #parrot
05:17 moritz msg whiteknight: I still get the "Lossy conversion to single byte encoding" on your branch in rakudo's socket tests
05:17 aloha OK. I'll deliver the message.
05:39 Khisanth joined #parrot
06:51 brrt joined #parrot
07:00 he joined #parrot
07:09 dalek rakudo/nom: cef4452 | moritz++ | src/core/terms.pm:
07:09 dalek rakudo/nom: do not die when assigning non-Str values to %*ENV<..> elements
07:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cef4452dcf
07:38 nopaste joined #parrot
07:45 dalek joined #parrot
07:50 he joined #parrot
08:07 lucian joined #parrot
09:20 schmooster joined #parrot
09:23 brambles joined #parrot
09:47 dalek rakudo/nom: ee8ca1a | moritz++ | src/core/Pod.pm:
09:47 dalek rakudo/nom: use fully qualified names for Pod classes
09:47 dalek rakudo/nom:
09:47 dalek rakudo/nom: that way the .perl output can be eval()ed again
09:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ee8ca1ab89
09:50 dukeleto joined #parrot
10:00 dalek nqp/toqast: 8a787d6 | moritz++ | VERSION:
10:00 dalek nqp/toqast: bump VERSION
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8a787d6320
10:00 dalek nqp/toqast: c7f76bc | moritz++ | VERSION:
10:00 dalek nqp/toqast: Merge branch 'release-2012.06.1'
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/c7f76bcd89
10:00 dalek nqp/toqast: 5a8707b | pmichaud++ | src/HLL/Compiler.pm:
10:00 dalek nqp/toqast: Add -V/--verbose-config option to HLL::Compiler (RT #62462).
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/5a8707b02d
10:00 dalek nqp/toqast: 7d3441a | pmichaud++ | src/HLL/Compiler.pm:
10:00 dalek nqp/toqast: Implement --stagestats=2; outputs memory and PMC allocation statistics
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/7d3441acc3
10:00 dalek nqp/toqast: bec0eba | pmichaud++ | src/HLL/Compiler.pm:
10:00 dalek nqp/toqast: Restore a basic dumping capability from Parrot's Data::Dumper.
10:00 dalek nqp/toqast: We really should reimplement a dumper in pure NQP, though.
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/bec0ebaae4
10:00 dalek nqp/toqast: 2bd8dcb | pmichaud++ | src/HLL/Compiler.pm:
10:00 dalek nqp/toqast: HLL::Compiler --stagestats=3 (or greater) now introduces prompts after each compilation stage.
10:00 dalek nqp/toqast: This makes it easier to determine the system resources consumed by each stage.
10:01 dalek nqp/toqast: check for system resource usage.
10:01 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/2bd8dcbbf8
10:01 dalek nqp/toqast: f16f2c5 | jnthn++ | src/how/NQPModuleHOW.pm:
10:01 dalek nqp/toqast: Stop nqp::can(EXPORTHOW, 'foo') from exploding by adding some missing bits to NQPModuleHOW.
10:01 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f16f2c591c
10:01 dalek nqp/toqast: 095a387 | jnthn++ | / (3 files):
10:01 dalek nqp/toqast: Merge branch 'master' into toqast
10:01 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/095a38746b
10:14 dalek nqp/toqast: e262e92 | jnthn++ | src/QAST/Compiler.nqp:
10:14 dalek nqp/toqast: A bit more diagnostic output.
10:14 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/e262e92660
10:14 dalek nqp/toqast: 52ba417 | jnthn++ | / (3 files):
10:14 dalek nqp/toqast: Get first pieces of QAST::Want support in place.
10:14 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/52ba417e12
10:17 dalek rakudo/toqast: 917c855 | jnthn++ | src/QPerl6/Compiler.nqp:
10:17 dalek rakudo/toqast: Disable optimizer for now; will update it for QAST later on.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/917c855af5
10:17 dalek rakudo/toqast: 471bd15 | jnthn++ | src/QPerl6/ (2 files):
10:17 dalek rakudo/toqast: Start translating a few lexicals bits to QAST.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/471bd15269
10:17 dalek rakudo/toqast: 519c853 | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: Translate various fixup code.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/519c8531e2
10:17 dalek rakudo/toqast: c3cfc12 | jnthn++ | src/QPerl6/ (2 files):
10:17 dalek rakudo/toqast: Various Op and Var translations to try and get us towards compiling hello world.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/c3cfc12dd9
10:17 dalek rakudo/toqast: 71518ca | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: Fix setting loading code.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/71518ca7ed
10:17 dalek rakudo/toqast: 86ae30b | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: PAST::Want -> QAST::Want in World.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/86ae30b358
10:17 dalek rakudo/toqast: d64eedd | jnthn++ | src/QPerl6/Actions.pm:
10:17 dalek rakudo/toqast: Disable context saving for a bit (needs updating for QAST).
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/d64eedd47f
10:19 Psyche^ joined #parrot
10:29 whiteknight joined #parrot
10:40 whiteknight good morning, #parrot
10:42 brrt good afternoon
10:47 whiteknight hello brrt
10:48 brrt i thought some more about it
10:48 brrt i don´t think you need to use a linked list
10:48 brrt (for api_jmp_buf)
10:48 brrt is it used outside of the parrot api?
10:50 brrt you can just keep its ´old´ value on the stack
10:50 whiteknight no, it is only used in the api
10:51 whiteknight I can definitely do that. The API is still not intended to be used through NCI. I'm positive there's a better way
10:52 brrt :-)
10:52 brrt the other way simply consists of me extending parrot to make a pmc extending apr_table_t and apr_array_header_t
10:53 whiteknight well, you can still use NCI, just with some functions better designed for it
10:54 whiteknight The embedding API is intended for use by code outside Parrot. From the runloop you're very much inside it
10:56 brrt the point is i want to make some objects that are ´useful´ and contain parameters from apache
10:56 brrt headers, request parameters
10:56 whiteknight right
10:56 brrt the first one is in a (hash) table structure
10:56 brrt the second one in a specific C structure
10:56 brrt i´d like to extract them ´on demand´
10:57 whiteknight right
10:58 whiteknight StructView or a custom PMC type may be the best options
10:58 brrt i guess that is so
11:23 dalek nqp/toqast: 4621c27 | jnthn++ | src/QAST/Compiler.nqp:
11:23 dalek nqp/toqast: Fix loadlibs compilation.
11:23 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/4621c2790d
11:24 dalek nqp/toqast: ef8c730 | jnthn++ | src/QAST/Compiler.nqp:
11:24 dalek nqp/toqast: Add stub for where we'll generate deserialization code later.
11:24 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/ef8c730f63
11:24 dalek nqp/toqast: 2a0ef4c | jnthn++ | src/QAST/Compiler.nqp:
11:24 dalek nqp/toqast: No blocktype implies declaration.
11:24 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/2a0ef4c774
11:25 dalek rakudo/toqast: 3e204d4 | jnthn++ | src/QPerl6/Actions.pm:
11:25 dalek rakudo/toqast: Updating various other PAST::Want usages to QAST::Want.
11:25 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3e204d407a
11:45 JimmyZ joined #parrot
11:50 JimmyZ joined #parrot
12:30 dalek rakudo/toqast: 4fc6c4b | jnthn++ | src/QPerl6/ (2 files):
12:30 dalek rakudo/toqast: Update a bunch of PAST::Var lexical lookups to use QAST::Var.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/4fc6c4b550
12:30 dalek rakudo/toqast: a4e92a9 | jnthn++ | src/QPerl6/World.pm:
12:30 dalek rakudo/toqast: Fix a get_slot_past_for_object leftover.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/a4e92a907f
12:30 dalek rakudo/toqast: 3ca0be7 | jnthn++ | src/QPerl6/Actions.pm:
12:30 dalek rakudo/toqast: Start updating EXPR action method for QAST.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3ca0be7679
12:30 dalek rakudo/toqast: 65346e6 | jnthn++ | src/QPerl6/Actions.pm:
12:30 dalek rakudo/toqast: Disable whatever-currying code for now; will need quite some updating.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/65346e6a7b
12:39 dalek rakudo/toqast: 611bfb9 | jnthn++ | src/QPerl6/Actions.pm:
12:39 dalek rakudo/toqast: .type => .returns
12:39 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/611bfb9955
12:45 PacoAir joined #parrot
12:54 dukeleto joined #parrot
13:00 dngor_ joined #parrot
13:07 JimmyZ_ joined #parrot
13:16 mtk joined #parrot
13:21 JimmyZ joined #parrot
13:38 JimmyZ_ joined #parrot
13:42 bluescreen joined #parrot
14:09 dalek nqp/toqast: 325137a | jnthn++ | src/QAST/Compiler.nqp:
14:09 dalek nqp/toqast: Ensure the QAST compiler is registered and the operations manager is available.
14:09 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/325137a679
14:40 dalek nqp/toqast: f51d4a9 | jnthn++ | src/QAST/Compiler.nqp:
14:40 dalek nqp/toqast: Honor HLL in operation lookups.
14:40 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f51d4a99a7
14:47 dalek rakudo/toqast: 8f86af5 | jnthn++ | src/QPerl6/Actions.pm:
14:47 dalek rakudo/toqast: nsentry is dead
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/8f86af5595
14:47 dalek rakudo/toqast: eaff765 | jnthn++ | / (3 files):
14:47 dalek rakudo/toqast: Move Perl 6 ops registration out into a different file, and update these to register the ops with QAST.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/eaff76587e
14:47 dalek rakudo/toqast: db3f53b | jnthn++ | src/QPerl6/ (3 files):
14:47 dalek rakudo/toqast: Add a nqp::op for perl6_container_store and update actions to use it.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/db3f53bea1
14:47 dalek rakudo/toqast: 673fc87 | jnthn++ | src/QPerl6/Ops.pm:
14:47 dalek rakudo/toqast: Fix some bogus whitespace.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/673fc87fb2
14:47 dalek rakudo/toqast: 567eb74 | jnthn++ | src/QPerl6/Actions.pm:
14:47 dalek rakudo/toqast: perl6_booleanize => p6bool
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/567eb7420b
14:47 dalek rakudo/toqast: ccd30a7 | jnthn++ | src/QPerl6/ (2 files):
14:47 dalek rakudo/toqast: perl6ize_type => p6type
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/ccd30a7879
14:47 dalek rakudo/toqast: 5761ab7 | jnthn++ | src/QPerl6/ (2 files):
14:47 dalek rakudo/toqast: perl6_take_dispatcher => p6takedisp
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/5761ab7605
15:11 dalek rakudo/toqast: 3e84f10 | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Look for QAST::Node instead of PAST::Node.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3e84f104bc
15:11 dalek rakudo/toqast: 71fb485 | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Fix meta-op code gen a bit.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/71fb485724
15:11 dalek rakudo/toqast: 1a88ffa | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Translate various control structures over to QAST.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/1a88ffaf4d
15:21 contingencyplan joined #parrot
15:59 dukeleto joined #parrot
16:04 dmalcolm joined #parrot
16:08 zby_home joined #parrot
16:13 jashwanth joined #parrot
16:17 pmichaud last week (or so) I ran into a problem where Rakudo would bump up against Parrot's recursion limit; I resolved that problem by having Rakudo bump up the recursion limit when it starts.
16:17 pmichaud I have a related question now.
16:17 pmichaud (and looking for ideas / advice)
16:17 pmichaud when Rakudo or any Parrot program hits the recursion limit, Parrot throws an exception, as it's designed to do
16:17 pmichaud the exception can then be caught by a handler
16:18 pmichaud however, the handler is somewhat stuck, because it cannot turn around and make any subroutine or method calls, because those would also exceed the recursion limit
16:18 pmichaud so.... what to do?
16:41 whiteknight pmichaud: interesting quandry
16:41 whiteknight Honestly, I wonder if there's benefit in having a recursion limit at all, by default
16:42 whiteknight or, if we hit that limit, add on a small emergency "bump" to enable error handling
16:42 pmichaud sorear++ mentions on #perl6 the possibility of a soft limit
16:45 moritz whiteknight: it's useful for detecting bugs
16:45 whiteknight moritz: yes, but if it's a source of new bugs, that defeats the purpose
16:46 whiteknight or, if we had a limit we could toggle on and off
16:46 whiteknight or a soft limit seems good too
16:46 whiteknight (depending on desired semantics)
16:47 pmichaud this would be kind of off-the-wall, but one solution would be to have the 'recursion limit exceeded' exception also disable the limit (or set it very high).
16:47 pmichaud the handler could then set it back down again after it's been handled
16:47 pmichaud there might be some issues there that handlers not expecting the exception might not handle it properly, though.
16:47 pmichaud (since the default is for a handler to 'catch everything' iirc)
16:48 moritz another crazy idea
16:49 pmichaud afk, kid shuttle
16:49 moritz only trigger the exception on an exact match o recursion depth, rather than >=
16:49 moritz that way it's the user's choice whether ot unwind the stack after such an exception
16:49 pmichaud that could work also, except if somehow your handler leave things in a state where you're already nested above the limit
16:50 moritz well, then you won't have that protection in future
16:51 moritz maybe something like  (depth > 0 && depth % limit == 0)
16:56 moritz parallel make is broken for me on parrot master
16:58 moritz oh wait
16:58 moritz stale Makefile
16:59 whiteknight if we had an exact == on recursion limit, we would get the exception again when the handler returned
16:59 whiteknight we probably want a leading edge trigger, so it only throws when we hit it the first time while incrementing
17:00 * moritz thinks he detects an electrical engineer speaking :-)
17:02 whiteknight ....no....
17:37 dalek rakudo/nom: 3bc91c1 | pmichaud++ | src/Perl6/Grammar.pm:
17:37 dalek rakudo/nom: Recognize obsolete forms of rand() and rand(N), per STD.pm.  Fixes RT #113968.
17:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3bc91c1cf7
17:52 birdwindupbird joined #parrot
17:56 dukeleto joined #parrot
18:48 kjs joined #parrot
18:49 lucian joined #parrot
18:55 brrt joined #parrot
19:20 rich joined #parrot
19:25 arnsholt joined #parrot
19:36 brrt joined #parrot
19:47 chromatic joined #parrot
19:47 chromatic pmichaud, ping
19:47 pmichaud chromatic: I have to depart for about 5 mins; will pong on return
19:48 chromatic I'll be here.
19:50 whiteknight chromatic!
19:51 chromatic Turns out the only time I have time to work on Parrot these days is when suffering migraines. Who knew?
19:54 alvis_ joined #parrot
19:54 chromatic Did you see the enhanced sweep 0 branch?
19:56 whiteknight I saw it go by in the feed, I haven't looked at the changes yet
19:56 brrt joined #parrot
19:56 chromatic Essentially all it does is recycle all PMCs in the youngest generation if they're marked with the early_gc flag.
19:56 chromatic That means you can write:
19:57 chromatic needs_destroy $Px
19:57 chromatic sweep 0
19:57 pmichaud pong
19:57 chromatic and reclaim $Px without having to do a full mark and sweep.
19:57 chromatic pmichaud, how much work is it to change one of your code generators (something in LTM might be a big benefit) with the manual escape analysis I mentioned in your GC ticket?
19:58 pmichaud chromatic: well, your ticket made it sound like a lot of work.
19:58 whiteknight chromatic: it looks .... dangerous
19:58 chromatic The hard part is figuring out the expected lifespan of a PMC.
19:59 whiteknight chromatic if I have scope Foo() with early pmcs, and then call into Bar() with early PMCs, it seems like a sweep 0 in Bar will kill referenced PMCs in Foo
19:59 chromatic Yeah.
20:00 pmichaud what could be helpful for debugging purposes is if I can mark a PMC somehow as "I expect this to be destroyed", and then get an exception (along with the PMC referencing it) if it ends up being marked.
20:00 pmichaud then I could do  "destroy_ready $Px"  and "null $Px" and "sweep 1" and find out what is still referencing it.
20:01 chromatic That's maybe four lines of code.
20:01 pmichaud but really, my ticket was less about finding dead PMCs and more about avoiding the panic.
20:01 pmichaud I don't see how "needs_destroy" would help my calling-many-subs example, for instance.
20:01 chromatic I had the mental energy to figure out alternate memory usage problems but not to avoid the panic.
20:02 chromatic Let me read that example again.
20:03 whiteknight the panic we can definitely avoid
20:03 whiteknight it's just a small matter of code
20:03 chromatic Many subs we could fix if we marked recyclable continuations as early GCs.
20:03 chromatic We know when we're not storing those continuations.
20:03 pmichaud the problem is that *any* pmc allocation in that situation causes a panic.
20:04 pmichaud where the situation is that parrot believes it should be allowed to allocate more memory (based on total memory size of the system), and the system ultimately says "No", even though Parrot is already using 200x more memory than it needs.
20:04 chromatic Where "needs" means "trading memory for time" of course.
20:05 pmichaud Yes, it may mean that.
20:05 chromatic On the extreme side of memory parsimony, we could do a GC run for every PMC allocation.
20:06 pmichaud but if  $P0 = new 'Something'  can cause a panic even when Parrot is using hundreds of times more memory than the working set actually requires... that seems off to me.
20:06 pmichaud but I'm not wanting to debate in extremes here, or to argue about what a proper working set size should be.
20:06 chromatic The current tuning is "reach the end of a pool with a size of some tuned fraction of total memory, and then do a GC run".
20:06 whiteknight Old behavior, I think, was to do a sweep before allocating a new arena
20:06 kjs Lurking on this discussion, I'm reminded of a bit of code I wrote for M1. The code generator needs registers all the time to store numbers and results when evaluating expressions. It's really easy to run out of 240 registers very quickly. Instead, M1's code generator "freezes" registers when they are assigned to real symbols (declared as variables), whereas others aren't frozen. Then, whenever a register is seemingly no longer used, it's "free'd()"; t
20:06 kjs "free_reg()" function checks whether the reg wasn't frozen (a symbol!); if it is, do nothing, if it isn't unuse the register. Same could apply: PMCs are needed for temp results, but at some point not longer needed.
20:06 whiteknight the newer behavior, of eating up memory until a threshold definitely trades performance for memory usage
20:07 whiteknight maybe we need some kind of a flag to switch between the two behaviors
20:07 chromatic A flag adds complexity.
20:07 pmichaud what I do know is that on systems with limited swap or memory availability, having parrot panic when it really has other options available to it seems suboptimal.
20:07 chromatic Yeah, the panic is a problem in any system.
20:07 whiteknight a flag doesn't add nearly so much complexity
20:07 chromatic There ought to be a way to say "Try to get more memory, but if not, try to run the GC, and if that finally doesn't work, admit you're in trouble."
20:08 pmichaud that was my suggestion (here on #parrot), yes.
20:08 whiteknight yes, that is doable also (but doesn't add any less complexity than checking a flag)'
20:08 whiteknight I'm cool with with whatever path people want to take
20:08 chromatic Ultimately the real improvement comes from what kjs said.
20:09 pmichaud I don't have a specific solution in mind.  I know that we're getting more people trying to build rakudo and parrot stuff on small-memory systems (e.g., arduino, raspberry pi), and although they'll accept panics, it's hard to explain the reason why.
20:09 chromatic Some things are (in C or Perl 5 terms) stack/scope allocated. Some things are heap allocated. Telling the difference is important.
20:10 whiteknight so do we need a "destroy_this $Px" opcode, that a code generator can jam in where necessary?
20:10 pmichaud part of my subcall example was to point out that any pmc allocation could trigger the panic, not just those that might result in large data structures.
20:10 pmichaud I see "destroy_this" as being more debugging than production.
20:11 whiteknight explicitly saying what to free and when sure beats any heuristic with false positives or negatives
20:11 pmichaud yes, but it can make for debugging hell, too.
20:11 chromatic Part of the motivation for needs_destroy is finalization, a la P5.
20:12 pmichaud yes, I understand that part of needs_destroy.  For the stuff we're working with, getting code gen to recognize it seems problematic.
20:13 whiteknight okay, let's look at the root problem first. GC shouldn't panic on failed memory allocation if it is possible to perform a sweep and reclaim things that way
20:13 whiteknight any other solutions are just window dressing
20:14 pmichaud effectively, part of the problem we have now is finding out the size of our data structures, or knowing where to prune.
20:14 whiteknight If an arena allocation fails we attempt mark/sweep. if mark/sweep fail, then we panic
20:14 pmichaud where "we" == "rakudo/nqp"
20:14 pmichaud something is eating up lots of memory, and although we believe we're releasing the references to the parse tree, something is still keeping it alive.
20:15 whiteknight pmichaud: so a tool that traced out the object graph and wrote it to file would be very useful
20:15 pmichaud yes, that tool would be very useful.
20:15 whiteknight okay. That will be item #2 on my list
20:15 whiteknight first is to fix this panic
20:15 pmichaud also, fwiw, the panic is not super-high priority to rakudo/nqp
20:16 pmichaud I just encountered it while trying to come up with a response to a question on p6c
20:16 pmichaud however, fixing the panic would enable us to better figure out what is happening on low-memory systems
20:16 whiteknight we haven't been getting a lot of feedback about priority TO-DO items lately, so anything we hear about has to be high on our list
20:16 chromatic Would that four-line patch I mentioned (throw an exception when marking a PMC flagged for early GC) be more useful?
20:16 whiteknight chromatic: that sounds like it, yes
20:17 pmichaud tracing the object graph would be most useful at the moment, I think.  four-line-patch to signal when a flagged PMC is marked would be useful, too.
20:17 chromatic It's a lot simpler to write that small patch than to serialize the object graph.
20:17 pmichaud agreed.
20:18 chromatic That at least gives you the possibility to do some debugging, however manual.
20:18 pmichaud correct.
20:18 chromatic Alright, give me a few minutes.
20:18 pmichaud thanks.
20:18 chromatic whiteknight, I still think there's stuff to salvage from the early_gc branch.
20:19 whiteknight chromatic: yes
20:19 chromatic P5 has the notion of temp storage, which is essentially a stack.
20:19 chromatic If needs_destroy were associated somehow with contexts and sweep 1 respected that, we could avoid the problem you mentioned.
20:20 whiteknight chromatic: ah, that's a great idea. The GC could contain a list of context/pmc pairs in a stack-like list
20:20 whiteknight wait, maybe not
20:20 chromatic Modulo the complexities of cycles in the continuation graph.
20:20 whiteknight Best we could do is free the early PMCs when the context was freed
20:21 whiteknight because with continuations floating around, a context is not dead until it's really really dead
20:21 chromatic That might be even easier than repurposing sweep 1.
20:21 whiteknight last I heard, bacek was talking about deprecating the sweep and needs_destroy opcodes entirely
20:22 whiteknight so our plans for those are not too aggressive. Any improvements or semantic modifications may be welcomed
20:22 chromatic There still has to be something at the PIR level to say "Finalize this as soon as possible".
20:22 whiteknight yes. Figuring out what that should be is very hard
20:22 whiteknight I've spent much time on the topic. Lots of thinking, few results
20:25 chromatic pmichaud, do you prefer a Parrot exception or an assert?
20:26 pmichaud Parrot exception, likely.  I think I need to be able to catch it so I can introspect whatever-it-is that is holding the reference.
20:26 chromatic Can do.
20:26 pmichaud although I suppose I could it in gdb
20:26 chromatic If PIR/NQP/whatever's more fun, a Parrot exception it is.
20:27 pmichaud but introspection at the PIR level would be nicer (i.e., I could Data::Dumper the thing, or at least query its class type)
20:27 chromatic My thinking too.
20:29 whiteknight With a quick sed script, we could change Parrot_gc_mark_PMC_alive to take two parameters, the parent and the child
20:29 whiteknight After that, serializing the object graph would be trivial
20:29 whiteknight probably would want to pass in a special flag to the build
20:30 pmichaud downstream users would need to switch it also, yes?
20:30 pmichaud or are we using an improper API to mark there, then?
20:30 whiteknight I don't know. Need to think about this much more
20:31 whiteknight this is a very clear case of more features == worse performance
20:34 chromatic I'm running the test suite now.
20:34 chromatic $ ./parrot pmc_early_gc.pir
20:34 chromatic GC_GMS marking a PMC flagged for early collection!
20:34 chromatic current instr.: 'go_crazy' pc 24 (pmc_early_gc.pir:10)
20:34 chromatic called from Sub 'main' pc 16 (pmc_early_gc.pir:5)
20:35 chromatic Hm, I need to put the offending PMC in the payload somehow.
20:56 chromatic pmichaud, I just pushed a branch with those changes for you.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: 051857b | chromatic++ | src/pmc/exception.pmc:
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: Added set_pmc_keyed_str() VTABLE to Exception PMC.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: review: https://github.com/parrot/parrot/commit/051857bd98
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: 8896a87 | chromatic++ | / (3 files):
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: Added GC exception when marking early_GC PMC.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception:
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: This may cause weird errors, depending on your use of the needs_destroy opcode.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: Because nothing currently sweeps up early_GC PMCs, they may exist somewhere in
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: your object graph.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception:
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: That does allow an interesting debugging possibility, however: mark such PMCs
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: and catch the exceptions to see if you have references to them from places you
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: don't expect.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception:
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: Note that a couple of the t/op/gc.t tests fail. Those failures make sense to
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: me, but the tests themselves don't. A little more sanity there might make the
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: intentions more obvious.
20:57 dalek parrot/chromatic/early_pmc_mark_throws_exception: review: https://github.com/parrot/parrot/commit/8896a87ec7
21:14 brrt joined #parrot
21:14 brrt i basically need to get the Parrot_Interp from a Parrot_PMC
21:14 brrt and it should work and not be ugly
21:15 brrt and, mind you
21:15 brrt not call any Parrot_api_* calls
21:17 pmichaud chromatic: btw, I don't know if I mentioned it at yapc::na, but we now have a start on a p6 "perldoc"-like tool:  https://github.com/perl6/doc   and http://doc.perl6.org/  .  It's still in its infancy, of course, but it's started.
21:17 pmichaud I'll look at the gc branch in the next day or so.
21:23 brrt left #parrot
21:27 dalek Rosella/gh-pages: 4ed6c17 | Whiteknight++ | / (2 files):
21:27 dalek Rosella/gh-pages: [Xml] Add stub doc file for Xml
21:27 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/4ed6c17279
21:27 dalek Rosella/gh-pages: c868c44 | Whiteknight++ | libraries/xml.md:
21:27 dalek Rosella/gh-pages: [Xml] fill in a few functions
21:27 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/c868c44dc3
21:27 dalek Rosella/gh-pages: 92d4588 | Whiteknight++ | libraries/xml.md:
21:27 dalek Rosella/gh-pages: [Xml] Flesh out most of the documentation.
21:27 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/92d45888d4
21:27 dalek Rosella: b9e79c8 | Whiteknight++ | src/string/String.winxed:
21:27 dalek Rosella: [String] small doc addition
21:27 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/b9e79c83b4
21:27 dalek Rosella: d1d391f | Whiteknight++ | s (2 files):
21:27 dalek Rosella: [Utilities] Add a new rosella_doc utility, for creating markdown docs for Rosella.
21:27 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/d1d391f761
21:27 dalek Rosella: dd45683 | Whiteknight++ | src/query/Iterable.winxed:
21:27 dalek Rosella: [Query] Iterable.any() was broken. It's consuming an extra value, which disappears when we read the stream. Make this problem go away when we don't have a predicate, and put in a TODO note to properly fix it later
21:27 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/dd456833bc
21:27 whiteknight brrt: I think the ParrotInterpreter PMC type has a get_pointer vtable which will automatically be called in NCI
21:27 whiteknight brrt: what do you need it for?
21:36 dalek Rosella: bde7615 | Whiteknight++ | / (18 files):
21:36 dalek Rosella: [Xml] Xml is now stable.
21:36 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/bde7615717
21:48 kid51 joined #parrot
22:44 preflex joined #parrot
23:41 tokuhirom joined #parrot
23:50 plobsing joined #parrot

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

Parrot | source cross referenced