crbelaus 17 hours ago

The progressive introduction of automated type checking in Elixir should serve as a reference on how to improve a programming language gracefully without breaking changes.

So many examples of programming languages have huge breaking changes between versions that end up creating a split in the ecosystem that takes years to resolve.

Thankfully José has been very clear about Elixir being done since at least 2018. The language is stable and the language/core foundation is not changing anymore.

https://www.youtube.com/watch?v=suOzNeMJXl0

Truly outsanding work and stewardship.

  • bryanlarsen 2 hours ago

    > So many examples of programming languages have huge breaking changes between versions

    I can only think of 2: python 3 and perl 6.

    Those two were very traumatic so it's not surprising it feels like more.

    • chillfox 33 minutes ago

      Ruby 1.8.7 -> 1.9.0 caused a lot of problems in the sysadmin space that took years to get resolved.

      • tyre 27 minutes ago

        triggered.

        There was a rails upgrade around that time that was similarly painful, at least in the humongous rails app I was working in.

    • dgfitz 2 hours ago

      C++11 fucking with strings also comes to mind.

  • TomBers 15 hours ago

    Completely agree. I feel no pressure to constantly upgrade my Elixir versions. I just look at the changes and there is often useful features that make me want to upgrade, as opposed the feeling of dread when I am pushed to upgrade.

  • atonse 10 hours ago

    Yea each time I’ve upgraded (been using elixir in production since 2017), it’s gone way smoother than I had anticipated.

    I usually find the Erlang/OTP upgrades to be a bit more problematic compatibility-wise.

    So I’m often in the latest elixir but one Erlang/OTP version behind cuz I wait a few months for all the kinks to be worked out.

  • burnt-resistor 13 hours ago

    Elixir still seems kind of rough and missing creature comforts, needs stabilization and guides to accomplish goals. There's a lot of broken/under-maintained packages and unhelpful guides that don't work because there's so much Phoenix ecosystem churn. It could get better but all the things™ need curation and approachable documentation. Not everyone wants LiveViews or to use their component system, and the learning curve for compatibility with other tools and technologies is still way too steep.

    Python 3 was really, really needed to fix things in 2. Hence 2 became 3. They managed it pretty well, vaguely similar to Go, with automated update tools and compatibility-ish layers. It had its speed bumps and breakages as not everything went smoothly.

    OTOH: Ruby 3 went the wrong way with types separate files and fragmentation of tools. And that's not mention having to opt-in with boilerplate to change how String literals work. Or: gem signing exists but is optional, not centrally-managed, and little-used. Or: Ruby Central people effectively stole some gems because Shopify said so. PS: many years ago Hiroshi Shibata blocked me from all GH Ruby contributions for asking a clarifying question in an issue for no reason. It seemed agro, unwarranted, and abrupt. So the rubygems repository fragment drama seems like the natural conclusion of unchecked power abuse lacking decorum and fairness, so I don't bother with Ruby much these days because Rust, TS, and more exist. When any individual or group believe they're better than everyone else, conflict is almost certainly inevitable. No matter how "good" a platform is, bad governance with unchecked conduct will torpedo it. PSA: Seek curious, cooperative, and professional folks with mature conflict-resolution skills.

    It's a good idea™ to think deeply and carefully and experiment with language tool design in the real world before inflicting permanent, terrible choices rather than net better but temporarily-painful ones. PSA: Please be honest, thoughtful, clear, and communicate changes in advance so they can be avoided or minimized to inflict least net pain for all users for all time.

    Honestly, I hope more development goes into making Phoenix/Elixir/OTP easier, more complete, more expressive, more productive, more testable, and more performant to the point that it's a safe and usable choice for students, hobbyists, startups, megacorps, and anyone else doing web, non-web, big data, and/or AI stuff.

    Plug for https://livebook.dev, an app that brings Elixir workbooks to a desktop near you. And https://exercism.org/tracks/elixir

    • _susanoo 11 hours ago

      > PSA: Please be honest, thoughtful, clear, and communicate changes in advance so they can be avoided or minimized to inflict least net pain for all users for all time.

      > Honestly, I hope more development goes into making Phoenix/Elixir/OTP easier, more complete, more expressive, more productive, more testable, and more performant to the point that it's a safe and usable choice for students, hobbyists, startups, megacorps, and anyone else doing web, non-web, big data, and/or AI stuff.

      Seriously, this has been the case all the time. It's a great fit for AI, web (Phoenix), non-web (Nerves), students (Pragstudio), hobbyists (hi), megacorps (Discord, bleachereport).

      What do you mean it's not testable, productive, expressive enough? Do you mean the entire elixir community is just fiddling about with unsafe software?

      This comment seems just like a giant ragebait.

    • dmix 2 hours ago

      Our transition to Ruby 3 was very smooth. The actual PR was pretty tiny considering how big our project was. Nothing like the crap I dealt with in JS framework upgrades for much smaller projects. Even Rails is pretty easy to upgrade these days, both are very mature.

    • bmitc 11 hours ago

      The Phoenix churn is definitely real. It's so much so that I've never gotten into it. It's also extremely macro heavy, and so it's its own DSL or collection of DSLs. A concrete example of the churn is that the LiveView book has been "about to release" for five years now.

      Although, what parts of Elixir itself are rough or missing creature comforts? I generally feel it's stable and fine, but I admittedly haven't written Elixir code in a couple of years, sadly.

      • josevalim 3 hours ago

        LiveView was still before v1.0, hence the churn, but Phoenix itself did not introduce breaking changes since v1.0, released more than a decade ago. Our skeleton for new applications change, as best practices around web apps are still evolving, but it is completely up to you to migrate. As a reference point, most other web frameworks have gone through several major versions in the same time, changing how new apps are built but also breaking old ones.

        The idea that Phoenix is also mostly macros does not hold in practice. Last time this came up, I believe less than 5% of Phoenix' public API turned out to be macros. You get this impression because the initial skeleton it generates has the endpoint and the router, which are macro heavy, but once you start writing the actual application logic, your context, your controllers, and templates are all regular functions.

      • giraffe_lady 9 hours ago

        > It's also extremely macro heavy, and so it's its own DSL or collection of DSLs.

        I mean this describes every full stack web framework right? Like sure if the underlying language doesn't have macros or macro-like tools that limits how perverted the syntax can get but the line between "DSL" and "API" gets really blurry in all of these massive frameworks.

        • bmitc 8 hours ago

          That's true for languages that have macros. I just don't like macros, as they get over-abused in every language that has them. I'd much rather deal with just boilerplate and tedious syntax but still straightforward and completely in the language over macros, for the most part. Some macros are indeed useful, like in Rust with `println`, but they still get thrown everywhere.

          • giraffe_lady 8 hours ago

            Frameworks in langauges that don't use macros have this problem too that's what I was getting at with the DSL vs API thing. I don't want to litigate the worthiness of macros for a given purpose here. But if you don't use them for this you have to use something for this the problem doesn't go away.

            Wherever rails or phoenix has macro-defined syntax to handle a specific task, laravel or whatever will have a collection of related functions that need to be used in very specific ways to accomplish the same thing. Whether this collection is a "class" with an "api" or whether it is a "language" defined around this "domain" you will have the abstraction and the complexity.

            Having a preference for one approach of managing this abstraction & complexity seems fine but "a collection of DSLs" is pretty much what a web framework is so that can't be the problem here.

            • bmitc an hour ago

              > Frameworks in langauges that don't use macros have this problem too that's what I was getting at with the DSL vs API thing.

              You mean in the sense that the language's built-in syntax and available abstractions get abused so much that it approximates a DSL?

