Re: [Rd] [External] Suppressed "graphical parameter" warnings reviving themselves magically

2025-03-21 Thread luke-tierney--- via R-devel
Warnings are not "reviving themselves magically". Try resizing the window a few times and hitting return in the REPL. That should give you a hint on what is going on. Best, luke On Fri, 21 Mar 2025, Henrik Bengtsson wrote: What's going on here? $ R --vanilla --

Re: [Rd] [External] More precise documentation of on.exit() [when leaving function vs. "context"]

2025-02-14 Thread luke-tierney--- via R-devel
})() I'll also note that while this approach to using on.exit() is not uncommon, and quite a useful idiom, it does not appear in the examples either in ?on.exit or in ?local [3]. I'm not sure I would want to encourage this. Using tryCatch with a finally expression seems clearer to me:

Re: [Rd] [External] Re: Could .Primitive("[") stop forcing R_Visible = TRUE?

2024-10-25 Thread luke-tierney--- via R-devel
rpreted code behavior, but that would need some looking into. Filing a bug report on the discrepancy would be a good next step. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Departme

Re: [Rd] [External] API for converting LANGSXP to LISTSXP?

2024-07-06 Thread luke-tierney--- via R-devel
We have long been discouraging the use of pairlists. So no, we will not do anything to facilitate this conversion; if anything the opposite. SET_TYPEOF is used more than it should be in the sources. It is something I would like us to fix sometime, but isn't high priority. Best, luke On F

Re: [Rd] [External] Non-API updates

2024-06-25 Thread luke-tierney--- via R-devel
On Tue, 25 Jun 2024, Josiah Parry wrote: Hey folks, I'm sure many of you all woke to the same message I did: "Please correct before 2024-07-09 to safely retain your package on CRAN" caused by Non-API changes to CRAN. This is quite unexpected as Luke Tierney's June 6th em

[Rd] non-API entry point Rf_findVarInFrame3 will be removed

2024-06-19 Thread luke-tierney--- via R-devel
provided. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tier

Re: [Rd] clarifying and adjusting the C API for R

2024-06-18 Thread luke-tierney--- via R-devel
API compliance' that should help with adapting to these changes. Best, luke On Thu, 6 Jun 2024, luke-tier...@uiowa.edu wrote: This is an update on some current work on the C API for use in R extensions. The internal R implementation makes use of tens of thousands of C entry points. On Linu

Re: [Rd] [External] Re: changes in R-devel and zero-extent objects in Rcpp

2024-06-08 Thread luke-tierney--- via R-devel
least in this form: It allows access to a writable pointer to STRSXP and VECSXP data and that is too dangerous for memory manager integrity. I'm not sure exactly how this will be resolve, but be prepared for changes. Best, luke cheers Ben On 2024-06-08 6:39 p.m., Kevin Ushey wrote: IMH

Re: [Rd] [External] Re: clarifying and adjusting the C API for R

2024-06-07 Thread luke-tierney--- via R-devel
uot; Can we leave it at that please? luke On Fri, Jun 7, 2024 at 7:30 AM luke-tierney--- via R-devel wrote: On Fri, 7 Jun 2024, Steven Dirkse wrote: You don't often get email from sdir...@gams.com. Learn why this is important Thanks for sharing this overview of an interesting and much-ne

Re: [Rd] [External] Re: clarifying and adjusting the C API for R

2024-06-07 Thread luke-tierney--- via R-devel
On Fri, 7 Jun 2024, Hadley Wickham wrote: Thanks for working on this Luke! We appreciate your efforts to make it easier to tell what's in the exported API and we're very happy to work with you on any changes needed to tidyverse/r-lib packages. Hadley Thanks. Glad to hear -- I may be

Re: [Rd] [External] Re: clarifying and adjusting the C API for R

2024-06-07 Thread luke-tierney--- via R-devel
isn't the case at present.  So I conclude that R exports extra (i.e. non-API) symbols.  Is part of the goal to remove these extra exports? No. We'll hide what we can, but base packages for one need access to some entry points that should not be in the API, so those have to stay un-hidde

[Rd] clarifying and adjusting the C API for R

2024-06-06 Thread luke-tierney--- via R-devel
e I hope to turn this into a blog post that will include some examples of moving non-API entry point uses into compliance. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and

Re: [Rd] [External] R hang/bug with circular references and promises

