Patch: Build UNDER Slopes

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

How?

Cool :)
112
96%
Crap :)
5
4%
 
Total votes: 117

Archonix
Chief Executive
Chief Executive
Posts: 733
Joined: 01 May 2003 17:29
Location: Manchester, UK
Contact:

Post by Archonix »

Oh lovely.

Without commenting on the legal status of OTTD or its heritage, I think I should add this:

A patch applied to a GPL product is a derivative work of that product. Ask the GNU foundation and the FSF, they'll both tell you that. According to the GPL, a derivative work based on GPL code must also be released under that license if it is distributed to third parties. The individual compnents written by the patch creator can be licensed under any license the writer likes, but if it significantly reliant on existing GPL code, if it cannot function without GPL code, then the linking clause kicks in.

Now a patch, as we all should know, is not the source. Since these changes are actually modifications to GPL code and not a seperate library of code, the patch itself has to be under the GPL in order to be distributed, because that patch actually represents a complete work of code, including the author's code with the rest of the GPL-protected code. It is distribution of GPL code. The fact that it is a patch makes no difference; it's a patch on GPL code and has to abide by the license.

Those are the terms of the license and the legal stance.

The moral stance is that the writer has asked people not to touch his code anymore, and generally it's a good idea to respect that out of simple courtesy. He can't enforce that request because the legal position is quite clear, but he can ask nicely.
Brignell’s law of consensus: At times of high scientific controversy, the consensus is always wrong.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

Ev wrote:As the ignorance may not dictate other people what to do, this patch "will remain out of trunk" in any form.
Don't modify or include it in ottd, remove copies.
I had runned into developer's idiocity and ignorance so much times that it leave no desire to code and play ottd.
Fare you well.
very bad move, yours

devs want to keep the code much readable and standardized as possible, if you don't want to follow their rules do something else, but don't insult the devs
i made about 20 patches, but only some patches were included in trunk and AFTER A FULL REWRITE by me with the help of the devs, and some were almost all rewritten by the devs (like the adjacent stations), not because my patches didn't work, but mainly because the code style
i'm not a great coder, i have to sweat seven shirts to make a patch, also if is little, think about the big ones, and when i can get the attention of the devs i'm enough happy.. and if it can be applied to trunk i'm more happy

you made an interesting work, but your will to get it in trunk as it is (or was) without standardizing the code and removing the macros was clearly a bad thing
User avatar
mamuf
Engineer
Engineer
Posts: 33
Joined: 30 Mar 2007 21:31
Location: Prague, CZ

Post by mamuf »

Good speech, Wolf01.

I think someone who wants to do the dirty work with this patch or wants to work on a new implementation should try to talk to Ev and find out if he permits us to use his code. Or maybe convince him to not throw his work away and co-work with him to clean it up.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Archonix wrote:but he can ask nicely.
[emphasis mine]

At least one interpretation of "in any form" includes "any patch that attempts to duplicate the functionality of this patch". Which is, I'm sure, not going to be obeyed.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

@ DaleStan: An interesting point. Although I'm not interested in engaging in the quasi-legal discussion herein underway, I think it is important to look at the logical conclusion your statement would lead to -- Defensive coding. What do I mean by this? Anyone with a grudge against OTTD (not going to name names here...) could simply "submit" a tidbit of code for a concept they DON'T want to see in OTTD and then pull the "I'm going to take my marbles and go home..." approach and storm out of the forums simply to defensively block the idea from ever reaching the game.

Considering the underlying intent of OpenSource projects, this result is a bit difficult to accept as plausible. Note that I'm not saying that you're wrong - or that any of the aforementioned points re: legality of using his code are right - simply that an interpretation like that would lead to a rather ugly situation.

Requiring users wishing to post code here or on flyspray, etc. to acquiesce to a standard waiver (to resolve any GPL-coverage questions) would reduce these types of discussions to a great extent...
Many thanks to those who make OTTD and TTDP possible.
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Note that it was not his new idea, I've understood ttdpatch has this functionality.... plus he didn't get a patent for it. :)
Ev
Engineer
Engineer
Posts: 21
Joined: 19 Jun 2007 18:59

Post by Ev »

Use patch in any way except including in original/modified form into official ottd. That was all that i wanted. Thank you. Good bye.
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

Ev wrote:Use patch in any way except including in original/modified form into official ottd. That was all that i wanted. Thank you. Good bye.
I'm sorry, but you are not getting it, It is GPL.
Thanks for making it anyway, I really like it :)

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

I made a version without macros.
It is a bit hackish and it really needs more work, but this is what I could do today and I don't know if I'm going to have time to finish it this side of my vacation.
If anyone wants to continue my work then please go ahead :)

P.S. I am releasing it under GPL of course :)
Attachments
autoslopebeta1.diff
(31.31 KiB) Downloaded 159 times

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

Odd that somebody would be so wrapped up about a patch.

In any case, always read the license. And if you're releasing code that patches open source software, it's safe to assume that the code is for all practical purposes public and can be used in any open source project - and can never be taken back. Open source people generally do not like the idea of strings attached to their code.

From Ev's last post (he deleted the other posts, and I never got a chance to read them), it appears there was a style issue with his code.

Yeah, I never thought the devs on this project were entirely logical, either. But regardless, I still enjoy the game and I still enjoy coding. I'm willing to put up with a few bumps in the road to patch it, even if it never gets into the trunk.

