Category: Development

A Curious Adventure in Implementing RNG and Cosine in Purely Functional Nix

2025-04-15
A Curious Adventure in Implementing RNG and Cosine in Purely Functional Nix

This post details the author's experience implementing a random number generator and a cosine function within NixOS, a Linux distribution built on the Nix language. The purely functional nature of Nix presents challenges when working with system randomness and standard mathematical functions. The author explores various approaches, including using Nix's `runCommandLocal` and custom infinite list implementations, ultimately overcoming caching and function-call quirks to achieve the goal. The journey highlights Nix's flexibility and power, but also exposes some limitations of its features.

Development

MeshCore: A Lightweight LoRa Mesh Networking Library

2025-04-15
MeshCore: A Lightweight LoRa Mesh Networking Library

MeshCore is a lightweight, portable C++ library enabling multi-hop packet routing for embedded projects using LoRa and other packet radios. Designed for resilient, decentralized networks operating without internet access, it supports various LoRa devices and offers pre-built binaries for easy flashing via tools like Adafruit ESPTool. MeshCore balances simplicity and scalability, providing functionality similar to Meshtastic and Reticulum but with a focus on embedded applications. Ideal for off-grid communication, emergency response, and IoT deployments.

Development Mesh Networking

Resonate: A Low-Latency, Low-Memory, Low-Cost Spectral Analysis Algorithm

2025-04-15

Resonate is a low-latency, low-memory footprint, and low-computational-cost algorithm for evaluating perceptually relevant spectral information from audio (and other) signals. It builds on a resonator model using Exponentially Weighted Moving Average (EWMA) to accumulate signal contributions around resonant frequencies. Its compact iterative formulation allows for efficient updates with minimal arithmetic operations per sample, requiring no buffering. Resonate computes real-time perceptually relevant spectral content estimates; memory and per-sample computational complexity scale linearly with the number of resonators, independent of input sample count. Open-source implementations in Python, C++, and Swift are available, along with demonstration apps.

Development

LightlyTrain: Faster Model Training, No Labels Needed

2025-04-15
LightlyTrain: Faster Model Training, No Labels Needed

LightlyTrain brings self-supervised pretraining to real-world computer vision pipelines. It leverages your unlabeled data to drastically reduce labeling costs and accelerate model deployment. Easily integrate it into existing workflows; just a few lines of code are needed to pretrain models on your unlabeled image and video data using various architectures supported by libraries like Torchvision, Ultralytics, and TIMM. Scalable to millions of images, LightlyTrain significantly improves model performance for both small and large datasets, enabling you to export models for fine-tuning or inference. No self-supervised learning expertise is required.

Chroma: Simulating Color Blindness for Enhanced Game Accessibility

2025-04-15
Chroma: Simulating Color Blindness for Enhanced Game Accessibility

Chroma is a tool designed to simulate various types of color blindness, aiding game developers and accessibility teams in testing game experiences for color-blind users. It simulates three major types: Protanopia, Deuteranopia, and Tritanopia, offering high performance, accuracy, and an easy-to-use interface. Chroma works on top of any game, regardless of engine, providing real-time simulation, easy screenshotting, and customizable settings. A known issue during CMake build involves an outdated CPPWinRT library; using Visual Studio 2022 or installing the Microsoft.Windows.CppWinRT NuGet package is recommended.

SourceHut Fights Back Against Aggressive LLM Scraping

2025-04-15

SourceHut, a platform dedicated to serving open-source software, is actively fighting back against aggressive data scraping by large language models (LLMs). They argue that LLM companies are not entitled to their users' data and have explicitly stated they will not make data-sharing arrangements with any company, even if paid. SourceHut has deployed Anubis to protect its services and updated its terms of service to strictly limit data scraping, permitting only uses such as search engine indexing, open-access research, and archiving. They emphasize that the data belongs to their users and their responsibility is to ensure the data is used in the best interests of their users, not for commercial profit or training LLM models.

Development

PgDog: A Clever Postgres Proxy for Sharding

2025-04-15
PgDog: A Clever Postgres Proxy for Sharding

PgDog is a network proxy that intercepts all communication between Postgres clients and servers, understands SQL to infer query destinations, and requires no application code changes. It parses SQL queries, extracts sharding keys, uses Postgres's built-in partitioning hash function, and routes queries to the correct database shard. The article details how PgDog handles simple and extended protocols, cross-shard queries, and distributed COPY operations, ultimately enabling Postgres sharding and linearly scaling data ingestion speed.

Development

Rust: A Double-Edged Sword of Efficiency and Challenges

2025-04-15
Rust: A Double-Edged Sword of Efficiency and Challenges

