summaryrefslogtreecommitdiffstats
path: root/_site/log/matrix-digital-rain
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-12-25 22:37:22 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-12-25 22:37:22 +0800
commitd2c9a7b88adae1e949af60b7f276364592e49869 (patch)
treed2bedb9ba7e6500e3f2a07733b8a3f2cfe4f125c /_site/log/matrix-digital-rain
parent51f8430027ceaf7590d826221230cbe2fc1af2ec (diff)
downloadwww-d2c9a7b88adae1e949af60b7f276364592e49869.tar.gz
Matrix 1980s style.
Diffstat (limited to '_site/log/matrix-digital-rain')
-rw-r--r--_site/log/matrix-digital-rain/index.html39
1 files changed, 14 insertions, 25 deletions
diff --git a/_site/log/matrix-digital-rain/index.html b/_site/log/matrix-digital-rain/index.html
index f47ac5e..b428f9e 100644
--- a/_site/log/matrix-digital-rain/index.html
+++ b/_site/log/matrix-digital-rain/index.html
@@ -44,39 +44,28 @@
<h2 class="center" id="title">MATRIX RAIN: 2025 REFACTOR</h2>
<h6 class="center">21 DECEMBER 2025</h5>
<br>
- <div class="twocol justify"><p>Fixed the Unicode issue finally. Can now mix ASCII + Katakana.</p>
-
-<p>Took me 2 hours to decipher how this even works. For future me: mat.col[]
-stores shuffled column indices, mat.row[] tracks last updated row per column.
-shuffle() randomizes the working set, index i (line 333) and lines 364-370 draw
-one column at a time, swap() rotates columns in and out. That’s the rain.</p>
-
-<p>Moved Phosphor decay level into the LSB of the RGB union - should’ve done this
-in 2022 instead of separate array. WTF was I thinking?</p>
-
-<p>Keeping the RGB/PD union as it is. I know the ‘portability’ nerds hate it, but
-I’m on a little-endian machine, and I’m the only one reading this. It’s
-cleaner.</p>
-
-<p>New charset array works. UNICODE(min, max) macro packs the range into uint64.
-insert_code() picks random block, unpacks it, and picks random char. Elegant.</p>
-
-<p>Looks a lot like the original now:</p>
+ <div class="twocol justify"><p>Unicode support added. ASCII + Katakana working:</p>
<video style="max-width:100%;" controls="" poster="poster.png">
<source src="matrix.mp4" type="video/mp4" />
</video>
-<p>Using half-width Katakana (U+FF61-U+FF9F) because full-width characters break
-columns.</p>
+<p>Algorithm notes: mat.col[] = shuffled column indices, mat.row[] = last row per
+column. shuffle() sets working set, main loop draws columns via index i (line
+333), swap() rotates set.</p>
+
+<p>Phosphor decay moved to LSB of RGB union. Should have done this originally.</p>
+
+<p>RGB/PD union stays. Little-endian machine, portability not a concern.</p>
+
+<p>Charset via UNICODE(min, max) macro - packs range into uint64, insert_code()
+unpacks and selects random char.</p>
-<p>blend() is still good, left it alone.</p>
+<p>Half-width Katakana (U+FF61-U+FF9F) for column alignment.</p>
-<p>Tossed the license and automake cruft. Just <code class="language-plaintext highlighter-rouge">cc -O3 main.c -o matrix</code>. Don’t
-need the ceremony.</p>
+<p>Removed license, automake files. Build: cc -O3 main.c -o matrix</p>
-<p>Performance regressions: none. Runs like a charm on the T490. 2% CPU. No
-whirring fans.</p>
+<p>Performance: 2% CPU, OpenBSD, T490.</p>
<p>Commit:
<a href="https://git.asciimx.com/matrix-digital-rain/commit/?id=03f8d87ba7c2e46bd3f3cc4c772fb3a2ac740c92">03f8d87</a></p>