2024-05-13 Thread luke-tierney--- via R-devel
On Mon, 13 May 2024, Ivan Krylov wrote: [You don't often get email from ikry...@disroot.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] On Mon, 13 May 2024 09:54:27 -0500 (CDT) luke-tierney--- via R-devel wrote: Looks like I added that warning 22

Re: [Rd] [External] R hang/bug with circular references and promises

2024-05-13 Thread luke-tierney--- via R-devel
On Sat, 11 May 2024, Peter Langfelder wrote: On Sat, May 11, 2024 at 9:34 AM luke-tierney--- via R-devel wrote: On Sat, 11 May 2024, Travers Ching wrote: The following code snippet causes R to hang. This example might be a bit contrived as I was experimenting and trying to understand

Re: [Rd] [External] R hang/bug with circular references and promises

2024-05-10 Thread luke-tierney--- via R-devel
would create a cycle and throw an error if it would. Need to think a bit about exactly where the check should go. Best, luke __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph E. W

Re: [Rd] [External] Re: Patches for CVE-2024-27322

2024-04-30 Thread Tierney, Luke via R-devel
30 April 2024 at 11:59, peter dalgaard wrote: | svn diff -c 86235 ~/r-devel/R Which is also available as https://github.com/r-devel/r-svn/commit/f7c46500f455eb4edfc3656c3fa20af61b16abb7 Dirk | (or 86238 for the port to the release branch) should be easily backported. | | (CC Luke in case the

Re: [Rd] [External] View() segfaulting ...

2024-04-25 Thread luke-tierney--- via R-devel
I saw it also on some of my Ubuntu builds, but the issue went away after a make clean/make, so maybe give that a try. Best, luke On Wed, 24 Apr 2024, Ben Bolker wrote: I'm using bleeding-edge R-devel, so maybe my build is weird. Can anyone else reproduce this? View() seems to cra

Re: [Rd] [External] Re: Is ALTREP "non-API"?

2024-04-24 Thread luke-tierney--- via R-devel
hat stands now. But there was and is no viable option other than to agree to disagree. There is really no upside to re-litigating this now. Best, luke Hadley [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https:

Re: [Rd] [External] Re: Is ALTREP "non-API"?

2024-04-24 Thread luke-tierney--- via R-devel
ate is not realistic. The only way that would work reliably is if the list could be programmatically generated, for example by parsing installed headers for declarations and caveats as above. Which would be possible with changes like the ones listed above. Best, luke Hadley -- Luke Tierney

Re: [Rd] [External] Calling applyClosure from a package?

2024-04-14 Thread luke-tierney--- via R-devel
made use of some internal functions related to promises. For the ones on CRAN we will work with the maintainers to find alternate approaches. This may mean adding some functions to the API for dealing with some lazy-evaluation-related features at a higher level. Best, luke But I will humbly suggest tha

Re: [Rd] [External] Re: Repeated library() of one package with different include.only= entries

2024-04-11 Thread luke-tierney--- via R-devel
` argument to library() has been a *relatively* recent addition {given the 25+ years of R history}: It was part of the extensive new features by Luke Tierney for R 3.6.0 [r76248 | luke | 2019-03-18 17:29:35 +0100], with NEWS entry • library() and require() now allow more control

Re: [Rd] [External] Bug in out-of-bounds assignment of list object to expression() vector

2024-04-05 Thread luke-tierney--- via R-devel
out. Best, June [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone

Re: [Rd] [External] Re: Bug in out-of-bounds assignment of list object to expression() vector

2024-04-05 Thread luke-tierney--- via R-devel
ks, one early and the other late. The early one is explicitly letting this one through and shouldn't. So a one line change would address this particular problem. But it would be a good idea to review why we the late checks are needed at all and maybe change that. I'll look into it. Best, l

[Rd] Ordered comparison operators on language objects will signal errors

2024-03-04 Thread luke-tierney--- via R-devel
comparison (>) is not possible for language types Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Sc

Re: [Rd] [External] Get list of active calling handlers?

2024-02-07 Thread luke-tierney--- via R-devel
air bit of work to design and I don't think would be of enough value to justify that. The original SO question would be better addressed to Posit/RStudio. Someone with enough motivation might also be able to figure out an answer by looking at the source code at https://github.com/rstudio/rstudi

Re: [Rd] [External] readChar() could read the whole file by default?

2024-01-26 Thread luke-tierney--- via R-devel
e if n = -1 (others might) but someone would need to write a patch to implement that. Best, luke For my own purposes the incantation readChar(file, file.size(file)) is ubiquitous. Taking CRAN code[3] as a sample[4], 41% of readChar() calls use either readChar(f, file.info(f)$size) or readChar(f,

Re: [Rd] [External] Re: Choices to remove `srcref` (and its buddies) when serializing objects

2024-01-18 Thread luke-tierney--- via R-devel
) by their pointer values instead of digging down into them. What does 'blow up' mean? If it is anything other than signal a "bad binding access" error then it would be good to have more details. Best, luke Dropping the (already violated) requirement to be compatible with

[Rd] UseMethod forwarding of local variables

2023-10-20 Thread luke-tierney
ese fail with the environment set to 'error' but not to 'none', so they are getting a value from somewhere else that may or may not be right. Affected as revdeps of optmatch: - cobalt - htetree - jointVIP - MatchIt - PCAmatchR - rcbalance - rcbsubset - RItools - stratamat

Re: [Rd] [External] On PRINTNAME() encoding, EncodeChar(), and being painted into a corner

2023-09-22 Thread luke-tierney
names while constructing error messages? Other languages (like Lua or SQLite) provide a special printf specifier (typically %q) to create quoted/escaped string representations, but we're not yet at the point of providing a C-level printf implementation. Not clear it is worth it. But the si

Re: [Rd] [External] Re: Calling a replacement function in a custom environment

2023-08-27 Thread luke-tierney
but disallowing it in complex assignment expressions may be necessary to prevent mutations that should not happen. (There are open bug reports that boil down to this.) In any case, complicating the complex assignment code, which is already barely maintainable, would be a very bad idea. Best, luke I

Re: [Rd] [External] Time to drop globalenv() from searches in package code?

2022-09-17 Thread luke-tierney
On Sat, 17 Sep 2022, Kurt Hornik wrote: luke-tierney writes: On Thu, 15 Sep 2022, Duncan Murdoch wrote: The author of this Stackoverflow question https://stackoverflow.com/q/73722496/2554330 got confused because a typo in his code didn't trigger an error in normal circumstances, but i

Re: [Rd] [External] assignment

2021-12-27 Thread luke-tierney
in https://bugs.r-project.org/show_bug.cgi?id=18269 Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaef

Re: [Rd] [External] Re: hashtab address arg

2021-12-22 Thread luke-tierney
stly through dependencies on a few packages). (Perhaps this topic could be a better fit for R-help.) R-devel is the right place for this. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Departm

Re: [Rd] [External] Status of '=>'

2021-12-20 Thread luke-tierney
It's still work in progress. Probably => will be dropped in favor of limited use of _ for non-first-argument passing. Best, luke On Mon, 20 Dec 2021, Dirk Eddelbuettel wrote: R 4.1.0 brought the native pipe and the related ability to use '=>' if one opted into it by set

Re: [Rd] [External] DOCS: Exactly when, in the signaling process, is option 'warn' applied?

2021-11-18 Thread luke-tierney
ng warning("boom")? In the default handler; it doesn't affect signaling. Much of the documentation pre-dates the condition system; happy to consider patches. Best, luke I think the docs, including ?options, would benefit from clarifying that. To the best of my understanding, it

Re: [Rd] [External] GC: speeding-up the CHARSXP cache maintenance, 2nd try

2021-11-04 Thread luke-tierney
I am exploring a different approach to avoid scanning old generations that may be simpler. Best, luke On Wed, 3 Nov 2021, Andreas Kersting wrote: Hi, In https://stat.ethz.ch/pipermail/r-devel/2021-October/081147.html I proposed to speed up the CHARSXP cache maintenance during GC using

Re: [Rd] [External] Re: Wrong number of names?

2021-11-02 Thread luke-tierney
th(ds), length(names(ds))) ## 1488 744 dput(ds) # -> ## *** caught segfault *** ## address (nil), cause 'memory not mapped' If I'm reading this right then dput is where the segfault is happening, so that could use some more bulletproofing. Best, luke -

Re: [Rd] [External] GC: improving the marking performance for STRSXPs

2021-10-18 Thread luke-tierney
out adding the complexity of threads. Best, luke On Thu, 7 Oct 2021, Andreas Kersting wrote: Hi all, in GC (in src/main/memory.c), FORWARD_CHILDREN() (called by PROCESS_NODES()) treats STRSXPs just like VECSXPs, i.e. it calls FORWARD_NODE() for all its children. I claim that this is unn

Re: [Rd] [External] Re: Workaround very slow NAN/Infinities arithmetic?

2021-09-30 Thread luke-tierney
baked into a number of packages and documents on internals, as well as serialized objects. The work needed to sort that out is probably not worth the effort. It also doesn't seem to affect the performance issue here since setting b[1] <- NA_real_ + 0 produces the same slowdown (at least o

Re: [Rd] [External] Re: Is it a good choice to increase the NCONNECTION value?

2021-08-24 Thread luke-tierney
at their own risk and may need to know how to adjust the soft limit on the process. Best, luke On Wed, 25 Aug 2021, Simon Urbanek wrote: Martin, I don't think static connection limit is sensible. Recall that connections can be anything, not just necessarily sockets or file descriptio

Re: [Rd] [External] Re: Update on rtools4 and ucrt support

2021-08-23 Thread luke-tierney
based tool chain may be a better investment of time. Best, luke __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa

Re: [Rd] [External] Re: JIT compiler does not compile closures with custom environments

2021-08-18 Thread luke-tierney
the default is to byte compile on source install, or explicitly calling compiler::cmpfun are options. Best, luke Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph

Re: [Rd] [External] svd For Large Matrix

2021-08-13 Thread luke-tierney
see what you are using and consider switching to another BLAS/LAPACK if necessary. Running under gdb may help tracking down where the issue is and reporting it for the BLAS/LAPACK you are using. Best, luke On Fri, 13 Aug 2021, Dario Strbenac via R-devel wrote: Good day, I have a real scenario

Re: [Rd] [External] difference of m1 <- lm(f, data) and update(m1, formula=f)

2021-08-11 Thread luke-tierney
ally works: The only difference between the AST for a call of `~` and the formula such a call produces when evaluated is the class and environment attributes the call adds, and most code that works with expressions, like eval(), ignores attributes. It would seem somewhat more consistent if update.def

Re: [Rd] [External] problem with pipes, textConnection and read.dcf

2021-08-10 Thread luke-tierney
s somewhere in textConnection(). This produces a similar message: read.dcf(textConnection(c(L, "aa", "", "", "ddd"))) File a bug report and someone who understands the textConnection() inter

Re: [Rd] [External] Re: [R-pkg-devel] Tracking down inconsistent errors and notes across operating systems

2021-07-22 Thread luke-tierney
Thanks; fix committed in r80654. Best, luke On Thu, 22 Jul 2021, Bill Dunlap wrote: A small example of the problem is  #define USE_RINTERNALS 1 #include #include #include static s_object* obj = NULL; Prior to 2021-07-20, with svn 80639, this compiled but after, svn 80647, that I get

[Rd] changes in some header files

2021-07-20 Thread luke-tierney
review what you are doing and to try to revise your code to work within the API. If you feel there are features missing in the API then you can suggest additions on this mailing list or bugzilla. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa

Re: [Rd] [External] Clearing attributes returns ALTREP, serialize still saves them

2021-07-03 Thread luke-tierney
Please do not cross post. You have already rased this on bugzilla. I will follow up there later today. luke On Sat, 3 Jul 2021, Zafer Barutcuoglu wrote: Hi all, Setting names/dimnames on vectors/matrices of length>=64 returns an ALTREP wrapper which internally still contains the na

Re: [Rd] [External] SET_COMPLEX_ELT and SET_RAW_ELT missing from Rinternals.h

2021-07-02 Thread luke-tierney
re and not in the API. Again, it will probably be removed from the installed headers. Best, luke This seems better, but it's not used in the interpreter anywhere as far as I can tell, presumably because of the setter interface not being complete, as you point out. But should I be avoid

Re: [Rd] [External] Re: ALTREP ALTINTEGER_SUM/MIN/MAX Return Value and Behavior

2021-06-29 Thread luke-tierney
vector Also .Internal(inspect(x)) still shows the compact representation. A different representation (wrapper around a compact sequence). Best, luke -Sebastian On Tue 29. Jun 2021 at 19:43, Bill Dunlap wrote: Adding the dimensions attribute takes away the altrep-ness. Removing

Re: [Rd] [External] Re: ALTREP ALTINTEGER_SUM/MIN/MAX Return Value and Behavior

2021-06-29 Thread luke-tierney
It depends on the size. For a larger vector adding dim will create a wrapper ALTREP. Currently the wrapper does not try to use the payload's sum method; this could be added. Best, luke On Tue, 29 Jun 2021, Bill Dunlap wrote: Adding the dimensions attribute takes away the altrep

Re: [Rd] [External] ALTREP ALTINTEGER_SUM/MIN/MAX Return Value and Behavior

2021-06-29 Thread luke-tierney
ALTINTEGER_SUM and friends are _not_ intended for use in package code. Once we get some time to clean up headers they will no longer be visible to packages. Best, luke On Tue, 29 Jun 2021, Sebastian Martin Krantz wrote: Hello together, I'm working on some custom (grouped, weighted) sum

Re: [Rd] [External] SET_COMPLEX_ELT and SET_RAW_ELT missing from Rinternals.h

2021-06-28 Thread luke-tierney
The setter interface for atomic types is not yer implemented. It may be some day. Best, luke On Fri, 25 Jun 2021, Konrad Siek wrote: Hello, I am working on a package that works with various types of R vectors, implemented in C. My code has a lot of SET_*_ELT operations in it for various

Re: [Rd] [External] Possible ALTREP bug

2021-06-17 Thread luke-tierney
sibly large object in order to get a pointer to its data with REAL(x). If you are iterating over a whole object you may want to get data in chunks. There are iteration macros that help. Some examples are in src/main/summary.c. Best, luke On Wed, Jun 16, 2021 at 4:29 PM Simon Urbanek

Re: [Rd] [External] Possible ALTREP bug

2021-05-28 Thread luke-tierney
code assumes will not do that. Catching those jumps is possible but expensive; doing anything sensible if one is caught is really not possible. Best, luke On Fri, 28 May 2021, Gabriel Becker wrote: Hi Jim et al, Just to hopefully add a bit to what Luke already answered, from what I am reca

Re: [Rd] [External] Possible ALTREP bug

2021-05-28 Thread luke-tierney
integer and real Elt methods are not expected to allocate. You would have to suspend GC to be able to do that. This currently can't be done from package code. Best, luke On Fri, 28 May 2021, Gábor Csárdi wrote: I have found some weird SEXP corruption behavior with ALTREP, which could

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread luke-tierney
create problems for those maintaining R. After all, the NA is nothing but a tagged NaN. And we are now paying a price for what was, in hindsight, an unfortunate decision. Best, luke All the best, Adrian On Tue, May 25, 2021 at 7:05 AM Avi Gross via R-devel wrote: I was thinking about h

Re: [Rd] [External] Re: 1954 from NA

2021-05-24 Thread luke-tierney
or this. If you need operations to preserve attributes across subsetting you can define subsetting methods that do that. If you are dead set on doing something in C you can try to develop an ALTREP class that provides augmented missing value information. Best, luke The mere thought of impleme

Re: [Rd] [External] Pipe bind restored in R 4.1.0?

2021-04-17 Thread luke-tierney
No. We need more time to resolve issues revealed in testing. Best, luke On Sat, 17 Apr 2021, Brenton Wiernik wrote: Is the pipe bind `=>` operator likely to be restored by default in time for the 4.1 release? Brenton [[alternative HTML version dele

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-08 Thread luke-tierney
your best bet. Having an option to serialize without source references might be nice but would probably not be high enough on anyone's priority list to get done anytime soon. Best, luke On Thu, 8 Apr 2021, luke-tier...@uiowa.edu wrote: I see that now also. Not sure yet what is going on.

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-08 Thread luke-tierney
I see that now also. Not sure yet what is going on. One work-around that may work for you is to create a fresh crash dump in a .onLoad function; somehting like crash_dumps <- NULL .onLoad <- function(...) crash_dumps <<- new.env() Best, luke On Wed, 7 Apr 2021, Andreas Kersting

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-07 Thread luke-tierney
No issues here with that either. Looks like something is different on your end. Best, luke On Wed, 7 Apr 2021, Andreas Kersting wrote: Hi Luke, Please see https://github.com/akersting/dumpTest for the package. Here a session showing my issue: library(dumpTest) sessionInfo() R version

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-07 Thread luke-tierney
or R-devel on Ubuntu). You will need to provide a more complete reproducible example if you want help with what you are trying to do; also sessionInfo() would help. Best, luke crash_dumps <- new.env() f <- function() { x <- runif(1e5) dump <- lapply(1:2, function(i) unserialize(ser

Re: [Rd] [External] brief update on the pipe operator in R-devel

2021-01-12 Thread luke-tierney
onable balance between making these non-standard cases easy to see but still easy to write. This is now committed to R-devel. Best, luke On Tue, 22 Dec 2020, luke-tier...@uiowa.edu wrote: It turns out that allowing a bare function expression on the right-hand side (RHS) of a pipe creates opp

[Rd] brief update on the pipe operator in R-devel

2020-12-22 Thread luke-tierney
e of parentheses can work around these issues, the likelihood of making mistakes that are hard to track down is too high. So we will disallow the use of bare function expressions on the right hand side of a pipe. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences Univers

Re: [Rd] [External] setting .libPaths() with parallel::clusterCall

2020-12-22 Thread luke-tierney
n between providing a function value or a character string as the function argument to clusterCall and others could probably use a paragraph in the help file; happy to consider a patch if anyone wants to take a crack at it. Best, luke If this is indeed a bug, I'm happy to file it at bugzilla. Te

Re: [Rd] [External] R crashes when using huge data sets with character string variables

2020-12-12 Thread luke-tierney
ed in ?Memory; that only affects the R heap, not malloc() done elsewhere. Best, luke On Sat, 12 Dec 2020, Arne Henningsen wrote: When working with a huge data set with character string variables, I experienced that various commands let R crash. When I run R in a Linux/bash console, R terminates wit

Re: [Rd] [External] Re: New pipe operator

2020-12-07 Thread luke-tierney
might fly if we lived in a world where most RHS functions take one argument and only a few needed currying. That is the case in many functional languages, but not for R. Making the common case of multiple arguments easy means you have to work at the source level, either in the parser or with some fo

Re: [Rd] [External] anonymous functions

2020-12-07 Thread luke-tierney
verse ones are compatible within tidyverse but not with others). And of course none work in sapply or lapply. Providing a shorthand in base may help to improve this. You don't have to use it if you don't want to, and you can establish coding standards that disallow it if you like. Best,

Re: [Rd] [External] Re: New pipe operator

2020-12-07 Thread luke-tierney
\(x) eval(parse(text = x) Using named arguments to redirect to the implicit first does work, also in magrittr, but for me at least it is the kind of thing I would probably regret a month later when trying to figure out the code. Best, luke On Mon, 7 Dec 2020, Gabor Grothendieck wrote:

Re: [Rd] [External] Re: New pipe operator

2020-12-06 Thread luke-tierney
On Sun, 6 Dec 2020, Gabor Grothendieck wrote: Why is that ambiguous? It works in magrittr. For now, all functions marked internally as syntactically special are disallowed. Not all of these lead to ambiguities. Best, luke library(magrittr) 1 %>% `+`() [1] 1 On Sun, Dec 6, 2020 a

Re: [Rd] [External] Re: New pipe operator

2020-12-06 Thread luke-tierney
> (`+`)(2) ## [1] 3 1 |> (`+`)() ## [1] 1 The error message suggests that this was intentional. It isn't mentioned in ?"|>" ?"|>" says: To avoid ambiguities, functions in ‘rhs’ calls may not be syntactically special, such as ‘+’ or ‘if’. (used to s

Re: [Rd] [External] Re: New pipe operator

2020-12-05 Thread luke-tierney
ecial handling of :: and :::). It's easier to add flexibility and complexity than to restrict it after the fact. Best, luke On Sat, 5 Dec 2020, Hugh Parsonage wrote: I'm surprised by the aversion to mtcars |> nrow over mtcars |> nrow() and I think the decision to disallow

Re: [Rd] [External] Re: New pipe operator

2020-12-04 Thread luke-tierney
On Sat, 5 Dec 2020, Duncan Murdoch wrote: On 04/12/2020 2:26 p.m., luke-tier...@uiowa.edu wrote: On Fri, 4 Dec 2020, Dénes Tóth wrote: On 12/4/20 3:05 PM, Duncan Murdoch wrote: ... It's tempting to suggest it should allow something like   mtcars |> subset(cyl == 4) |> lm

Re: [Rd] [External] Re: New pipe operator

2020-12-04 Thread luke-tierney
o makes the code easier to understand. As a wearer of progressive bifocals and someone whose screen is not always free of small dust particles, having to spot the non-standard pipe stages by seeing a placeholder, especially a . placeholder, is be a bug, not a feature. Best, luke Syntactic sugars work t

Re: [Rd] [External] Re: .Internal(quit(...)): system call failed: Cannot allocate memory

2020-12-01 Thread luke-tierney
The fact that your max resident size isn't affected looks odd. Are you setting the environment variable outside R? When I run env R_MAX_VSIZE=16Gb /usr/bin/time bin/Rscript jg.R 1e9 2e0 0 0 (your code in jg.R). I get a quick failure with 11785524maxresident)k Best, luke On Tue,

Re: [Rd] [External] Re: .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-27 Thread luke-tierney
On Thu, 26 Nov 2020, Jan Gorecki wrote: Thank you Luke for looking into it. Your knowledge of gc is definitely helpful here. I put comments inline below. Best, Jan On Wed, Nov 25, 2020 at 10:38 PM wrote: On Tue, 24 Nov 2020, Jan Gorecki wrote: As for other calls to system. I avoid

Re: [Rd] [External] Re: .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-25 Thread luke-tierney
are probably experiencing something similar. There may be opportunities for more tuning of the GC to better handle running this close to memory limits, but I doubt the payoff would be worth the effort. Best, luke It would help if gcinfo() could take FALSE/TRUE/2L where 2L will print even more i

Re: [Rd] [External] exists, get and get0 accept silently inputs of length > 1

2020-11-23 Thread luke-tierney
the class argument has length > 1. Calls of the form getS2method(generic, class(x)) will now fail if class(x) has length > 1. I believe most CRAN package issues related to this change have already been resolved, but a few may remain. Best, luke On Fri, 13 Nov 2020, Antoine Fabri wrote: Dea

Re: [Rd] [External] Two ALTREP questions

2020-11-21 Thread luke-tierney
of the year. BTW, is there any way to contribute to the R source? I know R has a limited resouces, so if possible, I will be happy to fix the matrix issue myself and make some minor contributions to the R community. You can find the suggested process for contributing described in the 'Repor

Re: [Rd] [External] exists, get and get0 accept silently inputs of length > 1

2020-11-16 Thread luke-tierney
Hence the change expanding the domain of get(). luke On Tue, 17 Nov 2020, Gabriel Becker wrote: Hi all, I have used variable values in get() as well, and including, I think, in package code (though pretty infrequently). Perhaps a character.only argument similar to library? ~G On Mon, Nov 16,

Re: [Rd] [External] exists, get and get0 accept silently inputs of length > 1

2020-11-13 Thread luke-tierney
n back to names internally for the environment lookup. Best, luke On Fri, 13 Nov 2020, Antoine Fabri wrote: Dear R-devel, The doc of exists, get and get0 is unambiguous, x should be an object given as a character string. However these accept longer inputs. It can lead an uncareful user to think thes

Re: [Rd] [External] Re: Change to I() in R 4.1

2020-10-30 Thread luke-tierney
ass or an attribute, is going to be brittle. A little less so for an attribute, but using an attribute rules out dispatch on the AsIs property. Best, luke I would also suggest that the "package" attribute of the S4 class be kept around so the code that we use to restore the original object

Re: [Rd] [External] Something is wrong with the unserialize function

2020-10-29 Thread luke-tierney
I found that also; fixed in r79386 in the trunk. Will port to R-patched shortly. Best, luke On Thu, 29 Oct 2020, Martin Morgan wrote: This Index: src/main/altrep.c === --- src/main/altrep.c (revision 79385) +++ src/main

Re: [Rd] [External] Something is wrong with the unserialize function

2020-10-29 Thread luke-tierney
lemmap) x <- mmap(filePath, "double") saveRDS(x, file = "x.Rds") ## in a separate R process: gctorture() readRDS("x.Rds") Looks like a missing PROTECT somewhere. Best, luke On Thu, 29 Oct 2020, Jiefei Wang wrote: Hi all, I am not able to export an ALTR

Re: [Rd] [External] Re: Coercion function does not work for the ALTREP object

2020-10-08 Thread luke-tierney
ded, Ideally there should be no difference for Coerce. There is a difference because wrappers currently don't delegate the Coerce method when the wrapped object is an ALTREP. I'll look into whether that can be addressed without breaking things. Best, luke On Thu, 8 Oct 2020, Jiefei Wan

Re: [Rd] [External] Thread-safe R functions

2020-09-13 Thread luke-tierney
, so you need to make sure you have set a top level context in your thread. Best, luke On Sun, 13 Sep 2020, Jiefei Wang wrote: Hi, I am curious about whether there exist thread-safe functions in `Rinternals.h`. I know that R is single-threaded designed, but for the simple and straightforward

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-08 Thread luke-tierney
On Tue, 8 Sep 2020, Martin Maechler wrote: luke-tierney on Tue, 8 Sep 2020 09:42:43 -0500 (CDT) writes: > On Tue, 8 Sep 2020, Martin Maechler wrote: >>>>>>> Martin Maechler >>>>>>> on Tue, 8 Sep 2020 10:40:24 +0200 writes: >>

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-08 Thread luke-tierney
rintf' related bug inside .Internal(inspect(.)) on Windows. *interestingly*, the above bug I've noticed on (64-bit) Linux does *not* show on Windows (64-bit), at least not for that case: On Windows, things are fine as long as they remain (compacted aka 'ALTREP') INTSXP: >

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-08 Thread luke-tierney
u have rtools and gdb installed can you run in gdb and see where the segfault is happening? Best, luke On Tue, 8 Sep 2020 at 18:52, Martin Maechler wrote: Martin Maechler on Tue, 8 Sep 2020 10:40:24 +0200 writes: Hugh Parsonage on Tue, 8 Sep 2020 18:08:11 +1000 writes: >>

Re: [Rd] [External] Re: some questions about R internal SEXP types

2020-09-08 Thread luke-tierney
happy to be proved wrong. Best, luke Hadley -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaeffer Hall

[Rd] HELPWANTED keyword in bugs.r-project.org

2020-08-05 Thread luke-tierney
level varies; some might be resolved with a small amount of R code; others might need more extensive changes at the C level. Best, luke -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics

Re: [Rd] [External] Re: Invisible names problem

2020-07-22 Thread luke-tierney
uplicate the payload and send that off for serialization (and install it in the wrapper), but that could be a bad idea of the object is large. A tighter integration of ALTREP serialization with the serialization internals might allow and ALTREP's serialization method to write directly to the

Re: [Rd] [External] Re: R-devel internal errors during check produce?

2020-06-30 Thread luke-tierney
Thanks. Fixed in R-devel in r78754. This was related to a fix for PR#17809, not the change to unique.default. Best, luke On Tue, 30 Jun 2020, Jan Gorecki wrote: No packages are being loaded, or even installed. Did you try running the example on R-devel built with flags I have provided in

Re: [Rd] [External] Possible ABI change in R 4.0.1

2020-06-29 Thread luke-tierney
tells you the PR this addressed. As it says in Writing R Extensions about defining USE_RINTERNALS: Also be prepared to adjust your code should R internals change. The same goes for any use of non-API macros and functions. Best, luke On Mon, 29 Jun 2020, Gábor Csárdi wrote: Hi all, it

Re: [Rd] [External] Change in lapply's missing argument passing

2020-06-27 Thread luke-tierney
Yes, to resolve https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15199 Best, luke On Fri, 26 Jun 2020, William Dunlap via R-devel wrote: Consider the following expression, in which we pass 'i=', with no value given for the 'i' argument, to lapply. lapply(&qu

Re: [Rd] [External] Unexpected Error Handling by Generic in R 4.0.1

2020-06-25 Thread luke-tierney
nt of effort so isn't likely to happen without someone contributing a well-tested patch. Best, luke On Thu, 25 Jun 2020, Matthew Carlucci wrote: Hello R-devel community, I posted a new R 4.0.1 behaviour to stack overflow (https://stackoverflow.com/questions/62327810/inconsistent-error-h

Re: [Rd] [External] numericDeriv alters result of eval in R 4.0.1

2020-06-16 Thread luke-tierney
The eval() call could also throw an error that would leave the input environment modified. Better change along the lines described in the bug report at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17831 Best, luke On Tue, 16 Jun 2020, Raimundo Neto wrote: Dear all As far as I could

Re: [Rd] [External] numericDeriv alters result of eval in R 4.0.1

2020-06-16 Thread luke-tierney
Thanks; definitely a bug. I've submitted it to the bug tracker at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17831 Best, luke On Mon, 15 Jun 2020, Raimundo Neto wrote: Dear R developers, I've run into a weird behavior of the numericDeriv function (from the stats packag

Re: [Rd] [External] Re: use of the tcltk package crashes R 4.0.1 for Windows

2020-06-07 Thread luke-tierney
/free. Either would be less brittle that the current status. Best, luke On Sun, 7 Jun 2020, peter dalgaard wrote: On 7 Jun 2020, at 18:59 , Jeroen Ooms wrote: On Sun, Jun 7, 2020 at 5:53 PM wrote: On Sun, 7 Jun 2020, peter dalgaard wrote: So this wasn't tested for a month? Any

  1   2   3   4   5   6   >