Category: Development

Generating Pixel Art Space Invaders with Algorithms

2025-08-20
Generating Pixel Art Space Invaders with Algorithms

This interactive article details the creation of a Space Invader generator using JavaScript and vector graphics. The author walks through the process, from hand-drawn pixel art to vector polygons and finally pixelated images, explaining the algorithms and techniques involved. This includes using the OKLCH color space for color generation and Anime.js for animation. The article is highly interactive, allowing readers to generate their own Space Invaders.

Development Vector Graphics

Streamlining Monorepo Development with Turborepo and pnpm

2025-08-20
Streamlining Monorepo Development with Turborepo and pnpm

This guide outlines best practices for developing, testing, and submitting code within a Turborepo-based monorepo. It covers efficient methods for navigating, installing, and creating new React packages using pnpm, leveraging Vitest for targeted testing, and ensuring code quality with ESLint and TypeScript. The guide emphasizes running linters and tests before commits and provides a clear PR title format.

Development

D2 0.7.1 Released: ASCII Output Now Supported

2025-08-19
D2 0.7.1 Released: ASCII Output Now Supported

D2, a diagramming tool, has released version 0.7.1, introducing ASCII output. Any `.txt` file will now use the ASCII renderer. This is particularly useful for small diagrams within source code comments, improving readability. The feature is accessible via the Vim extension or the command-line flag `--ascii-mode=standard`. Note that this renderer is still in alpha and may contain bugs.

Figma's Multiplayer Editing: A Simplified CRDT Approach

2025-08-19
Figma's Multiplayer Editing: A Simplified CRDT Approach

Four years ago, Figma embarked on building multiplayer functionality, opting for a custom-built system instead of the popular Operational Transform (OT) algorithm. Driven by a need for rapid iteration and concerns about OT's complexity, they created a simpler solution. This post details Figma's multiplayer system architecture, including its client/server architecture, WebSocket communication, offline editing capabilities, and data synchronization. While inspired by CRDTs (Conflict-free Replicated Data Types), Figma's implementation deviates from strict CRDT adherence, leveraging its principles while benefiting from a centralized server for efficiency and simplicity. The article contrasts OTs and CRDTs, delving into Figma's data structure design and how it handles edge cases.

Emacs Video Trimmer: video-trimmer-mode

2025-08-19
Emacs Video Trimmer: video-trimmer-mode

Inspired by Marcin Borkowski's blog post, the author created video-trimmer-mode, a lightweight Emacs plugin for video trimming. Leveraging ffmpeg, this ~300-line plugin offers a quick and easy way to cut video clips. The code is available in the author's Emacs config repo. Support this indie dev's work!

Development Video Trimming

Positron: The Next-Gen Open Source IDE for Data Science

2025-08-19
Positron: The Next-Gen Open Source IDE for Data Science

Posit PBC has launched Positron, a free, next-generation Integrated Development Environment (IDE) for data science. It seamlessly integrates data exploration and production workflows, supporting both Python and R equally. Key features include interactive notebooks, plotting tools, integrated data app workflows, and a built-in AI assistant. Built on Code OSS, Positron supports VSIX extensions for enhanced customization.

Development

Guile-Swayer: Scripting Sway/i3 with Guile

2025-08-19
Guile-Swayer: Scripting Sway/i3 with Guile

Tired of Sway/i3's configuration limitations? The Guile-Swayer project offers a powerful solution, allowing you to fully control the Sway/i3 window manager using the Guile scripting language. Developed after migrating from StumpWM to Wayland, this project replicates StumpWM's flexibility and customization. Guile-Swayer lets you bind keys to execute Guile code, subscribe to Sway events and react to them, retrieve Sway information, and more. It includes modules like workspace-grid for grid-based workspaces, workspace-groups for cross-monitor workspace grouping, and which-key for Emacs-like keybinding hints. With Guile-Swayer, create a highly personalized and efficient window management environment.

Development

Mastering Attention: Crafting Effective Prompts for LLMs

2025-08-19
Mastering Attention: Crafting Effective Prompts for LLMs

This article delves into the attention mechanism of Large Language Models (LLMs) and how to leverage it through carefully crafted prompts. It explains that LLMs don't read sequentially like humans, instead weighting relationships between all tokens simultaneously. Prompt structure, therefore, is more impactful than word choice. The article contrasts structured and unstructured prompts, illustrating how a step-by-step approach guides the model's reasoning. It simplifies the attention mechanism: calculating each word's influence on others to generate output. Heuristics for effective prompts are offered: prioritizing key information, using structured formatting, employing personas, and avoiding vagueness. The article concludes by emphasizing the economic benefits of efficient prompting—saving engineer time, improving efficiency, and reducing costs.

