Introduction to panics in rust 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!
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.
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.
This post will review 2 llm options in emacs how I set them up.
Ellama Your browser does not support the video tag. From ellama
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.
Aider + Claude Sonnet 3.5 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.
Rust in coreboot? 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.
This blog enty first appeared on the 9esec blog.
A new toy to play with OpenBMC I wanted to play around with OpenBMC on a physical board and this article led me to the ASRock E3C246D4I. It's a not overly expensive Intel Coffee Lake board featuring an Aspeed AST2500 BMC. So the first thing I did was to compile OpenBMC. My computer was in for a quite a chore there.
This blog enty first appeared on the 9esec blog.
FSP-T in open source projects X86 CPUs boot up in a very bare state. They execute the first instruction at the top of memory mapped flash in 16 bit real mode. DRAM is not avaible (AMD Zen CPUs are the exception) and the CPU typically has no memory addressable SRAM, a feature which is common on ARM SOCs. This makes running C code quite hard because you are required to have a stack.
This blog enty first appeared on the 9esec blog.
I started working for 9elements in October 2020 and my first assignment was to get Intel CBnT working on the OCP Deltalake using coreboot firmware. Intel Converged Bootguard and TXT is a hardware assisted method to set up a root of trust. In this blog post I will discuss some of the changes needed in coreboot to get this working. Setting CBnT up properly was definitely a challenge, but the work did not stop there.