Category: Development

Running Modern Linux on a 1989 486: A Crazy Science Project

2025-04-21

The author successfully installed and ran a 2017 Linux kernel (4.14.8) on a 1989 AMD 5x86 486 PC. This wasn't easy; challenges included using Gentoo Linux (a distribution requiring manual compilation of all packages), wrestling with drivers for ancient hardware, and overcoming incompatibility between an 80-pin PATA cable and the motherboard. Ultimately, the aged machine successfully ran modern software like Python, Git, and Nginx, although boot time was a grueling 11 minutes and shutdown took 5.5 minutes. The project demonstrates Linux's remarkable backward compatibility and the author's impressive persistence.

Development

Pushing the Limits: Hand-written ARM Cortex-A53 NEON Assembly Kernel

2025-04-21

This post delves into optimizing NEON assembly kernels for the ARM Cortex-A53. Using y[n] = ax[n] + b as an example, the author meticulously explains how to leverage the Cortex-A53's instruction timing characteristics (partial dual-issue capabilities and in-order execution) to overcome the limitations of the 64-bit load data path. Techniques like instruction pipelining and prefetching are employed to maximize performance. The hand-written assembly kernel significantly outperforms LLVM-generated code, highlighting the potential of manual optimization when robust CPU models are lacking.

Development Assembly Optimization

Keyword Parameters in Tcl Procs: An Elegant Solution and a Metaprogramming Headache

2025-04-21

Frustrated by the lack of keyword parameters and the inaccessibility of built-in features in some programming languages, the author tackled the challenge of implementing keyword parameters in Tcl. The article presents a clever `proc*` command enabling keyword arguments in Tcl procs and details its implementation. However, due to Tcl's weak metaprogramming capabilities, the author resorted to regular expressions for string templating, resulting in complex and unwieldy code, highlighting Tcl's limitations in metaprogramming.

Development keyword parameters

Simplifying LLM-Kafka Interaction with a Multiplexing MCP Tool

2025-04-21

This post details `kafka-mcp-server`, an LLM interface for Apache Kafka built using the Model Context Protocol (MCP). The author found that simple actions often required multiple MCP tool calls, leading to the development of a multiplexing tool. This tool allows for the simultaneous execution of multiple tools, using PROMPT_ARGUMENTs to pass results from earlier tools as arguments to later ones. This simplifies workflows involving sequential tool calls, such as listing Kafka topics, reading messages, and creating topic duplicates. Future plans include adding Lua interpretation and branching logic for enhanced functionality.

Development

Tabular Programming on an 8-Button Device: A Minimalist Approach

2025-04-21

Inspired by the m8 portable music sequencer, the author proposes a minimalist programming environment based on a tabular interface. This environment, requiring only 8 buttons and a small screen, uses a structured table (functions limited to five expressions) and context menus to eliminate keyboard input. This constraint promotes modular, maintainable code and reduces syntax errors. The article demonstrates the programming approach and capabilities using classic demoscene effects (plasma and tunnel), exploring potential applications in pixel art editors, music tools, and more.

C String Functions: A Quick Overview

2025-04-21
C String Functions: A Quick Overview

This article provides a quick overview of several commonly used C string manipulation functions: `strlen()` gets the length of a string; `strcpy()` copies strings; `strcat()` concatenates strings; `strncat()` safely concatenates a specified number of characters; `strcmp()` compares strings; `strcspn()` finds the first character not in a specified set; `strerror()` gets the error message for an error code; `memchr()` finds a value in a memory block; and `strrev()` (non-standard) reverses a string. Mastering these functions is crucial for efficient C programming.

Development string functions

Event-Hidden Architectures: The Future of Web Apps?

2025-04-21
Event-Hidden Architectures: The Future of Web Apps?

The past decade has seen a shift towards cloud-native, distributed applications, but event-driven architectures have proven challenging for developers. This article introduces a new paradigm: event-hidden architectures. Leveraging technologies like React with state management frameworks, durable execution systems (e.g., Temporal), and reactive incremental computation frameworks (e.g., Skip), event handling is abstracted away, providing a simpler, more efficient developer experience. Developers focus on business logic, boosting productivity and application reliability, while gaining new capabilities like transparency, streamlined state management, and replayability.

LLM-Powered Programming: Mech Suit, Not Replacement

2025-04-21

The author built two apps using Claude Code, finding that LLMs don't replace programmers but augment their abilities. It drastically speeds up coding, but requires constant vigilance to correct AI's flawed decisions and maintain architectural integrity. Experienced programmers better harness AI tools, while inexperienced ones risk being misled. The future emphasizes architectural thinking, pattern recognition, and judgment; programmers must learn to collaborate with, not be replaced by, AI.

Development

Nerdlog: A Blazing-Fast, Serverless Remote Log Viewer

2025-04-21
Nerdlog: A Blazing-Fast, Serverless Remote Log Viewer

Nerdlog is a fast, remote-first, multi-host TUI log viewer with a timeline histogram and no central server. Inspired by Graylog/Kibana but without the bloat, it requires minimal setup. It efficiently queries logs from multiple remote machines simultaneously, filtering by time range and patterns, and displaying a timeline histogram for quick visual analysis. Primarily designed for reading system logs (/var/log/messages or /var/log/syslog) from one or more remote hosts, it's highly efficient even with large log files (1GB+). While supporting other log formats, its core functionality stems from a need to efficiently monitor logs from numerous web service backend instances. Nerdlog connects via SSH, keeping connections idle in the background. Log analysis happens remotely, downloading only minimal data per query, and utilizing gzip compression for bandwidth efficiency. It features a Vim-like command line interface and keybindings for intuitive navigation and control.

Development remote logging

Microsoft Forked My Open Source Project and Didn't Credit Me

2025-04-21

An independent developer recounts how Microsoft copied their open-source project, Spegel, designed to solve Kubernetes cluster scalability issues caused by image registry outages. After initial contact and discussions with Microsoft engineers about potential collaboration, the developer discovered Microsoft's Peerd project, which strikingly resembles Spegel in functionality, code structure, comments, and even test cases, suggesting direct copying. This experience led to significant frustration and questions about collaboration models between large corporations and individual developers, the implications of open-source licensing, and the challenges of maintaining open-source projects.

Development copying

Terminology 1.14.0 Released: New Translations, Improvements, and Fixes

2025-04-21

Terminology 1.14.0 is out! This release adds Hungarian and Slovak translations, improves translations for multiple languages, and fixes several bugs, including a translucent background on startup and wheel event issues. It also adds the ability to report or set selections via escape codes, and configuration for double-width emoji support. Internal code improvements and a new colorscheme are also included.

Development software update

Pipelining in Programming Languages: A Love Letter to Readability

2025-04-21
Pipelining in Programming Languages: A Love Letter to Readability

This article explores the benefits of pipelining in programming languages, focusing on its impact on code readability and maintainability. The author argues that features like method chaining and similar constructs significantly improve code clarity by linearizing data processing steps. Compared to nested function calls, pipelining leads to easier reading, modification, and debugging, and enhances IDE autocompletion and version control. Examples in Rust, Haskell, and SQL illustrate the application of pipelining across different programming paradigms, highlighting the advantages and disadvantages of various approaches.

Development

Recursive Magic: Defining e^x and Trig Functions with Infinite Python Generators

2025-04-21
Recursive Magic: Defining e^x and Trig Functions with Infinite Python Generators

This post showcases a clever trick using infinite Python generators to recursively define mathematical functions. By recursively defining a generator for positive integers and leveraging Taylor series expansions, the author demonstrates how to generate the Taylor series coefficients for e^x, sin x, and cos x recursively, relying only on their integral relationships without predefining their expressions. The post also includes an optimization using a memoize decorator to improve performance and avoid recursion depth limits.

Development Infinite Generators

Pixel Phones Unleash Uncapped Linux VMs: A Step Towards Powerful Mobile Computing

2025-04-21
Pixel Phones Unleash Uncapped Linux VMs: A Step Towards Powerful Mobile Computing

Google's Android 16 Beta 4 removes the 16GB storage limit for the Linux Terminal app on Pixel phones. Users can now resize the Debian virtual machine's storage to utilize more of their phone's capacity. Future updates will introduce dynamic ballooning, automatically adjusting VM storage based on needs, eliminating manual resizing. While lacking GUI and audio support currently, this significantly enhances the potential of Pixel phones as portable PCs, allowing users to run Linux desktop apps alongside Android apps.

Development

Regex Isn't Hard: Mastering the Core Concepts for Efficient Text Processing

2025-04-21
Regex Isn't Hard: Mastering the Core Concepts for Efficient Text Processing

