Yes, lots of packages do use C/Fortran code ... it would be great if there were more packages that are "pure R" especially since the advent of S4 classes and namespaces. Is it worth suggesting that we create a designation "pure R" for packages that have no external source code and encourage more of these? Indeed, now the number of packages is so big could they be classified to aid potential users? Going back to the original question, it strikes me that C/Fortran code is most often used to interface to other code - there would be a better way of doing this in a Java environment - or to speed up existing R code - where loops are usually the cause of the speed problem and the introduction Java bytecode would presumably be helpful anyway. Surely there could be some sort of process to generate automated jni bindings? I don't think a Java implementation of the R parser is as bigger task as it seems ... much of the work to get an interpreted scripting language working could be taken from the Jython project? Regards, John> -----Original Message----- > From: Simon Urbanek [mailto:Simon.Urbanek@math.uni-augsburg.de] > Sent: 26 February 2004 15:39 > To: Marsland, John > Cc: r-devel@stat.math.ethz.ch > Subject: Re: [Rd] Script editor for Windows GUI > > On Feb 26, 2004, at 11:58 AM, Marsland, John wrote: > > On a slightly different tack, I have recently taken a look at Jython -an> > implementation of Python in Java that produces byte code that runs onthe> > JVM. Combined with this there is a project called xoltar which aims tobring> > functional programming to Python. This got me thinking that a R parsercould> > be written in Java for a core set of functionality allowing code and > > packages written in "pure-R" to be compiled as byte code and run on > > the JVM. Then one could call the SJava package from Java to execute > > anything unusual in R proper.... any thoughts? > > Good question - due to the amount of packages that use C/Fortran code I > had the impression that this sounds just too crazy. But I'm really keen > on getting some feedback on this, because technically, one of the CS > students here would enjoy doing something like that ...********************************************************************** This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}
"Marsland, John" <John.Marsland@CommerzbankIB.com> writes:> Yes, lots of packages do use C/Fortran code ... it would be great if there > were more packages that are "pure R" especially since the advent of S4 > classes and namespaces.Even with those, quite often we have to move code to C/C++/Fortran for efficiency.> Is it worth suggesting that we create a designation "pure R" for packages > that have no external source code and encourage more of these? Indeed, now > the number of packages is so big could they be classified to aid potential > users?Not sure that would be good (encouragement). It would compromise solid design principles for aesthetics.> Going back to the original question, it strikes me that C/Fortran code is > most often used to interface to other code - there would be a better way of > doing this in a Java environment - or to speed up existing R code - where > loops are usually the cause of the speed problem and the introduction Java > bytecode would presumably be helpful anyway. Surely there could be some sort > of process to generate automated jni bindings?Argh. JNI is not a saviour. It's a royal PITA. And C/Fortran code is probably just as often used to speed up computations.> I don't think a Java implementation of the R parser is as bigger task as it > seems ... much of the work to get an interpreted scripting language working > could be taken from the Jython project?See the Omegahat LANGUAGE for a solid start on this. R-like syntax, and lots more. Does anyone still use it? best, -tony -- rossini@u.washington.edu http://www.analytics.washington.edu/ Biomedical and Health Informatics University of Washington Biostatistics, SCHARP/HVTN Fred Hutchinson Cancer Research Center UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable FHCRC (M/W): 206-667-7025 FAX=206-667-4812 | use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}
Clearly, I disagree in some areas. But you raise an interesting, but perhaps unintended, question: Do we think that R is a programming language in its own right where we seek to develop code and then build on that code for example in a object oriented way? Or, is R a mechanism for combining lots of C/C++/Fortran libraries (written by suitably qualified experts) at the command line in an easy to use interpreted fashion in order to crunch the numbers and display them nicely? Surely, if it's a speed issue we should try to help to make R faster for these sorts of problems rather than just bailing out into C at the first opportunity?> -----Original Message----- > From: rossini@blindglobe.net [mailto:rossini@blindglobe.net] > Sent: 27 February 2004 15:32 > To: Marsland, John > Cc: r-devel@stat.math.ethz.ch > Subject: Re: [Rd] Packages in R & Java > > > "Marsland, John" <John.Marsland@CommerzbankIB.com> writes: > > > Yes, lots of packages do use C/Fortran code ... it would be > great if there > > were more packages that are "pure R" especially since the > advent of S4 > > classes and namespaces. > > Even with those, quite often we have to move code to C/C++/Fortran for > efficiency. > > > Is it worth suggesting that we create a designation "pure > R" for packages > > that have no external source code and encourage more of > these? Indeed, now > > the number of packages is so big could they be classified > to aid potential > > users? > > Not sure that would be good (encouragement). It would compromise > solid design principles for aesthetics. > > > Going back to the original question, it strikes me that > C/Fortran code is > > most often used to interface to other code - there would be > a better way of > > doing this in a Java environment - or to speed up existing > R code - where > > loops are usually the cause of the speed problem and the > introduction Java > > bytecode would presumably be helpful anyway. Surely there > could be some sort > > of process to generate automated jni bindings? > > Argh. JNI is not a saviour. It's a royal PITA. > > And C/Fortran code is probably just as often used to speed up > computations. > > > I don't think a Java implementation of the R parser is as > bigger task as it > > seems ... much of the work to get an interpreted scripting > language working > > could be taken from the Jython project? > > See the Omegahat LANGUAGE for a solid start on this. R-like syntax, > and lots more. Does anyone still use it? > > best, > -tony > > -- > rossini@u.washington.eduhttp://www.analytics.washington.edu/ Biomedical and Health Informatics University of Washington Biostatistics, SCHARP/HVTN Fred Hutchinson Cancer Research Center UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable FHCRC (M/W): 206-667-7025 FAX=206-667-4812 | use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}