Parrot 4.4.0 "Banana Fanna Fo Ferret" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 15 May 2012.
00:40 darbelo joined
whiteknight That's all I've got in me tonight. I'm going to have to upload the docs later 00:41
cotto ~~ 01:12
ttbot Parrot 210ad264 MSWin32-x86-multi-thread make error tt.taptinder.org/cmdinfo/85311 01:26
dalek rrot/threads: 1283a07 | Whiteknight++ | / (2 files):
Initialize interp->sleep_cond, interp->sleep_mutex and interp->wake_up when we create the initial non-thread interp
01:31
01:32 benabik joined 01:48 kurahaupo joined
benabik ... Banana Fanna Fo Ferret? 01:48
kid51 en.wikipedia.org/wiki/The_Name_Game 01:50
benabik Well, yes. 01:51
whiteknight Parrot Parrot bo barret, banana fanna fo ferret 01:53
02:14 adu joined
adu Banana Fanna Fo Ferret? 02:14
benabik Me mi mo marret. 02:15
02:21 kurahaupo joined 02:28 darbelo joined 03:01 nbrown joined
nbrown cotto: hey, I haven't had much time for parrot recently and might not for another week or so, but I wanted to pass along my db ideas. Checkout: gist.github.com/2706968 03:03
03:07 adu joined 03:16 bacek_at_work joined, aloha joined 04:17 darbelo joined
dalek p: b6d1a40 | moritz++ | tools/build/PARROT_REVISION:
bump parrot version to 4.4.0
04:49
05:43 alin joined 05:49 particle joined 05:54 adu joined
cotto ~~ 06:02
06:05 darbelo joined 06:34 fperrad joined 07:03 brrt joined 07:09 wagle joined 07:40 lucian joined 07:53 darbelo joined 08:07 kjs joined 08:30 lucian joined 09:22 bacek_at_work joined 09:35 particle1 joined 09:42 darbelo joined
brrt nice, parrot/api.h has changed between releases 10:10
10:12 alin joined
brrt ever so slightly, but still :-) 10:13
10:55 brambles joined 11:05 bacek joined 11:07 JimmyZ joined 11:22 schmooster joined, JimmyZ_ joined 11:28 JimmyZ_ joined
dalek kudo/world-rethrow: c663f0f | moritz++ | src/ (2 files):
provide file and line number for method redeclaration errors
11:30
11:30 darbelo joined 11:44 JimmyZ_ joined 11:52 JimmyZ_ joined
brrt oh, you know the thing about the example where you invoke a sub from parrot_api? 11:59
not possible
that is..
12:01 whiteknight joined
moritz brrt: just yesterday I managed to invoke a Perl 6 function from C 12:03
with Parrot_pcc_invoke_from_c_args
that doesn't quite make me an expert, but confident that it's possible... even if not with the example from parrot_api :-)
brrt oh, fairly sure it is possible :-) but i kind of try to use parrot_api_* frunctions only 12:04
s/fr/f/ 12:05
moritz I'm not sure, but I don't think you'll get very far with that
12:07 JimmyZ joined
moritz can you even invoke VTABLEs with them? 12:08
brrt actually 12:13
you can load a bytecode file
which you can use as an object
to find a method
which is a pmc 12:14
and then, you can invoke that pmc
only thing i have to do is create a signature pmc
bacek brrt, try Parrot_ext_call instead 12:15
brrt no no, not the point :-) 12:16
moritz is the point to demonstrate how fiddly Parrot_api is for that kind of task? :-)
brrt the point is, using only parrot_api_* calls, can i load a bytecode file, and invoke a method
github.com/parrot/parrot/blob/mast...d_new.pod, last 'example' 12:17
where it says 'todo'
12:17 schmooster joined
brrt good lord, this is going to be verbose 12:20
what is the name of the signature class? 12:24
12:25 JimmyZ joined
moritz do you mean CallSignature? 12:25
uhm, I wonder if that still exists 12:26
brrt :-) nice
moritz ack only finds 5 references to CallSignature in the parrot tree
though what the section "Function signatures" talks about is simply a C string 12:27
brrt i'll check out the Parrot_api_pmc_invoke function then 12:28
whiteknight Parrot_api_ embedding API is specifically limited. It's designed to get you into executable bytecode quickly 12:32
you aren't supposed to be calling lots of vtables from Parrot_api_ functions. You're supposed to call them from bytecode 12:33
Also, you can't mix internal and external functions. If you are in an embedding situation you MAY NOT call things like Parrot_ext_call or Parrot_pcc_invoke_*
You'll break the stack and crash the program 12:34
If you're embedding, you may only use Parrot_api_* functions. The consolation is that we can add new functions to that API if needed 12:35
brrt: if you need an example of how to set up a call with Parrot_api_pmc_invoke, I can probably find one 12:37
brrt whiteknight, i'd like such an example 12:39
also, Parrot_api_pmc_get_class, doesn't work as i would-have-expected
that, or, you can't get a class from a string 12:40
whiteknight Classes in Parrot are supposed to be accessed by an array of names, not just a string name. 12:48
so class "Foo" should be accessed by array ["Foo"]
the key argument in Parrot_api_pmc_get_class should be a string array. You can build one of those from a C char** with Parrot_api_pmc_wrap_string_array 12:49
actually, that may be wrong. It does look like Parrot_api_pmc_get_class can indeed take a normal String PMC too 12:51
github.com/parrot/parrot/blob/mast...pmc.t#L253
That's a test that does exactly what you're asking for: Creates a CallContext pmc with arguments and a signature, and then calls Parrot_api_pmc_invoke 12:52
12:52 benabik joined
whiteknight You're going to need to understand signature strings for that example 12:52
upper-case letters are the types, lower-case letters are the modifiers, and -> separates arguments from returns
12:53 PacoAir joined
whiteknight Pi is the invocant for a method call. S is STRING, N is FLOATVAL, I is INTVAL 12:53
so if you want a method that takes three numbers and returns three integers, the signature would be PiNNN->III 12:54
brrt oh, i see
wow, that is verbose
moritz it's C :-)
whiteknight If you come up with some common use-cases that can be encapsulated behind a smaller set of helper methods, let me know 12:55
Looking at this test code, an API call that creates a CallContext with a char* signature instead of having to wrap the STRING first might be helpful 12:56
brrt that was pretty much what i was thinking
you could even create one using va_args
12:57 crab2313 joined, schmooster joined
brrt Parrot_api_pmc_create_signature(Parrot_PMC interp, Parrot_String signature, *Parrot_PMC signature_pmc, ...); 12:57
the amount of arguments can be deduced from the signature 12:58
does Pi means PMC invocant?
whiteknight yes
brrt could be argued both ways whether to default to imported strings for the arguments 12:59
whiteknight va_list doesn't play well with our call-in and call-out macros, but I can see if I can find something that is more convenient and still works
12:59 JimmyZ_ joined
brrt ok cool :-) 13:00
whiteknight how about Parrot_api_pmc_new_signature(interp, &cc), Parrot_api_pmc_setup_signature(interp, cc, char*sig, ...) 13:02
brrt good enough for me 13:05
va_list can work, then?
whiteknight I will have to test it 13:06
13:06 Psyche^ joined 13:13 JimmyZ joined 13:17 benabik joined
brrt yay, no segfaults 13:18
13:18 darbelo joined 13:19 crab2313 joined 13:20 crab2313 left 13:22 crab2313 joined
dalek kudo/lazy: 18f9e41 | moritz++ | / (5 files):
first shot at "lazy" statement prefix
13:31
13:38 schmooster joined
brrt hmmpf 13:53
dalek kudo/lazy: e1b8b12 | moritz++ | / (3 files):
smally cleanups for "lazy"

  * do not evaluate the thunk when LazyScalar is being assigned to
  * update ChangeLog
  * run tests
