Tag: rust
-
Implementing the Raft Consensus Algorithm with David Beazley
I survived David Beazley’s weeklong course on the Raft consensus algorithm that powers technologies like Kubernetes, MongoDB, and Neo4j. Image from https://raft.github.io/ The Raft Consensus Algorithm is a way for a gaggle of computers to agree on a sequence of events, or a “log” of events. Raft is useful for things like databases – once…
-
A random assortment of Rust notes
I thought I’d jot down some notes about using Rust that wouldn’t have made it as their own blog posts: You can’t use anonymous functions for control flow In Ruby, you can return from almost anywhere in a function: Unfortunately, it also returns nonsense if the inputs break the invariant that an even number exists…
-
One of my favorite Rust features (doc comments!)
I realized that one of my favorite Rust features doesn’t have a blog post highlighting it [0], so I thought I’d talk a bit about documentation comments and doc tests in Rust. I’ll give you a quick example. Let’s say you have some code: There’s a cargo command to generate documentation from that code: Which…
-
Professional Rustacean, 3 months in
Hi! đź‘‹ I did end up landing that Rust job I was looking for, and I’ve been wrestling with the Rust programming language now for a good couple of months – not quite 3, if I’m to be honest, but who’s counting. To be honest, I’m a little bit ambivalent. I think it’s a great…
-
Contributing to the Vector Remap Language
I’ve been looking for a job doing Rust development and one of the places I applied to was Vector, a DataDog acquisition in the observability space. Observability is one of those terms I had yet to encounter seriously before starting this search, so for the uninitiated: …observability is the ability to measure a system’s current…
-
Oxidization: Nested hashes
This might be an idiosyncrasy of mine, but I tend to use hashes a lot in Ruby. For instance, recently I was working on a code challenge involving ordering food. There were different categories of courses (breakfast, lunch, and dinner) and different categories of foods (main dish, side dish, etc.), and you need both in…
-
Rust advocacy at a medium-sized startup
At Hologram, I loved getting to sign into work Slack and share knowledge with fellow software engineers of all experience levels. There were about 40 engineers in a company closing in on 200 employees. Meanwhile, the biggest change in my career as a software engineer recently has been learning Rust, which I’ve been calling a…
-
Writing a Rust gem from scratch
This is a followup to the last post. Instead of using the template rust_ruby_example gem, we’ll make one from scratch. Make sure to go back over the “Using a rubygems fork” section because we’ll be using it heavily during this post, as well!
-
Sneak preview: Writing Ruby gem native extensions in Rust
In December 2021, Ian Ker-Seymer (@ianks) submitted a pull request to add a CargoBuilder class for handling Rust code in gems, enabling native extensions in Rust! I was so excited, I had to try it out, even though it hadn’t been merged yet. A lot of maintainers are showing interest and pitching in, so I…
-
Crate of the Week second chance list
TLDR – the three most upvoted crates that were never recognized as Crate of the Week in This Week in Rust are glutin, rust-cuda, and redshirt. The Crate of the Week is a Rust (programming language, not game) segment in the This Week in Rust newsletter that highlights a single Rust library in a given…