Re: [Rd] Is it possible to gracefully interrupt a child R process on MS Windows?

2025-05-11 Thread Ivan Krylov via R-devel
On Sun, 11 May 2025 10:58:18 -0700 Henrik Bengtsson wrote: > Is it possible to gracefully interrupt a child R process on MS > Windows, e.g. a PSOCK cluster node? Not in the general case (I think, based on the code paths leading to Rf_onintr() on Windows), but PSOCK cluster nodes are instances of

Re: [Rd] array-bound error with GCC 13/14

2025-05-09 Thread Ivan Krylov via R-devel
В Fri, 9 May 2025 11:09:22 +1000 Stephen Wade пишет: > inlined from ‘std::vector literanger::adjust_pvalues(const > std::vector&)’ at ../src/literanger/utility_math.h:99:48: > /usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* > __builtin_memmove(void*, const void*, long unsigned

Re: [Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-04-29 Thread Ivan Krylov via R-devel
On Tue, 29 Apr 2025 12:00:09 +0200 Martin Maechler wrote: > Would you (or anybody else) know if this is new behaviour or it > also happened e.g. in R 4.4.x versions on Windows? R-4.3.1 on Windows 7 in a virtual machine gives: dput(sqrt(.Machine$double.xmax), control = 'hex') # 0x1p+512 sqrt(.M

Re: [Rd] R does not build with conda libcurl

2025-04-14 Thread Ivan Krylov via R-devel
On Mon, 14 Apr 2025 14:10:56 +0200 Toby Hocking wrote: > /usr/bin/ld : ../../lib/libR.so : référence indéfinie vers > « u_getVersion_73 » Strange that it's complaining about symbols from libicu when the problem is due to libcurl-related flags. What was the command line used to link libR.so somew

Re: [Rd] Suggestion: Install packages on non-appendable file systems (e.g. databricks volumes)

2025-04-02 Thread Ivan Krylov via R-devel
В Thu, 27 Mar 2025 13:26:47 +0100 Sergio Oller пишет: > Our current workaround kind of works, but when users expect to be able > to install packages > using renv or other tools that use install.packages to work; our > wrapper is not that convenient. Here's an idea that might help: since R CMD IN

Re: [Rd] R-devel, bool, and C23

2025-03-15 Thread Ivan Krylov via R-devel
On Sat, 15 Mar 2025 07:51:11 -0500 Dirk Eddelbuettel wrote: > /usr/local/lib/R-devel/lib/R/include/R_ext/Boolean.h:62:16: warning: ISO C > does not support specifying ‘enum’ underlying types before C23 [-Wpedantic] > 62 | typedef enum :int { FALSE = 0, TRUE } Rboolean; // so NOT NA >

Re: [Rd] R-devel, bool, and C23

2025-03-15 Thread Ivan Krylov via R-devel
On Fri, 14 Mar 2025 22:25:54 -0500 Dirk Eddelbuettel wrote: > An older package I looked at apparently currently fails to build under > r-devel (and with that my thanks to R-universe for giving us a > 'broad' range of builds for free -- off our development sources) over > 'bool' related changes an

Re: [Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

2025-03-05 Thread Ivan Krylov via R-devel
В Wed, 5 Mar 2025 07:47:04 -0600 Hadley Wickham пишет: > Unfortunately your test generates a false positive for httr2 ( > https://cran.r-project.org/web/checks/check_results_httr2.html) and > other tidyverse packages where we use the base pipe in examples, but > carefully disable them for older v

Re: [Rd] Customizing width of input in Rterm

2025-02-26 Thread Ivan Krylov via R-devel
В Fri, 21 Feb 2025 11:52:41 +0100 Iago Giné-Vázquez пишет: > When using Rterm.exe (on Windows, I didn’t check Linux) only a > limited number of characters is displayed in the input lines, > independent on the |width| option, and, when navigating through the > command history this becomes very unc

[Rd] A few problems with Sys.setLanguage()

2025-02-11 Thread Ivan Krylov via R-devel
Hello R-devel, Currently, Sys.setLanguage() interprets an empty/absent environment variable LANGUAGE to mean unset="en", which disagrees with gettext(): it defaults to the LC_MESSAGES category of the current locale [1]. As a result, on systems with $LANGUAGE normally unset, Sys.setLanguage(...) re

Re: [Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

2025-02-06 Thread Ivan Krylov via R-devel
On Thu, 23 Jan 2025 11:16:48 +0100 Kurt Hornik wrote: > My guess would be that the new syntax is particularly prominently used > in examples: if so, it would be good to also have coverage for this. In today's CRAN snapshot, there turned out to be 198 packages that use 4.1 syntax in examples but

Re: [Rd] Suggestion to emphasize Rboolean is unrelated to LGLSXP in R-exts

2025-02-02 Thread Ivan Krylov via R-devel
The good news is that without a C23-enabled compiler, the problem will only happen to source files that #include . The bad news is that such a source file will technically disagree with the rest of R about the type of Rboolean, including the prototypes of the API functions that accept Rboolean: #i

Re: [Rd] [SPAM Warning!] Suggestion to emphasize Rboolean is unrelated to LGLSXP in R-exts

2025-02-01 Thread Ivan Krylov via R-devel
On Thu, 30 Jan 2025 13:07:31 -0800 Michael Chirico wrote: > There are at least dozens of other cases on CRAN [2],[3]. Some of these involve casting an int to Rboolean. Best case, the int is compared against NA_LOGICAL beforehand, avoiding any mistake (there's at least one like that). Worst case,

Re: [Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

2025-01-23 Thread Ivan Krylov via R-devel
Many thanks to Henrik for remembering the report in Bugzilla and to Kurt for implementing the change and finding out the true number of affected packages. On Wed, 22 Jan 2025 15:34:41 -0500 Ian Farm wrote: > Would packages using the underscore placeholder with the native pipe > need to also depe

Re: [Rd] Creating a long list triggers billions of messages

2025-01-21 Thread Ivan Krylov via R-devel
В Tue, 21 Jan 2025 16:51:34 +1100 Hugh Parsonage пишет: > x <- vector("list", 2^31) > > which triggers (presumably) billions of error messages like > Error: long vectors are not supported yet ../include/Rinlinedfuns.h I couldn't reproduce this with some released versions of R or a recent R-deve

[Rd] How setClass() may introduce a binary dependency between packages

2025-01-18 Thread Ivan Krylov via R-devel
Hello R-devel, Since Pavel has mentioned ABI-level dependencies between packages [1], it may be relevant to revisit the related problem mentioned ~1.5 years ago by Dirk [2]. While the current version of SeuratObject doesn't exhibit this problem, a combination of package versions described by Dirk

Re: [Rd] UTF-8 encoding issue with R CMD check with install-args="--latex"

2025-01-16 Thread Ivan Krylov via R-devel
В Thu, 16 Jan 2025 18:09:25 +0100 Peter Ruckdeschel via R-devel пишет: > this is to report some minor UTF-8 encoding issue with R CMD check > with option --install-args="--latex" (and possibly more install-args). Thank you for a very detailed report! This doesn't happen on R-4.2.2 or 4.3.1, but

[Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

2025-01-16 Thread Ivan Krylov via R-devel
Hello R-devel, Approximately [*] the following CRAN packages make use of the pipe syntax in their source code or examples without depending on R >= 4.1: [1] "biplotEZ" "CaseBasedReasoning" "collinear" [4] "cubble" "disk.frame" "duckdbfs" [7] "eia""

Re: [Rd] Package compression benchmarks for zstd vs gzip

2025-01-12 Thread Ivan Krylov via R-devel
On Sat, 11 Jan 2025 16:05:46 -0800 Henrik Bengtsson wrote: > It's probably also worth looking at package compression with 'xz' > compression. In [1], Mike FC has a graph where 'bzip2' and 'xz' seem > to give the best compression ratios, at least for RDS files. 'bzip2' can be surprisingly good on

Re: [Rd] binomial()$linkinv no longer accepts integer values

2025-01-08 Thread Ivan Krylov via R-devel
On Wed, 8 Jan 2025 10:57:47 -0500 Ben Bolker wrote: > I haven't done the archaeology to figure out when this broke/exactly > what change in the R code base broke it: it happened within the last > month or so binomial() itself exhibits this property even in R-4.2.2 from more than two years ago:

Re: [Rd] Good practice for packages with Fortran and C code

2024-10-25 Thread Ivan Krylov via R-devel
В Fri, 25 Oct 2024 15:03:54 -0500 f...@fharrell.com пишет: > Now I find that I can get rid of init.c, and change NAMESPACE to use > useDynLib(package name, list of compiled routine names) (without > .registration and .fixes) after making sure the Fortran and C > routines are not named the same as

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

2024-10-25 Thread Ivan Krylov via R-devel
Dear Luke, Thank you very much for taking the time to write an exhaustive answer! They are always a pleasure to read on the R mailing lists. On Fri, 25 Oct 2024 11:50:34 -0500 (CDT) luke-tier...@uiowa.edu wrote: > So there is a discrepancy between interpreted and compiled code which > is a bug t

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

2024-10-25 Thread Ivan Krylov via R-devel
В Fri, 25 Oct 2024 08:39:39 -0400 Duncan Murdoch пишет: > Surely you or they should be the ones to run the test across all of > CRAN? That's fair. The question is, is there a fundamental reason I overlooked to deny such a change? Except for positioning and whitespace, the line has been in names.

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

2024-10-25 Thread Ivan Krylov via R-devel
On Thu, 24 Oct 2024 13:23:56 -0400 Toby Hocking wrote: > The patch you are proposing to base R is > https://github.com/Rdatatable/data.table/issues/6566#issuecomment-2428912338 > right? Yes, it's this one, thank you for providing the link. Surprisingly, a very cursory check of 100 packages most

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

2024-10-24 Thread Ivan Krylov via R-devel
Hello, The "[" primitive operator currently has the 'eval' flag set to 0 in src/main/names.c. This means that the result of subsetting, whether R-native or implemented by a method, will never be invisible(). This is a very reasonable default: if the user goes as far as to subset a value, they pro

Re: [Rd] invalid permissions

2024-10-22 Thread Ivan Krylov via R-devel
Dear Prof. Roger Koenker, On Tue, 22 Oct 2024 09:08:12 + "Koenker, Roger W" wrote: > > fN <- rqss(y~qss(x,constraint="N")+z) > > *** caught segfault *** > address 0x0, cause 'invalid permissions’ Given a freshly produced quantreg.Rcheck directory, I was able to reproduce this crash by r

[Rd] WRE about R_strtod

2024-10-08 Thread Ivan Krylov via R-devel
Hello, This is what "Writing R extensions" currently says about R_atof and R_strtod: >> Function: void R_atof (const char* str) >> Function: void R_strtod (const char* str, char ** end) >> >> Implementations of the C99/POSIX functions atof and strtod which >> guarantee platform-dependent behaviou

[Rd] Disabling S4 primitive dispatch during method resolution affects namespace load actions

2024-09-27 Thread Ivan Krylov via R-devel
Hello, This problem originally surfaced as an interaction between 'brms', 'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on an object of an S4 class owned by the 'rstan' package tried to load its namespace. rstan:::.onLoad needs to load Rcpp modules, which uses load actions a

Re: [Rd] Possible update to survival

2024-09-24 Thread Ivan Krylov via R-devel
В Sun, 15 Sep 2024 00:43:31 + "Therneau, Terry M., Ph.D. via R-devel" пишет: > 2. Before calling model.frame(), insert my copy of strata into the > calling chain coxenv <- new.env(parent= environment(formula)) > assign("strata", survival::strata, envir= coxenv) > environment(formul

Re: [Rd] model.matrix() may be misleading for "lme" models

2024-09-23 Thread Ivan Krylov via R-devel
В Sun, 22 Sep 2024 10:23:50 -0400 John Fox пишет: > > Evaluating object$call$data in the environment of the suggested > > nlme:::model.matrix.lme function may also not work right. Without an > > explicit copy of the data, the best environment to evaluate it in > > would be parent.frame(). > >

Re: [Rd] model.matrix() may be misleading for "lme" models

2024-09-21 Thread Ivan Krylov via R-devel
Dear Prof. John Fox, В Sat, 21 Sep 2024 12:47:49 -0400 John Fox пишет: > NextMethod(formula(object), data=eval(object$call$data), > contrasts.arg=object$contrasts) The use of NextMethod worries me a bit. It will work as intended as long as everyone gives fully-named argume

Re: [Rd] Can gzfile be given the same method option as file

2024-09-12 Thread Ivan Krylov via R-devel
В Thu, 12 Sep 2024 15:06:50 + Simon Andrews пишет: > > download.file('https://seurat.nygenome.org/azimuth/references/homologs.rds', > > destfile = "c:/Users/andrewss/homologs.rds", method="libcurl") <...> > status was 'SSL connect error' > > > download.file('https://seurat.nygenome.org/azi

Re: [Rd] Can gzfile be given the same method option as file

2024-09-12 Thread Ivan Krylov via R-devel
В Thu, 12 Sep 2024 12:01:54 + Simon Andrews via R-devel пишет: > readRDS('https://seurat.nygenome.org/azimuth/references/homologs.rds') > Error in gzfile(file, "rb") : cannot open the connection I don't think that gzfile works with URLs. gzcon(), on the other hand, does work with url() conne

Re: [Rd] specials and ::

2024-08-26 Thread Ivan Krylov via R-devel
В Mon, 26 Aug 2024 09:42:10 -0500 "Therneau, Terry M., Ph.D. via R-devel" пишет: > For instance >   fit <- survival::survdiff( survival::Surv(time, status) ~ > ph.karno + survival::strata(inst),  data= survival::lung) > > This fails to give the correct answer because it fools terms(formula,

Re: [Rd] Certificates are not trusted

2024-08-15 Thread Ivan Krylov via R-devel
В Thu, 15 Aug 2024 14:57:13 +0200 Ben Engbers пишет: > GPG-sleutel op > https://download.copr.fedorainfracloud.org/results/iucar/cran/pubkey.gpg > (0x1A3B4456) is al geïnstalleerd > error: Verifying a signature using certificate > 3124D2EF76DA4D972F6BE4AC9D60CBB71A3B4456 (iucar_cran (None) >

Re: [Rd] R-patched on CRAN is R-4.3.3

2024-08-09 Thread Ivan Krylov via R-devel
В Fri, 9 Aug 2024 10:28:19 +0200 Gábor Csárdi пишет: > Possibly related to this, it seems that > https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz > is not available any more. I think it's now R-patched.tar.?z: https://github.com/r-devel/r-dev-web/commit/8e146a769206924ec60ae08e2841

Re: [Rd] Another issue using multi-processing linear algebra libraries

2024-08-08 Thread Ivan Krylov via R-devel
В Wed, 7 Aug 2024 07:47:38 -0400 Dipterix Wang пишет: > I wonder if R initiates a system environment or options to instruct > the packages on the number of cores to use? A lot of thought and experience with various HPC systems went into availableCores(), a function from the zero-dependency 'para

Re: [Rd] Another issue using multi-processing linear algebra libraries

2024-08-06 Thread Ivan Krylov via R-devel
В Tue, 6 Aug 2024 10:19:25 -0400 Rob Steele via R-devel пишет: > Would it make sense to add a parameter somewhere, to mclapply(), say, > telling R to not use multiprocessing libraries? It would be great if we had a way to limit all kinds of multiprocessing (child processes, OpenMP threads, pthre

Re: [Rd] Minor inconsistencies in tools:::funAPI()

2024-07-30 Thread Ivan Krylov via R-devel
В Mon, 29 Jul 2024 16:29:42 -0400 Toby Hocking пишет: > Can you please clarify what input files should be used with your > proposed function? I tried a few files in r-svn/src/include and one of > them gave me an error. This is a good illustration of the brittleness of the regexp approach. I focu

Re: [Rd] Question about regexp edge case

2024-07-29 Thread Ivan Krylov via R-devel
В Sun, 28 Jul 2024 20:02:21 -0400 Duncan Murdoch пишет: > gsub("^([0-9]{,5}).*","\\1","123456789") > [1] "123456" This is in TRE itself: for "^([0-9]{,1})" tre_regexecb returns {.rm_so = 0, .rm_eo = 1}, matching "1", but for "^([0-9]{,2})" and above it returns an off-by-one result, {.rm_so = 0

[Rd] Minor inconsistencies in tools:::funAPI()

2024-07-15 Thread Ivan Krylov via R-devel
Hi all, I've noticed some peculiarities in the tools:::funAPI output that complicate its programmatic use a bit. - Is it for remapped symbol names (with Rf_ or the Fortran underscore), or for unmapped names (without Rf_ or the underscore)? I see that the functions marked in WRE are almost al

Re: [Rd] xftrm is more than 100x slower for AsIs than for character vectors

2024-07-14 Thread Ivan Krylov via R-devel
В Fri, 12 Jul 2024 17:35:19 +0200 Hilmar Berger via R-devel пишет: > This can be finally traced to base::rank() (called from > xtfrm.default), where I found that > > "NB: rank is not itself generic but xtfrm is, and rank(xtfrm(x), ) > will have the desired result if there is a xtfrm method.

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

2024-07-06 Thread Ivan Krylov via R-devel
On Fri, 5 Jul 2024 15:27:50 +0800 Kevin Ushey wrote: > A common idiom in the R sources is to convert objects between LANGSXP > and LISTSXP by using SET_TYPEOF. However, this is soon going to be > disallowed in packages. Would you mind providing an example where a package needs to take an existin

[Rd] R FAQ 2.6, 7.21

2024-07-04 Thread Ivan Krylov via R-devel
Hello R-devel, I would like to suggest a couple of updates for the R FAQ. https://CRAN.R-project.org/bin/linux/suse is currently empty and the directory has mtime from 2012, so it probably doesn't help to reference it in FAQ 2.6. There seems to be increased interest in using variables as variabl

Re: [Rd] Large vector support in data.frames

2024-07-02 Thread Ivan Krylov via R-devel
В Wed, 19 Jun 2024 09:52:20 +0200 Jan van der Laan пишет: > What is the status of supporting long vectors in data.frames (e.g. > data.frames with more than 2^31 records)? Is this something that is > being worked on? Is there a time line for this? Is this something I > can contribute to? Apolog

[Rd] Making use of win32_segv

2024-06-30 Thread Ivan Krylov via R-devel
Hello R-devel, When checking packages on Windows, a crash of the process looks like a sudden stop in the output of the child process, which can be very perplexing for package maintainers (e.g. [1,2]), especially if the stars are only right on Win-Builder but not on the maintainer's PC. On Unix-li

Re: [Rd] write.csv problems

2024-06-28 Thread Ivan Krylov via R-devel
В Fri, 28 Jun 2024 11:02:12 -0500 Spencer Graves пишет: > df1 <- data.frame(x=1) > class(df1) <- c('findFn', 'data.frame') > write.csv(df1, 'df1.csv') > # Error in x$Package : $ operator is invalid for atomic vectors Judging by the traceback, only data frames that have a Package column should ha

Re: [Rd] Fixing a CRAN note

2024-06-26 Thread Ivan Krylov via R-devel
26 июня 2024 г. 16:42:39 GMT+03:00, "Therneau, Terry M., Ph.D. via R-devel" пишет: >What is it complaining about -- that it doesn't like my name? >* checking CRAN incoming feasibility ... [7s/18s] NOTE >Maintainer: ‘Terry Therneau ’ > >Found the following \keyword or \concept entries >which like

[Rd] API documentation for R

2024-06-26 Thread Ivan Krylov via R-devel
В Thu, 25 Apr 2024 10:10:44 -0700 Kevin Ushey пишет: > I'm guessing the most welcome kinds of contributions would be > documentation? IMHO, "documenting an API" and "describing how an API > can be used" are somewhat separate endeavors. I believe R-exts does an > excellent job of the latter, but m

Re: [Rd] Creating a text-based device/output format

2024-06-25 Thread Ivan Krylov via R-devel
В Tue, 25 Jun 2024 09:42:59 + David McArthur пишет: > ggplot(data, aes(x=body_mass_g,fill = species)) + > geom _histogram() > > Could output something like: > > title "The body mass (g) of penguin species" > x-axis "Body mass (g)" 3000 --> 5550 > y-axis "Count" 0 --> 2 > histogram > Ade

Re: [Rd] Hard crash of lme4 in R-devel

2024-06-15 Thread Ivan Krylov via R-devel
В Sat, 15 Jun 2024 02:04:31 + "Therneau, Terry M., Ph.D. via R-devel" пишет: > other attached packages: > [1] lme4_1.1-35.1 Matrix_1.7-0 I see you have a new Matrix (1.7-0 from 2024-04-26 with a new ABI) but an older lme4 (1.1-35.1 from 2023-11-05). I reproduced the crash and the giant ba

Re: [Rd] Mismatches for methods registered for non-generic:

2024-05-27 Thread Ivan Krylov via R-devel
В Mon, 27 May 2024 10:52:26 + "Koenker, Roger W" пишет: > that have been fine until now and on my fresh R version 4.4.0 > (2024-04-24) are still ok with R CMD check —as-cran This extra check requires the environment variable _R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_ to be set to TRUE to show

Re: [Rd] confint Attempts to Use All Server CPUs by Default

2024-05-21 Thread Ivan Krylov via R-devel
В Tue, 21 May 2024 08:00:11 + Dario Strbenac via R-devel пишет: > Would a less resource-intensive value, such as 1, be a safer default > CPU value for confint? Which confint() method do you have in mind? There is at least four of them by default in R, and many additional classes could make u

Re: [Rd] FR: Customize background colour of row and column headers for the View output

2024-05-16 Thread Ivan Krylov via R-devel
The change suggested by Iago Giné Vázquez is indeed very simple. It sets the background colour of the row and column headers to the background of the rest of the dataentry window. With this patch, R passes 'make check'. As Duncan Murdoch mentions, the X11 editor already behaves this way. If it's n

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

2024-05-13 Thread Ivan Krylov via R-devel
On Mon, 13 May 2024 09:54:27 -0500 (CDT) luke-tierney--- via R-devel wrote: > Looks like I added that warning 22 years ago, so that should be enough > notice :-). I'll look into removing it now. Dear Luke, I've got a somewhat niche use case: as a way of protecting myself against rogue *.rds fil

Re: [Rd] max on numeric_version with long components

2024-04-27 Thread Ivan Krylov via R-devel
В Sat, 27 Apr 2024 13:56:58 -0500 Jonathan Keane пишет: > In devel: > > max(numeric_version(c("1.0.1.1", "1.0.3.1", > "1.0.2.1"))) > [1] ‘1.0.1.1’ > > max(numeric_version(c("1.0.1.1000", "1.0.3.1000", > "1.0.2.1000"))) > [1] ‘1.0.3.1000’ Thank

Re: [Rd] R 4.4.0 has version of Matrix 1.7-0, but it's not available on CRAN

2024-04-26 Thread Ivan Krylov via R-devel
On Fri, 26 Apr 2024 13:15:47 +0200 Gábor Csárdi wrote: > That's not how this worked in the past AFAIR. Simply, the packages in > the x.y.z/Recommended directories were included in > src/contrib/PACKAGES*, metadata, with the correct R version > dependencies, in the correct order, so that `install.

Re: [Rd] R 4.4.0 has version of Matrix 1.7-0, but it's not available on CRAN

2024-04-26 Thread Ivan Krylov via R-devel
On Fri, 26 Apr 2024 12:32:59 +0200 Martin Maechler wrote: > Finally, I'd think it definitely would be nice for > install.packages("Matrix") to automatically get the correct > Matrix version from CRAN ... so we (R-core) would be grateful > for a patch to install.packages() to achieve this Since t

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-04-25 Thread Ivan Krylov via R-devel
On Thu, 25 Apr 2024 14:45:04 +0200 Jeroen Ooms wrote: > Thoughts? How verboten would it be to create an empty external pointer object, add it to the preserved list, and set an on-exit finalizer to clean up the curl multi-handle? As far as I can tell, the internet module is not supposed to be unl

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

2024-04-25 Thread Ivan Krylov via R-devel
On Wed, 24 Apr 2024 15:31:39 -0500 (CDT) luke-tierney--- via R-devel wrote: > We would be better off (in my view, not necessarily shared by others > in R-core) if we could get to a point where: > > all entry points listed in installed header files can be used in > packages, at least wi

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

2024-04-24 Thread Ivan Krylov via R-devel
On Wed, 24 Apr 2024 19:35:42 -0400 Ben Bolker wrote: > I'm using bleeding-edge R-devel, so maybe my build is weird. Can > anyone else reproduce this? > >View() seems to crash on just about anything. Not for me, sorry. If you have a sufficiently new processor, you can use `rr` [*] to capt

Re: [Rd] Wish: a way to track progress of parallel operations

2024-04-09 Thread Ivan Krylov via R-devel
Dear Henrik (and everyone else): Here's a patch implementing support for immediateConditions in 'parallel' socket clusters. What do you think? I've tried to make the feature backwards-compatible in the sense that an older R starting a newer cluster worker will not pass the flag enabling condition

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

2024-04-05 Thread Ivan Krylov via R-devel
On Fri, 5 Apr 2024 08:15:20 -0400 June Choe wrote: > When assigning a list to an out of bounds index (ex: the next, n+1 > index), it errors the same but now changes the values of the vector > to NULL: > > ``` > x <- expression(a,b,c) > x[[4]] <- list() # Error > x > #> expression(NULL, NULL, NUL

Re: [Rd] hand compile; link to MKL fails at BLAS zdotu

2024-03-30 Thread Ivan Krylov via R-devel
В Sat, 30 Mar 2024 20:31:25 +0300 Ivan Krylov via R-devel пишет: > It seems to crash inside MKL! Should have read some more about mkl_gf_lp64 before posting. According to the Intel forums, it is indeed required in order to work with the GFortran calling convention, but if you're linking

Re: [Rd] hand compile; link to MKL fails at BLAS zdotu

2024-03-30 Thread Ivan Krylov via R-devel
В Sat, 30 Mar 2024 10:55:48 + Ramón Fallon пишет: > In contrast to Dirk's solution, I've found R's configure script > doesn't recognise the update-alternatives system on debian/ubuntu, if > it's MKL. It ought to work if configured with --with-blas=-lblas --with-lapack=-llapack, but, as you f

Re: [Rd] paths capability FALSE on devel?

2024-03-27 Thread Ivan Krylov via R-devel
В Wed, 27 Mar 2024 11:28:17 +0100 Alexandre Courtiol пишет: > after installing R-devel the output of > grDevices::dev.capabilities()$paths is FALSE, while it is TRUE for R > 4.3.3 Your system must be missing Cairo development headers, making x11() fall back to type = 'Xlib': $ R-devel -q -s -e

Re: [Rd] Wish: a way to track progress of parallel operations

2024-03-26 Thread Ivan Krylov via R-devel
Henrik, Thank you for taking the time to read and reply to my message! On Mon, 25 Mar 2024 10:19:38 -0700 Henrik Bengtsson wrote: > * Target a solution that works the same regardless whether we run in > parallel or not, i.e. the code/API should look the same regardless of > using, say, parallel

[Rd] Wish: a way to track progress of parallel operations

2024-03-25 Thread Ivan Krylov via R-devel
Hello R-devel, A function to be run inside lapply() or one of its friends is trivial to augment with side effects to show a progress bar. When the code is intended to be run on a 'parallel' cluster, it generally cannot rely on its own side effects to report progress. I've found three approaches t

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-17 Thread Ivan Krylov via R-devel
On Fri, 15 Mar 2024 11:24:22 +0100 Martin Maechler wrote: > I think just adding > > removeGeneric('as.data.frame') > > is appropriate here as it is self-explaining and should not leave > much traces. Thanks for letting me know! I'll make sure to use removeGeneric() in similar cases in the

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-14 Thread Ivan Krylov via R-devel
On Thu, 14 Mar 2024 10:41:54 +0100 Martin Maechler wrote: > Anybody trying S7 examples and see if they work w/o producing > wrong warnings? It looks like this is not applicable to S7. If I overwrite as.data.frame with a newly created S7 generic, it fails to dispatch on existing S3 classes: new_

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-13 Thread Ivan Krylov via R-devel
В Tue, 12 Mar 2024 12:33:17 -0700 Hervé Pagès пишет: > The acrobatics that as.data.frame.factor() is going thru in order to > recognize a direct call don't play nice if as.data.frame() is an S4 > generic: > >     df <- as.data.frame(factor(11:12)) > >     suppressPackageStartupMessages(libr

[Rd] Never exporting .__global__ and .__suppressForeign__?

2024-03-06 Thread Ivan Krylov via R-devel
Hello, (Dear Richard, I hope you don't mind being Cc:'d on this thread in R-devel. This is one of the ways we can prevent similar problems from happening in the future.) Sometimes, package authors who use both exportPattern('.') and utils::globalVariables(...) get confusing WARNINGs about undocum

[Rd] How to avoid the Markdown code block bug on R Bugzilla

2024-02-27 Thread Ivan Krylov via R-devel
Hello, There's a rare but annoying bug in Bugzilla 5.1.2...5.3.2+ where a Markdown code block inside a comment may be replaced by U+F111 or U+F222, and then the following code blocks may end up being replaced by the preceding ones. For example, the problem can be seen in PR16158: https://bugs.r-pr

Re: [Rd] Tcl socket server (tcltk) does not work any more on R 4.3.2

2024-02-21 Thread Ivan Krylov via R-devel
В Wed, 21 Feb 2024 08:01:16 +0100 "webmail.gandi.net" пишет: > Since the {tcltk} package was working fine with "while > (Tcl_DoOneEvent(TCL_DONT_WAIT) && max_ev) max_ev—;", unless there is > a clear performance enhancement with "while (i-- && > Tcl_ServiceAll())", it would perhaps be wise to rev

Re: [Rd] Tcl socket server (tcltk) does not work any more on R 4.3.2

2024-02-20 Thread Ivan Krylov via R-devel
В Tue, 20 Feb 2024 12:27:35 +0100 "webmail.gandi.net" пишет: > When R process #1 is R 4.2.3, it works as expected (whatever version > of R #2). When R process #1 is R 4.3.2, nothing is sent or received > through the socket apparently, but no error is issued and process #2 > seems to be able to co

Re: [Rd] certain pipe() use cases not working in r-devel

2024-02-15 Thread Ivan Krylov via R-devel
В Wed, 14 Feb 2024 14:43:12 -0800 Jennifer Bryan пишет: > But in r-devel on macOS, this is silent no-op, i.e. "hello, world" > does not print: > > > R.version.string > [1] "R Under development (unstable) (2024-02-13 r85895)" > > con <- pipe("cat") > > writeLines("hello, world", con) I can r

Re: [Rd] Difficult debug

2024-02-07 Thread Ivan Krylov via R-devel
On Wed, 07 Feb 2024 14:01:44 -0600 "Therneau, Terry M., Ph.D. via R-devel" wrote: > > test2 <- mysurv(fit2, pbc2$bili4, p0= 4:0/10, fit2, x0 =50) > ==31730== Invalid read of size 8 > ==31730==    at 0x298A07: Rf_allocVector3 (memory.c:2861) > ==31730==    by 0x299B2C: Rf_allocVector (Rinlinedf

Re: [Rd] Advice debugging M1Mac check errors

2024-02-05 Thread Ivan Krylov via R-devel
On Sun, 4 Feb 2024 20:41:51 +0100 Holger Hoefling wrote: > I wanted to ask if people have good advice on how to debug M1Mac > package check errors when you don´t have a Mac? Apologies for not answering the question you asked, but is this about hdf5r and problems printing R_xlen_t [*] that appear

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

2024-01-18 Thread Ivan Krylov via R-devel
On Thu, 18 Jan 2024 09:59:31 -0600 (CST) luke-tier...@uiowa.edu wrote: > 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. My apologies for not being precise enough. I meant the "bad binding access" error in al

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

2024-01-18 Thread Ivan Krylov via R-devel
В Tue, 16 Jan 2024 14:16:19 -0500 Dipterix Wang пишет: > Could you recommend any packages/functions that compute hash such > that the source references and sexpinfo_struct are ignored? Basically > a version of `serialize` that convert R objects to raw without > storing the ancillary source refere

Re: [Rd] as.matrix.dist patch (performance)

2024-01-16 Thread Ivan Krylov
Dear Tim, В Thu, 10 Aug 2023 22:38:44 +0100 Tim Taylor пишет: > Submitting here in the first instance but happy to move to Bugzilla > if more appropriate. It's a fine patch. The 1.7 times speed up from not transposing the return value shouldn't be sneezed at. I think it's time to move it to Bug

Re: [Rd] Sys.which() caching path to `which`

2024-01-12 Thread Ivan Krylov via R-devel
On Thu, 11 Jan 2024 09:30:55 +1300 Simon Urbanek wrote: > That said, WHICH is a mess - it may make sense to switch to the > command -v built-in which is part of POSIX (where available - which > is almost everywhere today) which would not require an external tool This is a bit tricky to implement

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

2024-01-12 Thread Ivan Krylov via R-devel
В Fri, 12 Jan 2024 00:11:45 -0500 Dipterix Wang пишет: > I wonder how hard it would be to have options to discard source when > serializing R objects? > Currently my analyses heavily depend on digest function to generate > file caches and automatically schedule pipelines (to update cache) > whe

Re: [Rd] using Paraview "in-situ" with R?

2024-01-09 Thread Ivan Krylov via R-devel
В Tue, 9 Jan 2024 14:20:17 + Mike Marchywka пишет: > it seems like an excellent tool to interface to R allowing > visualization without a bunch of temp files or > > Is anyone aware of anyone doing this interface or reasons its a > boondoggle? This sounds like it's better suited for r-pack

Re: [Rd] static html vignette

2024-01-04 Thread Ivan Krylov
On Thu, 4 Jan 2024 11:57:15 +0200 Adrian Dușa wrote: > I wonder if it would be possible to include an html static vignette. This is better suited for R-package-devel, not R-devel. I would say that static vignettes are against the spirit of vignettes: the idea is to provide another layer of uni

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-16 Thread Ivan Krylov
On Wed, 13 Dec 2023 09:04:18 +0100 Hilmar Berger via R-devel wrote: > Still, I feel that default partial matching cripples the functionality > of data.frame for larger tables. Changing the default now would require a long deprecation cycle to give everyone who uses `[.data.frame` and relies on p

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-12 Thread Ivan Krylov
В Mon, 11 Dec 2023 21:11:48 +0100 Hilmar Berger via R-devel пишет: > What was unexpected is that in this case was that [.data.frame was > hanging for a long time (I waited about 10 minutes and then restarted > R). Also, this cannot be interrupted in interactive mode. That's unfortunate. If an op

Re: [Rd] capture error messages from loading shared objects

2023-11-28 Thread Ivan Krylov
В Tue, 28 Nov 2023 10:46:45 +0100 Adrian Dusa пишет: > tryCatch(requireNamespace("foobar"), error = function(e) e) I think you meant loadNamespace() (which throws errors), not requireNamespace() (which internally uses tryCatch(loadNamespace(...)) and may or may not print the error depending on

Re: [Rd] tune "checking installed package size" NOTE

2023-11-24 Thread Ivan Krylov
В Fri, 24 Nov 2023 12:15:06 +0100 Jan Gorecki пишет: > Recently we got _R_CHECK_CRAN_INCOMING_TARBALL_THRESHOLD_ env var to > tune "Size of tarball" note during R package check. > > Could we get similar one for tuning "checking installed package size" > note? Does _R_CHECK_PKG_SIZES_THRESHOLD_

Re: [Rd] saveRDS()/readRDS() on environments

2023-11-15 Thread Ivan Krylov
On Wed, 15 Nov 2023 19:49:00 +0100 Antoine Fabri wrote: > I would like to know what rules are followed, if I had to guess I > would think that parents are saved until a "special environment" is > reached (such as global env, empty env, package envs, namespaces, > imports, datasets), but I'd like

Re: [Rd] New syntax for positional-only function parameters?

2023-11-10 Thread Ivan Krylov
6 ноября 2023 г. 22:54:24 GMT+03:00, mikkmart via R-devel пишет: >The pattern of functions accepting other functions as inputs and >passing additional ... arguments to them is prevalent throughout >the R ecosystem. Currently, however, all such functions must one >way or another tackle the proble

Re: [Rd] False positives in check for lost braces (in tools::checkRd())

2023-11-07 Thread Ivan Krylov
On Tue, 7 Nov 2023 17:13:05 +0100 Martin Becker wrote: > More specifically, a 'Lost braces' NOTE is issued (at least > sometimes) when using the \insertRef{...}{...} command from the > Rdpack package. Does anything change if you use the development version of Rdpack (not currently on CRAN)? Appa

[Rd] svd() of a 30000 by 30000 matrix segfaults: 32-bit length overflow in LAPACK?

2023-11-03 Thread Ivan Krylov
Dear Dr. Robert M Flight, dear R-developers, By an accident, I've noticed this problem reported on Mastodon [1]. On a computer with ≥32G of RAM, running the following code (which may take 5 CPU-hours and allocate 27G of RAM!) results in a segfault: n_val <- 3 tmp_matrix <- matrix(rnorm((n_va

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Ivan Krylov
On Mon, 30 Oct 2023 15:36:50 -0500 Yihui Xie wrote: > I have read about "system() not using a shell on Windows" on the help > page many times before but never understood what it means technically. This means resolving the path to the executable, then calling CreateProcess() to launch that execut

Re: [Rd] as(, "dgTMatrix")' is deprecated.

2023-10-03 Thread Ivan Krylov
On Tue, 3 Oct 2023 16:50:55 + "Koenker, Roger W" wrote: > I thought it might come from Rmosek, but mosek folks don’t think so. I downloaded the Rmosek source package using download.packages( 'Rmosek', '.', repos='https://download.mosek.com/R/10.1' ) ...and there are the deprecated calls

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

2023-10-03 Thread Ivan Krylov
Dear Luke Tierney, Thank you for the reply and apologies for not getting back to you earlier. On Fri, 22 Sep 2023 16:14:58 -0500 (CDT) luke-tier...@uiowa.edu wrote: > I think it would be best to modify errorcall so errorcall_cpy is not > necessary. As things are now it is just too easy to forget

Re: [Rd] [R-pkg-devel] Problem with "compacting" pdf files.

2023-10-02 Thread Ivan Krylov
Dear Rolf, (Moving this one to R-devel...) On Sun, 1 Oct 2023 21:01:13 + Rolf Turner wrote: > I *really* think that the instructions from CRAN could have been > clearer! Without your guidance I'd have been at a total loss. Since the CRAN e-mails quote the R CMD check messages verbatim, w

Re: [Rd] Minor bug with stats::isoreg

2023-09-27 Thread Ivan Krylov
В Wed, 27 Sep 2023 13:49:58 -0700 Travers Ching пишет: > 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))` Indeed, the code in src/library/stats/src/isoreg.c contains the following loop: do { sl

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-26 Thread Ivan Krylov
On Tue, 26 Sep 2023 12:39:57 +1300 Paul Murrell wrote: > Yes, you can set up your own font and TeX installations are a good > source of Type 1 fonts. Here is an example (paths obviously specific > to my [Ubuntu 20.04] OS and TeX installation) ... Many thanks for the explanation! Your example w

[Rd] Crashes and other problems uncovered by static analysis

2023-09-26 Thread Ivan Krylov
Hello R-devel, I've been trying to see if static analysers could have caught PR18602. Surprisingly, the analysers I've tried don't seem to notice it, but they do uncover other problems. While most of these either stem from slightly too defensive programming ("condition is always true/false" warni

  1   2   >