13:56
brrt fun, i seem to be able to create a signature object using va_list 13:58
but actually invoking my method fails 13:59
whiteknight what api are you calling for that?
brrt two functions i wrote
i'll push the whole thing to github, you can inspect it there
github.com/bdw/mod_bart 14:03
github.com/bdw/mod_bart/blob/maste...rot-test.c
whiteknight okay
brrt efficient it is not 14:04
whiteknight what happens when you try to call the method? 14:05
brrt nothing
:-)
whiteknight you end up in that little "Oh noes!" block?
brrt it fails
yes
foo.pbc is generated from foo.winxed 14:06
whiteknight github.com/parrot/parrot/blob/mast...ain.c#L214
Copy that function from the Parrot frontend to get an exception message and backtrace
if any API functions return a 0, that means there was an unhandled exception, so you can always get information in those cases 14:07
14:08 JimmyZ joined
whiteknight oh, I see the problem. You're searching for a method foo on the PackfileView PMC. That will return null 14:08
functions defined in the packfile are not methods on the packfile 14:09
or, it will return PMCNULL 14:11
brrt ah, i see
whiteknight PMCNULL is a lot like NULL but if you try to use it you get an exception instead of a segfault 14:12
I don't know if there's a good way to just get a plain function by name from the packfile. We have routines to get the :main sub, to get subs by tag, and to get methods from objects 14:13
brrt oooo.... nasty 14:14
indeed i get that error
whiteknight write up a wishlist of any API functions you wish you had. I'll add them tonight 14:15
or, if you are feeling adventurous, you can try to add them yourself. Make a branch and open a pull request
dalek kudo/nom: 18f9e41 | moritz++ | / (5 files):
first shot at "lazy" statement prefix
14:16
kudo/nom: e1b8b12 | moritz++ | / (3 files):
smally cleanups for "lazy"

  * do not evaluate the thunk when LazyScalar is being assigned to
  * update ChangeLog
  * run tests
