Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-23 Thread Hiroaki Yutani
> Thanks, that's right, so I've ported this part to R-devel and R-patched, I noticed R-devel no longer complains about this from a while ago, thanks. > With R.version$crt, you can already get a make (or even environment) > variable. Writing R Extensions has examples how to invoke R in make >

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-23 Thread Tomas Kalibera
On 9/20/21 11:03 AM, Hiroaki Yutani wrote: I tried to use configure.ucrt, and found it results in the following NOTE on the released version of R, unfortunately. * checking top-level files ... NOTE Non-standard file/directory found at top level: 'configure.ucrt' Will this be

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-20 Thread Hiroaki Yutani
I tried to use configure.ucrt, and found it results in the following NOTE on the released version of R, unfortunately. * checking top-level files ... NOTE Non-standard file/directory found at top level: 'configure.ucrt' Will this be accepted by CRAN if I submit a package that

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-14 Thread Hiroaki Yutani
Thanks for both, I'll try these features. 2021年9月14日(火) 22:40 Tomas Kalibera : > > > On 9/9/21 5:54 AM, Hiroaki Yutani wrote: > > Thank you for the prompt reply. > > > There in not such a mechanism, yet, but can be added, at least for > > diagnostics. > > For example, can R.version somehow

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-14 Thread Tomas Kalibera
On 9/9/21 5:54 AM, Hiroaki Yutani wrote: > Thank you for the prompt reply. > > > There in not such a mechanism, yet, but can be added, at least for > > diagnostics. > > For example, can R.version somehow contain the information? Yes, now added to the experimental builds. R.version$crt contains

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-08 Thread Hiroaki Yutani
Thank you for the prompt reply. > There in not such a mechanism, yet, but can be added, at least for > diagnostics. For example, can R.version somehow contain the information? > We could add support for configure.ucrt, which would take precedence > over configure.win on the UCRT builds (like

Re: [Rd] Detect UCRT-built R from within R sessions (and in configure.win)

2021-09-08 Thread Tomas Kalibera
On 9/8/21 2:08 PM, Hiroaki Yutani wrote: Hi, Are there any proper ways to know whether the session is running on the R that is built with the UCRT toolchain or not? Checking if the encoding is UTF-8 might do the trick, but I'm not sure if it's always reliable. There in not such a mechanism,

Re: [Rd] detect ->

2020-04-15 Thread Adrian Dușa
> On 15 Apr 2020, at 18:13, William Dunlap wrote: > > You are right. >= is not as evocative as =>. Perhaps > and < would do? > %=>% and %<=% would work. I thought about > and < too, but as you rightly observed > is way less evocative as => There is a certain level of clarity which an

Re: [Rd] detect ->

2020-04-15 Thread William Dunlap via R-devel
You are right. >= is not as evocative as =>. Perhaps > and < would do? %=>% and %<=% would work. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Apr 15, 2020 at 12:41 AM Adrian Dușa wrote: > Dear Bill, > > I already tried this, and it would have been great as (currently) the >

Re: [Rd] detect ->

2020-04-15 Thread Adrian Dușa
> On 15 Apr 2020, at 13:20, Ivan Krylov wrote: > > On Wed, 15 Apr 2020 10:41:41 +0300 > Adrian Dușa wrote: > >> Now, if I could find a way to define "=>" as a standalone operator, >> and convince the R parser to bypass that error, it would solve >> everything. If this is not possible, I am

Re: [Rd] detect ->

2020-04-15 Thread Ivan Krylov
On Wed, 15 Apr 2020 10:41:41 +0300 Adrian Dușa wrote: > Now, if I could find a way to define "=>" as a standalone operator, > and convince the R parser to bypass that error, it would solve > everything. If this is not possible, I am back to detecting "->". Just to confirm, are you avoiding

Re: [Rd] detect ->

2020-04-15 Thread Adrian Dușa
Dear Bill, I already tried this, and it would have been great as (currently) the sufficiency relation is precisely "=>"... but: foo <- function(x) return(substitute(x)) foo(A => B) Error: unexpected '>' in "foo(A =>" It seems that "=>" is a syntactic error for the R parser, while "<=" is not

Re: [Rd] detect ->

2020-04-13 Thread William Dunlap via R-devel
Using => and <= instead of -> and <- would make things easier, although the precedence would be different. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 13, 2020 at 1:43 AM Adrian Dușa wrote: > Thank you for your replies, this actually has little to do with the > regular R code but

Re: [Rd] detect ->

2020-04-13 Thread Adrian Dușa
Thank you for your replies, this actually has little to do with the regular R code but more to signal what in my package QCA is referred to as a necessity relation A <- B (A is necessary for B) and sufficiency A -> B (A is sufficient for B). If switched by the parser, A -> B becomes B <- A

Re: [Rd] detect ->

2020-04-13 Thread Gábor Csárdi
On Mon, Apr 13, 2020 at 9:23 AM Gabriel Becker wrote: [...] > This means the only feasible way to detect it, which a few projects do I > believe, is process the code while it is still raw text, before it goes into > the parser, and have clever enough regular expressions. Well, especially

Re: [Rd] detect ->

2020-04-13 Thread Gabriel Becker
Adrian, Indeed, this has come up in a few places, but as Gabor says, there is no such thing as right hand assignment at any point after parsing is complete. This means the only feasible way to detect it, which a few projects do I believe, is process the code while it is still raw text, before it

Re: [Rd] detect ->

2020-04-13 Thread Gábor Csárdi
That parser already flips -> to <- before creating the parse tree. Gabor On Mon, Apr 13, 2020 at 8:39 AM Adrian Dușa wrote: > > I searched and tried for hours, to no avail although it looks simple. > > (function(x) substitute(x))(A <- B) > #A <- B > > (function(x) substitute(x))(A -> B) > # B

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Simon Urbanek
On Mar 14, 2014, at 8:09 AM, Kirill Müller kirill.muel...@ivt.baug.ethz.ch wrote: Hi Is there a way to detect that the process that corresponds to a pipe has ended? On my system (Ubuntu 13.04), I see p - pipe(true, w); Sys.sleep(1); system(ps -elf | grep true | grep -v grep);

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Kirill Müller
On 03/14/2014 03:54 PM, Simon Urbanek wrote: As far as R is concerned, the connection is open. In addition, pipes exist even without the process - you can close one end of a pipe and it will still exist (that’s what makes pipes useful, actually, because you can choose to close arbitrary

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Simon Urbanek
On Mar 14, 2014, at 11:03 AM, Kirill Müller kirill.muel...@ivt.baug.ethz.ch wrote: On 03/14/2014 03:54 PM, Simon Urbanek wrote: As far as R is concerned, the connection is open. In addition, pipes exist even without the process - you can close one end of a pipe and it will still exist