by bluesnowmonkey · 1y ago · 0 comments
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.
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.
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.