The author shares their experience of spending two years using Rust to write the backend of a B2B SaaS product. Rust boasts exceptional performance, excellent tooling, type safety, and robust error handling. However, the module system and build performance present challenges. While the borrow checker is powerful, it has a steep learning curve. Asynchronous programming, though complex, offers high performance. Overall, the Rust experience is positive, but requires careful consideration of trade-offs.

Development

arXivLabs: Community-Driven Experiments on arXiv

2025-04-15
arXivLabs: Community-Driven Experiments on arXiv

arXivLabs is a platform enabling collaborators to build and share new features directly on the arXiv website. Individuals and organizations involved are committed to arXiv's values of openness, community, excellence, and user data privacy. arXiv only partners with those who share these principles. Got an idea to improve the arXiv community? Explore arXivLabs!

Development

Giant Log Viewer: Instantly Browse 4TB Text Files

2025-04-15
Giant Log Viewer: Instantly Browse 4TB Text Files

Tired of waiting to open massive log files? `giant-log-viewer` instantly loads text files up to 4TB with a tiny memory footprint, using only ~80MB of JVM heap memory. It supports UTF-8 and ASCII encoding, but has limitations: it doesn't handle lines longer than 1MB, emojis, or systems without a GUI; it currently only runs on Windows, macOS, and Linux. While not as feature-rich as `less`, it's perfect for quickly browsing giant logs via drag-and-drop or keyboard shortcuts. The project is open-source on GitHub, and donations are welcome to help the developer sign the executables.

Development large files

Why Important Open Source Projects Shouldn't Use GitHub

2025-04-15

Thousands of crucial open-source projects remain on GitHub despite Microsoft's acquisition, raising serious concerns about control and security. The author argues that Microsoft's past hostility towards open source and its acquisitions like npm reveal a strategy of control, not genuine support. The article urges migration to self-hosted Git servers or independent alternatives like Codeberg, NotABug, and sourcehut to ensure independence and security, preventing reliance on a single entity—Microsoft—for the fate of vital code.

Development

ASCII Lookup Utility in Ada: A Comprehensive Walkthrough

2025-04-15

This article details the creation of a command-line ASCII lookup utility written in Ada. The utility prints the full ASCII table or, given a hexadecimal, binary, octal, or decimal input, provides the code and name of the corresponding ASCII character. The author meticulously guides the reader through the development process, covering environment setup, code implementation, and error handling. A GitHub link to the complete source code is provided. This article is suitable for readers with some programming experience and offers valuable insights into Ada programming and command-line tool development.

Development

MCP-Shield: Protecting Your Model Context Protocol Servers

2025-04-15
MCP-Shield: Protecting Your Model Context Protocol Servers

MCP-Shield is a tool for scanning and detecting vulnerabilities in your MCP (Model Context Protocol) servers. It identifies security risks such as tool poisoning attacks, data exfiltration channels, and cross-origin escalations. The tool supports various configuration methods and optionally integrates Anthropic's Claude AI for deeper analysis. Common vulnerability patterns detected include tool poisoning with hidden instructions, tool shadowing and behavior modification, data exfiltration channels, and cross-origin violations. For example, it can identify a calculator tool that secretly attempts to access SSH private keys. MCP-Shield aims to help developers and security auditors secure their MCP servers and supports scanning before adding new servers, during security audits, during development, and after updates.

UUID Equality Logic Cracker: Brute-forcing AES-256-CBC

2025-04-15
UUID Equality Logic Cracker: Brute-forcing AES-256-CBC

A compact field-logical decryption toolkit brute-forces UUID-encrypted AES-256-CBC files using an equality-based initialization: xy = x / y. This demonstrates deterministic search within defined entropy spaces. A demo generates a UUID-encrypted file with a structured suffix. `uuid_demobreaker.py` then linearly scans UUID space, leveraging the equality as a logical 'ignition' – not a heuristic – to guide the search. The cracker doesn't guess, filter, or use probabilistic shortcuts; it defines and explores the search space directly.

Development

Run Linux in Your Browser: JSLinux Makes it Possible

2025-04-15

JSLinux lets you run Linux and other operating systems directly in your browser! The project supports various systems, including x86-based Alpine Linux, Windows 2000, and FreeDOS, as well as riscv64-based Buildroot and Fedora. Users can choose between console or graphical interface modes, providing a convenient experimental platform for developers and enthusiasts. This represents a significant advancement in web-based system emulation.

The Rise of AI Dev Tools: End of Front-End Development?

2025-04-15
The Rise of AI Dev Tools: End of Front-End Development?

