top | item 5586444

(no title)

frehpt | 13 years ago

Option A:

  -Write your application in Go
Option B:

  -Write application in Ruby
  -Profile Ruby application to identify code to be rewritten in C
  -Learn C if you don't already know it
  -Rewrite various parts of your application in C
  -Run Valgrind to search for memleaks
  -Ensure that your target systems all have required libs installed
Option A seems much simpler...

discuss

order

awj|13 years ago

Sure it does, right up until you also need libraries that Ruby has but Go doesn't. Also you're trading away a few language features to get Go, so between the two you're tossing a lot of programmer time out the door to avoid writing in C. Maybe that's still a worthwhile trade, but it's not really a simple one.

papsosouid|13 years ago

>Sure it does, right up until you also need libraries that Ruby has but Go doesn't.

Now replace go with ruby and ruby with perl. Go has libraries for 99% of what people are doing with ruby. If you are in that 1%, then you need to evaluate whether or not it is worth writing the library you need or if you should use another language.

threeseed|13 years ago

Go does't have 1/100000 the amount of libraries and support that Ruby or C does.

Option A only seems simpler because you ignore the time/complexity in coding the task at hand.

jthol|13 years ago

... and the Java programmer laughs in the corner (Let's not talk about generics though).

frehpt|13 years ago

> Go does't have 1/100000 the amount of libraries and support that Ruby or C does.

That's what they used to say about Java...

kgabis|13 years ago

Why not 1/10e100? Or even less? Go's library support is quite nice already and it's growing really fast.

nfm|13 years ago

That's a ridiculous set of alternatives.

espadrine|13 years ago

The bottom line is: the time necessary to optimize Ruby to run below 8 minutes was bigger than he could afford, and apparently Go, once written (which apparently gave the OP some issues) needn't be optimized.

That said, Go wasn't necessarily the better choice, because of the subtlety that made the Go program overflow silently. Writing the solution in Scala or even in JS would have probably given him less of an issue.