Re: [Rd] Copyright versus Licenses

2010-02-13 Thread Guillaume Yziquel
needs concerning Rcpp is the QPL. This way he retains control over the evolution of the source code. By far not one of my favourite licences, but that's the licence he's been looking for all along. -- Guillaume Yziquel http://yziquel.homelinux.org/ ___

Re: [Rd] Copyright versus Licenses

2010-02-12 Thread Guillaume Yziquel
ake huge sense to hijack it. So here you protect the author. But how is this R related? All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] [ANN] OCaml-R binding for the R language.

2010-02-12 Thread Guillaume Yziquel
ons to OCaml). Hopefully, this lays down a foundation on which one could import R functionalities, libraries and packages to OCaml. -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Autoconf macros for R?

2010-02-07 Thread Guillaume Yziquel
re these ones: http://rwmj.wordpress.com/2009/03/31/using-autoconf-for-ocaml-projects/ http://forge.ocamlcore.org/projects/Focaml-autoconf/ Anything similar hanging out there for R? -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-proj

Re: [Rd] Stop packages and datasets to be loaded on startup.

2010-01-31 Thread Guillaume Yziquel
t autoloading, I should simply remove the .AutoloadEnv environment? Or keep it empty? -2- How is this environment populated at startup? How can I ensure that it be empty? | And concerning datasets, how do you avoid loading them? Maybe by not loading the datasets package? But

Re: [Rd] Stop packages and datasets to be loaded on startup.

2010-01-31 Thread Guillaume Yziquel
ng "loadedNamespaces()");; - : string list = ["base"] # R.strings_of_t (R.eval_string "search()");; - : string list = [".GlobalEnv"; "Autoloads"; "package:base"] # All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Stop packages and datasets to be loaded on startup.

2010-01-30 Thread Guillaume Yziquel
} The code above happens before Rf_initEmbeddedR in littler. So I gather that just setting R_DEFAULT_PACKAGES to NULL should be OK. But then, what is the rather complicated stuff in the autoload() function in littler.c for? And concerning datasets, how do you avoid loadi

Re: [Rd] Problem with R math library.

2010-01-28 Thread Guillaume Yziquel
point in time of bringing the libRmath.so functionality to the part of my library that embeds R, as you pointed out. -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problem with R math library. [and a minor bug report]

2010-01-28 Thread Guillaume Yziquel
uot;*** loaded '%s'\n", argv[0]); set_seed(123, 456); N01_kind = AHRENS_DIETER; printf("one normal %f\n", norm_rand()); set_seed(123, 456); N01_kind = BOX_MULLER; printf("normal via BM %f\n", norm_

Re: [Rd] Problem with R math library.

2010-01-28 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Dirk Eddelbuettel a écrit : Salut Guilluame, | > val norm_rand : unit -> float | > Random variates from the standard normal distribution. Bug: currently systematically returns -8.77332116900134373. | | Any idea as to why the function systematically re

Re: [Rd] Problem with R math library.

2010-01-28 Thread Guillaume Yziquel
..): What's the big difference between using the R mathematical library in standalone mode and not in standalone mode? How does it translate in terms of C directives and linking modalities? I've noticed the MATHLIB_STANDALONE macro, but I do not know how I should use it... All the bes

[Rd] Problem with R math library.

2010-01-28 Thread Guillaume Yziquel
All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] PROTECT and OCaml GC.

2010-01-08 Thread Guillaume Yziquel
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

Re: [Rd] PROTECT and OCaml GC.

2010-01-08 Thread Guillaume Yziquel
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 http://yziquel.homelinux.org/ _

Re: [Rd] Segfault in GetNewPage, memory.c.

2010-01-08 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Hello. I'm still working on my OCaml-R binding and I get a segfault in the GetNewPage() function of memory.c. Stupid issue that took me some time to solve: R wasn't initialised. (It wasn't easy to solve because I'm trying to figure out

[Rd] Segfault in GetNewPage, memory.c.

2010-01-07 Thread Guillaume Yziquel
y background information or pointers helping me to understand what is precisely supposed to be going on in the memory allocation code would also be very much appreciated. All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] PROTECT and OCaml GC.

2009-12-01 Thread Guillaume Yziquel
ymbol assignment is a side-effect. Is there an API-compliant way to handle this, and make data structures as immutable as possible? -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/ma

Re: [Rd] PROTECT and OCaml GC.

2009-12-01 Thread Guillaume Yziquel
. Isn't there a way to create a tag without using install over and over? A macro that simply sets the tag to whatever CHARSXP might be useful? -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://

Re: [Rd] PROTECT and OCaml GC.