Development

Limitations on Applying Code Review Suggestions

2025-08-19
Limitations on Applying Code Review Suggestions

This article lists various limitations encountered when applying suggestions in GitHub code reviews. These include scenarios such as no code changes made, the pull request being closed, viewing only a subset of changes, only one suggestion per line allowed, applying to deleted lines, suggestions already applied or marked resolved, suggestions from pending reviews, multi-line comments, and the pull request being queued to merge. It also notes that some actions are currently unavailable.

Development

My Browser Odyssey: From Arc to Dia to Zen Browser

2025-08-19
My Browser Odyssey: From Arc to Dia to Zen Browser

I was a devoted Arc browser user, loving its powerful keyboard shortcuts and multi-profile functionality. However, its developer, The Browser Company, pivoted to the AI-powered Dia browser, abandoning many of Arc's strengths. Dia, while incorporating AI features, sacrificed usability and privacy, forcing me to search for an alternative. Firefox, while functional, lacks a polished user experience. Ultimately, I found Zen Browser, a Firefox-based browser with Arc's clean, fluid interface and powerful customization, solving Firefox's multi-profile management issues. It's become my new favorite. I even believe Mozilla should acquire the Zen Browser team to improve the user experience of Firefox.

Development

Beancount Ledger Reconciliation with Vim Macros: A Hacker's Tale

2025-08-19

A seasoned Vim user tackles the challenge of managing personal finances with Beancount, a text-based ledger system. Facing a mess of CSV and PDF bank statements and numerous uncategorized internal transfers, the author ingeniously leverages Vim macros to automate the reconciliation process. The article details the macro creation process, highlighting problem-solving and showcasing impressive Vim skills. Through creative use of Vim, the author transforms chaotic financial data into a clear and efficient Beancount ledger, dramatically improving productivity.

Development

The Fatal Flaw of "The Art of Multiprocessor Programming": Ignoring the futex

2025-08-19

This article critiques "The Art of Multiprocessor Programming," a well-regarded textbook, for its omission of the futex, a crucial modern concurrency technique. The author argues that the book's lack of coverage renders its content outdated and impractical. Futexes, enabling efficient mutex implementations, significantly improve concurrency performance and are widely used in operating systems like Linux, Windows, and macOS. The article details futex functionality and provides code examples demonstrating high-performance mutex construction using futexes, including spinlocks, non-recursive mutexes, and recursive mutexes. The author concludes that the book's failure to cover essential technologies like futexes makes it insufficient for modern concurrency programming needs.

Retro PC Emulation on Raspberry Pi Pico: Pico-286

2025-08-19
Retro PC Emulation on Raspberry Pi Pico: Pico-286

The Pico-286 project is a remarkable feat of emulation, bringing the classic PC experience of the late 80s and early 90s to the Raspberry Pi Pico. This lightweight project offers a fun way to explore retro computing and learn about low-level system emulation. It supports various Intel CPUs (up to 286), a range of classic peripherals (sound cards, graphics cards), and various graphics and text modes. Pico-286 even emulates the artifact colors produced by early displays! This open-source project is cross-platform and runs on Raspberry Pi Pico, Windows, and Linux.

Development

PyPI Bolsters Account Security with Expired Domain Checks

2025-08-19
PyPI Bolsters Account Security with Expired Domain Checks

To prevent domain resurrection attacks – a type of supply chain attack where an attacker buys an expired domain to hijack PyPI accounts – PyPI now checks for expired domains. This enhances account security by un-verifying email addresses associated with expired domains; over 1,800 email addresses have been unverified since early June 2025. While not a perfect solution, it significantly mitigates a major attack vector. Users are advised to add a second verified email address for enhanced security.

Development domain resurrection

Safely Using snprintf: Avoid Buffer Overflows

2025-08-19
Safely Using snprintf: Avoid Buffer Overflows

This article highlights a lesser-known feature of the `snprintf` function: its ability to determine the required buffer size before formatting, thus preventing buffer overflows. By calling `snprintf` twice – once with `NULL` and 0 to get the size, and again with a properly allocated buffer – the need for manual buffer size calculations is eliminated. The author also recommends a lightweight header-only library for easier usage.

Development buffer overflow

Reclaim WSL Disk Space: A Manual and Automated Guide

