![]() |
|
![]() |
| Aside note: Have any of you used elixir-desktop [1]? It is a wxWidgets + LiveView bundle, pretty much like a Electron app.
In [2], Wojtek Mach explains how the team behind Elixir build Livebook Desktop. He explains how the project started, some subtle bugs found when building the app for MacOS, some limitations of wxWidgets in Windows, and many other implementation details. It would be awesome if the Elixir team releases something like elixir-desktop based on Livebook. That is, forking the Livebook repo and release an official template project for generating desktop applications based on LiveView. Right now, Livebook is distributed as an executable for Windows and Mac. Why not follow the same approach to allow developers to publish self-contained executables pretty much like Electron? I am aware of LiveView Native [3] but I think they follow a different direction. [1] https://github.com/elixir-desktop/desktop-example-app |
![]() |
| 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... |
![]() |
| Yes, I totally get that (and have been doing that). My complaint/suggestion is more around the marketing and messaging. There is so much more to Elixir than LiveView! |
![]() |
| A news aggregator (and premium news chatbot) that indexes and analyses around ~150.000 new articles a day (http://im.fo)
I'm absolutely certain the real time processing would be unfeasible in any other technology in terms of complexity and the minimal compute resources it's running on. Modules like broadway, ash, oban, phoenix liveview ... make it not just a pleasure to work with but insanely performant. With over 20 years of programming experience, I can say with certainty that there is no language that makes me as productive as elixir. It's at least 10x my python productivity (despite being at an expert level in python as well). |
![]() |
| I don’t know enough about news aggregators to evaluate the claim, but presumably that is why parent mentioned both complexity and compute, not just performance. |
![]() |
| Very cheap in C# and Go. I assume Java has now closed the gap with its Green Threads implementation.
(Spawning an asynchronously yielding C# task is ~100B of allocations depending on state machine box size, with very small overall overhead and threadpool handling millions of them, they are cheaper than Elixir tasks which make different tradeoffs (and are subject to BEAM limitations), you can try this out on your machine by running the examples from this thread: https://news.ycombinator.com/item?id=40435220) |
![]() |
| 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, =) |
![]() |
| Awesome work Elixir & Erlang Devs! <3 Cannot wait for the "no types" excuse to go away for mass adoption of Elixir! Keep up the great progress. |
![]() |
| > seeing salaries consistently lower than more mainstream languages
That seems surprising to me as an Elixir developer. Are you looking in the US, or elsewhere? |
![]() |
| Nice feature in this release is the addition of `get_in/1` which works with structs. eg. `get_in(struct.foo.bar)`
If `foo` returns `nil`, accessing `bar` won't raise. |
![]() |
| It was still possible to do this in prior versions of Elixir, just syntactically noisy. Any layer which isn't a vanilla map needs Access.key, as in:
|
![]() |
| This is it, the final piece I wanted. Looking forward to the further stages. Apart from that, the language is 100% feature-complete as far as I am concerned. |
![]() |
| Last time I looked at Elixir, it seemed like the consensus was "you're going to need to do Erlang too". Is that still the case, or is dipping down into Erlang no longer required? |
![]() |
| Super-excited for this release. I wish someone would put some resources into the Elixir IntelliJ plugin. I've tried, but I just can't enjoy using VSCode (vs IntelliJ based IDEs, Visual Studio, etc.) |
![]() |
| Zed has been amazing so far for my Elixir journey, and their latest preview release has additional support for Elixir tests. Not sure how it compares to IntelliJ |
![]() |
| Doesn't gradual type system mean something else here? As in developers being able to iteratively add types while leaving untyped parts for later? At least this is how Ruby's Sorbet describes it |
![]() |
| From the original paper[0]:
> We present a gradual type system for Elixir, based on the framework of semantic subtyping ... [which] provides a type system centered on the use of set-theoretic types (unions, intersections, negations) that satisfy the commutativity and distributivity properties of the corresponding set-theoretic operations. The system is a polymorphic type system with local type inference, that is, functions are explicitly annotated with types that may contain type variables, but their applications do not require explicit instantiations: the system deduces the right instantiations of every type variable. It also features precise typing of pattern matching combined with type narrowing: the types of the capture variables of the pattern and of some variables of the matched expression are refined in the branches to take into account the results of pattern matching. [0]: https://www.irif.fr/_media/users/gduboc/elixir-types.pdf |
![]() |
| While both Elixir and TypeScript are structural, they are different type systems. A set-theoretic type system is not one that has unions, intersections, negations, but rather one where the foundation of the type system is represented on top of unions, intersections, and negations. Even relations such as subtyping, compatibility, etc. are expressed as set-theoretic. We also have a very different approach to dynamic/gradual typing (which is sound): https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradua...
I recommend reading Giuseppe Castagna's work for those who want to dig deeper: https://www.irif.fr/~gc/ |
![]() |
| For more information about what that means, see this playground [0] from the TypeScript docs. PL people often make a big deal about TypeScript's lack of soundness as though it was some kind of mistake, but it was very much an intentional choice given the trade-offs they were making at the time.
If Elixir can pull off soundness without compromising expressivity that will be a huge feat, and I'm excited to see it! [0] https://www.typescriptlang.org/play/?strictFunctionTypes=fal... |
![]() |
| I'm really curious to know if many people with large Elixir problems are finding any issues with the new type system. This is pure curiosity, I don't have a dog in the fight! |
![]() |
| > 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 program can be typed.
I doubt that Python's static type hints existing within a formal mathematical framework, but it's interesting that intersection types have been under consideration for a long time now: https://github.com/python/typing/issues/213 |
![]() |
| 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. |
![]() |
| The introduction of set-theoretic types has truly been a technical tour-de-force. A huge improvement of the language, but in a backwards-compatible fashion. |
![]() |
| Boot up a Livebook and step through some of the basics on the Elixir homepage. Someone else recommended Elixir in Action, which is a very good book once you have some grasp on the fundamentals. |
- 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 )
- Queues, pipelines and batch processing, etc... natively or with GenStage, Broadway or Oban depending on your use case
but for me, the killer feature is IEX, Elixir's REPL. Being able to interact directly with my running code easily ( in dev or in production ), introspect it, debugging it, is just life changing.
Adding types is indeed the last piece to the puzzle to bring even more confidence in the code we ship.