Category: Development

Asynchronous Rust on Cortex-M Microcontrollers: A Deep Dive

2024-12-14

This article delves into the world of asynchronous Rust programming on Cortex-M microcontrollers. It explains the mechanics of Futures, cooperative scheduling, and asynchronous Rust executors, showcasing their efficiency in resource management. The innovative Embassy framework, designed to empower asynchronous programming on microcontrollers, is introduced. Through practical examples like a Blinky and Button program, the article illustrates the application of asynchronous Rust in embedded systems, comparing its advantages and disadvantages against traditional RTOS approaches. The conclusion highlights the significant benefits of asynchronous Rust in terms of resource utilization and concurrency.

Fern, a YC-backed Startup, is Hiring a Senior Frontend Engineer

2024-12-14

Fern, a Y Combinator-backed startup, is seeking a Senior Frontend Engineer with a salary of $168,000-$192,000 plus equity. Located in Williamsburg, Brooklyn, NY, this in-person role requires 4+ years of experience in frontend development, proficiency in JavaScript/TypeScript, React, and Next.js. Responsibilities include streamlining developer experience, managing frontend infrastructure, building user-facing features, and fostering strong customer relationships. Fern simplifies API usage and counts Cohere, ElevenLabs, Webflow, and Merge.dev among its clients.

Development Frontend Engineer

Svader: A Svelte Library for GPU-Rendered Components

2024-12-14

Svader is a library for creating GPU-rendered Svelte components using WebGL and WebGPU fragment shaders. Developers can write programs in fragment shaders to customize pixel colors and control rendering effects through parameter passing. Supporting Svelte 4 and 5, it offers WebGL and WebGPU rendering modes with built-in parameters like resolution, scale, and time. Svader simplifies GPU rendering with easy-to-use components and provides fallback rendering in environments lacking WebGL or WebGPU support.

Development

The Science of Routing Print Orders at Canva

2024-12-14

Canva's engineering team built a configurable rules system for graph traversal to optimize print order routing. Decoupling graph building, traversal, and decision-making ensures high availability and scalability. It uses relational databases for data management and asynchronously generates a cached graph for fast querying. A rules engine and a modified minimum-cost flow algorithm find the optimal route in milliseconds, minimizing transport distance and carbon emissions, enhancing user experience and operational efficiency.

Go: When to Say No

2024-12-14

A developer, after years of using Go, is switching back to Java. He finds Go lacking in several areas: limited looping options, absence of higher-order functions, cumbersome error handling, overly restrictive coding style leading to verbose and hard-to-maintain code, and an immature package ecosystem. While acknowledging Go's suitability for infrastructure projects, he advises against its use in complex enterprise applications.

Development development

The PHP Static Typing Debate: Flexibility and Efficiency of Dynamic Languages

2024-12-14

In this article, Tony Marston vehemently criticizes the enforced static type checking changes introduced in PHP 8.1. He argues that this change violates the core design principles of PHP's dynamic typing, clashing with PHP's long-standing flexible approach to data type handling and imposing a significant workload on developers. The article delves into the advantages of PHP's dynamic type system, such as automatic type conversion and flexible data handling, pointing out that the performance benefits of static typing are negligible in modern hardware, while hindering development efficiency. Marston contends that PHP's dynamic type system is better suited for handling HTML frontend and SQL backend data, and that enforcing static type checking is counterproductive, negatively impacting the PHP community.

uv: A Blazing-Fast Python Package and Project Manager

2024-12-14

uv, a lightning-fast Python package and project manager written in Rust, replaces pip, pip-tools, pipx, poetry, pyenv, twine, and virtualenv. Boasting a 10-100x speed improvement, uv offers project management, tool management, Python version management, script support, and a pip-compatible interface. Features like global caching and workspace support streamline workflows. From project creation and dependency management to running scripts and building distributables, uv provides efficient and convenient solutions for all your Python development needs.

From New Grad to Meta Staff Engineer in 3 Years: Evan King's Success Story

2024-12-14

