Category: Development

Landrun: A Lightweight, Kernel-Level Secure Sandbox for Linux

2025-03-22
Landrun: A Lightweight, Kernel-Level Secure Sandbox for Linux

Landrun is a lightweight Linux sandbox utilizing the Landlock LSM, boasting kernel-level security and minimal overhead. It offers fine-grained access control for directories, supporting read and write paths with optional execution permissions. TCP network access control (binding and connecting) is also included. Requiring Linux kernel 5.13+ with Landlock LSM enabled (kernel 6.8+ for network restrictions), Landrun provides a command-line interface for easily configuring sandbox permissions, including read-only, read-write, execution, and specific TCP port binding and connection allowances. A best-effort mode ensures graceful degradation on older kernels. This makes it ideal for securely running untrusted or potentially malicious code.

Development kernel security

Two Reports Highlight Knowledge Gaps and Best Practices for Open Source CRA Compliance

2025-03-22
Two Reports Highlight Knowledge Gaps and Best Practices for Open Source CRA Compliance

The Linux Foundation released two groundbreaking research reports exploring community-driven strategies to address open source security and the European Union’s Cyber Resilience Act (CRA). The first report analyzes how three Linux Foundation projects meet CRA minimum compliance requirements, sharing best practices. The second report reveals significant knowledge gaps within the open source ecosystem regarding CRA awareness, with many respondents unfamiliar with the act and lacking compliance readiness. The reports recommend manufacturers take a more active role in open source security, calling for increased funding and legal support to foster better security practices.

FizzBee: Modeling Mutual Exclusion and the Pitfalls of Redlock

2025-03-22
FizzBee: Modeling Mutual Exclusion and the Pitfalls of Redlock

This article details the author's experience using FizzBee, a new formal specification language built on Starlark, to model mutual exclusion algorithms and investigate issues with the Redlock algorithm. By modeling critical sections, locks, leases, and fencing tokens, the author reveals limitations in Redlock's fault tolerance, ultimately showing that fencing tokens don't completely solve mutual exclusion problems. The author concludes by discussing FizzBee's ease of use and shortcomings while highlighting the importance of formal specification in algorithm design. The practical exercise unexpectedly revealed subtle flaws in the author's understanding of fencing tokens, underscoring the value of formal methods.

Development mutual exclusion

Diving Deep into PyTorch Internals: Tensors, Autograd, and Kernel Writing

2025-03-22

This blog post provides a detailed exploration of PyTorch's internals, covering tensor data structures, automatic differentiation (Autograd), and kernel writing. It begins by explaining the underlying implementation of tensors, including the concept of strides and how to use them to create tensor views. Next, it delves into the workings of Autograd, showing how gradients are computed via backpropagation. Finally, the post offers a practical guide to writing PyTorch kernels, including how to leverage PyTorch's tools for error checking, dtype dispatch, and parallelization. This is an excellent tutorial for developers with some PyTorch experience who want to understand its internals or contribute code.

Development

Recovering from Accidental Deletion of /lib on Linux

2025-03-22

This post details how to recover a Linux system after accidentally deleting the crucial `/lib` directory. The author explores several methods, from leveraging existing tools like a static busybox to creating and transferring a minimal, statically compiled C program to replace essential files. The step-by-step guide covers techniques using bash built-ins and network transfers, providing a solution to avoid reinstalling the OS.

FastOpenAPI: A Pydantic-Powered OpenAPI Generator

2025-03-22
FastOpenAPI: A Pydantic-Powered OpenAPI Generator

FastOpenAPI is a library for generating and integrating OpenAPI schemas using Pydantic and various frameworks, aiming for a developer-friendly experience similar to FastAPI. It supports Falcon, Flask, Quart, Sanic, Starlette, and Tornado, offering FastAPI-style routing via proxy routing. Simple pip installation gets you started quickly, with Swagger UI and ReDoc UI providing convenient documentation access. The project includes comprehensive examples and benchmarks for easy adoption and performance evaluation.

Development Framework Integration

The Evolution of Application Architecture and the Rise of Lightweight Orchestration

2025-03-22
The Evolution of Application Architecture and the Rise of Lightweight Orchestration

From the three-tier architecture of the 90s to today's microservice-driven world, application architecture has undergone a dramatic transformation. To coordinate operations in distributed backends, the orchestration tier emerged. However, existing DIY solutions are complex and hard to maintain, while dedicated orchestration systems introduce their own complexities. This article presents a new approach: integrating orchestration functionality into a lightweight library and using a database to persist execution state. This eliminates the separate orchestration tier, simplifying development, testing, and debugging, ultimately leading to more reliable and efficient application architectures.

Ruby: The Unexpected Language of the AI Revolution?

2025-03-22

Large language models (LLMs) excel at code generation, but their limited context windows hinder work with large codebases. This article explores the 'power' of LLM-assisted programming: how many tokens does it take to express a program? The author argues Python outperforms Go for LLMs due to its conciseness, allowing more features within token limits. Further, Ruby, known for elegance and brevity, is posited as an ideal LLM language due to its efficient token usage. While challenges like type checking remain, Ruby's human-centric design ironically makes it a potential frontrunner for LLMs.

Development

GitHub Code Suggestion Application Restrictions

2025-03-22
GitHub Code Suggestion Application Restrictions

This text lists various limitations encountered when applying code suggestions in GitHub's code review process. These include: no code changes made, pull request closed or merged, viewing a subset of changes, only one suggestion per line applicable, applying suggestions on deleted lines is unsupported, suggestion already applied or marked resolved, suggestions from pending reviews cannot be applied, and suggestions on multi-line comments are not allowed. These restrictions ensure the integrity and accuracy of the code review process.

Development Code Suggestions

Don't Fear the New Type: Lessons from Go and C

2025-03-22

Many developers exhibit a reluctance to create new types in their codebases. This article argues that this stems from a fear of altering the perceived 'grand design' and adding complexity. However, the author contends that when a set of values naturally belongs together, creating a new type significantly improves code readability and maintainability. Using Go as an example, the author highlights the benefits of creating small, purpose-built types like a `CreateSubscriptionRequest` struct, streamlining data handling across function calls. The author encourages developers to overcome their apprehension about creating new types, emphasizing that in C and Go cultures, this practice is common and accepted, provided the type's purpose is clearly conveyed through its name.

Development

Centralized Authorization: The Next Shared Platform?

2025-03-22
Centralized Authorization: The Next Shared Platform?

This article explores the benefits and challenges of centralized authorization systems. Traditionally, authorization is decentralized across applications, leading to inefficiencies and management difficulties. A centralized system offers standardization, cost reduction, and improved compliance, but requires addressing expressiveness, performance, isolation, and integration challenges. The article discusses how open-source (Topaz) and commercial (Aserto) platforms overcome these hurdles, enabling efficient, secure, and manageable enterprise-level authorization.

Favor Long Options in Scripts

2025-03-22

Many command-line utilities offer both short (-f) and long (--force) options. While short options are convenient for interactive use, long options are far superior in scripts. Their improved readability and self-explanatory nature enhance maintainability and understanding. For instance, in Git, `git switch --create release-{today} origin/main` is significantly clearer than `git switch -c my-new-branch`, particularly within complex scripts.

Development long options

Frink: A Practical Calculator and Programming Language

2025-03-21

Frink is a powerful calculating tool and programming language designed to simplify physical calculations, ensure accurate answers, and provide a truly useful tool. It tracks units of measure (feet, meters, kilograms, watts, etc.) throughout calculations, allowing transparent mixing of units and verification of results. Frink also boasts a large database of physical constants, supports multiple languages, advanced mathematical functions, unit conversions, date/time math, regular expressions, and graphics, even supporting object-oriented programming and Java code calls. It runs on various operating systems and devices and auto-updates via Java Web Start.

Development unit tracking

MySQL Transactions Per Second vs. fsyncs Per Second: Unraveling the Mystery

2025-03-21

This article investigates the discrepancy between the theoretical and actual transaction throughput of MySQL. A benchmark reveals MySQL's write speed is significantly faster than theoretically predicted (based on fsync() latency). Further investigation uncovered that MySQL uses group commit to batch writes to the WAL and binlog, and the file system/disk likely employs similar batching, boosting efficiency. The author also analyzes inverted index performance and explains the gap between theoretical models and real-world performance.

Development

Write Your Own x86 Operating System: A Practical Guide

