Live data from Hacker News

Elixir v1.10

elixir-lang.org

121–130 of 141 posts

Re: Elixir v1.10

#121

Earlier quoted context omitted.

If you really want to learn Elixir, you should learn enough Erlang prior, to get a better understanding of how Erlang/OTP all fits together. Thus, I would recommend the following structure: 1. Read Joe Armstrong's Book: Programming Erlang to learn the basics and the philosophy behind Erlang from one of its creators. [1] 2. Read Erlang and OTP in Action to learn more about the OTP (Open Telecom Platform), applications…

This makes me not want to learn elixir. Learning one language and becoming masterful at it is hard enough. There's too many "learn this language, but also this other language and platform"'s in my life (JVM-based work, and anything in the front-end JavaScript world it feels like these days). It just feels like you are telling people "Here, learn this language, but also learn the assembly instruction set for your arch…

Don't be so easily discouraged!

I think there's a distinction between understanding and learning a language. In this case, it helps to understand Erlang in order to learn Elixir. Just like you're eventually going to need to be able to read some C if you dive really deep into Ruby.

Difference is that C is probably considered basic knowledge for a working programmer, Erlang isn't. Professional programming eventually leads to being a polygot anyway.

Re: Elixir v1.10

#122

Earlier quoted context omitted.

Weird, on the Elixir forums and slack channels there seems to be a fair number of developers working or wanting to work in Elixir. Perhaps the initial uptake in interest outpaced the developer interests in some areas. It'd be interesting to know what the community is like in Europe. Based on the recent formation of Dashbit [1] and larger companies like PepsiCo (?!) among others openly jumping onboard I think means El…

I picked up _Programming Erlang_ because I like Joe. I'm trying to understand why the platform, and the accompanying language(s), aren't more widely used? People seem to speak very highly about Elixir, BEAM, and OTP. It all seems really great... I see comments like This: >A very interesting language on powerful platform with a promising web framework... I talked with a couple of companies that jumped on it initially,…

> I picked up _Programming Erlang_ because I like Joe. I'm trying to understand why the platform, and the accompanying language(s), aren't more widely used? People seem to speak very highly about Elixir, BEAM, and OTP. It all seems really great...

Watching videos of Joe talk super impressed me. He kept the same enthusiasm for programming as any college age programmer. That's impressive!

> From @hajile >>BEAM is about an order of magnitude faster than Cpython ...If you prefer Ruby syntax over Python, there is no contest here. >>BEAM is slower than the JVM, but much more stable. > The second quote seems to be a pretty reasonable trade off (my next question is, how much slower?).

There was a recent web-server benchmark that illustrates the performance and stability trade-off pretty well [1] (or older web-socket one [2]). The StressGrid benchmark shows Erlang/Cowboy achieving about roughly 1/2-1/3 the speed of the compiled options (Java & Go), and roughly double that of NodeJS. Erlang/Cowboy maintained very stable latency numbers after hitting it's peak however (see graph in [3]). There's an oddity with Cowboy 2, that appears to be due to HTTP/2 support but can be disabled (though HTTP/2 in theory should support faster client responses with less multiplexing of HTTP requests).

In general I'd say BEAM is on average faster than CPython, though recent CPython 3.x versions have improved a lot. Importantly BEAM is one of the few dynamic language/VM's that supports multi-core natively (Clojure & Julia for other two main ones?).

> I like functional programming, but experiences do tend to be either: "I love FP" or "Eh, not for me."

True! It seems like either you love FP or hate it. It is a bit painful if you have a bunch of mutations you need to do on a complex object, but there's usually a way to refactor it so you avoid so many mutations. But often you have to think a bit first and be more explicit. On the other hand I modified a short Python script a few weeks back and it took me an hour to find a bug with some variable scoping/shadowing corrupting my data.

> But are these it? I've been getting into erlang lately (to then get into elixir), but I feel like I've been "waiting for the other shoe to drop." As in, I'm wondering if there's some disadvantage that doesn't get talked about. Are there any engineering blogs that talk about using BEAM/Elixir/et al in production?

