Live data from Hacker News

Elixir v1.3 released

elixir-lang.org

91–100 of 125 posts

Re: Elixir v1.3 released

#91

Earlier quoted context omitted.

I used to do Scala prior to coming to Elixir, mainly by using Play Framework to create web apps. I can tell you that I love Elixir and that I will not be going back to Scala. I miss nothing from Scala. * Pattern matching in Elixir is superior to Scala's in every way possible (You can pattern match on function parameters!!) * Async code is a breeze with Task.async()/Task.await() instead of mapping on Future's everywhe…

> * No more JVM! You're just trading one VM for another, though. How does having a Beam VM environment differ from a JVM environment?

I find failure to be more fatal on the JVM. That's neither a bug nor a feature, it's just what it is.

For example, BEAM puts the process call stack on the heap, so you don't need to tune them separately. You won't hit a stack overflow, you'll just run out of memory.

Many, many characteristics like that exist. I prefer a working slow system over a broken system, but I fully understand the preference for loud failures.

Re: Elixir v1.3 released

#92

Earlier quoted context omitted.

I used to do Scala prior to coming to Elixir, mainly by using Play Framework to create web apps. I can tell you that I love Elixir and that I will not be going back to Scala. I miss nothing from Scala. * Pattern matching in Elixir is superior to Scala's in every way possible (You can pattern match on function parameters!!) * Async code is a breeze with Task.async()/Task.await() instead of mapping on Future's everywhe…

> * No more JVM! You're just trading one VM for another, though. How does having a Beam VM environment differ from a JVM environment?

I'll take BEAM over JVM any day.

Re: Elixir v1.3 released

#93

Anyone here switched from a statically typed functional programming language (Haskel, OCaml, F#, Scala...) to Elixir? How would you describe the experience? What do you miss? What do you like/love? Overall, would you recommend taking that step?

I switched from Ruby to Scala, and I have had an absolute blast. Elixir is sort of chained to BEAM, which doesn't appear to have as bright a future as the JVM or LLVM does, so Scala seemed like a safer bet. Reading about Elixir is cool sometimes, but then I look at Dotty, and I feel confident that I made the correct choice. I've also been keeping an eye on Crystal (statically typed Ruby-esque language, LLVM), but the…

> Scala

That means being chained to JVM. That is a big downside for me.

Re: Elixir v1.3 released

#94
post #92

Earlier quoted context omitted.

> * No more JVM! You're just trading one VM for another, though. How does having a Beam VM environment differ from a JVM environment?

I'll take BEAM over JVM any day.

Without any reasons for your statement, it's just an empty contribution. Care to explain why?

Re: Elixir v1.3 released

#95
post #65

Super excited for this release. I have to say that learning and using Elixir has been more pleasant than any other language I have ever worked with. Code is easy to follow due to the functional nature of the language, and the community is one of the best out there. The applications I've written and deployed have been more stable and fault-tolerant than anything else I've ever done, and I've yet to have any performanc…

I use Erlang and plan on sticking to, but do like Elixir's community and am following it closely.

Jose Valim and team did an outstanding job being welcoming to new members, emphasizing documentation, friendliness and ease of learning and paying attention to usability. That is no easy feat and requires a lot of hard work and determination, very impressed by it.

Re: Elixir v1.3 released

#96
post #93

Earlier quoted context omitted.

I switched from Ruby to Scala, and I have had an absolute blast. Elixir is sort of chained to BEAM, which doesn't appear to have as bright a future as the JVM or LLVM does, so Scala seemed like a safer bet. Reading about Elixir is cool sometimes, but then I look at Dotty, and I feel confident that I made the correct choice. I've also been keeping an eye on Crystal (statically typed Ruby-esque language, LLVM), but the…

> Scala That means being chained to JVM. That is a big downside for me.

Or JS with Scala.js Or literally anything with Scala Native, which is being sponsored and supported by EPFL directly.

So yeah, no.

Re: Elixir v1.3 released

#97

Earlier quoted context omitted.

Relative to LLVM, I mean. I don't think there are any huge red flags with regards to BEAM.

Apples and oranges. LLVM is not a virtual machine, it's a compiler development infrastructure. But JVM vs. BEAM is a sensible VM comparison.

Note the lack of technical claims that one is superior to the other, thanks for pigeonholing what I was getting at.

Re: Elixir v1.3 released

#98
post #32
post #10

I've never really looked into Elixir. I'm a Python guy and readability is the first thing that makes me love or hate a new language. Considering I've always found Erlang fairly obtuse visually I am surprised by how easy on the eye Elixir is. I found this quote very telling: > "Elixir is simply the first language since Ruby to really care about code beauty and UX of the language, libraries and ecosystem." (found here:…

Of course they meant 'Python' instead of 'Ruby' but hey ;-) I've made the switch from Ruby to Python, mostly for the scipy/numpy/pandas/jupyter support (and performance) - but I don't think I'll ever get away from the feeling with Python that I have to look up how to do things that felt natural in Ruby.

