Category: Development

Arcan 0.7 Released: The All-Tomato Desktop Update Arrives

2024-12-26
Arcan 0.7 Released: The All-Tomato Desktop Update Arrives

Arcan 0.7 marks the end of the second phase of the 'anarchy on the desktop' project and the beginning of the final phase. This release focuses on bug fixes and improvements to Lash#Cat9 and Xarcan. Lash#Cat9, a Lua-based command-line environment, adds features such as a Debug Adapter Protocol implementation and an interactive spreadsheet. Xarcan allows for custom window managers, utilizing Arcan as a display driver and enabling interoperability with X servers. Arcan 0.7 aims to improve performance and security, with future versions planned to feature more flexible remote programming and simpler device connection.

Development

Lua: An Underrated Programming Language

2024-12-26
Lua: An Underrated Programming Language

Lua, a concise and efficient embedded scripting language created in 1993, remains surprisingly underrated despite its strengths. This article highlights Lua's advantages: ease of learning and mastery, an excellent C API, multi-paradigm support, and exceptional embeddability. While widely used in games and embedded systems, the author also points out some unique aspects of Lua, such as its indexing conventions (starting at 1 but not mandatory), error handling, and nil-terminated arrays, which developers should be aware of. Overall, Lua is a powerful language deserving more recognition; its efficiency is evident in applications like Neovim plugins.

Rust Library Upgrade Challenges: A Clever Way to Avoid Version Conflicts

2024-12-26
Rust Library Upgrade Challenges: A Clever Way to Avoid Version Conflicts

Upgrading libraries in the Rust ecosystem often causes cascading effects and significant trouble. This article introduces a technique called the "semver trick", which cleverly solves the problem of upgrading less frequently used APIs without changing commonly used ones by having a library depend on its future version. This method is particularly useful for avoiding the need for large-scale coordinated upgrades across the entire dependency chain due to breaking changes in a single library, greatly simplifying the upgrade process.

A Minimalist ELF: Stripping Complexity to the Core

2024-12-26

This article details the author's journey in simplifying a basic Linux program, culminating in a minimalist ELF file. Starting with a simple "Hello World" program, the author progressively removes complexities like standard libraries, modern security features, debugging information, and error handling. The process delves into ELF file structure, symbol tables, sections, and the role of linker scripts, using assembly language to directly manipulate system calls for program functionality. The author concludes by creating a custom linker script, loading code and data segments into specified memory addresses, demonstrating the flexibility and low-level details of ELF file construction.

Python subprocess Default Behavior Change: Enhanced Performance, Balanced Security

2024-12-26

Python's subprocess module is changing its default behavior of closing all file descriptors. This change aims to improve performance, especially when dealing with a large number of file descriptors, avoiding performance bottlenecks caused by closing each descriptor individually. However, altering the default behavior could introduce security risks. Developers are advised to choose the `close_fds` parameter based on their specific needs and take appropriate security measures, such as ensuring all file descriptors are marked as non-inheritable. This change carefully balances performance and security, aiming to provide developers with a more flexible and efficient subprocess management solution.

Development

Open-Source WebGPU Ray Tracer: Real-time Rendering from glTF Scenes

2024-12-26
Open-Source WebGPU Ray Tracer: Real-time Rendering from glTF Scenes

The open-source project webgpu-raytracer is a software ray tracing engine built using the WebGPU API. It supports glTF scene files and renders materials with albedo, normal, and material maps. The engine utilizes BVH for accelerated ray-scene intersections and employs multiple importance sampling for efficiency. Currently, it supports environment maps and allows camera control via keyboard and mouse, but refraction is not yet supported.

Development Ray Tracing

Debian's Controversial Approach to Rust Dependency Handling

2024-12-26

Debian's integration of Rust has been a long-standing effort, but its dependency handling approach has become a point of contention. Author Ian Jackson argues that faithfully following Rust's Semantic Versioning (semver) in Debian package dependencies is impractical. Fundamental differences exist between Debian's and Rust's dependency management semantics, leading to significant manual work when directly translating Rust's version dependencies. Jackson proposes a radical solution: Debian shouldn't precisely follow upstream Rust semver dependency information, but instead optimistically try various package combinations, letting automated QA discover and fix breakages. This approach, while violating semver, is argued to be mitigated by the Rust community's emphasis on API safety and change notifications, along with Debian's QA mechanisms. The proposal aims to improve the update efficiency of Debian Rust packages, but it might also lead to some dependency combinations failing.

Development

