|
Message-ID: <20130429205337.GA20323@brightrain.aerifal.cx> Date: Mon, 29 Apr 2013 16:53:37 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: High-priority library replacements? On Mon, Apr 29, 2013 at 03:14:42PM -0500, Rob Landley wrote: > On 04/29/2013 11:38:41 AM, John Spencer wrote: > >On 04/29/2013 07:51 AM, Brad Conroy wrote: > >>I have been keeping track of unbloated alternative resources > >>with permissive licenses here: > >>http://www.murga-linux.com/puppy/viewtopic.php?t=72359 > >> > >>Here is a summary in no particular order: > >>Imaging ... stb_image (nothings.org) or nanojpeg+lodepng+webp > >>stb_image supports png and gif (+many others) and thus has lzo > >>and zlib > >>Lua ... stua (nothings.org) > >>Ogg ... stb_vorbis > > > >i would be careful with stb_ things since the author makes > >statements such as: > >"Warning: gcc strict-aliasing optimization breaks this, which is > >too bad, because > >my old version probably didn't have that problem but it relied on > >silently casting > >from void*, which doesn't work in C++, so when I made it C++ > >compilable I had to > >start casting to void** and doing other shenanigans and bam. Just > >Say No to strict > >aliasing optimizations in C, which should be the sane systems > >programming language. > > Sounds good to me. At the very least the compiler should have a > --stop-being-stupid command line flag. The one being stupid is the person who's writing code that's invalid C and always has been invalid C. The fact that C has a tradition of being treated as a crap language where you can pass off whatever invalid hacks you want as code and ship it and get someone to pay you money for that junk is not an excuse to continue doing so. Rather it's the reason C got a bad reputation (for code that wasn't even C but nonsense posing as C!) and now we're stuck dealing with core system components written in Python and Perl, web apps written in PHP and JavaScript, and GUI behemoths written in Java and C++. If something is invalid C, you simply don't do it. You especially don't do it in a library you intend for others to be able to use in applications whose requirements and deployments you have no control over. Even if "it works for me" makes YOU happy when running the code on your own system, it's not okay when party B uses your code in their application without being aware that it's based on broken assumptions, and then party C gets to keep both pieces when it breaks. Sorry if this comes across as inflammatory, but this kind of crap is what we've been dealing with for the past two years getting apps to work on musl. Write your code correctly and it will work everywhere. Write it incorrectly and whistle while repeating to yourself "it works for meeee!!!" and people will be cursing your name -- if not now, then 5-10 years down the line, for sure. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.