[Rd] Objectsize function visiting every element for alt-rep strings

2019-01-16 Thread Travers Ching
I have a toy alt-rep string package that generates randomly seeded strings. example: library(altstringisode) x <- altrandomStrings(1e8) head(x) [1] "2PN0bdwPY7CA8M06zVKEkhHgZVgtV1" "5PN2qmWqBlQ9wQj99nsQzldVI5ZuGX" ... etc object.size(1e8) Object.size will call the set_altstring_Elt_method for eve

Re: [Rd] Objectsize function visiting every element for alt-rep strings

2019-01-19 Thread Travers Ching
EPs. > > Thoughts from anyone else on this list? > > Anyway, thanks for pointing this out. I'll talk with Luke and see what makes > sense to do here. > > Best, > ~G > > On Wed, Jan 16, 2019 at 3:49 AM Travers Ching wrote: >> >> I have a t

Re: [Rd] Objectsize function visiting every element for alt-rep strings

2019-01-23 Thread Travers Ching
alize ALTREP objects in the background, then perhaps that change > > should happen in RStudio :-) > > > > Best, > > Kevin > > > > On Tue, Jan 22, 2019 at 8:21 AM Tierney, Luke > > wrote: > > > >> On Mon, 21 Jan 2019, Martin Maechler wrote: >

[Rd] Object.size() should not visit every element for alt-rep strings, or there should be an altstring_objectsize_method

2019-01-31 Thread Travers Ching
Below is a toy alt-rep string example, that generates N random strings: https://gist.github.com/traversc/a48a504eb062554f2d6ff8043ca16f9c example: `x <- altrandomStrings(1e8)` `head(x)` [1] "2PN0bdwPY7CA8M06zVKEkhHgZVgtV1" "5PN2qmWqBlQ9wQj99nsQzldVI5ZuGX" ... `object.size(1e8)` Object.size wil

Re: [Rd] Object.size() should not visit every element for alt-rep strings, or there should be an altstring_objectsize_method

2019-01-31 Thread Travers Ching
any ALTREP-specific computation. I'm not convinced yet that this > is a good idea, but it even if we do change this at the R level, > RStudio would still be well-advised to have another look at what they > are doing. > > Best, > > luke > > On Tue, 15 Jan 2019,

Re: [Rd] Intermittent crashes with inset `[<-` command

2019-02-27 Thread Travers Ching
On an azure centos VM, I can reproduce this bug which reports either: *** caught segfault *** address 0x7006a, cause 'memory not mapped' (crash) Or incompatible types (from builtin to integer) in subassignment type fix (no crash) Like Gabriel, I could not reproduce the bug on a mac laptop.

Re: [Rd] Intermittent crashes with inset `[<-` command

