new extension generator for C++

  • Thread starter Rouslan Korneychuk
  • Start date
R

Rouslan Korneychuk

Hi, I'm new here. I'm working on a program that exposes C++ declarations
to Python and I was wondering if there is any interest in it.

It's a hobby project. I was originally using Boost.Python on another
project but found a couple of things I didn't like. Eg: you can't really
have private constructors. If you want a Python object created, you
either have to expose the constructor in Python, or create an instance
of the object somewhere else in memory, and have it either copied to the
PyObject or have the PyObject hold a reference to it. I was working on a
rudimentary 3D game engine that was a Python extension. It was important
to avoid copying potentially huge amounts of data, but to have almost
every PyObject just be a pointer to another object (and the object
already is just a few or even one pointer) seemed like an pointless
compromise, considering that I was writing code that was specifically
designed to be a Python extension (There was also another issue I came
across but don't remember now).

So I looked for other solutions and noticed that Py++ (which simply
generates Boost.Python code for you) was based on a seperate program
called GCCXML. I figured I could use GCCXML and generate code however I
wanted. So I did.

My program generates human-readable code (it even uses proper
indentation). The program still has a lot of work to be done on it, but
it can already generate working Python extensions.

It takes an input file like this:
<?xml version="1.0"?>
<module name="testmodule" include="main.h">
<doc>module doc string</doc>

<class name="AClass" type="MyClass">
<doc>class doc string</doc>
<init/>
<member cmember="value"/>
<def func="greet"/>
<propery get="getX" set="setX"/>
</class>
</module>

You can probably figure out what the resulting code does. The goal is to
generate code that is as close to hand-written code as possible. It even
forgoes using PyArg_ParseTupleAndKeywords and has the argument checks
hard-wired. It also generates a header file that contains a PyObject
implementation of MyClass called obj_AClass, with every constructor
fowarded and with the new and delete operators overloaded to play nice
with Python's memory handler:
....
extern PyTypeObject obj_AClassType;

struct obj_AClass {
PyObject_HEAD
MyClass base;
bool initialized;

void *operator new(size_t s) {
void *ptr = PyMem_Malloc(s);
if(!ptr) throw std::bad_alloc();
return ptr;
}

void operator delete(void *ptr) {
PyMem_Free(ptr);
}

obj_AClass(MyClass const & _0) : base(_0) {
PyObject_Init(reinterpret_cast<PyObject*>(this),&obj_AClassType);
initialized = true;
}

obj_AClass(unsigned int _0) : base(_0) {
PyObject_Init(reinterpret_cast<PyObject*>(this),&obj_AClassType);
initialized = true;
}

};
....

If you want to expose one overload of a constructor or function but not
the others, you can add overload="list,of,args" to <init/> or <def/>.
Default values for arguments are handled automatically. When handling
overloaded functions, it checks the types of the arguments to pick the
best overload, taking into consideration polymorphism and the fact that
basic types like ints can be converted from one-another. It will
automatically detect if two overloads match to the same set of Python
arguments (eg: void func(float) vs void func(double)). The only issue is
it will not use keyword arguments for overloaded functions (I don't know
if that can even be done reliably *and* efficiently. I would need to
give it more thought).

If there is enough interest I can put this project up on SourceForge or
Google Code.
 
S

Stefan Behnel

Rouslan Korneychuk, 03.05.2010 22:44:
So I looked for other solutions and noticed that Py++ (which simply
generates Boost.Python code for you) was based on a seperate program
called GCCXML. I figured I could use GCCXML and generate code however I
wanted. So I did.

My program generates human-readable code (it even uses proper
indentation). The program still has a lot of work to be done on it, but
it can already generate working Python extensions.

Last I heard, that was basically what PyBindGen does (and probably some
other existing binding generators). You should take a look at them before
investing too much time into a duplicated effort.

Also, if you're interested in performance, you should take a look at
Cython, which is an optimising compiler for (basically) Python code that
can talk to C, C++ and Fortran code. It's been used a lot for writing
performance critical library wrappers.

Stefan
 
S

Stefan Behnel

Rouslan Korneychuk, 03.05.2010 22:44:
The only issue is
it will not use keyword arguments for overloaded functions (I don't know
if that can even be done reliably *and* efficiently. I would need to
give it more thought).

You should look at the argument unpacking code that Cython generates. It
has been subject to serious benchmarking and optimisations.

Stefan
 
S

Samuel Williams

Dear Rouslan,

It looks interesting. I say go for it. You will learn something and might make some improvements on existing ideas.

I recommend putting the code on www.github.com

Kind regards,
Samuel
 
R

Rouslan Korneychuk

Dear Rouslan,

It looks interesting. I say go for it. You will learn something and might make some improvements on existing ideas.

I recommend putting the code on www.github.com

Kind regards,
Samuel
Thanks for the suggestion. I think I'll do just that. The "social"
aspect sounds interesting, since up until now, this project has been a
solitary exercise.


> Last I heard, that was basically what PyBindGen does (and probably some
> other existing binding generators). You should take a look at them
> before investing too much time into a duplicated effort.
>
> Also, if you're interested in performance, you should take a look at
> Cython, which is an optimising compiler for (basically) Python code that
> can talk to C, C++ and Fortran code. It's been used a lot for writing
> performance critical library wrappers.
>
> Stefan
>

I took a brief look at PyBindGen. I noticed a couple of things in the
generated code of a test module. The PyObject definitions held a pointer
to the contained datatype, which is one of the things I was trying to
steer away from. It would generate a std::map for each new type,
apparently to allow the contained type to be matched back to the
PyObject when needed. I intend to use the same method that Boost.Python
uses, sneak the pointer into the destruct functor of a shared_ptr.

And when parsing arguments from an overloaded set, PyBindGen appears to
generate complete separate functions for each overload and then try one
after the other. The reason mine doesn't support overloaded named
arguments is because it instead uses a bunch of nested if-statements to
match the overload with as few checks as possible. Mine also orders the
checks so that a base-class is never checked before a derived-class and
that numeric types and string types are matched to their best fit (given
func(double x) and func(int x), a python float value will always call
func(double)). I'm not certain that PyBindGen doesn't generate code that
takes this into consideration I haven't studied its code.

I'll definitely take a look at how Cython handles arguments some time.


It's also interesting to note that while PyBindGen will parse C++ types
itself, to interpret arguments and return types, mine uses gccxml to do
all the work. When given a specific overload, it will generate a dummy
function with the same set of arguments in the file given to gccxml,
along with typedefs for all built-in types. That way, you can specify
types either explicitly, or with typedefs regardless of how the
interface you want to expose does it, and my code doesn't have to do any
extra work.


The only question I have now is what about licensing? Is that something
I need to worry about? Should I go with LGPL, MIT, or something else?
And should the license be mentioned in the code or be in a single
separate file at the top-level directory?
 
A

Aahz

The only question I have now is what about licensing? Is that something
I need to worry about? Should I go with LGPL, MIT, or something else?

Which license you use depends partly on your political philosophy.
Unless you have an aggressively Stallmanesque attitude that people using
your code should be forced to contribute back any changes, stick with
MIT. (Generally speaking, the less encumbrance in your code, the more
likely people are to use it, if your goal is to encourage users.)
 
R

Rouslan Korneychuk

Which license you use depends partly on your political philosophy.
Unless you have an aggressively Stallmanesque attitude that people using
your code should be forced to contribute back any changes, stick with
MIT. (Generally speaking, the less encumbrance in your code, the more
likely people are to use it, if your goal is to encourage users.)

MIT it is, then.
 
P

Patrick Maupin

[email protected] (Aahz) said:
Yes.

Unless you place such a low value the freedom of your users that you'd
allow proprietary derivatives of your work to remove the freedoms you've
taken care to grant,

Oh, you mean like Guido and the PSF, and all the Apache people. Yes,
they're an uncaring bunch. I wouldn't trust software written by any
of them, or attempt to emulate them in any way.
then you should choose a copyleft license like the
GPL.

This is certainly appropriate in some circumstances. The only time I
personally would use the GPL is if I thought I wrote something so
wonderful and uneasily replicated that I wanted to directly make money
off it, and thus wanted to make it harder for others to take it and
sell enhanced versions without giving me the code back. For years, I
have viewed the GPL as more of a commercial license than the
permissive ones, a view that has been validated by several high
profile events recently.
Er, no. Anyone who thinks that a copyleft license “forces” anyone to do
anything is mistaken about copyright law

Perhaps you feel "forces" is too loaded of a word. There is no
question, however, that a copyright license can require that if you do
"X" with some code, you must also do "Y". There is also no question
that the GPL uses this capability in copyright law to require anybody
who distributes a derivative work to provide the source. Thus,
"forced to contribute back any changes" is definitely what happens
once the decision is made to distribute said changes in object form.
, or the GPL, or both. The GPL
only grants permissions, like any other free software license.

But the conditions attached to those permissions make it not at all
"like any other free software license." And that's true whether we
use the word "forces" or not.

Regards,
Pat
 
P

Patrick Maupin

No. A free software license doesn't require anything. It permits the
recipient to do things otherwise prohibited. Copyright law taketh, and
the license giveth as an exception to the law.

Finely parsed semantics with a meaningless difference when applied to
what I said in the context of comparing GPL vs. permissive licenses.
That is: it is copyright law that forces the recipient to abstain from a
broad range of actions. A free software license grants exceptions,
explicitly allowing specific actions to be performed.

Yes, and as I said, the exceptions are not as encompassing, and come
with more restrictions, when using the GPL vs. using a permissive
license.
You might as well say that a restaurant “forces” patrons to pay for
their meal. They don't; it's merely a proviso for performing the act of
eating the food.

I certainly *would* say that. Try eating at a restaurant with a
halfway watchful staff near a police station and see if you can get
away without payment. Same thing with buying groceries or dry goods.
The restaurants and the stores, with the full weight of the
government, force you to do certain things if you partake of their
wares. So do do software authors via their licenses, which, as you
correctly point out, derive their power from the fact that your legal
rights may be very limited absent a valid license to a piece of
software.

On the odd occasion that a restaurant or a store offers you something
for "free" (with no asterisks or fine print) they really mean it --
you can take it home and do what you want with it, with no force
applied. (Don't start on the whole libre vs. gratis thing -- as far
as I'm concerned, neither "free as in beer" software nor GPLed
software is as free as the occasional free meal or trinket I get,
which is much more akin to "public domain" in software.)
Since no-one is forcing anyone to take any of the actions permitted in
the license, and since those actions would not otherwise be permitted
under copyright law, it's both false and misleading to refer to them as
“forced”.

Again, the force is applied once you choose to do a particular thing
with the software -- is is really that hard to understand that
concept? Even the permissive licenses force you to retain the
copyright notice on the source, but other than that, they don't try to
exert any kind of control over derivative works.

By the way, in selectively quoting from my email, you conveniently
neglected to address the significant issue of Guido et al apparently
disrespecting their users by "placing a low value on their freedom".
You may think that "force" has been misused here; I happen to think
that you are (and with a lot of other company, no doubt) misusing the
word "freedom" to mean only those *particular* freedoms that *you*
deem appropriate, and trying to paint others who disagree with your
priorities as somehow immoral. Yet when good examples of these
apparently immoral people and their software are given, somehow the
conversation is always directed back away from this issue.

Personally, I usually like to give my customers (paid or unpaid) the
ability to use the software as they see fit. It's basically a gift;
although I force them to include my copyright notice on subsequent
source copies, I don't expect anything else in return, either directly
or indirectly. I certainly don't attempt to control the licensing of
any software they write that happens to use my software; I would view
that as an attempted abrogation of their freedom. But this just gets
back to the ancient philosophical question of whether a man is really
free if he is not allowed to sell himself into slavery. I would argue
that he is not; obviously you and Stallman believe that the man is not
free unless someone forces him to remain free by keeping him from
selling himself.

Regards,
Pat
 
P

Patrick Maupin

And again, that would be the case with or without the specific free
software license

But the OP wasn't asking whether he should supply a license or not
(the absence of a license would presumably force everybody who wanted
to use the software to download a copy from an authorized site, and
not allow them to make copies for friends); he was asking *which*
license he should use, and he explicitly mentioned MIT and LGPL. In
the post you directly responded to, Aahz had responded to the OP with
a suggested license of "MIT". So, in the context of the original
question and original answer, the comparison is permissive vs. (L)GPL,
*not* (L)GPL vs. no license at all.
so it's false and misleading to say the license forces
anything.

I have already adequately covered what I believe Aahz meant by
"forced" and I think it's a reasonable term for the discussed
situation.

Personally, I believe that if anything is false and misleading, it is
the attempt to try to completely change the discussion from MIT vs.
GPL to GPL vs. no license (and thus very few rights for the software
users), after first trying to imply that people who distribute
software under permissive licenses (that give the user *more* rights
than the GPL) are somehow creating a some sort of moral hazard that
might adversely affect their users, and then refusing to have any
further discussion on that particular issue.

So which is it? GPL good because a user can do more with the software
than if he had no license, or MIT bad because a user can do more with
the software than if it were licensed under GPL?
The actions that are prohibited are prohibited by copyright
law, not by the license.

Yes, just like the taking of food from the restaurant is prohibited by
laws against theft, and in both cases, these prohibitions may be
backed up by the force of the government. But as discussed, this does
not mean that the restaurant or software author cannot give you
something for free if they desire to.
I think we're done here.

Certainly appears that neither of us is going to convince the other of
anything.

Regards,
Pat
 
S

Steven D'Aprano

Personally, I believe that if anything is false and misleading, it is
the attempt to try to completely change the discussion from MIT vs. GPL
to GPL vs. no license (and thus very few rights for the software users),
after first trying to imply that people who distribute software under
permissive licenses (that give the user *more* rights than the GPL) are
somehow creating a some sort of moral hazard that might adversely affect
their users

If encouraging third parties to take open source code and lock it up
behind proprietary, closed licences *isn't* a moral hazard, then I don't
know what one is.

For the record, I've published software under an MIT licence because I
judged the cost of the moral hazard introduced by encouraging freeloaders
to be less than the benefits of having a more permissive licence that
encourages freeloading and therefore attracts more users. For other
software, I might judge that the cost/benefit ratio falls in a different
place, and hence choose the GPL.

So which is it? GPL good because a user can do more with the software
than if he had no license, or MIT bad because a user can do more with
the software than if it were licensed under GPL?

Good or bad isn't just a matter of which gives you more freedoms, they're
also a matter of *what* freedoms they give. Weaponized ebola would allow
you to kill hundreds of millions of people in a matter of a few weeks,
but it takes a very special sort of mind to consider that the freedom to
bring about the extinction of the human race a "good".

I consider the freedom granted by the MIT licence for my users to take my
source code and lock it up behind restrictive licences (and therefore
*not* grant equivalent freedoms to their users in turn) to be a bad, not
a good. But in some cases it is a cost worth paying, primarily because
not all people who use MIT-licenced software go on to re-publish it under
a restrictive licence, but nevertheless won't consider the GPL (possibly
due to misunderstandings, confusion or political interference).
 