2025-03-21

This book is a practical guide to writing your own x86 operating system. It walks you through the process, from setting up your development environment to implementing multitasking, with detailed explanations and code examples at each step. The authors share their experiences and provide links for further reading. Topics covered include memory management, interrupt handling, virtual memory, file systems, and system calls, making it suitable for readers with some systems programming experience.

Ubuntu Considers Switching to Rust Utilities by Default

2025-03-21

Ubuntu is planning to replace many traditional GNU utilities with Rust implementations, such as those from the uutils project, in its upcoming 25.10 release. To test the suitability of these Rust tools, Canonical's VP of Engineering, Jon Seager, released oxidizr, a command-line utility to easily enable or disable them. This move aims to enhance Ubuntu's resilience and security, and attract more contributors. While community reaction is mixed, this shift could significantly impact Rust's adoption and the future of Linux distributions.

Development

Hyperbrowser MCP Server: Web Scraping and Data Extraction Made Easy

2025-03-21
Hyperbrowser MCP Server: Web Scraping and Data Extraction Made Easy

Hyperbrowser introduces its Model Context Protocol (MCP) server, a powerful tool for scraping web pages, extracting structured data, and crawling websites. It also simplifies access to general-purpose browser agents like OpenAI's CUA, Anthropic's Claude Computer Use, and Browser Use. The server boasts features including webpage scraping, web crawling, structured data extraction, Bing search, and various browser automation capabilities. Installation is straightforward; simply run `npx hyperbrowser-mcp ` and configure the relevant config files.

Development data extraction

ClickHouse Lock Contention: A Year-Long Performance Bottleneck

2025-03-21

Tinybird experienced a year-long puzzle of extremely low CPU utilization in one of their ClickHouse clusters during peak loads. The root cause was identified as Context lock contention. By adding a `ContextLockWaitMicroseconds` metric to monitor lock wait times and redesigning the Context locking mechanism – replacing a single global mutex with read-write mutexes – performance significantly improved. The article details using Clang's thread safety analysis to debug and resolve concurrency issues, along with benchmark results showing a 3x increase in QPS and substantial CPU utilization gains.

Development

Tech Terms You've Probably Been Pronouncing Wrong

2025-03-21

This article highlights common mispronunciations of tech terms encountered by a self-taught solo developer. It lists examples like Asus (AY-soos, not AY-sis), Debian (DEHB-eee-in, not DEE-bee-inn), and many more, emphasizing the lack of inherent logic in these pronunciations. The author suggests using Google's pronunciation widget as a helpful resource and provides a comprehensive list of correctly pronounced terms, including Atlassian, daemon, Gaussian, GIF, Gnome, GNU, JSON, Kernighan, LaTeX, Linus, Poisson, pypi, Qt, Redis, regex, repo, sudo, SUSE, SQL, SQLite, Ubuntu, and Vite. This is a valuable resource for developers and tech enthusiasts alike.

arXivLabs: Experimenting with Community Collaboration

2025-03-21
arXivLabs: Experimenting with Community Collaboration

arXivLabs is a framework enabling collaborators to develop and share new arXiv features directly on the website. Individuals and organizations involved uphold arXiv's values of openness, community, excellence, and user data privacy. arXiv is committed to these principles and only partners with those who share them. Have an idea to enhance the arXiv community? Learn more about arXivLabs.

Development

arXivLabs: Experimenting with Community-Driven Features

2025-03-21
arXivLabs: Experimenting with Community-Driven Features

arXivLabs is an experimental framework enabling collaborators to build and share new arXiv features directly on the website. Participants share arXiv's values of openness, community, excellence, and user data privacy. Got an idea to enhance the arXiv community? Learn more about arXivLabs.

Development

Lightweight Version Control System: Game of Trees Released

2025-03-21

Game of Trees (Got) is a lightweight, user-friendly version control system prioritizing ease of use and simplicity. Currently under development, it primarily targets OpenBSD developers and utilizes Git repositories for versioned data. Functionality not yet implemented in Got can be handled by Git, and both systems can work concurrently on the same repository. Licensed under BSD, the software is free and reusable.

Development

Mathup: A Speedy Math Expression Parser

2025-03-21

Mathup is a lightweight tool that translates simple mathematical expressions written in an AsciiMath-inspired markup language into structured MathML. Faster than MathJax because it only parses and translates, leaving rendering to the browser, Mathup supports a wide range of mathematical symbols and functions, including fractions, subscripts/superscripts, matrices, and tensors. It offers extensive customization options for fonts, colors, and backgrounds. Developers can use it in the command line, on a server, or in a browser for quick and efficient math expression handling.

Development math expressions

Screen: A Pure PHP Terminal Emulator for Rich Text UIs

2025-03-21
Screen: A Pure PHP Terminal Emulator for Rich Text UIs

Screen is a terminal emulator library written entirely in PHP, enabling the creation of rich text-based user interfaces within any PHP application. Initially developed to solve ANSI escape code conflicts in Solo for Laravel's multi-process TUI, Screen creates a virtual terminal buffer to safely handle ANSI operations (cursor movement, color changes, screen clearing). This ensures consistent rendering and supports Unicode, multibyte characters, scrolling, and a wide range of ANSI escape codes. A comprehensive test suite, featuring a novel visual comparison system, guarantees accurate emulation.

Development text UI

Secure and Efficient Rust-based RDP Client: IronRDP

2025-03-21
Secure and Efficient Rust-based RDP Client: IronRDP

IronRDP is a collection of Rust crates providing a secure implementation of the Microsoft Remote Desktop Protocol (RDP). It supports various codecs including uncompressed raw bitmaps, RLE, RDP 6.0 bitmap compression, and Microsoft RemoteFX. A full-fledged asynchronous RDP client is included, along with a blocking example for easier integration. The project also details how to enable RemoteFX on the server for enhanced graphics performance.

Development

Toy Compiler for Python Expressions using MLIR and E-Graphs

2025-03-21
Toy Compiler for Python Expressions using MLIR and E-Graphs

This article details a toy compiler for Python expressions built using MLIR and the egglog library. The compiler leverages E-Graphs for equality saturation and term rewriting to optimize Python expressions before compiling them to MLIR. It features modules for expression modeling, built-in functions, Term IR, a transformation layer, an optimization layer, and MLIR code generation and an LLVM backend. By symbolically interpreting Python functions, converting them to an IR representation, applying optimization rules, and finally generating efficient MLIR code, the compiler achieves compilation and execution via LLVM.

Development

Designing Lenses with PyTorch: A Differentiable Optics Library

2025-03-21

Torch Lens Maker is an open-source Python library for differentiable geometric optics built on PyTorch. Its ambitious goal is to design complex real-world optical systems (lenses, mirrors) using modern computing and cutting-edge numerical optimization. The core is differentiable geometric optics: 3D collision detection and optical laws implemented in PyTorch. By cleverly treating optical elements as layers in a neural network, and leveraging PyTorch's auto-differentiation and optimization algorithms, designing lenses becomes surprisingly similar to training a neural network, unlocking the power of modern machine learning tools. The project is early-stage and the author is seeking funding to continue development.

Development optical design

The Principles of the Wheel Reinventor

2025-03-21

This article explores the philosophy of the 'Wheel Reinventor' – a programmer who chooses to build things from scratch, not for efficiency, but for learning, customization, innovation, and the sheer joy of creation. Four key reasons are given for reinventing the wheel: learning, specificity, innovation, and enjoyment. However, the author stresses the importance of careful planning and avoiding unnecessary rabbit holes, weighing the costs and benefits before starting. Practical advice is also shared, including minimizing third-party dependencies, mastering built-in tools, avoiding excessive abstraction, and open-sourcing code.

Functional Programming: The Art of Folding the Problem Space

2025-03-21

This article explores the differences between functional programming (using Haskell as an example) and imperative programming when solving complex problems. Imperative programming can easily lead to code bloat, like drawing a straight line on paper, while functional programming is like folding the paper, cleverly "folding" the problem space, reducing dimensionality, and ultimately achieving the goal with concise code. The article uses the author's practical experience to illustrate how functional programming builds small modules and combines them to create rich ecosystems, and how to use features like monads to achieve elegant code combinations, ultimately avoiding the common code bloat and maintainability issues of imperative programming.

Development code design
1 2 132 133 134 136 138 139 140 214 215