An effectively infinite experiment
every-deck-of-cards
- Solid
- Web Workers
- Arbitrary-precision math
Scroll through a trillion decks a second for a trillion trillion years, and you still wouldn’t put a dent in all the possible arrangements of 52 cards.
everydeckof.cards lets you browse all 80 unvigintillion of them—if you can find the time. A one-to-one mapping between arbitrary-precision integers and deck permutations lets you jump straight to any arrangement without generating the ones before it.
Making that impossibly large collection feel effortless is the real challenge. Hand-rolled virtualization renders only what’s on screen, Solid keeps those renders efficient, and a Web Worker handles the heavy math so scrolling never has to compete with computation.
Underneath are pure, testable domain functions and clear boundaries between the math and the interface. The whole application ships as a static bundle on Cloudflare’s global CDN, keeping hosting simple and inexpensive.