I've gone back and forth between Perl, Python, and Ruby a few times over the past 20 years...that feeling happens every time I switch, for all of them. I generally find "intuitive", and "ease of use", is almost always really just "what I'm used to".

That said, Ruby has gotten more difficult to read, for me, over the years. I just did a small-ish project in Ruby for a client, and was surprised at how much new syntax there is. It has become a large language, in the way that Perl is a large language. It took me longer than I expected to wrap my head around new idioms. Python 3 code seems simpler than Python 2. Ruby 2.x code seems more complex than Ruby 1.x. That actually surprised me, because the first time I tried Ruby (way back when DHH released the first "make a blog in 3.4 seconds" or whatever that RoR intro video was) I found it immediately intuitive, moreso than Python, which I was using at work.

Anyway, my point is that these are big, old, mature languages, with a lot of weird stuff that's made its way into them. It takes time to master something with such depth. It doesn't necessarily mean the language is worse than a new language that is extremely simple...Ruby, Python, and Perl started out simple (even simplistic); the needs of their users caused them to expand. It takes a real effort, and a willingness to break backward compatibility, to stay simple through decades of development. Python 3 made some of those hard choices and got a little simpler; Ruby and Perl haven't (though Ruby and Perl are still stronger languages than they were when they were "simple"/"easy", whatever).

But, I'm also using Python more lately because of the scientific and machine learning stuff, which is a super strong ecosystem.

Re: Elixir v1.3 released

#99
post #92

Earlier quoted context omitted.

I'll take BEAM over JVM any day.

Without any reasons for your statement, it's just an empty contribution. Care to explain why?

Agree, sorry. Sure, here are some randomly ordered reasons:

* Immutable data. This ties into "functional" section below but it is worth mentioning separately. The benefit here is it is a better fit for concurrency and correctness.

* Lightweight processes. Can have millions of them. But they don't share the heap so act like OS processes in that respect. That means 2 things:

1) It changes the way you think and solve concurrent problems. It reduces impedance between real life problems and how they are solved. Spawning a new process for each long lived connection is obvious and easy.

2) Fault tolerance. Having one request not crash the whole server is a really a massive improvement. In C++ or Java you don't know if something got messed up because of a crash. Maybe some shared data structure or lock got left in an inconsistent state. There is just no guarantee.

* Hot code loading. This is not just a gimmick but it works. Most places don't use it to update regularly and I don't either. But used it a few times in production to add extra logging, fix a customer specific issue without shutting down the cluster before the fix was released. All the while there were 100k/sec requests pounding it. That is plain old money in the pocket. No downtime, no headaches.

* Tracing. BEAM has very good tracing support. When debugging I am quite fond of just logging into a node and using tracing instead of print or log statements.

* Functional. This is more about Erlang the language, and it kind of goes with immutable data. But because of that it means state is more visible and explicit. Looking at a piece of code on a page, I get more context of what is happening because State is passed, updated and returned. As opposed to being some "this" reference which at that point in the code, I don't have any idea how it was modified or what it has in it.

* Garbage collection. BEAM has excellent garbage collection. It is pause-less, in the sense that GC of one process won't block the world. Java has lots of tweaks for that but it is not a default state of affairs.

Welp, this is just a quick list off the top of my head.

At the end of the day, one can probably go through the above list and say I can do all that in Assembly or C. Which is true. BEAM is written in C in large part. To get fault tolerance, can just spawn OS processes in any language. To get immutability, can just go to Github and find an immutable collections library for Python or Java. Java can also do some code loading. But the difference is, it all comes in a single package ready to use. That is huge and I see it as a great benefit.

Re: Elixir v1.3 released

#100
post #20

Earlier quoted context omitted.

Another nice option is kiex, Elixir version manager: https://github.com/taylor/kiex

I'm using asdf - it has the added advantage of being able to manage ruby, erlang, node, and more :) https://github.com/asdf-vm/asdf

Oh, cool. I've never heard of that, but it looks nice. Thanks!
Post reply on HN