|
Parrot 3.9.0 "Archaeopteryx" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC Set by moderator on 19 October 2011. |
|||
| dalek | nxed: 2ede966 | NotFound++ | winxedst1.winxed: start unifying handling of functions in class and namespace statements |
00:00 | |
| Coke | nom: my Array $array; | 00:03 | |
| p6eval | nom ef4702: ( no output ) | ||
| Coke | nom: my Array $array; $array[0] = "WHEE"; say $array.perl | ||
| 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 … | ||
| 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» | ||
| Coke | nom: say 'X' if 'bar' ~~ /:i FOO || BAR/; | 00:06 | |
| p6eval | nom ef4702: ( no output ) | ||
| Coke | nom: say 'X' if 'BAR' ~~ /:i FOO || BAR/; | 00:07 | |
| p6eval | nom ef4702: OUTPUT«X» | ||
| Coke | nom: say 'X' if 'fo' ~~ /:i FOO || BAR/; | ||
| p6eval | nom ef4702: ( no output ) | ||
| Coke | nom: say 'X' if 'foo' ~~ /:i FOO || BAR/; | ||
| p6eval | nom ef4702: ( no output ) | ||
| Coke | say 'Z' if 'Ab' eq 'Ab' ~~ / A :i B || C / | 00:08 | |
| nom: say 'Z' if 'Ab' eq 'Ab' ~~ / A :i B || C / | |||
| p6eval | nom ef4702: ( no output ) | ||
| 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 /"» | ||
| 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» | ||
| 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» | ||
| 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» | ||
| Coke | oh, crap, I've been spamming the wrong channel. Whoops. | 00:14 | |
| tadzik | (: | ||
|
00:15
whiteknight joined
|
|||
| sorear | RFC: disabling rakudo:, nom:, b:, perl6:, pugs:, and niecza: on #parrot | 00:17 | |
| Coke | rakudo/nom should probably stay. | 00:22 | |
| (maybe just rakudo, have it point to the right thign.) | |||
| NotFound | Did we have winxed: ? | 00:23 | |
| winxed: say("hi"); | |||
| dalek | nxed: 133fc87 | NotFound++ | winxedst1.winxed: refactor a bit namespace parsing |
00:48 | |
| nxed: 795a6d3 | NotFound++ | winxedst1.winxed: group tokenizer errors |
01:16 | ||
| cotto | ~~ | 01:49 | |
| whiteknight | sorear: I like seeing them, and the traffic isn't too high | 01:54 | |
| unless it's a maintenance burden | 01:55 | ||
| dalek | nxed: abff577 | NotFound++ | winxedst1.winxed: use a formatter function in a bunch places to simplify the emit code |
03:03 | |
|
07:24
fperrad joined
07:57
fperrad joined
10:09
bacek joined
10:46
mj41 joined
11:14
alvis joined
12:11
Psyche^ joined
12:50
ambs joined
13:41
whiteknight joined
|
|||
| dalek | p/bigint: 506177f | moritz++ | src/ops/nqp_bigint.ops: make nqp::isbig_I consistent with set_int and get_int turns out that set_int and get_int only support 32bit, even on 64bit platforms. While the better fix would be to make them work on 64 bit width, this approach change nqp::isbig_i to return 1 if the stored int takes more than 32bit. |
13:43 | |
| whiteknight | good morning, #parrot | 13:53 | |
| nine | good morning, whiteknight | 13:54 | |
| whiteknight | hello nine | ||
| dalek | rrot/threads: eb01253 | nine++ | / (4 files): Schedule updates of shared PMCs on the data owning thread. |
13:55 | |
| nine | So the last piece missing is the read only proxy. | 14:02 | |
| whiteknight | wow, you're moving quick | 14:03 | |
| For that Proxy PMC, I think we are going to want to use generated code, like the Object PMC uses | |||
| 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 | ||
| 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:05 | ||
| We can probably copy most of the code to do this from the same utilities that populate the Object PMC | 14:06 | ||
| 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
|
|||
| 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:21 | |
|
14:43
jsut joined
|
|||
| whiteknight | nine: the point of them is to prevent cross-thread writes | 14:53 | |
| we never need to lock data if other threads can never write to it | |||
| 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:55 | |
| whiteknight | yes | 14:56 | |
| 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 | |||
| ...or, we use proxies to prevent data contention at the lowest level, and the user is always safe | 14:57 | ||
| in other words, parrot becomes a platform that handles the concurrency messy details, and as far as the user is concerned everything just works | |||
| 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? | 14:58 | |
| 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:00 | |
| nine | I guess it's about time to decide ;) | 15:01 | |
| whiteknight | yes it is :) | ||
| 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 | ||
| Though accessing an Integer should be compeletely safe AFAICS and could be used for locking by the user. | 15:04 | ||
| 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:05 | ||
|
15:17
bluescreen joined
|
|||
| dalek | rrot/threads: 53d28d8 | nine++ | src/pmc/task.pmc: Mark the array of shared PMCs alive |
15:31 | |
|
15:44
jlaire joined
|
|||
| whiteknight | yeah, opcodes to enable/disable preemption will allow us to create the equivalent of critical sections | 15:52 | |
| at least, at the task level | |||
| or, if not opcodes, methods on the scheduler object | 15:54 | ||
| scheduler.toggle_preemption(1), or scheduler.toggle_preemption(1, target_thread) | |||
| nine | what's the 1? | 15:55 | |
| whiteknight | like a true/false | 15:59 | |
| scheduler.toggle_preemption(0) turns it off | |||
| or better yet, $I0 = scheduler.preemption() | 16:00 | ||
| $I0 = scheduler.preemption(target_thread) | |||
| scheduler.preemption(1/0), scheduler.preemption(1/0, target_thread) | |||
| nine | I find scheduler.enable_preemption and scheduler.disable_preemption more clear. What's the use case for the variant with target_thread? | 16:01 | |
| 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:02 | |
| 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:03 | ||
| or, a master thread controlling task priorities on worker threads, etc | 16:07 | ||
| 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:10 | |
| whiteknight | okay, that's fine too | 16:13 | |
| trading less control for more sanity is always fine | |||
| or, more accurately, we want as much control as we can possibly give without sacrificing sanity | 16:14 | ||
| 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 | ||
| so we want to expose enough functionality for languages to use | |||
| nine | If I implement those as methods it would be pretty easy to call them from other threads anyway | ||
| whiteknight | right | 16:20 | |
| nine | Maybe...I really should have created proxy.pmc manually | 17:13 | |
| OTOH I still wouldn't know how to properly add it to the build system | 17:14 | ||
| whiteknight | I *think* all you need to do is add it to MANIFEST and reconfigure | 17:15 | |
| nine | but the MANIFEST is auto generated | ||
| whiteknight | no, MANIFEST is hand-generated | 17:19 | |
| 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 | ||
| 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:21 | ||
|
17:44
bluescreen_ joined
|
|||
| nine | I have a script that generates code which is used by a script to generate code. This is so meta. | 17:51 | |
| moritz | .oO( I never meta model I didn't like ) |
17:55 | |
| that one is from chromatic, iirc | 17:56 | ||
|
18:04
PacoLinux_ joined
18:11
ambs joined
|
|||
| dalek | p/bigint: bee86c9 | moritz++ | / (6 files): add platform dependent implementation of set_int and get_int; adjust nqp::isbig_I accordingly |
18:17 | |
| nopaste | "japhb" at 192.168.1.3 pasted "'nqp bigint.pl' output on 32-bit system" (136 lines) at nopaste.snit.ch/94824 | 19:18 | |
| nine | Why do I get a Null PMC access in invoke() when trying "ender_target = ender.'get_target'()". ender is certainly not Null | 19:21 | |
| dalek | nxed: 81a5796 | NotFound++ | winxedst1.winxed: change handling of void context in expressions, optimize a bit shortcut boolean ops by the way |
19:22 | |
| sorear | nine: that line hides several instructions | 19:23 | |
| nine: perhaps $Panon = find_method ender, "get_target" returned Null | |||
| 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:24 | ||
| 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:26 | |
| whiteknight | yeah, that null pmc invoke error message is not very informative | 19:28 | |
| it could mean the method is not found, or that ender is null | |||
| nopaste | "japhb" at 192.168.1.3 pasted "'nqp bigint.pl' output on 32-bit system, now from i=28" (144 lines) at nopaste.snit.ch/94825 | 19:29 | |
| sorear | nine: oh, someone is finally dealing with the PMCProxy cesspool? | ||
| nine | '$P0 = find_method ender, "get_target"' gives me a Null PMC access in defined() | ||
| whiteknight | sorear: no, a new proxy type | ||
| 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 | ||
| Ok what would I have to do to add some method to a PMC class that previously had none? | 19:31 | ||
| NotFound | nine: a PMCProxy if sort of the class of a non-Object PMC | 19:32 | |
| nine: add? You mean at runtime? | 19:35 | ||
| nine | NotFound: no, in the source | 19:36 | |
| NotFound | nine: In a .pmc file? | ||
| nine | NotFound: yes | ||
| NotFound: added this: paste.scsys.co.uk/159745 | 19:37 | ||
| NotFound | nine: look for METHOD in src/pmc/*.pmc | ||
| nine: looks good. Make sure it is inside the pmclass block. | 19:38 | ||
| pmc2c is not good at diagnosing errors, usually just skip whatever he doesn't understand. | 19:39 | ||
| nine | It definitely is inside the block. paste.scsys.co.uk/159746 is the whole source | 19:40 | |
| 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. | ||
| And its .o | |||
| nine | no change :8 | 19:42 | |
| :( | |||
| NotFound | Strange... | 19:43 | |
| Do you have that on a branch? | |||
| 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 | ||
| Should have thought of that. The reason for creating accessor methods was get_attribute getting proxied in the first place | 19:49 | ||
|
19:59
snearch joined
|
|||
| nine | Now I just have to fight the GC again... | 20:12 | |
| whiteknight | what's the fight with the GC? | 20:13 | |
| 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:14 | |
| whiteknight | ah, okay | 20:18 | |
|
20:34
mj41 joined
|
|||
| nine | I think, I'll give up for today... | 20:40 | |
| Good night, #parrot | 20:49 | ||
| tadzik | g'night | 20:50 | |
|
21:17
contingencyplan joined
|
|||
| dalek | nxed: d7389d2 | NotFound++ | winxedst1.winxed: store class constants in items instead of a separated container |
21:47 | |
|
21:54
rfw joined
22:29
rfw joined
23:26
aloha joined
23:36
bacek_at_work joined
|
|||
| Coke | whiteknight, nine; tools/dev/mk_manifest_and_skip.pl does actually do something. | 23:37 | |
|
23:48
autark_ joined
|
|||