Two years ago, predictions emerged that AI would replace human software developers. Today, AI tools play an increasingly important role in software development, but they function more as assistants than replacements. While AI can generate code, human developers are still needed for guidance, editing, and refinement. Many attempts to completely replace developers with AI have failed, as AI struggles with complex tasks and subtle errors. AI tools boost efficiency but don't eliminate the need for human developers. The current challenging job market is partly due to macroeconomic factors and misconceptions about AI, not AI actually replacing developers. The future likely involves closer collaboration between AI and human developers, achieving a synergistic effect.

Development

Reverse Engineering an ESP32 Smart Home Device: Remote Control and Home Assistant Integration

2025-04-15
Reverse Engineering an ESP32 Smart Home Device: Remote Control and Home Assistant Integration

The author, obsessed with connecting everything to Home Assistant, tackled a sleek air purifier only controllable via its proprietary app. To achieve seamless automation, he reverse-engineered the ESP32-based device. Analyzing the app revealed a WebSocket connection to a cloud server. By intercepting network traffic and using a UDP proxy to forward to the cloud server, UDP packets were captured. These packets were encrypted. Disassembling the device revealed an ESP32-WROOM-32D microcontroller; the firmware was extracted using esptool. Analysis revealed the use of the mbedtls library for encryption, identifying AES-128-CBC as the algorithm. Finally, a Node.js script was written to perform a man-in-the-middle (MITM) attack, integrating the device into Home Assistant.

Development

The Illusion of 'Vibe Coding': Programs vs. Products

2025-04-15
The Illusion of 'Vibe Coding': Programs vs. Products

This article critiques the popular notion of 'vibe coding,' arguing that many in tech conflate programs and products. Programs are quick-and-dirty scripts solving specific tasks, often lacking robustness and cross-platform compatibility. Products, however, demand meticulous design, considering encoding, internationalization, concurrency, authentication, telemetry, billing, branding, mobile support, and deployment. AI tools empower rapid program creation, but this is fundamentally different from product development, a far more complex undertaking.

Development programs vs. products

Building OTP Authentication from Scratch: Unraveling HOTP and TOTP

2025-04-15
Building OTP Authentication from Scratch: Unraveling HOTP and TOTP

This post dives deep into the inner workings of One-Time Password (OTP) algorithms, HOTP and TOTP. Starting with the author's experience implementing authentication at work, it explains the security benefits of OTPs and details the HMAC-based OTP generation process, including key hashing, timestamp calculations, and final code generation. A demo app built by the author is also provided for readers to learn and test.

Development

ClipCapsule: A Minimalist Clipboard Manager for Linux

2025-04-14
ClipCapsule: A Minimalist Clipboard Manager for Linux

ClipCapsule is a minimalist clipboard manager for Linux built with Go and WailsJS. It boosts productivity by letting you manage and switch clipboard entries using only keyboard shortcuts – no mouse or GUI needed. Currently in development, the GUI must be open for shortcuts to function, but a background daemon is in the works for seamless operation. Key features include keyboard-first workflow, clipboard history, dynamic reordering, and local-only storage. Installation involves cloning the repo, installing Wails, and building the application, potentially requiring sudo privileges or manual keyboard input device access configuration.

Development Clipboard Manager

Open-Source Watermark Segmentation Model from Diffusion Dynamics: Powering clear.photo

2025-04-14
Open-Source Watermark Segmentation Model from Diffusion Dynamics: Powering clear.photo

Diffusion Dynamics has open-sourced the core technology behind its watermark removal product, clear.photo: a watermark segmentation model. This deep learning model generates masks highlighting watermark regions, excelling at segmenting logo-based watermarks. The project provides a complete workflow for training and inference, including dataset generation, model training, and post-processing, and supports fine-tuning on Apple M-series chips. A key feature is its data augmentation strategy which randomizes watermark parameters, leading to robust performance. This aims to provide a clear, easily modifiable baseline for building more complex tools.

Podman Quadlets: Lightweight Container Orchestration

2025-04-14
Podman Quadlets: Lightweight Container Orchestration

Kubernetes can be overkill for smaller-scale use cases or development. Podman Quadlets offer a lightweight alternative, using systemd to declaratively manage containers and simplify deploying multi-container applications. Simple configuration files (*.container, *.pod, *.image) allow for creating, starting, and managing containers, including features like automatic restarts. The Podman Desktop Quadlet extension enhances usability with a visual interface for managing Quadlets, including generation, editing, and log viewing, making container management more efficient and less complex.

Development

Monte Carlo Sampling Crash Course: Rejection Sampling and Change of Coordinates

2025-04-14

