Wednesday, November 17, 2010

Certified to instruct youth

Start being a mentor.





======================================================================================================================= On Apr 6, 2010, at 2:44 PM, John Rose wrote: On Apr 6, 2010, at 8:07 AM, Christian Thalinger wrote: On Tue, 2010-03-30 at 04:24 -0700, John Rose wrote: 6939203: JSR 292 needs method handle constants Summary: Add new CP types CONSTANT_MethodHandle, CONSTANT_MethodType; extend 'ldc' bytecode. http://cr.openjdk.java.net/~jrose/6939203/hs-webrev.00 src/share/vm/interpreter/bytecode.hpp: 404 inline friend Bytecode_loadconstant* Bytecode_loadconstant_at(address bcp, methodHandle method); 405 inline friend Bytecode_loadconstant* Bytecode_loadconstant_at(methodHandle method, int bci); Why are the arguments swapped? int and address should be different types. The (bcp, optional method) pattern mimics Bytecodes::code_at. The (method, bci) pattern mimics a methodOop accessor. The patterns don't mix well. I'll try to boil this down to fewer overloadings. It boiled down nicely; I took out all but one overloading. The ones based on the "address bcp" parameter were not actually useful. I also added to interpreterRuntime.[ch]pp a bci(thread) accessor to use instead of the bcp(thread) accessor, and changed two unrelated places where bci(thread) was more obviously correct than bcp(thread). Please look over those diffs. src/share/vm/interpreter/rewriter.cpp: 142 Bytecodes::Code fastc = Bytecodes::_nop; 143 if (tag.is_method_handle() || tag.is_method_type()) { 144 fastc = (is_wide 145 ? Bytecodes::_fast_aldc_w 146 : Bytecodes::_fast_aldc); 147 } 148 if (fastc != Bytecodes::_nop) { Why do you have a second if here? No particular reason, other than leaving open an option to extend the aldc treatment to classes or other (future) constant types. I'll merge the two blocks. Fixed. The code is much simpler. Here's the final webrev (if you agree that I fixed the issues you raised): http://cr.openjdk.java.net/~jrose/6939203/hs-webrev.01 -- John So, what it boils down to is that I'm installing my packages at too high of a level (I'm an administrator for my system) and should save them in places other than the R framework folder. Thanks too all for the tips and links. Jim Milks On Aug 28, 2008, at 5:08 AM, Prof Brian Ripley wrote: The standard R mechanisms for installing packages into a different library apply on Mac OS X just as anywhere else. It was not said that R was being run from the R.app GUI, but I'll assume that is the case. The rw-FAQ provides detailed advice for Windows users: see http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f http://cran.r-project.org/bin/windows/base/rw-FAQ.html#I-don_0027t-have-permission-to-write-to-the-R_002d2_002e7_002e2_005clibrary-directory The differences for Mac OS users are small -- some of the names and how to set the library path via R_LIBS. We arrange not to install packages within .Library on any of our systems -- and for most users they do not have permission to do so. On Wed, 27 Aug 2008, William Revelle wrote: This is actually an R-sig-mac question so I am responding there. In general, if you want to install a new version without losing the previous packages, using the finder, go to Library/Receipts and remove the R.app and R.Gui receipts. Then install the new version. That will keep the previous packages. This is not mysterious, this is R. Thanks to Simon et al. for the upgrade. Bill At 11:00 PM -0400 8/27/08, Charilaos Skiadas wrote: On Aug 27, 2008, at 10:40 PM, Rolf Turner wrote: On 28/08/2008, at 2:02 PM, James Milks wrote: The title says it all. Does anyone know of a way to save your packages when you upgrade to a new version of R? This may seem petty, but I'm accumulating enough packages that having to download and install each of them anew every time I install a new version of R is rather of a pain. Ideally, I would like the new version of R to recognize the packages I've installed on the previous version without needing to reinstall the packages. Is that possible? My system: Mac OS 10.5.4. Current R version: 2.7.1 Mac OS moves in mysterious ways, but apparently your installation moves in more mysterious ways than most. I also (by necessity, not by choice) run Mac OS. But I certainly don't lose my packages when I update R. The new version of R certainly ``recognizes'' the packages that I have installed. No action required. There may be something funny about *where* you have your packages installed, and what environment variables you have set. To answer your question ``Is that possible?'' --- Yes. Not just possible, but universal. Except, it would seem, in your case. What have you done to offend the gods? :-) Actually have had the same problem as James. By default, unless I'm mistaken, R will save installed packages within the "R.framework" framework (system-wide installation). This framework gets completely replaced when a new version is installed. In my system, the location of these packages is: /Library/Frameworks/R.framework/Resources/library So unless I am mistaken you have to take some action to prevent packages from being installed there. I do hope I am wrong. cheers, Rolf Turner Haris Skiadas Department of Mathematics and Computer Science Hanover College ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org/personality.html Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Attend ISSID/ARP:2009 http://issid.org/issid.2009/ _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595