Evan King shares his journey of rapidly advancing from a new graduate to a Staff Engineer at Meta in just three years. His six key principles for success include: prioritizing speed and efficiency to free up time for growth; broadening perspective to think strategically like a higher-level engineer; embracing uncertainty and sharing ideas freely; focusing on problem-solving over technical complexity; building goodwill and strong relationships; and maintaining a positive attitude. While acknowledging the role of luck and timing, Evan emphasizes the importance of cultivating sustainable habits that compound over time, focusing on core competencies and strategically utilizing the extra bandwidth created by efficiency.

Clojure Error Handling: No Silver Bullet, Only Choices

2024-12-14

Clojure offers a diverse range of error-handling approaches, with no single best practice. The article explores several methods: throwing native exceptions, using `ex-info` for data-carrying exceptions, returning error maps, and utilizing various libraries for more sophisticated error handling flows, such as the `anomalies` library or options like `pact` and `failjure`. The author emphasizes that the choice depends on the specific context and that a mix of approaches can coexist within a single project. Developers are empowered to select the most appropriate solution for their needs; Clojure embraces this freedom.

Development error handling

HTMX v2.0.4 Release Notes: Bug Fixes and Improvements

2024-12-14

The HTMX v2.0.4 release notes detail numerous bug fixes and improvements. This release focuses on stability and compatibility enhancements, including fixes for nested shadow root issues, improved `hx-boost` behavior on forms, better support for Web Components and Shadow DOM, and updated extensions for improved performance and reliability. Adjustments to the `htmx.ajax` function and optimizations to `hx-trigger` event handling are also included.

Development Release Bug Fixes

PhD Advisor Automates Writing Improvement with Shell Scripts

2024-12-14

To improve his PhD students' writing, an advisor created three shell scripts to detect passive voice overuse, weasel words, and duplicate words. Integrated into their LaTeX build system, these scripts encourage conscious choices for clarity and precision, rather than blind adherence to grammar rules. The advisor advocates for programmers using automation to combat writing weaknesses and recommends resources like "Style: The Basics of Clarity and Grace".

macOS 15.2 Update Breaks System Replication: Users Face Data Backup Nightmare

2024-12-14

A critical bug in macOS 15.2 has broken the system replication feature, causing data backups to fail with a 'Resource Busy' error, specifically when attempting to copy Preboot or Recovery partitions. Developer Dave Nanian explains that the problem stems from Apple's own code and currently has no easy fix. Users are forced to rely on third-party backup solutions, utilizing a 'Backup - all files' method with a Smart Update to restore their data after a clean system install. This issue is causing significant user frustration, particularly as the holiday season approaches.

Farebox: A Multimodal Routing Project in Rust

2024-12-14

Farebox is a fast RAPTOR implementation in Rust designed for memory-constrained machines. It leverages Valhalla for transfers and first/last mile routing, supporting multi-agency and timezone-aware routing. The project aims to supplement OpenTripPlanner, providing infill service for areas not covered by existing instances. Memory mapping is used for timetables to enable planet-scale coverage with a single instance and reduce hosting costs. Future plans include GTFS-RT support and potentially rRAPTOR for simultaneous itinerary calculation across various departure times.

Development Routing

Luon Programming Language: A Statically Typed Lua

2024-12-14

Luon is a new, statically-typed programming language with a syntax similar to Oberon-based languages, incorporating concepts from Lua and targeting the LuaJIT VM. Essentially a statically-typed version of Lua, it allows for the reuse of existing Lua and C libraries via external procedure declarations. Luon addresses shortcomings in Lua's error handling and code structure, offering a compiler and integrated IDE supporting procedural, generic, and object-oriented programming. The project includes extensive examples and test cases and is under active development.

Development statically typed

SCCS: The Source Code Motel After 50 Years

2024-12-13

This article retrospectively examines the influence of the Source Code Control System (SCCS) over the past 50 years. Author Larry McVoy details SCCS's unique weave format, which allows for merging by reference, avoiding the inefficiencies of patch-based copying found in other systems. He explains how SCCS leverages this weave to retrieve any file version in constant time and preserves authorship across versions. While acknowledging shortcomings like long-term locks and file-orientation, McVoy highlights the efficiency of the weave format and its preservation of authorship as groundbreaking, laying the groundwork for later systems like BitKeeper.

Hexagonal Architecture in Rails: A Path to Decoupling

