Incorporating other's ruby code (licensing)

i have a lib, alib, that's full of stuff i use all the time. it's got
utilities like Process::alive?(pid), thread safe logging, etc, etc. i have
inlined a few small modules i find partucularly useful such as the bsearch
module written by satoru takabayashi which allows very neat things like

   irb(main):009:0> %w( a b d ).bsearch_lower_boundary {|x| x <=> "c"}
   => 2

   irb(main):010:0> %w( a b b c d f g ).bsearch_lower_boundary {|x| x <=> "e"}
   => 5

the liscense for this bit of work is

   # You can redistribute it and/or modify it under the terms of
   # the Ruby's licence.

and i've inlined this in the code. i also have a tweaked version of jan
molic's OrderedHash and motoyuki kasahara's Find2 module. in all cases i've
modified the code in small ways and kept the original license intact.
therefore my alib library looks something like:

   module ALib
     # my own stuff
     module Util
     end

     # my own stuff
     module Logging
     end

     # my own stuff
     module SimpleMain
     end

     # license for Find2
     module Find2
     end

     # license for Bsearch
     module Bsearch
     end

     # license for OrderedHash
     class OrderedHash
     end

     # my own stuff
     class OrderedAutoHash < OrderedHash
     end

     # etc, etc
   end

in any case i'm using my lib tons and generally putting anything i write more
than once but which does not belong elsewhere, which is just too simple/small
to be it's own lib, or which is neat bit of code that i don't want to require
people to have installed and am increasingly relying on it in my projects.
the problem is that i now must distribute it in order to release anything that
depends on it...

so, do people think inlining the original licenses in their entirty sufficient
in cases, like Bsearch, where i've subsumed another peice of work? at what
point of modification does one stop considering a peice of work 'derived' and
simply consider it a re-implementation and therefore 'new' work?

any pointers appreciated. btw. my goal here is simply to share the code
while respecting the original authors intentions - i could care less what
people do with my code (although i release under ruby's license) so that's
not the issue.

cheers.

-a

···

--

email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
renunciation is not getting rid of the things of this world, but accepting
that they pass away. --aitken roshi

===============================================================================

<snip>

so, do people think inlining the original licenses in their
entirty sufficient in cases, like Bsearch, where i've
subsumed another peice of work? at what point of
modification does one stop considering a peice of work
'derived' and simply consider it a re-implementation and
therefore 'new' work?

any pointers appreciated. btw. my goal here is simply to
share the code while respecting the original authors
intentions - i could care less what people do with my code
(although i release under ruby's license) so that's not the issue.

Determining if something is a derivative or not is really the deciding
factor here. I believe that copyright effectively states that as long as a
layperson can identify the work as being derived from the original, than it
still is derivative. That language is somewhat vague, but points out the
fact that it's not experts in the field in question that we use to judge if
a work is derivative or not, but "the common person" (which becomes a bit
difficult to define when we're talking about code and not a painting... But
that's another topic altogether).

Depending on where you want to put your focus - the license or the code -
you could try to take the code that you're using from elsewhere and put it
all in it's own lib with extensive comments on it's license and where you
obtained it. That way you can keep your own code separate and possibly
licensed how you'd like if you so desire.

Hope that's useful.

-M

i have a lib, alib, that's full of stuff i use all the time. it's got
utilities like Process::alive?(pid), thread safe logging, etc, etc. i have
inlined a few small modules i find partucularly useful such as the bsearch
module written by satoru takabayashi which allows very neat things like

  irb(main):009:0> %w( a b d ).bsearch_lower_boundary {|x| x <=> "c"}
  => 2

  irb(main):010:0> %w( a b b c d f g ).bsearch_lower_boundary {|x| x <=> "e"}
  => 5

the liscense for this bit of work is

  # You can redistribute it and/or modify it under the terms of
  # the Ruby's licence.

and i've inlined this in the code. i also have a tweaked version of jan
molic's OrderedHash and motoyuki kasahara's Find2 module. in all cases i've
modified the code in small ways and kept the original license intact.
therefore my alib library looks something like:

  module ALib
    # my own stuff
    module Util
    end

    # my own stuff
    module Logging
    end

    # my own stuff
    module SimpleMain
    end

    # license for Find2
    module Find2
    end

    # license for Bsearch
    module Bsearch
    end

    # license for OrderedHash
    class OrderedHash
    end

    # my own stuff
    class OrderedAutoHash < OrderedHash
    end

    # etc, etc
  end

in any case i'm using my lib tons and generally putting anything i write more
than once but which does not belong elsewhere, which is just too simple/small
to be it's own lib, or which is neat bit of code that i don't want to require
people to have installed and am increasingly relying on it in my projects.
the problem is that i now must distribute it in order to release anything that
depends on it...

so, do people think inlining the original licenses in their entirty sufficient
in cases, like Bsearch, where i've subsumed another peice of work? at what
point of modification does one stop considering a peice of work 'derived' and
simply consider it a re-implementation and therefore 'new' work?

Legally?

Never. Never ever ever never. You can rewrite the whole thing, but as
long as at some point you were using someone else's code, it is still
a derivative. Note that this does not apply if you rewrite it *from
scratch*, just if you gradually rewrite it, and even from scratch
there will be that whole 'clean room' debate.

any pointers appreciated. btw. my goal here is simply to share the code
while respecting the original authors intentions - i could care less what
people do with my code (although i release under ruby's license) so that's
not the issue.

You should keep the licences; if they are too verbose or there are too
many, simply extract them into a file, CONTRIBUTORS or LICENCES or some
similar name and put a note on top of your library to read that file.
Then remember to put a little note in the code, too:

# Original code by Fujan Barmovic
class FooBarClass
...

Or then just keep the code in their own files.

cheers.

-a

E

···

Le 18/5/2005, "Ara.T.Howard" <Ara.T.Howard@noaa.gov> a écrit:

--
template<typename duck>
void quack(duck& d) { d.quack(); }