Perl 6 - the future is here, just unevenly distributed

IRC log for #parrot, 2014-06-27

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
01:05 FROGGS_ joined #parrot
01:17 woosley joined #parrot
03:25 woosley joined #parrot
05:05 dalek joined #parrot
05:15 dalek joined #parrot
05:39 dalek joined #parrot
05:50 dalek joined #parrot
06:18 dalek joined #parrot
06:53 basiliscos joined #parrot
06:56 FROGGS joined #parrot
08:02 GeJ_ joined #parrot
10:12 tadzik joined #parrot
10:12 tadzik left #parrot
12:20 Util joined #parrot
13:38 awwaiid joined #parrot
13:47 rurban joined #parrot
13:56 Chirag joined #parrot
14:00 Chirag rurban: Hey!
14:02 rurban_ Hey
14:03 Chirag Are you still in Orlando?
14:05 FROGGS joined #parrot
14:05 rurban_ No, just arrived back home in the office. Still a bit tired.
14:06 Chirag oh.. no problem :)
14:06 rurban_ I implemented some parts by myself to check performance. 4% for return and another 4% for self only.
14:06 rurban_ How is your stuff going? Afraid to share it?
14:07 Chirag No.. I committed 5 days back.. hit a blocker..
14:07 Chirag https://github.com/ZYROz/pa​rrot/tree/ZYROz/pcc-gh1080
14:09 rurban_ I see, almost
14:09 Chirag It just took me a few hours to code for that...
14:09 rurban_ I mean almost right :)
14:09 rurban_ return is easier than the args
14:10 rurban_ and the hard-coded indices 0-3 don't look right
14:10 Chirag I couldn't make much sense of the small letter signatures..
14:10 Chirag yeah the indices.. deffinitely wrong
14:10 Chirag but that was according callContext
14:10 Chirag to callContext*
14:11 Chirag Also, maybe my perl code is a little untidy..
14:13 rurban_ Your perl looks okay, just the indices look wrong.
14:13 rurban_ I'll check against mine... (I didn't push it on purpose yet :)
14:13 Chirag Also, I haven't handled -- i, o, s
14:13 Chirag Yeah... no spoilers :D
14:14 rurban_ i can be ignired I guess. or checked for sanity, i is for self only
14:15 Chirag hmm.. but I couldn't figure which call would be made in that case..
14:17 rurban_ i is just a hint fpor the prev P rthat'
14:17 rurban_ s it is for self. but we already know that's it's self from $params_varargs
14:19 Chirag ok.. so maybe it's just the indices..
14:20 rurban_ I'll show you the return part: https://gist.github.com/ru​rban/0bd64ed6643ac8851212
14:22 Chirag umm.. why did you put 0 for all cases?
14:24 rurban_ 0 is the position of the arg in the CallContext
14:24 rurban_ 0 for 1st arg or return, 1 for 2nd and so on
14:27 Chirag I didn't get it .. i was under an impression that each type corresponds to an index --- 0 for PCC, 1 for INTEGER .....
14:29 rurban_ no, the type is encoded as the VTABLE_get_${$type}_keyed_int function name
14:29 rurban_ for pmc,string,number,integer
14:30 Chirag ok.. can you please elaborate a little on the what exactly you meant by -- position of the arg in the CallContext ??
14:36 rurban_ args are stored in CallContext as simple array. 1st arg at index 0, 2nd arg at index 1, ...
14:37 rurban_ this arg is re-used also for the return value
14:37 rurban_ kind of an arg and return values stack
14:37 rurban_ so the fix is to use: $params_vararg_list[$arg_index] = VTABLE_get_${$type}_keyed_int(interp, _call_object, $arg_index);
14:38 rurban_ nope:  $params_vararg_list[$arg_index] = VTABLE_get_${type}_keyed_int(interp, _call_object, $arg_index);
14:38 rurban_ type is a simple hash lookup into my $sigtype = {'P' => 'pmc',
14:38 rurban_ 'S' => 'string',
14:38 rurban_ 'I' => 'integer',
14:38 rurban_ 'N' => 'number'};
14:38 Chirag my $arg_index is just a counter..
14:39 rurban_ yes, the n-th arg
14:39 rurban_ 1st arg from 0, 2nd from 1, ...
14:39 Chirag I think I have tried that already .. Will try again
14:40 rurban_ like in https://gist.github.com/ru​rban/3d7fac25d31785b472ac
14:41 rurban_ And your editor still has the wrong whitespace setttings. 4 for indent, no ending whitespace
14:42 Chirag ah..didnt take care of indent..
14:45 bluescreen joined #parrot
14:48 rurban_ Does $params_varargs always start with a '&'?
14:50 Chirag I tried printing.. and it seemed like that
15:06 rurban_ we also get s and n sig types with stringbuilder
15:59 rurban1 joined #parrot
16:06 Chirag_ joined #parrot
16:10 rurban joined #parrot
16:47 Chirag_ rurban: Won't  "II" in fileHandle call VTABLE_set_.... twice??
16:48 Chirag_ I see you are dealing with this case separately.. just curious...
16:48 rurban_ I just pass that to the old code.
16:48 rurban_ it sets 2 return values
16:49 Chirag_ yes..
16:49 rurban_ It's easy to code, but I was too lazy
16:49 Chirag_ i called it twice but it throws an error
16:50 rurban_ See https://gist.github.com/rurban/0bd​64ed6643ac8851212#file-0001-optimi​ze-return-in-pmc-methods-patch-L33
16:50 rurban_ you need to set indicesx 0 and 1
16:50 rurban_ indices
16:50 Chirag_ ah.. got it
16:56 FROGGS joined #parrot
16:58 Chirag_ rurban: https://github.com/ZYROz/parrot/commit/6​779592c1397fb1068282236d8a7b266f9452f20
16:58 Chirag_ throws an error -- Cannot open FileHandle, no path
17:01 rurban_ I think I got the same now...
17:02 rurban_ no, now I've got libicuuc.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
17:02 Chirag_ with my branch?
17:03 rurban_ yes, and some more fixes of mine
17:03 Chirag_ i could try handling the "II" case separately like you did?
17:04 rurban_ I would first only optimize the common cases, not the rare ones
17:05 rurban_ It's only FileHandle.tell
17:07 rurban_ I see, glibc conflict
17:07 rurban_ I'll reboot
17:09 rurban_ this is my current work: https://gist.github.com/ru​rban/d9f4571019b479b4b616
17:19 Chirag_ https://github.com/ZYROz/parrot/commit/e​cf50707347d1ce9a2940fe839981148a12f5ca1
17:20 Chirag_ doesnt include your patch though ...
17:42 rurban joined #parrot
17:43 rurban rebooted
17:43 Chirag_ works?
17:47 rurban nope. icu problem I guess
17:47 rurban I got a new backwards incompat libstdc++
17:47 Chirag_ https://github.com/ZYROz/parrot/commit/e​cf50707347d1ce9a2940fe839981148a12f5ca1  .. but without your patch
17:57 rurban Found the problem in my /usr/local
17:58 rurban $$sigtype loks wrong to me
17:59 rurban ok, got it working now. the problem was a mismatch between the new system gcc-4.9 and my old gcc-4.8 env in /usr/local
18:03 rurban FAIL: t/pmc/class.t 13, 23-25
18:03 Chirag_ $sigtype doesn't work ..
18:04 rurban I see why. $sigtype->{$returns_signature} it needs to be with your version
18:04 rurban it's a hashref, not a hash
18:04 rurban1 joined #parrot
18:14 rurban with my other patch I only get t/pmc/class.t: 13 failing
18:14 Chirag_ hmm.. i still get Cannot open FileHandle, no path
18:20 rurban looks like the return "II" issue with tell to me
18:24 Chirag_ but I handled that with Parrot_pcc_set_call_from_c_args
18:25 rurban yes, I don't see the error yet
18:53 rurban I see, you don't check for o yet
18:53 rurban Parrot_FileHandle_nci_open needs to use the old call with o or implement optional arg handling
19:00 rurban See https://gist.github.com/rurban/d9f4​571019b479b4b616#file-0001-pmc2c-fi​xup-chirags-code-a-bit-patch-L125 where I check for the arg adverbs c,f,l,n,o,p,s
19:05 rurban1 joined #parrot
19:09 rurban That's the code needed for :optional https://gist.github.com/ru​rban/8ec67d23ba5d52c08cc6
19:25 Chirag_ hmm.. return is not the problem then .. will do
19:30 Chirag_ I will try to implement optional-handling by tomorrow...
19:33 rurban optional is a bit tricky...
19:55 rurban I implemented it now, but it's not quite correct yet
20:06 rurban1 joined #parrot
20:49 Coke joined #parrot
21:12 bluescreen_ joined #parrot

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

Parrot | source cross referenced