Live data from Hacker News

Elixir v1.3 released

elixir-lang.org

111–120 of 125 posts

Re: Elixir v1.3 released

#111
Is Elixir/Erlang/BEAM a good fit to write small command line programs (the kind of programs you could write in Python or Go for example)?

I have three specific questions about this:

- Can you make your program executable directly from the command line, by using a shebang and building an executable binary?

- What about the startup time?

- Do you need a lot of "boilerplate", or can you put everything in a single file?

Re: Elixir v1.3 released

#112

Earlier quoted context omitted.

You can also compile Elixir and Erlang to native code if you want it to run computational stuff faster...

> You can also compile Elixir and Erlang to native code How? Can you provide a link about this?

Add this at the top of your module (in Elixir):

@compile [:native, {:hipe, [:verbose, :o3]}]

:-o

Re: Elixir v1.3 released

#113

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…

When you say BEAMs future is not as bright, what indicators are pointing you in that direction?

I can't speak for shrugger, but when I see the manpower invested in improving Java, .Net, JavaScript, Go, LLVM runtimes/compilers, I'm personally wondering if BEAM will be able to follow. We are starting to see languages like Python fade away because of that, when fast execution starts to matter.

Re: Elixir v1.3 released

#114

Earlier quoted context omitted.

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.

I don't think you've communicated what you were trying to accomplish very well with your LLVM comparison. Many people will see it and think you're confused at what you're talking about.

Re: Elixir v1.3 released

#115
post #102

Earlier quoted context omitted.

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

I saw about 5-6 products which use Scala.js and I haven't heard of any of them before. Who else uses that? Seems rather obscure. Is Scala Native used widely? They just finished implementing java.lang.String 20 days ago or so. At least Erlang on Xen has been serving web pages for a few years now: http://erlangonxen.org But most usage of Scala is on JVM still, wouldn't you agree? We are not talking CPython/Jython/PyPy/…

I understand, but your opinion doesn't change the facts. Scala.js is more than mature, with some huge projects already built in it. I'd not heard of erlangonxen, but it would take a lot of convincing to re-write something in Erlang to begin with, when I could write it quicker in Scala, and run on 2, eventually 3 different platforms.

Scala Native is not very far along compared to Scala.js, but it is actively being improved, and is considered an official extension. Additionally, Dotty will bring huge improvements for JVM scala.

I am not super happy with JVM most days, but I'd far and away prefer to be chained to JVM than BEAM. I mean, it's not even a question at this point, considering the billions of dollars spent developing JVM and the work of the brightest minds of several generations. Joe is a cool guy and all, but Erlang is objectively a niche platform compared to JVM.

Re: Elixir v1.3 released

#116

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.

Doesn't LLVM (or a related project) support JIT compilation?

Re: Elixir v1.3 released

#117

Earlier quoted context omitted.

> You can also compile Elixir and Erlang to native code How? Can you provide a link about this?

Add this at the top of your module (in Elixir): @compile [:native, {:hipe, [:verbose, :o3]}] :-o

Hi forgot about HiPE :-)

But it doesn't produce a native binary, does it?

Re: Elixir v1.3 released

#119

Earlier quoted context omitted.

Hi forgot about HiPE :-) But it doesn't produce a native binary, does it?

Where did I claim it did?

Nowhere :-) I read too fast and mistakenly assumed native code = native executable binary.

Is using HiPE a standard practice in the Erlang/Elixir community? What is the quantitative performance gain?

Re: Elixir v1.3 released

#120

Earlier quoted context omitted.

Where did I claim it did?

Nowhere :-) I read too fast and mistakenly assumed native code = native executable binary. Is using HiPE a standard practice in the Erlang/Elixir community? What is the quantitative performance gain?

This comment from Reddit sums it up pretty well: https://www.reddit.com/r/elixir/comments/3gd1n3/what_are_the...

I just discovered about HiPE as well, and I just gave it a try with a simple fibonacci module. Running fibonacci(40) went from 3.9s BEAM to 0.7s HiPE.

I know it's a silly test, but it's pretty sweet to witness such a massive difference out of the box. :)

Post reply on HN