M

Martin P. Hellwig

On 05/08/10 09:37, Steven D'Aprano wrote:
If encouraging third parties to take open source code and lock it up
behind proprietary, closed licences *isn't* a moral hazard, then I don't
know what one is.
<cut>
I fail to see what is morally wrong with it. When I ,as the author,
share my work to the public, I should have made peace with the fact that
I, for all intends and purposes, lost control over its use. And that is
rightfully so; who am I to say: "Yeah you can use it but only once in a
blue moon when Jupiter aligns with Mars and a solar eclipse reaches its
high on Greenwich at noon exactly."

But just for argument sake say that you can put restrictions on the use,
who is going to enforce these restrictions? The author/Police/special
interest groups?

Anyway I usually put stuff under the MIT/BSD license, but when I can I
use the beerware license (http://people.freebsd.org/~phk/) and I fully
agree with PHK's reasoning.
 
A

Aahz

For the record, I've published software under an MIT licence because I
judged the cost of the moral hazard introduced by encouraging freeloaders
to be less than the benefits of having a more permissive licence that
encourages freeloading and therefore attracts more users. For other
software, I might judge that the cost/benefit ratio falls in a different
place, and hence choose the GPL.

Well, yes, which is more-or-less what I posted in the first place.
 
P

Patrick Maupin

If encouraging third parties to take open source code and lock it up
behind proprietary, closed licences *isn't* a moral hazard, then I don't
know what one is.

For a start, there is a difference between "encouraging" and
"allowing". But in point of fact, you have it exactly backwards.
Putting the code out there and making it a tort to republish it under
a closed license creates a moral hazard -- a trap that many companies
including Linksys/Cisco have fallen into. If I expect nothing in
return, if it's a gift, then the likelihood of moral hazard is
significantly reduced. Unless you are somehow suggesting that I owe
my user's customers anything (which suggestion, btw, is frequently
made in veiled terms, and always pisses me off), there is no other
moral hazard produced by me choosing a permissive license for my code.
Good or bad isn't just a matter of which gives you more freedoms, they're
also a matter of *what* freedoms they give. Weaponized ebola would allow
you to kill hundreds of millions of people in a matter of a few weeks,
but it takes a very special sort of mind to consider that the freedom to
bring about the extinction of the human race a "good".

