Re: [Rd] Copyright versus Licenses

2010-02-13 Thread Simon Urbanek

On Feb 12, 2010, at 7:14 PM, Dominick Samperi wrote:

 On Tue, Jan 19, 2010 at 11:54 AM, Simon Urbanek simon.urba...@r-project.org 
 wrote:
 Copyright is the right that the author of an original work holds 
 automatically (unless someone else can claim to own his work - e.g. his 
 employer etc.) under the Berne Convention. The copyright gives only the 
 author all rights - including but not limited to the right to copy, modify, 
 distribute the work etc.  Licenses are used to give some of those rights to 
 other people under certain conditions. Hence you cannot assign yourself 
 copyright because you already have it (and if you don't then your cannot 
 assign it). Also you don't need to give the copyright to anyone else - you 
 can give certain rights to others using licenses -- such as GPL, LGPL, EUPL 
 etc. -- but you don't give copyright by those since you have far more rights 
 as the author (e.g., you can do whatever your want with the original work 
 beyond the restrictions of the license). There are cases where you may want 
 to give your copyright to someone, e.g., an organization that represents all 
 authors of a project w!
 hich makes it easier to change licenses etc., but that is a different story.
  
 Interesting, but what about the situation where a new author adds his name as 
 copyright holder without them consent of the original copyright holder,

If the software is released under GPL then no one needs anyone's consent. By 
licensing the software under GPL you give everyone the right to modify and 
redistribute the software so anyone can modify it, add their copyright notices 
and release it.


 and with only one person making the decision whether or not this change is 
 warranted: the new copyright holder?

The decision can be made by anyone because you granted everyone the right to 
modify and redistribute it by using the GPL license. This is equally true of 
any derivative works because GPL makes sure that even those must be licensed 
under the same terms.


 Doesn't this amount to giving the copyright away, or giving it away to 
 everybody?