brrt i'll do the first, at leat
brrt :-)
kudo/nom: a6515f0 | moritz++ | / (7 files):
Merge branch 'lazy' into nom
brrt but, afaik, Parrot_api_pmc_new_signature works, and Parrot_api_setup_signature as well
which is awesome
Parrot_api_bytecode_get_sub() 14:18
whiteknight yes, very good job with those
14:18 schmooster joined
brrt although i'm thinking about it a bit 14:18
what about making the packfile api - as far as there is one - public? 14:19
or parts of it?
whiteknight brrt: It is. There are methods on the packfile PMC you can find and invoke
github.com/parrot/parrot/blob/mast...leview.pmc 14:20
brrt oh, right
whiteknight search for METHOD
We can add more methods there too, if you need more
Or, if you are calling some of those often and want an easier way, we can add a helper to the embedding API to do it
Like I said, give me a wishlist
(The APIs we do have are optimized for the few tasks we use them for. More users means more use-cases and more APIs are needed) 14:21
brrt will do
whiteknight brrt++ 14:22
dalek p: 7df35de | duff++ | src/QRegex/P6Regex/ (2 files):
Remove **<sep>
14:33
14:38 darbelo joined
dalek p: ee757db | duff++ | t/qregex/rx_quantifiers:
Remove regex tests for **<sep>
14:46
p: 3196005 | moritz++ | t/qregex/rx_modifiers:
untodo passing qregex tests
14:48
15:04 crab2313 joined 15:13 dmalcolm joined 15:23 benabik joined 15:32 davidfetter joined 16:00 kurahaupo joined, alin joined 16:08 brrt left 16:46 PacoAir joined 16:53 Infinoid joined, jlaire joined, ttbot joined, sri joined, pmichaud_ joined, Coke joined, dalek joined, PerlJam joined, alvis joined, awwaiid joined, aloha joined, crab2313 joined, masak joined, cosimo joined, Maddingue joined, simcop2387 joined, jevin joined, mj41 joined, kurahaupo joined, dmalcolm joined, darbelo joined, Patterner joined, autark joined, contingencyplan joined, perlite joined, preflex joined, mtk joined, jtpalmer joined, nopaste joined, TonyC joined, Hunger joined, pjcj joined, cotto joined, tadzik joined, szbalint joined, cxreg joined, Timbus joined, knewt joined, wendar joined, Util joined, NotFound joined, Kovensky joined, rblackwe joined 16:54 benabik joined, schmooster joined, particle1 joined, wagle joined, arnsholt joined, Tene joined, dngor joined, smash joined, jsut joined, atrodo joined, GeJ joined, sorear joined, elmex joined, nine joined
smash hello everyone 17:02
tadzik hello smash
17:02 whiteknight joined
whiteknight good afternoon, #parrot 17:03
cotto ~~
whiteknight hello cotto
cotto hi whiteknight
whiteknight I've still got to get the docs online from the release, but otherwise it went smoothly as always 17:06
I didn't use the auto_release.pl script. I don't know who made that 17:07
moritz git log or blame will tell you 17:09
whiteknight yeah, I just haven't looked at it yet
moritz rakudo seems to spectest fine with the release. whiteknight++ 17:11
whiteknight thanks! I ran it a few days ago, so I'm glad nothing broke leading up to the release
I'm going to be doing a lot of rakudo building and testing with some of the branches planned for merging
17:26 brrt joined 17:39 janus joined
nine Good evening #parrot 17:40
17:41 lucian joined
whiteknight nine! 17:45
actually, I'm reminded that I need to test my last threads fix on windows now 17:47
nine whiteknight: oh thanks for fixing my laziness bugs 17:48
whiteknight I don't know if I've fixed them yet. Testing now
I run windows at work and have visual studio for the debugger, which I can use to test and do light debugging on parrot if I clock out. But I can't write code here, so I have to implement potential fixes at home 17:49
...and miniparrot still segfaults, apparently 17:50
nine sucks 17:51
dalek rrot/threads: 9ab1869 | nine++ | src/ (4 files):
Check the correct define for threading.

