Re: [Rd] PROTECT and OCaml GC.

From: Guillaume Yziquel <>
Date: Sat, 09 Jan 2010 02:04:11 +0100

Guillaume Yziquel a écrit :
> Simon Urbanek a écrit :

>> If you have suggestions for extending the API, feel free to post them 
>> with exact explanations how in general that extensions could be useful 
>> (general is the key word here - I think so far it was rather to hack 
>> around your way of implementing it). [And FWIW tryEval *is* part of 
>> the API].

> Concerning tryEval, I had a look at context.c, and it says:
>> /*
>>   R_tryEval is in Rinternals.h (so public), but not in the API.
>>  */

And concerning tryEval, there's one feature I miss: there is error handling capabilities, but to my knowledge, it provides a boolean status back. True or false. Is it possible to get a full error message back, so that it can be analysed and translated to OCaml exceptions?

> Now, here's a feature I'd like to implement with the API:
> In OCaml, there's a library called Lwt. It's a library implementing
> lightweight, or green, threads.
> What I want to do is to be able to launch some R code, and have it
> multithread with other OCaml code, within one single real thread.
> Therefore I have to implement the commutation context somewhere in the
> evaluation mechanism of R itself.
> The API doesn't support that, I guess.

      Guillaume Yziquel

______________________________________________ mailing list
Received on Sat 09 Jan 2010 - 01:09:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 09 Jan 2010 - 21:10:11 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive