Skip to content

Instantly share code, notes, and snippets.

View andrewjstone's full-sized avatar

Andrew J. Stone andrewjstone

  • Oxide Computer Company
View GitHub Profile
@lzrd
lzrd / priorities.sh
Created September 29, 2022 20:21
Create priority graphs from hubris app.toml files
#!/bin/bash
# This dot files would be better generated in xtask
# where the app.toml files are already parsed
# and the necessary data structures are already
# available.
# To generate all graphs (skipping Cargo.toml files):
# for app in app/*/[a-z]*.toml; do bash priorities $app; done

Looking into the Future

futures-rs is the library which will hopefully become a shared foundation for everything async in Rust. However it's already become renowned for having a steep learning curve, even for experienced Rustaceans.

I think one of the best ways to get comfortable with using a library is to look at how it works internally: often API design can seem bizarre or impenetrable and it's only when you put yourself in the shoes of the library author that you can really understand why it was designed that way.

In this post I'll try to put down on "paper" my understanding of how futures work and I'll aim to do it in a visual way. I'm going to assume you're already somewhat familiar with Rust and why futures are a useful tool to have at one's disposal.

For most of this post I'll be talking about how things work today (as of September 2017). At the end I'll touch on what's being proposed next and also make a case for some of the changes I'd like to see.

If you're interested in learning more ab

I've been reading a bit about concatenative languages recently, and figured I'd compose a short reading list for others interested.

I won't explain what a concatenative language is, but I do want to quickly say a couple of the reasons I find them interesting.

Refactoring

I already like to write really tiny functions, and concatenative languages make it really easy to factor a function into a smaller one. Here's an example, in a made up concatenative language: