Live data from Hacker News

Go After 2 Years in Production

blog.iron.io

131–140 of 178 posts

Re: Go After 2 Years in Production

#131

Earlier quoted context omitted.

It's not cliche, it's just personal. For instance, most of the code I write is numerical code. To that end, any language without operator overloading is a non-starter, since it's far harder to find a bug in: div(add(mult(-1,b),sqrt(sub(pow(b,2),mult(mult(3,a),c)))),mult(2,a)) than it is in (-b+sqrt(b^2-3 a c))/(2*a) On the other hand, if I wrote server code, operator overloading would be far less useful. I'd probably…

It's not quite that bad in Go, (-b + math.Sqrt(b b - 4 a c)) / (2 a) though if you're using a ton of matrices it could be. I for one have found Go great for computing. The really quick compile times with static checking plus the composability are great. It definitely depends though; while the native concurrency is great there aren't a lot of easy solutions for non-shared memory computations. (I saw an MPI package at…

Sorry, new to posting on HN. How do I get asterisk literals?

Re: Go After 2 Years in Production

#132
post #53

Earlier quoted context omitted.

For a while I thought you meant Seymour Cray, or one of the supercomputers he designed and built. Was it so hard to type one letter in support of readability? Or is "cray" its own word now?

"Cray cray" and by extension just "cray" are vernacular ways of saying "crazy".

I was aware of this, but was genuinely confused for a few moments, since I would have hoped that a reference to Seymour Cray was more likely on this forum than such, as you put it, “vernacular” forms of expression.

Re: Go After 2 Years in Production

#133
post #83

Not so relevant but for any of you who prefer Rust to Go and haven't tried Go, don't do it. Go's std, visibility by case and gofmt, among other things will make you cry for using Rust. I really hope Rust get's better with time and it really focuses on being developer friendly not just a bag of nice features.

Maybe we should do less crying and more contributing. Google has a bit more dev muscle to throw at projects than Mozilla, so community involvement is far more critical to Rust's health.

The Go team at Google consists of a handful of people: http://thechangelog.com/100/

Re: Go After 2 Years in Production

#134
post #38

Earlier quoted context omitted.

> I think Scala is an Academic language Sometimes "academic" seems like a catch-all for stuff people don't like. Scheme has a strong academic history in its use and implementation, yet it seems to be described as "academic" only when someone is unhappy with how minimalistic it is, which is the opposite issue described here.

Has anyone here used Haskell in a production environment? I want a language that is small, clean, and can provide a lot of static guarantees . I know many people find static guarantees and unacceptable curtailment of their "programming freedom", but frankly I think it's the answer to many of the problems we face in software today. Small is another thing. E.g. Go and Scheme are small . C++ and Scala are large . You kn…

For the "complexity assertion" I think you may be referring to something like this: http://resourceanalysis.cs.ru.nl/

Maybe its not totally exactly what you meant, but it can do basic analysis for loops.

Re: Go After 2 Years in Production

#135
post #83

Earlier quoted context omitted.

Maybe we should do less crying and more contributing. Google has a bit more dev muscle to throw at projects than Mozilla, so community involvement is far more critical to Rust's health.

The Go team at Google consists of a handful of people: http://thechangelog.com/100/

Please, let's not have an argument over which dev team is smarter. The fact is that Go and Rust are very different languages with different goals and feature sets, with different levels of ambitiousness and which started development in earnest at different times.

Re: Go After 2 Years in Production

#136

Earlier quoted context omitted.

It's not cliche, it's just personal. For instance, most of the code I write is numerical code. To that end, any language without operator overloading is a non-starter, since it's far harder to find a bug in: div(add(mult(-1,b),sqrt(sub(pow(b,2),mult(mult(3,a),c)))),mult(2,a)) than it is in (-b+sqrt(b^2-3 a c))/(2*a) On the other hand, if I wrote server code, operator overloading would be far less useful. I'd probably…

If you don't mind me asking, what sort of work do you do where you mostly write numerical code? Academia?

