Live data from Hacker News

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

elixir-lang.org

51–60 of 170 posts

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

#51
Can't say enough good things about Elixir and Phoenix. Now with types coming, it'll get even better.

By the way, you hear a lot about the BEAM and it's power - but in my experience you can go a LONG LONG LONG way before you ever have to even think about that part of your stack. Phoenix does such a tremendous job abstracting that for you. You just get the gainz with no effort. Other parts of the stack also just abstract that for you.

Case in point: Oban. You get powerful, flexible and easy to use background jobs for essentially free. Right there in Postgres, with your Elixir code. It's crazy.

Try it.

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

#52
post #50

I've been building my startup 100% fullstack in elixir, and it's been the most wonderful technology I've ever worked with. I'm evangelising all my serious tech friends about how great it is. Now it would be awesome if rabbitMQ and its client would run on OTP 27, would love to upgrade :(

RabbitMQ is pretty solid, are you running into a performance leak or something?

We've used the SSL cert client login method for years, and have been very happy with the reliability.

Cheers, =)

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

#54
post #50

I've been building my startup 100% fullstack in elixir, and it's been the most wonderful technology I've ever worked with. I'm evangelising all my serious tech friends about how great it is. Now it would be awesome if rabbitMQ and its client would run on OTP 27, would love to upgrade :(

RabbitMQ is pretty solid, are you running into a performance leak or something? We've used the SSL cert client login method for years, and have been very happy with the reliability. Cheers, =)

See announcement here https://www.rabbitmq.com/blog/2024/05/23/erlang27-support

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

#55

Earlier quoted context omitted.

RabbitMQ is pretty solid, are you running into a performance leak or something? We've used the SSL cert client login method for years, and have been very happy with the reliability. Cheers, =)

See announcement here https://www.rabbitmq.com/blog/2024/05/23/erlang27-support

I guess we wait a bit more for a stable release. =)

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

#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 meaning to a new-to-phoenix-and-liveview dev is proof enough to me that liveview should not be the default way of doing things.

It creates a very steep learning curve where, crucially none is required. elixir/phoenix are easy.

I would even say that the correct learning order for a new-to-elixir/phoenix dev should be:

- Phoenix with deadviews (MVC style).

- "Elixir in action" to learn the basics of OTP. This book is was both easy and utterly eye-opening to me and changed the way I code basically everything.

- Then, and only then, LiveView.

[0]: https://hexdocs.pm/phoenix_live_view/security-model.html#liv...

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

#57

How does this compare to Gleam (strong) typing? https://gleam.run

Different type system with different goals. Gleam uses a modified version of the Hindley-Milner Type system. (Which is a rock solid tested type system.) A Set theoretical type system is more expressive(which suits the dynamic nature or Elixir better.) You can do Union and Intersection Types, and Negation Types, among other things, that you can't do with a HM type system. but it comes at the cost of how fast the progr…

HM is worst-case exponential, but it just happens to have good performance in practice.

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

#59
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…

Shameless self-promotion - if you're struggling to learn LiveView then you could try my tutorial: http://phoenixliveview.com/

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

#60

Earlier quoted context omitted.

Is the TypeScript team correct in explaining that soundness would exclude functions accepting subtypes as laid out there? If so, it seems like any type system that was meant to be able to type common JavaScript idioms would have to be unsound.

Sub-types can be represented with algebraic types so I’m not sure that’s necessarily true, for example an abstract class with subclasses can be represented as a sum type

only if there is a fixed set of subclasses, which is not always or even mostly the case.
Post reply on HN