News for hackers. Stuff that matters.
Re:Elixir for Humans Who Know Python by noloblo on Saturday February 25, 2023 @08:24AM (#34936478)
I think this article does capture the magic of elixir phoenix live view that is impossible in the async await madness hell in python. I cannot wait to try elixir Phoenix live view, elixir |> pipes, :atom pattern matching and ets pids to send and manage processes across servers none of these AFAIK are currently possible with the GIL and single threaded nature of python

As the venerable prof Joe armstrong would say

you need erlang and haskell for fp you need c for high performance you don't really need cpp Java python c# etc

Also as an aside does anything in haskell have something similar in spirit to phoenix or live view?

Re:Elixir for Humans Who Know Python by ch4s3 on Saturday February 25, 2023 @11:15AM (#34937742)
You can pattern match on basically any shape, not just atoms. Imagine you’re parsing a protocol over tcp and want to grab groups of characters between deliverers, you can pattern match that. I rewrote an hl7 parser from Java to Ruby to Elixr some years ago and the elixir implementation performed as well as Java and was more readable by miles.
Re:Elixir for Humans Who Know Python by bongobingo1 on Saturday February 25, 2023 @01:32PM (#34939155)
> You can pattern match on basically any shape, not just atoms. Imagine you’re parsing a protocol over tcp and want to grab groups of characters between deliverers, you can pattern match that.

Ex: https://youtu.be/MaQqa21uxQ8?t=548 (note that "binary" here is a "binary blob of bytes").

Andreas pattern matches on the magic byte, then encoded string length, then the string (using the previous matched length), then an int, all in the function header, no if-else-try-catch mess.

Re:Elixir for Humans Who Know Python by noloblo on Monday February 27, 2023 @07:16PM (#34964017)
Is this parser available for educational purposes on github thanks
Re:Elixir for Humans Who Know Python by noloblo on Monday February 27, 2023 @10:27PM (#34965283)
What are atoms
Re:Elixir for Humans Who Know Python by michaelteter on Sunday February 26, 2023 @12:17AM (#34943261)
LiveView is great, but it is just one of many great reasons to use Elixir (and the ErlangVM ecosystem).

There are the major benefits of Elixir itself, including FP, plus the array of features and tools for building distributed systems via OTP.

Only talking about LiveView is underselling Elixir.

Re:Elixir for Humans Who Know Python by noloblo on Monday February 27, 2023 @07:15PM (#34964008)
What are the major differences between elixir and erlang? Does elixir lose some of the advantages of the rock solid erlang improved over the years at Ericsson