2009-12-01 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Guillaume Yziquel a écrit : One last thing, concerning the use of promises. If I do install, findVar, without forcing the resulting promise, and then construct the call, I get a failure: Replacing findfun by findvar works in this specific case. See below. Could

Re: [Rd] PROTECT and OCaml GC.

2009-12-01 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : One last thing, concerning the use of promises. If I do install, findVar, without forcing the resulting promise, and then construct the call, I get a failure: # R.eval_langsxp (R.langsxp_of_list [(R.symbol "str"); (R.symbol "lm")] 2);;

Re: [Rd] PROTECT and OCaml GC.

2009-12-01 Thread Guillaume Yziquel
Simon Urbanek a écrit : On Nov 30, 2009, at 16:07 , Guillaume Yziquel wrote: Simon Urbanek a écrit : And it goes then to my other question: How can you pass to eval a LANGSXP where the CAR is an *anonymous* function, no SYMSXP involved? You just pass it as value of the call. I suspect the

Re: [Rd] PROTECT and OCaml GC.

2009-11-30 Thread Guillaume Yziquel
ll have a look at the code snippet you gave, since I do not understand why it doesn't fail the same way mine does. Thanks a lot. -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] PROTECT and OCaml GC.

2009-11-30 Thread Guillaume Yziquel
in the same spirit as the link below, which I really entice you to read: http://ocsigen.org/eliom/manual/1.2.0/1#p1baseprinciples Statically typing the internal structure of assembled sexps is no different than statically typing XHTML. Glad that we're heading somewhere... All the best

Re: [Rd] :Re: PROTECT and OCaml GC.

2009-11-30 Thread Guillaume Yziquel
aying "anonymous R objects can be passed to functions". My question is: can you construct a LANGSXP in C/Python/rpy from R objects and an anonymous R closure, the closure being available from C as a SEXP closure. Can you write a function SEXP my_langsxp (SEXP closure, SEXP arg

Re: [Rd] PROTECT and OCaml GC.

2009-11-30 Thread Guillaume Yziquel
f the programmer. Please understand that I take no joy and no fun in being a pain. If you force me to write a binding that wouldn't be type safe, it would be unused. This is simply not acceptable to me: I am unfortunately not willing to waste my

Re: [Rd] :Re: PROTECT and OCaml GC.

2009-11-30 Thread Guillaume Yziquel
the environment of a closure is fine, for instance, but I'd like to execute a closure directly, and eventually be able to construct R closure from OCaml functions). Rpy2 can do a lot of that, and probably so can JRI. An anonymous closure to anonymous closure mapping? Could you point

Re: [Rd] PROTECT and OCaml GC.

2009-11-29 Thread Guillaume Yziquel
Simon Urbanek a écrit : On Nov 28, 2009, at 7:50 PM, Guillaume Yziquel wrote: FWIW what I think you should be really looking at is R_PreserveObject/R_ReleaseObject. OK. Thanks. I would suggest looking at the many other R embeddings in other languages that already exist since I don't

Re: [Rd] [Fwd: opened symbols in libR.so available.]

2009-11-29 Thread Guillaume Yziquel
Uwe Ligges a écrit : Guillaume Yziquel wrote: Hi. I've patched Dirk Eddelbuettel's Debian package of R, namely r-base, in order to make hidden symbols of the library libR.so available is now available: http://yziquel.homelinux.org/debian/pool/main/r/r-base/ For instance, the

Re: [Rd] PROTECT and OCaml GC.

2009-11-28 Thread Guillaume Yziquel
hat I'll adapt. Thanks a lot. -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] PROTECT and OCaml GC.

2009-11-28 Thread Guillaume Yziquel
monothreaded case.) All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] [Fwd: opened symbols in libR.so available.]

2009-11-28 Thread Guillaume Yziquel
able. All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Symbols, install, and eval.

2009-11-25 Thread Guillaume Yziquel
afile"); (NULL, ARG "compressed"); (NULL, ARG "envhook")]); prom_env = NULL})]) # ml_eval x;; function (formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL

[Rd] GC control and GET_NEW_NODE.

2009-11-24 Thread Guillaume Yziquel
own code. It require mkPROMISE. No C entry points. Which requires GET_FREE_NODE from memory.c. Which does not have C entry points in libR.so. This is a pain. I'd rather not have to reimplement the interpreter in OCaml. I simply want to bind to hidden symbols. Suggestions? --

Re: [Rd] R strings, null-terminated or size delimited?

2009-11-23 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Unfortunately, or fortunately, (depends on the point of view), I've looked at symbols of libR.so (I'm on a Debian box, with Debian R), and I fail to see such symbols exported. How could I get to bind to these functions, without having to compile my s

Re: [Rd] R strings, null-terminated or size delimited?