2024-12-13

This article explores implementing Hexagonal Architecture (Ports and Adapters pattern) in Rails applications. The author initially struggled with the pattern until realizing that 'adapter' directly refers to the Gang of Four Adapter Pattern. The article details inbound and outbound ports, and how adapters decouple application logic from external services (databases, logging, email, etc.). Rails controllers can serve as HTTP adapters, but the author stresses avoiding direct ActiveRecord usage. Instead, custom repositories access data, improving decoupling and maintainability. The article concludes by encouraging Rails developers to adopt Hexagonal Architecture for more robust and maintainable applications.

Repurposing Old Smartphones as Kubernetes Cluster Nodes with postmarketOS

2024-12-13

The author built a functional Kubernetes cluster using discarded smartphones and the postmarketOS operating system. The article details the process, including the reasons for choosing old smartphones (substantial computing power, built-in batteries), the advantages of postmarketOS (Alpine Linux-based, uses the mainline Linux kernel), and challenges encountered during setup (kernel modules, network configuration). Solutions to these challenges are thoroughly explained. The author successfully repurposed old smartphones as Kubernetes nodes, efficiently utilizing resources and promoting sustainability.

Bypassing Windows Kernel Mitigations: A Deep Dive into Violet Phosphorus

2024-12-13

This post delves into bypassing modern Windows 10 and 11 kernel mitigations like SMEP and VBS. The author details Violet Phosphorus, a universal VBS/SMEP bypass technique, providing PoC code and a ROP chain. It explains SMEP and VBS, demonstrating how to exploit a vulnerability in the HackSysExtremeVulnerableDriver to use ROP gadgets and the MiGetPteAddress function to modify page table entries for kernel code execution. The author also shows how to use Kristal-G's SYSRET shellcode to return to user mode. This is a valuable resource for kernel exploit development and security researchers, categorized as Development.

Node.js EPUB Library @smoores/epub Released

2024-12-13

A new Node.js library, @smoores/epub, has been released. It allows developers to inspect, modify, and create EPUB 3 publications. The library offers high-level APIs that simplify interaction with the EPUB specification, such as setting the title and retrieving author information. Lower-level APIs provide granular control over the EPUB structure, enabling tasks like adding chapters and metadata. Built upon fast-xml-parser, @smoores/epub provides robust XML parsing and manipulation capabilities, facilitating efficient handling of EPUB file XML content.

Development Library

Scheduled Reboots: A Preventative Approach

2024-12-13

A university research team faced a challenging sysadmin problem: their servers had been running for too long and needed rebooting, but frequent reboots disrupt user experience. Their default was to avoid reboots, but a recent large-scale reboot due to prolonged uptime forced a change. To prevent similar issues, they've decided on a yearly reboot schedule—at least three times a year, aligning with the university's teaching schedule—balancing preventative maintenance with user experience.

Microsoft Open-Sources MarkItDown: A File-to-Markdown Conversion Tool

2024-12-13

Microsoft has open-sourced MarkItDown, a Python tool that converts various files (including PDF, PowerPoint, Word, Excel, images, audio, and HTML) into Markdown format. The tool boasts a simple API, supports a wide range of file types, and incorporates OCR and speech transcription for enhanced functionality, making it ideal for text analysis or indexing. Contributions are welcome, and the project adheres to the Microsoft Open Source Code of Conduct.

Concurrent Cycle Collection: Garbage-Collected Smart Pointers in Rust for Scheme

2024-12-13

This article details the implementation of a concurrent cycle collector in Rust for garbage-collected smart pointers (Gc) within a Scheme interpreter. Gc functions similarly to Arc>, supporting interior mutability, cloning, and sending across threads. The article thoroughly explains the implementation of Gc, including thread-safe interior mutability using semaphores and read/write locks, and the implementation details of concurrent cycle collection based on the Bacon and Rajan algorithm. This includes the Trace trait, cycle detection, and mechanisms for handling concurrent modifications.

Maker Builds Laser Shooting Game: From Legoland Ride to ESP32-Powered Halloween Fun

2024-12-13

