summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-07-25 16:48:16 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-08-13 22:51:43 +0800
commit10316f4c8259c65edf49462bc0e2a76011577e1c (patch)
treeee3e0e51d452326ae733520393900ff8abba0a27
parent61568cd8d254b794188352354902acd85bdc4739 (diff)
downloadwww-10316f4c8259c65edf49462bc0e2a76011577e1c.tar.gz
Add reference to Domsson's fakesteak and minor tweaks to articles.minimalist
-rw-r--r--_log/2d-geometry-kernel.md27
-rw-r--r--_log/bumblebee.md12
-rw-r--r--_log/fpm-door-lock-lp.md2
-rw-r--r--_log/fpm-door-lock-rf.md3
-rw-r--r--_log/jint-gadget-chain-rce.md32
-rw-r--r--_log/matrix-digital-rain.md5
-rw-r--r--_log/site-search.md17
-rw-r--r--_log/vcs-1.md8
8 files changed, 48 insertions, 58 deletions
diff --git a/_log/2d-geometry-kernel.md b/_log/2d-geometry-kernel.md
index 5275ad8..2fc685a 100644
--- a/_log/2d-geometry-kernel.md
+++ b/_log/2d-geometry-kernel.md
@@ -6,29 +6,24 @@ layout: post
Written in 2026, backdated to 2022.
-Joined real estate firm mid-migration from C# to Java. Lacking a geometry
-kernel, the project had stalled.
-
+Real estate firm decided to rewrite the building design system from C# to Java.
Building geometries are small—mostly 2D. No frame budgets or low-latency
constraints. Numerical parity with Rhino was mandatory. Architects and
-structural engineers supplied test cases and tolerances.
+structural engineers supplied test cases and floating-point tolerances.
Implemented polygon clipping with Sutherland–Hodgman. No drama.
Fortune's algorithm was a missed opportunity. Implemented the beach line using
-a linear list instead of the balanced binary tree. Planned to return to this.
-Never had the chance.
+a linear list instead of the balanced binary tree. Planned to return to this;
+never had the chance.
Z and H-shaped floor plan offsets produced self-intersections that even Rhino
-mishandled. Couldn't implement straight skeletons under time pressure. Wrote a
-custom solver that fixed invalid loops by backtracking instead.
-
-Problem of finding the largest inscribed rectangle surprised me. No single
-algorithm covered both convex and concave shapes. Brute-force grid search
-yielded 12% more buildable area—but not the true optimum.
-
-Java BSP library produced results numerically incompatible with Rhino's.
-Replaced BSP trees with vector-based primitives and JBLAS.
+mishandled. Could not get straight skeletons working under time pressure. Wrote
+a custom solver that fixed invalid loops by backtracking instead.
-Migration resumed.
+Problem of finding the largest inscribed rectangle was surprisingly difficult.
+No single algorithm covered both convex and concave shapes. Brute-force grid
+search yielded 12% more buildable area—but not the true optimum.
+Java BSP library proved numerically incompatible with Rhino. Replaced BSP trees
+with vector-based primitives and JBLAS instead.
diff --git a/_log/bumblebee.md b/_log/bumblebee.md
index 7962279..0a9ab49 100644
--- a/_log/bumblebee.md
+++ b/_log/bumblebee.md
@@ -1,23 +1,23 @@
---
-title: Web script synthesizer
+title: Bumblebee
date: 2025-04-02
layout: post
project: true
thumbnail: thumb_sm.png
---
-One year at trading firm; scripts are saturating CPUs, stalling servers.
-Forced to restart them.
+One year at trading firm; scripts are saturating CPUs, servers are choking.
+Forced to restart them daily.
-2025-02: Built a C# WinForms app to record browser sessions and synthesize
-better scripts.
+2025-02: Built Bumblebee: a C# WinForms desktop app that records browser
+sessions and synthesize browser automation scripts. Andy helped.
<video style="max-width:100%; margin-bottom: 10px" controls="" poster="poster.png">
<source src="bee.mp4" type="video/mp4">
</video>
JS hooks, WebView2 browser, Scintilla.NET editor emit events. Backend
-interprets them and emits Selenium browser automation code.
+interprets them and emits Selenium code.
Two linear lists store events and code—no time for ASTs. Mid-session manual
edits desync lists, block optimizer. Workaround: only edit script after
diff --git a/_log/fpm-door-lock-lp.md b/_log/fpm-door-lock-lp.md
index 5b7d33a..781266e 100644
--- a/_log/fpm-door-lock-lp.md
+++ b/_log/fpm-door-lock-lp.md
@@ -8,7 +8,7 @@ thumbnail: thumb_sm.jpg
Second iteration of the [lock](../fpm-door-lock-rf). The old version worked but
drew too much quiescent current. Sensor and servo pulled 13.8mA and 4.6mA idle.
-Linear regulators were a disaster. Battery didn't last 24 hours.
+Linear regulators dissipated too much heat. Battery didn't last 24 hours.
<video style="max-width:100%;" controls="" poster="pcb.jpg">
<source src="video.mp4" type="video/mp4">
diff --git a/_log/fpm-door-lock-rf.md b/_log/fpm-door-lock-rf.md
index fb4ec29..cb2b3b1 100644
--- a/_log/fpm-door-lock-rf.md
+++ b/_log/fpm-door-lock-rf.md
@@ -23,8 +23,7 @@ converter (LLC) issues. Not enough swing?
no LLC required. Implemented the driver over six weekends. Wireless modules are
now operational.
-Encrypted the RF channel with XOR cipher—sufficient for the threat model; key
-recycled to resist replay attacks:
+XOR cipher obfuscates data on the wire; key recycled to resist replay attacks:
```
static inline void keygen(char *buf, uint8_t n)
diff --git a/_log/jint-gadget-chain-rce.md b/_log/jint-gadget-chain-rce.md
index 081ec0e..4241419 100644
--- a/_log/jint-gadget-chain-rce.md
+++ b/_log/jint-gadget-chain-rce.md
@@ -4,25 +4,25 @@ date: 2026-07-18
layout: post
---
-Asyx6, a bounty hunter, reported a CVSS 9.9 RCE vulnerability in a six-year-old
-program.
+Received a CVSS 9.9 RCE vulnerability report from security researcher asyx6
+today.
-The application exposed JSON data from HTTP requests to Jint as
-JObjects—presumed safe because the CLR interop was disabled in the Jint
-configuration. It wasn't.
+Six-year-old program exposed JSON data from HTTP requests to Jint as
+JObjects—presumed safe because CLR interop was disabled. Jint uses reflection
+to resolve methods on CLR types. Interop settings have no bearing on this
+internal mechanism.
-Jint uses reflection-based method resolution on CLR types regardless of the
-interop settings. A user-defined script invoking ToObject() on a JObject
-activates Newtonsoft.Json's deserializer. Together, these formed a gadget chain
-from attacker-controlled JSON payload to System.Diagnostics.Process:
+A user-defined script invoked ToObject() on a JObject, activating the
+Newtonsoft.Json's deserializer. Together, these formed a gadget chain from
+attacker-controlled JSON payload to System.Diagnostics.Process:
```
data.ToObject(cfg).Start(psi.ToObject(cfg)).StandardOutput.ReadToEnd();
```
-The script triggers the deserialization of the following malicious JSON payload
-via a serializer configured with TypeNameHandling.All. This constructs a
-Process, starts it, and reads its output:
+The script triggered the deserialization of the following malicious payload via
+a serializer configured with TypeNameHandling.All. This constructed a Process,
+started it, and read its output:
```
{
@@ -38,8 +38,8 @@ Process, starts it, and reads its output:
}
```
-Fix: Objects that implement IDictionary<string, object> bypass Jint's method
-resolution system. Converted all objects that cross the CLR-JavaScript boundary
-to ExpandoObjects. Blocked reflection types from reaching Jint for good
-measure.
+Fix: IDictionary<string, object> objects bypass Jint's method resolution
+system. Converted anything that crosses the CLR-JavaScript boundary to
+ExpandoObjects; blocked reflection types from reaching Jint for good measure.
+asyx6 verified the fix.
diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md
index 1a8d9cb..0570ca1 100644
--- a/_log/matrix-digital-rain.md
+++ b/_log/matrix-digital-rain.md
@@ -6,6 +6,9 @@ project: true
thumbnail: thumb_sm.png
---
+Inspired by domsson's <a href="https://github.com/domsson/fakesteak"
+class="external" target="_blank" rel="noopener noreferrer">fakesteak</a>.
+
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.
@@ -78,8 +81,6 @@ static inline uint32_t xor(void)
}
```
-Came across faster non-linear variants (xorshiftr+). Xorshift was good enough.
-
Tossed the license and the automake cruft. Just `cc -O3 main.c -o matrix` now.
Don't need the ceremony.
diff --git a/_log/site-search.md b/_log/site-search.md
index 25c0c2c..c767381 100644
--- a/_log/site-search.md
+++ b/_log/site-search.md
@@ -1,13 +1,9 @@
---
-title: Static site search with suffix arrays
+title: Suffix-array site search
date: 2026-01-03
layout: post
---
-Developed a suffix-array-based search engine. While a simple regex search
-would've been sufficient, couldn't resist the technical elegance of a proper
-index.
-
Indexer crawls the HTML, lowercases the text, and encodes it into UTF-8 bytes.
Null byte sentinels mark document boundaries; sa.bin stores lexicographically
sorted 32-bit unsigned integer offsets:
@@ -25,8 +21,8 @@ my @sa = 0 .. (length($corpus) - 1);
}
```
-32-bit offsets provide a 4 GB ceiling—overkill for a personal site with 12
-articles, but comforting to have.
+32-bit offsets provide a 4 GB ceiling—overkill for 12 articles, but comforting
+to have.
O(L⋅N log N) sort is the bottleneck. 100 4.1 KB articles took 97.9s to index.
L=64 fast path reduces that to 1.31s. Experimented with 16, 32, 128, and 256
@@ -97,10 +93,11 @@ Index size | 103557.18 KB | N/A
------------------------------------------------------------------------
</pre>
-Search scales well—0.9 ms at 100 files, 8.8 ms at 5000. Indexing doesn't. 4.5s
-at 300 files is tolerable; 138s at 5000 is impractical.
+Search scales well—0.9ms at 100 files, 8.8ms at 5000. Indexing doesn’t: 4.5s
+at 300 files is tolerable; 138s at 5000 is impractical. At six articles a year,
+the indexer should remain viable for ~100 years.
-Warranty: 300 / 6 → 50 years.
+Next release: SA-IS O(n), Anno Domini 2126.
Commit: <a
href="https://git.asciimx.com/www/commit/?h=term&id=6da102d6e0494a3eac3f05fa3b2cdcc25ba2754e"
diff --git a/_log/vcs-1.md b/_log/vcs-1.md
index 8dc6bca..67c64ad 100644
--- a/_log/vcs-1.md
+++ b/_log/vcs-1.md
@@ -104,11 +104,9 @@ Final Inodes | 1462 | 41
TOTAL URN REBASES: 0
</pre>
-Git is 10x faster.
-
-On storage, Urn shows promise. Git wrote 12 MB to track a 17 MB repository; Urn
-wrote 9 MB. Over 80 commits, Git's inode consumption grew by 562, while Urn's
-crept from 1,300 to 1,462.
+Git is 10x faster. On storage, Urn shows promise. Git wrote 12 MB to track a 17
+MB repository; Urn wrote 9 MB. Over 80 commits, Git's inode consumption grew by
+562, while Urn's crept from 1,300 to 1,462.
Then fell the GC hammer. Inodes: 41. Space recovered: 8.4 MB.