Live data from Hacker News

Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

elixir-lang.org

141–150 of 170 posts

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#141

Earlier quoted context omitted.

Absolutely agree. I love Elixir but the editor integration has always been unfortunately second-class. The happy paths in VSCode work well enough with the ElixirLS, but there are a few flaws that are a quite a bummer. One major one is no rename / refactor functionality (seriously?!) and a more Phoenix-specific issue is trying to contend with auto-complete in templates, which is no fun. I like VSCode fine, but I'd def…

Use lexical instead of elixirls and most of your worries will be gone

Oh man, I can't wait to try this out. Thanks for the pointer!

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#142
post #87

Earlier quoted context omitted.

Hi Brian, thanks for all effort put into LiveView Native. Quick suggestion, it would be nice if the landing page [1] has more information or links to actual examples of how to use LiveView Native. That page has not been updated in a long time and give the (misleading) impression that the project is on hold. [1] https://native.live/

website comes last

[deleted]

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#143
post #93

Earlier quoted context omitted.

The Elixir REPL is world-class, and I agree that it's a truly killer feature of the language. I miss it terribly when I write stuff in other languages (i.e. any time I'm coding, you know, for money). Having a good REPL just removes so much of the friction you normally have to contend with in programming. You can build up ideas piecewise and test things as you go, instead of having to make guesses and run the whole da…

Recently moved my python app over to Elixir, and currently gushing over Elixir every day. I'm a huge fan and have loved everything about it, except... Comping from a LISP, the Elixir REPL really is not world-class. It's a really far, distant second. It's nice, I enjoy it more than python's personally, and more than what I remember from irb back in the day -- but nothing beats the integration of structural editing and…

Yeah, I considered adding a caveat to my post. The LISP repl experience is of course the real gold standard (especially when you've got good editor integration, like the various Emacs packages).

I love LISP in general - was a big Clojure fan for a while - but I feel like Elixir threads the needle of usability much better for me.

Anyway, I'll stand by my claim - Elixir's REPL is leaps and bounds better than Python's, and better than irb and pry by some smaller amount. It's a pleasure to use. I would love to see a world where I can send expressions for evaluation to the REPL as easily as you can with LISP. Maybe we'll get there someday!

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#144

Earlier quoted context omitted.

> Adding types is indeed the last piece to the puzzle to bring even more confidence in the code we ship. This is the hard missing piece for me and why I'm looking curiously over to Gleam. Coming from a language with a very powerful and useful statical typesystem, I just can never go back to something like Erlang or Elixir in my life. :-(

Go back? Have you ever worked on a significant project in either Erlang or Elixir? If so, what issues did you experience?

This was meant for the statical typesystem. I've worked without statical typesystem in other languages, yes. (never professionally on the BEAM though)

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#145
post #56
post #43

I've been using Elixir as a backend for a side project (with a Remix frontend) and it's been really pleasant and productive to work with on the backend. I appreciate how productive LiveView can be, but for my specific case I needed to handle poor network connections and LiveView was (as expected) a poor experience. I wish Elixir was able to decouple itself from LiveView in a sense in the minds of developers. Even wit…

I love elixir. I use it for basically everything. And LiveBook has become my go-to place to start building toy software. I just can't do liveview. I have a very hard time grokking it, and it has a lot of footguns. (ex: if you need to remember to perform auth checks both doing a `pipe_through` in a router and using the `on_mount` callback in a LiveView, see [0].) In fact, the fact that the above sentence has zero mean…

Very re-assuring to find this opinion elsewhere. I am absolutely drowning in Liveview. So difficult to /really/ grok. I'm becoming more convinced that it just isn't worth the effort, especially considering the interface will glitch if the user drives through a tunnel.

Meanwhile deadviews + channels is /miles/ better than python/rails/laravel (imho).

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#146

Earlier quoted context omitted.

We did and it was a lot of work. We had to maintain 5-6 libraries ourselves instead of using one maintained by the services themselves. We had to fork libraries because they became abandoned. Elixir has been around for 12 years now and still hasn't gained any meaningful traction. The risk of using Elixir vastly out ways the benefits today if you are trying to build a product. There is a reason why almost every produc…

Million+ concurrent users per server - Discord are certainly having fun.

All while having so few employees. I don't blindly copy discord, but I pay attention to most things they do engineering wise. IIRC they have like 2 people working on the mobile app. It's insane, and I think a great story for those that want to start small and stay small.

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#147

The last few years the Elixir ecosystem has started to become the simplest solution to so many use cases: - Web development with Phoenix and Liveview is immensely enjoyable and fast - AI with NX, Axon, Bumblebee - Audio and Video streaming and manipulation with Membrane - CQRS and Event Sourcing with Commanded - Embedded with Nerves to make your own devices - Mobile apps with Liveview Native ( in development ) - Queu…

Recently live development capabilities were added to Ruby as well, thanks to latest patches to inf-ruby, now it's possible to eval code around the breakpoint and in the global context as well, everything available right under cursor.

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#148
post #147

The last few years the Elixir ecosystem has started to become the simplest solution to so many use cases: - Web development with Phoenix and Liveview is immensely enjoyable and fast - AI with NX, Axon, Bumblebee - Audio and Video streaming and manipulation with Membrane - CQRS and Event Sourcing with Commanded - Embedded with Nerves to make your own devices - Mobile apps with Liveview Native ( in development ) - Queu…

Recently live development capabilities were added to Ruby as well, thanks to latest patches to inf-ruby, now it's possible to eval code around the breakpoint and in the global context as well, everything available right under cursor.

A little demo https://youtu.be/WnBaMcH5AoY?si=ywFzQuCPp41l3MBF

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#149
post #32

Earlier quoted context omitted.

My understanding is that the BEAM vm already has some (optional) runtime typechecks in the form of guards, which this new typesystem will also add for you automatically. And that these guards are actually used to speed things up, for example by JITing more optimized code.

So inserting those type checks automatically will cause regressions because those checks are not free at runtime, and there are cases where the JIT will look at the code and not bother optimizing.

To clarify, the type-checker does not modify compilation to the beam at all. Instead, it takes into account the predicted runtime checks to inject more static types into its analysis.

For instance, without even introducing annotations, if a function head has a guard `is_boolean(x)`, using the + operator on x within that function would lead to a type error.

Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27

#150
post #101

Any recommendations for an entry point into Elixir? I've been teaching myself Rust through resources like Rustlings and 100-exercises-to-learn-rust, and I've found that approach to be pleasantly accessible. I've yet to find something similar for Elixir, whether interactive or just well laid-out.

This looks similar to what you describe: https://exercism.org/tracks/elixir/exercises
Post reply on HN