And oh, yeah, shameless plug: I've got some great plans for the future of my path, and if real life doesn't bog me down, the future of airports in OpenTTD is going to be very bright :). I'm already working on what was for a long time a weakness of my patch: It didn't make airports any more efficient. The next release of my patch should improve the efficiency of airports greatly :).
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

CobraA1 wrote:From Ev's last post (he deleted the other posts, and I never got a chance to read them), it appears there was a style issue with his code.
There was. It contained hordes of multi-line macros, most of which should have been inline functions instead.

The use of do {...} while(0); also strikes me as somewhat ... unusual. Especially since they are nested, which makes the breaks glorified gotos.

A few simple changes would have fixed it, though.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
PandaMojo
Engineer
Engineer
Posts: 21
Joined: 04 May 2006 04:42

Post by PandaMojo »

Shunning the collaboration side of Open source projects like OpenTTD, and the nuking of both post history and original sources? A shame :cry:
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

DaleStan wrote:
CobraA1 wrote:From Ev's last post (he deleted the other posts, and I never got a chance to read them), it appears there was a style issue with his code.
There was. It contained hordes of multi-line macros, most of which should have been inline functions instead.

The use of do {...} while(0); also strikes me as somewhat ... unusual. Especially since they are nested, which makes the breaks glorified gotos.

A few simple changes would have fixed it, though.
do { ... } while (0); can actually be a very valid and elegant way to code, it just looks ugly.

But I can understand why it wouldn't be accepted, I wouldn't use it either, unless absolutely necessary (which it hardly ever is)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

The only valid reason I've seen for that is to make multi-line macros behave as if they were a single statement, only without the trailing semicolon.

If you're going to use it to anchor continue and break statements, just use gotos. At least that way you have half a chance of giving the label a meaningful name.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

Shunning the collaboration side of Open source projects like OpenTTD, and the nuking of both post history and original sources? A shame
Agreed.

Seriously, when working with a group you can't realistically expect everybody to agree. Sure, you can discuss something, but don't take disagreement personally. I seriously doubt the devs have anything against Ev personally, they just want to maintain a consistent coding style.

In the end, somebody has to make the decision - and in the case of OpenTTD, the people who maintain the trunk decide what goes into it, and what style the code uses.

If you disagree, you do have choices, due to the open source nature of the project:

-You can maintain a patch, like everybody else does. AFAIK, the devs have never prevented anybody from creating and maintaining patches.

-You can branch the entire source. This is a lot more work, but entirely possible.

Seriously, though - there's no reason to take it personally. In the end, a decision has to be made, and not everybody is going to agree.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Archonix wrote:A patch applied to a GPL product is a derivative work of that product.
This is a sweeping statement, and misleading. The patch contained non-GPL code, and at best that makes it not legal for distribution. It certainly doesn't give us any claim to it as GPL code. It isn't ours.
...the patch itself has to be under the GPL in order to be distributed,
No. It can be one of three things:
  1. GPL
  2. Dual licensed, with all code available under the other license
  3. Not lawfully distributed
So, there you go. You claim 1. My money's on 3.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

Brianetta wrote:
Archonix wrote:A patch applied to a GPL product is a derivative work of that product.
This is a sweeping statement, and misleading. The patch contained non-GPL code, and at best that makes it not legal for distribution. It certainly doesn't give us any claim to it as GPL code. It isn't ours.
...the patch itself has to be under the GPL in order to be distributed,
No. It can be one of three things:
  1. GPL
  2. Dual licensed, with all code available under the other license
  3. Not lawfully distributed
So, there you go. You claim 1. My money's on 3.
GPL part 2b
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
If you look at the patch provided then you will see that it contains the following:
Original work by Ev.
OTTD code modified by Ev.
Original OTTD code.

On this basis I conclude that the patch must be GPL.
I choose to treat it as GPL and if Ev has a problem with that and drags me to court, he will have to prove that his work isn't GPL to start with.
Although IANAL.

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

kaan wrote:On this basis I conclude that the patch must be GPL.
I choose to treat it as GPL and if Ev has a problem with that and drags me to court, he will have to prove that his work isn't GPL to start with.
Although IANAL.
No, I agree with Brianetta. There's a difference between "Ev was legally obliged to release his patch under the GPL" and "Ev did release his patch under the GPL".

That said, Ev did release code for public perusal, and it's not as if his patch was an original idea anyway, since it basically replicates an existing feature in TTDP. So, I suggest that there's no problem with kaan's or anyone else's autoslope patch being included in OTTD.
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

PikkaBird wrote:No, I agree with Brianetta. There's a difference between "Ev was legally obliged to release his patch under the GPL" and "Ev did release his patch under the GPL".
That is true.
However he never claimed that it wasn't GPL even after this discussion started.
PikkaBird wrote:That said, Ev did release code for public perusal, and it's not as if his patch was an original idea anyway, since it basically replicates an existing feature in TTDP. So, I suggest that there's no problem with kaan's or anyone else's autoslope patch being included in OTTD.
So we agree that the real life difference of your first statement is practically zero :)

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Okay, this thread is now actually useless...

Ev has requested we do not use his patch. Being decent people, we should honour that, whatever the license may or may not be.
He's like, some kind of OpenTTD developer.
Locked

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests