summaryrefslogtreecommitdiffstats
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
parent51f8430027ceaf7590d826221230cbe2fc1af2ec (diff)
downloadwww-d2c9a7b88adae1e949af60b7f276364592e49869.tar.gz
Matrix 1980s style.
-rw-r--r--_log/matrix-digital-rain.md39
-rw-r--r--_site/feed.xml2
-rw-r--r--_site/log/matrix-digital-rain/index.html39
-rw-r--r--_site/posts.xml2
4 files changed, 30 insertions, 52 deletions
diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md
index d4ea301..4958eed 100644
--- a/_log/matrix-digital-rain.md
+++ b/_log/matrix-digital-rain.md
@@ -6,39 +6,28 @@ project: true
thumbnail: thumb_sm.png
---
-Fixed the Unicode issue finally. Can now mix ASCII + Katakana.
-
-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.
-
-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?
-
-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.
-
-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.
-
-Looks a lot like the original now:
+Unicode support added. ASCII + Katakana working:
<video style="max-width:100%;" controls="" poster="poster.png">
<source src="matrix.mp4" type="video/mp4">
</video>
-Using half-width Katakana (U+FF61-U+FF9F) because full-width characters break
-columns.
+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.
+
+Phosphor decay moved to LSB of RGB union. Should have done this originally.
+
+RGB/PD union stays. Little-endian machine, portability not a concern.
+
+Charset via UNICODE(min, max) macro - packs range into uint64, insert_code()
+unpacks and selects random char.
-blend() is still good, left it alone.
+Half-width Katakana (U+FF61-U+FF9F) for column alignment.
-Tossed the license and automake cruft. Just `cc -O3 main.c -o matrix`. Don't
-need the ceremony.
+Removed license, automake files. Build: cc -O3 main.c -o matrix
-Performance regressions: none. Runs like a charm on the T490. 2% CPU. No
-whirring fans.
+Performance: 2% CPU, OpenBSD, T490.
Commit:
[03f8d87](https://git.asciimx.com/matrix-digital-rain/commit/?id=03f8d87ba7c2e46bd3f3cc4c772fb3a2ac740c92)
diff --git a/_site/feed.xml b/_site/feed.xml
index 53bfef3..109f0b4 100644
--- a/_site/feed.xml
+++ b/_site/feed.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-12-25T17:24:55+08:00</updated><id>/feed.xml</id><title type="html">ASCIIMX | Log</title><author><name>W. D. Sadeep Madurange</name></author><entry><title type="html">Matrix Rain: 2025 refactor</title><link href="/log/matrix-digital-rain/" rel="alternate" type="text/html" title="Matrix Rain: 2025 refactor" /><published>2025-12-21T00:00:00+08:00</published><updated>2025-12-21T00:00:00+08:00</updated><id>/log/matrix-digital-rain</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Fixed the Unicode issue finally. Can now mix ASCII + Katakana.]]></summary></entry><entry><title type="html">Suckless upgrade workflow</title><link href="/log/suckless-software/" rel="alternate" type="text/html" title="Suckless upgrade workflow" /><published>2025-11-30T00:00:00+08:00</published><updated>2025-11-30T00:00:00+08:00</updated><id>/log/suckless-software</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Workflow for managing suckless patches across upgrades:]]></summary></entry><entry><title type="html">Fingerprint door lock</title><link href="/log/fpm-door-lock/" rel="alternate" type="text/html" title="Fingerprint door lock" /><published>2025-08-18T00:00:00+08:00</published><updated>2025-08-18T00:00:00+08:00</updated><id>/log/fpm-door-lock</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This project features a fingerprint door lock powered by an ATmega328P microcontroller.]]></summary></entry><entry><title type="html">On the use of MOSFETs as electronic switches</title><link href="/log/mosfet-switches/" rel="alternate" type="text/html" title="On the use of MOSFETs as electronic switches" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>/log/mosfet-switches</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to electronically switch off components, such as servos, that draw high levels of quiescent currents. My search for a solution led me to MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">How to configure ATmega328P microcontrollers to run at 3.3V and 5V</title><link href="/log/arduino-uno/" rel="alternate" type="text/html" title="How to configure ATmega328P microcontrollers to run at 3.3V and 5V" /><published>2025-06-10T00:00:00+08:00</published><updated>2025-06-10T00:00:00+08:00</updated><id>/log/arduino-uno</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This is a quick reference for wiring up ATmega328P ICs to run at 5V and 3.3V. While the 5V configuration is common, the 3.3V configuration can be useful in low-power applications and when interfacing with parts that themselves run at 3.3V. In this guide, the 5V setup is configured with a 16MHz crystal oscillator, while the 3.3V configuration makes use of an 8MHz crystal oscillator.]]></summary></entry><entry><title type="html">My first PCB</title><link href="/log/my-first-pcb/" rel="alternate" type="text/html" title="My first PCB" /><published>2025-04-26T00:00:00+08:00</published><updated>2025-04-26T00:00:00+08:00</updated><id>/log/my-first-pcb</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[In 2023, I started tinkering with DIY electronics as a hobby. Until now, I’ve been using development boards like the Arduino Uno and ESP-32-WROOM so that I can focus on the software. Recently, I decided to step outside of my comfort zone and design a PCB from scratch for a door lock I’m working on.]]></summary></entry><entry><title type="html">Bumblebee: browser automation</title><link href="/log/bumblebee/" rel="alternate" type="text/html" title="Bumblebee: browser automation" /><published>2025-04-02T00:00:00+08:00</published><updated>2025-04-02T00:00:00+08:00</updated><id>/log/bumblebee</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Bumblebee is a tool I built for one of my employers to automate the generation of web scraping scripts.]]></summary></entry><entry><title type="html">How to set up ATSAM3X8E microcontrollers for bare-metal programming in C</title><link href="/log/arduino-due/" rel="alternate" type="text/html" title="How to set up ATSAM3X8E microcontrollers for bare-metal programming in C" /><published>2024-09-16T00:00:00+08:00</published><updated>2024-09-16T00:00:00+08:00</updated><id>/log/arduino-due</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This article is a step-by-step guide for programming bare-metal ATSAM3X8E chips found on Arduino Due boards. It also includes notes on the chip’s memory layout relevant for writing linker scripts. The steps described in this article were tested on an OpenBSD workstation.]]></summary></entry><entry><title type="html">Etlas: e-paper dashboard</title><link href="/log/etlas/" rel="alternate" type="text/html" title="Etlas: e-paper dashboard" /><published>2024-09-05T00:00:00+08:00</published><updated>2024-09-05T00:00:00+08:00</updated><id>/log/etlas</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Etlas is a news, stock market, and weather tracker powered by an ESP32 NodeMCU D1, featuring a 7.5-inch Waveshare e-paper display and a DHT22 sensor module.]]></summary></entry><entry><title type="html">Experimental e-reader</title><link href="/log/e-reader/" rel="alternate" type="text/html" title="Experimental e-reader" /><published>2023-10-24T00:00:00+08:00</published><updated>2023-10-24T00:00:00+08:00</updated><id>/log/e-reader</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This project features an experimental e-reader powered by an ESP-WROOM-32 development board and a 7.5-inch Waveshare e-paper display built with the intention of learning about e-paper displays.]]></summary></entry></feed> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-12-25T17:40:37+08:00</updated><id>/feed.xml</id><title type="html">ASCIIMX | Log</title><author><name>W. D. Sadeep Madurange</name></author><entry><title type="html">Matrix Rain: 2025 refactor</title><link href="/log/matrix-digital-rain/" rel="alternate" type="text/html" title="Matrix Rain: 2025 refactor" /><published>2025-12-21T00:00:00+08:00</published><updated>2025-12-21T00:00:00+08:00</updated><id>/log/matrix-digital-rain</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Unicode support added. ASCII + Katakana working:]]></summary></entry><entry><title type="html">Suckless upgrade workflow</title><link href="/log/suckless-software/" rel="alternate" type="text/html" title="Suckless upgrade workflow" /><published>2025-11-30T00:00:00+08:00</published><updated>2025-11-30T00:00:00+08:00</updated><id>/log/suckless-software</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Workflow for managing suckless patches across upgrades:]]></summary></entry><entry><title type="html">Fingerprint door lock</title><link href="/log/fpm-door-lock/" rel="alternate" type="text/html" title="Fingerprint door lock" /><published>2025-08-18T00:00:00+08:00</published><updated>2025-08-18T00:00:00+08:00</updated><id>/log/fpm-door-lock</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This project features a fingerprint door lock powered by an ATmega328P microcontroller.]]></summary></entry><entry><title type="html">On the use of MOSFETs as electronic switches</title><link href="/log/mosfet-switches/" rel="alternate" type="text/html" title="On the use of MOSFETs as electronic switches" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>/log/mosfet-switches</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to electronically switch off components, such as servos, that draw high levels of quiescent currents. My search for a solution led me to MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">How to configure ATmega328P microcontrollers to run at 3.3V and 5V</title><link href="/log/arduino-uno/" rel="alternate" type="text/html" title="How to configure ATmega328P microcontrollers to run at 3.3V and 5V" /><published>2025-06-10T00:00:00+08:00</published><updated>2025-06-10T00:00:00+08:00</updated><id>/log/arduino-uno</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This is a quick reference for wiring up ATmega328P ICs to run at 5V and 3.3V. While the 5V configuration is common, the 3.3V configuration can be useful in low-power applications and when interfacing with parts that themselves run at 3.3V. In this guide, the 5V setup is configured with a 16MHz crystal oscillator, while the 3.3V configuration makes use of an 8MHz crystal oscillator.]]></summary></entry><entry><title type="html">My first PCB</title><link href="/log/my-first-pcb/" rel="alternate" type="text/html" title="My first PCB" /><published>2025-04-26T00:00:00+08:00</published><updated>2025-04-26T00:00:00+08:00</updated><id>/log/my-first-pcb</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[In 2023, I started tinkering with DIY electronics as a hobby. Until now, I’ve been using development boards like the Arduino Uno and ESP-32-WROOM so that I can focus on the software. Recently, I decided to step outside of my comfort zone and design a PCB from scratch for a door lock I’m working on.]]></summary></entry><entry><title type="html">Bumblebee: browser automation</title><link href="/log/bumblebee/" rel="alternate" type="text/html" title="Bumblebee: browser automation" /><published>2025-04-02T00:00:00+08:00</published><updated>2025-04-02T00:00:00+08:00</updated><id>/log/bumblebee</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Bumblebee is a tool I built for one of my employers to automate the generation of web scraping scripts.]]></summary></entry><entry><title type="html">How to set up ATSAM3X8E microcontrollers for bare-metal programming in C</title><link href="/log/arduino-due/" rel="alternate" type="text/html" title="How to set up ATSAM3X8E microcontrollers for bare-metal programming in C" /><published>2024-09-16T00:00:00+08:00</published><updated>2024-09-16T00:00:00+08:00</updated><id>/log/arduino-due</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This article is a step-by-step guide for programming bare-metal ATSAM3X8E chips found on Arduino Due boards. It also includes notes on the chip’s memory layout relevant for writing linker scripts. The steps described in this article were tested on an OpenBSD workstation.]]></summary></entry><entry><title type="html">Etlas: e-paper dashboard</title><link href="/log/etlas/" rel="alternate" type="text/html" title="Etlas: e-paper dashboard" /><published>2024-09-05T00:00:00+08:00</published><updated>2024-09-05T00:00:00+08:00</updated><id>/log/etlas</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Etlas is a news, stock market, and weather tracker powered by an ESP32 NodeMCU D1, featuring a 7.5-inch Waveshare e-paper display and a DHT22 sensor module.]]></summary></entry><entry><title type="html">Experimental e-reader</title><link href="/log/e-reader/" rel="alternate" type="text/html" title="Experimental e-reader" /><published>2023-10-24T00:00:00+08:00</published><updated>2023-10-24T00:00:00+08:00</updated><id>/log/e-reader</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[This project features an experimental e-reader powered by an ESP-WROOM-32 development board and a 7.5-inch Waveshare e-paper display built with the intention of learning about e-paper displays.]]></summary></entry></feed> \ No newline at end of file
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>
diff --git a/_site/posts.xml b/_site/posts.xml
index 0774115..ca75414 100644
--- a/_site/posts.xml
+++ b/_site/posts.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/posts.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-12-25T17:24:55+08:00</updated><id>/posts.xml</id><title type="html">ASCIIMX</title><author><name>W. D. Sadeep Madurange</name></author></feed> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/posts.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-12-25T17:40:37+08:00</updated><id>/posts.xml</id><title type="html">ASCIIMX</title><author><name>W. D. Sadeep Madurange</name></author></feed> \ No newline at end of file