From f0d65be8cef87084f65f373ddfe51ce5c8405879 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 10 Jan 2026 15:34:34 +0800 Subject: IBM VGA fonts, major changes to typography, update site-search. --- _log/matrix-digital-rain.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '_log/matrix-digital-rain.md') diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md index af3cff6..2edc7e7 100644 --- a/_log/matrix-digital-rain.md +++ b/_log/matrix-digital-rain.md @@ -7,7 +7,7 @@ thumbnail: thumb_sm.png --- The 2022 version worked but had some loose ends. Unicode support was -inflexible--couldn't mix ASCII with Katakana; Phosphor decay was stored in a +incomplete--couldn't mix ASCII with Katakana; Phosphor decay was stored in a separate array when it should've been packed with RGB; Code was harder to read than it needed to be. @@ -39,10 +39,10 @@ static inline void insert_code(matrix *mat, uint64_t blk; uint32_t min, max; - blk = glyphs[(rand() % glyphlen)]; + blk = glyphs[(xor() % glyphlen)]; min = (uint32_t)blk; max = (uint32_t)(blk >> 32); - mat->code[index(mat, row, col)] = rand() % (max - min) + min; + mat->code[index(mat, row, col)] = xor() % (max - min) + min; } ``` @@ -71,7 +71,7 @@ Optimized RNG--xorshift instead of rand(): ``` static inline uint32_t xor(void) { - /* Xorshift RNGs, George Marsaglia, The Florida State University. */ + /* Xorshift RNGs, George Marsaglia, Florida State University. */ static uint32_t y = 2463534242; y ^= (y << 13); -- cgit v1.2.3