• 62. Writing an FX viewer in 200 lines of Rust

    2022-05-15
    • #rust

    Let’s write a little exchange rate viewer in Rust. It will have a GUI, fetch rates from the Internet, support changing the currencies without having to recompile, and all this in about 200 lines of code.

    ⤷ Read more
  • 59. Writing a lazy Rust iterator over file blocks

    2022-04-04
    • #rust

    While writing the nix-nar crate, I had to bend Rust’s Iterator API to do things it wasn’t designed for. The resulting code looks strange, so let’s walk through increasingly complex implementations to see why it has to be that way.

    ⤷ Read more
  • 48. Fun with ureq, webpki, and IP addresses

    2021-07-27
    • #rust

    If we try to open an HTTPS connection with ureq, and the host part of the URL is an IP address, then we get an InvalidDNSNameError. Let’s figure out what’s going on and how to work around it.

    ⤷ Read more
  • 42. challenge-prompt

    2018-10-26
    • #rust

    It’s occasionally useful to introduce pause points into procedures. The idea is that, when a human operator is about to do something scary, we want them to stop and think for a second and not just do things by rote. Enter challenge-prompt, a small program and Rust library which challenges the user to type something.

    ⤷ Read more
▲
  • © 2022 Alexandru Scvorţov (λyz.mailyscvalexznet)@.
    • CC BY-SA |
    • All code GPLv3
    • Home |
    • RSS Feed