2019-02-27 Thread Travers Ching
d and being gc'ed. Hope that helps someone Travers Travers On Wed, Feb 27, 2019 at 11:48 AM Travers Ching wrote: > > On an azure centos VM, I can reproduce this bug which reports either: > > *** caught segfault *** > address 0x7006a, cause 'memory not mapped&#x

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2019-04-12 Thread Travers Ching
Just throwing my two cents in: I think removing/deprecating fork would be a bad idea for two reasons: 1) There are no performant alternatives 2) Removing fork would break existing workflows Even if replaced with something using the same interface (e.g., a function that automatically detects vari

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2019-04-12 Thread Travers Ching
ive in terms of speed. Regards, Travers On Fri, Apr 12, 2019 at 3:45 PM IƱaki Ucar wrote: > > On Fri, 12 Apr 2019 at 21:32, Travers Ching wrote: > > > > Just throwing my two cents in: > > > > I think removing/deprecating fork would be a bad idea for two re

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-11 Thread Travers Ching
Hi Gabriel, It may be bad practice, but you don't always have control over the file name. E.g. if someone shares a file with a tilde in it -- yes it is simple to rename but it is extra time, and you might not bother to rename a file without foreknowledge of this bug in the first place. Even wors

[Rd] Use of restricted c++ keywords as variable names in headers

2019-07-19 Thread Travers Ching
I was trying to use one of the headers in R_ext/, but had trouble. I determined that it was due to using restricted keywords as variable names. So to load in the header, I needed to do this: #define class klass #define private krivate #include #undef class #undef private I know that the altrep.

[Rd] S4SXP type vs S4 object bit?

2019-10-22 Thread Travers Ching
I'm trying to understand the R internals a bit better and reading over the documentation. I see that there is a bit related to whether an object is S4 (S4_OBJECT_MASK), and also the object type S4SXP (25). The documentation makes clear that these two things aren't the same. But in practice, will

Re: [Rd] S4SXP type vs S4 object bit?

2019-10-22 Thread Travers Ching
Best, > Jiefei > > On Tue, Oct 22, 2019 at 4:28 AM Travers Ching wrote: > >> I'm trying to understand the R internals a bit better and reading over the >> documentation. >> >> I see that there is a bit related to whether an object is S4 >> (S4_OBJECT_M

[Rd] Apple M1 CRAN checks

2021-02-22 Thread Travers Ching
I noticed CRAN is now doing checks against Apple M1, and some packages are failing including a dependency I use. Is building on M1 now a requirement, or can the check be ignored? If it's a requirement, how can one test it out? Travers [[alternative HTML version deleted]] ___

Re: [Rd] Apple M1 CRAN checks

2021-02-22 Thread Travers Ching
If I understand you correctly, I can ignore the M1 "Additional issues" until official R support? Thank you, Travers On Mon, Feb 22, 2021 at 11:25 PM Prof Brian Ripley wrote: > On 22/02/2021 08:30, Travers Ching wrote: > > I noticed CRAN is now doing checks against Apple

[Rd] Crash/bug when calling match on latin1 strings

2021-10-10 Thread Travers Ching
Here's a brief example: # A bunch of words in UTF8; replace *'s words <- readLines("h://pastebin.c**/raw/MFCQfhpY", encoding = "UTF-8") words2 <- iconv(words, "utf-8", "latin1") gctorture(TRUE) y <- match(words2, words2) I searched bugzilla but didn't see anything. Apologies if this is alrea

[Rd] Minor bug with stats::isoreg

2023-09-27 Thread Travers Ching
Hello, I'd like to file a small bug report. I searched and didn't find a duplicate report. Calling isoreg with an Inf value causes a segmentation fault, tested on R 4.3.1 and R 4.2. A reproducible example is: `isoreg(c(0,Inf))` [[alternative HTML version deleted]] ___

[Rd] Bug report: parLapply with capture.output(type="message") produces an error

2023-10-05 Thread Travers Ching
Hello, I have tested this on a fresh ubuntu image with R 4.3.1. Rscript -e 'library(parallel) cl = makeCluster(2) x = parLapply(cl, 1:100, function(i) { capture.output(message("hello"), type = "message") }) print("bye")' This produces the following output: [1] "bye" Error in unserialize(node$c

Re: [Rd] Bug report: parLapply with capture.output(type="message") produces an error

2023-10-06 Thread Travers Ching
;); message("world") }) > > When you capture 'message' conditions this way, you can decide to > resignal then later, e.g. > > > void <- lapply(msgs, message) > hello > world > > You can capture 'warning' conditions in the same way. >

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

2024-05-10 Thread Travers Ching
The following code snippet causes R to hang. This example might be a bit contrived as I was experimenting and trying to understand promises, but uses only base R. It looks like it is looking for "not_a_variable" recursively but since it doesn't exist it goes on indefinitely. x0 <- new.env() x1 <-

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

2024-06-09 Thread Travers Ching
Hi Luke, thanks for all your work on R! I'd like to ask specifically about R_serialize / R_unserialize (and associated helper functions). These are used by at least a handful of packages and I don't see them in the list from Yutani. Are these API functions considered "stable"? Best, Travers On