ChatGPT Saved Chats Extension: Never Lose an Important Conversation Again

2024-12-26
ChatGPT Saved Chats Extension: Never Lose an Important Conversation Again

Tired of losing important ChatGPT conversations in your endless chat history? The ChatGPT Saved Chats Chrome extension is here to help! This easy-to-use extension lets you save and organize your most valuable chats with a single click. Simply hover over any conversation and click the save icon to instantly store it for later access. Your saved chats are stored locally, ensuring your privacy. Say goodbye to endless scrolling and hello to easy retrieval of your important conversations.

GitHub Open Source Project Thruster: Simplifying Rails App Deployment with an HTTP/2 Proxy

2024-12-26
GitHub Open Source Project Thruster: Simplifying Rails App Deployment with an HTTP/2 Proxy

Thruster is an HTTP/2 proxy designed to simplify production deployments of Rails applications. It works alongside the Puma web server, providing features like HTTP/2 support, automatic TLS certificate management with Let's Encrypt, basic HTTP caching, and X-Sendfile support with compression. It aims for zero configuration; simply setting the TLS_DOMAIN environment variable enables TLS, otherwise it runs in HTTP-only mode. Thruster also wraps the Puma process, making it ideal for containerized environments. Originally created for the ONCE project, it's now used for simpler deployments of other Rails applications.

Development Deployment

Potential Issue with zpool import/export in Linux OpenZFS

2024-12-26

A potential issue exists in Linux OpenZFS versions (as of 2.3.0) regarding importing and exporting ZFS pools. Even if no filesystems within a ZFS pool have the 'sharenfs' property set, `zpool import` and `zpool export` still run `exportfs -ra`. This can wipe out manually added or modified NFS exports, impacting environments like high-availability systems using custom NFS export configurations. The problem stems from OpenZFS blindly executing `exportfs -ra`, regardless of whether NFS exports need changing.

Development

How to Handle Go Security Alerts: A Practical Guide

2024-12-26
How to Handle Go Security Alerts: A Practical Guide

This article provides a practical guide on handling Go security alerts. Using the December 2024 Go security vulnerabilities in golang.org/x/net and golang.org/x/crypto packages as examples, it details how to use govulncheck and Docker Scout to scan Docker images and Go source code for vulnerabilities, and how to update dependencies. The article emphasizes the importance of differentiating between potential security issues and actual risks, and recommends automating security testing and patching for efficiency and compliance with new EU cybersecurity regulations.

Programmer Tackles Advent of Code 2024 on OS/2 Warp 4 with Java 1.0.1

2024-12-26

A programmer took on the Advent of Code 2024 challenge using Java 1.0.1 on a 1996 IBM OS/2 Warp 4 system. This wasn't just a coding challenge; it was a retro journey pushing the limits of outdated hardware and software. The article details the challenges encountered, including bugs in Java 1.0.1, performance bottlenecks, and limitations of the old system, and how these were overcome. This showcases not only coding prowess but also the charm of early computing technology and the programmer's perseverance.

Development

W3C HTML Working Group: Driving HTML Standard Evolution

2024-12-26
W3C HTML Working Group: Driving HTML Standard Evolution

The W3C HTML Working Group is dedicated to bringing WHATWG's HTML and DOM review drafts to W3C Recommendations. This group comprises global experts collaboratively ensuring the continued evolution and improvement of HTML standards to meet the ever-changing needs of the web. The group features a defined mission, participation process, and patent policy, and regularly publishes updates and event information.

Node.js Enables --experimental-strip-types by Default, Enhancing TypeScript Support

2024-12-26
Node.js Enables --experimental-strip-types by Default, Enhancing TypeScript Support

A significant update to Node.js enables the `--experimental-strip-types` flag by default. This means developers can now execute TypeScript files without additional configuration. The change aims to improve TypeScript support and catch more bugs. While still experimental, this marks a major step towards simpler TypeScript development in Node.js, offering developers a more streamlined experience.

Development Development

Minecraft Server Crafted in COBOL: A Retro Rewind

2024-12-26
Minecraft Server Crafted in COBOL: A Retro Rewind

CobolCraft is a Minecraft server audaciously built using the legacy COBOL programming language. Despite COBOL's limitations in low-level data manipulation, this project surprisingly supports features like infinite terrain generation, dynamic chunk loading, and multiplayer capabilities. It even handles Minecraft's data files, showcasing the unexpected potential of this often-overlooked language and challenging perceptions of its capabilities. This project serves as a testament to programming ingenuity and an interesting experiment in using unconventional tools.

