Skip to main content

2026-05-04

Discoveries

Rust Things

Cheap trace in no_std:

struct ErrorInfo {
message: &'static str,
file: &'static str,
line: u32,
}

macro_rules! error_info {
($msg:expr) => {
ErrorInfo {
message: $msg,
file: file!(), // built-in macro, returns &'static str
line: line!(), // built-in macro, returns u32
}
};
}

fn something() -> Result<(), ErrorInfo> {
Err(error_info!("something went wrong"))
}

2026-05-01

Discoveries

In Repo Collaboration:

  • GitSocial - Social collaboration in the git repo.
  • Radicle - Radicle is an open source, peer-to-peer code collaboration stack built on Git.
  • git-bug - Issue management tool that embeds issues, comments, and more as objects in a git repository (not files!)

Tools:

  • WinPodX - Run Windows Apps in Linux Windows via containers with Windows OS support.
  • Honker - Durable queues, streams, pub/sub, and cron scheduler in a SQLite file
    • Works by constantly polling data_version in database. Probably worse than inotify.

Rust Things

2026-04-29

Discoveries

Knowledge:

Articles:

Airpods:

Tools:

Rust Things

2026-04-28

Discoveries

Rust Things

Quick Tip - Force types in error output:

let x = some_complex_expression();
let _: () = x;
  • Dev Guide Reference
  • Rust Playground - Includes ASM, LLVM IR, MIR, HIR as outputs.
  • Overview of Compilation Process
    1. rustc Command Line Parsing
    2. Lexical Analysis (i.e. tokenization)
    3. Parsing into AST: Macro Expansion, Name Resolution, Entry Points, Feature Gate Checking, Early Linting
    4. High Level Intermediate Representation (HIR)
    5. Type Inference - process of automatic detection of the type of an expression
    6. Mid-Level Intermediate Representation (MIR) - simplified Rust IR used for borrow checker.
    • Basic Blocks: statements, terminators, control-flow graphs
    • Locals: stack vars, arguments, local vars, temps.
    • Places: memory address expressions
    • Rvalues: expressions producing a value
    • Operands
    1. Borrow Checker - Operates on MIR
    • That all variables are initialized before they are used.
    • That you can’t move the same value twice.
    • That you can’t move a value while it is borrowed.
    • That you can’t access a place while it is mutably borrowed (except through the reference).
    • That you can’t mutate a place while it is immutably borrowed.
    1. MIR Optimizations - Pre-LLVM optimizations.
    2. Code Generation - LLVM process to generate binary.

There is a large list of "undocumented" flags you can use to drive rustc (nightly) outputs by running:

rustc +nightly -Z help

Run the following to see the rustc commands that cargo is running to build each crate.

cargo +nightly build -v

For me, one of them looked like:

/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name reftests --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=116 --crate-type bin --emit=dep-info,link -C panic=abort -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=224fb19d0a7d9e0e -C extra-filename=-06c49fae36f5f61c --out-dir /opt/labs/rust/refs/target/debug/deps -C incremental=/opt/labs/rust/refs/target/debug/incremental -L dependency=/opt/labs/rust/refs/target/debug/deps --extern libc=/opt/labs/rust/refs/target/debug/deps/liblibc-48f66f96bb8290dc.rlib 

If you add a -Zunpretty= flag to the command, you can get different phases of the your rust code compilation. As seen from -Z help:

  -Z unpretty=val -- present the input source, unstable (and less-pretty) variants;
`normal`, `identified`,
`expanded`, `expanded,identified`,
`expanded,hygiene` (with internal representations),
`ast-tree` (raw AST before expansion),
`ast-tree,expanded` (raw AST after expansion),
`hir` (the HIR), `hir,identified`,
`hir,typed` (HIR with types for each node),
`hir-tree` (dump the raw HIR),
`thir-tree`, `thir-flat`,
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)

Changing the generated outputs from a stable rustc is accomplished with the --emit argument.

Formats:

  • --emit=type=- - emissions can be sent to STDOUT
  • --emit=type=/path/to/file - emissions can specify a dump file
  • --emit=type1=arg,type=arg - emissions types can be comma separated

Options:

