Live data from Hacker News

Why am I interested in Elixir?

underjord.io

91–100 of 183 posts

Re: Why am I interested in Elixir?

#91

Earlier quoted context omitted.

I can't tell what your description of LiveView is suggesting, I will need to read about it, sounds interesting. Is it like a codebase that is implicitly split on a back-end and a browser, without the need to write JavaScript?

Phoenix LiveView is basically server side rendering in real time. The user's actions are sent to the Backend via WebSocket, and the Backend rerenders (parts of) the view and sends them to the user.

But ... why? Sends it back as ... HTML?

Re: Why am I interested in Elixir?

#92
post #71
post #53

Earlier quoted context omitted.

> Async everything What do you mean by that? Most code in Erlang/Elixir is synchronous, meaning it will block the process (but not the scheduler). Maybe you meant concurrent (or message-passing) everything?

Yeah I'm curious too. I've written about 2,000 lines of code on this course platform so far and everything except for 1 function is synchronous from a "this is my code" standpoint. I only used Task.start once to launch something in the background.

All of the GenServer stuff is built on top of regular Erlang processes. It's all async. You'll might find out when your server gets busy and GenServer calls start timing out

Re: Why am I interested in Elixir?

#93

Where are people getting their documentation for Phoenix? The stuff on the website is awful for grasping the bigger picture and how the parts of Phoenix combine. It gave me the impression of being an immature version of Rails when I tried it recently which doesn’t gel with the attitude people seem to have of it.

Programming Phoenix 1.4 by Chris McCord, Bruce Tate and José Valim & Elixirforum

Lots of trials and errors. The one thing that I think was pretty dang unclear for phoenix is authentication.

I went through 3 libraries and scrap many codes to figure out what's what. I settle on POW, the programmer is very nice and awesome he answers a lot of questions on elixirforum.

Re: Why am I interested in Elixir?

#94
post #81
post #60

Earlier quoted context omitted.

I think most people consider Java to be an interpreted language, it's interpreted by JVM. It's obviously somewhere in between, in the same way that JIT languages are, but it's still not native.

Not sure about the BEAM, but Java isn't considered an interpreted language at all. First, discerning the compilation step to IR is relevant, which is why for example, Python can be compiled or interpreted. That distinction matters. Even though it is compiled to intermediate representation, it is still compiled. Now, with regards to the intermediate representation, Java Byte Code is also not interpreted. Java Byte Cod…

Java is an interpreted language because you always need a JVM to run it. I even if you distribute the runtime with your code as one package, that’s just an artificial distinction.

Regardless, interpreted does not mean bad, or poor performance for your task.

It’s a technical notion.

Most people would say Python is interpreted, even if you are only running compile python bytecode on a JIT like PyPy. That’s exactly the same situation as Java.

Re: Why am I interested in Elixir?

#95
post #71
post #53

Earlier quoted context omitted.

> Async everything What do you mean by that? Most code in Erlang/Elixir is synchronous, meaning it will block the process (but not the scheduler). Maybe you meant concurrent (or message-passing) everything?

Yeah I'm curious too. I've written about 2,000 lines of code on this course platform so far and everything except for 1 function is synchronous from a "this is my code" standpoint. I only used Task.start once to launch something in the background.

In the Erlang VM, process execution can stop at an arbitrary point and resume later on. This time slicing is done to ensure that no process, takes up too much time. So you must treat your code as asynchronous since if you get a value from another module, then get it again in the next line it might have changed because your process was suspended in between those two lines.

Re: Why am I interested in Elixir?

#96
Is it possible for someone to create a statically typed language that works on OTP/BEAM, or for an existing language to interface with them somehow?

I tried learning Elixir a while back and just couldn't get myself to like the syntax/ergonomics. It seems like most of the benefits people list for Elixir are actually attributed to BEAM, not the language itself.

Re: Why am I interested in Elixir?

#97
post #84
post #64

We are building a sales automation app using Elixir and Vue. Our dev team seem really happy with this tech stack. Productivity is awesome - we are four months in and already have similar functionality to a (sort of) competitor that has spent several years on their dev. This is the first dev project I have experienced where we are ahead of our planned milestones. Got to find some more features to quickly add! My origi…

> Only (small) gripe is that Elixir is not a fast language. Which is interesting because Elixir isn't well known for being super fast when it comes to CPU bound tasks, but for a lot of semi-CPU intensive things you'd end up doing in a web app, it's still very very efficient. For example I wanted to generate 5,000x 19 random character discount codes and my first attempt took 730ms to generate the codes while being a c…

Would love to see the 3ms solution. Post a gist if you have it available.

Re: Why am I interested in Elixir?

#98

Earlier quoted context omitted.

Are there no bad parts?

Of course they are, but thé article seems to be from someone interested by elixir, rather than someone who used it long enough to discover them (although I might have misunderstood the article.) From own experience, the problematic parts are : - deployment being a bit messy if you try to follow 12 factors (might be improving in 1.9) - absence of a decent debugger - younth of the ecosystem and size of the community (a…

Can you describe a situation where you would have wanted a debugger that io.inspect couldn't get you out of? I haven't found one yet.

Re: Why am I interested in Elixir?

#99

Earlier quoted context omitted.

Are there no bad parts?

Of course they are, but thé article seems to be from someone interested by elixir, rather than someone who used it long enough to discover them (although I might have misunderstood the article.) From own experience, the problematic parts are : - deployment being a bit messy if you try to follow 12 factors (might be improving in 1.9) - absence of a decent debugger - younth of the ecosystem and size of the community (a…

Using a combination of IO.inspect and IEx.pry, I've never found myself wanting or needing any other debugging tools.

Re: Why am I interested in Elixir?

#100
post #73

Earlier quoted context omitted.

Are there no bad parts?

- deployment is terrible like really bad - average performance ( like 10x slower than Java even worse for CPU intensive tasks ) - dynamic language ( this is the worst part ), working on large code base means problems ahead - lot of features from BEAM / OTP that are not that useful and done better on modern cloud platforms ( Kubernetes for instance does a lot of similar things but better and more flexible, apply to an…

Distillery is a pain to set up, but once done, deployment is as easy as:

    mix edeliver build release production && mix edeliver deploy release production
I've set this up as an alias in mix.exs to I just have to type:

    mix deploy
1.9 makes configuration easier than Distillery, I think.
Post reply on HN