summaryrefslogtreecommitdiffstats
path: root/_projects
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-12-18 22:22:54 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-12-18 22:22:54 +0800
commit4edf733b7bf460d1c27c9e6529b8d39cf5bb5e56 (patch)
tree1f7bd09dbd1ae913d92a8f4eed75efae395dc7f0 /_projects
parent8f96339b62d54479e0e712975276c05e907979fd (diff)
downloadwww-4edf733b7bf460d1c27c9e6529b8d39cf5bb5e56.tar.gz
Bumblebee post.
Diffstat (limited to '_projects')
-rw-r--r--_projects/bumblebee.md32
-rw-r--r--_projects/matrix-digital-rain.md47
2 files changed, 38 insertions, 41 deletions
diff --git a/_projects/bumblebee.md b/_projects/bumblebee.md
index b3dd686..cb0441d 100644
--- a/_projects/bumblebee.md
+++ b/_projects/bumblebee.md
@@ -16,37 +16,35 @@ In 2024, we were tasked with collecting market data using various methods,
including scraping data from authorized websites for traders' use.
Manual authoring of such scripts took time. The scripts were often brittle due
-to the complex nature of modern websites, and they lacked optimizations such as
+to the complexity of the modern web, and they lacked optimizations such as
bypassing the UI and retrieving the data files directly when possible, which
would have significantly reduced our compute costs.
To alleviate these challenges, I, with the help of a colleague, Andy Zhang,
-built Bumblebee: a C# Windows Forms desktop application that uses Microsoft
-Edge <a src="https://developer.microsoft.com/en-us/microsoft-edge/webview2"
-class="external" target="_blank" rel="noopener noreferrer">WebView2</a> for
-rendering web content.
+built Bumblebee: a web browser powered by C# Windows Forms, Microsoft Edge <a
+src="https://developer.microsoft.com/en-us/microsoft-edge/webview2"
+class="external" target="_blank" rel="noopener noreferrer">WebView2</a>, and
+the <a src="https://github.com/desjarlais/Scintilla.NET" class="external"
+toarget="_blank" rel="noopener noreferrer">Scintilla.NET</a> text editor.
Bumblebee works by injecting a custom JavaScript program that intercepts
client-side events and sends them to Bumblebee for analysis. In addition to
front-end events, Bumblebee also captures internal browser events, which it
then interprets to generate code in real time. Note that we developed Bumblebee
-before the advent of now-popular LLMs. Bumblebee reliably handles dynamic
-websites and pop-ups. The user can access developer tools, override any part of
-the script at any point during the session (using the embedded <a
-src="https://github.com/desjarlais/Scintilla.NET" class="external"
-target="_blank" rel="noopener noreferrer">Scintilla.NET</a> editor), debounce
-events, and block hidden elements and scripts.
+before the advent of now-popular LLMs. Bumblebee supports dynamic websites,
+pop-ups, developer tools, live manual override, event debouncing, and filtering
+hidden elements and scripts.
Before settling on a desktop application, we contemplated designing Bumblebee
as a browser extension. We chose the desktop app because extensions don't offer
the deep, event-based control we needed. Besides, the company's security
policy, which prohibited browser extensions, would have complicated the
-deployment of an extension-based solution. The initial prototype used a C#
-wrapper of the Chromium project instead of WebView. WebView's more intuitive
-API and its seamless integration with Windows Forms led us to choose it over
-the Chromium wrapper.
+deployment of an extension-based solution. My first prototype used a C# binding
+of the Chromium project. WebView's more intuitive API and its seamless
+integration with Windows Forms led us to choose it over the Chromium wrapper.
+What began as a personal side project to improve my own workflow enabled us to
+collectively improve the quality of our web scripts at a much larger scale.
Bumblebee predictably reduced the time we spent on authoring scripts from hours
-to a few minutes. Since the code generation rules were written and optimized by
-experts in web technologies, the quality of the scripts improved as well.
+to a few minutes.
diff --git a/_projects/matrix-digital-rain.md b/_projects/matrix-digital-rain.md
index bca5c38..6d15008 100644
--- a/_projects/matrix-digital-rain.md
+++ b/_projects/matrix-digital-rain.md
@@ -16,14 +16,14 @@ Matrix in C, with zero dependencies—not even ncurses.
This is my fork of Domsson's beautiful <a
href="https://github.com/domsson/fakesteak" class="external" target="_blank"
-rel="noopener noreferrer">Fakesteak</a>. While studying the code, I wondered
-what it would take to faithfully recreate the original Matrix from the first
-movie without sacrificing the program's minimalism and elegance.
+rel="noopener noreferrer">Fakesteak</a>. While going through his code, I
+wondered what it would take to faithfully recreate the original Matrix from the
+first movie without sacrificing its minimalism.
-My version adds:
+My implementation supports:
- - Unicode character support.
- - Fully customizable 24-bit RGB (truecolor) colors.
+ - Unicode characters.
+ - 24-bit RGB colors (truecolor).
- Glitches in the matrix.
- Ghosting effect of old monochrome CRT displays.
- Closely resembles the Matrix seen in the background during Neo and Cypher's
@@ -38,10 +38,10 @@ $ ./matrix
## How does it work?
-The program tracks the state of the terminal - characters, background and
-foreground colors, shading levels, cursor position - using multiple internal
-data buffers. On each frame, it updates these buffers and repaints the screen
-using ANSI escape codes:
+The program tracks the state of the terminal, such as code points, background
+and foreground colors, and cursor position, using multiple internal data
+buffers. On each frame, it updates these buffers and repaints the screen using
+ANSI escape codes:
```
static void term_print(const matrix *mat, size_t row, size_t col)
@@ -57,8 +57,8 @@ static void term_print(const matrix *mat, size_t row, size_t col)
}
```
-The ghosting effect, the signature feature of this implementation, works by
-scaling and mixing the RGB channels:
+The ghosting effect is achieved by carefully scaling the RGB
+channels before mixing them:
```
static void mat_shade(matrix *mat, size_t row, size_t col)
@@ -71,25 +71,24 @@ static void mat_shade(matrix *mat, size_t row, size_t col)
}
```
-The ghosting function emulates the screen decay by gradually transitioning each
-raindrop's color towards the background color. This approach provides two key
-benefits: straightforward color configuration that integrates naturally with
-Unix ricing (desktop customization) and high-fidelity recreation of the Matrix
-aesthetic.
+The ghosting function emulates the dim after glow by gradually transitioning
+each raindrop's color towards the background color. This approach provides two
+key benefits: straightforward color configuration that integrates naturally
+with (Unix) ricing and high-fidelity recreation of the Matrix aesthetic.
## Customization
-While you can adjust almost every aspect, including its speed, glitch
-frequency, and rain density, the most useful settings for customization are the
-color scheme and character set.
+While you can alter almost every aspect, including speed, glitch frequency, and
+rain density, the most common customizations are the color scheme and character
+set.
There are three color settings: head, tail, and background. You can configure
-them by setting the `COLOR_*_RED`, `COLOR_*_GRN`, and `COLOR_*_BLU` definitions
-in main.c.
+them using `COLOR_*_RED`, `COLOR_*_GRN`, and `COLOR_*_BLU` definitions found in
+main.c.
The `UNICODE_MIN` and `UNICODE_MAX` values control the Unicode block used. For
-example, setting them to `0x30A1` and `0x30F6` rains Katakana (if a font that
-supports Katakana is present on the system):
+example, setting them to `0x30A1` and `0x30F6` rains Katakana, if a font that
+supports Katakana is present on the system:
<img style="width: 100%;" src="katakana.png" />