7 ms·
The GMP change is the most exciting one for me! Years ago when I was really trying to get into Haskell, I wanted its binaries to be as portable as those from G
by bjt 6y ago
The GMP change is the most exciting one for me!
Years ago when I was really trying to get into Haskell, I wanted its binaries to be as portable as those from Go. I was so sad to see that this _one_ library made that impossible.
- garmaine 6y agoWhat’s the issue? GMP is pretty portable, no?
- whateveracct 6y agoit's more about its license
- endgame 6y agoGMP is LGPL, so if you distribute a binary to someone it has to be possible for the recipient to re-link it with an alternate libgmp (either via dynamic linking, or by providing .o files and a script)
- robocat 6y agoMy understanding from a quick google: The issue is that if you write a Haskell program, and you want to deploy it as a single executable, then GMP is included (statically linked), so the LGPL applies to the executable. The two obvious ways to meet the LGPL license restrictions are: * license your code in a way that is LGPL compatible (e.g. open source your code using GPL) * you could provide the app in a relinkable form (ie a big .o file) as per section 6.a Essentially there is no tidy way to distribute a closed source Haskell executable without removing the GMP library, which was the sole remaining LGPL dependency. It was not trivial to remove the dependency because of the library’s quality (amongst other reasons). (Edited for clarity.)
- garmaine 6y agoI don’t understand what this has to do with portability.
- deleted 6y ago[deleted]
- cercatrova 6y agoPeople don't want to share the freedoms they got with their users. That's it. There's no reason commercial software can't be under GPL style licenses.
- whateveracct 6y agoIf I'm releasing an indie video game in Haskell, I'm not going to GPL it..
- cercatrova 6y agoWhy not? I mean out of all the commercial projects that could be open sourced, games are actually great to have under GPL, because the assets (art, animations, etc) are are still under copyright but the code and logic isn't, which isn't as important to a game as to, say, enterprise CRUD software. Plus with open source game code, modders could make much out of your game.
- dash2 6y agoSo why do absolutely no game companies do this?
- kuschku 6y agoSome actually did, back in the day of point and click adventures. But nowadays games obfuscate everything as much as they can for DRM and anticheat purposes. If you consider your own customers your enemies, of course you wouldn't open anything to them
- mhitza 6y agoid used to GPL license their engines, but then Carmack left and they stopped open sourcing them.
- michaelsbradley 6y agoThat's very close but not quite right (unless I misunderstood what you wrote). See: https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDynamic https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDyn... As long as a relinkable form of the closed source executable and/or sources of the LGPL library/ies it uses are provided in an acceptable way (per LGPL terms) then distributing a closed source executable should not be problematic.
- unnah 6y agoIs there some reason that option two (providing relinkable .o files) would not work? It seems that GHC can compile Haskell code to .o files.
- deleted 6y ago[deleted]
- Ericson2314 6y agoYes me too, and shout out to https://gitlab.haskell.org/users/hsyl20 https://gitlab.haskell.org/users/hsyl20 behind this work, who has been doing the unglamorous work of refactoring away decades of tech debt in GHC like no person ever before, to the best of my knowledge. https://gitlab.haskell.org/ghc/ghc/-/issues/17957 https://gitlab.haskell.org/ghc/ghc/-/issues/17957 for example. You would think the Haskell compiler in Haskell would be a shining example of a pure functional programming, but you would be wrong! (GHC most predates more modern ideas about how programs should leverage pure functional languages. I also speculate early on there was an "innovation budget" idea, conscious or otherwise, that if the language was novel, and the compilation analyses (e.g. strictness analysis) were novel, that was enough, and the domain-agnostic architecture of the compiler should be proven and bog-standard.)