Le 18/5/2005, "Ara.T.Howard" <Ara.T.Howard / noaa.gov> a ?crit:
>
>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

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