Inspired by a Legoland Egyptian adventure ride, the author decided to create a similar shooting game. Using inexpensive ESP32 microprocessors, infrared laser guns, and homemade targets, he successfully built a Halloween-themed shooting game. Along the way, he learned Arduino and MicroPython programming, overcoming challenges in hardware connections, power supply, and communication. The game was a hit at school and home events. Future plans include improving target design, lighting effects, and circuit boards to enhance the gaming experience.

Development Maker

New Hash Functions Rain Hashes: Speed and Security Combined

2024-12-13

DOSAYGO Research has released Rain Hashes, a new family of hash functions featuring Rainbow and Rainstorm algorithms. Rainbow boasts exceptional speed, making it ideal for general-purpose hashing. Its C++ implementation has passed all SMHasher3 tests and is characterized by its concise and efficient code. Rainstorm prioritizes security; while not formally audited, its design incorporates elements from cryptographic hash functions and offers output sizes from 64 to 512 bits. The project provides C++, WASM, and Node.js implementations, along with a command-line tool and benchmark tests for easy evaluation and usage.

Development hash function

Web Origami: A New Programming Language for Simplified Website Building

2024-12-13

Web Origami is a new programming language designed to simplify the creation of small- to medium-sized websites. Using a concise syntax that complements HTML and CSS, users can describe website structure using formulas similar to spreadsheets, transforming data and files into HTML and other website resources through simple programs. Even without JavaScript knowledge, features like full-text search and RSS feeds can be created. Origami provides a command-line interface, built-in functions, and an async-tree library, with support for JavaScript extensions. Its core concept is to abstract website building as data transformation, making site creation and deployment efficient, low-cost, and easy to understand.

Security Vulnerabilities Stemming from Dart/Flutter's Weak PRNG

2024-12-13

Zellic's research uncovered multiple security vulnerabilities caused by a weak pseudorandom number generator (PRNG) in Dart/Flutter. A flaw in the initialization of the `Random()` function within the Dart SDK resulted in insufficient entropy in generated keys, making them susceptible to brute-force attacks. This allowed attackers to easily gain access to the Dart Tooling Daemon, enabling them to read or write workspace files and even execute arbitrary code. Furthermore, Proton Wallet and SelfPrivacy projects were also affected by this weak PRNG, experiencing encryption vulnerabilities and predictable password issues, respectively. While the vulnerability has been patched, developers are urged to exercise caution when using the `Random()` function and utilize `Random.secure()` when cryptographically secure random numbers are required.

Revolutionary Idea: Applying Magit Principles to the jj Version Control System

2024-12-13

The author proposes a novel approach: applying the Magit version control interface from Emacs (which uses text files as its UI) to the nascent jj version control ecosystem. The article points out that Magit's text-based UI offers efficiency and portability. By leveraging the LSP protocol, a Magit-like experience can be implemented in various editors, avoiding redundant development. The author envisions generating specific text files (such as .jj/status.jj) and utilizing LSP features like semantic tokens, folding ranges, and goto definition to achieve Magit-like version control operations. The ultimate goal is to create a cross-platform, efficient user interface for jj version control.

Development

Eventual Consistency: Challenges and Patterns in Distributed Systems

2024-12-13

Eventual consistency is unavoidable in distributed systems. This article explores four common patterns for handling eventual consistency: event-based eventual consistency, background sync eventual consistency, saga-based eventual consistency, and CQRS-based eventual consistency. Each pattern has its advantages and disadvantages. For example, the event-based pattern emphasizes loose coupling and scalability, but consistency takes time; while the saga-based pattern is suitable for complex, long-running transactions, ensuring consistency through compensating transactions. The choice of pattern depends on the specific needs and trade-offs of the system.

Mastering Ruby Debugging: From puts to Professional Tools

2024-12-13

This JetBrains RubyMine blog post delves into various approaches to debugging Ruby code, ranging from basic `puts` statements to interactive consoles (IRB and Pry) and powerful debuggers (byebug, debug, and the RubyMine debugger). Using a real-world bug example, it highlights the strengths and weaknesses of each tool, guiding developers in selecting the most appropriate debugger for improved efficiency. The article emphasizes that effective debugging isn't just about fixing errors; it's about gaining a fundamental understanding of the code to write more robust Ruby applications.

1 2 3 4 5 7