Proper attribution on code reuse

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Proper attribution on code reuse

Veit Heller
Hello everyone,

I am on the core team of Carp, another programming language—don’t worry,
this is not a plug. Instead, what I want to ask y’all about today is
whether I can use a piece of your code and how to best attribute it.

Recently, we’ve worked on adding regular expressions to Carp. I looked
at a bunch of C libraries, and in the end settled for Lua’s patterns
(from lstrlib.c) for their simplicity and ease of integration. Good work
on that one, guys!

I had to change a bit of code, but it is largely unscathed (it lives in
this [PR](https://github.com/carp-lang/Carp/pull/192), for the nosy). I
would like to use this code, and give you proper attribution for it. To
get that one out of the way: our licenses (MIT vs. Apache-2) should be
largely compatible, but IANAL.

So, long story short: where would you like your names, and which names?
I thought about adding the header of lstrlib.c, but since I only used a
part of it, this might be a little misleading.

Thank you for providing this, I really enjoyed reading it and tinkering
with it!

Cheers,
Veit

Reply | Threaded
Open this post in threaded view
|

Re: Proper attribution on code reuse

Luiz Henrique de Figueiredo
> I would like to use this code, and give you proper attribution for it. To
> get that one out of the way: our licenses (MIT vs. Apache-2) should be
> largely compatible, but IANAL.
>
> So, long story short: where would you like your names, and which names?
> I thought about adding the header of lstrlib.c, but since I only used a
> part of it, this might be a little misleading.

You need to add to your sources the full copyright notice of Lua,
which is at the end of lua.h
<http://www.lua.org/source/5.3/lua.h.html> and also at
http://www.lua.org/license.html .

In the License section of your README, mention that "Parts of the code
are Copyright (C) 1994-2017 Lua.org, PUC-Rio under the terms of the
MIT license", with a link as you have done for the Apache License. You
can be more specific about which parts, if you prefer.

In your LICENSE file, you need to include the full copyright notice of
Lua, perhaps prefaced by something like "The pattern matching code
comes from Lua and is licensed under the terms of the MIT license
below".

Finally, for the benefit of those reading your code, I suggest that
you write like this in your source code:

/*
** {======================================================
** PATTERN MATCHING adapted from lstrlib.c of Lua 5.3.4
** Copyright (C) 1994-2017 Lua.org, PUC-Rio; see LICENSE
** =======================================================
*/

Thanks for your interest in Lua. Good luck with Carp.

Reply | Threaded
Open this post in threaded view
|

Re: Proper attribution on code reuse

Russell Haley
Sorry for the top post,

When is it appropriate to update the date of the Lua copyright? You've indicated a 2017 copyright in you examples. Thinking I was being smart, I used 2018 in my last WinLua release. 

Thanks lhf,

Russell

Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.
  Original Message  
From: Luiz Henrique de Figueiredo
Sent: Friday, March 2, 2018 3:44 AM
To: Lua mailing list
Reply To: Lua mailing list
Subject: Re: Proper attribution on code reuse

> I would like to use this code, and give you proper attribution for it. To
> get that one out of the way: our licenses (MIT vs. Apache-2) should be
> largely compatible, but IANAL.
>
> So, long story short: where would you like your names, and which names?
> I thought about adding the header of lstrlib.c, but since I only used a
> part of it, this might be a little misleading.

You need to add to your sources the full copyright notice of Lua,
which is at the end of lua.h
<http://www.lua.org/source/5.3/lua.h.html> and also at
http://www.lua.org/license.html .

In the License section of your README, mention that "Parts of the code
are Copyright (C) 1994-2017 Lua.org, PUC-Rio under the terms of the
MIT license", with a link as you have done for the Apache License. You
can be more specific about which parts, if you prefer.

In your LICENSE file, you need to include the full copyright notice of
Lua, perhaps prefaced by something like "The pattern matching code
comes from Lua and is licensed under the terms of the MIT license
below".

Finally, for the benefit of those reading your code, I suggest that
you write like this in your source code:

/*
** {======================================================
** PATTERN MATCHING adapted from lstrlib.c of Lua 5.3.4
** Copyright (C) 1994-2017 Lua.org, PUC-Rio; see LICENSE
** =======================================================
*/

Thanks for your interest in Lua. Good luck with Carp.


Reply | Threaded
Open this post in threaded view
|

Re: Proper attribution on code reuse

Charles Heywood
IANAL disclosure.

I believe that if you're using code written in 2017, you should attribute it with the copyright updated to 2017. If new Lua code is released in 2018, the copyright is updated to 2018, and you pull in the new changes, you should update your copyright to be 2018.

On Fri, Mar 2, 2018 at 9:14 AM Russell Haley <[hidden email]> wrote:
Sorry for the top post,

When is it appropriate to update the date of the Lua copyright? You've indicated a 2017 copyright in you examples. Thinking I was being smart, I used 2018 in my last WinLua release. 

Thanks lhf,

Russell

Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.
  Original Message  
From: Luiz Henrique de Figueiredo
Sent: Friday, March 2, 2018 3:44 AM
To: Lua mailing list
Reply To: Lua mailing list
Subject: Re: Proper attribution on code reuse

> I would like to use this code, and give you proper attribution for it. To
> get that one out of the way: our licenses (MIT vs. Apache-2) should be
> largely compatible, but IANAL.
>
> So, long story short: where would you like your names, and which names?
> I thought about adding the header of lstrlib.c, but since I only used a
> part of it, this might be a little misleading.

You need to add to your sources the full copyright notice of Lua,
which is at the end of lua.h
<http://www.lua.org/source/5.3/lua.h.html> and also at
http://www.lua.org/license.html .

In the License section of your README, mention that "Parts of the code
are Copyright (C) 1994-2017 Lua.org, PUC-Rio under the terms of the
MIT license", with a link as you have done for the Apache License. You
can be more specific about which parts, if you prefer.

In your LICENSE file, you need to include the full copyright notice of
Lua, perhaps prefaced by something like "The pattern matching code
comes from Lua and is licensed under the terms of the MIT license
below".

Finally, for the benefit of those reading your code, I suggest that
you write like this in your source code:

/*
** {======================================================
** PATTERN MATCHING adapted from lstrlib.c of Lua 5.3.4
** Copyright (C) 1994-2017 Lua.org, PUC-Rio; see LICENSE
** =======================================================
*/

Thanks for your interest in Lua. Good luck with Carp.


--
--
Ryan | Charles <[hidden email]>
Software Developer / System Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Proper attribution on code reuse

Luiz Henrique de Figueiredo
> I believe that if you're using code written in 2017, you should attribute it
> with the copyright updated to 2017. If new Lua code is released in 2018, the
> copyright is updated to 2018, and you pull in the new changes, you should
> update your copyright to be 2018.

Exactly.

Reply | Threaded
Open this post in threaded view
|

Re: Proper attribution on code reuse

Russell Haley
On Fri, Mar 2, 2018 at 7:23 AM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
>> I believe that if you're using code written in 2017, you should attribute it
>> with the copyright updated to 2017. If new Lua code is released in 2018, the
>> copyright is updated to 2018, and you pull in the new changes, you should
>> update your copyright to be 2018.
>
> Exactly.
>
Thanks again Charles, lhf.

Russ