Camelia, the Perl 6 bug

IRC log for #parrot, 2011-11-13

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 dalek winxed: 2ede966 | NotFound++ | winxedst1.winxed:
00:00 dalek winxed: start unifying handling of functions in class and namespace statements
00:00 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/2ede966557
00:03 Coke nom: my Array $array;
00:03 p6eval nom ef4702:  ( no output )
00:03 Coke nom: my Array $array; $array[0] = "WHEE"; say $array.perl
00:03 p6eval nom ef4702: OUTPUT«Cannot look up attributes in a type object␤  in method gimme at src/gen/CORE.setting:4267␤  in method exists at src/gen/CORE.setting:4261␤  in method at_pos at src/gen/CORE.setting:4648␤  in method postcircumfix:<[ ]> at src/gen/CORE.setting:1006␤  in block <anon> at …
00:05 Coke rakudo: role A[::T?] {}; class B does A[] {}; say "alive"
00:05 p6eval rakudo ef4702: OUTPUT«===SORRY!===␤Unable to parse package_def, couldn't find final ']' at line 1␤»
00:06 Coke nom: say 'X' if 'bar' ~~ /:i FOO || BAR/;
00:06 p6eval nom ef4702:  ( no output )
00:07 Coke nom: say 'X' if 'BAR' ~~ /:i FOO || BAR/;
00:07 p6eval nom ef4702: OUTPUT«X␤»
00:07 Coke nom: say 'X' if 'fo' ~~ /:i FOO || BAR/;
00:07 p6eval nom ef4702:  ( no output )
00:07 Coke nom: say 'X' if 'foo' ~~ /:i FOO || BAR/;
00:07 p6eval nom ef4702:  ( no output )
00:08 Coke say 'Z' if 'Ab' eq 'Ab' ~~ / A :i B || C /
00:08 Coke nom: say 'Z' if 'Ab' eq 'Ab' ~~ / A :i B || C /
00:08 p6eval nom ef4702:  ( no output )
00:09 Coke nom: say "" ~~ /m ** 1..-1 /
00:09 p6eval nom ef4702: OUTPUT«===SORRY!===␤Only integers or '*' allowed as range quantifier endpoint at line 1, near "-1 /"␤»
00:10 Coke rakudo: END { say "OH HAI" }; die "oh noes"
00:10 p6eval rakudo ef4702: OUTPUT«oh noes␤  in block <anon> at /tmp/YjTm6zAnAo:1␤  in <anon> at /tmp/YjTm6zAnAo:1␤»
00:11 Coke rakudo: sub wolf { say "om nom nom" }; sub sheep { say "baah!"; callsame }; &wolf.wrap(&sheep); wolf()
00:11 p6eval rakudo ef4702: OUTPUT«Method 'wrap' not found for invocant of class 'Sub'␤  in block <anon> at /tmp/LoR8npY1O1:1␤  in <anon> at /tmp/LoR8npY1O1:1␤»
00:13 Coke rakudo: sub foo(:$a, :$b, :$c) {}; foo(:a :b :c)
00:13 p6eval rakudo ef4702: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
00:14 Coke oh, crap, I've been spamming the wrong channel. Whoops.
00:14 tadzik (:
00:15 whiteknight joined #parrot
00:17 sorear RFC: disabling rakudo:, nom:, b:, perl6:, pugs:, and niecza: on #parrot
00:22 Coke rakudo/nom should probably stay.
00:22 Coke (maybe just rakudo, have it point to the right thign.)
00:23 NotFound Did we have winxed: ?
00:23 NotFound winxed: say("hi");
00:48 dalek winxed: 133fc87 | NotFound++ | winxedst1.winxed:
00:48 dalek winxed: refactor a bit namespace parsing
00:48 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/133fc87fcb
01:16 dalek winxed: 795a6d3 | NotFound++ | winxedst1.winxed:
01:16 dalek winxed: group tokenizer errors
01:16 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/795a6d38a8
01:49 cotto ~~
01:54 whiteknight sorear: I like seeing them, and the traffic isn't too high
01:55 whiteknight unless it's a maintenance burden
03:03 dalek winxed: abff577 | NotFound++ | winxedst1.winxed:
03:03 dalek winxed: use a formatter function in a bunch places to simplify the emit code
03:03 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/abff577421
07:24 fperrad joined #parrot
07:57 fperrad joined #parrot
10:09 bacek joined #parrot
10:46 mj41 joined #parrot
11:14 alvis joined #parrot
12:11 Psyche^ joined #parrot
12:50 ambs joined #parrot
13:41 whiteknight joined #parrot
13:43 dalek nqp/bigint: 506177f | moritz++ | src/ops/nqp_bigint.ops:
13:43 dalek nqp/bigint: make nqp::isbig_I consistent with set_int and get_int
13:43 dalek nqp/bigint:
13:43 dalek nqp/bigint: turns out that set_int and get_int only support 32bit, even on 64bit
13:43 dalek nqp/bigint: platforms. While the better fix would be to make them work on 64 bit width,
13:43 dalek nqp/bigint: this approach change nqp::isbig_i to return 1 if the stored int takes more
13:43 dalek nqp/bigint: than 32bit.
13:43 dalek nqp/bigint: review: https://github.com/perl6/nqp/commit/506177f790
13:53 whiteknight good morning, #parrot
13:54 nine good morning, whiteknight
13:54 whiteknight hello nine
13:55 dalek parrot/threads: eb01253 | nine++ | / (4 files):
13:55 dalek parrot/threads: Schedule updates of shared PMCs on the data owning thread.
13:55 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/eb0125363d
14:02 nine So the last piece missing is the read only proxy.
14:03 whiteknight wow, you're moving quick
14:03 whiteknight For that Proxy PMC, I think we are going to want to use generated code, like the Object PMC uses
14:04 nine Mostly because it's been not much work at all :) Just reusing what was already there
14:04 whiteknight all the vtable definitions are available in src/vtable.tbl, and the ones that write data are marked with :write. We have several p5 utilities which read that file and generate code already
14:05 whiteknight for the proxy, :write vtables should check if we are on the right thread and dispatch a message if not. All other vtables can transparently pass through
14:06 whiteknight We can probably copy most of the code to do this from the same utilities that populate the Object PMC
14:06 whiteknight or, if you want to avoid that mess, you can just copy the default.pmc and fill all the vtables in manually
14:18 mj41 joined #parrot
14:21 nine Re-reading your blog posts about this topic, since we don't want to guarantee any internal consistency for reading, what's the point of these proxies anyway? Just to prevent the user from doing the wrong thing (tm)?
14:43 jsut joined #parrot
14:53 whiteknight nine: the point of them is to prevent cross-thread writes
14:53 whiteknight we never need to lock data if other threads can never write to it
14:55 nine So really just to prevent the user from doing what he shouldn't do. Ok. Just asked to see if I didn't get something. Anyway the proxy will be the perfect place to store a reference to the data owning interp.
14:56 whiteknight yes
14:56 whiteknight basically, my thinking goes like this: Either we provide a whole library of locks and lock mechanisms, and tell the user that they are responsible for keeping things sane
14:57 whiteknight ...or, we use proxies to prevent data contention at the lowest level, and the user is always safe
14:57 whiteknight in other words, parrot becomes a platform that handles the concurrency messy details, and as far as the user is concerned everything just works
14:58 nine But proxies still cannot guarantee read consistency. What will happen when a thread iterates over a shared array while the data owning thread updates it?
15:00 whiteknight yeah, that is a good question. We've thought of a few ways to deal with that, but haven't decided on anything yet
15:01 nine I guess it's about time to decide ;)
15:01 whiteknight yes it is :)
15:02 whiteknight maybe we simply declare that read consistency isn't guaranteed
15:02 nine Then we would at least have to offer some sort of locking
15:04 nine Though accessing an Integer should be compeletely safe AFAICS and could be used for locking by the user.
15:05 nine In any case I'll have to expose disable_preemption and enable_preemption to allow atomic updates. With these operations allowed, the write subs become a quite powerful mechanism.
15:17 bluescreen joined #parrot
15:31 dalek parrot/threads: 53d28d8 | nine++ | src/pmc/task.pmc:
15:31 dalek parrot/threads: Mark the array of shared PMCs alive
15:31 dalek parrot/threads: review: https://github.com/parrot/parrot/commit/53d28d8242
15:44 jlaire joined #parrot
15:52 whiteknight yeah, opcodes to enable/disable preemption will allow us to create the equivalent of critical sections
15:52 whiteknight at least, at the task level
15:54 whiteknight or, if not opcodes, methods on the scheduler object
15:54 whiteknight scheduler.toggle_preemption(1), or scheduler.toggle_preemption(1, target_thread)
15:55 nine what's the 1?
15:59 whiteknight like a true/false
15:59 whiteknight scheduler.toggle_preemption(0) turns it off
16:00 whiteknight or better yet, $I0 = scheduler.preemption()
16:00 whiteknight $I0 = scheduler.preemption(target_thread)
16:00 whiteknight scheduler.preemption(1/0), scheduler.preemption(1/0, target_thread)
16:01 nine I find scheduler.enable_preemption and scheduler.disable_preemption more clear. What's the use case for the variant with target_thread?
16:02 whiteknight nine: internally, we would only really have scheduler.enable_preemption(target_thread), and we would have a short alias for scheduler.enable_preemption(​scheduler.current_thread())
16:03 whiteknight basically, it is a tool to let you detect if a task is not being friendly, or if a thread is stuck in deadlock or something
16:07 whiteknight or, a master thread controlling task priorities on worker threads, etc
16:10 nine I'm not sure if I like the idea of another thread being able to control a thread's preemption since the controller by definition cannot know what the controlled thread is currently doing. Also since a scheduler is turning preemption on/off incertain situations, this may leed to ugly interaction problems.
16:13 whiteknight okay, that's fine too
16:13 whiteknight trading less control for more sanity is always fine
16:14 whiteknight or, more accurately, we want as much control as we can possibly give without sacrificing sanity
16:15 nine And in any case we can always add it later
16:15 whiteknight because parrot is supposed to be a language-neutral VM, after all
16:15 whiteknight so we want to expose enough functionality for languages to use
16:15 nine If I implement those as methods it would be pretty easy to call them from other threads anyway
16:20 whiteknight right
17:13 nine Maybe...I really should have created proxy.pmc manually
17:14 nine OTOH I still wouldn't know how to properly add it to the build system
17:15 whiteknight I *think* all you need to do is add it to MANIFEST and reconfigure
17:15 nine but the MANIFEST is auto generated
17:19 whiteknight no, MANIFEST is hand-generated
17:20 nine But it's read only and the comment says: # generated by tools/dev/mk_manifest_and_skip.pl
17:20 whiteknight it's read-only? that doesn't make any sense
17:21 whiteknight un-read-only it, and just edit it. I don't think tools/dev/mk_manifest_and_skip.pl does anything. That comment is probably wrong
17:44 bluescreen_ joined #parrot
17:51 nine I have a script that generates code which is used by a script to generate code. This is so meta.
17:55 moritz .oO( I never meta model I didn't like )
17:56 moritz that one is from chromatic, iirc
18:04 PacoLinux_ joined #parrot
18:11 ambs joined #parrot
18:17 dalek nqp/bigint: bee86c9 | moritz++ | / (6 files):
18:17 dalek nqp/bigint: add platform dependent implementation of set_int and get_int; adjust nqp::isbig_I accordingly
18:17 dalek nqp/bigint: review: https://github.com/perl6/nqp/commit/bee86c9973
19:18 nopaste "japhb" at 192.168.1.3 pasted "'nqp bigint.pl' output on 32-bit system" (136 lines) at http://nopaste.snit.ch/94824
19:21 nine Why do I get a Null PMC access in invoke() when trying "ender_target = ender.'get_target'()". ender is certainly not Null
19:22 dalek winxed: 81a5796 | NotFound++ | winxedst1.winxed:
19:22 dalek winxed: change handling of void context in expressions,
19:22 dalek winxed: fix a bunch of result param that should be string and
19:22 dalek winxed: optimize a bit shortcut boolean ops by the way
19:22 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/81a57961c8
19:23 sorear nine: that line hides several instructions
19:23 sorear nine: perhaps $Panon = find_method ender, "get_target" returned Null
19:24 sorear nine: or, the invokation of get_target returned a null CallContext somehow(?)(not sure of the details of the unpack-results step, it may be impossible for this to NPMCA)
19:26 nine sorear: ah, ok. Since I just added the Proxy PMC class, I guess I missed something, so it doesn't find the method.
19:28 whiteknight yeah, that null pmc invoke error message is not very informative
19:28 whiteknight it could mean the method is not found, or that ender is null
19:29 nopaste "japhb" at 192.168.1.3 pasted "'nqp bigint.pl' output on 32-bit system, now from i=28" (144 lines) at http://nopaste.snit.ch/94825
19:29 sorear nine: oh, someone is finally dealing with the PMCProxy cesspool?
19:29 nine '$P0 = find_method ender, "get_target"' gives me a Null PMC access in defined()
19:29 whiteknight sorear: no, a new proxy type
19:30 whiteknight PMCProxy is still a cesspool
19:30 nine sorear: no, I've no idea what PMCProxy even is. I'm adding a new Proxy PMC class for threading
19:31 nine Ok what would I have to do to add some method to a PMC class that previously had none?
19:32 NotFound nine: a PMCProxy if sort of the class of a non-Object PMC
19:35 NotFound nine: add? You mean at runtime?
19:36 nine NotFound: no, in the source
19:36 NotFound nine: In a .pmc file?
19:36 nine NotFound: yes
19:37 nine NotFound: added this: http://paste.scsys.co.uk/159745
19:37 NotFound nine: look for METHOD in src/pmc/*.pmc
19:38 NotFound nine: looks good. Make sure it is inside the pmclass block.
19:39 NotFound pmc2c is not good at diagnosing errors, usually just skip whatever he doesn't understand.
19:40 nine It definitely is inside the block. http://paste.scsys.co.uk/159746 is the whole source
19:41 nine and the method gets translated to Parrot_Proxy_nci_get_interp by pmc2c
19:41 NotFound Delete the generated C to be sure it gets regenerated. The dependencies can fail.
19:41 NotFound And its .o
19:42 nine no change :8
19:42 nine :(
19:43 NotFound Strange...
19:43 NotFound Do you have that on a branch?
19:48 NotFound Now that I think about it... If that PMC is a proxy for other PMC... Isn't find_method looking at the proxy target?
19:48 nine oh, that could very well be
19:49 nine Should have thought of that. The reason for creating accessor methods was get_attribute getting proxied in the first place
19:59 snearch joined #parrot
20:12 nine Now I just have to fight the GC again...
20:13 whiteknight what's the fight with the GC?
20:14 nine Ah no it's a logic error on my part. I create the proxies on task.pop() and intitialize proxy->interp with INTERP which is the running thread and not the owning thread
20:18 whiteknight ah, okay
20:34 mj41 joined #parrot
20:40 nine I think, I'll give up for today...
20:49 nine Good night, #parrot
20:50 tadzik g'night
21:17 contingencyplan joined #parrot
21:47 dalek winxed: d7389d2 | NotFound++ | winxedst1.winxed:
21:47 dalek winxed: store class constants in items instead of a separated container
21:47 dalek winxed: and emit info about constants only in debug mode
21:47 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/d7389d2b52
21:54 rfw joined #parrot
22:29 rfw joined #parrot
23:26 aloha joined #parrot
23:36 bacek_at_work joined #parrot
23:37 Coke whiteknight, nine; tools/dev/mk_manifest_and_skip.pl does actually do something.
23:48 autark_ joined #parrot

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

Parrot | source cross referenced