From 9b95f811472a15280e67f99c90c0013987b32ee2 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Fri, 26 Dec 2025 12:29:47 +0800 Subject: Technical notebook style. --- _site/feed.xml | 2 +- _site/index.html | 26 ++++---- _site/log/index.html | 13 ---- _site/log/matrix-digital-rain/index.html | 50 ++++++++++----- _site/log/suckless-software/index.html | 105 ------------------------------- _site/posts.xml | 2 +- _site/sitemap.xml | 4 -- 7 files changed, 50 insertions(+), 152 deletions(-) delete mode 100644 _site/log/suckless-software/index.html (limited to '_site') diff --git a/_site/feed.xml b/_site/feed.xml index 017f730..1b81c18 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -Jekyll2025-12-26T11:27:12+08:00/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeMatrix Rain: 2025 refactor2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00/log/matrix-digital-rainW. D. Sadeep MadurangeSuckless upgrade workflow2025-11-30T00:00:00+08:002025-11-30T00:00:00+08:00/log/suckless-softwareW. D. Sadeep MadurangeFingerprint door lock2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00/log/fpm-door-lockW. D. Sadeep MadurangeOn the use of MOSFETs as electronic switches2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00/log/mosfet-switchesW. D. Sadeep MadurangeHow to configure ATmega328P microcontrollers to run at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00/log/arduino-unoW. D. Sadeep MadurangeMy first PCB2025-04-26T00:00:00+08:002025-04-26T00:00:00+08:00/log/my-first-pcbW. D. Sadeep MadurangeBumblebee: browser automation2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00/log/bumblebeeW. D. Sadeep MadurangeHow to set up ATSAM3X8E microcontrollers for bare-metal programming in C2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00/log/etlasW. D. Sadeep MadurangeExperimental e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00/log/e-readerW. D. Sadeep Madurange \ No newline at end of file +Jekyll2025-12-26T12:29:33+08:00/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeMatrix Rain: 2025 refactor2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00/log/matrix-digital-rainW. D. Sadeep MadurangeFingerprint door lock2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00/log/fpm-door-lockW. D. Sadeep MadurangeOn the use of MOSFETs as electronic switches2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00/log/mosfet-switchesW. D. Sadeep MadurangeHow to configure ATmega328P microcontrollers to run at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00/log/arduino-unoW. D. Sadeep MadurangeMy first PCB2025-04-26T00:00:00+08:002025-04-26T00:00:00+08:00/log/my-first-pcbW. D. Sadeep MadurangeBumblebee: browser automation2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00/log/bumblebeeW. D. Sadeep MadurangeHow to set up ATSAM3X8E microcontrollers for bare-metal programming in C2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00/log/etlasW. D. Sadeep MadurangeExperimental e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00/log/e-readerW. D. Sadeep MadurangeNeo4J A* search2018-03-06T00:00:00+08:002018-03-06T00:00:00+08:00/log/neo4j-a-star-searchW. D. Sadeep Madurange \ No newline at end of file diff --git a/_site/index.html b/_site/index.html index c4aea58..68750d3 100644 --- a/_site/index.html +++ b/_site/index.html @@ -67,19 +67,6 @@ - - - Suckless upgrade workflow - - - - - - - - - - Fingerprint door lock @@ -184,6 +171,19 @@ + + + Neo4J A* search + + + + + + + + + + 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 @@ -57,19 +57,6 @@ - - - Suckless upgrade workflow - - - - - - - - - - Fingerprint door lock 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 @@

MATRIX RAIN: 2025 REFACTOR

21 DECEMBER 2025

-

Fixed the Unicode issue finally. Can now mix ASCII + Katakana.

+

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.

-

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.

+

Moved phosphor decay into the 4th byte of the RGB union–should’ve done this +in 2022. What was I thinking.

-

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.

+

Keeping the RGB union despite portability concerns. All my systems are +little-endian and the code is cleaner this way.

-

New charset array works. UNICODE(min, max) macro packs the range into uint64. -insert_code() unpacks block and picks random char.

+

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:

-

Full-width Katakana breaks columns. Stick to half-width (U+FF61-U+FF9F) range . -Compile with -DNOKANA to disable Katakana altogether.

+
static uint64_t glyphs[] = {
+    UNICODE(0x0021, 0x007E), /* ASCII */
+    UNICODE(0xFF65, 0xFF9F), /* Half-width Katakana */
+};
+
-

blend() is still good, left it alone.

+

Full-width Katakana breaks column alignment. Stick to half-width +(U+FF61-U+FF9F) range. Compile with -DNOKANA to disable Katakana altogether.

-

Tossed license and automake cruft. Just cc -O3 main.c -o matrix. Don’t need -the ceremony.

+

blend() simulates phosphor decay by eroding RGB channels toward +background color:

-

Performance regressions: none. Runs like a charm on the T490. 2% CPU. No -whirring fans.

+
static inline void blend(matrix *mat, size_t row, size_t col)
+{
+    unsigned char *color = mat->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;
+}
+
+ +

That’s still good. Leaving it alone.

+ +

Tossed license and automake cruft. Just cc -O3 main.c -o matrix now. Don’t +need the ceremony.

+ +

Runs at 2-3% CPU on OpenBSD (T490). No regressions. Fans are quiet.

Commit: 03f8d87

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 @@ - - - - - Suckless upgrade workflow - - - - - Suckless upgrade workflow - - - - - - - - - - - - - -
-
-
-

SUCKLESS UPGRADE WORKFLOW

-
30 NOVEMBER 2025
-
-

Workflow for managing suckless patches across upgrades:

- -

Initial setup:

-
    -
  • Clone from suckless
  • -
  • Reset to stable tag
  • -
  • Set push URL to my repo (git.asciimx.com)
  • -
  • Pull from upstream, push to mine
  • -
- -

Config changes only:

-
    -
  • Edit config.h (or let make generate it)
  • -
  • make clean install
  • -
  • Commit, push
  • -
- -

dwm/slstatus installs:

-
    -
  • Can’t replace running binaries
  • -
  • Kill dwm (Mod+Shift+q)
  • -
  • Switch to tty (Ctrl+Alt+F1 on OpenBSD)
  • -
  • make install
  • -
  • Back to X (Ctrl+Alt+F5)
  • -
- -

Upgrades:

-
    -
  • git pull –rebase
  • -
  • git rebase -i to drop commits between my patch and new stable
  • -
  • Keep only: my patches + new stable tag + old history
  • -
  • Install, commit, push
  • -
- -

Example:

- -

Before: [my patch] -> [6.5]
-After pull: [my patch] -> [random commits] -> [6.6] -> [old stuff] -> [6.5]
-After rebase: [my patch] -> [6.6] -> [old stuff] -> [6.5]

- -

Note: This keeps patch history clean while staying current.

- -
- -
-
-
- - - - - - diff --git a/_site/posts.xml b/_site/posts.xml index 25b0ea1..dc403d2 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -Jekyll2025-12-26T11:27:12+08:00/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file +Jekyll2025-12-26T12:29:33+08:00/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file diff --git a/_site/sitemap.xml b/_site/sitemap.xml index e8e9d7b..c999ab9 100644 --- a/_site/sitemap.xml +++ b/_site/sitemap.xml @@ -37,10 +37,6 @@ 2025-08-18T00:00:00+08:00 -/log/suckless-software/ -2025-11-30T00:00:00+08:00 - - /log/matrix-digital-rain/ 2025-12-21T00:00:00+08:00 -- cgit v1.2.3