search for: infix

Displaying 20 results from an estimated 81 matches for "infix".

2016 Jul 15
2
TableGen change in LLVM 3.9 allows only prefix instruction notation
Hello. I am curious why did you changed TableGen to allow in principle only writing ASM instructions in prefix notation. I ask because I personally use an assembly notation that is infix (I could use a simple preprocessor that changes prefix to infix). Just to mention: I found the solution to this - the following part of the code is responsible for this from llvm/utils/TableGen/AsmMatcherEmitter.cpp (so it needs to be commented to be disabled): // The first token of...
2017 Mar 16
2
Support for user defined unary functions
I guess this would establish a separate "namespace" of symbolic prefix operators, %*% being an example in the infix case. So you could have stuff like %?%, but for non-symbolic (spelled out stuff like %foo%), it's hard to see the advantage vs. foo(x). Those examples you mention should probably be addressed (eventually) in the core language, and it looks like people are already able to experiment, so I'm...
2017 Mar 16
2
Support for user defined unary functions
Martin, Jim can speak directly to his motivations; I don't claim to be able to do so. That said, I suspect this is related to a conversation on twitter about wanting an infix "unquote" operator in the context of the non-standard evaluation framework Hadley Wickham and Lionel Henry (and possibly others) are working on. They're currently using !!! and !! for things related to this, but this effectively requires non-standard parsing, as ~!!x is interpreted a...
2017 Mar 17
3
Support for user defined unary functions
...nlap > TIBCO Software > wdunlap tibco.com > > > On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence > <lawrence.michael at gene.com> wrote: >> I guess this would establish a separate "namespace" of symbolic prefix >> operators, %*% being an example in the infix case. So you could have stuff >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's hard to >> see the advantage vs. foo(x). >> >> Those examples you mention should probably be addressed (eventually) in the >> core language, and it looks like peopl...
2006 Jul 12
2
Are infix binary operators ** and ^ aliased?
Dear R-help, After making a typo (reminiscent of FORTRAN 77, I guess) I found the following: > identical(all.equal(2^(-10:10), 2**(-10:10)), TRUE) [1] TRUE I have tried to find the documentation about the ** operator but I was unsuccesful this way: > sessionInfo() Version 2.3.1 (2006-06-01) powerpc-apple-darwin8.6.0 attached base packages: [1] "methods" "stats"
2017 Mar 16
0
Support for user defined unary functions
...x% operators to be the same. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence <lawrence.michael at gene.com> wrote: > I guess this would establish a separate "namespace" of symbolic prefix > operators, %*% being an example in the infix case. So you could have stuff > like %?%, but for non-symbolic (spelled out stuff like %foo%), it's hard to > see the advantage vs. foo(x). > > Those examples you mention should probably be addressed (eventually) in the > core language, and it looks like people are already able t...
2004 May 08
3
Indexing column of a matrix with infix $
I'm using 1.9.0 on Windoze 2k and I created a numeric matrix and used colnames() to give it some column names, but if I try to select a column using matrixname$validname I get a null return but if I use matrixname[,4] it works fine. Looking at the help I think this is because a matrix is not a recursive structure and I think it's saying I shouldn't be surprised nor attempt this.
2017 Mar 17
2
Support for user defined unary functions
...t; > >> > >> > On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence >> > <lawrence.michael at gene.com> wrote: >> >> I guess this would establish a separate "namespace" of symbolic prefix >> >> operators, %*% being an example in the infix case. So you could have >> >> stuff >> >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's >> >> hard to >> >> see the advantage vs. foo(x). >> >> >> >> Those examples you mention should probably be addre...
2017 Mar 17
2
Support for user defined unary functions
...t; > >> > >> > On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence >> > <lawrence.michael at gene.com> wrote: >> >> I guess this would establish a separate "namespace" of symbolic prefix >> >> operators, %*% being an example in the infix case. So you could have >> >> stuff >> >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's >> >> hard to >> >> see the advantage vs. foo(x). >> >> >> >> Those examples you mention should probably be addre...
2004 Mar 05
4
Command Line Expressions
Hi, Is it possible to run R in command line to evalute R expressions and return results to stdout, something like >R CMD -e "R.version$minor" then you got return >"8.1" Or do a simple calculation >R CMD -e "sin(1.2)" >0.932039 Thanks. -- Pingping Zheng Department of Mathematics and Statistics Fylde College Lancaster University Lancaster LA1 4YF
2017 Mar 16
0
Support for user defined unary functions
...the `function(x)` form to explicitly show the function was being called with only one argument, clearly performance implications are not relevant for these examples. I think of this mainly as a gap in the tooling we provide users and package authors. R has native prefix `+1`, functional `f(1)` and infix `1 + 1` operators, but we only provide a mechanism to create user defined functional and infix operators. One could also argue that the user defined infix operators are also ugly and could be replaced by `f(a, b)` calls as well; beauty is in the eye of the beholder. The unquote example [1] shows...
2013 Apr 23
3
[LLVMdev] Optimize away sqrt in simple cases?
hi! I'm using LLVM 3.2. Does it optimize away llvm.pow(llvm.sqrt(x), 2) to `x` with any settings? I tried with llc -O3, but that didn't do it. Would be nice to write |v|² in my language ('v' being a 2D vector say and |...| and ...² being two separate infix "operators") -- when I could compare squares of lengths as well as lengths, and know that the sqrt is optimized away. Erkki -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130423/d9fa4a4e/attachmen...
2017 Mar 17
0
Support for user defined unary functions
...wdunlap tibco.com > > > > > > On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence > > <lawrence.michael at gene.com> wrote: > >> I guess this would establish a separate "namespace" of symbolic prefix > >> operators, %*% being an example in the infix case. So you could have > stuff > >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's > hard to > >> see the advantage vs. foo(x). > >> > >> Those examples you mention should probably be addressed (eventually) in > the > >&gt...
2017 Mar 17
2
Support for user defined unary functions
...17 at 3:18 PM, Michael Lawrence >> >> > <lawrence.michael at gene.com> wrote: >> >> >> I guess this would establish a separate "namespace" of symbolic >> >> >> prefix >> >> >> operators, %*% being an example in the infix case. So you could have >> >> >> stuff >> >> >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's >> >> >> hard to >> >> >> see the advantage vs. foo(x). >> >> >> >> >> >&g...
2017 Mar 17
0
Support for user defined unary functions
...; >> > On Thu, Mar 16, 2017 at 3:18 PM, Michael Lawrence > >> > <lawrence.michael at gene.com> wrote: > >> >> I guess this would establish a separate "namespace" of symbolic > prefix > >> >> operators, %*% being an example in the infix case. So you could have > >> >> stuff > >> >> like %?%, but for non-symbolic (spelled out stuff like %foo%), it's > >> >> hard to > >> >> see the advantage vs. foo(x). > >> >> > >> >> Those examples you me...
2017 Mar 16
4
Support for user defined unary functions
R has long supported user defined binary (infix) functions, defined with `%fun%`. A one line change [1] to R's grammar allows users to define unary (prefix) functions in the same manner. `%chr%` <- function(x) as.character(x) `%identical%` <- function(x, y) identical(x, y) %chr% 100 #> [1] "100" %chr...
2011 Oct 07
4
[LLVMdev] Enhancing TableGen
...(type regclass:$dst), (type (opcode (type regclass:$src1), (type addr:$src2))))]>; } } def ADD : binop<add>; def SUB : binop<add>; def MUL : binop<add>; def DIV : binop<add>; [...] Here I am treating "#" as an infix !strconcat. This makes things much easier to read than both !strconcat() and a double-# notation, IMHO. Now each binary pattern is only specified twice and even that duplication can be eliminated with a little more abstraction. Perhaps that's not worth it, however. I can live with this leve...
2011 Oct 20
3
Strange R behavior for product of two sum of integers
Dear gentlemen, Can you explain me why the following happens (any OS I think, and even on 64 bits)? > sum(1000:1205)^2 [1] 51581223225 > sum(1000:1205)*sum(1000:1205) [1] NA Warning message: In sum(1000:1205) * sum(1000:1205) : NAs produced by integer overflow Best, Pierre -- Pierre Lafaye de Micheaux Adresse courrier: D?partement de Math?matiques et Statistique Universit? de
2011 Oct 08
0
[LLVMdev] Enhancing TableGen
...:$src1), >                                                (type addr:$src2))))]>; >  } > } > > def ADD : binop<add>; > def SUB : binop<add>; > def MUL : binop<add>; > def DIV : binop<add>; > [...] > > Here I am treating "#" as an infix !strconcat.  This makes things much > easier to read than both !strconcat() and a double-# notation, IMHO. > > Now each binary pattern is only specified twice and even that > duplication can be eliminated with a little more abstraction.  Perhaps > that's not worth it, however.  I...
2017 Mar 17
0
Support for user defined unary functions
...el Lawrence > >> >> > <lawrence.michael at gene.com> wrote: > >> >> >> I guess this would establish a separate "namespace" of symbolic > >> >> >> prefix > >> >> >> operators, %*% being an example in the infix case. So you could > have > >> >> >> stuff > >> >> >> like %?%, but for non-symbolic (spelled out stuff like %foo%), > it's > >> >> >> hard to > >> >> >> see the advantage vs. foo(x). > >> >&gt...