GitHub's “hub” tool rewritten in Golang
github.com
github.com
"My Ruby implementation of context.rb is getting unwieldy and in hub v1.11 I feel I've reached the limit of how much I can speed up hub exection. I can't make it much faster than 50 ms due to Ruby interpreter slowness. Go port can execute in under 10 ms, and it's not even specially optimized yet. Go port can also be distributed as a pre-compiled binary, skipping the need to install Ruby, which can be especially tricky and error-prone for Windows users."
I have the feeling that the sort of thing Hub is what Ruby's supposed to be good at, and Go not particularly. So the move sounds a bit strange to me.
Anyway, super convenient for them that a Go port already existed, obviously the move makes sense when the source is already there and it has the features and performance characteristics they desire, not to mention dropping the dependency on Ruby.
From what you're writing it seems that it might be worth checking Go out for that. Would you happen to have pointers for using Go for that purpose?
I've also heard good things about https://github.com/spf13/cobra and https://github.com/codegangsta/cli.
Actually go is very good at command line applications. The fast at start up time and easy concurrency make CLI applications in go very nice.
I'm not familiar with their Ruby implementation either, but hey if it works the same way, is faster than it was before, and some developers enjoyed working on it then I guess it's a net positive :)
https://github.com/cloud66/c66toolbelt https://github.com/cloud66/cx
Mike Perham, of Sidekiq fame, built his latest product in Go. Ditto for Mitchell Hashimoto: Vagrant is one of the most popular Ruby products out there, but most of the other tools his company builds are written in Go.
http://blog.cloudfoundry.org/2013/11/09/announcing-cloud-fou...
I'd be interested to see a transition matrix for rewrites (or comparable writing-the-next-thing efforts) between various languages. Here we have Ruby projects moving to Go. I've seen Java projects move to Scala. Twitter moved a bunch of stuff from Ruby to Scala, and i think they moved at least one thing from Scala to Java. Puppet Labs are moving from Ruby to Clojure. But i've never seen anyone move from Java to Go, and i have no idea if there's a popular transition from Python or Node.
It would be really, really interesting if there was a lot of flux to Go from Ruby, but not from Python and Node.
Go, JRuby and Scala all meet our new criteria for ops-friendliness, which are: 1) the app must be user-installable by a single wget from BinTray 2) the app must have 0 or 1 [the JVM] external dependencies 3) the app must not require any special environment to run in. From a packaging perspective, we're using `godep go build`, `warble` and `sbt assembly` respectively.
I've never worked with anything as install&run-hostile as Ruby.
I've worked with (mostly, built!) deployment systems that used rsync, scp, wget, Maven, and apt-get, and i've come to be strongly in favour of systems which bake versioning in right at the bottom, in such a way that you can issue commands and make queries in terms of versions right there on the box, without having to refer to some external ledger. Both for convenience, and for the consistency of code and metadata.
[1] http://www.consul.io/downloads.html [2] https://github.com/snowplow/ansible-playbooks
What exactly would this tell you?
any windows build out there?
With /Godeps: 44838 LOC
Without /Godeps: 14733 LOC
Of course, this is quite a rough metric; some languages are much denser per line (like APL/J/K and others in that family), so it's definitely not an absolute rule. But it can be interesting to compare a direct port of a reasonably complicated application from one language to another, to see how the abstractions in each language hold up; just like it can be interesting to compare the speed when porting from one language to another, even though there are plenty of caveats there too.
When the code is a port and represents 1:1 functionally, then line of code is totally irrelevant, except for it's performance to execute (which clearly GoLang has demonstrated in this case to outperform ruby). A better "rough metric" for complexity is the number of functions or as Ruby Flog puts it - ABC metric: Assignments, Branches, Calls.[0]
So in the end the removal of the Ruby dependency should clean up your local machine ;)
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.
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.
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.
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.
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.
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!