No, you give rights (to modify and redistribute) via the license to everybody, 
but not the copyright. As a copyright holder you can do anything with your 
original code (re-license it, use commercially etc.) but anyone else can only 
do what you specified in the license (so e.g. they cannot release it under a 
different, incompatible license - let's say BSD).


 GPL is often called copyleft for a reason: it basically cancels most of the 
 rights that you would have with an ordinary copyright

No - it doesn't cancel anything - you still have all the rights. To the 
contrary - it gives some of those rights to others (everyone) under strict 
conditions (as opposed to let's say BSD which gives them with almost no 
conditions).


 so that others can freely copy your work with no requirements other than that 
 your copyright notice be retained, along with a potentially unlimited number 
 of other copyright notices attached to the same work. (For completeness, 
 there is a clause about not leaving misleading impressions about previous 
 authors, but in my opinion the only way this could be enforced is if the 
 contributions of the previous author are not altered. But this is 
 inconsistent with the broad freedoms granted by the main text of the license.)
 

Note that GPL license does not grant broad freedom - it is in fact one of the 
more restrictive open source licenses -- those restrictions are meant to force 
modifications to be contributed back to the community.


 The only infringement cases that I am aware of is where a company is sued 
 because it tried to turn GPL software into a commercial product. This is what 
 GPL was designed to do. It is not designed to protect authors (because that 
 would be an attack on software freedom and apple pie, according to true 
 believers).
 

Well, the authors need no protection in that sense since they have full rights. 
It's entirely with the authors to specify which rights they will give to 
others. You could, for example, grant everyone the license to use your software 
without any restrictions but prohibit re-distribution in modified form -- 
although that would not constitute open source software.


In practice this issue seldom arises as the whole idea of open source is 
collaborative development, i.e., it explicitly allows others to modify and 
redistribute the code. There is often at least a semi-centralized entity that 
represents a given product (be it just the software version control repository) 
and if someone likes the idea but wants to use it in a different direction s/he 
creates a fork and thus creates a kind of sibling. The idea in open source 
world is that this enriches the choices since users can use whichever of the 
two they like better, so there will be natural selection. Unmaintained or less 
useful branches will just die and the maintained ones will live on -- this 
happens very 

Re: [Rd] Darwinian software development and the library function

2010-02-13 Thread Henrik Bengtsson
Hi.

Here are some guidelines that I find useful:

- Avoid changing the arguments of generic functions provided by the
default R packages, especially the ones in base.  Just, accept those
arguments.  If there are extra arguments you don't like, you can
always add '...' to your method and they will be accepted/pass the R
CMD check.

- Using an S3 generic function that only has '...' arguments seems to
work well and makes all methods for it pass R CMD check, regardless of
what arguments you use in your methods.

- Use R.methodS3 to define your methods, i.e. use setMethodS3(print,
foo, function(x, ...) { ... }).  This will check if there is a
generic function or not, and if missing, it will be created.
R.methodsS3 was created to make your S3 life easier.

My $.02

Henrik

On Sat, Feb 13, 2010 at 7:40 AM, Charlotte Maia mai...@gmail.com wrote:
 Hi Spencer,

 Sorry, I wasn't very clear in my initial post.
 The function print.foo (myfoo, ...) won't pass R check (unless one
 overwrites print first).
 One has to write print.foo (x, ...), which in my personal opinion, can
 be problematic.

 In my oosp package, I have overwritten print (along with a few others).
 Initially, I overwrote both print and print.default.
 However now, I merely use print = function (...) base::print (...).

 Not really a generic, however it acts exactly the same (I think...).
 Plus Rd documentation still documents print.mymethod in the usual way.


 kind regards
 Charlotte


 On Sat, Feb 13, 2010 at 4:41 AM, spencerg spencer.gra...@prodsyse.com wrote:
 Hi, Charlotte:

     I'm not sure what you mean.  If you mean writing something like
 print.foo (myfoo, ...), this is relatively benign I suppose, but I avoid
 it where feasible.  On multiple occasions, I've pushed collaborators and
 even maintainers of other packages to change this or allow me to change it
 to conform to the standard;  if my memory is correct, there have been
 several violations of this standard in the fda package, which are no
 longer there because I changed them.  If a user with an object x of class
 foo writes print(x=x) or print(foo=x), I'm not sure what it would do, but
 it might not be what you want.

     My sos package masks ?.  However, I don't like it.  I generally
 consider such to be potentially user hostile, and whenever feasible, I
 prefer to avoid such code.  I did it in this case for a couple of reasons.
  First, using ? (actually ???) seems so much easier to remember than
 findFn that it justifies this transgression of standard protocol.  Second,
 one of the leading figures in the R community (Duncan Murdoch) contributed
 suggested we do this and contributed the code.

     If you change the definition of print itself, that seems to me to be a
 much bigger issue, with consequences much more difficult to predict.  If
 someone else also overwrites print making it different and incompatible
 with yours, then your code may not work or theirs may not, depending on
 which gets loaded first in the search path.  Worse, your code cannot
 possibly have been tested as thoroughly as the standard code.  If your code
 includes a subtle bug that only occurs under special circumstances, it may
 be hard for the person experiencing the problem to find, because they don't
 expect it.

     Hope this helps.
     Spencer


 Charlotte Maia wrote:

 Hi all,

 Legend has it, that polite R programmers don't overwrite, say, the
 print function.
 However, this seems quite un-Darwinian to me (especially given that I
 don't want to call all my arguments x and y).
 I might want a function print.foo (myfoo, ...).

 So I decided to be very impolite (in one of my packages) and overwrite
 a few standard generics.
 Plus, to the best of my knowledge it doesn't interfere with normal use
 (yay...).

 This brings us to the library function.
 Which by default gives a whole lot of warnings loading my package (and
 any other package that does something similar), scaring off polite R
 programmers and perhaps some mainstream R users.

 I'm starting to think that the default for library, should be
 warn.conflicts=FALSE.
 However, just reading the documentation, I noticed a reference to
 something called .conflicts.OK.
 Not sure what that does, however if it does what it sounds like, then
 it largely fixes the problem.

 The biggest issue though, is whether or not one should be impolite
 (i.e. Darwinian) and overwrite print etc in the first place...?

 I'm inclined to go in favour of overwriting the functions.
 However, it has the potential to introduce some technical problems.

 Other's opinions appreciated.


 kind regards



 --
 Spencer Graves, PE, PhD
 President and Chief Operating Officer
 Structure Inspection and Monitoring, Inc.
 751 Emerson Ct.
 San José, CA 95126
 ph:  408-655-4567




 --
 Charlotte Maia
 http://sites.google.com/site/maiagx

 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel



Re: [Rd] Copyright versus Licenses

2010-02-13 Thread Guillaume Yziquel

Simon Urbanek a écrit :

On Feb 12, 2010, at 7:14 PM, Dominick Samperi wrote:


On Tue, Jan 19, 2010 at 11:54 AM, Simon Urbanek simon.urba...@r-project.org 
wrote:

Copyright is the right that the author of an original work holds automatically 
(unless someone else can claim to own his work - e.g. his employer etc.) under 
the Berne Convention.
 
Interesting, but what about the situation where a new author adds his name as copyright holder without them consent of the original copyright holder,


If the software is released under GPL then no one needs anyone's consent. By 
licensing the software under GPL you give everyone the right to modify and 
redistribute the software so anyone can modify it, add their copyright notices 
and release it.


Looking at the backlog of events that led Dominick to try legal stunts 
around the GPL, I guess that the only free software licence that would 
satisfy his needs concerning Rcpp is the QPL. This way he retains 
control over the evolution of the source code.


By far not one of my favourite licences, but that's the licence he's 
been looking for all along.


--
 Guillaume Yziquel
http://yziquel.homelinux.org/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Copyright versus Licenses

2010-02-13 Thread Dominick Samperi
On Sat, Feb 13, 2010 at 10:00 AM, Simon Urbanek simon.urba...@r-project.org
 wrote:

 In practice this issue seldom arises as the whole idea of open source is
 collaborative development, i.e., it explicitly allows others to modify and
 redistribute the code. There is often at least a semi-centralized entity
 that represents a given product (be it just the software version control
 repository) and if someone likes the idea but wants to use it in a different
 direction s/he creates a fork and thus creates a kind of sibling. The idea
 in open source world is that this enriches the choices since users can use
 whichever of the two they like better, so there will be natural selection.
 Unmaintained or less useful branches will just die and the maintained ones
 will live on -- this happens very frequently and you can often find multiple
 branches of projects -- some work together with their siblings (e.g if the
 fork is to port it to another platform they usually merge back or contribute
 back once in a while) some don't. Clearly, the idea is that this is good for
 the community, not necessarily for the ego of the authors ;). Although your
 copyright notice will survive, your ideals won't necessarily.


