summaryrefslogtreecommitdiffstats
path: root/_site/log
diff options
context:
space:
mode:
Diffstat (limited to '_site/log')
-rw-r--r--_site/log/index.html13
-rw-r--r--_site/log/matrix-digital-rain/index.html50
-rw-r--r--_site/log/suckless-software/index.html105
3 files changed, 35 insertions, 133 deletions
diff --git a/_site/log/index.html b/_site/log/index.html
index c3c652a..8074ae3 100644
--- a/_site/log/index.html
+++ b/_site/log/index.html
@@ -59,19 +59,6 @@
<tr>
<td class="posts-td posts-td-link">
- <a href="/log/suckless-software/" class="link-decor-none">Suckless upgrade workflow</a>
- </td>
- <td class="posts-td posts-td-time">
- <span class="post-meta">
- <time datetime="2025-11-30 00:00:00 +0800">2025-11-30</time>
- </span>
- </td>
- </tr>
-
-
-
- <tr>
- <td class="posts-td posts-td-link">
<a href="/log/fpm-door-lock/" class="link-decor-none">Fingerprint door lock</a>
</td>
<td class="posts-td posts-td-time">
diff --git a/_site/log/matrix-digital-rain/index.html b/_site/log/matrix-digital-rain/index.html
index 3d393cd..f254ed2 100644
--- a/_site/log/matrix-digital-rain/index.html
+++ b/_site/log/matrix-digital-rain/index.html
@@ -44,32 +44,52 @@
<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>
+ <div class="twocol justify"><p>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
+separate array when it should’ve been packed with RGB; Code was harder to read
+than it needed to be.</p>
<video style="max-width:100%;" controls="" poster="poster.png">
<source src="matrix.mp4" type="video/mp4" />
</video>
-<p>Moved Phosphor decay level into the 4th byte of the RGB union - should’ve done
-this in 2022 instead of separate array. What was I thinking.</p>
+<p>Moved phosphor decay into the 4th byte of the RGB union–should’ve done this
+in 2022. What was I thinking.</p>
-<p>Keeping the RGB/PD union as it is. I’m aware of the portability issues, but I’m
-on a little-endian machine, and I’m the only one reading this anyway. It’s
-cleaner.</p>
+<p>Keeping the RGB union despite portability concerns. All my systems are
+little-endian and the code is cleaner this way.</p>
-<p>New charset array works. UNICODE(min, max) macro packs the range into uint64.
-insert_code() unpacks block and picks random char.</p>
+<p>Fixed Unicode by introducing a charset array. UNICODE(min, max) packs Unicode
+ranges into uint64–low four bytes for start, high four bytes for end.
+insert_code() unpacks a random block and picks a character from it:</p>
-<p>Full-width Katakana breaks columns. Stick to half-width (U+FF61-U+FF9F) range .
-Compile with -DNOKANA to disable Katakana altogether.</p>
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>static uint64_t glyphs[] = {
+ UNICODE(0x0021, 0x007E), /* ASCII */
+ UNICODE(0xFF65, 0xFF9F), /* Half-width Katakana */
+};
+</code></pre></div></div>
-<p>blend() is still good, left it alone.</p>
+<p>Full-width Katakana breaks column alignment. Stick to half-width
+(U+FF61-U+FF9F) range. Compile with -DNOKANA to disable Katakana altogether.</p>
-<p>Tossed 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>blend() simulates phosphor decay by eroding RGB channels toward
+background color:</p>
-<p>Performance regressions: none. Runs like a charm on the T490. 2% CPU. No
-whirring fans.</p>
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>static inline void blend(matrix *mat, size_t row, size_t col)
+{
+ unsigned char *color = mat-&gt;rgb[index(mat, row, col)].color;
+ color[R] = color[R] - (color[R] - RGB_BG_RED) / DECAY_MPLIER;
+ color[G] = color[G] - (color[G] - RGB_BG_GRN) / DECAY_MPLIER;
+ color[B] = color[B] - (color[B] - RGB_BG_BLU) / DECAY_MPLIER;
+}
+</code></pre></div></div>
+
+<p>That’s still good. Leaving it alone.</p>
+
+<p>Tossed license and automake cruft. Just <code class="language-plaintext highlighter-rouge">cc -O3 main.c -o matrix</code> now. Don’t
+need the ceremony.</p>
+
+<p>Runs at 2-3% CPU on OpenBSD (T490). No regressions. Fans are quiet.</p>
<p>Commit:
<a href="https://git.asciimx.com/matrix-digital-rain/commit/?id=03f8d87ba7c2e46bd3f3cc4c772fb3a2ac740c92">03f8d87</a></p>
diff --git a/_site/log/suckless-software/index.html b/_site/log/suckless-software/index.html
deleted file mode 100644
index 48ddee1..0000000
--- a/_site/log/suckless-software/index.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Suckless upgrade workflow</title>
-
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Suckless upgrade workflow</title>
- <link rel="stylesheet" href="/assets/css/main.css">
- <link rel="stylesheet" href="/assets/css/skeleton.css">
-</head>
-
-
-
- </head>
- <body>
-
- <div id="nav-container" class="container">
- <ul id="navlist" class="left">
-
- <li >
- <a href="/" class="link-decor-none">hme</a>
- </li>
- <li class="active">
- <a href="/log/" class="link-decor-none">log</a>
- </li>
- <li >
- <a href="/projects/" class="link-decor-none">poc</a>
- </li>
- <li >
- <a href="/about/" class="link-decor-none">abt</a>
- </li>
- <li><a href="/feed.xml" class="link-decor-none">rss</a></li>
- </ul>
-</div>
-
-
-
- <main>
- <div class="container">
- <div class="container-2">
- <h2 class="center" id="title">SUCKLESS UPGRADE WORKFLOW</h2>
- <h6 class="center">30 NOVEMBER 2025</h5>
- <br>
- <div class="twocol justify"><p>Workflow for managing suckless patches across upgrades:</p>
-
-<p>Initial setup:</p>
-<ul>
- <li>Clone from suckless</li>
- <li>Reset to stable tag</li>
- <li>Set push URL to my repo (git.asciimx.com)</li>
- <li>Pull from upstream, push to mine</li>
-</ul>
-
-<p>Config changes only:</p>
-<ul>
- <li>Edit config.h (or let make generate it)</li>
- <li>make clean install</li>
- <li>Commit, push</li>
-</ul>
-
-<p>dwm/slstatus installs:</p>
-<ul>
- <li>Can’t replace running binaries</li>
- <li>Kill dwm (Mod+Shift+q)</li>
- <li>Switch to tty (Ctrl+Alt+F1 on OpenBSD)</li>
- <li>make install</li>
- <li>Back to X (Ctrl+Alt+F5)</li>
-</ul>
-
-<p>Upgrades:</p>
-<ul>
- <li>git pull –rebase</li>
- <li>git rebase -i to drop commits between my patch and new stable</li>
- <li>Keep only: my patches + new stable tag + old history</li>
- <li>Install, commit, push</li>
-</ul>
-
-<p>Example:</p>
-
-<p>Before: [my patch] -&gt; [6.5] <br />
-After pull: [my patch] -&gt; [random commits] -&gt; [6.6] -&gt; [old stuff] -&gt; [6.5] <br />
-After rebase: [my patch] -&gt; [6.6] -&gt; [old stuff] -&gt; [6.5]</p>
-
-<p>Note: This keeps patch history clean while staying current.</p>
-
-</div>
- <p class="post-author right">by W. D. Sadeep Madurange</p>
- </div>
- </div>
- </main>
-
- <div class="footer">
- <div class="container">
- <div class="twelve columns right container-2">
- <p id="footer-text">&copy; ASCIIMX - 2025</p>
- </div>
- </div>
-</div>
-
-
- </body>
-</html>