Live data from Hacker News

Go hits the concurrency nail on the head

eli.thegreenplace.net

111–120 of 318 posts

Re: Go hits the concurrency nail on the head

#111

Earlier quoted context omitted.

Hah! Good one. To anyone else not in on the joke, parent is referring to the language that is often discussed on HN and known for having a sometimes overly enthusiastic community, Pony: https://www.ponylang.io/

Isn't Pony the language where x / 0 == 0 ?

Yes but you can also have it be an error by doing x/?0 using the latest code on master.

Re: Go hits the concurrency nail on the head

#112

Don't disagree with the challenges about other languages being equally applicable. My first thought was also "Erlang does it at least as well as Go". Reasonable challenges on whether Erlang (or Elixir/Pony/...) are mainstream though. For me the more valuable point is not that Go specifically gets it right: it's that async - as implemented in javascript/python/java/c# and so on - is fundamentally wrong. These two quot…

Shared-memory threads are worse than async/await. I'd rather have GOTO than data races, since, while it might be hard to model in your head, at least it's deterministic and using it wrong doesn't cause UB.

p.s. https://vorpus.org/blog/notes-on-structured-concurrency-or-g...

Re: Go hits the concurrency nail on the head

#113
post #12
post #3

According to the author Go make concurrent programming "the best experience, by far, compared to other popular programming languages today." I beg to differ. I fail to see why I should choose Go over Elixir/Erlang for concurrency. Elixir's cuncurrency mechanisms are at least as good — and I would argue better — than Go's, and Elixir as a language has an expressiveness that Go lacks.

I really wish someone like Mike Pall (of LuaJIT fame) would work on BEAM to make it computationally as fast as Go on raw performance.

The recent Erlang release (21) changed a lot of the internal interpreter structure with a nod in Mike Pall's direction. Just by shortening the typical opcode size down, they gained 20% speed boost. And the BEAM is a pretty good interpreter anyway.

JITing the beast has been a want for a while, but there are also other paths taken right now which can provide speed boosts, among other a translation of the compiler to use SSA-representations.

Re: Go hits the concurrency nail on the head

#114

Go concurrency is just threads. It's a particularly idiosyncratic userland implementation of them. There are two claims here I'd like to unpack further: 1. "I've measured goroutine switching time to be ~170 ns on my machine, 10x faster than thread switching time." This is because of the lack of switchto support in the Linux kernel, not because of any fundamental difference between threads and goroutines. A Google eng…

Doesn't catch everything, but it catches a lot: https://golang.org/doc/articles/race_detector.html

It's great when it works though; I thought I was running into a race condition once but wasn't sure (new to the language), and having something verify it was indeed a race condition was really awesome.

Re: Go hits the concurrency nail on the head

#115
post #12
post #3

According to the author Go make concurrent programming "the best experience, by far, compared to other popular programming languages today." I beg to differ. I fail to see why I should choose Go over Elixir/Erlang for concurrency. Elixir's cuncurrency mechanisms are at least as good — and I would argue better — than Go's, and Elixir as a language has an expressiveness that Go lacks.

I really wish someone like Mike Pall (of LuaJIT fame) would work on BEAM to make it computationally as fast as Go on raw performance.

The BEAM is already much more performant than, for example, the Ruby reference implementation. And look at what people have managed to build with Ruby!

Re: Go hits the concurrency nail on the head

#116

Don't disagree with the challenges about other languages being equally applicable. My first thought was also "Erlang does it at least as well as Go". Reasonable challenges on whether Erlang (or Elixir/Pony/...) are mainstream though. For me the more valuable point is not that Go specifically gets it right: it's that async - as implemented in javascript/python/java/c# and so on - is fundamentally wrong. These two quot…

Why nobody considers PHP as a better alternative for this? Concurrency is a solved problem and Go just makes these things too complicated.

Re: Go hits the concurrency nail on the head

#117
post #110
post #75

Earlier quoted context omitted.

Modula-2 used to fit all those points, except backed by major corporation, unless we consider GM a major corporation.

I consider Go as a Modula-2 successor. It shares most traits I liked a lot with Modula-2. I prefer the C-style syntax to the more long-winded one though. The familiarity is no surprise though, considering that Robert Griesemer is a student of Wirth.

Oberon (which is a successor of Modula-2)

Re: Go hits the concurrency nail on the head

#118

Earlier quoted context omitted.

What a lovely fusion of the blub paradox and a middlebrow dismissal.

Kind of, though your tone seems a bit dismissive. In the end, the Node/JS community, mostly because of npm, has a lot to offer and that is the ability to create a working product more quickly than most other options in most conditions.

Ruby/Rails users will say the same.

Re: Go hits the concurrency nail on the head

#119

Or you could just use the Actor model, which I like much better than CSP. (Or at least I think I'll like it better when I finally understand it.)

The Actor model is trivially implementable with CSP.

And CSP is trivially implementable using the Actor model. What's your point?

Re: Go hits the concurrency nail on the head

#120

Go concurrency is just threads. It's a particularly idiosyncratic userland implementation of them. There are two claims here I'd like to unpack further: 1. "I've measured goroutine switching time to be ~170 ns on my machine, 10x faster than thread switching time." This is because of the lack of switchto support in the Linux kernel, not because of any fundamental difference between threads and goroutines. A Google eng…

So what's preventing Linux from adopting switchto support? I'd love to see the discussion around it.
Post reply on HN