You're missing the context where Mr. Finney keeps changing what he's
arguing about. I agree completely that different licenses are valid
for different expectations, and said as much in my first post on this
subject. But it's extremely silly to compare weaponized ebola to
publishing free software, unless you want to give ammunition to those
amoral profiteers who claim that it is so dangerous for hackers to
give out source code at all that doing so should be criminalized.
I consider the freedom granted by the MIT licence for my users to take my
source code and lock it up behind restrictive licences (and therefore
*not* grant equivalent freedoms to their users in turn) to be a bad, not
a good. But in some cases it is a cost worth paying, primarily because
not all people who use MIT-licenced software go on to re-publish it under
a restrictive licence, but nevertheless won't consider the GPL (possibly
due to misunderstandings, confusion or political interference).

"Political interference" is certainly the main reason that I won't use
the GPL, but it is probably not the same politics you are thinking
of. When I seriously consider investing in learning a piece of
software so that I can make it part of my "toolbox," a major
consideration is how well it plays with the other tools in my toolbox,
and exactly which construction jobs I can use it on. RMS has managed
to create a scenario where the GPL not only doesn't play nicely with
some other licenses, but now doesn't even always play nicely with
itself -- some people who liked GPL v2 but weren't willing to cede
control of their future licensing terms to the FSF now have GPL v2
code that can't be linked to GPL v3 code.

So, when a package is GPL licensed, for me it can create more
contemplation about whether the package is worth dealing with or not.
If the package is large, well-maintained, and standalone, and I'm just
planning on being a user, the fact that it's GPL-licensed is not at
all a negative. If I'm looking at two roughly equivalent programming
toolkits, I will take the BSD/MIT one any day, because I know that
when I learn it, I "own" it to the extent that I can use it on
anything I want in any fashion in the future.

Regards,
Pat
 
S

Steven D'Aprano

For a start, there is a difference between "encouraging" and "allowing".

Finely parsed semantics with a meaningless difference when applied to
what I said in the context of comparing GPL vs. more permissive licenses.

But in point of fact, you have it exactly backwards. Putting the code
out there and making it a tort to republish it under a closed license
creates a moral hazard -- a trap that many companies including
Linksys/Cisco have fallen into.

What? That's crazy talk. You think Linksys and Cisco don't have people
capable of reading licences? What sort of two-bit organisation do you
think they are?

They have lawyers, they have people whose job it is to make sure that
they don't infringe other people's copyright. They wouldn't use software
copyrighted by Microsoft without making sure they were legally licenced.
One can only wonder why they thought they didn't need to treat the GPL
with an equal amount of respect.

Since you raised the analogy of a restaurant giving away freebies, if a
restaurant stuck a sign on the door saying "Free softdrink with every
burger", and some Cisco engineer walked in the door and started loading
up a trolley with cans of drink from the fridge ("they're free, right?"),
would you argue that this was the restaurant's fault for creating a moral
hazard?

