Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-04-14 Thread Pages, Herve
:lawrence.mich...@gene.com>>>, >> "bioc-devel@r-project.org<mailto:bioc-devel@r-project.org><mailto:bioc-devel@r-project.org<mailto:bioc-devel@r-project.org>>" >> >> mailto:bioc-devel@r-project.org><mailto:bioc-devel@r-project.org<ma

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-04-09 Thread Michael Lawrence via Bioc-devel
iology >> >> Office: SRB 4.206 Ph: 585.275.5983 >> >> >> >> Message: 1 >> >> Date: Sun, 10 Feb 2019 13:36:43 + >> >> From: Aaron Lun > infinite.monkeys.with.keyboa...@gmail.com>> >> >> To: "Pages, Herve" mailto:hpa...@fre

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-03-28 Thread Michael Lawrence via Bioc-devel
; mailto:hpa...@fredhutch.org>>, > Martin Maechler > >> mailto:maech...@stat.math.ethz.ch>> > >> Cc: Michael Lawrence lawrence.mich...@gene.com>>, > >> "bioc-devel@r-project.org<mailto:bioc-devel@r-project.org>" < > bioc

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-03-28 Thread Pages, Herve
>> mailto:infinite.monkeys.with.keyboa...@gmail.com>> >> To: "Pages, Herve" mailto:hpa...@fredhutch.org>>, >> Martin Maechler >> mailto:maech...@stat.math.ethz.ch>> >> Cc: Michael Lawrence >> mailto:lawrence.mich...@gene.com&

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-02-11 Thread Michael Lawrence
ence > mailto:lawrence.mich...@gene.com>>, > "bioc-devel@r-project.org<mailto:bioc-devel@r-project.org>" > mailto:bioc-devel@r-project.org>> > Subject: Re: [Bioc-devel] Pushing towards a better home for matrix > generics > Message-ID: > <15498

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-02-11 Thread McDavid, Andrew
t;, "bioc-devel@r-project.org<mailto:bioc-devel@r-project.org>" mailto:bioc-devel@r-project.org>> Subject: Re: [Bioc-devel] Pushing towards a better home for matrix generics Message-ID: <1549805803.3935.11.ca...@gmail.com<mailto:1549805803.3935.11.ca...@gmail.com>>

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-02-10 Thread Aaron Lun
Returning to this topic:  It's good to hear some of the rationale behind the current state of affairs. That said, the set-up we have now is quite difficult to work with; as mentioned before, I've had to hack around it like: # Example from "BiocSingular", https://github.com/LTLA/BiocSingular .safe

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Michael Lawrence via Bioc-devel
Along like the lines of Martin Morgan's comment, simpler signatures mean simpler software. We can typically limit to single dispatch, and it indicates how the generic is _meant_ to be used, separating the data arguments from the modulating accessory parameters. I'm not sure how valuable dispatching

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Martin Morgan
Multiple dispatch also makes it difficult to reason about method selection, at least for me. > setGeneric(f, function(a, b, c) standardGeneric("f")) [1] "f" > setMethod(f, c(b="missing"), function(a, b, c) {}) > setMethod(f, c(c="missing"), function(a, b, c) {}) > f() Note: method with signature

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Pages, Herve
Yes the help system could enforce the full signature for the aliases but that means the end user then will have to always do ?`colSums,SomeClass,ANY,ANY-method`, which feels unnecessary complicated and confusing in the case of a generic where dispatching on the 2nd and 3rd arguments hardly make

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Martin Maechler
> Pages, Herve > on Tue, 29 Jan 2019 16:44:47 + writes: > Hi Martin. Speed is not the concern: I just did some > quick benchmarking and didn't observe any significant > difference in method dispatch performance after doing > setGeneric("toto", function(x, a=0, b=0

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Pages, Herve
Hi Martin. Speed is not the concern: I just did some quick benchmarking and didn't observe any significant difference in method dispatch performance after doing setGeneric("toto", function(x, a=0, b=0, c=0) standardGeneric("toto")) vs doing setGeneric("toto", signature="x", function(x, a=0, b=

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Martin Maechler
> Michael Lawrence > on Mon, 28 Jan 2019 20:47:58 -0800 writes: > That will have some consequences; for example, > documentation aliases will need to change. Not sure how > many packages will need to be fixed outside of Matrix, but > it's not an isolated change. Martin

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-29 Thread Martin Maechler
> Michael Lawrence > on Mon, 28 Jan 2019 19:00:59 -0800 writes: > I agree (2) is a good compromise. CC'ing Martin for his > perspective. Michael Hmm there's quite a bit more it, really: I'd not be unwilling to do so myself, but in the long history of Matrix development

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-28 Thread Michael Lawrence via Bioc-devel
That will have some consequences; for example, documentation aliases will need to change. Not sure how many packages will need to be fixed outside of Matrix, but it's not an isolated change. Martin might comment on the rationale for the full signature, since he defined those generics. On Mon, Jan

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-28 Thread Pages, Herve
Actually there is a 4th solution which is to modify the definition of the implicit generics in the methods package (file makeBasicFunsList.R) to make them dispatch on their 1st arg only. Should be easy. Then no package will need to use a setGeneric statement anymore. Everybody will automaticall

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-28 Thread Michael Lawrence via Bioc-devel
I agree (2) is a good compromise. CC'ing Martin for his perspective. Michael On Mon, Jan 28, 2019 at 6:58 PM Pages, Herve wrote: > > Hi Aaron, > > The 4 matrix summarization generics currently defined in BiocGenerics > are defined as followed: > >setGeneric("rowSums", signature="x") >set

Re: [Bioc-devel] Pushing towards a better home for matrix generics

2019-01-28 Thread Pages, Herve
Hi Aaron, The 4 matrix summarization generics currently defined in BiocGenerics are defined as followed:   setGeneric("rowSums", signature="x")   setGeneric("colSums", signature="x")   setGeneric("rowMeans", signature="x")   setGeneric("colMeans", signature="x") The only reason for having t

[Bioc-devel] Pushing towards a better home for matrix generics

2019-01-27 Thread Aaron Lun
This is a resurrection of some old threads: https://stat.ethz.ch/pipermail/bioc-devel/2017-November/012273.html https://github.com/Bioconductor/MatrixGenerics/issues For those who are unfamiliar with this, the basic issue is that various Matrix and BiocGenerics functions mask each other. This is