There certainly are gotchas, with Erlang Distribution in general or with default tools like Mnesia (split brain, 2G file limit). One gotcha I saw from a great Youtube talk (that I can't find) was when using the standard Erlang distribution to distribute jpeg images. Erlang distribution network normally only opens one connection between each node, which when you try to send lots of large binaries will get saturated. Then things like PG2, and health checks, etc which require low latency will start breaking. That team solved their issue by creating a separate connection plane for image data, a few hundred lines of code. Similar issues can (apparently) can happen with BEAM software like RabbitMQ as well since it uses Erlang distribution internally. There's plenty of stories from people recovering from errors [like 4]. Erlang Solution's has a great collection of videos and blogs on Erlang & Elixir.

I'd agree with sibling comments, learning Elixir first is just much nicer for many devs used to Ruby or Algol family syntax. Capitalized variable names confuse me to no end in Erlang code.

1: https://stressgrid.com/blog/webserver_benchmark/ 2: https://hashrocket.com/blog/posts/websocket-shootout 3: https://stressgrid.com/blog/webserver_benchmark/response_lat... 4: https://www.slideshare.net/GiltTech/riak-a-successful-failur...

Re: Elixir v1.10

#123

Earlier quoted context omitted.

I picked up _Programming Erlang_ because I like Joe. I'm trying to understand why the platform, and the accompanying language(s), aren't more widely used? People seem to speak very highly about Elixir, BEAM, and OTP. It all seems really great... I see comments like This: >A very interesting language on powerful platform with a promising web framework... I talked with a couple of companies that jumped on it initially,…

> I picked up _Programming Erlang_ because I like Joe. I'm trying to understand why the platform, and the accompanying language(s), aren't more widely used? People seem to speak very highly about Elixir, BEAM, and OTP. It all seems really great... Watching videos of Joe talk super impressed me. He kept the same enthusiasm for programming as any college age programmer. That's impressive! > From @hajile >>BEAM is about…

P.S. Hope you enjoy learning OTP style programming!

Re: Elixir v1.10

#124
I'm curious to know more about the total cost of ownership of Elixir.

What's it like finding other developers with experience?

How long does it take to train people up?

How easy to understand the code base is it for developers who are 2 generations down from those that wrote it?

How good is the tooling/support/interoperability? When I'm using X service, do they already have an SDK are do I have to build it from scratch every single time because I'm using Elixir and not say Java or .NET.

What's the general level I have to hire at? Can the "average" developer (who's not that great let's be honest) learn it and be productive or do I need to hire very good developers for every seat (read more expensive)

I feel like language features and syntax is close to the bottom of things to consider...

Re: Elixir v1.10

#125

I'm curious to know more about the total cost of ownership of Elixir. What's it like finding other developers with experience? How long does it take to train people up? How easy to understand the code base is it for developers who are 2 generations down from those that wrote it? How good is the tooling/support/interoperability? When I'm using X service, do they already have an SDK are do I have to build it from scrat…

Speaking as a sometimes Erlang developer: the ecosystem certainly isn't as universal as language $FOTM. That said, Erlang's concurrency primitives and runtime are second to none, and there is little that is more battle-tested in the industry.

Individually developers will be more expensive, but if you have a product that demands maximum leverage of concurrency (i.e. data-heavy api, whatever-in-the-middle services, multiparty real-time data), you will more than makeup the developer premium when you get to that point.

I havent hit Elixir yet, but it seems to make access to the Erlang runtime much easier. As far as SDKs/api, Erlang itself has primitives and libraries to build useful access to most APIs you can find. If you're worrying about what services you can access though, you probably don't need Erlang's features, at least not yet.

Re: Elixir v1.10

#126
post #117
post #115

Earlier quoted context omitted.

It's much more common than just Elixir programmers. It's a common concept in computer science, particularly in functional programming or languages which permit function overloading on arguments. https://en.wikipedia.org/wiki/Arity Edit to add: I've heard and used arity for at least 10 years, in particular in the Clojure community. I've heard of Elixir and understand it shares some common ideas with Clojure and Ruby,…

In functional programming classes at the uni you probably wouldn't hear this because if they teach Haskell which I assume most do, every function always takes just one argument. That's because functions are curried by default. I personally haven't really heard this mentioned anywhere outside of the Erlang/Elixir sphere.

This thread really surprised me - I learned about arity when learning about ternary operators, which are pretty universal - you can find ?: in all sorts of languages. I think I was learning about C when I first got a detailed explanation on the subject.

Re: Elixir v1.10

#127

Earlier quoted context omitted.

Weird, on the Elixir forums and slack channels there seems to be a fair number of developers working or wanting to work in Elixir. Perhaps the initial uptake in interest outpaced the developer interests in some areas. It'd be interesting to know what the community is like in Europe. Based on the recent formation of Dashbit [1] and larger companies like PepsiCo (?!) among others openly jumping onboard I think means El…

I picked up _Programming Erlang_ because I like Joe. I'm trying to understand why the platform, and the accompanying language(s), aren't more widely used? People seem to speak very highly about Elixir, BEAM, and OTP. It all seems really great... I see comments like This: >A very interesting language on powerful platform with a promising web framework... I talked with a couple of companies that jumped on it initially,…

>Are there any engineering blogs that talk about using BEAM/Elixir/et al in production?

Blogs from the Discord team pop up occasionally. They're primarily an Elixir shop with some Rust thrown in (via NIF w/ Rustler)

https://blog.discordapp.com/tagged/elixir

Re: Elixir v1.10

#128
post #120

Earlier quoted context omitted.

Honestly I think you are doing things backward. With all due respect to the fantastic platform and vm that the erlang folks built, it's just not as joyful as elixir. And I feel like writing legible and organized code is easier in elixir since it's opinionated, about everything from directory structure to documentation to tests, and a couple of detailey things like structs are easier to read than records and macros ar…

Definitely agree, though I respect the effort/desire to learn Erlang first given the fact the first time I saw Erlang code I was so confused/put off by it, the syntax was so foreign (not c-like, not lispy), variable names up capitalized, atoms are bare words, source files are just tons of functions, the tooling isn’t anything like modern languages (though since Elixir and hex/mix, that situation has gotten way better…

You may like this: the very odd gen_statem callback pattern exists to group different callbacks by state (which you can't do because you need to group like headers together). But in Elixir, we use modules and macros to organize our code more sanely and less ad-hoc-ey:

https://hexdocs.pm/state_server/StateServer.html

Re: Elixir v1.10

#129
post #19

This is the first release of Elixir after the Nubank acquisition of the parent company - http://blog.plataformatec.com.br/2020/01/important-informati...

Apparently José Valim is no longer at plataformatec: https://twitter.com/josevalim/status/1219264309202771968 Now at https://dashbit.co/

Whoa. Then what did Nubank acquire then ?

I thought it was the talent.

Re: Elixir v1.10

#130

A very interesting language on powerful platform with a promising web framework. Many saw it, myself included, as a Ruby / Rails Improved, and expected its quick growth. Unfortunately, initial enthusiasm a few years ago did lead to its wide adoption. I talked with a couple of companies that jumped on it initially, but later decided to move to Java, Kotlin, Go. The main reason was difficulty to hire engineers to scale…

I learned Elm and Elixir few years ago. In both case, it took me about a week from "hello, world" to having the feeling that I can program in that language. I did this using only online learning materials and the support forums for those languages. With a colleague available I imagine that things would have been even smoother.

A lot of companies vastly overestimate the difficulty of getting a decent developer up to speed with a new language. In a lot of cases, it might be easier to learn a new language than a new, complex library for a language that you already know.

Post reply on HN