summaryrefslogtreecommitdiffstats
path: root/_log/matrix-digital-rain.md
diff options
context:
space:
mode:
Diffstat (limited to '_log/matrix-digital-rain.md')
-rw-r--r--_log/matrix-digital-rain.md16
1 files changed, 7 insertions, 9 deletions
diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md
index 2edc7e7..43944ae 100644
--- a/_log/matrix-digital-rain.md
+++ b/_log/matrix-digital-rain.md
@@ -6,7 +6,7 @@ project: true
thumbnail: thumb_sm.png
---
-The 2022 version worked but had some loose ends. Unicode support was
+2022 version worked but had loose ends. Unicode support was
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.
@@ -18,11 +18,11 @@ than it needed to be.
Moved phosphor decay into the 4th byte of the RGB union--should’ve done this
in 2022; What was I thinking.
-Keeping the RGB union despite portability concerns. All my systems are
-little-endian and the code is cleaner this way.
+Kept the RGB union. Portability not a concern. All my systems are little-endian
+and the code is cleaner this way.
-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.
+Fixed Unicode by introducing a charset array. UNICODE(min, max) macro 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:
```
@@ -49,7 +49,7 @@ static inline void insert_code(matrix *mat,
Full-width Katakana breaks column alignment. Stick to half-width
(U+FF61-U+FF9F) range. Compile with -DNOKANA to disable Katakana altogether.
-blend() for screen decay is still good:
+blend() for screen decay is still good. Left it alone:
```
static inline void blend(matrix *mat,
@@ -64,8 +64,6 @@ static inline void blend(matrix *mat,
}
```
-Left it alone.
-
Optimized RNG--xorshift instead of rand():
```
@@ -80,7 +78,7 @@ static inline uint32_t xor(void)
}
```
-NOTE: Non-linear variations (xorshitr+) for more speed.
+NOTE: Non-linear variants (xorshitr+) for more speed.
Tossed license and automake cruft. Just `cc -O3 main.c -o matrix` now. Don't
need the ceremony.