IRC channel logs

2013-07-05.log

back to list of logs

***mario-go` is now known as matio-goulart
<nalaginrut>sneek: later tell civodul OBS just like Version-control-system + continuous+integration + REPO server
<sneek>Got it.
***janneke1 is now known as janneke_
<civodul>Hello Guilers!
<sneek>Welcome back civodul, you have 1 message.
<sneek>civodul, nalaginrut says: OBS just like Version-control-system + continuous+integration + REPO server
<shanecelis>Hi Guilers
<shanecelis>Is there a good way to do a "unified" function pointer? I'd like to have a thing that could be a C function pointer or a Scheme procedure. If it's a C function pointer, and I call it from C, then Scheme is never entered (just for performance's sake). In C, if I call this _thing_ and it's a scheme procedure then it of course enters Scheme land. Maybe it's called something else?
<shanecelis>Hi civodul
<civodul>hi shanecelis!
<civodul>shanecelis: you could use something like
<civodul>struct { int type; union { void (*f)(int x); SCM (*g) (SCM); } func; }
<civodul>that's the only valid way to do it, normally, but it's not very convenient
<civodul>so you can just as well come up with your own convention
<shanecelis>civodul: Yeah, that's what I'm thinking. I was just wondering if there was already some existing C/Scheme convention.
<civodul>not that i know of
<civodul>Guile defines scm_t_subr as the C type for Scheme procedures
<civodul>but that's it
<shanecelis>civodul: Cool. That's the path I'll take then.
<shanecelis>civodul: I have a deadline I'm trying to hit for tomorrow, but if you want to chat about GSoC now we can. However, if we can hold off till after tomorrow that would be preferable.
<civodul>shanecelis: fine
<civodul>i'm at work right now, so it's better to chat when i'm not at work ;-)
<shanecelis>civodul: cool. Sounds good. :)
<civodul>which means after 7PM CEST
<shanecelis>And it's 10 am there now?
<civodul>right
<civodul>what time at your place?
<shanecelis>I'm Eastern Standard Time, 4 am.
<civodul>ouch :-)
<shanecelis>civodul: yeah. deadlines. bleh.
***matio-goulart is now known as mario-goulart
*civodul views http://www.youtube.com/watch?v=fHK-uS-Iedc
<civodul>type inference with Kanren at 17:30
*taylanub should watch that -- is very interested in type-inference for dynamic languages.
***DerGuteM1ritz is now known as DerGuteMoritz
***sneek_ is now known as sneek
<mark_weaver>sneek: later tell shanecelis the other way to have a unified C/Scheme procedure pointer is to simply have it always be a C pointer, and use the FFI to make a C stubs for each Scheme procedure that you'd like to convert to such a unified pointer.
<sneek>Got it.
<mark_weaver>sneek: botsnack
<sneek>:)
<shanecelis>Guile is so cool. I didn't realize I could do procedure->pointer on closures!
<sneek>Welcome back shanecelis, you have 1 message.
<sneek>shanecelis, mark_weaver says: the other way to have a unified C/Scheme procedure pointer is to simply have it always be a C pointer, and use the FFI to make a C stubs for each Scheme procedure that you'd like to convert to such a unified pointer.