You hit the nail on the head with academia. Physics, to be precise. About 80% of my code is data analysis stuff where I'm just reducing events from data files. The other 20% is monte carlo simulations.

Re: Go After 2 Years in Production

#137

Earlier quoted context omitted.

Have ever tried programming in Go? Edit: Functional Programming in Go 1. http://stackoverflow.com/questions/4358031/functional-progra... 2. http://golang.org/doc/codewalk/functions/

Go doesn't lend itself to functional programming, in part because of its lack of type parametrization. In a language like Scala or Haskell, using functions like map, fold, and filter is clean an idiomatic. In Go, it is so ugly and convoluted that you immediately reject this approach and use for loops instead.

Standing firmly in one paradigm is a good thing for a language IMHO. I've worked in multi-paradigm languages and they suffer from the fact that their communities can't find a common style. "Should I use a fold or a loop or a tail recursion?", or some library designers want to be as typeful as possible, others don't, etc.

Re: Go After 2 Years in Production

#138

Earlier quoted context omitted.

It's not cliche, it's just personal. For instance, most of the code I write is numerical code. To that end, any language without operator overloading is a non-starter, since it's far harder to find a bug in: div(add(mult(-1,b),sqrt(sub(pow(b,2),mult(mult(3,a),c)))),mult(2,a)) than it is in (-b+sqrt(b^2-3 a c))/(2*a) On the other hand, if I wrote server code, operator overloading would be far less useful. I'd probably…

It's not quite that bad in Go, (-b + math.Sqrt(b b - 4 a c)) / (2 a) though if you're using a ton of matrices it could be. I for one have found Go great for computing. The really quick compile times with static checking plus the composability are great. It definitely depends though; while the native concurrency is great there aren't a lot of easy solutions for non-shared memory computations. (I saw an MPI package at…

It's more than just matrices, though. For instance, I have a little library that propagates uncertainty for me. Without operator overloading, I'm back to descending into the rpn hole from my example.

Another poster pointed out unit analysis. I've done this before with custom types that keep track of the units on measurements.

Since you mentioned parallelization, that's another fun toy I've played with. By overloading the operators for an object that defines a snippet of OpenCL code, it's possible to push these snippets through pre-existing functions and have it return a final OpenCL function. You then call that returned function on your arrays of data to run everything through your GPU with just three lines of code changes from the sequential.

Operator overloading is more than just adding matrices. It's a powerful technique that comes in handy almost any time that you're working heavily with numerical data. Of course, it's also dangerous as hell in the wrong hands. The code for the OpenCL example was actually some pretty terrible code that did extremely non-intuitive things during value comparisons.

Re: Go After 2 Years in Production

#139

Earlier quoted context omitted.

It's not quite that bad in Go, (-b + math.Sqrt(b b - 4 a c)) / (2 a) though if you're using a ton of matrices it could be. I for one have found Go great for computing. The really quick compile times with static checking plus the composability are great. It definitely depends though; while the native concurrency is great there aren't a lot of easy solutions for non-shared memory computations. (I saw an MPI package at…

Sorry, new to posting on HN. How do I get asterisk literals?

Make sure there are spaces on both sides. Asterisk: * (plain asterisk surround by spaces). Italics: foo ('foo' surrounded by asterisks).

Re: Go After 2 Years in Production

#140

Earlier quoted context omitted.

It's not quite that bad in Go, (-b + math.Sqrt(b b - 4 a c)) / (2 a) though if you're using a ton of matrices it could be. I for one have found Go great for computing. The really quick compile times with static checking plus the composability are great. It definitely depends though; while the native concurrency is great there aren't a lot of easy solutions for non-shared memory computations. (I saw an MPI package at…

Sorry, new to posting on HN. How do I get asterisk literals?

https://news.ycombinator.com/formatdoc says two leading spaces formats code verbatim:

  (-b + math.Sqrt(b*b - 4*a*c)) / (2*a)
Post reply on HN