2025-08-19
Reclaim WSL Disk Space: A Manual and Automated Guide

Windows Subsystem for Linux (WSL) virtual disks can bloat over time, consuming significant disk space. This tutorial provides both manual and automated methods to compact WSL virtual hard disks (VHDX), freeing up valuable disk space. The manual method details a step-by-step process using PowerShell and DiskPart commands; the automated method provides a PowerShell script for one-click compaction. Regardless of the method chosen, you can effectively resolve WSL disk space issues and maintain efficient system operation.

Development

Left-to-Right Programming: Say Goodbye to Intellisense Hell

2025-08-19
Left-to-Right Programming: Say Goodbye to Intellisense Hell

This article criticizes the inefficiency of declarative programming in languages like Python, highlighting the difficulty of getting code completion hints with list comprehensions. The author proposes a "left-to-right" programming paradigm where programs remain valid throughout the input process, facilitating code completion and error checking. Rust, Python, and JavaScript code examples illustrate how left-to-right programming enhances readability and development efficiency. The article concludes by advocating for well-designed APIs to improve the development experience.

Development

RainViewer API Sunset: A Migration Guide

2025-08-18
RainViewer API Sunset: A Migration Guide

After 10 years, RainViewer founder Oleksii Schastlyvyi announces the transition of its API services to limited operation throughout 2025. This isn't a marketing piece, but a genuine guide for developers who have supported RainViewer. The article presents five alternative API services: Rainbow.ai (closest technical match, providing past and nowcast radar tiles), OpenWeatherMap (developer-friendly, comprehensive data), Meteoblue (high precision, especially in Europe), Tomorrow.io (global coverage with satellite data), and Xweather (professional-grade accuracy, data from Vaisala). Migration strategy recommendations are provided based on technical requirements, budget, and geographic needs. The author expresses gratitude to the developer community.

FFmpeg Assembly Language School: Learn to Contribute!

2025-08-18
FFmpeg Assembly Language School: Learn to Contribute!

Embark on an exciting journey into FFmpeg assembly language programming! This course requires C programming knowledge (especially pointers) and high school math. Lessons and assignments (coming soon) will equip you to contribute to the FFmpeg project. A Discord server is available for support: https://discord.com/invite/Ks5MhUhqfB

Development

ScrollGuard: Stop Doomscrolling

2025-08-18

Tired of endless scrolling on TikTok and similar apps? ScrollGuard is here to help! This app blocks Reels and Shorts videos on Instagram, Facebook, Reddit, and YouTube, and sets scrolling limits for any app, freeing you from endless scrolling and distractions. While the iOS version has slightly different functionality, the developer is working on an iPhone app to help users combat scrolling addiction.

Development anti-addiction

Blazing Fast Static Site Server Built with Neovim and Lua

2025-08-18

A developer built nvim-web-server, a Neovim plugin written in Lua that serves HTTP requests directly from Neovim buffers. Surprisingly, it's faster than Nginx! This is due to LuaJIT's efficiency and Neovim's integration with the libuv library. The author successfully deployed this server on an old ThinkPad, ensuring security through Docker, AppArmor, and seccomp. This is a creative and efficient example showcasing the powerful extensibility of editors.

Development

MCP Tools with Dependent Types: A Defold Editor Experiment

2025-08-18

This post details an experiment using a Large Language Model (LLM) within the Defold game editor. The author initially attempted to use Claude to directly manipulate Lua code, but faced low accuracy. The proposed solution involved using JSON Schemas to define tool inputs, but this ran into a limitation: the inability to implement dependent types within the Model-Code-Prompt (MCP) framework. This means the structure of tool input depends on runtime information. For example, editing 3D models requires different properties depending on the chosen material. The solution is a two-step process: the LLM selects a resource, the program looks up its data structure and constructs a JSON Schema; then, the LLM uses this schema to generate edits. The author suggests MCP should support dependent types to handle complex data more effectively.

Development

Your MCP Doesn't Need 30 Tools: Code Is Enough

2025-08-18
Your MCP Doesn't Need 30 Tools: Code Is Enough

This article explores a novel approach using a single-tool MCP server that accepts programming code as input. The author points out challenges with CLI tools, such as platform dependency, version dependency, and lack of documentation, making them difficult for agent tools to use. In contrast, an MCP server can maintain state and expose a single tool (e.g., a Python interpreter running eval()), allowing agent tools to better manage sessions and compose tools. The author demonstrates the effectiveness of this approach with pexpect-mcp, which transforms the MCP server into a stateful Python interpreter, simplifying debugging and improving efficiency. Furthermore, the author explores replacing Playwright's MCP with one exposing the Playwright API via JavaScript, reducing tool definitions and improving data transfer efficiency. While security concerns exist, the author argues this approach has significant potential and warrants further exploration.

