News for hackers. Stuff that matters.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by theonething on Wednesday June 12, 2024 @11:58PM (#40665798)
> killer feature is IEX, Elixir's REPL

Don't many other languages have this? Ruby has IRB for example. Is there anything IEX does that IRB doesn't?

Re:Elixir 1.17 released: set-theoretic types in patterns, du... by skndr on Thursday June 13, 2024 @12:20AM (#40665894)
The cool thing is that you can, with the BEAM, connect your shell[0] to a running server and use something like recon_trace[1] to watch functions as they’re getting called. The same principle is used for libraries like this distributed profiler so you can watch the aggregate performance of your application[2].

[0] https://hexdocs.pm/iex/1.12/IEx.html#module-remote-shells (the remsh flag)

[1] https://ferd.github.io/recon/recon_trace.html

[2] https://hexdocs.pm/orion/Orion.html

Re:Elixir 1.17 released: set-theoretic types in patterns, du... by 15155 on Thursday June 13, 2024 @05:14AM (#40667514)
This was possible with various flavors of Pry and DRB once upon a time.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by cess11 on Thursday June 13, 2024 @05:52AM (#40667699)
Not just a running server, you can hook into a running cluster and do such things.

The Observer, :observer.start(), is another very nice tool. Might require some widget libraries for the GUI but you'll likely have set that up on the machine you're doing the introspection from.

Re:Elixir 1.17 released: set-theoretic types in patterns, du... by auraham on Thursday June 13, 2024 @01:26AM (#40666238)
Personally, I prefer iex over irb, iex feels more intuitive. Recently, some improvements were made into iex, the most relevant to me is the ability to use Ctrl+l to clean the output. Now, iex is getting closer to ipython.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by rkangel on Thursday June 13, 2024 @05:26AM (#40667577)
Beam/OTP has a lot of tools for understanding the runtime state of the system. And you can attach the REPL to an existing, already running instance.

As with many things Elixir/Erlang related, there isn't a lot that's unique and not seen anywhere else. It's more that the pieces are carefully thought through and come together to make a fantastic whole.