John Hartquist
johnhartquist.com
John Hartquist
@johnhartquist.com
rust // python // machine learning // audio
Pinned
I use Claude Code (Sonnet 4) with the following directives in CLAUDE.md:
- ensure `cargo check` passes after completing every step
- run `cargo test`, `cargo clippy` and `cargo fmt` before committing anything, and explain any test failures (if expected)
latest #rust + audio experiment: real-time audio visualization in the terminal using cpal, ratatui, & realfft crates

youtu.be/XldKv1vuH0g
real-time audio visualization demo built with rust (ratatui + cpal)
YouTube video by John Hartquist
youtu.be
July 1, 2025 at 11:33 PM
In today's #adventofcode solution using #rustlang, I used a "let-else" statement to
- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)

I prefer returning early and using the implicit return for the "happy path". What do you think?
December 4, 2024 at 11:24 PM
Rust is a great language to pair program with an LLM.

The precise type system makes it easy to communicate about code at a functional level, and powerful tooling make it trivial to spot and understand the inevitable errors BEFORE executing anything.

#rustlang
November 20, 2024 at 12:04 AM