Development Server Development

Racket School 2019: Designing Your Own Languages

2024-12-26

The "How to Design Languages" track at Racket School 2019 offered a deep dive into language-oriented programming and language building using Racket. The curriculum covered core concepts like macro expansion, modules, and type checking, reinforced with hands-on labs. Participants built simple macros and typed languages, gaining a practical understanding of language design principles. Lectures and labs provided a balanced learning experience, culminating in the ability to design and build custom languages.

Design Space for Code Search Queries: ast-grep's Innovative Approach

2024-12-26
Design Space for Code Search Queries: ast-grep's Innovative Approach

ast-grep is an Abstract Syntax Tree (AST)-based code search tool designed for ease of use, expressiveness, and precision. This blog post delves into the design space of code search queries, categorizing them into informal queries, formal queries based on existing programming languages, formal queries using custom languages, and hybrid queries. Each type's strengths and weaknesses are analyzed. ast-grep employs a hybrid approach, allowing users to write queries using familiar programming language syntax and offering more powerful expressiveness through YAML configuration files or a programmatic API for precise code search.

SiYuan: A Privacy-First, Self-Hosted Personal Knowledge Management System

2024-12-26
SiYuan: A Privacy-First, Self-Hosted Personal Knowledge Management System

SiYuan is a privacy-first, self-hosted, fully open-source personal knowledge management software written in TypeScript and Go. It boasts features like fine-grained block-level referencing, Markdown WYSIWYG editing, custom attributes, SQL query embedding, web clipping, and PDF annotation link export. Available via app stores (App Store, Google Play, F-Droid) and Docker, SiYuan offers a powerful yet user-friendly experience. Most features are free for both personal and commercial use.

Development knowledge management

Coccinelle: A Powerful Tool for Linux Kernel Development

2024-12-26

Coccinelle is a powerful tool for Linux kernel development, used for pattern matching and text transformation. It enables the application of complex, tree-wide patches and detects problematic coding patterns. This document details Coccinelle's installation, usage, various modes (patch, report, context, org), and advanced features such as parallelization, using a single semantic patch, controlling processed files, debugging, and .cocciconfig support. Coccinelle leverages Semantic Patch Language (SmPL) and offers multiple modes for generating patches, reports, context information, and Org-mode reports, catering to diverse needs.

Development

egui: An Immediate Mode GUI in Rust

2024-12-26

egui is a lightweight and efficient immediate mode GUI (graphical user interface) library written in Rust. Its clean and simple API allows developers to rapidly build interactive interfaces. Unlike traditional retained-mode GUIs, egui redraws the entire UI every frame, leading to more flexible layouts and simpler state management. This makes it ideal for games, data visualization, and applications requiring high responsiveness. Its ease of use and powerful features make egui a compelling choice for Rust developers building GUIs.

Development

Black Candy: A Self-Hosted Music Streaming Server

2024-12-26
Black Candy: A Self-Hosted Music Streaming Server

Black Candy is a self-hosted music streaming server, your personal music center. It offers easy installation via Docker, allowing you to quickly set up your own music streaming service. A demo is available for testing. While SQLite is the default database, PostgreSQL is also supported. Data persistence is managed by mounting the /app/storage directory. For improved performance, Nginx proxy is supported, and mobile apps are available.

Development self-hosted

POSIX Time: Not What You Think

2024-12-26

This article debunks a common misconception about POSIX time (Unix time): it's not simply the number of seconds since January 1, 1970, 00:00:00. Due to leap seconds, the number of seconds in a UTC day isn't a constant 86,400, leading to discrepancies between POSIX time and the actual number of seconds. The article delves into the impact of leap seconds on time calculations and recommends alternatives like CLOCK_MONOTONIC or TAI for precise timekeeping, avoiding errors caused by leap seconds.

Development POSIX time leap seconds

A 50-Year-Old Bug in C's File I/O: Unraveling a Legacy Mystery

2024-12-26

While improving a DOS emulator, a developer stumbled upon a seemingly trivial bug in file I/O: appending text to a file using the `echo` command produced unexpected results. Debugging revealed a flaw in how C runtime libraries handle switching between reading and writing, a flaw tracing back to the 1970s and even earlier UNIX systems. The article delves into the historical context, from early K&R C to modern C standards, exploring implementation differences across various UNIX versions and C compilers. The root cause is identified as limitations in early C libraries' handling of update mode, with variations in how different operating systems and compilers addressed these limitations. The author concludes that even today, for portable C code, an explicit `fseek` call is necessary when switching between reading and writing a file.

