News for hackers. Stuff that matters.
Re:OS X Isn't for Developers by joeld42 on Thursday March 10, 2011 @06:49PM (#2311320)
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?
Re:OS X Isn't for Developers by holman on Thursday March 10, 2011 @06:52PM (#2311332)
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.
Re:OS X Isn't for Developers by sid0 on Thursday March 10, 2011 @06:54PM (#2311341)
... or, you could just ship a binary instead.
Re:OS X Isn't for Developers by eliziario on Thursday March 10, 2011 @07:22PM (#2311455)
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?
Re:OS X Isn't for Developers by jarin on Thursday March 10, 2011 @06:51PM (#2311325)
Gems that use C extensions generally build them using native libraries.
Re:OS X Isn't for Developers by sid0 on Thursday March 10, 2011 @06:54PM (#2311340)
That sounds fixable.
Re:OS X Isn't for Developers by teilo on Thursday March 10, 2011 @07:09PM (#2311404)
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.
Re:OS X Isn't for Developers by sid0 on Thursday March 10, 2011 @07:12PM (#2311418)
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.
Re:OS X Isn't for Developers by teilo on Thursday March 10, 2011 @07:16PM (#2311439)
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.

Re:OS X Isn't for Developers by sid0 on Thursday March 10, 2011 @06:53PM (#2311337)
Yeah, why not just ship binaries? Needing to install a compiler separately seems like far too high a barrier already.
Re:OS X Isn't for Developers by k33l0r on Thursday March 10, 2011 @07:02PM (#2311375)
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).
Re:OS X Isn't for Developers by sid0 on Thursday March 10, 2011 @07:09PM (#2311401)
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.

Re:OS X Isn't for Developers by k33l0r on Thursday March 10, 2011 @07:33PM (#2311502)
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.

Re:OS X Isn't for Developers by wrs on Thursday March 10, 2011 @08:24PM (#2311692)
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?".

Re:OS X Isn't for Developers by marshray on Friday March 11, 2011 @12:29AM (#2312262)
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

Re:OS X Isn't for Developers by bluesnowmonkey on Friday March 11, 2011 @08:05AM (#2313160)
> tens of megabytes

Is that supposed to be a lot?