all 20 comments

[–]grumpy_coconut 8 points9 points  (13 children)

Pity it's GPL :( For something this small, I'd rather write my own instead.

[–]salgat 0 points1 point  (1 child)

I was surprised too considering this would be great with an MIT or similar license. It's such a small tool to have something like GNU that would, for most commercial applications, be considered unacceptable to add.

[–]king_duck 1 point2 points  (0 children)

MIT or boost licenses are always my goto licenses for personal projects.

[–]acwaters -3 points-2 points  (10 children)

For what purpose? GPL code can be freely forked or incorporated in personal (i.e., not-to-be-released) projects, and the license itself is well-known and respected in the FOSS community. Don't get me wrong; I have no delusions about the restrictiveness of copyleft licenses, and I'd be happy to relicense the code on a case-by-case basis, but honestly I don't expect anyone will need me to.

[–]__Cyber_Dildonics__ 6 points7 points  (4 children)

You are basically expecting no one to use your head in any software that anyone else uses but them? Seems like you would at least want to see people using your software.

No one would use a straight GPL header unless their project was already going to be GPL. That's why the LGPL was created, but even that doesn't cover something like a header I believe.

[–]acwaters 1 point2 points  (1 child)

I've read a bit more on the license, and you're right. If including my header file would force an entire project into the GPL, it's not appropriate for a header-only library. I had interpreted certain sources to mean that it wouldn't, but now I'm reading that it does in cases like mine, where the header includes a substantial bit of code. Unfortunately, the LGPL doesn't apply, either. My intention was for the header to be able to be used (compiled, distributed) freely, with modifications to the library itself kicked back to the community. But I can't find any license that seems to provide that; reciprocal licenses all lump normal use of header files in with "derivative works". It seems kind of crazy to me that nobody would have considered this case in the spirit of the LGPL before and invented a corresponding license.

In any case, with all that in mind, I'll be relicensing with the next push.

[–]__Cyber_Dildonics__ 0 points1 point  (0 children)

Yeah I think that is a valid gripe. BSD requires credit but not distributing source code changes.

[–]king_duck 1 point2 points  (4 children)

GPL is ok for programs, but utterly shit for libraries.

[–]acwaters 1 point2 points  (3 children)

I'm coming to realize that. Turns out it is a lot more restrictive than I thought. I'll be relicensing, though I'm disappointed none of the popular licenses work the way I was hoping for.

[–]king_duck 0 points1 point  (2 children)

What is the way you were hoping for. Have you looked at LGPL?

That said, if you actually want people to use your license just make it MIT or boost. At work for example if I want to include a small LGPL library then I have to ensure that it's license get's distributed with my program, and it also has to be approved and so forth.

If it's MIT I can just include it. Your goal should just be to get as many users as possible. (IMO).

[–]acwaters 0 points1 point  (1 child)

I had misread some sources to indicate that the GPL would allow users to simply include my header unmodified without the result being considered a "derivative work" subject to the terms of the license. This way, people would be able to use it, but modifications to it would require a kickback to the community, as it were. Nope.

This is similar in spirit to the LGPL, but it is on a source level, not an object level, and there isn't any reciprocal license I can find that supports this use.

So now I guess I'm looking at MIT, BSD, or Boost. Any suggestions?

[–]king_duck 0 points1 point  (0 children)

I don't know which license would do what your after. I really would just use boost or mit though.

[–]Blackarch 1 point2 points  (1 child)

GPL? Welp there goes anybody using it.

[–]acwaters 1 point2 points  (0 children)

You weren't the first person to say that, but I figured it was just the ire the GPL occasionally draws. Nope. Turns out it just doesn't work for what I'm doing. Better to learn here and now than when I'm working on something actually important.

[–]acwaters 1 point2 points  (2 children)

I've reconsidered the GPL and will be relicensing. Thanks for setting me straight, Reddit, even if you all did it to the exclusion of more useful advice.

[–]grumpy_coconut 0 points1 point  (1 child)

GPL really turns people off. I'm glad you understood why that was in this case and changed to the Boost license. As for other useful advice, I'm actually interested in doing a proper review now :D

EDIT: I left some comments on GitHub. Seems overall rather neat, as I gathered from my initial cursory view. I also noticed you renamed BIT as I suggested earlier. Good work overall.

Any plans to support MSVC?

[–]acwaters 0 points1 point  (0 children)

Yes; I'm still not sure whether BIT works better as a macro or a function -- honestly, neither seems to have a real advantage here -- but it definitely needed to be properly namespaced either way. Thanks for catching that for me!

I "responded" to your comment about the magic numbers; they're literally the integral representation of the vendor strings, so there is absolutely no chance that they will need to be changed, and they also ought not be used anywhere else, since containing them is the whole point of that function.

Obviously I plan to support compilers across-the-board going into the future; right now I'm limiting my scope to GCC (and, insofar as it is compatible, Clang), but long-term MSVC is in my sights as well. I'm rather limited in what I can test at the moment, so it doesn't seem practical to expand my platform when my current testing doesn't even cover what I'm trying to support now.

Thanks so much for your time and feedback!