s/HAS_THREADS/PARROT_HAS_THREADS/
rrot/threads: 627974b | nine++ | t/src/threads_io.t:
Activate t/src/threads_io.t on a threaded Parrot
rrot/threads: 8f480e3 | nine++ | / (234 files):
Merge branch 'threads' of github.com:parrot/parrot into threads
rrot/threads: b4e9ae4 | nine++ | t/src/threads_io.t:
Fix threads_io.t not finding Parrot::Config
nine The HAS_THREADS/PARROT_HAS_THREADS is kinda brown paper bagish... it disabled threads everywhere and I didn't notice at first because everything works too well without them... 17:52
17:52 isBEKaml joined
isBEKaml Oh, hey - name games all! plumage, rosella, winxed and now Banna foo! :) 17:53
isBEKaml can't spell 17:54
whiteknight nine.... Yeah, it looks like if I remove that #ifdef HAS_THREADS I added to src/interp/api.c miniparrot runs without segfaulting 18:00
apparently HAS_THREADS is false there 18:01
and it built fine
nine Yep it's actually PARROT_HAS_THREADS. No idea where I had the wrong one from
whiteknight isBEKaml! Welcome back 18:02
isBEKaml whiteknight: hey... :) I'm just loitering around.. 18:03
can someone confirm that this is the last push/commit to parrot master? d6dfa2? 18:04
whiteknight nine; something is broken though. chameneos.pir seems to hang. moretasks.pir gets up to 244 and hangs
isBEKaml my git pull didn't pick anything
nine whiteknight: does it hang without CPU usage? 18:05
whiteknight isBEKaml: should have had one more commit after that
nine: no, it looks like it's pegging one of my corese 18:06
no, not pegging, but it's at 25% CPU
isBEKaml whiteknight: ah, okay 18:08
nine whiteknight: chameneos does only print something on start and exit. But it should exit after 10 seconds. If not, there could be something wrong with timers. 18:10
18:11 rich joined
whiteknight nine: yeah, it hung for almost a minute before I Ctrl+C'd it 18:12
nine I wonder if it could just be that exit() on Windows does not exit if other threads are still running 18:13
whiteknight is that what you are using to terminate threads?
nine I do not terminate them explicitely. It just happens to work anyway so this might really be Linux specific behaviour. 18:14
whiteknight: did chameneos print some number before hanging? 18:15
whiteknight no 18:16
said going to sleep, and was gone forever
nine Then there must be some other problem as well.
It should print the number of successful exchanges before trying to exit 18:17
Just finished implementing a Mandelbrot generator benchmark in winxed. The threaded version shows a 3x speedup on a quad core CPU compared to a single threaded implementation. 18:21
whiteknight thats pretty good 18:22
nine It scales even better than my implementation using the Task Parallel Library on Mono. Of course the absolute runtime is an order of magnitude longer... 18:26
Have to go now. Bye. 18:27
dalek kudo/nom: 2b96819 | moritz++ | / (2 files):
rename "lazy" to "LAZY" to avoid confusion with lazy lists

