
I find myself writing things like, splitListOn :: Eq a => a -> [a] -> [[a]] splitListOn delimiter = unfoldr splitter . (delimiter :) where splitter [] = Nothing splitter xs = Just (span (/= delimiter) (tail xs)) This is a sort of intersperse-opposite, in that... myId delimiter = concat . intersperse [delimiter] . splitListBy delimiter ...myId foo turns into a sort of id for lists of the correct type. With this, and other things, I always have a feeling that it's probably in the standard library somewhere but I didn't notice - maybe because it's abstracted out of recognition, just like "sequence" does Cartesian products for us, but not so that I noticed right away. Is there a good place to put these things - little things that feel like that maybe they're already in the standard library, and maybe they should be? I'd hate to be unknowingly reinventing the wheel all the time. I don't see an obviously-appropriate page for these on the Haskell Wiki, but maybe I missed it, or maybe I should create one. -- Mark

On 2004-12-28, Mark Carroll
Is there a good place to put these things - little things that feel like
I accept patches for things like this for MissingH. You can send me code or diffs as you prefer. I've been accepting code licensed under GPL, LGPL, or BSD, and will need a statement such as: Copyright (c) 2004 Mark Carroll This code is licensed under the GNU GPL, version 2 or later Or: I hereby assign copyright of this code to John Goerzen. In which case, it will fall under the default (GPL) license of the library (and may later be given to fptools to be part of the "standard" library). You can find MissingH at: http://quux.org/devel/missingh It represents work from about 5 or so authors already. -- John

On Wed, 29 Dec 2004, John Goerzen wrote:
In which case, it will fall under the default (GPL) license of the library (and may later be given to fptools to be part of the "standard" library).
I would've thought the GPL was incompatible with being part of a standard library intended for use in potentially-commercial applications? -- flippa@flippac.org A problem that's all in your head is still a problem. Brain damage is but one form of mind damage.

On Thu, Dec 30, 2004 at 12:02:58AM +0000, Philippa Cowderoy wrote:
On Wed, 29 Dec 2004, John Goerzen wrote:
In which case, it will fall under the default (GPL) license of the library (and may later be given to fptools to be part of the "standard" library).
I would've thought the GPL was incompatible with being part of a standard library intended for use in potentially-commercial applications?
The pedant in me says: the GPL is orthogonal to commercial use. It is not orthogonal to proprietary use. I am not somebody's code slave, writing code for them to use in a most likely for-profit closed-source program for nothing. If they want to use my code in such a project, they can negotiate with me for a license to my code for that purpose (and with the authors of the other GPL'd code in MissingH, should they require it also). If they want to sell their program and bundle the source and the rights inherent with the GPL, that is fine by me. We can all benefit from that. So yes, I know what the ramifications are, and the choice was quite intentional. But like I've said, I am willing to negotiate with people that require code under a license that lets them use it without releasing the code. I have also stated that I will put any part of the code I've written under the fptools license if that code will be added to fptools. (I perceive that as a greater good than license pragmatism in this instance.) Similar offers could be made to other Free Software projects if necessary. I am not the inflexible and oft-inscrutable object that is RMS :-) -- John

On Wed, 29 Dec 2004, John Goerzen wrote:
But like I've said, I am willing to negotiate with people that require code under a license that lets them use it without releasing the code. I have also stated that I will put any part of the code I've written under the fptools license if that code will be added to fptools. (I perceive that as a greater good than license pragmatism in this instance.)
This is the bit I was worried about, the idea of GPLed library code in fptools disturbs me somewhat. -- flippa@flippac.org Ivanova is always right. I will listen to Ivanova. I will not ignore Ivanova's recomendations. Ivanova is God. And, if this ever happens again, Ivanova will personally rip your lungs out!

On Thu, Dec 30, 2004 at 05:24:38AM +0000, Philippa Cowderoy wrote:
This is the bit I was worried about, the idea of GPLed library code in fptools disturbs me somewhat.
I don't think anyone is suggesting doing that. I'm not, anyway. I don't think the fptools maintainers would accept it if I tried, to boot.
Ivanova is always right. I will listen to Ivanova. I will not ignore Ivanova's recomendations. Ivanova is God. And, if this ever happens again, Ivanova will personally rip your lungs out!
Also, Ivonava is in the middle of 15 things, all of them annoying. -- John

On Wed, 29 Dec 2004, John Goerzen wrote: (snip)
I accept patches for things like this for MissingH. You can send me code or diffs as you prefer. I've been accepting code licensed under GPL, LGPL, or BSD, and will need a statement such as: (snip)
Can you mix in BSD code with GPL, though, without making it also GPL? -- Mark

On Thu, Dec 30, 2004 at 04:38:01AM +0000, Mark Carroll wrote:
On Wed, 29 Dec 2004, John Goerzen wrote: (snip)
I accept patches for things like this for MissingH. You can send me code or diffs as you prefer. I've been accepting code licensed under GPL, LGPL, or BSD, and will need a statement such as: (snip)
Can you mix in BSD code with GPL, though, without making it also GPL?
Yes. In fact, if you wrote the code, you can put it under as many licenses as you want. It is quite possible to contribute BSD (or MIT or X) licenced code to GPLed products, if someone wanted they could extract the BSD parts and not be bound by the GPL. (however unless a contribution is substantial it is easier to just put it under the same licence or dual licence it to avoid excess legal boilerplate) The GPL can never cause any other code to become GPL, the absolute worst it can do is restrict you from distributing the GPLed code itself. You may choose to GPL (or BSD, or any other GPL compatable license) your code if you think using the GPLed code is worth it, but the issue is never forced. John -- John Meacham - ⑆repetae.net⑆john⑈
participants (4)
-
John Goerzen
-
John Meacham
-
Mark Carroll
-
Philippa Cowderoy