--emit <TYPE>[=<FILE>]
Comma separated list of types of output for the
compiler to emit.
Each TYPE has the default FILE name:
* asm - CRATE_NAME.s
* llvm-bc - CRATE_NAME.bc
* dep-info - CRATE_NAME.d
* link - (platform and crate-type dependent)
* llvm-ir - CRATE_NAME.ll
* metadata - libCRATE_NAME.rmeta
* mir - CRATE_NAME.mir
* obj - CRATE_NAME.o
* thin-link-bitcode - CRATE_NAME.indexing.o

Trait Resolution:

RUSTC_LOG=rustc_trait_selection=info cargo build
RUSTC_LOG=rustc_trait_selection=debug cargo build

2026-04-27

Discoveries

Tools:

  • Wireguard (For Windows) v1.0 - This is a recent thing.
  • TUI SQLite Viewer
    • Looks great and feels responsive.
    • Has no "schema only" viewer. Always loads content.
    • Has no horizontal slide bar, but using arrow keys work.
    • Has no way to run SQL commands or LIMIT the results returned.
      • Maybe the work around is to create Views? I'm not doing that for a SQL browser.
  • Online Photo Editor - Photoshop like stuff in browser.

Dev:

  • (Small) Planet Walking In Godot - Gist: Center point of gravity. Use Areas for gravity effect (allowing jumping between fields). Re-adjust player Up Normal in physics process.

Articles:

Resources:

Rust Things

I enjoy minimal binaries. Rust promises me a delightful development experience once I graduate to "rust developer". As a old embedded C-developer, I've only decided Rust is worth looking at because I can reduce its existance to a single object file (*.o) to be linked into whatever scheme my heart desires. At the moment, I'm attempting to thread the needle between several domains including C, C++, and Python, to find my happy place in Rust.

2026-04-26

Discoveries

  • rr - record and replay process execution

    • rd - rr in rust (requires Intel architecture, i.e. not AMD)
  • Mastering Rust Debugging

  • rust-lldb loads rust plugin(s) for pretty printing rust data in debug sessions.

    • type synthetic - rewrites children on a value
    • type summary - controls display next to variable name
  • VSCodium Rust Extensions

    • Dependi - Smart cargo management in IDE
    • rust-analyzer
    • codelldb - LLDB support
    • Even Better TOML - Because Cargo.toml
    • slint? - GUI design support
    • Code Runner - why?
  • lldb crate

  • rust debug support notes

  • Kaitai Struct - Parser Generator web-ide gallery

Learning To Code

  • Use an interpretive language to learn basic source code constructs. For example: Python, Javscript, Java.
  • Learn basic CLI commands and CLI automation by learning and using shell scripting with /bin/sh and pwsh.
  • Learn low level engineering, like system calls, memory management, and the anatomy of ELF/PE files and how the compiler builds them from source code by learning and using C, make, autotools, gcc, clang, ld.
  • Learn how to enhance low level C constructs and build object oriented abstractions by learning and using C++14, cmake.
  • Only once you have a concept of interpretive language, shell scripting, C, C-ABI toolchains, and modern C++ should you consider other tools like Rust.

2026-04-24

Knowledge

Seems worth while:

Notes:

  • Go sucks at memory mapped systems
  • Rust sucks at bit fields

Lists:

Other junk while scrolling:

AI (And Other News)

Tools

From single references:

From reddit/HN links:

Material purchase:

Extension:

Misc Videos

2026-04-17

  • https://appimage.github.io/apps/

  • sudo apt modernize-sources - Convert apt .list files to .sources files.

  • sudo lvcreate -L 10G -s -n root-pre26 /dev/vg0/root - Consider using LVM snapshots before weird operations more.

  • KDE Neon is a bleeding edge KDE distribution based on Ubuntu LTS.

Upgrading From Ubuntu 25.10 to Ubuntu 26.04

sudo apt update
sudo apt full-upgrade
sudo reboot

# Note: `-d` is because we're installed before release.
pkexec do-release-upgrade -d -f DistUpgradeViewKDE
# OR: sudo do-release-upgrade -d

lsb_release -a

Issues

  • old grub-efi-amd64-signed package postinst maintainer script subprocess failed with exit status 32

2026-04-12

Idea

  • Instead of a "why everything is the worst" site. Create an issue tracker for products and services that aren't listening. In contrast to a subjective review site, the entries are written in a way that are fixable/doable, and yet broken.

Bugs

  • Unsure if its a KDE Plasma 6 bug or a KZones bug, but when I reboot my laptop with the lid shut and an external monitor connected, only half of the KZones API shows up. Its as if it thinks the resolution is (roughly) half of what it actually is.