I don't think you understand what a moral hazard is. Under no
circumstances is it a moral hazard to say "If you do X, I will do Y" --
in this case, "If you obey these restrictions on redistribution, I'll
licence this copyrighted work to you". Perhaps you should check the
definition before arguing further that the GPL imposes a moral hazard on
anyone:

http://en.wikipedia.org/wiki/Moral_hazard

If I expect nothing in return, if it's
a gift, then the likelihood of moral hazard is significantly reduced.
Unless you are somehow suggesting that I owe my user's customers
anything (which suggestion, btw, is frequently made in veiled terms, and
always pisses me off), there is no other moral hazard produced by me
choosing a permissive license for my code.

No, you don't *owe* them anything, but this brings us back to Ben's
original post. If you care about the freedoms of Cisco's customers as
much as you care about the freedoms of Cisco, then that's a good reason
to grant those customers the same rights as you granted Cisco.

And let's not forget self-interest -- if you care about *your own
freedoms*, then it is in your own self-interest to encourage others to
use open licences rather than closed ones. The MIT licence merely
encourages openness by example, while the GPL makes it a legal
requirement.

Which brings us back full circle to Ben's position, which you took
exception to. If the global freedoms granted by the GPL are sufficiently
important to you, then you should use the GPL. If you have other factors
which are more important, then choose another licence. Why you considered
this controversial enough to require sarcastic comments about the
untrustworthiness of Guido and the PSF, I don't know.
 
