Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


The 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.


... or, you could just ship a binary instead.


Or 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?


Gems that use C extensions generally build them using native libraries.


That sounds fixable.


No, 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.


No 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.


Almost 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.


Yeah, why not just ship binaries? Needing to install a compiler separately seems like far too high a barrier already.


Because 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).


Because 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.


You 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

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.


You 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?".


You have N packages and M platforms.

For a well-organized ruby gems system, they're largely orthogonal (N + M resources).

Per-platform binaries expend resources proportional to the cross product (NM resources).

You also have to set up and maintain automated build systems for every platform and they form a whole additional set of dependencies for shipping every little point release.

Avoid it whenever possible.

edit: I always did think N should come before M


> tens of megabytes

Is that supposed to be a lot?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: