News for hackers. Stuff that matters.
Re:GitHub's “hub” tool rewritten in Golang by karissa on Friday January 02, 2015 @03:38PM (#8828407)
Why was this necessary? Since hub is a distributed tool, users will now have to download Go on my local machine. Pretty big dependency, if you ask me.
Re:GitHub's “hub” tool rewritten in Golang by Sean-Der on Friday January 02, 2015 @03:49PM (#8828464)
It was written in Ruby before, requiring the Ruby runtime to be installed. With Go you have actual binaries. They also aren't linked to anything Go specific, so you can easily distribute them without installing anything Go specific on those machines.

So in the end the removal of the Ruby dependency should clean up your local machine ;)

Re:GitHub's “hub” tool rewritten in Golang by xanadohnt on Friday January 02, 2015 @03:44PM (#8828436)
To build it? Yes. To run it? No. Go apps don't require a runtime. The only thing necessary is distributing the platform-specific binary.
Re:GitHub's “hub” tool rewritten in Golang by chimeracoder on Friday January 02, 2015 @03:48PM (#8828461)
> Go apps don't require a runtime.

Go applications do require a runtime, but the executable is statically linked, so the binary executable ships with the runtime.

The rest of what you said is correct. The only reason you need the Go development tools installed is to develop the application or to compile it from source.

Re:GitHub's “hub” tool rewritten in Golang by kornish on Friday January 02, 2015 @03:42PM (#8828426)
It may be worth noting that there's only a dependency on Go if you want to build from source. The tool is usable on its own after compilation to a standalone binary. See the Readme's "Standalone" section.
Re:GitHub's “hub” tool rewritten in Golang by innoying on Friday January 02, 2015 @03:42PM (#8828422)
Or like any compiled language they can just grab a binary: https://github.com/github/hub/releases
Re:GitHub's “hub” tool rewritten in Golang by james2vegas on Friday January 02, 2015 @03:44PM (#8828438)
And like any binary releases, there are platforms that are missed/forgotten/not cared enough about.
Re:GitHub's “hub” tool rewritten in Golang by bsg75 on Friday January 02, 2015 @03:53PM (#8828486)
Yes, binary releases are a convenience for users of common platforms, and not a catch all for every version of every relevant platform.

This is why the source is available. Implementation in Ruby, or any other interpreted language, does not guarantee compatibility. Not all systems have current interpreters or dependencies.

Re:GitHub's “hub” tool rewritten in Golang by lmm on Friday January 02, 2015 @04:21PM (#8828624)
If I'm on a semi-obscure platform like Solaris or GNU/kFreeBSD I'd rate my odds much more highly with Ruby than with something that builds binaries.
Re:GitHub's “hub” tool rewritten in Golang by bsg75 on Friday January 02, 2015 @04:46PM (#8828734)
Why? If you are using a platform like that, would you not be adept at building packages from source?

I agree that Ruby is likely already installed on those, but having watched co-workers fight version dependency problems with Ruby Gems on OSX, I tend to believe nothing is a universal solution.

Re:GitHub's “hub” tool rewritten in Golang by lmm on Friday January 02, 2015 @04:54PM (#8828780)
Adept at building C programs that use standard autoconf? Yes. Adept at building go programs? Not so much, and I probably don't even have the tools installed (unlike with ruby). We'll probably reach a point where go is as much a part of the standard unix install as ruby is, but we're not there yet.
Re:GitHub's “hub” tool rewritten in Golang by heavenlyhash on Friday January 02, 2015 @07:00PM (#8829265)
The go toolchain bootstraps a small kernel of itself from normal gcc and I have yet to encounter any outrageous configuration issues. It should be at least as simple as building C programs that use standard autoconf, if not simpler.

I've done some work cross-compiling golang on platforms that are not yet officially supported. I think you'll find the support is really remarkably good.

Re:GitHub's “hub” tool rewritten in Golang by bsg75 on Friday January 02, 2015 @05:12PM (#8828854)
> I probably don't even have the tools installed (unlike with ruby)

Provided correct versions are in place.

In my aforementioned observations, Gem installation was complicated when the parent app relied on gem versions below the code currently in GitHub.

This is of course a problem not unique to Ruby (see: Default Python version on CentOS), based on the number of versioning utilities for Go. I have also had plenty of problems with autoconf's that don't work.

Re:GitHub's “hub” tool rewritten in Golang by kaoD on Friday January 02, 2015 @07:36PM (#8829386)
> and I probably don't even have the tools installed (unlike with ruby)

So your arguments is basically "I'm a Ruby user" ?

I'm neither a Go nor a Ruby user, but I have Go installed on more machines than Ruby... and Ruby is a requisite for running unlike Go!

Re:GitHub's “hub” tool rewritten in Golang by webRat on Friday January 02, 2015 @04:57PM (#8828800)
It takes 2 minutes to google for Go support on all of these platforms. Did you even bother? Go is supported on Solaris and kfreebsd platforms.
Re:GitHub's “hub” tool rewritten in Golang by bdcravens on Friday January 02, 2015 @05:48PM (#8829008)
brew install go, apt-get install golang, etc
Re:GitHub's “hub” tool rewritten in Golang by lmm on Friday January 02, 2015 @04:58PM (#8828803)
I have ruby installed on those servers right now. Not so much go. I'm not saying go would be impossible, just that it would be harder.
Re:GitHub's “hub” tool rewritten in Golang by webRat on Friday January 02, 2015 @05:03PM (#8828819)
Ok? I bet you can figure this out and I bet it's just as easy as Ruby. http://golang.org/doc/install
Re:GitHub's “hub” tool rewritten in Golang by lmm on Friday January 02, 2015 @05:15PM (#8828873)
Given that getting Ruby installed on those servers involves doing literally nothing, no, it isn't as easy.
Re:GitHub's “hub” tool rewritten in Golang by burntsushi on Friday January 02, 2015 @05:52PM (#8829022)
You're basically arguing a technicality at this point. How important is it that it takes N time to do X and N+epsilon time to do Y? And how much should this affect one's decision for choosing which programming language to use?
Re:GitHub's “hub” tool rewritten in Golang by mtrpcic on Friday January 02, 2015 @05:08PM (#8828839)
Like C?
Re:GitHub's “hub” tool rewritten in Golang by lmm on Friday January 02, 2015 @05:16PM (#8828882)
Yes. I bet it would take less effort to get a random ruby program running on those machines than a random C program.
Re:GitHub's “hub” tool rewritten in Golang by Gigablah on Saturday January 03, 2015 @08:37AM (#8830704)
You could've installed Go on all your machines with a provisioning script in the amount of time you've wasted being deliberately obtuse in this thread.
Re:GitHub's “hub” tool rewritten in Golang by tgkokk on Friday January 02, 2015 @03:43PM (#8828430)
Most users can just download a binary from [1], they don't have to compile hub itself.

[1]: https://github.com/github/hub/releases

Re:GitHub's “hub” tool rewritten in Golang by nilved on Friday January 02, 2015 @03:43PM (#8828429)
No, you can just download a binary. It's necessary because the Ruby version was unbearably slow.
Re:GitHub's “hub” tool rewritten in Golang by MetaCosm on Friday January 02, 2015 @04:26PM (#8828649)
"users" will grab the binary and be done.
Re:GitHub's “hub” tool rewritten in Golang by bsg75 on Friday January 02, 2015 @03:47PM (#8828455)
Was Ruby a dependency of the prior version?
Re:GitHub's “hub” tool rewritten in Golang by tacticus on Friday January 02, 2015 @06:14PM (#8829121)
Yes.
Re:GitHub's “hub” tool rewritten in Golang by sp332 on Friday January 02, 2015 @04:10PM (#8828568)
Bigger than Ruby?
Re:GitHub's “hub” tool rewritten in Golang by JoshTheGeek on Friday January 02, 2015 @04:11PM (#8828574)
No, smaller, because you don't need the Go compiler to run it, just to build it. Therefore, you won't need the compiler at all, just the binary.