[Rcpp-devel] changes in Rcpp today

Romain François francoisromain at free.fr
Tue Dec 29 22:51:18 CET 2009


On 12/29/2009 10:38 PM, Dirk Eddelbuettel wrote:
>
> On 29 December 2009 at 21:31, Romain François wrote:
> | Right, so trying to cope with the many threads of today. I've commited a
> | few changes to Rcpp :
> |
> | - new namespace Rcpp, which will receive the new API
> | - the class Rcpp::RObject holds a SEXP and performs operations that are
> | doable on any SEXP (manage attributes, garbage collection, etc ...). It
> | contains the functionality that was in RcppSexp before
>
> That's not bad. Parts of me find the Rcpp::RObject combination too long. I
> guess I will get used to it.  Should we should for Rcpp::RObj given that ...

Ah. I won't complain if you change it.

> | - the template Rcpp::XPtr replaces RcppXPtr, but now extends
> | Rcpp::RObject, so that it can concentrate on external pointer stuff and
> | leave the generic SEXP management to Rcpp::RObject
>
> ... XPtr is also a 'shrunken' term?

you are right, shrink or not shrink, in this instance 
Rcpp::ExternalPointer although very explicit about what it is would be 
very too long, specially that we also need to type in the template 
parameter. for example if the xp is a vector<int>, look at all tyhe 
typing : Rcpp::ExternalPointer< std::vector<int> >

> | I've set up the package so that we can add unit tests using RUnit and
> | the Gorjanc/MM/... trick
> |
> | examples now use the Rcpp namespace where appropriate.
> |
> |
> | It does not break anything (yet) so code that used to work in Rcpp<  0.7
> | still works. RcppSexp and RcppXPtr did get the 5 second rule treatment
> | thought.
>
> And that is why we should release as 0.7.1 (fine by me) or 0.8.0 (also
> defebnsible ASAP).

It's all yours, I need some sleep now.

> The stickler in me hates this, by the way:
>
> Vignettes with missing or empty \VignetteIndexEntry:
> [1] "Rcpp-unitTests"
> See the information on INDEX files and package subdirectories in the
> chapter 'Creating R packages' of the 'Writing R Extensions' manual.

This is weird. I did not see that. The only reason the file is there 
(empty file) is for the Makefile to be used. I'll come up with something.

> | Things on my list:
> | - rework the examples as regular unit tests
> | - maybe a vignette
> | - post on my blog about these
> | - Rcpp::Function : this will overload operator() so that the object
> | looks like a C++ function and will have stuff to deal with the
> | environment of a function (closure)
>
> Cool.
>
> | - Rcpp::S4 : things to deal with slots
> | - Rcpp::Env : (or Rcpp::Environment) retrieve object from the
> | environment, ...
>
> Also cool.
>
> | - Rcpp::Vector : handling of integer, numeric, raw, character vector
> | with for example operator[]. I'll review the Rcpp*Vector classes for that.
>
> Yes,  that can with a redesign / some new thinking. That _is_ the bread and
> butter of the package.

Yes. I don't want to touch the RcppVector and all for now.

> | All of these can happen before or after we release a new version to
> | CRAN. Maybe unit tests should happen though as we already have pretty
> | much all the code.
>
> All of these can be delayed!   There can be (should be) many small
> releases. I don't like our RProtoBuf release management (== no release yet!)
> all that much.

Very true. I've discovered some bugs as I started to work in unit tests, 
which tells me more are needed, but yes we need to release this beast.

> | It is late in france now, so that is it for today.
>
> Quite the day. Kudos!
>
>
> Nice blog post, but the formatting is a little screwed up in the middle past
> ", so for example" and you miss a closing ) after "at least for this post".

thanks

> Dirk
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/IW9B : C++ exceptions at the R level
|- http://tr.im/IlMh : CPP package: exposing C++ objects
`- http://tr.im/HlX9 : new package : bibtex





More information about the Rcpp-devel mailing list