Development file I/O legacy bug

Postgres Reads Causing Writes: MVCC, Page Pruning, and Hint Bits

2024-12-25

This article delves into the seemingly paradoxical behavior in PostgreSQL where simple SELECT queries can trigger data writes. Starting with the Multi-Version Concurrency Control (MVCC) mechanism, it explains concepts like row versions, pages, and tuples. Through code examples, it analyzes how hint bit updates and page pruning cause read operations to modify pages, ultimately leading to disk writes. The article also discusses the HOT update optimization strategy and uses page inspection tools to illustrate how data is stored and updated within pages.

Development Database Performance

Server-Sent Events (SSE): An Underrated Real-time Data Streaming Solution

2024-12-25
Server-Sent Events (SSE): An Underrated Real-time Data Streaming Solution

This article explores Server-Sent Events (SSE), a simpler and more efficient one-way real-time communication solution compared to WebSockets. SSE leverages standard HTTP protocols, making it easy to implement and deploy, compatible with existing infrastructure, resource-efficient, and featuring automatic reconnection. The article details SSE's workings, advantages, and application scenarios (like real-time news, stock tickers, progress bars, etc.), showing code examples with Flask and JavaScript. Furthermore, it analyzes how LLMs like ChatGPT utilize SSE for streaming responses and points out SSE's limitations, such as unidirectional communication and data format restrictions. In short, SSE provides an elegant solution for many applications requiring unidirectional real-time data streams.

Deep Dive into CPS: A Journey into Functional Programming Compilation

2024-12-25
Deep Dive into CPS: A Journey into Functional Programming Compilation

This article delves into Continuation-Passing Style (CPS) and its application in compiling functional programming languages. The author builds a CPS transformer step-by-step for a simple Scheme-like language, explaining optimization strategies and code generation methods. The article details the transformation of integers, variables, function calls, arithmetic operators, lambda expressions, and if expressions into CPS form. It also discusses meta-continuations and optimization techniques such as constant folding and beta reduction. Finally, it outlines several approaches to generating executable code from CPS, including generating C code, using trampolines, and employing a single large switch statement.

Portspoof: Open-Source Port Spoofing Tool Thwarts Port Scans

2024-12-25
Portspoof: Open-Source Port Spoofing Tool Thwarts Port Scans

Portspoof is an open-source port spoofing tool designed to enhance OS security. It confuses port scanners by always keeping all 65535 TCP ports open and responding with SYN+ACK to every connection attempt. Furthermore, Portspoof boasts a massive database of dynamic service signatures, mimicking various service banners to further hinder attackers from identifying real services. This significantly increases the time and difficulty for attackers to perform port scans and service identification, effectively improving system security without requiring root privileges.

Development port spoofing

Cognitive Load: The Silent Killer in Software Development

2024-12-25

This article explores the importance of cognitive load in software development. Cognitive load refers to the amount of mental effort a developer needs to complete a task; high cognitive load leads to confusion, wasted time, and money. The article analyzes intrinsic and extraneous cognitive load, illustrating how to reduce extraneous load through code examples, such as using meaningful intermediate variables, avoiding nested if statements, and prioritizing composition over inheritance. It also stresses avoiding excessive microservices, choosing appropriate language features, and adhering to the Single Responsibility Principle, noting that excessive abstraction and layered architectures can increase cognitive load. Finally, the article advises developers to focus on code readability and collaborate with junior developers to identify and improve cognitive load issues.

Sherlock Project: Hunt Down Social Media Accounts Across 400+ Networks

2024-12-25

The Sherlock Project is a powerful tool allowing users to search for social media accounts across 400+ networks using only a username. It's easy to get started with simple installation and usage instructions, and supports a wide range of sites. Community contributions are welcome, enabling users to add new sites and improve functionality.

MDN Learning Resources Get a Major Overhaul: New Learning Experience Launched

2024-12-25
MDN Learning Resources Get a Major Overhaul: New Learning Experience Launched

In December 2024, MDN launched a major update to its "Learn Web Development" section, merging the MDN Curriculum with existing learning content to create a more streamlined learning path. This upgrade addresses previous issues like bloated content and unclear learning pathways, providing a clearer and more accessible experience for beginners. The new site uses a modular structure with "Getting Started," "Core," and "Extensions" sections, incorporating clear learning objectives and interactive content. MDN will continue to improve content and design, aiming to deliver even better learning resources in the future.

1 2 200 201 202 204 206 207 208 214 215