rust

Total Madness #0: Locks

Total Madness #0: Locks

This is the first post in a series about my urges to figure out the dark magics of the computer world. You see, I recently have had some free time on my hands, and I decided to spend it to scratch some itches I've had for as long as I can code (writing an OS in Rust, for instance). As I dove deeper into the dark magics, I discovered the truth about things I never really liked to assume are true (but did it anyways, for the sake of sanity, at the time). I don't care anymore about sanity. Let's…
Read More
Strong Performance with EC2, Lambda, and the Momento SDK for Rust

Strong Performance with EC2, Lambda, and the Momento SDK for Rust

I wrote recently about Mind Boggling Speed with Caching with Momento and Rust and wanted to continue in that theme as I explore the Momento SDK for Rust. Caching is a technique that builders reach for when looking to accomplish either improved performance or reduce the burden on resource-dependent parts of an application. It might also be a choice when looking to save costs if an operation is charged per read such as with DynamoDB. In any of those scenarios, caching must be fast. But caching must not also introduce a high amount of complexity. This is where I love…
Read More
Tree data structures in Rust with tree-ds (#1: Getting Started)

Tree data structures in Rust with tree-ds (#1: Getting Started)

Trees are a fundamental data structure used across various applications. In Rust, building your own tree from scratch can be a great learning experience, but for production use, consider leveraging existing crates. In this three part series, we'll explore the tree-ds crate, a powerful tool for working with trees in your Rust projects. Introducing tree-ds The tree-ds crate, provides a versatile tree implementation in Rust. It offers a generic Tree struct that can hold any data type as its node value. The crate also supports various tree operations, making it a comprehensive solution for your tree-based needs. Getting Started To…
Read More
Enhancing Rust Enums in the State Pattern

Enhancing Rust Enums in the State Pattern

In my previous article, I discussed how Rust enums should be strongly considered when the solution benefits from a state machine. The strongest argument for this is the fact that the Rust compiler will inform you when a state variant isn't covered in a match expression. This was stemmed from a state pattern example provided by the official Rust book. The sample scenario they used was an article that was required to go through the status of Draft, PendingReview, and Approved. Using a similar strategy as I explained in my original article, I came up with the following code: post.rs…
Read More
Go vs Rust: Choosing the Right Language for Your Development Journey in 2024

Go vs Rust: Choosing the Right Language for Your Development Journey in 2024

When choosing a programming language for your next project, it’s essential to consider the strengths and features of the available options. Rust and Go are two modern languages that have gained significant traction for their performance, concurrency, and ease of use. Here’s a comparison of Rust vs Go, highlighting their key features, advantages, and ideal use cases. Rust: Memory Safety: Rust is designed with a strong emphasis on memory safety without the need for a garbage collector. Its ownership system, which is enforced at compile time, helps prevent data races and null pointer dereferences. Performance: Rust offers performance comparable to…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.