• Home
  • Posts
  • Bookshelf
  • Contact
  • 69. Nicer RSS feed

    2022-12-19
    • #rust
    • #webtech

    I revamped this blog’s RSS feed. The downside is that RSS readers will probably show the last few posts again. Sorry about that. On the upside, the new feed contains full post contents and is standards compliant. This post lists the changes I made, mostly to the axum webserver setup.

    ⤷ Read more
  • 67. Designing an ergonomic currency type in Rust

    2022-12-05
    • #rust

    Let’s design a Currency type in Rust. We’ll iterate through several versions, starting with the ubiquitous str, and finishing with a stack-allocated type built with Rust’s new const generics.

    ⤷ Read more
  • 66. Writing a polling document generator in Rust

    2022-09-17
    • #rust
    • #webtech

    Let’s write an app that watches some files for changes, runs them through Liquid templates (rs), and then compiles the output with LaTeX. It’ll take about 200 lines of code. This scheme is very useful when you need to produce some kind of document from data available to a Rust program, and when you expect to be iterating on the templates a lot.

    ⤷ Read more
  • 63. A NixOS flake for Rust, egui, and OpenGL

    2022-05-21
    • #nixos
    • #rust

    I wrote a little OpenGL app in Rust and the hardest part was getting it to run on NixOS. This post describes the flake that works, and lists the errors that happen if the configuration isn’t right.

    ⤷ Read more
  • 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