Live data from Hacker News

Elixir 1.5 released

github.com

71–80 of 167 posts

Re: Elixir 1.5 released

#71

There's quite a few nifty little things in this one. I'm not sure I like the child_spec change, personally I like the supervision mode to be explicit when calling children. I do like the developer tools, the breakpoint support, the UTF8 for atoms (which I'm realizing we may want in our DSL since we're converting user input strings to atoms), and the @impl that allows to explicitly declare which functions are there fo…

> which I'm realizing we may want in our DSL since we're converting user input strings to atoms

careful there. Theres a hard limit on the number of atoms that can be created in an environment, and serializing user input to atoms can get dangerous

Re: Elixir 1.5 released

#72
post #70

Earlier quoted context omitted.

Also, Bleacher Report is a pretty large site on it: http://www.techworld.com/apps-wearables/how-elixir-helped-bl... They went from 150 Rails servers to 5 BEAM servers "and could probably get away with two" (!)

This seems to be the dominant use case for Elixir; migrate legacy Rails code to Elixir. When deciding between Go and Elixir for our startup I looked at both ecosystems. Go was significantly ahead in all categories: traction, articles on the web, packages on git, git activity, editor support ... I don't regret choosing Go but I always keep an eye out on Elixir. Pattern matching, pipe operator, immutability, supervisor…

I LOVE the pattern-matching/deconstruction/guards stuff. It eliminates SO much boilerplate logic. Just the function head of an Elixir function eliminates a dozen input validation and assignment lines in most other languages. It wouldn't be nearly as spectacular if it didn't pervade the entire language, though (for example, I'm sure you could get partway there in many other languages using a DSL)

Same thing with immutability. If it doesn't pervade the entire language, it feels slapped-on, and you basically lose most (all?) of the guarantees (like removing an entire class of bugs caused by mutability).

I saw what you saw in Go, but in doing my homework, I also saw an astonishing amount of ugliness[1][2][3], and additionally I took a bit of actual offense to the core philosophy of Go's design as stated by Rob Pike himself[4][5] so I am betting on (hoping for?) spectacular Elixir adoption I guess lol, as my current and all future projects for the foreseeable future will be in Elixir.

About the only wart I've seen so far in Elixir is the pin operator[6], but that was necessary to preserve the name-rebinding ability in a pattern-matching context, and it stops seeming like a wart fairly quickly, once you realize why it's necessary.

[1] https://anvaka.github.io/common-words/#?lang=go makes it seem like 50% of the day-to-day code in the language is error-checking due to the lack of exceptions

[2] https://github.com/ksimka/go-is-not-good

[3] http://byrd.im/go-is-poor/

[4] http://nomad.so/2015/03/why-gos-design-is-a-disservice-to-in...

[5] I'm actually a fan of Plan9 and appreciate Rob Pike's work on that

[6] https://stackoverflow.com/questions/27971357/what-is-the-pin...

Re: Elixir 1.5 released

#73
post #66
post #60

What do people use as a PaaS provider for Erlang/Elixir?

Heroku is fine for development. However, it does not work with hot code swapping. There are ways around it, and some people don't believe it's a gain. There is also https://github.com/hashrocket/gatling that promises the Git push workflow but with hot upgrading capability.

Heroku is OK as a deployment platform. Hex powers Erlang/Elixir communities on a small Heroku dyno ($7). And 99% of Elixir developers should not worry about hot code swapping anyway. Let your load balancer or your PaaS take care of it.

Re: Elixir 1.5 released

#74

Earlier quoted context omitted.

It's got HN hype and a lot of the negatives that come with that (awful learning materials by people who haven't used it in production) and a decent amount of real world use though nothing major for now.

I believe Discord uses Elixir, and I think that counts as "major."

Love Discord

Re: Elixir 1.5 released

#75

I highly recommend playing with Elixir or another purely functional language. I've only gone through the Programming Elixir book[1], but it has fundamentally challenged how I think about solving problems in other languages. [1]( https://pragprog.com/book/elixir13/programming-elixir-1-3 )

