Sviatoslav Abakumov
perlence.bsky.social
Sviatoslav Abakumov
@perlence.bsky.social
Dust from the stars.
Abstract Algebra for Programmers when
October 1, 2025 at 8:52 PM
Awesome, thanks!
May 26, 2025 at 2:57 PM
One potential fix would be to calculate `j` as `floor(random()*(this.n+1))`.

Also, in the multi-card example, it wasn't obvious that "generate a random number between 0 and *n*" assumes that *n* is not included. This is also confusing because, up to that point in the article, we counted *n* from 1.
May 17, 2025 at 9:16 PM
Great article!

Maybe I missed something, but for me, Q always replaces K in the final one-card example. I think this is because, in SimpleReservoir, *n* starts from 0. On the second deal, it's 1, so `floor(random() * this.n)` always evaluates to 0, resulting in a replace github.com/samwho/visua...
github.com
May 17, 2025 at 8:54 PM
It blew my mind when I discovered that you can replace "or" with "xor" and get a material biconditional, p ↔ q. And it's much shorter to write in check constraints than its DNF, as I would usually do.
May 16, 2025 at 1:33 PM
О, он аж в январе вышел, а я про него не знал. Надо заценить.
December 2, 2023 at 1:46 PM