Live data from Hacker News

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

elixir-lang.org

111–120 of 170 posts

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

#111
post #85

Earlier quoted context omitted.

> 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?

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/re…

This was possible with various flavors of Pry and DRB once upon a time.

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

#112

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…

> 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?

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.

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

#113
post #105

Earlier quoted context omitted.

it's pretty straightforward and simple with `mix release`

I remember trying to deploy it a couple years ago and it was fairly complicated. Granted, I was trying to deploy a multi-node mnesia cluster, which is probably what caused all my issues. But for non-production single nodes I just created a Dockerfile and deployed it because the other options were too much hassle. Can't remember the details, but in my (in)experience, deploying was always the hard part with Elixir. I w…

My view on Elixir deployment is that for a given complexity of setup, it's no harder than anything else. For a basic single node webserver, `mix release` makes it like releasing anything else (often more easily). For complex multi-node setups, yes there's some hard work to do, just like there with on any other platform. The difference is that the development experience of getting to a working stable multi-node setup is so much easier on Elixir than anything else that you notice the difficult deployment more.

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

#114
post #84
post #65

Earlier quoted context omitted.

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…

You know that Elixir is on the low end of performance right, so you take Go/Java/C# that are close to 10x faster.

For "straight line" single thread number-crunching, other languages will often be faster. With the new JIT, I doubt they are 10 times faster, but you're right there is a difference.

That's often not the limiting factor though. Elixir makes it very easy to have excellent parallelism on your work so you actually take full advantage of processor. The design of the BEAM means that things are naturally quite low latency, and often you lose performance due to just waiting for things (this characteristic is why webservers on the BEAM are pretty fast).

The other key aspect is NX - like ML libraries in Python, Elixir is just orchestrating and the number crunching is done in C libraries or on GPU etc.

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

#115
post #74

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?

I occasionally end up reading Erlang so I can see what's going on in some library. I haven't had to write very much.

If you have decent familiarity with Elixir, understanding Erlang isn't very difficult. You spend 20 minutes grokking the slightly weird syntax and then it's generally just a subset of Elixir. This is of course a bit of a simplification, but it's close enough for when you're trying to understand someone's Erlang code.

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

#116
post #85

Earlier quoted context omitted.

> 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?

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/re…

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, durations, OTP 27

#117
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.

Shameless plug: I created a video course that shows you how to build and deploy a product with Elixir really quickly.

https://indiecourses.com/catalog/build-an-mvp-with-elixir-6i...

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

#118
post #74

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?

I call Erlang functions or libraries very often, but in ~10 years of writing BEAM software I've never actually written Erlang code. Reading it is a useful skill and occasionally necessary, as is being able to consume its documentation for things like gen_statem.

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

#119
post #4

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.)

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…

It frustrates me to no end that we have three separate, incomplete LSP implementations for Elixir, none of them collaborate and none of them are first party tools from the language maintainers - they're all minor community figures. They are one of the jankiest part of my experiences working with the language and it's very disappointing to live with when I also use rust-analyzer all the time and have seen the polished & productive version of LSP support.

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

#120
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.

If you're optimizing for career opportunities at all, Rust has more hiring potential than Elixir by a country mile. Both are lightly infested by web3 grift, though.
Post reply on HN