So here is where it all started. I'm working on a Rust project that makes heavy use of conditional compilation through cargo features. The codebase has chunks of code that are only compiled when certain features are enabled, like this:
The problem? My trusty Emacs LSP setup was giving me a cold shoulder on all this conditional code. No completions, no error checking, no "go to definition" - basically treating it like it doesn't exist. And technically, it's right! By default, rust-analyzer only analyzes code with the default set of features enabled.
Serprog is a serial flasher protocol that allows a userspace program like flashprog to communicate over a serial connection like RS232, USB endpount or a TCP stream to a microcontroller which talks to flash chip to read, write or erase it. Serprog works for all kinds of different flash chips but in this article we'll focus on SPI NOR since those are ubiquitous nowadays.
Picoprog at OSFC: using embassy as a multifunction device
For OSFC 2024, 9elements hosted a coreboot workshop, which involved compiling coreboot and flashing it onto a Raxda x4 N100 board. To flash it and get uart output we needed some hardware. We thought it would be fun to create our own and allow people to take it home. We used an off the shelf Raspberry Pi Pico and designed a breakout board which makes it easy to attach a SPI clip and connect the boards UART pins.
If you've ever developed embedded firmware, you know the pain: cryptic flashing tools, primitive debugging methods, and a workflow that feels decades behind modern software development. You write code, compile it, flash it to hardware through a complex toolchain, and then… hope it works. When it doesn't, you're stuck with blinking LEDs and printf debugging over UART. probe-rs fundamentally changes this experience by bringing the productive, familiar workflow of userspace development to the embedded world.
Undefined behavior (UB) is one of the most dangerous issues in systems programming, leading to crashes, security vulnerabilities, and unpredictable results. Rust prevents UB by panicking - forcefully stopping the program - when potentially unsafe operations are detected.
Panics are Rust's way of handling unrecoverable errors. Unlike Result which handles expected errors, panics occur when:
Array bounds are exceeded
Integer overflow in debug mode
Explicit calls to panic!() macro
Failed assertions
Calling unwrap() on None or Err values
Attempting operations that may cause undefined behavior
As software developers, we spend our days creating objects, defining relationships, and modeling reality in code. But have you ever stopped to think about the philosophical implications of what we're doing? Enter ontology – a branch of philosophy that deals with the nature of being, existence, and reality.
Understanding Ontology
In philosophy, ontology asks fundamental questions like "What exists?" and "What are the relationships between different things that exist?" These might sound abstract, but as programmers, we deal with similar questions every day. When we create a class hierarchy or design a database schema, we're actually doing ontological work – we're defining what "exists" in our software universe and how these things relate to each other.
I recently switched from Sway to Hyprland. The primary reason for this change was my interest in content creation. Hyprland can record single windows, whereas Sway can only record the entire screen or part of it.
So far, the transition has been smooth until I encountered the following issue after waking it from suspend with the lid closed.
My Use Case
I have a laptop that is mostly connected to a docking station driving an external display. The lid remains closed, and I don't want the laptop display enabled. When no display is connected, I want the device to suspend. This is managed by logind.
Ellama is a tool for interacting with large language models from Emacs. It allows you to ask questions and receive responses from the LLMs. Ellama can perform various tasks such as translation, code review, summarization, enhancing grammar/spelling or wording and more through the Emacs interface. Ellama natively supports streaming output, making it effortless to use with your preferred text editor.
This morning, I needed a timer to spend only 10 minutes reading a book. I searched for CLI tools but couldn't find anything immediately that suited my needs due to laziness. So, I decided to write one myself with the help of AI.
Using Aider coupled with Claude Sonnet 3.5, I was able to get something working on the first try. Afterward, I added a few features:
This whitepaper makes the case that UEFI firmware and more specifically EDK2 based solutions, be it open or the more ubiquitous closed ones, hurt business by driving up cost and delaying time to market, while at the same time are the root cause of more and more security problems. This whitepaper will contrast this UEFI status quo with other existing solutions like LinuxBoot in combination with coreboot, which fully embrace open source development, are scoring better on all those metrics. This is both due to design decisions and the related development models.
Rust is a programming language with emphasis on performance, type safety and concurrency.
It enforces memory safety at compile time. Unlike the C standard which is a 700+ page document,
with a LOT of documented undefined behavior, rust has no undefined behavior unless the unsafe
keyword is used. Zero cost abstractions make rust binaries very efficient in both size and
execution, in places where C will have a hard time to be optimized (e.g. function pointers in structs).