Beware, because it can make you hate your current day-job language

But then you'd be ready to start on a new day job with tools and concepts you really enjoy using ;-)

It's not just a matter of syntax and such but a whole new way of thinking - specifically immutability, functional aspect, using lightweight processes, hot code loading, sane handling of crashes and restart, easy tracing, etc. allow approaching and solving problem in whole new ways that is often a lot more efficient (both performance wise but also operations-wise).

Even if you switch to using other language you'd find yourself trying to apply some of these techniques so it is a useful set of things to learn about.

Re: Elixir 1.5 released

#76
post #71

There's quite a few nifty little things in this one. I'm not sure I like the child_spec change, personally I like the supervision mode to be explicit when calling children. I do like the developer tools, the breakpoint support, the UTF8 for atoms (which I'm realizing we may want in our DSL since we're converting user input strings to atoms), and the @impl that allows to explicitly declare which functions are there fo…

> which I'm realizing we may want in our DSL since we're converting user input strings to atoms careful there. Theres a hard limit on the number of atoms that can be created in an environment, and serializing user input to atoms can get dangerous

also not being garbage collected...

Re: Elixir 1.5 released

#77
post #75

Earlier quoted context omitted.

Beware, because it can make you hate your current day-job language

But then you'd be ready to start on a new day job with tools and concepts you really enjoy using ;-) It's not just a matter of syntax and such but a whole new way of thinking - specifically immutability, functional aspect, using lightweight processes, hot code loading, sane handling of crashes and restart, easy tracing, etc. allow approaching and solving problem in whole new ways that is often a lot more efficient (b…

I was never able to find work with Clojure. Always had endless jobs available for JS though.

But agreed, it's still worth the effort to learn as many new languages as possible. It will make you a better programmer.

Haskell and Erlang were particularly eye-opening for me, but Scheme/Clojure was a great entry point into FP.

Re: Elixir 1.5 released

#78
post #30

Earlier quoted context omitted.

I wonder how the popularity trend of Elixir has been lately. I know you can try to see it through GitHub or Google Trends, but as many members of the Elixir community use Slack I don't know if it's the best way to do it. One thing I'd like to see would be the evolution of downloads of the language and on Hex.

Gotta get more people to make noises really. It tough now since the web space is very competitive. Before that it's just PHP (well it displaced Perl) and then RoR pop out to give it a real competition. For a while you'd think Ruby was going to over take PHP for web dev but it eventually converge to a steady state the growth rate isn't increasing at all. If you look at tiobe index and red monk's for language popularit…

> For a while you'd think Ruby was going to over take PHP for web dev but it eventually converge to a steady state the growth rate isn't increasing at all.

Rails downloads almost doubled from 2015 to 2016 (15M -> 24M). Not sure where you see that the "growth rate isn't increasing at all".

Source: RubyGems db data dump (more stats here: https://infinum.co/the-capsized-eight/analyzing-rubygems-sta...)

Re: Elixir 1.5 released

#79
Can anyone doing Phoenix in production share their typical HTTP response times?

I built a small Phoenix project about a year ago, and compared to Rails it wasn't quite as fluent but still pretty nice. But ever since then, I've been trying to decide if the extra development time is worth it for the performance gains. I get that Elixir is more scalable, and I love how the RAM requirements compared to Rails are tiny, but what I still haven't been able to really answer is the latency improvement. According to these benchmarks it is about as fast as Django:

https://www.techempower.com/benchmarks/#section=data-r14&hw=...

Is that really the best I can hope for?

Re: Elixir 1.5 released

#80
post #18
post #16

Earlier quoted context omitted.

How is it "under-appreciated"? I feel like for such a young language it already has a great popularity.

I'll take a crack at this. Elixir lays a really nice syntax, set of tools, and community over top of Erlang/OTP which are already amazing. While the language is new and increasingly popular, it is arguably not widely/well appreciated how nice and solid the language/ecosystem is at this point in its lifecycle.

Ecosystems grow a lot faster these days because there's tons of prior art.
Post reply on HN