Live data from Hacker News

Elixir 1.5 released

github.com

131–140 of 167 posts

Re: Elixir 1.5 released

#131
post #108

Earlier quoted context omitted.

For an improvement of 2 orders of magnitude while maintaining the same level of developer complexity, I'm hard pressed to think of any other web framework besides Phoenix that can deliver this.

Java and C# easily outclass Phoenix i performances, if only because they are statically typed, but also because they run on VM's that are more advanced (and admittedly older, so more optimized) than BEAM.

Java and C# incur more much more developer complexity for web development than Phoenix.

And as the the sibling comment points out, raw CPU performance isn't the only measure of efficiency. The JVM loves to eat memory, and if you get 100x CPU efficiency but use 10x the RAM, you're still bounded on machine resource usage by that memory usage.

Re: Elixir 1.5 released

#132

Earlier quoted context omitted.

You and blatyo are convincing me. :-) I really appreciate your openness in sharing these stats. I don't need to serve 2 million concurrent websockets. But I need to render HTML/JSON based on some database queries, under moderate traffic, and I'd like to get it under 200ms without trying so hard. I mostly agree with DHH that response time is dominated by database queries and Rails is "fast enough". Most problems you c…

The performance aspect also makes a huge difference in development. The application boots fast and the live reloading experience is rewarding. Having a 100 test cases that hit your endpoint+database running in less than a second is pure joy.

I can't stress how important that is. We have about 1.5k tests in our Phoenix app and they almost all hit the database - they run in 30 seconds. I compare this to a Rails app where 1k tests run 8 minutes. Having a fast test suite makes development so much easier and makes you rely more on tests.

Re: Elixir 1.5 released

#133
post #52

Earlier quoted context omitted.

+1 for rustler. Writing NIFs (native implemented functions) in Rust can speed up your Elixir apps significantly. I think Rust & Elixir are a great duo.

Have you written any Rust NIFs? What's the dev experience like?

Yes, I have. I would say it's pretty easy. Had it not been for rustler I wouldn't have touched NIFs since I'm not a C programmer. Also, rustler supplies elegant building blocks, which makes it a straightforward experience.

I've had a few issues with the version of rustler published on hex.pm not working with Erlang/OTP 20, and I've tried using the master repo as a dependency in my `mix.exs`, but that didn't work since rustler repo has an unusual directory structure which fails to compile. And then lo and behold, I've discovered how amazing the `mix` tool is and via `mix help deps` I've learned that you can actually check out a specific directory (via `sparse` option) from a remote repo as your dependency.

Now my dependency listed in `mix.exs` looks like this:

    {:rustler, ">= 0.0.0", git: "https://github.com/hansihe/rustler.git",
                            tag: "0.15.1", sparse: "rustler_mix"}
... and problem solved. I guess peeking at rustler's tests helped me a lot.

All in all, the entire Elixir ecosystem is really elegant. Such a joy to write code now!

Re: Elixir 1.5 released

#134
post #10

Earlier quoted context omitted.

it's one of the controversial points in lisp dialects. treating empty list as nil means it's falsey when used as predicate which has it's pros and cons. for instance if empty list is truthy, this pseudocode won't terminate if tail is defined to always be a (possibly empty) list: while seq: head, seq = seq.head_tail() f(head)

If empty list isn't "falsey", it's not Lisp. It's a "Lisp-like" at best. Sussman and Steele had the good sense not to call Scheme " Lisp", because they knew that it would "ring falsey".

could you produce an exhaustive list of properties of a proper Lisp so that i don't mistakenly call something that isn't a Lisp, a Lisp?

Re: Elixir 1.5 released

#135
post #52

Earlier quoted context omitted.

Have you written any Rust NIFs? What's the dev experience like?

Yes, I have. I would say it's pretty easy. Had it not been for rustler I wouldn't have touched NIFs since I'm not a C programmer. Also, rustler supplies elegant building blocks, which makes it a straightforward experience. I've had a few issues with the version of rustler published on hex.pm not working with Erlang/OTP 20, and I've tried using the master repo as a dependency in my `mix.exs`, but that didn't work sinc…

Oh cool, that's a great mix find.

Re: Elixir 1.5 released

#137
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.

I think is not that popular yet. Look at this issue for the sublime elixir plugin [1], it's breaks a lot of things and seems stalled for a long time... [1] https://github.com/vishnevskiy/ElixirSublime/issues/8

I don't know of many Elixir devs who use sublime for their development. IntelliJ, Vim, Emacs, Atom etc..

Re: Elixir 1.5 released

#138

Is Elixir being used exclusively for web development? If not, what else are people using it for?

Discord uses it for message passing.

Other uses where Erlang shines are a great fit for Elixir too: WhatsApp, Goldman Sachs uses Erlang for Trading, Heroku's routing mesh, ...

I think with Nerves, Elixir fits well on embedded platforms. Its supervision trees make it easier to create fault tolerant systems, and the actor model is great for concurrency.

Re: Elixir 1.5 released

#139
post #66

Earlier quoted context omitted.

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.

Hex runs on 1 small Heroku Dyno? That's amazing.

Re: Elixir 1.5 released

#140
post #69
post #66

Earlier quoted context omitted.

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.

Any other options? For the small team I work with managing infrastructure is not really an option.

I use docker and docker-compose for sideprojects that don't need zero downtime deploys. Installed on a tiny digital ocean droplet.

A multistage build makes it easy to compile a release on a macOS system and create a minimal alpine docker images with the unpacked .tar.gz release. (My app is an ~84MB docker images)

Post reply on HN