Have y'all seen what an encryption algorithm looks like in code? Pure madness.β

Have y'all seen what an encryption algorithm looks like in code? Pure madness.β

Sure, let me just (s0 ^= b[i + 0]), (s1 ^= b[i + 1]), (s2 ^= b[i + 2]), (s3 ^= b[i + 3]);
({ s0, s1, s2, s3 } = encrypt(xk, s0, s1, s2, s3));
(o[i++] = s0), (o[i++] = s1), (o[i++] = s2), (o[i++] = s3); for you.
This should have been written in LaTeX and then transpiled to JavaScript
That really makes a case for functional languages and commenting your code, doesn't it?
SimpleX actually has some of its cryptography written in Haskell IIRC, and OCaml is another good option that's a little more pragmatic in its design.