This article argues that regular expressions aren't as complex as many believe. By focusing on core concepts—character sets, repetition, groups, and the |, ^, $ operators—one can easily master the power of regex. The article explains these core concepts in detail and suggests ignoring less-used shortcuts to avoid unnecessary complexity. The author emphasizes that regex allows for a lot of text processing with minimal code, far more efficiently than traditional procedural code.

Development

Joplin 3.2: Open-Source Note-Taking App Gets Multi-Window Support

2025-04-21

Joplin, an open-source note-taking application, has released version 3.2, featuring long-awaited multi-window support, multi-column layouts, enhanced accessibility, and theme detection. This versatile app supports Markdown, plugins, multimedia, and various synchronization methods including end-to-end encrypted cloud sync and local storage. While built with Electron, resulting in higher resource consumption, Joplin's robust feature set and active community make it a compelling option for note-taking.

Development Note-taking App

A World of Languages: A Multilingual Website Showcase

2025-04-21
A World of Languages: A Multilingual Website Showcase

This website impressively showcases its robust multilingual capabilities, encompassing a wide array of languages from Europe to Asia, including English, Chinese, French, Spanish, German, and many more. It's a valuable resource for businesses and organizations looking to expand globally.

Development

Python 3.14's Game Changer: Template Strings (t-strings) for Safer String Formatting

2025-04-21

Python 3.14, shipping in late 2025, introduces template strings (t-strings), a significant enhancement to string formatting. Addressing the security risks of f-strings when handling user input (like SQL injection and XSS), t-strings separate string formatting from content. This allows for safe escaping before formatting, enhancing flexibility for complex tasks such as generating secure HTML. Developers access the string parts and values via .strings and .values properties, enabling custom formatting. Iteration is also supported for easier processing. This boosts Python's security and expands string manipulation capabilities.

Development

Reverse Engineering TikTok's VM: Cracking webmssdk.js

2025-04-21
Reverse Engineering TikTok's VM: Cracking webmssdk.js

This project details the reverse engineering of TikTok's custom virtual machine (VM) found within webmssdk.js. The VM is a key part of TikTok's obfuscation and security. The project includes tools to deobfuscate webmssdk.js, decompile the VM instructions into readable code, inject a script to replace webmssdk.js with the deobfuscated version, and generate signed URLs for authenticated requests (like posting comments). The author overcame significant obfuscation techniques, including bracket notation and disguised function calls, to successfully deobfuscate and decompile the VM, ultimately enabling the generation of signatures for authenticated requests.

Development

Instant PyTorch Training: Hot-Swapping LLMs without VRAM Unloading

2025-04-21
Instant PyTorch Training: Hot-Swapping LLMs without VRAM Unloading

Large language model loading times can significantly slow down development. This project introduces a hot-swapping solution for PyTorch training code. By keeping the model resident in VRAM via a background process, it achieves near-instantaneous startup. Even after the script exits, the model remains loaded, ready for immediate use on the next run. Remote debugging and Dear ImGui UI integration are supported, boosting developer efficiency. Simply replace your `from_pretrained` calls to experience instant execution and easy debugging.

Development Hot-Swapping

Testing Email Sending in Haskell Without Actually Sending Emails

2025-04-21
Testing Email Sending in Haskell Without Actually Sending Emails

This article demonstrates how to test email sending functionality in Haskell without actually sending emails, using test spies. By replacing the email sending function with a stub that records function call arguments and checking the recorded information in the test assertion phase, you can effectively test side effects, making tests faster and more reliable. This method avoids reliance on real services, leading to more isolated and faster tests.

Development Test Spy

Running a Large Language Model on DOS? Believe It!

2025-04-21
Running a Large Language Model on DOS?  Believe It!

A developer has successfully run a Large Language Model (LLM) on a vintage DOS PC! Leveraging Andrej Karpathy's llama2.c project, they ported Meta's Llama 2 model to DOS, demonstrating it on machines like a Thinkpad T42 (2004) and a Toshiba Satellite 315CDT (1996). Despite challenges with memory mapping and floating-point operations, they overcame hurdles using the Open Watcom compiler and a DOS extender. While slow, the achievement showcases the surprising capabilities of retro computing.

Development

Single-Process Architecture: A Graceful Solution for Modern Web Development

2025-04-21

