I just found this thread, sorry for weighing in late.

Note: this is a light-hearted response to a topic which I consider
very grave.  It's been claimed that the script

from sage import Integer
print Integer(2)+Integer(2)

must be GPL'd.   I claim that the above is a sage-ultralight script.
I've attached an independent implementation of sage-ultralight that
has been released under the SACL (Smart Guy Common License).
Unfortunately, the SACL is also a virulent license, so sage-ultralight
is GPL-incompatible. Therefore, nobody can redistribute the above code
without fear of retribution from me, or the FSF. (evil laughter?)

On a more serious note, I do not believe that a Sage script is
automatically GPL'd -- and I believe that the FSF agrees.  From the
FAQ

    "When the interpreter just interprets a language, the answer is no.
     The interpreted program, to the interpreter, is just data; a free
     software license like the GPL, based on copyright law, cannot limit
     what data you use the interpreter on. You can run it on any data
     (interpreted program), any way you like, and there are no
     requirements about licensing that data to anyone."

I believe that Sage constitutes an interpreter in the case of the
above script.  Furthermore, I claim that the CLI (Ipython), the
notebook, and the interpreter are no different in this regard.  Users
of Sage are free to distribute their input to Sage, and the output
that they receive from Sage in any manner that they please, as long as
their input, or the output do not contain derived work*.

    "However, when the interpreter is extended to provide “bindings”
     to other facilities (often, but not necessarily, libraries), the
     interpreted program is effectively linked to the facilities it uses
     through these bindings. So if these facilities are released under
     the GPL, the interpreted program that uses them must be
     released in a GPL-compatible way"

The key portion of this is that *the interpreted program* must be
released in a GPL-compatible way.  A Sage script is nothing but input
-- it does not link to Sage, it does not depend on Sage to run, as I
demonstrated above.  If a person downloads a Sage script, for the most
part, they'll have to install a copy of Sage -- that script can have
whatever license its author wants.  As demonstrated above, one can
write Python code which emulates Sage to a degree that any particular
script could be run in Python without an install of Sage. (note, one
may freely use the preprocessor to convert Sage code into Python code,
and this should not restrict the user's freedom)

Compare this to Cython code -- it is possible to release a Cython
script as source under the SACL, which dynamically links to GPL'd Sage
code.  That source is freely distributable, but binary releases may
not be made under the terms of either license.

YMMV, IANAL, IANAD, etc.

* If you make a derived class, for example, which contains code from
the original class, that's a no-no -- or similarly, if your session
involves introspection.

Franco: thanks for sharing Piet -- that's awesome.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

# Copyright (c) 2009, Tom Boothby
# This file is released under Smart Guy Contrary License (SACL):
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above copyright
#       notice, this list of conditions and the following disclaimer in the
#       documentation and/or other materials provided with the distribution.
#     * Neither the name of the <organization> nor the
#       names of its contributors may be used to endorse or promote products
#       derived from this software without specific prior written permission.
#     * Derivative works must be released under the SACL. 
#
# THIS SOFTWARE IS PROVIDED BY <copyright holder> ''AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

class Integer:
    def __init__(self,value):
        self.value=value
    def __add__(self,other):
        return Integer(self.value+other.value)


Reply via email to