this might not be the final name either
18:28
mj41 whiteknight: Hi. Trying to fix ttbot/taptinder's machine 8 (no free space on device). Please ping me next time when ttbot do bad things. 18:30
whiteknight mj41: sure thing
18:32 bluescreen joined
dalek kudo/nom: b390e8b | moritz++ | src/Perl6/Actions.pm:
[LAZY] fix the name in the actions too
18:45
18:54 alester joined 19:11 mdupont joined 19:25 kjs joined 19:26 lucian joined 20:06 brrt joined 20:18 preflex_ joined
dalek kudo/method-not-found: 65f9d95 | moritz++ | src/core/Exception.pm:
avoid some boxing in print_control
20:47
kudo/method-not-found: 8254a60 | moritz++ | src/core/Exception.pm:
typed exception for "method not found" error
brrt yay, submitted gsoc documents 20:50
21:09 lucian joined 21:20 brrt left
dalek nxed: 8a44172 | NotFound++ | winxedst2.winxed:
fix and simplify a bit CallBuiltinExpr.emit
21:26
p: 45ed99f | (Gerhard R)++ | 3rdparty/dyncall/GNUmakefile:
fixes #38

use explicit -Wno-strict-prototypes instead of -w, which is ignored by gcc 4.2 only necessary on OS X, which comes with a broken version of GNU make
21:51
22:08 mdupont joined 22:17 kjs joined 22:26 bluescreen joined 22:51 whiteknight joined
whiteknight good afternoon, #parrot 22:53
kjs good evening 22:59
whiteknight hello kjs! Good to see you around here again 23:00
kjs hi whiteknight! thanks :-) 23:01
how are things
dalek rrot/threads: 03e14e3 | Whiteknight++ | src/interp/api.c:
Change HAS_THREADS to the correct PARROT_HAS_THREADS. this enables threaded parrot to build on win32
23:02
whiteknight things are going pretty well, I think. Release out the door last night, GSOC officially starting on monday. Lots of branches to merge
kjs ah yes i saw the mail. well done 23:03
i'm interested in this m0/lorito design.
basically, if i understand correctly, the idea is to reimplement parrot instruction in a c-like language which has parrot calling conventions, rather than c calling conv... 23:04
whiteknight cotto is leading the charge on that
kjs i spoke to him briefly yday 23:05
whiteknight basically, it's a much simpler opcode set which is designed with ease of JIT in mind
kjs yes, that would be m0. but you dont want to write m0, you'd want to write m1, a HLL that emits m0, right? 23:06
whiteknight exactly
kjs ... which is an excellent opportunity to subset C, with only that part of the grammar that's useful and "safe" 23:07
(and also build in parrot's coding conventions)
whiteknight yes
cotto not quite a subset of C, but something that'll be very easy for C hackers to pick up 23:09
(yet unspecified)
kjs I'd say it'd be a good idea to forbid those things that are too complex and error prone 23:10
whiteknight what we need is awesome compiler-developers to work on it...
kjs ha ha whiteknight ...
i'm good at parsers, not so sure about the rest.
ok let me get this straight (I've read chromatic's blog post that outlined the problem with the current C/PIR interactions). 23:16
the plan is to write parrot (or parts of it) in some language m1, which outputs m0, which is interpreted by an interp written in C.
m1 being the HLL, m0 being the 50-op assembly language that 's the language of the C interp mentioned above. 23:17
this interp takes care of the parrot calling conventions
is this more or less correct?
23:18 nbrown joined
cotto that sounds about right 23:23
kjs so let's say for sake of argument, there would be a little language, C-like, that emits m0, and someone else would implement the m0 assembly language, incl the handing of the PCC, you'd be 80% there. 23:25
cotto that's the idea, yes 23:26
Coke ~~ @ kjs
whiteknight the nqp build failed for me with -j, but works without it 23:35
cotto nqp's parallel build is odd 23:36
or has been historically
whiteknight okay, so long as I'm not the only one seeing it
23:52 aloha joined 23:53 bacek_at_work joined