5 ms·
I don't understand? Can't you release the ruby gems or whatever it is as binaries? You only need to spend the $5 if you want to change something, right?
by joeld42 16y ago
I don't understand? Can't you release the ruby gems or whatever it is as binaries? You only need to spend the $5 if you want to change something, right?
- jarin 16y agoGems that use C extensions generally build them using native libraries.
- sid0 16y agoThat sounds fixable.
- teilo 16y agoNo, it's not even remotely fixable. If your extension requires natively compiled code for speed, you need a compiler, period. Going back to forcing developers to cross-compile binaries for every OS under the sun is not what I would call a fix.
- sid0 16y agoNo one's asking anyone to cross-compile binaries for every OS. You compile binaries for the few important platforms and provide source for the rest. As I mentioned in my other reply, open source projects have been doing this for a long while.
- teilo 16y agoAlmost every open source library on my Mac is compiled from source. Name your system: homebrew, ports, fink, they have all switch to compiling from source. Every scripting extension repository I know assumes you have a compiler to compile native libraries for extensions. And this has been true for "a long while". The change you are proposing is not trivial, and it has far-reaching implications. It is a step backwards, and one that every developer should oppose.
- holman 16y agoThe end-user needs to have build tools installed on their system if your library uses C. Same for if you want to install some standard system packages like ImageMagick.
- sid0 16y ago... or, you could just ship a binary instead.
- eliziario 16y agoOr ok. And what about your dependencies? Let's say you have a dependency on a library that is not shipped with OS X, what do you do? Link it statically and see your tiny gem becoming a monster of a few megabytes? Or do you simply link it dynamically hoping that somehow there will be a binary with the right version lurking somewhere for the user to download. Yeah, that's what happens when you develop OSS for windows. Or do you rely only on native windows libraries that you know will be there for sure, or do you have to compile against the latest version of the library you want to use that happens to have a binary available for windows users to download. Or then, you resort to some strange things like cygwin, MinGw. But didn't we all complained about that when windows was the only somewhat userfriendly OS out there? Didn't we all complained about how much it sucked that you couldn't have a free C compiler chain on windows. Well, now at least on windows you can download the Windows SDK and build code without Visual Studio. If and when Microsoft Windows C/C++ compiler, linker, docs, libs and headers are updated you can have a fresh and free Windows SDK download without having to shell out money to buy Visual Studio, would it be so difficult to apple to unbundle GCC toolchain from XCode and make it freely available?
- sid0 16y agoYeah, why not just ship binaries? Needing to install a compiler separately seems like far too high a barrier already.
- k33l0r 16y agoBecause then you'd need to ship binaries for every conceivable platform that your gem could be used on and you'd need to make some pretty fundamental changes to the whole Ruby gem distribution system (this probably applies to other languages and their libraries too).
- sid0 16y agoBecause then you'd need to ship binaries for every conceivable platform that your gem could be used on You don't. You ship binaries for the top 2-3 platforms and provide source for the rest. That's how open source projects have been doing things for ages. and you'd need to make some pretty fundamental changes to the whole Ruby gem distribution system Meh, it isn't insurmountable.
- k33l0r 16y agoYou ship binaries for the top 2-3 platforms and provide source for the rest. I wish it were that simple, but then you also have to worry about library versions (unless you really want to bundle all your dependencies too, bloating your little library from 10KiB to tens of megabytes, or more). Also see this reply: http://news.ycombinator.com/item?id=2311455 http://news.ycombinator.com/item?id=2311455 Meh, it isn't insurmountable. Yeah, because forcing a huge infrastructure change is what we want to do for the sake of having poor GCC distribution on OS X.
- wrs 16y agoYou have to deal with dependencies already. In fact, today you have to compile the dependencies. Why isn't downloading their binaries a simpler way to do it? Whenever I type "{brew,port} install X" I spend the next few minutes watching a compile and muttering "why? why? why?".