News for hackers. Stuff that matters.
Re:Go hits the concurrency nail on the head by erokar on Thursday October 04, 2018 @01:20PM (#18141782)
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.

Re:Go hits the concurrency nail on the head by vvanders on Thursday October 04, 2018 @01:21PM (#18141792)
I think the main argument is that Elixir isn't as mainstream which is a fair point.

That said I agree with everything, Erlang pioneered in this space and has shown to scale very well[1] in a proven way over the last few decades.

[1] https://phoenixframework.org/blog/the-road-to-2-million-webs...

Re:Go hits the concurrency nail on the head by mirceal on Thursday October 04, 2018 @01:41PM (#18141968)
Yes. Because mainstream is what you should select for when choosing your tools.

On a more serious note: I’m very wary of people that have discovered the one true language, framework, etc.

That’s how you end up with 100 lines of go instead a one line bash script. That’s how you end up with “java developers” that are more concerned with design patterns instead of actual working code. I could go on.

Learn about as many things possible, form your own opinions, choose the right tool for the job.

Re:Go hits the concurrency nail on the head by CydeWeys on Thursday October 04, 2018 @01:51PM (#18142045)
I've found that being mainstream is the most important factor in choosing tooling. Being mainstream has incredible advantages. It means you're going to find lots of help, resources, answers to questions, sample code, and high quality and well maintained libraries.
Re:Go hits the concurrency nail on the head by cube2222 on Thursday October 04, 2018 @02:01PM (#18142115)
It's the only thing really holding me back from going more into Rust.

At the same time, there is a sweet spot in popularity, when there is a very good quality/noise ratio in the library ecosystem, I'm not sure though, if rust's there at the moment.

Re:Go hits the concurrency nail on the head by XorNot on Thursday October 04, 2018 @07:17PM (#18144495)
Losing static compilation, Go-style, holds me back from Rust. The sheer number of platforms I can target with Go without doing anything special is amazing, whereas Rust forces me down the libc merry go round again.

A reliable recipe for 0 dependency Rust binaries so long as I stayed in the Rust ecosystem would be a good motivator to use it.

Re:Go hits the concurrency nail on the head by steveklabnik on Thursday October 04, 2018 @07:23PM (#18144516)
As long as you’re on Linux, it’s quite easy to use MUSL. Other platforms don’t offer something comparable, so we’re kinda stuck.
Re:Go hits the concurrency nail on the head by mirceal on Thursday October 04, 2018 @04:08PM (#18143227)
I'm sorry but that argument does not hold much water. Any developer with [maybe] the exception of people fresh out of school can and should be able to learn new things. Fast. On-the-job. If you really believe that you're going to use X because it's mainstream and really popular and be okay you're kidding yourself. Also, as you grow older, you learn to see the matrix and appreciate new things that come along when/after you use them and are able to see how they are better or worse iterations on ideas that were already out there.

Also to answer your comment directly. Being mainstream != lots of help, resources, answers, samples, high quality/well maintained libraries. Being mainstream means that a lot of people have heard about you and a lot of people try using you / pick you up. Sometimes mainstream things do get to that place, sometimes you find yourself in an immense "the emperor has no clothes" ecosystem where everyone wants to use X because it's the cool/hot new thing. If you don't understand what the tool you want to use is good for and you forge ahead, most of the times, you will have a bad time.

Re:Go hits the concurrency nail on the head by int_19h on Friday October 05, 2018 @08:24PM (#18152774)
> If you really believe that you're going to use X because it's mainstream and really popular and be okay you're kidding yourself.

Actually, if there's anything that someone fresh out of school learns in the industry, is that you do use things that are mainstream and really popular (in the particular niche you're targeting), because that's what your colleagues and management expect.

OTOH, when people come and say, "we'll rewrite this in X - it's the hot new thing, and it can do it all so much better, so don't worry about IDE support etc!", and push it through, the usual consequence 3-5 years later is a bit-rotting codebase that is hard to work on and maintain, because the people who pitched it have moved on, the tooling was never great and now doesn't even see bug fixes, and new developers on the team have to undergo a long initial ramp-up process to be able to do anything.

Sometimes it works out, sure. Usually when the hot new thing becomes mainstream eventually. But most of them don't, so unless you like to gamble, the safest bet is to wait and see and then adopt it. Let someone else be the guinea pig. The more immediate productivity gain is very, very rarely worth the pain.

Re:Go hits the concurrency nail on the head by mmjaa on Thursday October 04, 2018 @01:57PM (#18142094)
.. and of course, the old standard, if its mainstream .. you are replaceable.
Re:Go hits the concurrency nail on the head by fixermark on Thursday October 04, 2018 @02:02PM (#18142128)
Totally agree, with the added observation that as a software engineer, I want to be replaceable. If my software can't be divorced from its creator, it can't outlive me. I don't want to be glued to my work inextricably; if you can't be replaced, you can't be promoted.
Re:Go hits the concurrency nail on the head by mirceal on Thursday October 04, 2018 @04:11PM (#18143247)
being replaceable is a noble goal. the problem is that maybe some people don't want to be replaceable and maybe they want/seek to gain some kind of job security through the tooling they use, their idiosyncratic processes or just through rejection of new technology. those people are IMHO doomed to obsolescence.
Re:Go hits the concurrency nail on the head by nicheftw93 on Thursday October 04, 2018 @03:10PM (#18142713)
Anecdote time: making yourself too specialized makes you easily replaceable too.

At a previous gig, a problem dev, who insisted on only using Erlang, was painted into a corner by eng at large who did not want to learn/support another language (Ruby, Python, JS, Java, and R were all over).

This dev eventually got fired, as they didn't really contribute much to "the big picture". Since their efforts were so limited in scope, their Erlang work was quickly replaced using the other languages, and consumers of the results never noticed.

YMMV. But that's a old standard that should probably die

Re:Go hits the concurrency nail on the head by enraged_camel on Thursday October 04, 2018 @04:28PM (#18143370)
If everyone chose mainstream languages we would never invent and adopt any other language ever.
Re:Go hits the concurrency nail on the head by EpicEng on Thursday October 04, 2018 @07:30PM (#18144553)
Luckily we don't live in that world and never will.
Re:Go hits the concurrency nail on the head by hmschreck on Thursday October 04, 2018 @01:55PM (#18142080)
We had a developer interview here who was an Elixir zealot - and I use that word entirely purposefully. He was very adamant that we needed to rewrite our entire platform in Elixir because it was obviously better.

We ended up not hiring; he refused to touch certain technologies that make up a core part of our stack (Node being the biggest issue), and he was honestly something of a massive tool -- on our take-home thing (takes most developers maybe a few hours) he limited himself to one hour, didn't get it done, wasn't even solving the right problem, and, when he sent in his solution... "It's ok, I know you won't get it, but that's OK."

Re:Go hits the concurrency nail on the head by fnordsensei on Thursday October 04, 2018 @04:48PM (#18143530)
Being selective about the language you work with is entirely valid. But why would you go to an interview where they're not looking for your language and try to convince them otherwise? It seems futile.
Re:Go hits the concurrency nail on the head by tsmarsh on Thursday October 04, 2018 @05:49PM (#18143966)
I had a weird experience where I was offered an interview at a company I respected, but who used ruby a lot. I explained that to everyone in the chain that I'd want to try and work to change that, and eventually got rejected because I didn't like ruby.

It was a weird experience. But I got a nice lunch out of it. I'm still not sure what they got out of it.

Re:Go hits the concurrency nail on the head by mirceal on Thursday October 04, 2018 @04:21PM (#18143319)
a zealot is a zealot is a zealot. you don't get much info from the strong preferences of a zealot. you just quickly learn that you need to avoid them. refusing to touch the tech stack of the person that pays your bills if flat out stupid. if you don't touch it why am I hiring you? depending on how much experience this person had this behavior may be correctable if he/she is lucky enough to find a more senior developer that can show them how their [stupid] choices impact the project and how they can eliminate whole classes of problems by choosing the right tool.
Re:Go hits the concurrency nail on the head by EpicEng on Thursday October 04, 2018 @02:54PM (#18142528)
Run, run far away... (I realize you did, but man...)
Re:Go hits the concurrency nail on the head by EpicEng on Thursday October 04, 2018 @02:50PM (#18142494)
>Yes. Because mainstream is what you should select for when choosing your tools

It's a hugely important consideration. More devs, larger community, better support, more/better tooling, more libs, etc. If you don't think those matter then you're only concerned with pet/toy projects.

Re:Go hits the concurrency nail on the head by fnordsensei on Thursday October 04, 2018 @04:55PM (#18143581)
There's also a zero chance of working with anything that's better than mainstream.
Re:Go hits the concurrency nail on the head by EpicEng on Thursday October 04, 2018 @07:29PM (#18144547)
Ummm... ok? I don't know about you, but I like building things that solve problems. Tools are important, but they're not a goal unto themselves. If your 'better' language is beautiful, but lacks the ecosystem people solving real problems actually need to get work done, it's not actually better.
Re:Go hits the concurrency nail on the head by fnordsensei on Friday October 05, 2018 @04:24AM (#18146573)
Language is too restrictive to consider in isolation if we're talking about "the tools". And I'm personally more interested in effectiveness than beauty, although I'll grant that beauty could have some influence on effectiveness perhaps.

Ecosystem is not a binary proposition: either there, or not there. At some point the ecosystem becomes solid enough for some purposes.

Finally, if no outliers were ever a better choice than the status quo, the status quo would never change. Therefore, there are always some outliers that can be chosen for greater effect at the cost of accepting some perceived risk. Using tooling smack in the middle of the average zeroes the potential increase in effectiveness as well as the perceived risk.

Re:Go hits the concurrency nail on the head by xor1 on Thursday October 04, 2018 @03:03PM (#18142641)
>Yes. Because mainstream is what you should select for when choosing your tools.

Ease of hiring experienced developers should absolutely be a part of selection criteria, but of course it should not be the only one. What good is it going to do you when you picked Elixir/Scala/Rust over Python/Go/Ruby, you need to hire senior engineers who can hit the ground running ASAP, and you have limited resources/budget?

It's going to be harder to find them (especially if you're not in SF), it's a harder/longer initial learning curve if you hire senior engineers without prior experience, it's going to be harder to find non-seniors, you're going to have to pay more to get what you want...the list goes on.

Re:Go hits the concurrency nail on the head by mirceal on Thursday October 04, 2018 @04:14PM (#18143272)
a senior developer, by definition, will hit the ground running with mostly anything you use. that's the senior part in senior developer. also if you believe that people need years of use to be good in any language/tools/framework you need to figure out how to attract better people.

also, the question you need to ask yourself is: do you want to build something with a technology you've selected and think it's the best or do you want to have someone that can pick the right tool for the job pick the tech? sometimes, not building something or various parts of something is more valuable that building something that you don't need fast.

Re:Go hits the concurrency nail on the head by xor1 on Thursday October 04, 2018 @08:41PM (#18144822)
>a senior developer, by definition, will hit the ground running with mostly anything you use. that's the senior part in senior developer.

a senior developer also gets to be picky in what stacks they want to work with. usually it's what they are familiar and comfortable with, or something similar to it

>also if you believe that people need years of use to be good in any language/tools/framework you need to figure out how to attract better people.

even the best engineers have ramp-up time when starting a new job that involves a new code base. that ramp-up time is increased significantly when it's a language that they aren't familiar with. feel free to convince me otherwise, im all ears

>sometimes, not building something or various parts of something is more valuable that building something that you don't need fast.

what about when it's not?

Re:Go hits the concurrency nail on the head by opportune on Friday October 05, 2018 @12:22AM (#18145740)
I don't think it makes sense to group Scala with Elixir and Rust because it interfaces so easily with Java and is used a lot for Spark applications
Re:Go hits the concurrency nail on the head by le-mark on Thursday October 04, 2018 @01:35PM (#18141917)
How are the deployment, library ecosystem, build, and tooling stories for Elixir?

Note I don't really care about the answer to the above, I just wish as a profession we could get past the tribalism and boosterism and have rational technical dicussions about things that matter as opposed to banal declarations about 'expressiveness' etc.

Re:Go hits the concurrency nail on the head by erokar on Thursday October 04, 2018 @02:07PM (#18142163)
The article concludes: "If concurrency is central to your application, Go is the language to use."

If we as a profession are to "get past the tribalism and boosterism and have rational technical discussions", surely other languages/technicques like Pony, Haskell, Clojure, Kotlin, Scala/Java combined Akka etc. should be considered and discussed? The article reaches its conclusion much to easily.

With regards to expressiveness: Go is a lower level language and has fewer language constructs and abstractions than most other modern languages. This is by design, and many seem to appreciate that simplicity. I was simply stating a fact when I said Elixir was more expressive and did not intend to offend anyone. I seem to have done so regardless.

Re:Go hits the concurrency nail on the head by xyproto on Thursday October 04, 2018 @01:45PM (#18142002)
Implementing a 3D vector or quaternion library in Go feels like a really bad fit, mainly due to the lack of operator overloading (which can easily be abused, like >> in C++). But it is an example of a field where Go allows programmer to express their ideas in a less direct way.

I think Go is great, but I don't think describing parts of it as less expressive than some other languages is banal.

Expressiveness has a sweet spot, though. Too many keywords and constructs makes a language harder to learn, and makes it too easy for developers to build their own little weird worlds that discourages team work and lowers readability.

Re:Go hits the concurrency nail on the head by fixermark on Thursday October 04, 2018 @02:01PM (#18142116)
That exists, so we can look at at least one concrete attempt to evaluate the question. [https://github.com/go-gl/mathgl].

And right off the bat, the first thing a person notices is that there are two identical sub-libraries, mgl32 and mgl64, to work around the language's constraint that the core numeric type in the library cannot be parameterized at the language level without performance-losing reflection.

Re:Go hits the concurrency nail on the head by jeremejevs on Friday October 05, 2018 @04:45AM (#18146655)
mgl64 is generated from mgl32 though [0], so no big deal, no? Who's hurt by this?

[0] https://github.com/go-gl/mathgl#contributing

Re:Go hits the concurrency nail on the head by fixermark on Friday October 05, 2018 @03:01PM (#18150789)
Well, let me just do a quick text-based search for the Vec3 implementation and...

... oh. There's three. The one in mgl64, the one in mgl32, and the canonical one that a developer should edit to make changes. And they only all stay synchronized if the developer remembers to follow the contributor practice and run that gen script, which is not enforced by anything.

On a small project like this, not a big deal. But it's indicative of the over-arching problem of the approach go is necessitating here. There's noise here that a developer has to think around, and as a project scales up, that noise is going to become louder and trend towards intractable complexity.

Re:Go hits the concurrency nail on the head by andy_ppp on Thursday October 04, 2018 @02:11PM (#18142201)
Libraries are considerably better than Golang and more all encompassing because you have 20 years of Erlang libraries that you can just use.

Deployment is getting better and you can just great a release in a docker image and deploy that like you would anything else. Obviously it's no way near as small (or simple) as FROM scratch is with Golang binaries.

Tooling is fantastic in some ways and poor in others - for example you can get an interactive IEx terminal running onto your Elixir cluster to debug issues, although I'm not sure about the other parts. Dependancy management is fantastic and something Golang struggles with. Not sure about other tools for Golang though!

The final thing I'd say is once you have a runtime that has Supervision and restarting of processes you never want to go back to worrying about what to do in the cases you haven't considered.

Re:Go hits the concurrency nail on the head by jerf on Thursday October 04, 2018 @03:12PM (#18142727)
"Libraries are considerably better than Golang and more all encompassing because you have 20 years of Erlang libraries that you can just use."

I'm wouldn't be sure of that anymore. For instance, Go has an official AWS SDK but Erlang does not. Go's been around for 8 years now and it is almost certainly significantly more popular than Erlang. It's been a while since I reached for a library for Go and couldn't find anything at all. (Though I have recently been in the "three libraries that all seem like 80% of the job is done with varying degrees of quality" situation. But you still get that in Erlang in similar places too, as far as I know.)

Re:Go hits the concurrency nail on the head by andy_ppp on Friday October 05, 2018 @05:16AM (#18146763)
It's the whole importing packages is just a checkout from master that makes me concerned about package stability. Semver exists for a reason. I realise this is nearly fixed but it's very slow in coming.

To be honest I feel you really will struggle in Golang to make software that is as reliable as Erlang/Elixir simply because the language is immutable and allows for concurrency by using many serial processes (Actor model) and has supervision of processes (let it crash) and also worth noting once you have used compile time macros the way Elixir does it you never want to go back to repeating yourself the way Golang forces you to. In fact I should write up my proposal for macros being added to Golang as an alternative to Generics...

If you are building something like Docker I'd argue Golang is maybe a more suitable choice but for Web software and stable concurrency Elixir is miles ahead.

Re:Go hits the concurrency nail on the head by di4na on Thursday October 04, 2018 @08:26PM (#18144764)
Deployment: super easy, highly maintained and ready tool that output fully instrumented and tooled tarball with start, stop and remote console script. Even come with configuration solved. Neex no dependencies outside of possible dynamically linked C one like openssl if you use it

Build: same, come fully ready out of the box.

Library: there is everything and you can use any erlang library for free. 35 years of production experience.

Tooling: see above. Everything to debug and instrument on the fly. Dynamic tracing for everything for free. Logger. Etc etc. Fully interoperable runtime dynamically for free. Advantage of using a runtime that has spent 35 years optimising for reliability in production.

So yeah. We could but then people would not understand. Erlang/Elixir have a decade of advance over Go for that kind of tooling and production-readiness

Re:Go hits the concurrency nail on the head by alberth on Thursday October 04, 2018 @01:28PM (#18141856)
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.
Re:Go hits the concurrency nail on the head by jlouis on Thursday October 04, 2018 @03:25PM (#18142857)
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 by macintux on Thursday October 04, 2018 @02:44PM (#18142443)
Erlang, I think, is crippled out of the box wrt performance by its emphasis on immutable data, live troubleshooting, small processes with lots of messaging, etc.

These are the things that make it a brilliant language for use cases where it's well-suited. Not every language has to be a kitchen sink language like Java, thankfully. I like opinionated languages with well-defined strengths and weaknesses.

Re:Go hits the concurrency nail on the head by siscia on Thursday October 04, 2018 @02:24PM (#18142290)
The architecture of the BEAM is quite complex.

I don't believe you could reach the same raw performance that you have with go.

However it is an unfair comparison, BEAM processes do much more than coroutines.

Re:Go hits the concurrency nail on the head by notriddle on Thursday October 04, 2018 @03:31PM (#18142919)
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 by jashmatthews on Thursday October 04, 2018 @05:06PM (#18143673)
Erlang 19 is only 10% faster than CRuby 2.3 on a simple factorial bench. Web throughput is even closer as lots of it is C extensions.

I haven't made the comparison myself for a while but I suspect it's still very close.

Re:Go hits the concurrency nail on the head by rozap on Thursday October 04, 2018 @04:41PM (#18143482)
I don't think it's going to happen, due to the stack+heap per process and lack of shared memory (ok yea ETS sure) which you need for fault tolerance, necessarily requiring more copying than conventional languages. I think there are different tradeoffs that make good CPU bound performance (like Java or Go) on BEAM pretty much impossible.
Re:Go hits the concurrency nail on the head by rwcarlsen on Thursday October 04, 2018 @01:22PM (#18141800)
I think most reasonable people wouldn't have trouble defending a position that Elixir isn't a particularly "popular" language - at least compared to Go.
Re:Go hits the concurrency nail on the head by erokar on Thursday October 04, 2018 @01:26PM (#18141833)
I agree Go is more popular than Elixir — but is it actually a popular language? At least I wouldn't consider it mainstream in the sense Java, C# and Python are.
Re:Go hits the concurrency nail on the head by hyperpape on Thursday October 04, 2018 @01:28PM (#18141858)
It doesn’t really matter where you draw “the” line for mainstream languages, so much as that there is some reasonably drawn line between Go and Erlang/Elixir.
Re:Go hits the concurrency nail on the head by JepZ on Thursday October 04, 2018 @01:36PM (#18141925)
Well, just ask the Toibe index:

https://www.tiobe.com/tiobe-index/

It looks like Elixier ist by far less popular than the other discussed languages.

Re:Go hits the concurrency nail on the head by TJSomething on Thursday October 04, 2018 @02:07PM (#18142164)
I personally prefer the RedMonk rankings [1] over TIOBE, since TIOBE's entirely about Google hits, which lags as an activity indicator by a few years, because sites for languages that have stopped being used stay around for years. Also, Google hits counts are really noisy, especially for languages that have names that are also words, like Go and Elixir. RedMonk uses recent GitHub and Stack Overflow activity as a proxy for popularity.

In this case though, Elixir is still way lower, at somewhere around 30th compared to Go's 14th.

[1] https://redmonk.com/sogrady/2018/08/10/language-rankings-6-1...

Re:Go hits the concurrency nail on the head by CydeWeys on Thursday October 04, 2018 @01:54PM (#18142065)
Huh, I'm super surprised that VB .NET is growing. I used it at my last job briefly for unfortunate historical reasons and we were trying to run screaming away from it as fast as possible to C#. It felt like the runt of the litter of the .NET ecosystem; so many things worked better in C#.
Re:Go hits the concurrency nail on the head by brightball on Thursday October 04, 2018 @01:38PM (#18141937)
You’re not wrong. No matter the available constructs, there on concurrency guarantees that you can’t make in any language with a shared memory model.

Everything has tradeoffs.