P

Patrick Maupin

On May 8, 2:38 pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.au> wrote:

I don't think you understand what a moral hazard is. Under no
circumstances is it a moral hazard to say "If you do X, I will do Y" --
in this case, "If you obey these restrictions on redistribution, I'll
licence this copyrighted work to you". Perhaps you should check the
definition before arguing further that the GPL imposes a moral hazard on
anyone:

http://en.wikipedia.org/wiki/Moral_hazard

Well, definition is a tricky thing. Note that the wikipedia article
is disputed. One definition of moral hazard is "The tendency of a
person or entity that is imperfectly monitored to engage in
undesirable behavior." Under this definition, Linksys apparently
thought that the imperfect monitoring would let it get away with GPL
violations. Certainly, even if Linksys as a corporation wasn't trying
to get away with anything, their employees were improperly monitored,
and getting a product out was more important than any potential
copyright violation at the time (which shows there was a moral hazard
their employees took advantage of under either the definition I gave
or the wikipedia definition.) There are probably other companies (or
employees of those companies) getting away with GPL violations right
now -- certainly the risk of discovery if you just use a small portion
of GPL code and don't distribute your source must be very small.
There are certainly fewer companies getting away with MIT license
violations, simply because the license is so much harder to violate.
No, you don't *owe* them anything, but this brings us back to Ben's
original post. If you care about the freedoms of Cisco's customers as
much as you care about the freedoms of Cisco, then that's a good reason
to grant those customers the same rights as you granted Cisco.

