Camelia, the Perl 6 bug

IRC log for #parrot, 2011-12-09

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:06 NotFound nine: ping
00:07 NotFound whiteknight: ping
00:12 NotFound unping
00:29 kid51 joined #parrot
00:40 nbrown joined #parrot
01:10 dalek parrot: 8f6cec8 | NotFound++ | include/parrot/pointer_array.h:
01:10 dalek parrot: simplify Parrot_pa_insert, avoiding allocating a chunk when there are
01:10 dalek parrot: removed cells available
01:10 dalek parrot: review: https://github.com/parrot/parrot/commit/8f6cec8e81
01:21 bacek_at_work ~~
01:21 bacek_at_work !pr
01:21 aloha Open pull requests for parrot/parrot.github.com : 0 pull requests open ()
01:21 bacek_at_work hmmm
01:21 bacek_at_work !pr
01:21 aloha Open pull requests for parrot/parrot : 1 pull requests open (gitster:1)
01:31 davidfetter joined #parrot
01:41 benabik joined #parrot
01:44 dalek Guitor: d2ddd6e | NotFound++ | examples/text.winxed:
01:44 dalek Guitor: fix example text very slow on large files
01:44 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/d2ddd6e2db
02:28 Nol888 joined #parrot
02:32 jiang joined #parrot
02:37 jiang joined #parrot
02:38 shell joined #parrot
02:38 jiang left #parrot
03:26 cotto ~~~
04:21 rfw joined #parrot
04:29 davidfetter joined #parrot
05:00 dalek Guitor: 217ce20 | NotFound++ | src/GuitorNci.winxed:
05:00 dalek Guitor: regroup a bit xlib functions by signature
05:00 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/217ce20d84
05:06 davidfetter joined #parrot
05:36 dalek Guitor: 478b2d0 | NotFound++ | src/Guitor.winxed:
05:36 dalek Guitor: change creation and destruction of XftDraw in text drawing
05:36 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/478b2d0fba
05:58 alvis joined #parrot
06:07 dalek rakudo/nom: 1a9a4a5 | moritz++ | src/core/Num.pm:
06:07 dalek rakudo/nom: return integers from rounders
06:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a9a4a5993
06:07 dalek rakudo/nom: 638029b | moritz++ | t/spectest.data:
06:07 dalek rakudo/nom: run perl.t
06:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/638029b80f
06:17 dalek Guitor: a19e697 | NotFound++ | src/Guitor.winxed:
06:17 dalek Guitor: get 'detail' in focus events
06:17 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/a19e69777a
06:18 JimmyZ joined #parrot
06:29 dalek rakudo/nom: 011993e | moritz++ | t/spectest.data:
06:29 dalek rakudo/nom: remove conflict marker, JimmyZ++
06:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/011993e1e2
06:43 JimmyZ joined #parrot
06:47 dalek rakudo/nom: 6d0867e | moritz++ | t/spectest.data:
06:47 dalek rakudo/nom: fix t/spectest.data, JimmyZ++ again
06:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d0867eb50
07:55 mj41 joined #parrot
08:01 code_in_the_shell joined #parrot
09:24 AzureStone joined #parrot
09:33 lucian joined #parrot
11:15 dalek rakudo/nom: 0eed6ff | moritz++ | t/spectest.data:
11:15 dalek rakudo/nom: run operator overloading tests
11:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0eed6ff1e6
11:36 jsut_ joined #parrot
11:40 nbrown joined #parrot
12:36 dalek rakudo/nom: 68d0b8f | moritz++ | src/Perl6/Grammar.pm:
12:36 dalek rakudo/nom: fix circumfix dispatch, jnthn++
12:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68d0b8fceb
12:42 Nol888 joined #parrot
12:45 alin joined #parrot
12:52 alin joined #parrot
13:04 dalek Rosella: 67899c4 | Whiteknight++ | s (4 files):
13:04 dalek Rosella: Add an inst_wxheader install step to add winxed header files to the install. Include all the Rosella include files
13:04 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/67899c4fae
13:04 dalek Rosella: a8ff7fa | Whiteknight++ | s (5 files):
13:04 dalek Rosella: several cleanups
13:04 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/a8ff7facaf
13:04 dalek Rosella: 45f985a | Whiteknight++ | setup.winxed:
13:04 dalek Rosella: cleanups
13:04 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/45f985a8bb
13:04 dalek Rosella: 485a25e | Whiteknight++ | s (9 files):
13:04 dalek Rosella: Add include files for the rest of the stable libs.
13:04 dalek Rosella:
13:04 dalek Rosella: Update CommandLine.Arguments to parse positionals after flags have been parsed. Update mk_winxed_header to have a --rosella mode that does some Rosella-specific stuff.
13:04 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/485a25e1fc
13:32 Yuki_N joined #parrot
13:47 JimmyZ joined #parrot
14:55 JimmyZ joined #parrot
15:25 contingencyplan joined #parrot
15:29 nine NotFound: pong
15:31 Psyche^ joined #parrot
15:34 NotFound nine: I've made a tiny change to Parrot_pa_insert in master. Can you check if that change has some effect on your problem?
15:37 nine NotFound: I'll gladly do. But I finally understood for which kind of buf I should be looking. And as long as those bugs are there, any change to Parrot_Pointer_Array (like my "workaround") can only hide or reveal these bugs.
15:39 NotFound That was the idea, seeing if the change has some effect that can reveal the problem.
15:40 NotFound It avoids creting a chunk when there is no need for it, so the behaviour should be a bit more predictable.
15:40 nine mls told me to add  if (!Parrot_gc_pool_is_owned(interp, self->pmc_allocator, item)) abort(); to gc_gms_mark_pmc_header which revealed plenty of points where my thread still accesses the main threads's data directly.
15:42 NotFound That probably should be permanently added, idef'ed on PARROT_DEBUG, and some other macro if the debug build goes excesively slow.
15:44 nine Yes. Till now the assumption that there is only one GC active in the whole process was baked into many places. I should have guessed that changing such things will be difficult
15:44 nine The line will help discover many more of these...
16:49 moritz what's an easy way to print a backtrace from PIR?
16:54 moritz ah, getinterp -> context -> .backtrace
17:02 moritz hm, but that doesn't give me the strings
17:02 moritz sigh
17:16 benabik The backtrace appears to be an array of hashes?
17:30 dukeleto msg tadzik https://github.com/tadzik/Module-Starter needs a license. what is your preference?
17:30 aloha OK. I'll deliver the message.
17:33 dalek chimera: 64cba3b | dukeleto++ | LICENSE:
17:33 dalek chimera: add a license file
17:33 dalek chimera: review: https://github.com/letolabs​/chimera/commit/64cba3bb67
17:40 davidfetter joined #parrot
17:42 fperrad joined #parrot
18:15 tadzik dukeleto: MIT, as usual
18:16 jsut joined #parrot
18:38 cotto ~~
19:09 tadzik ~~
19:21 nine woohoo....one step forward!
19:22 benabik two steps back?
19:23 nine hope not :)
19:23 nine Just got a very simple test program to run stable without any strange workarounds or memory leaks
19:25 nine There are just too many globals in Parrot...
19:38 davidfetter_ joined #parrot
19:38 moritz sounds like p5 :/
19:38 mj41 joined #parrot
19:38 moritz and I'm afraid it's typical for a piece of software that hasn't embraced concurrency from the very start
19:44 dukeleto moritz: at least we don't have a global interpreter lock :)
19:45 dukeleto moritz: parrot has at least been thinking about concurrency from the start. There was some kind of implementation of Software Transactional Memory in the early days.
19:45 dukeleto moritz: but i agree, we have not embraced from the start
19:45 sorear does Parrot support two threads sharing a single heap yet?
19:46 sorear or do you still have to use proxy objects like Perl5?
19:46 dukeleto sorear: reasonably sure we still require proxy objects, but whiteknight/bacek would know best
19:47 dukeleto sorear: a lot is changing in parrot threads currently, not sure of the current status
19:48 sorear I think there are valid arguments for a Perl5/Python like setup where two threads are not allowed to use the same heap concurrently
19:48 sorear it allows much more flexibility with regards to lock-free data structures
19:49 dukeleto sorear: nobody in the python world seems to like the GIL
19:49 sorear like how Perl 5 caches the stringification of numbers
19:50 sorear dukeleto: didn't early versions of Python use per-dictionary locks?
19:50 dukeleto sorear: ENOCLUE
19:51 dukeleto all i know is Perl 5 caches multiple representation of a SV inside the SV, not sure how perl 5 threads deal with that
19:52 dukeleto i.e. stringification of a float, numification of an int
19:52 dukeleto which is why Perl 5 variables end up being 22 bytes each, empty
19:52 dukeleto or something around that
19:52 dukeleto it is convenient, but surely not memory-efficient
19:52 PerlJam 22? I didn't think they were that small
19:53 dukeleto PerlJam: 22 bytes if empty, iirc. But everything could have changed since I last looked.
19:53 dukeleto PerlJam: that depends on perl version and the phase of all of saturns moons, as well :)
19:53 sorear dukeleto: perl 5 threads do not share access to the same SV, ever
19:54 dukeleto sorear: so caching stringification of a number does not happen, unless there is an additional caching layer
19:54 PerlJam yeah, the last time I looked (years ago) I recall that they were something on the order of 60 bytes empty.  and I know some optimization have happened in the mean time, but I still didn't think they'd gotten down to 22 bytes
19:55 sorear dukeleto: perl 5 is even worse off than Python - since there's no GIL, an interpreter cannot be shared between threads
19:55 sorear dukeleto: perl 5 threads are evolutionarily related to the perlwin32 fork(2) emulation
19:56 sorear PerlJam: a SV is of highly variable size
19:56 sorear PerlJam: a SV has a "head" (always 4 words) and a "body" (changes size depending on what is stored)
19:57 dukeleto sorear: interesting
19:58 sorear the "head" contains the flags, the refcount, a pointer to the body, and a spare word
19:59 sorear "small" types like SVt_IV use the spare word, so my $x = 5; is only 16 bytes on x86
19:59 sorear also, don't be mislead by the size of the structs in sv.h; the allocation is frequently smaller
20:02 sorear e.g. if the flags say there is a valid numeric value, it might be found 16 bytes after the start of the data depending on offsetof(xiv_u.xivu_iv, struct xpviv)
20:03 sorear so, SvANY(sv) will point (no body allocated for SVt_IV) to ... 16 bytes before the spare word
20:04 sorear every SVt_XXX define establishes the size of the allocated data area, and how much is subtracted from the pointer
20:04 * moritz wonders what price perl 5 pays for such trickeries
20:04 moritz is that why people are afraid of writing XS code?
20:05 lucian joined #parrot
20:11 sorear moritz: well, it does make shared-memory multitasking effectively impossible
20:12 sorear although there are quite a few people who will tell you that SMP is on the way out anyway and message-passing is the only way to be truly scalable
20:12 sorear ... I have to wonder if these people are Perl 5 and Python programmers with a good dose of the Stockholm
20:15 sorear moritz: the Perl 5 memory management hacks are pretty well hidden behind the API
20:15 sorear SvPV() gets a string value from any type of SV
20:17 senf_statt_oel joined #parrot
20:21 dmalcolm joined #parrot
20:32 zby_home joined #parrot
20:40 dalek Guitor: 2cffb81 | NotFound++ | src/Guitor (2 files):
20:40 dalek Guitor: improve selections, select, copy and middle button paste in EditBox
20:40 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/2cffb81e55
20:48 benabik o/ #particle
20:48 benabik Uhm.
20:48 benabik #parrot
20:48 * benabik should perhaps rely on tab-completion less.
20:49 particle fine, i won't wave back :P
20:49 lucian joined #parrot
20:51 benabik particle: Should we rename the channel so my first wave was accurate?
20:51 particle i am large, i contain multitudes.
20:51 particle \o #benabik :)
20:53 benabik :-)
20:56 alin joined #parrot
21:08 patspam joined #parrot
21:16 nine sorear: Parrot in the threads branch does indeed use proxy objects for shared data and uses green threads for scheduling updates to shared data on the data owning thread. The upside of this system is that single threaded code runs completely lock free. So unlike Perl 5 nobody pays the penalty of thread support just because it's compiled in
21:17 nine sorear: of course the downside is that writing to shared data is rather expensive...
21:23 sorear nine: ...do you know what the Perl 5 "thread performance penalty" is?
21:26 nine sorear: frankly, no. Either it's an urban myth or substantial. But reminds me that I wanted to try it out sometime... I've heard from many different sides that it's a big hit
21:27 sorear nine: it's substantial but Parrot has to pay it
21:27 nine What do you mean?
21:28 sorear nine: without threads enabled, Perl 5 uses globals everywhere
21:28 sorear nine: with threads enabled, Perl 5 passes a Perl5Interpreter *my_perl pointer to every single function
21:28 sorear now, does every single Parrot function take a Parrot_Interp pointer?
21:29 nine sorear: pretty much
21:29 sorear the performance penalty of using threads in Perl 5 has to do with all the extra parameter passing
21:30 whiteknight joined #parrot
21:31 nine So Parrot is paying this penalty before it even got thread support...
21:31 sorear nine: popular wisdom in #p5p is that the thread penalty is around 10% for most workloads
21:32 dalek Guitor: 8bfe957 | NotFound++ | src/Guitor.winxed:
21:32 dalek Guitor: add a method getTextxOff to Drawable that forwards to its font
21:32 dalek Guitor: review: https://github.com/NotFoun​d/Guitor/commit/8bfe957e24
21:33 sorear nine: be careful with old documentation.  old Perl versions had something called "5005threads" which were quite different from the modern system (called "ithreads")
21:36 rfw joined #parrot
21:39 dalek parrot/threads: 8f6cec8 | NotFound++ | include/parrot/pointer_array.h:
21:39 dalek parrot/threads: simplify Parrot_pa_insert, avoiding allocating a chunk when there are
21:39 dalek parrot/threads: removed cells available
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/8f6cec8e81
21:39 dalek parrot/threads: f356ba9 | nine++ | / (4 files):
21:39 dalek parrot/threads: Merge branch 'master' into threads
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/f356ba969a
21:39 dalek parrot/threads: 5587496 | nine++ | src/gc/gc_gms.c:
21:39 dalek parrot/threads: Let only the GC in the main thread mark PMCNULL since it's shared between all threads.
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/558749624f
21:39 dalek parrot/threads: a3afd65 | nine++ | src/gc/mark_sweep.c:
21:39 dalek parrot/threads: Only mark code segments in the main thread
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/a3afd65f99
21:39 dalek parrot/threads: a95919a | nine++ | src/pmc/sub.pmc:
21:39 dalek parrot/threads: Don't mark pack file views in secondary threads
21:39 dalek parrot/threads:
21:39 dalek parrot/threads: Pack files (code) is considered read only and handled by the main
21:39 dalek parrot/threads: thread. No need to mark it in secondary threads.
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/a95919ae3a
21:39 dalek parrot/threads: fd880a8 | nine++ | src/pmc/parrotinterpreter.pmc:
21:39 dalek parrot/threads: Create proxies for iglobals in clone_interpreter
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/fd880a8b5d
21:39 dalek parrot/threads: 894d6e2 | nine++ | src/pmc/parrotinterpreter.pmc:
21:39 dalek parrot/threads: Create a proxy for HLL_info in clone_interpreter
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/894d6e2bdb
21:39 dalek parrot/threads: 39f333d | nine++ | src/pmc/parrotinterpreter.pmc:
21:39 dalek parrot/threads: Create a proxy instead of cloning class_hash in clone_interpreter
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/39f333d723
21:39 dalek parrot/threads: f874fce | nine++ | src/pmc/parrotinterpreter.pmc:
21:39 dalek parrot/threads: Remove some vtable/class_hash code thats hopefully covered by the proxy
21:39 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/f874fce3d7
21:39 dalek parrot/threads: 260ad57 | nine++ | src/pmc/parrotinterpreter.pmc:
21:39 dalek parrot/threads: Use a proxy for pbc_libs as well
21:40 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/260ad575fb
21:43 nine whiteknight: would be great if you could have a look at these commits and tell me if they make any sense to you. I think I don't know even half of what I should know to meddle with this stuff ;)
21:49 whiteknight nine: okay, I can look later
21:52 perlite_ joined #parrot
21:58 nine Is there a way how I can create a PMC that represents the current interp? Parrot_pmc_new would call Parrot_ParrotInterpreter_init which would create a whole new interp. I just need a PMC where I can set ->interp
22:01 NotFound nine: VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_INTERPRETER);
22:01 NotFound Is what the getinterp opcode does.
22:01 nine NotFound: interp->iglobals is exactly what I need to give a new value to :)
22:02 nine NotFound: the PMC that's stored there is owned by the thread that created this interp. To be able to return it from getinterp I need it to belong to this interp itself
22:04 NotFound I think new_noinit and VTABLE_set_pointer will do the job.
22:07 NotFound PMC *p = Parrot_pmc_new_noinit(interp, enum_class_ParrotInterpreter); VTABLE_set_pointer(p, interp);
22:08 NotFound Ups... : VTABLE_set_pointer(interp, p, interp);
22:09 nine NotFound: many thanks! Works perfectly
22:22 dalek parrot/threads: 171e5fd | nine++ | src/pmc/parrotinterpreter.pmc:
22:22 dalek parrot/threads: Create a new PMC to hold a thread's interpreter
22:22 dalek parrot/threads:
22:22 dalek parrot/threads: The ParrotInterpreter PMC in a thread interp's iglobals was created by
22:22 dalek parrot/threads: another thread. Using a proxy still leads to memory corruption. Use
22:22 dalek parrot/threads: code suggested by NotFound++ to create a local PMC to refer to the
22:22 dalek parrot/threads: interpreter, so the getinterp op works as intended.
22:22 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/171e5fd90d
22:31 schmooster joined #parrot
22:40 whiteknight nine: If the interp already has a PMC, and most do at interp creation, there is a function to get it
22:40 whiteknight oh, wait. I'm thinking of something else
22:41 whiteknight nevermind, do whatever NotFound said
22:41 nbrown joined #parrot
22:49 whiteknight nine: if the main thread is paused, PMCNULL won't get collected by a different thread, right?
22:49 whiteknight I mean, only the main thread would sweep it anyway
23:23 senf_statt_oel left #parrot
23:46 snearch joined #parrot

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

Parrot | source cross referenced