Development Agent Tools

Sorting Fractions Under Uncertainty & Estimating the Number of Buses: Bayesian vs. Likelihood Approaches

2025-08-18

This article tackles two statistical problems: sorting fractions under uncertainty and estimating the number of buses based on limited observations. For fraction sorting, Bayesian (using Beta distribution) and likelihood approaches are presented and demonstrated in R. For bus estimation, a probability density function based on the multinomial distribution is constructed, and a likelihood approach is used to derive a confidence interval for the number of buses. Both problems cleverly combine statistical modeling and computational methods, showcasing the flexibility and practicality of statistical inference.

Why I Prefer reStructuredText to Markdown

2025-08-18
Why I Prefer reStructuredText to Markdown

This post details why the author prefers reStructuredText (rST) over Markdown for writing technical books. rST, being a mid-weight representation of an abstract documentation tree, offers superior extensibility and customization compared to Markdown's lightweight approach. The author illustrates this with examples of image creation and exercise handling, showing how rST's custom directives and document tree transformations enable complex document structures and functionalities difficult to achieve in Markdown. While acknowledging rST's potentially less intuitive syntax, the author champions its power for large-scale documentation, especially when custom extensions and transformations are needed, as demonstrated in his book, "Logic for Programmers."

Development Technical Writing

Unification Algorithm: Implementation and Applications

2025-08-18

This post delves into the unification algorithm, a process for automatically solving equations between symbolic terms. It finds extensive use in logic programming and type inference. Starting with pattern matching, the post builds up to the concept of unification, providing a Python implementation based on Norvig's improved algorithm. The implementation includes data structure definitions, the core `unify` function, helper functions `unify_variable` and `occurs_check`, along with detailed code examples and execution results.

Development unification

Tilus: A New DSL for Powerful GPU Programming

2025-08-18
Tilus: A New DSL for Powerful GPU Programming

Tilus is a powerful domain-specific language (DSL) for GPU programming. It offers thread-block-level granularity with tensors as the primary data type, explicit control over shared memory and register tensors, and low-precision types with arbitrary bit-widths (1 to 8 bits). Featuring automatic tuning, caching, and a Pythonic interface, Tilus simplifies GPU kernel development. Built upon research detailed in "Tilus: A Virtual Machine for Arbitrary Low-Precision GPGPU Computation in LLM Serving," it leverages insights from projects like Hidet, TVM, Triton, and Hexcute.

Hardening Systemd Services: A Practical Guide

2025-08-18
Hardening Systemd Services: A Practical Guide

This article explores enhancing the security of systemd services and Podman containers. It starts by introducing the `systemd-analyze security` command for assessing the security posture of systemd units. The article then details various security options within systemd unit files and Podman configuration files, such as `ProtectSystem`, `PrivateTmp`, `RestrictSUIDSGID`, and explains how to use them to limit privileges and reduce attack surface. It addresses troubleshooting service failures after configuration changes and using audit logs for debugging. Finally, it offers best practices, such as prioritizing external-facing services and tailoring security settings to specific needs.

Development

IMDb Terminal App v1.1: A Complete Rewrite with Enhanced Features

2025-08-18
IMDb Terminal App v1.1: A Complete Rewrite with Enhanced Features

A powerful Ruby-based terminal application for discovering and managing movies and TV series from IMDb's Top 250 lists and trending lists. Version 1.1 is a complete rewrite using rcurses, boasting significant functional upgrades. It offers advanced filtering, smart search with preview, streaming info integration, terminal poster display, wishlists, and dump lists. The enhanced search experience and robust data management make finding and organizing your favorite movies and shows incredibly efficient.

Development movie management

Become a Web Archive Guardian: Run an ArchiveTeam Warrior

2025-08-18

Want to contribute to internet archiving? Now you can easily run the ArchiveTeam Warrior virtual machine! It will download and upload websites to the ArchiveTeam archive on your computer, without risking your computer's security; it only uses some of your bandwidth and disk space. Warrior supports Windows, OS X, and Linux systems and only requires virtual machine software like VirtualBox or VMware. After downloading the virtual machine image, import it into VirtualBox, start it, and then you can select a project to start contributing; your progress will be shown on the leaderboard!

Development
1 2 9 10 11 13 15 16 17 201 202