But I *do* grant them the same rights -- they can come to my site and
download my software!!!
And let's not forget self-interest -- if you care about *your own
freedoms*, then it is in your own self-interest to encourage others to
use open licences rather than closed ones. The MIT licence merely
encourages openness by example, while the GPL makes it a legal
requirement.

But I *do* care about my own freedom. I thought I made that crystal
clear. If I produce something under the MIT license, it's because I
want to give it away with no strings. If I produce something under
the GPL (that's not merely a small addendum to a preexisting project),
it's probably going to be because I think it's pretty valuable stuff,
maybe even valuable enough I might be able to make some money with
it. If I'm going to use any prebuilt components, those *can't* be
licensed under the GPL if I want to deliver the final package under
the MIT license. Even if I'm using the GPL for my valuable software,
my monetization options are more limited if I use a third party
component that is licensed under the GPL, because I now don't have the
viable option of dual-licensing. So, that gets back to my argument
about what I like to see in a package I use, and how I license things
according to what I would like see. For me, the golden rule dictates
that when I give a gift of software, I release it under a permissive
license. I realize that others see this differently.
Which brings us back full circle to Ben's position, which you took
exception to. If the global freedoms granted by the GPL are sufficiently
important to you, then you should use the GPL. If you have other factors
which are more important, then choose another licence. Why you considered
this controversial enough to require sarcastic comments about the
untrustworthiness of Guido and the PSF, I don't know.

To me, the clear implication of the blanket statement that you have to
use the GPL if you care at all about users is that anybody who doesn't
use the GPL is uncaring. I think that's a silly attitude, and will
always use any tool at hand, including sarcasm, to point out when
other people try to impose their own narrow sense of morality on
others by painting what I perceive to be perfectly normal, moral,
decent, and legal behavior as somehow detrimental to the well-being of
the species (honestly -- ebola???)

Regards,
Pat
 
C

Carl Banks

[email protected] (Aahz) said:
Yes.

Unless you place such a low value the freedom of your users that you'd
allow proprietary derivatives of your work to remove the freedoms you've
taken care to grant, then you should choose a copyleft license like the
GPL.

GPL is about fighting a holy war against commercial software.

People who esteem their users give them freedom to use software
however they see fit, including combining it with proprietary
software.

Carl Banks
 
A

Aahz

GPL is about fighting a holy war against commercial software.

And really, that's a Good Thing. We wouldn't have Python, to some
extent, were it not for Stallman and his crusade. That doesn't mean we
should slavishly worship him, though.
 
P

Patrick Maupin

Patrick Maupin said:
Which brings us back full circle to Ben's position, which you took
exception to.
[…]

To me, the clear implication of the blanket statement that you have to
use the GPL if you care at all about users is that anybody who doesn't
use the GPL is uncaring.  I think that's a silly attitude […]

Fortunately, neither that silly blanket statement nor its implication
are represented in any of my messages in this thread.

Hmm, I must have misunderstood this:

"Unless you place such a low value the freedom of your users that
you'd allow proprietary derivatives of your work to remove the
freedoms you've taken care to grant, then you should choose a copyleft
license like the GPL."

To me, placing "such a low value on the freedom of [my] users" sounds
like I'm ready to consign them to slavery or something, so I certainly
originally viewed this as a "blanket" (e.g. unqualified)
"statement" (well, that should be obvious) that I have to use the GPL
"if care at all about [my] users".
I hope that helps.

Well, perhaps you meant less by your wording of "a low value on the
freedom" than could be read into it, just as Aahz and I meant less by
"forced" than you apparently read into that. I think we all have more
or less accurate understandings of the differences between GPL and
permissive licenses, but only disagree somewhat on how important the
various features are, and at the end of the day we all come to some
reasonably nuanced view of how to proceed with our projects.

One thing I realized that I didn't cover in my earlier posts is that I
think that for a lot of library-type projects, LGPL v2.1 is a really
fine license, offering a great balance of competing interests. I view
the new licensing on QT from Nokia (commercial, GPL v3, or LGPL v2.1)
as a good example of a balanced strategy.

Regards,
Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top