While updating his blog's software, the author found a single-process architecture to be simpler than his CGI-based approach for handling the complexities of the modern web. A single process allows easy access to shared state, simplifying tasks like detecting malicious traffic, rate-limiting requests, and implementing caching. While memory and CPU usage are concerns, the ease of implementation makes a single-process architecture advantageous when dealing with various forms of abuse, especially those that are unforeseen. The author believes that as web abuse increases, single-process architectures will become increasingly important.

Demystifying Python Decorators: A Journey from Closures to @ Syntax

2025-04-21
Demystifying Python Decorators: A Journey from Closures to @ Syntax

This article provides a step-by-step explanation of Python decorators. Starting with an example that tracks arguments passed to the `print()` function, the author introduces the concept of closures and gradually builds a decorator that can log arguments for any function. The article avoids using the `@` syntax initially, focusing instead on the underlying mechanisms, ultimately creating a versatile decorator function.

Development decorators closures

Efficient E-Matching: A New Weapon for Optimizing Compilers

2025-04-20

Modern theorem provers and optimizing compilers rely on a clever technique: E-matching. It matches not only syntax but, more importantly, semantics, achieving equivalence reasoning through E-graphs and congruence closure. This article delves into the principles of E-matching, particularly how to efficiently find matching patterns in E-graphs using discrimination trees and congruence closure, avoiding the inefficiency of traditional recursive traversal. The author also introduces its application in the Zob compiler, compiling patterns into virtual machine instructions for efficient pattern matching, significantly improving optimization efficiency.

TikZJax: In-Browser TikZ Rendering

2025-04-20

TikZJax is a JavaScript library that renders TikZ code directly in the browser as SVG images. It cleverly uses WebAssembly to compile Pascal-based tex code into WebAssembly, executing it within the browser to convert TikZ to SVG. This eliminates the need for server-side rendering, offering a convenient solution for displaying complex mathematical formulas and diagrams on web pages. This is a boon for users needing to incorporate intricate graphics on their websites.

Development

TypeScript Error Handling: Beyond try...catch

2025-04-20
TypeScript Error Handling: Beyond try...catch

This article delves into the current state and improved approaches to error handling in TypeScript. The traditional try...catch method, while sufficient for simple scenarios, presents type safety and scalability challenges in complex applications. The article compares two modern alternatives: the Go-style return tuple and the Monadic style using Result types (like the neverthrow library). The Go-style offers simplicity but leads to verbose code; the Monadic style is more powerful but has a steeper learning curve. The author suggests choosing an approach based on project complexity and team expertise, advocating for try...catch in simple applications and Result types for enhanced type safety and readability in more complex systems.

Development

Deconstructing Transactional Systems: A Four-Step Dance and Endless Possibilities

2025-04-20

This article delves into the core components of transactional systems: execution, ordering, validation, and persistence. The order and concurrency of these four steps determine a database's characteristics. Using FoundationDB, Spanner, TAPIR, Calvin, and CURP as examples, the article analyzes how different database systems cleverly orchestrate these four steps to achieve various performance and consistency trade-offs. The author also lists all possible step combinations, offering endless inspiration for building novel transactional systems.

Falsify: A New Property-Based Testing Library for Haskell

2025-04-20

This blog post introduces Falsify, a novel property-based testing library for Haskell. Inspired by Python's Hypothesis library, Falsify implements internal shrinking, efficiently handling infinite data structures thanks to Haskell's lazy evaluation. Unlike QuickCheck's manual shrinking and hedgehog's integrated shrinking, Falsify uses sample trees instead of streams, resulting in more predictable and understandable shrinking behavior, especially when dealing with monadic bind.

Keyhive Sync Protocol: Architecture and Implementation of Beelay

2025-04-20
Keyhive Sync Protocol: Architecture and Implementation of Beelay

This article details Beelay, a new sync protocol for the Keyhive project. Beelay, an RPC-based protocol, addresses shortcomings in Automerge's existing sync protocol when handling numerous documents and encrypted data. It uses Ed25519 keys for authentication and employs the RIBLT algorithm for efficient synchronization of the Keyhive membership graph and document collection. To prevent man-in-the-middle and replay attacks, Beelay incorporates the recipient's public key and timestamps in messages. Furthermore, Beelay introduces the Sedimentree protocol for efficient synchronization of Automerge document content.

Development Sync Protocol
1 2 3 5 7 8 9 108 109