Re: [Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-23 Thread Tomas Kalibera
ror in the code to be fixed. And, for a large number of CRAN packages where a recent improvement in the poisoning showed up more cases, the debugging was done by the CRAN team for the package authors, in some cases even providing patches. Best Tomas On Wed, Apr 23, 2025 at 1:38 PM Tomas Kalib

Re: [Rd] Check for protection

2025-04-11 Thread Tomas Kalibera
On 4/11/25 17:39, Duncan Murdoch wrote: On a tangent from the main topic of this thread:  sometimes (especially to non-experts) it's not obvious whether a variable is protected or not. I don't think there's any easy way to determine that, but perhaps there should be.  Would it be possible to

Re: [Rd] table() and as.character() performance for logical values

2025-04-11 Thread Tomas Kalibera
On 4/11/25 16:23, Suharto Anggono Suharto Anggono via R-devel wrote: Alternative revision: Added to my changed 'StringFromLogical': #define CACHE 16 if (!(*warn & CACHE)) {TrueCh = FalseCh = NULL; *warn |= CACHE;} No change to 'coerceToString' and 'coerceToSymbol'. -- On Friday

Re: [Rd] Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

2025-04-03 Thread Tomas Kalibera
Congratulations on figuring out how to extend the build of the Rtools installer to add more programs there - it is always good to have a confirmation such things are clear enough from the available documentation and sources. You can see that e.g. QPDF is added this way, but adding a toolchain r

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

2025-03-26 Thread Tomas Kalibera
On 3/26/25 17:47, Sergio Oller wrote: Hello, I would like to submit a patch to R. Following 5 Submitting Feature Requests – R Development Guide , I would like to ask for feedback before proceeding with a ¿f

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

2025-02-05 Thread Tomas Kalibera
On 1/30/25 22:07, Michael Chirico wrote: Hello all, The recent change (r87656) to make Rboolean map to type 'bool', not 'int', broke some tests & made me realize I've had totally the wrong impression about what Rboolean actually is, and I suspect I'm not alone. Till now, I've assumed that lik

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

2025-02-04 Thread Tomas Kalibera
On 2/1/25 10:39, Ivan Krylov via R-devel wrote: 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 mi

Re: [Rd] Improving messaging on successful binary package installation

2025-01-29 Thread Tomas Kalibera
On 1/29/25 15:27, Jeroen Ooms wrote: I have been testing R-devel and really enjoying fast parallel downloading of R packages, especially on mac/win where there is no complication step either, it is super nice. Perhaps the install.packages() messaging could still be improved a bit. Right now if

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

2025-01-08 Thread Tomas Kalibera
On 1/8/25 17:26, Ben Bolker wrote: Thanks, that makes sense.   I guess if it never worked for integers (or hasn't worked in a long time, at least) then it doesn't need to be fixed/changed ... Still you found out that the type check and use of REAL() in the function is in wrong order. Inste

Re: [Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-18 Thread Tomas Kalibera
On 12/18/24 01:19, Simon Urbanek wrote: It seems benign, but has implications since checking time is actually not a cheap operation: adding jus ta time check alone incurs a penalty of ca. 700% compared with the time it takes to call R_CheckUserInterrupt(). Generally, it makes no sense to che

Re: [Rd] Faster downloads: avoid them if possible

2024-12-10 Thread Tomas Kalibera
On 12/10/24 00:35, Lluís Revilla wrote: Dear R-devel, I read with interest the recent blog post on how R will have parallel downloads, on blog.r-project.org (https://blog.r-project.org/2024/12/02/faster-downloads/index.html). Thanks Tomas! The blog mentions that one of the areas where this will

Re: [Rd] trivial typo

2024-12-05 Thread Tomas Kalibera
On 12/5/24 02:58, Ben Bolker wrote:   On line 35 of src/library/stats/man/predict.Rd, there is a missing "be": "errors are to [be] returned". https://github.com/r-devel/r-svn/blob/7b28ae9f8c77c7eb280eee3f4515822bb88e5c4b/src/library/stats/man/predict.Rd#L35 Thanks, fixed in R-devel. Best,

Re: [Rd] Error compiling 87283 on Windows 10 using Rtools4.4 6335-6327

2024-10-31 Thread Tomas Kalibera
On 10/31/24 18:35, Avraham Adler wrote: On Thu, Oct 31, 2024 at 12:42 PM Tomas Kalibera wrote: On 10/31/24 17:30, Avraham Adler wrote: When compiling R, the build fails after byte compiling grDevices with the following error: byte-compiling package 'grDevices' make[4]: *** [../.

Re: [Rd] Error compiling 87283 on Windows 10 using Rtools4.4 6335-6327

2024-10-31 Thread Tomas Kalibera
On 10/31/24 17:30, Avraham Adler wrote: When compiling R, the build fails after byte compiling grDevices with the following error: byte-compiling package 'grDevices' make[4]: *** [../../../share/make/lazycomp.mk:9: ../../../library/grDevices/R/grDevices.rdb] Error 139 make[3]: *** [Makefile.win:

Re: [Rd] R CMD check and CRAN's rust policy

2024-10-13 Thread Tomas Kalibera
On 10/13/24 19:30, Josiah Parry wrote: Hi all, I'm new to contributing to r-devel. The trunk of r-devel right now includes a `check_rust()` function for adherence to CRAN's evolving rust policy (see commit https://github.com/r-devel/r-svn/commit/6114d4126434c056b476cbc5db2657536c153d9a ). As it

Re: [Rd] Wrong/incomplete documentation regarding the 100-bytes path length limit.

2024-09-17 Thread Tomas Kalibera
On 9/17/24 12:28, Iago Bonnici via R-devel wrote: Hello @r-devel,     From what I read in the following thread: https://stat.ethz.ch/pipermail/r-package-devel/2023q4/010197.html     The major reason to limit paths lengths in R packages is to help support MS Windows 260-chars paths lengths

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

2024-09-09 Thread Tomas Kalibera
On 9/8/24 23:14, Jeroen Ooms wrote: On Mon, Sep 2, 2024 at 10:05 AM Tomas Kalibera wrote: On 4/25/24 17:01, Ivan Krylov via R-devel wrote: 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

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

2024-09-02 Thread Tomas Kalibera
On 4/25/24 17:01, Ivan Krylov via R-devel wrote: 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

Re: [Rd] Question about regexp edge case

2024-08-09 Thread Tomas Kalibera
risky expressions in literals in patterns, such as those involving "{}" or otherwise similar to documented expressions with a special meaning. Best Tomas Duncan On 2024-08-01 6:49 a.m., Tomas Kalibera wrote: On 7/29/24 09:37, Ivan Krylov via R-devel wrote: В Sun, 28 Jul 2024 20:

Re: [Rd] Question about regexp edge case

2024-08-01 Thread Tomas Kalibera
On 7/29/24 09:37, Ivan Krylov via R-devel wrote: В 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 ab

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

2024-07-15 Thread Tomas Kalibera
On 7/15/24 07:08, Peter Langfelder wrote: Hi all, apologies if I missed something here. Just downloaded and compiled R-patched from https://stat.ethz.ch/R/daily/ but it reports as R-4.3.3 (2024-04-09 r86895) -- "Angel Food Cake". The last dated R-patched is from 2024-04-09, about 3 months old.

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

2024-06-25 Thread Tomas Kalibera
On 6/25/24 18:25, Josiah Parry wrote: "Stop using them" is pithy advice but far easier said than done! With respect to NOTES and WARN on CRAN, these do not result in any package maintainer notifications. The only notification that the developers receive is the threatening one that states that

Re: [Rd] SET_TYPEOF no longer allowed, how should I call R from within C?

2024-06-25 Thread Tomas Kalibera
On 6/25/24 11:25, Matthew Fidler wrote: Hi, I have adapted code to run R from within C from the writing R extensions here https://colinfay.me/writing-r-extensions/system-and-foreign-language-interfaces.html As a more comprehensive example of constructing an R call in C code and evaluating, c

Re: [Rd] R for Windows FAQ

2024-06-03 Thread Tomas Kalibera
https://cran.r-project.org/bin/windows/base/old/ Tomas On 6/3/24 21:30, Rubiana Viana wrote: Hi! How can I get older versions of R software? Thank you! __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Segfault when parsing UTF-8 text with srcrefs

2024-05-31 Thread Tomas Kalibera
On 5/28/24 20:41, Tomas Kalibera wrote: On 5/28/24 19:35, Hadley Wickham wrote: Hi all, When I run the following code, R segfaults: text <- "×" srcfile <- srcfilecopy("test.r", text) parse(textConnection(text), srcfile = srcfile) It doesn't segfault if tex

Re: [Rd] [External] Re: Segfault when parsing UTF-8 text with srcrefs

2024-05-30 Thread Tomas Kalibera
compiler_4.3.0 On Tue, May 28, 2024 at 7:42 PM Tomas Kalibera wrote: This email originated outside the University. Check before clicking links or attachments. On 5/28/24 19:35, Hadley Wickham wrote: > Hi all, > > When I run the following code, R seg

Re: [Rd] Segfault when parsing UTF-8 text with srcrefs

2024-05-28 Thread Tomas Kalibera
On 5/28/24 19:35, Hadley Wickham wrote: Hi all, When I run the following code, R segfaults: text <- "×" srcfile <- srcfilecopy("test.r", text) parse(textConnection(text), srcfile = srcfile) It doesn't segfault if text is ASCII, or it's not wrapped in textConnection, or srcfile isn't set. T

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

2024-05-28 Thread Tomas Kalibera
I think we should do more than this trivial change. The two real dialogs used by the data editor would then also get the new background color (setting the cell width, the "variable" editor). Then, the code clearly distinguishes between cells for names (row, column) and cells for data, so choosi

Re: [Rd] Output pipes to TTY hang

2024-05-20 Thread Tomas Kalibera
On 5/20/24 07:36, Zafer Barutcuoglu wrote: Hi, I am seeing this on Linux as well as MacOS: Opening any output pipe from R 4.4.0 to TTY programs like "less"/"more" hangs, SIGINT-proof: $ R/4.4.0/bin/Rscript -e 'pipe("less", "w")' $ R/4.4.0/bin/Rscript -e 'cat("test", file="|less") $ R/4.4.0/b

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

2024-02-21 Thread Tomas Kalibera
On 2/21/24 08:01, webmail.gandi.net wrote: Thank you, Ivan for this investigation. I inspected the R changes file (https://cran.r-project.org/doc/manuals/r-devel/NEWS.html) and found nothing about this. I should inspect the sources too! It could possibly break other Tcl/Tk related stuff. The

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

2024-02-20 Thread Tomas Kalibera
Jenny On Thu, Feb 15, 2024 at 8:02 AM Tomas Kalibera wrote: On 2/14/24 23:43, Jennifer Bryan wrote: > Hello, > > I've noticed a specific type of pipe() usage that works in released R, but > not in r-devel. > > In 4.3.2 on macOS, I can w

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

2024-02-15 Thread Tomas Kalibera
On 2/14/24 23:43, Jennifer Bryan wrote: Hello, I've noticed a specific type of pipe() usage that works in released R, but not in r-devel. In 4.3.2 on macOS, I can write to a connection returned by pipe(), i.e. "hello, world" prints here: R.version.string [1] "R version 4.3.2 (2023-10-31)"

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

2024-02-15 Thread Tomas Kalibera
On 2/15/24 14:09, Ivan Krylov via R-devel wrote: В 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") writeLi

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

2024-01-17 Thread Tomas Kalibera
enough: if by various tweaks, such as ensuring source references are off in your case, you achieve a state when false alarms are rare (identical objects have different hashes), and hence say unnecessary re-computation is rare, maybe it is good enough. Tomas On Jan 12, 2024, at 11:33 AM, Toma

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

2024-01-12 Thread Tomas Kalibera
On 1/12/24 06:11, Dipterix Wang wrote: Dear R devs, I was digging into a package issue today when I realized R serialize function not always generate the same results on equivalent objects when users choose to run differently. For example, the following code serialize(with(new.env(), { func

Re: [Rd] Request: documenting more specifically language objects in the R Language Definition document

2023-12-13 Thread Tomas Kalibera
On 12/13/23 11:27, Duncan Murdoch wrote: I doubt if anyone will take you up on this request.  Only R Core members can change those manuals, and it's hard work to write clear and correct documentation.  This probably won't make it high enough on their lists of priorities to actually be addressed

Re: [Rd] Rtools error

2023-11-27 Thread Tomas Kalibera
On 11/27/23 18:58, Rui Barradas wrote: Às 05:07 de 27/11/2023, Neha gupta escreveu: Hello, I want to download a package and it gives me the error: WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 4.2.0 was found. (Only the following incompatible vers

Re: [Rd] Rtools error

2023-11-27 Thread Tomas Kalibera
On 11/27/23 06:07, Neha gupta wrote: Hello, I want to download a package and it gives me the error: WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 4.2.0 was found. (Only the following incompatible version(s) of Rtools were found: 4.3.5550) This erro

Re: [Rd] More Detail on "Error : vector memory exhausted (limit reached?)"

2023-11-27 Thread Tomas Kalibera
On 11/27/23 05:42, ivo welch wrote: Would it be possible to enhance this error message? Could the message say how large the limit was that was reached? Is it that the limit for one particular vector has been exceeded (and to how much would it have grown vs. how much was allowed?), or is it th

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-11-22 Thread Tomas Kalibera
wide characters.     https://stackoverflow.com/q/77527167/12685768 Great, thanks! Tomas Mikael On 2023-08-17 6:00 am, r-devel-requ...@r-project.org wrote: Message: 5 Date: Wed, 16 Aug 2023 16:00:13 +0200 From: Tomas Kalibera To: Ivan Krylov Cc:"r-devel@r-project.org"  Subject: Re: [Rd]

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

2023-11-16 Thread Tomas Kalibera
On 10/31/23 10:05, Duncan Murdoch wrote: On 31/10/2023 4:32 a.m., Tomas Kalibera wrote: On 10/30/23 19:07, Yihui Xie wrote: Sure. I'm not sure if it's possible to make it easier to reproduce, but for now the example would require installing TinyTeX (via tinytex::install_tinytex(),

Re: [Rd] Segmentation fault early in compilation of revision 85514

2023-11-14 Thread Tomas Kalibera
On 11/14/23 19:19, Joshua Ulrich wrote: On Mon, Nov 13, 2023 at 12:45 PM Avraham Adler wrote: On Mon, Nov 13, 2023 at 1:13 AM Dirk Eddelbuettel wrote: Avi, Might be toolchain-dependent, might be options-dependent--it built fine here. Easier for you to vary option two so maybe try that? D

Re: [Rd] configure output with flexiblas [was Re: About FlexiBLAS in the R-admin docs]

2023-11-01 Thread Tomas Kalibera
On 11/1/23 13:29, Iñaki Ucar wrote: On Wed, 1 Nov 2023 at 12:57, Tomas Kalibera wrote: On 10/31/23 10:45, Iñaki Ucar wrote: On Tue, 24 Oct 2023 at 12:53, Tomas Kalibera wrote: The output of session info is based on that flexiblas is used and on what flexiblas tells R is the backend it

[Rd] configure output with flexiblas [was Re: About FlexiBLAS in the R-admin docs]

2023-11-01 Thread Tomas Kalibera
On 10/31/23 10:45, Iñaki Ucar wrote: On Tue, 24 Oct 2023 at 12:53, Tomas Kalibera wrote: The output of session info is based on that flexiblas is used and on what flexiblas tells R is the backend it uses. R does not attempt to check that optimized LAPACK functions from the backend really end

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

2023-10-31 Thread Tomas Kalibera
On 10/30/23 21:36, 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. > Please forgive my ignorance. I still do not understand it, but thanks > a lot for the explanation anyway! As the do

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

2023-10-31 Thread Tomas Kalibera
know how reliable). Adding an option to R's system*() functions to use only long names doesn't make sense. Best Tomas > > Regards, > Yihui > -- > https://yihui.org > > > On Mon, Oct 30, 2023 at 12:34 PM Tomas Kalibera > wrote: > > > On 10/30

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

2023-10-30 Thread Tomas Kalibera
On 10/30/23 17:18, Yihui Xie wrote: Hi, It may have been so for 20+ years but I just discovered today that system() would always try to use the short path of a command on Windows: https://github.com/wch/r-source/blob/635a67/src/gnuwin32/run.c#L141 If that's true, I wonder if it could provide a

Re: [Rd] About FlexiBLAS in the R-admin docs

2023-10-24 Thread Tomas Kalibera
On 10/11/23 23:12, George Ostrouchov wrote: I agree that the "R Installation and Administration" guide statement about FlexiBLAS needs an update. Standard R in CentOS Stream 9, which is now downstream from Fedora, gives the following result for Matrix products in sessionInfo(): sessionInfo(

Re: [Rd] FR: valid_regex() to test string validity as a regular expression

2023-10-09 Thread Tomas Kalibera
On 10/10/23 01:57, Michael Chirico via R-devel wrote: > It will be useful to package authors trying to validate input which is > supposed to be a valid regular expression. > > As near as I can tell, the only way we can do so now is to run any > regex function and check for the warning and/or cond

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-16 Thread Tomas Kalibera
On 8/16/23 13:22, Ivan Krylov wrote: On Wed, 16 Aug 2023 09:42:09 +0200 Tomas Kalibera wrote: Fixed in R-devel (84960). Please let me know if you see any problem with the fix. Thank you for implementing the fix! I gave 叶月光 the link to the GitHub Action build of the r84960 installer

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-16 Thread Tomas Kalibera
ious: by choosing rather long names for individual files, one usually soon runs out of the limit for the full path. Best Tomas [1] - https://blog.r-project.org/2023/03/07/path-length-limit-on-windows/index.html > > Regards, > yu > > --

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-16 Thread Tomas Kalibera
On 8/15/23 16:00, Tomas Kalibera wrote: On 8/15/23 09:04, Ivan Krylov wrote: В Tue, 15 Aug 2023 08:38:11 +0200 Tomas Kalibera пишет: As this was reported to be regression in 4.3, it is entirely possible this change came with a regression (though a bit surprising we didn't catch it ea

Re: [Rd] 答复: R-4.3 version list.files function could not work correctly in chinese

2023-08-15 Thread Tomas Kalibera
Dear 叶月光, as discussed on this thread, Ivan Krylov found a bug in R, which could be causing the problem you have run into. To confirm this is the cause, could you please check outside R (say in explorer) if you have any file with a very long name in the directory? And if so, does moving that f

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-15 Thread Tomas Kalibera
On 8/15/23 09:04, Ivan Krylov wrote: В Tue, 15 Aug 2023 08:38:11 +0200 Tomas Kalibera пишет: As this was reported to be regression in 4.3, it is entirely possible this change came with a regression (though a bit surprising we didn't catch it earlier by testing), so it would be a great

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-14 Thread Tomas Kalibera
On 8/13/23 13:16, Ivan Krylov wrote: Found it! Looks like a buffer length problem. This isn't limited to Chinese, just more likely to happen when a character takes three bytes to represent in UTF-8. (Any filename containing characters which take more than one byte to represent in UTF-8 may fail

Re: [Rd] a quick and dirty way to compile R on win arm64 using clangarm64

2023-08-14 Thread Tomas Kalibera
On 8/13/23 05:26, yu gong wrote: sorry forgot dynamic link ICU 1 svn checkout R-trunk and add USE_LLVM=YES and ICU_LIBS ?= -licuin -licuuc -licudt -lstdc++ in MKRules.dist or Mkrules.local For the record, if you are experimenting with building R-devel using msys2 toolchains, you should a

Re: [Rd] a quick and dirty way to compile R on win arm64 using clangarm64

2023-08-13 Thread Tomas Kalibera
On 8/13/23 05:14, yu gong wrote: hello everyone: On this boring weekend, I tried compile R-trunk on windows 11 arm64 using clangarm64+msys2 on macbook m1 , it surprisingly easy to compiled and run. more investigation and test and code modify need to be done ,but IMO this is a good beginni

Re: [Rd] Bug in perl=TRUE regexp matching?

2023-07-31 Thread Tomas Kalibera
On 7/25/23 03:13, Brodie Gaslam via R-devel wrote: On 7/24/23 4:10 AM, Duncan Murdoch wrote: On 23/07/2023 9:01 p.m., Brodie Gaslam wrote: On 7/23/23 4:29 PM, Duncan Murdoch wrote: The help page for `?gsub` says (in the context of performance considerations): "... just one UTF-8 string

Re: [Rd] Incorrect type in malloc in Rscript.c

2023-07-12 Thread Tomas Kalibera
On 7/13/23 00:26, Will McClennan wrote: I downloaded and compiled R-4.3.1 from cran.rstudio.com and on line 405 of Rscript.c in src/unix the line of code char *buf=(char*) malloc((size_t) (len+1)*sizeof(char *)); appears to be wrong to me. If an array of char* is being allocated then the ar

Re: [Rd] Installation of R-4.3.1 with intel 2022

2023-06-21 Thread Tomas Kalibera
On 6/20/23 18:47, Giuseppe Calò wrote: Hi all, I have the issue: icc -std=c99 -std=gnu11 -I../../src/extra -I../../src/extra/xdr -I. -I../../src/include -I../../src/include -I/usr/local/include -I../../src/nmath -DHAVE_CONFIG_H -fopenmp -fpic -g -O3 -wd188 -ip -mp -c eval.c -o eval.o ar

Re: [Rd] why does [A-Z] include 'T' in an Estonian locale?

2023-06-01 Thread Tomas Kalibera
On 5/30/23 17:45, Ben Bolker wrote: Inspired by this old Stack Overflow question https://stackoverflow.com/questions/19765610/when-does-locale-affect-rs-regular-expressions I was wondering why this is TRUE: Sys.setlocale("LC_ALL", "et_EE") grepl("[A-Z]", "T") TRE's documentation at

Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-30 Thread Tomas Kalibera
On 5/30/23 22:09, Martin Morgan wrote: I build my own R from source on an M1 mac. I have a clean svn checkout in one directory ~/src/R-devel. I switch to ~/bin/R-devel and the first time run cd ~/bin/R-devel ~/src/R-devel/configure --enable-R-shlib 'CFLAGS=-g -O0' CPPFLAGS=-I/opt/R/arm64/inc

Re: [Rd] How to locate references to an environment?

2023-05-23 Thread Tomas Kalibera
On 5/23/23 20:29, Peter Meilstrup wrote: R developers, I am trying to track down a memory leak in my R package. I have a complex object O which comprises a lot of closures and such. Among which, the object uses an environment E to perform computations and keep intermediate values in. When O c

Re: [Rd] R-4.2.3 build from source on Windows (w Rtools42) - lto1.exe error

2023-05-12 Thread Tomas Kalibera
installation with Rtools if needed (also covered in the documentation). You surely might be able to make it work even with other distribution of tools, but you'd be on your own, likely have to deal with technical issues. Best Tomas Greetings, Walter On Thu, 11 May 2023 at 09:06,

Re: [Rd] R-4.2.3 build from source on Windows (w Rtools42) - lto1.exe error

2023-05-11 Thread Tomas Kalibera
On 5/11/23 03:07, Gmail wrote: Windows 11 PRO Version  10.0.22621 Build 22621 Processor: Intel(R) Core(TM) i7-1065G7 "Icelake-client" ``` ​svn info Path: . Working Copy Root Path: /d/R_DEV/R-4/R42/R-4-2-branch URL: https://svn.r-project.org/R/branches/R-4-2-branch Relative URL: ^/branche

Re: [Rd] Forcing a PROTECT Bug to Occur

2023-04-30 Thread Tomas Kalibera
>  1: doWithOneRestart(return(expr), restart) >  2: withOneRestart(expr, restarts[[1L]]) >  3: withRestarts({  .Internal(.signalCondition(simpleWarning(msg, > call), msg,     call))    .Internal(.dfltWarn(msg, call))}, > muffleWarning = function() NULL) >  4: .signalSimpleWarning("yo

Re: [Rd] Forcing a PROTECT Bug to Occur

2023-04-29 Thread Tomas Kalibera
On 4/29/23 19:26, Michael Milton wrote: I'm trying to learn about R's PROTECT system. To that end I've tried to create an example of C code that doesn't protect anything. I was hoping it would either segfault from trying to access deallocated memory, or maybe print out nonsense results because

Re: [Rd] path to rtools not updated in R 4.2.3 - line 1: gcc: command not found

2023-04-04 Thread Tomas Kalibera
On 4/5/23 07:48, Patrick Giraudoux wrote: Dear listers, I have update to rtools43 and, using R 4.2.3 I have been surprised not to be able to compile packages needing compilation when updating. Looks like the path given in gcc  -I"C:/PROGRA~1/R/R-42~1.3/include" -DNDEBUG -DNTIMER -I./SuiteSpa

Re: [Rd] Breaking Change in Rcomplex Layout?

2023-04-04 Thread Tomas Kalibera
quot; and ".i" are visible on the Fortran side in a corresponding array of COMPLEX. Without knowing that, the link-time optimizer could remove say stores to the ".r" and ".i" when calling to Fortran, this is what has been actually seen to happen. Tomas > >

Re: [Rd] Breaking Change in Rcomplex Layout?

2023-04-04 Thread Tomas Kalibera
is certainly worth making sure you don't re-introduce the problem that R had before this change, on your end. Tomas > > Cheers > > On Tue, Apr 4, 2023 at 12:15 AM Tomas Kalibera > wrote: > > > On 4/3/23 15:50, Michael Milton wrote: >> Okay, but I'm af

Re: [Rd] Breaking Change in Rcomplex Layout?

2023-04-03 Thread Tomas Kalibera
iously this will get a NEWS entry when/if it gets ported to 4.3.0 branch, in the form it would have at that point. Best Tomas > > On Mon, Apr 3, 2023 at 11:39 PM Tomas Kalibera > wrote: > > > On 4/3/23 14:07, Michael Milton wrote: > > Hi all, > &g

Re: [Rd] Breaking Change in Rcomplex Layout?

2023-04-03 Thread Tomas Kalibera
On 4/3/23 14:07, Michael Milton wrote: Hi all, There seems to have been a breaking change in the R trunk caused by a fix to bug 18430 that relates to the layout of the Rcomplex typedef. Previously it was a struct, but now it's a union by defau

Re: [Rd] Versioning Rtools ARP entries

2023-03-22 Thread Tomas Kalibera
On 3/13/23 17:57, Tomas Kalibera wrote: On 3/13/23 17:31, Daniel Possenriede wrote: Hi, If I am not mistaken, all Rtools 4.2 (and 4.3) revisions have the same ARP [1] entries, i.e. all report version 4.2.0.1 (or 4.3.0.1). This makes it difficult to determine the installed version (is it

Re: [Rd] La_library() always returns "" on R-devel?

2023-03-17 Thread Tomas Kalibera
On 3/17/23 11:53, Gábor Csárdi wrote: Seems like this in 83986 [1] needs a fix in Lapack.c: if (dladdr((void *) F77_NAME(ilaver), &dl_info)) { char buf[PATH_MAX+1]; char *res = realpath(dl_info.dli_fname, buf); if (res) { SEXP nf

Re: [Rd] Versioning Rtools ARP entries

2023-03-13 Thread Tomas Kalibera
On 3/13/23 17:31, Daniel Possenriede wrote: Hi, If I am not mistaken, all Rtools 4.2 (and 4.3) revisions have the same ARP [1] entries, i.e. all report version 4.2.0.1 (or 4.3.0.1). This makes it difficult to determine the installed version (is it possible to determine the installed revision?)

Re: [Rd] On optimizing `R_NewEnv()`

2023-03-10 Thread Tomas Kalibera
On 2/8/23 21:51, Davis Vaughan via R-devel wrote: Hi all, I really like the addition of `R_NewEnv()` back in 4.1.0 https://github.com/wch/r-source/blob/625ab8d45f86f65561e53627e1f0c220bdc5f752/src/main/envir.c#L3619-L3630 I have a use case where I'm likely to call this function a large number

Re: [Rd] scan(..., skip=1e11): infinite loop; cannot interrupt

2023-03-10 Thread Tomas Kalibera
On 2/11/23 09:33, Ivan Krylov wrote: On Fri, 10 Feb 2023 23:38:55 -0600 Spencer Graves wrote: I have a 4.54 GB file that I'm trying to read in chunks using "scan(..., skip=__)". It works as expected for small values of "skip" but goes into an infinite loop for "skip=1e11" and similar large

Re: [Rd] Undocumented change of dirname("C:/") on R-devel on Windows

2023-02-27 Thread Tomas Kalibera
of the > > drive, but just a relative path [1]. So, I agree with you that > the basename > > of "C:/" should be "C:/". However, at the same time, I don't > feel this is > > worth a breaking change, so I think we can preserve

Re: [Rd] Possible NA Propagation Failure in RISC-V64 CPU?

2023-02-24 Thread Tomas Kalibera
On 2/24/23 00:39, Jane He wrote: Hi all, I am currently compiling R to RISC-V64 CPU and I think I have discovered a NA propagation failure. How R implements NA (not available) and NaN (not-a-number) is explained in detail here: https://stat.ethz.ch/pipermail/r-devel/2014-February/068380.html.

Re: [Rd] dyn.load loads libraries/symbols at high addresses.

2023-02-23 Thread Tomas Kalibera
On 2/22/23 23:05, Vanessa McHale wrote: Hello all, I am trying to write an interface for BQN and R However, even | dyn.load("/usr/local/lib/libcbqn.so"); .Call("bqn_init")| immediately fails on the BQN side, viz. |Failed to allocate memory for JIT 200 time

Re: [Rd] Undocumented change of dirname("C:/") on R-devel on Windows

2023-02-23 Thread Tomas Kalibera
On 2/23/23 03:27, Hiroaki Yutani wrote: Hi, I found dirname() behaves differently on R-devel on Windows. Since I'm not sure which behavior is right, let me ask here before filing this to R's Bigzilla. On R 4.2.2., we get > dirname("C:/") [1] "C:/" However, on R-devel (r83888), we

Re: [Rd] Robustifying R_CleanTempDir a bit more

2023-02-16 Thread Tomas Kalibera
On 2/16/23 15:43, Tomas Kalibera wrote: On 2/16/23 15:09, Ivan Krylov wrote: Hello, This is probably a very minor point, but R_CleanTempDir may still have a shell injection in it. I couldn't find a way to shoot the user in the foot in a significant way (by, say, accidentally rem

Re: [Rd] Robustifying R_CleanTempDir a bit more

2023-02-16 Thread Tomas Kalibera
On 2/16/23 15:09, Ivan Krylov wrote: Hello, This is probably a very minor point, but R_CleanTempDir may still have a shell injection in it. I couldn't find a way to shoot the user in the foot in a significant way (by, say, accidentally removing ~), thanks to R disallowing spaces in the path, but

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
On 2/15/23 16:44, Ben Engbers wrote: Hi Op 15-02-2023 om 14:38 schreef Tomas Kalibera: On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. .. I have two questions. The first is where I can find R

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
process between sending the credentials to the server and requesting the status. Tomas Kalibera put me on the right track by drawing my attention to the 'socketSelect' function. I don't know exactly the purpose of this function is (the function itself is documented, but I can't

Re: [Rd] long path names (more than 260 chars) not working under Windows OS, longPathAware missing in exe manifests?

2023-02-14 Thread Tomas Kalibera
On 2/14/23 12:11, Roman Hille wrote: Can you help please? All file und dir funktions and also basename() do not work in R under Windows OS if the path is longer than 260 characters. The problem seems to be, that the manifest for all R executables do not have the longPathAware switch in the mani

Re: [Rd] Small typo in Writing R Extensions

2023-02-08 Thread Tomas Kalibera
On 2/8/23 21:33, Davis Vaughan via R-devel wrote: Hi all, Writing R Extensions describes `R_NewEnv()` as: ``` At times it may also be useful to create a new environment frame in C code. R_NewEnv is a C version of the R function new.env: SEXP R_NewEnv(SEXP enclos, int hash, ins size) ``` The

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-31 Thread Tomas Kalibera
On 1/31/23 14:37, peter dalgaard wrote: On 31 Jan 2023, at 12:51 , Tomas Kalibera wrote: On 1/31/23 11:50, Martin Maechler wrote: hmm.., that's a pity; I had hoped it was a pragmatic and valid strategy, but of course you are right that type stability is really a valid goal...

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-31 Thread Tomas Kalibera
On 1/31/23 11:50, Martin Maechler wrote: Tomas Kalibera on Tue, 31 Jan 2023 10:53:21 +0100 writes: > On 1/31/23 09:48, Ivan Krylov wrote: >> Can we use the "bytes" encoding for such environment variables invalid >> in the current locale? The

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-31 Thread Tomas Kalibera
On 1/31/23 09:48, Ivan Krylov wrote: Can we use the "bytes" encoding for such environment variables invalid in the current locale? The following patch preserves CE_NATIVE for strings valid in the current UTF-8 or multibyte locale (or non-multibyte strings) but sets CE_BYTES for those that are i

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-31 Thread Tomas Kalibera
ld two different results. I would argue that if we want to make specific checks, we should make them conditional - even if the default is to add them. Again, the error is due to the implementation of Sys.getenv() breaking in R-devel, not due to any design decision. The key design decision (a

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-30 Thread Tomas Kalibera
On 1/30/23 23:01, Henrik Bengtsson wrote: /Hello. SUMMARY: $ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv()" Error in substring(x, m + 1L) : invalid multibyte string at '' $ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv('BOOM')" [1] "\xff" BACKGROUND: I

Re: [Rd] Object are not destroy while using error (Rf_error)

2023-01-23 Thread Tomas Kalibera
On 1/21/23 16:55, Antoine Lucas wrote: Dear all, I try to understand why on my computer I do not clear all data with this code: #include static int count = 0; class A { public: A(){ printf("c %d\n", count); count++; } ~A(){count--; printf("d %d\n", count); } }; extern

Re: [Rd] Problem installing gdb into Rtools42

2023-01-19 Thread Tomas Kalibera
btle issue in the repl program under >> Windows >> that is not related to gdb, but this doesn't explain why gdb >> creates that stray >> thread, making it impossible to proceed with the debugging. Nothing >> should happen before gdb hits

Re: [Rd] Problem installing gdb into Rtools42

2023-01-18 Thread Tomas Kalibera
s://gitlab.haskell.org/ghc/ghc/-/issues/19945. From a quick look it seems to be an incompatibility between two libraries implementing POSIX regular expressions, essentially a name clash, they just need to make sure to consistently use one of them. It is not a problem of MinGW-W64. Tomas

Re: [Rd] Problem installing gdb into Rtools42

2023-01-18 Thread Tomas Kalibera
ls42 comes with Msys2. gdb is not installed there by default, because most people don't need it, but it is documented how to install it. I've now updated the documentation to always remind to update the system before installing any Msys2 packages. Tomas > > Dominick > >

Re: [Rd] Problem installing gdb into Rtools42

2023-01-17 Thread Tomas Kalibera
On 1/18/23 04:33, Dominick Samperi wrote: Hello, I tried installing gdb into Rtools42 following the instructions here https://cran.r-project.org/bin/windows/base/howto-R-4.2.html I ran 'pacman -Sy gdb', and the installation seemed to complete without problems. But gdb could not be started be

Re: [Rd] RTools 4.2 - possible conflict with git bash

2022-12-23 Thread Tomas Kalibera
On 12/23/22 15:45, sergio.vign...@unibe.ch wrote: Hi all, It seems that RTools 4.2 conflicts with git bash on Windows 10. You can't mix tools from two different distributions based on msys2 (or cygwin). You cannot e.g. call "make" of one of them from a shell ran in another one. This is due t

Re: [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-12-22 Thread Tomas Kalibera
was the disconnect with the screen reader. Did the underlying development toolbox undergo any version changes from ( <4.2.0 ) to (4.2.0...4.2.1) to (4.2.2) ?? Great that normal transmission has resumed. Jonathan -Original Message- From: Tomas Kalibera Sent: Thursday, 22 December 2022

Re: [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-12-21 Thread Tomas Kalibera
n 4.2.2. Also, I'll download the development snapshot and try it out. I'll let you know how I get on. Please excuse me if I don't get to it immediately; things are a bit crazy at work at the moment and it is that time of the year too! Cheers, Andrew. On 20/12/2022 19:33, To

  1   2   3   4   5   >