News for hackers. Stuff that matters.
Re:Why Elixir? A Rebuttal to Common Misconceptions by bccdee on Wednesday July 23, 2025 @01:48PM (#44661952)
I've never had a system crash from a lightning strike, fault-tolerant or otherwise. I have had systems crash from null pointer errors though, and fault-tolerance did nothing to fix that except turn a crash into a crashloop.

I have the same attitude toward overly permissive type systems that I do toward the lack of memory safety in C: People sometimes say, "if you do it right then it isn't a problem," but since it objectively IS a problem in practice, I would rather use the tool that eliminates that problem entirely than deal with the clean-up when someone inevitably "does it wrong."

Re:Why Elixir? A Rebuttal to Common Misconceptions by bluesnowmonkey on Wednesday July 23, 2025 @06:21PM (#44664636)
We had a cluster of servers, dynamically scaling up and down in response to load, and one day started seeing errors where an enum string field had an impossible value. Imagine the field is supposed to be "FOO" or "BAR" but one day in the logs you start seeing "FOO", "BAR", "GOO", and "CAR". Impossible. "GOO" and "CAR" did not exist in the code, nothing manipulated these strings, yet there they were.

Long story short, a particular machine that joined the cluster that morning had some kind of CPU or memory flaw that flipped a bit sometimes. Our Elixir server was fine because we were matching on valid values. Imagine a typed language compiler that makes assumptions about things that "can't" happen because the code says it can't... yet it does.

Re:Why Elixir? A Rebuttal to Common Misconceptions by 3eb7988a1663 on Thursday July 24, 2025 @12:06AM (#44666808)
I am not sure I want the system to continue operating in that scenario. You have corrupted hardware that could be trashing other records. What if it is flipping bits on financial transactions?
Re:Why Elixir? A Rebuttal to Common Misconceptions by spooky_deep on Thursday July 24, 2025 @09:57AM (#44670738)
Depends how you use the statically typed system.

For example

    match parseFoo json with
    | Ok foo -> 
      process foo
    | Error message ->
      print message
This will skip bad messages and be statically typed in the valid case.
Re:Why Elixir? A Rebuttal to Common Misconceptions by bccdee on Tuesday July 29, 2025 @01:13PM (#44725914)
That only works for enum discriminants. What if it were modifying the data payload, producing valid but corrupt messages?

The only way to tolerate that kind of error is checksums on your data, and I don't think any language has that kind of redundancy built in.