mcdeltat 3 hours ago

Elixir just keeps chugging along steadily releasing great features and improvements. It's an astoundingly well designed language and the creators have a solid approach to its development. It's a shame I don't get to use Elixir day to day.

  • recroad 2 hours ago

    I quit my job and started a company just so I can use Elixir.

asa400 8 hours ago

Just a data point on the deps compilation, on a small Phoenix app with mostly stock Phoenix deps:

  MIX_OS_DEPS_COMPILE_PARTITION_COUNT=1 mix deps.compile  32.30s user 7.23s system 320% cpu 12.336 total

  MIX_OS_DEPS_COMPILE_PARTITION_COUNT=5 mix deps.compile  0.37s user 0.49s system 12% cpu 6.970 total

  MIX_OS_DEPS_COMPILE_PARTITION_COUNT=10 mix deps.compile  0.38s user 0.50s system 12% cpu 7.236 total
Machine is a Mac M1 Max, `rm -rf _build` in between each run.
  • asa400 2 hours ago

    Anyone downvoting care to comment on why a benchmark of a feature in this release is downvote worthy?

Blackarea 2 hours ago

I really came to love gleam over the last few months. I appreciate elixir getting a type system and remember that this was the big NoGo for me when I explored it a while back. I'd like to give it another chance some time, but I'm worried that it's like typescript - looks typed on the outside but for many libs and packages the types are just a dynamic/any. Is my fear justified? Beam is amazing btw

  • innocentoldguy 31 minutes ago

    Gleam doesn't give you access to the full amazingness of OTP and BEAM. Elixir does.

BAPHOMETA88F 3 hours ago

Application specific type inference to compile ad hoc reporting using Elixir's Standard Library

dynamic() > boolean()

integer() > boolean()

behnamoh 2 hours ago

Elixir is still confusing, not the language, but the ecosystem, tooling, and philosophy. Is it dynamic or static? Is it compiled or not? If it's not, then why do we have Elixir scripts, which have different file extension? If it uses BEAM and you'd inevitably need to know Erlang when you hit the edge cases, then why not just learn Erlang? If it solves concurrency the "right way" due to supervision trees, why not use Python libraries that also implement the actor model, making Python code concurrent the "right way"? I just don't know which niche applications Elixir targets and excels at.

  • radiospiel 2 hours ago

    > If it solves concurrency the "right way" due to supervision trees, why not use Python libraries that also implement the actor model, making Python code concurrent the "right way"?

    I can't speak too much about Python – but immutable vars is a core prerequisite for many of the features OTP (the platform underpinning Elixir (and Erlang)).

  • stanmancan an hour ago

    I don’t understand why people drink orange soda. If you want something orange flavoured, eat an orange! If you want something bubbly, drink soda water!

    .ex compiles to beam files to be run later

    .exs compiles to memory

    You don’t need to know Erlang to use Elixir; I’m a few years in now and I’ve never had to write any Erlang.

  • innocentoldguy 28 minutes ago

    Python has a GIL and is mutable, which makes concurrency impossible and error-prone, respectively. Elixir doesn't have a GIL and is immutable.