Porting the guff plot device to Rust
For this stream, I wanted to implement something in Rust where we didn't also need to learn a new technical topic, and instead could focus just on the "writing Rust" part. After digging around for a bit, I came across https://github.com/silentbicycle/guff in my old bookmarks — it's a command-line tool that takes a stream of data on STDIN, and plots it to your terminal using good-ol' ASCII (no ncurses interface or TUI or anything, just prints). guff was last updated 10 years ago, and is written in plain C, so felt like a good candidate for a refresh that we could also add functionality to.
You can find `dings`, the resulting port, at https://github.com/jonhoo/dings/, and the commit at the end of the stream at https://github.com/jonhoo/dings/commit/e7e7a8f4487cc620719a0672c92b3fe8dd232212.
You can join my Discord at https://discord.jonhoo.eu/
0:00:00 Exploring guff
0:59:44 Gathering data
2:16:38 Scaling to terminal
2:58:52 Adding axes
3:29:23 f64 rounding
3:46:07 Counting mode
4:08:28 What are CDFs?
4:26:47 Time to organize the code
4:58:57 Adding the CDF transform
5:36:17 Adding log(x) and log(y)
Live version with chat:
Other Videos By Jon Gjengset
2025-08-01 | Vibe coding complex changes in Rust |
2025-05-30 | Explaining assembly by playing SHENZHEN I/O |
2025-03-10 | Porting the guff plot device to Rust |
2025-01-02 | January 2025 Q&A |
2024-09-21 | Decrusting the quickcheck crate |
2024-08-25 | Implementing a Lox interpreter in Rust |
2024-07-14 | Open Source Maintenance, 2024-07-14 |
2024-05-18 | What's New in Rust 1.72-1.78 Rustacean Station marathon |
2024-05-04 | Q&A May 2024 |
2024-04-05 | Decrusting the tokio crate |
2024-03-09 | Implementing (parts of) git from scratch in Rust |
2024-02-09 | Decrusting the tracing crate |
2024-02-06 | Jon Gjengset Live Stream |
2024-01-14 | Hardware and software [2024 edition] |
2023-12-16 | Q&A December 2023 |
2023-12-15 | Q&A Session |
2023-11-17 | Making the (partial) Rust BitTorrent client more reasonable |
2023-10-19 | Implementing (part of) a BitTorrent client in Rust |
2023-08-26 | Open Source Maintenance, 2023-08-25 |
2023-08-13 | Open Source Maintenance, 2023-08-13 |
2023-08-06 | Open Source Maintenance, 2023-08-06 |