Quantcast
Channel: Random Hacks
Browsing latest articles
Browse All 20 View Live

Rust lifetimes: Getting away with things that would be reckless in C++

Over the years, I've learned to be cautious with C++ pointers. In particular, I'm always very careful about who owns a given pointer, and who's in charge of calling delete on it. But my caution often...

View Article



Unscientific column store benchmarking in Rust

I've been fooling around with some natural language data from OPUS, the “open parallel corpus.” This contains many gigabytes of movie subtitles, UN documents and other text, much of it tagged by...

View Article

Proving sorted lists correct using the Coq proof assistant

About 15 years ago, I was hanging out at the MIT AI Lab, and there was an ongoing seminar on the Coq proof assistant. The idea was that you wouldn't have to guess whether your programs were correct;...

View Article

Bare Metal Rust: Low-level CPU I/O ports

Want to build your own kernel in Rust? See the Bare Metal Rust page for more resources and more posts in this series.Rust is a really fun language: It allows me to work on low-level kernel code, but it...

View Article

Bare Metal Rust 2: Retarget your compiler so interrupts are not evil

Want to build your own kernel in Rust? See the Bare Metal Rust page for more resources and more posts in this series. There's just a few more posts to go until we have keyboard I/O!Hacking on kernels...

View Article


Bare Metal Rust 3: Configure your PIC to handle interrupts correctly

Want to build your own kernel in Rust? See Bare Metal Rust to get started.We're almost ready to write a keyboard driver in Rust! But first, we need to deal with two obstacles: setting up the PIC, and...

View Article

Should Rust channels panic on send if nobody's listening?

Lately, I've been working on several real-world systems using Rust's async and tokio. As you can see on the areweasyncyet.rs site, this requires using nightly Rust and the experimental...

View Article

In nightly Rust, 'await!' may never return (dropping futures)

I've been using the proposed await! and Future features in nightly Rust, and overall, I really like the design. But I did run into one surprise: await! may never return, and this has consequences I...

View Article


Migrating from Heroku (and Linode) to Docker on AWS

I’ve long been a huge fan of Heroku. They’ve made it super easy to deploy and scale web applications without getting bogged down in server administration. Also, their free tier has been very generous,...

View Article


Pair programming with ChatGPT: A simple dice roller

Like many folks, I spent too much of the last couple days playing with the new release of ChatGPT. I’ve been trying discover what it’s good at, and how it breaks. At its best, it’s remarkable—I think...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images