This article introduces two crucial sampling techniques in Monte Carlo methods: rejection sampling and change of coordinates. Rejection sampling samples a simpler region and filters samples based on an acceptance probability to achieve sampling of a complex region. The article provides a detailed derivation of the probability density function for rejection sampling and extends it to non-uniform distributions. Change of coordinates utilizes the Jacobian determinant to map samples from a simple region to a complex region, enabling efficient sampling. The article uses the unit disk as an example, demonstrating how to achieve uniform sampling using polar coordinate transformation. Both methods have their advantages and disadvantages; rejection sampling is simple and easy to understand but its efficiency depends on the acceptance probability; change of coordinates is efficient but requires finding suitable coordinate transformations.

Optimizing ESP32 OLED Driver: Speed vs. Font Support

2025-04-14
Optimizing ESP32 OLED Driver: Speed vs. Font Support

The author experimented with several drivers for an SSD1306 OLED display on an ESP32, ultimately settling on a modified, deprecated driver. Initially, an Espressif driver was used, but it only supported a single font. Subsequent attempts with LVGL and U8G2 suffered from low refresh rates. The author returned to the deprecated driver, adapting its I2C API calls for compatibility with the latest ESP-IDF, achieving a 40Hz refresh rate. To add font support, the nvbdflib library was integrated, directly parsing BDF fonts and drawing to the framebuffer, resulting in high-speed refresh and custom font capabilities.

Development

The Pragmatist's Guide to Functional Programming: Macro over Micro

2025-04-14

This essay argues against a purely micro-level application of functional programming principles in imperative languages. While acknowledging the benefits of functional programming, the author contends that obsessively replacing for loops with maps and reduces without addressing higher-level architectural concerns often yields minimal gains or even negative results. The true value lies in adopting macro-level principles like managing mutation, simplifying architecture, and strengthening type systems. The author advocates for a pragmatic approach, prioritizing architectural design and code quality over strict adherence to functional micro-styles, suggesting a portfolio of 80/20 solutions often surpasses a single 100/100 approach.

Development

Implementing a Simple PEG Engine in Janet: 10 Lines to Parsing Power

2025-04-14

This post delves into the implementation of a Parsing Expression Grammar (PEG) engine in the Janet programming language. Starting with fundamental PEG concepts, the author demonstrates how to build a powerful PEG parser with surprisingly concise code. The core `match-peg` function is explained in detail, showing how to extend its capabilities through operator additions and recursion, culminating in an ISO 8601 date parser. While not without limitations, this implementation effectively illustrates the core principles and implementation of PEGs, providing valuable insights for those learning about PEGs and compiler design.

Development

Single-Header C++ Profiler: utl::profiler

2025-04-14
Single-Header C++ Profiler: utl::profiler

utl::profiler is a single-header C++ profiling library that uses simple macros to measure the execution time of code segments and automatically builds a call graph. The library boasts features like customizable style options, thread safety, and support for detached threads. It significantly reduces overhead by using x86 intrinsics. The library also supports custom styling and exporting results to a file.

Development Single-Header Library

Zero-Codegen TypeScript Type Inference from Protobuf

2025-04-14
Zero-Codegen TypeScript Type Inference from Protobuf

protobuf-ts-types lets you define language-agnostic message types in proto format and infers TypeScript types directly without code generation. It cleverly leverages TypeScript's template literal types. While currently a proof-of-concept and lacking support for services, RPCs, oneof and map fields, and imports, it offers great potential for simplifying Protobuf integration with TypeScript.

Development Type Inference

Building a Powerful Family AI Assistant with a Simple SQLite Database

2025-04-14
Building a Powerful Family AI Assistant with a Simple SQLite Database

This article details Stevens, a family AI assistant built using a simple SQLite database and cron jobs. It integrates calendar events, weather forecasts, and mail information, sending a daily briefing via Telegram. Stevens' architecture is straightforward: a central SQLite database storing various information and cron jobs importing data from sources like calendars, weather APIs, and email. The author emphasizes the simplicity and encourages readers to replicate and extend the project.

Development

Meilisearch: Blazing-Fast Open-Source Search for Your Apps

2025-04-14
Meilisearch: Blazing-Fast Open-Source Search for Your Apps

Meilisearch is a lightning-fast, open-source search engine easily integrated into your apps, websites, and workflows. It offers out-of-the-box features like hybrid search, search-as-you-type, typo tolerance, filtering & faceted search, sorting, synonym support, geosearch, and extensive language support for a superior search experience. Meilisearch provides a RESTful API, multiple SDKs, AI readiness, and a cloud service (Meilisearch Cloud) for easy deployment and maintenance. It prioritizes user privacy, allowing users to disable anonymized data collection and providing a data deletion request channel.

1 2 112 113 114 116 118 119 120 214 215