2009-11-23 Thread Guillaume Yziquel
I fail to see such symbols exported. How could I get to bind to these functions, without having to compile my stuff and R at the same time? All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R strings, null-terminated or size delimited?

2009-11-21 Thread Guillaume Yziquel
as perhaps a bit brutal. All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R strings, null-terminated or size delimited?

2009-11-21 Thread Guillaume Yziquel
Simon Urbanek a écrit : On Nov 21, 2009, at 4:12 PM, Guillaume Yziquel wrote: Hello. I've been looking at vecsexps for my binding. Concerning strings, I'm wondering: are they supposed to be null-delimited? Yes, they are null-delimited when you create/access them. OK. Fair e

[Rd] R strings, null-terminated or size delimited?

2009-11-21 Thread Guillaume Yziquel
sexps? I'm thinking of CHARSXPs and INTSXPs for the moment... All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] structure of SYMSXP values.

2009-11-19 Thread Guillaume Yziquel
and the child SYMSXP) give different addresses... So I'm wondering: what's the structure of SYMSXPs? Is its sym_value always a SYMSXP? I guess not. When its sym_value is a SYMSXP, is it pointing to itself? All the best, Guillaume Yziquel. # t;; - : R.Internal.t = #

Re: [Rd] R_NilValue and segfault.

2009-11-17 Thread Guillaume Yziquel
Duncan Murdoch a écrit : On 17/11/2009 9:31 PM, Guillaume Yziquel wrote: Guillaume Yziquel a écrit : Hello. I've been trying to wrap up the R_NilValue into OCaml-R. I nevertheless get a segfault. Is the value of R_NilValue (I mean the address in the R_NilValue pointer located i

Re: [Rd] R_NilValue and segfault.

2009-11-17 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Guillaume Yziquel a écrit : Hello. I've been trying to wrap up the R_NilValue into OCaml-R. I nevertheless get a segfault. Is the value of R_NilValue (I mean the address in the R_NilValue pointer located in the uninitialized data section - i.e. the BSS se

Re: [Rd] R_NilValue and segfault.

2009-11-17 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Hello. I've been trying to wrap up the R_NilValue into OCaml-R. I nevertheless get a segfault. Is the value of R_NilValue (I mean the address in the R_NilValue pointer located in the uninitialized data section - i.e. the BSS section) set up *after* the

[Rd] R_NilValue and segfault.

2009-11-17 Thread Guillaume Yziquel
ectives in Rinternals.h, and I'm wondering whether or not that might be an issue. All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] OCaml-R and xts works!

2009-11-15 Thread Guillaume Yziquel
ocamlr.html http://yziquel.homelinux.org/topos/debian-repository.html http://yziquel.homelinux.org/debian/pool/main/o/ocaml-r/ when my laptop's up, wifi working, et ceterae. All in french for now, and documentation is not up to date... That will come. OCaml-R it

Re: [Rd] R_tryEval for OCaml-R.

2009-11-14 Thread Guillaume Yziquel
Dirk Eddelbuettel a écrit : On 14 November 2009 at 16:45, Guillaume Yziquel wrote: | I've had a look at R-exts.pdf, but R_tryEval is not documented. | | Could someone please point me to relevant documentation, I don't think it is documented as it is not part of the API -- see f

Re: [Rd] R_tryEval for OCaml-R.

2009-11-14 Thread Guillaume Yziquel
Romain Francois a écrit : You can also see it in action in jri (in the Rengine.c file). http://www.rforge.net/JRI/ Romain Thanks. I'll have a look. -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing

[Rd] R_tryEval for OCaml-R.

2009-11-14 Thread Guillaume Yziquel
ion and all related entry points in libR.so. I've had a look at R-exts.pdf, but R_tryEval is not documented. Could someone please point me to relevant documentation, or the relevant part of the R source code? All the best, -- Guillaume Yzique

Re: [Rd] Help with OCaml bindings for R interpreter.

2009-10-10 Thread Guillaume Yziquel
Simon Urbanek a écrit : On Oct 10, 2009, at 3:53 PM, Guillaume Yziquel wrote: However, as it now stands, the binding is not fully functional: When an OCaml program is compiled with this binding, to generate, say, myprog.byte, it is necessary to run R CMD ./myprog.byte in order for the

[Rd] Help with OCaml bindings for R interpreter.

2009-10-10 Thread Guillaume Yziquel
me to the right documentation? All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] Usage of OCaml/R binding.

2009-09-08 Thread Guillaume Yziquel
ml http://yziquel.homelinux.org/debian/pool/main/o/ocaml-r/ Guillaume Yziquel a écrit : Hello. I've been pulling together a Debian package out of Maxence Guesdon's OCaml bindings for R. Will be available from my website as soon as I get my router to obey me. Here's Maxence's bindi