Collaborative development should not be confused with Darwinian evolution.
The former recognizes the humanity of the
participants and is about sharing and cooperation, the latter is blind (like
the blindfolded deity of justice and other
contractual relationships) and views life as the evolution of a collection
of mindless robotic parasites (selfish genes).
The latter view has helped to land us in the current economic crisis, for
example.

GPL applies the Darwinian view to the propagation of software ideas, and it
can be viewed as the natural
response to the problem that software ideas are very easy to copy
(biologists call this cheap signalling).
On the other hand, I think developers are motivated by the need to be part
of a community, and the unstated
rules for membership in such communities are not in the scope of GPL. Thus I
think we can agree to agree
that we will not resolve these issues here!

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] long integer in R?

2010-02-13 Thread blue sky
On Fri, Feb 12, 2010 at 12:06 PM, Simon Urbanek
simon.urba...@r-project.org wrote:

 On Feb 12, 2010, at 12:33 , blue sky wrote:

 R-exts.pdf dosen't list many types that are supported in C++, for example,
 long. Are there storage.mode corresponds to those extra types?


 There are none - that's why they are not listed. As for long: on 32-bit
 platforms (and Win64) int and long are equivalent so you can simply use
 INTSXP. On 64-bit unix platforms (LP64) there is no way to losslessly use it
 (other than raw) but in most applications you can simply use REALSXP as it
 gives you at least 52-bits of precision which its sufficient for most
 applications.

According to ?integer,

Note that on *almost* all implementations of R the range of
representable integers is restricted to about +/-2*10^9: ‘double’s
can hold much larger integers exactly.

It uses 'almost'. I'm wondering on what platform integer is not
restricted to about +/-2*10^9 so that double's can not hold large
integers exactly?

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] long integer in R?

2010-02-13 Thread Simon Urbanek

On Feb 13, 2010, at 5:04 PM, blue sky wrote:

 On Fri, Feb 12, 2010 at 12:06 PM, Simon Urbanek
 simon.urba...@r-project.org wrote:
 
 On Feb 12, 2010, at 12:33 , blue sky wrote:
 
 R-exts.pdf dosen't list many types that are supported in C++, for example,
 long. Are there storage.mode corresponds to those extra types?
 
 
 There are none - that's why they are not listed. As for long: on 32-bit
 platforms (and Win64) int and long are equivalent so you can simply use
 INTSXP. On 64-bit unix platforms (LP64) there is no way to losslessly use it
 (other than raw) but in most applications you can simply use REALSXP as it
 gives you at least 52-bits of precision which its sufficient for most
 applications.
 
 According to ?integer,
 
 Note that on *almost* all implementations of R the range of representable 
 integers is restricted to about +/-2*10^9: ‘double’s can hold much larger 
 integers exactly.
 
 It uses 'almost'. I'm wondering on what platform integer is not restricted to 
 about +/-2*10^9 so that double's can not hold large integers exactly?
 

I'm not sure I can parse your statement including a question, so I'll rather 
address the two disjoint parts of the quote:

a) restriction of representable integers. Today's platforms use 32-bit 
integers, but on 16-bit platforms is used to be 16-bit hence the almost.

b) doubles can hold much larger integers exactly (note that there is no 
almost in this part) -- that is what I was saying above since doubles can 
store 52-bit integers without loss of precision.

I hope it helps.

Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Copyright versus Licenses

2010-02-13 Thread Dominick Samperi
On Sat, Feb 13, 2010 at 10:00 AM, Simon Urbanek simon.urba...@r-project.org
 wrote:

 No, you give rights (to modify and redistribute) via the license to
 everybody, but not the copyright. As a copyright holder you can do anything
 with your original code (re-license it, use commercially etc.) but anyone
 else can only do what you specified in the license (so e.g. they cannot
 release it under a different, incompatible license - let's say BSD).


Can only do what you specified? Consider this hypothetical scenario. A
package is taken over and all copyrights are
retained as required by GPL. Now new files are added that provide a
different implementation of basically the same ideas.
Eventually all of the original files (containing the orignial author's
copyright notice) are replaced and removed. The
original author (that is, you) is now out of the picture.

This raises the question of where copyright notices should go. It also
highlights the important legal distinction between
copyright and patent law: copyright (and copyleft) does not protect ideas
and algorithms. Only patents do this (according
to a lawyer friend).




[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] long integer in R?

2010-02-13 Thread blue sky
 a) restriction of representable integers. Today's platforms use 32-bit 
 integers, but on 16-bit platforms is used to be 16-bit hence the almost.

Just to make sure if I understand you correctly. So there are no
64-bit intergers on any platform?

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel