Re: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN
Dear all, My understanding is that Rcpp11 will employ features of c++11 (which is very nice) but other than that it is not clear to me how Rcpp and Rcpp11 relate to each other? Can I start to use Rcpp11 with my existing Rcpp-based packages or is Rcpp and Rcpp11 branching off in different directions? Cheers Søren -Original Message- From: rcpp-devel-boun...@lists.r-forge.r-project.org [mailto:rcpp-devel-boun...@lists.r-forge.r-project.org] On Behalf Of Romain Francois Sent: 11. april 2014 15:26 To: rcpp-devel@lists.r-forge.r-project.org Subject: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN Hello, I'll keep it short here. Rcpp11 3.1.0 was released on CRAN today. An announcement email has been sent to both r-packages and the new R and C++ mailing list. https://groups.google.com/forum/#!forum/r-and-cpp Best Regards, Romain ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN
Hello, (may contains traces of personal opinions) My motivation for starting Rcpp11 were: - Assuming C++11, which is nicer to use and teach. Rcpp still wants to be compatible with older standard, which essentially means that even if I write something new using C++11, I still have to figure out how to write the same thing in C++98. - modernize the code base. This meant let go of a few features so that we have what we keep better. This is incompatible with Rcpp’s maintainership policy. Last time I asked to remove a feature from Rcpp, I was told that it would take a year of deprecation. In Rcpp11, because I’m in charge I can decide to break stuff to make something better. Rcpp has been a great project to work on for me. I’ve learned a lot of C++, and I think I owe most of my C++ knowledge from involvement I have with Rcpp. But as far as I’m concerned, the string requirements take all the fun away. Working on Rcpp11 has brought fun back. I can innovate. There will always be some conceptual compatibility between Rcpp and Rcpp11. For example both have the NumericVector class to handle numeric vectors. However in that particular example, the implementation of NumericVector in Rcpp is too complicated, you have gazillion of constructors, etc ... hard to maintain, hard to document, hard to teach. Now that Rcpp11 can be used on current versions of OSX, recent enough linux, windows and even solaris (if you use gcc), what I would suggest is that you try it and come back with questions (not on this list though, please use the google group that is not strictly restricted to Rcpp questions). What might help you deciding is that in Rcpp11, we did not retain some features such as modules and date/time related classes. If your code uses these, then you should probably either stick with Rcpp or start motivating me for adding something along the lines in Rcpp11. There is still a need for something like modules, but not with this implementation. Now, as Dirk says, you can use C++11 with Rcpp. Just as much as you can use C++11 with vanilla .Call/.C. Personally I think the future of R and C++ is with Rcpp11. This is where I’ll focus my time. Romain Le 17 avr. 2014 à 08:24, Søren Højsgaard sor...@math.aau.dk a écrit : Dear all, My understanding is that Rcpp11 will employ features of c++11 (which is very nice) but other than that it is not clear to me how Rcpp and Rcpp11 relate to each other? Can I start to use Rcpp11 with my existing Rcpp-based packages or is Rcpp and Rcpp11 branching off in different directions? Cheers Søren -Original Message- From: rcpp-devel-boun...@lists.r-forge.r-project.org [mailto:rcpp-devel-boun...@lists.r-forge.r-project.org] On Behalf Of Romain Francois Sent: 11. april 2014 15:26 To: rcpp-devel@lists.r-forge.r-project.org Subject: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN Hello, I'll keep it short here. Rcpp11 3.1.0 was released on CRAN today. An announcement email has been sent to both r-packages and the new R and C++ mailing list. https://groups.google.com/forum/#!forum/r-and-cpp Best Regards, Romain ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN
Le 17 avr. 2014 à 09:42, Hao Ye h...@ucsd.edu a écrit : Hi Romain, Thanks for the explanation -- I was curious about the difference between Rcpp and Rcpp11, as well. What might help you deciding is that in Rcpp11, we did not retain some features such as modules and date/time related classes. If your code uses these, then you should probably either stick with Rcpp or start motivating me for adding something along the lines in Rcpp11. There is still a need for something like modules, but not with this implementation. Does this mean that there will be some other mechanism for exposing c++ classes to R? Maybe in some way that supports inheritence? ;) Yes. Problems with Rcpp modules are: - the way you express things is limited by C++ grammar. It was fun and challenging to write it. But experience of teaching modules shows that the concepts are somewhat hard to grasp. - it is very demanding in terms of resources In the future, I’d like to look into code generation (a la attributes) as a mean of exposing classes. So we need something expressive enough. My current blue sky line of thinking about this is that I’d like to have some sort of intermediate language between R and C++. John has done something similar with the exposeClass in Rcpp. https://github.com/RcppCore/Rcpp/blob/master/R/exposeClass.R It goes in the right direction, but this time you are limited by R’s grammar. This has been on my radar for some time, but I think having a class system that is nice to use in R requires some grammatical changes. It is unlikely that I will have the leverage to change R’s grammar, but what I can work on is an intermediate language that generates R code. In any case, Rcpp11 still has the external pointer class template, so we can « write modules by hand ». Romain ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN
On 17 April 2014 at 09:24, Romain François wrote: | Now, as Dirk says, you can use C++11 with Rcpp. Just as much as you can use C++11 with vanilla .Call/.C. Yes of course. As R in a C program, and as .C (no SEXP) and .Call (SEXP interface) are C interfaces, Rcpp and Rcpp11 are in the exact same boat. There is no advantage at the interface level. Everything turns to C the moment we interface R. Beyond that point, we can use C++ in all its features, including C++11. Rcpp has supported the option of C++11 as long as the compilers have as it required just an optional switch. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] Rcpp is now at 200 CRAN and 27 BioC packages
Earlier this week we passes a new milestone: there are now 200 packages on CRAN which use Rcpp. And with the BioConductor 2.14 release, there are now another 27 packages in BioConductor. This is a very humbling number, and we are very happy that Rcpp is finding such wide, and rapidly growing, use. Speaking for the Rcpp Core team, we will try our best to maintain (and extend) the interface and functionality provided by the package for your use in Programming with Data (to quote John's wonderful book title). R and C++ make a fantastic combination for that, and we are so glad our interface layer and tool is finding such wide and growing use. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] Compiling issue about Rcpp
Hi, all I am new to Rcpp and might need some of your help, thanks a lot. I was trying to compile my Rcpp program in eclipse. But I met a lot of errors when I was trying to do so. Most of the error comes from the String.h. Here is the command and part of error: *g++ -DINSIDE -ID:/R/R-3.1.0/include -ID:/R/R-3.1.0/library/RInside/include -ID:/R/R-3.1.0/library/Rcpp/include -ID:/R/R-3.1.0/library/Rcpp/include/Rcpp -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MFsrc/rcpp_hello_world.d -MTsrc/rcpp_hello_world.d -o src/rcpp_hello_world.o ../src/rcpp_hello_world.cpp* *In file included from D:/R/R-3.1.0/include/R_ext/RS.h:26:0,* * from D:/R/R-3.1.0/include/R.h:50,* * from D:/R/R-3.1.0/library/Rcpp/include/RcppCommon.h:36,* * from D:/R/R-3.1.0/library/Rcpp/include/Rcpp.h:27,* * from ../src/rcpp_hello_world.cpp:2:* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:52:17: error: 'internal' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:53:17: error: 'internal' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:66:21: error: expected ')' before 'charsxp'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:23: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:36: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:23: error: 'const_StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:42: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:9: error: 'Rcpp::String::String(const int)' cannot be overloaded* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:9: error: with 'Rcpp::String::String(const int)'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:103:23: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:35: error: declaration of 'operator=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:41: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:35: error: declaration of 'operator=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:40: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:112:41: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:112:54: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:170:42: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:170:55: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:36: error: declaration of 'operator+=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:41: error: expected ')' before 'x'* Can someone please help? Great thanks. Best regards, Wen ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Compiling issue about Rcpp
Wen, On 18 April 2014 at 09:22, Wen YOU wrote: | I am new to Rcpp and might need some of your help, thanks a lot. | I was trying to compile my Rcpp program in eclipse. But I met a lot of errors | when I was trying to do so. Most of the error comes from the String.h. Here is | the command and part of error: | | g++ -DINSIDE -ID:/R/R-3.1.0/include -ID:/R/R-3.1.0/library/RInside/include -ID: | /R/R-3.1.0/library/Rcpp/include -ID:/R/R-3.1.0/library/Rcpp/include/Rcpp -O0 | -g3 -Wall -c -fmessage-length=0 -MMD -MP -MFsrc/rcpp_hello_world.d -MTsrc/ | rcpp_hello_world.d -o src/rcpp_hello_world.o ../src/rcpp_hello_world.cpp | In file included from D:/R/R-3.1.0/include/R_ext/RS.h:26:0, | from D:/R/R-3.1.0/include/R.h:50, | from D:/R/R-3.1.0/library/Rcpp/include/RcppCommon.h:36, | from D:/R/R-3.1.0/library/Rcpp/include/Rcpp.h:27, | from ../src/rcpp_hello_world.cpp:2: | D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:52:17: error: 'internal' does | not name a type [...] | Can someone please help? Great thanks. You have not shown a reproducible error in Rcpp. What you have shown is that you failed to build something using Eclipse. Which may be well a setup error on your part. We support an R package which is fairly rigorously tested and which supports 'R CMD INSTALL .' for various values of '.' (and various different incantations, including RStudio which tries hard (and successfully) to behave just like R by invoking R as R). For everything else, you are mostly on your own. Windows is twice as hard because of its inconsistent $PATH etc. I would try to build something simple first, either directly with R or via RStudio, so that you know that the code works, and then migrate a known working setup to your chosen environment. Good luck, Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel