favicon here hometagsblogmicrobio cvtech cvgpg keys

I fell in love with Rust

#programming #rust

uncomfyhalomacro | 2024-04-23 | reading time: ~4min

For quite some time, I am getting more interested in programming languages that have good documentation, a large community and accelerating adoption in various sectors in the industry.

Rust came to mind. I just want to write this because there are some things in Rust that actually make sense to me as a language. I might be guilty that I have been influenced by the hype since the start of COVID-19, but after 3 years or so, learning the language, talking with people, reading again the documentation - things have started to make sense and that's why I fell in love with Rust. Here are the whys.

Shared Behaviours§

Although, these concepts are most likely OOP, I never really appreciated OOP in Python. Maybe because of lack of experience? Or interest in the language? Or maybe I just hate Python. I never said I won't be biased in this post so...

Anyway, a shared behaviour in Rust is one of the best things that makes sense to me. These are called traits, and Rust actually stole this from Java's interfaces.

A trait will look like something like this

trait Fruit {
    fn has_seed() -> bool;
}

struct Apple { species: String }
struct Banana { species: String }

impl Fruit for Apple {
    fn has_seed() -> bool {
        true
    }
}

impl Fruit for Banana {
    fn has_seed() -> bool {
        false
    }
}

And it's a very nice addition to Rust. Whoever thought of this is a genius!

Generics§

Rust's generics are one of my favourites. It allows more flexibility and fine-grained control. For example, there are many environments of how a fruit is grown, be it LaboratoryGrown, or Natural.

trait Fruit<Kind> {
    fn has_seed(kind: Kind) -> bool;
}

impl Apple<LaboratoryGrown> {
    fn has_seed(kind: LaboratoryGrown) -> bool {
        false
    }
}

impl Apple<Natural> {
    fn has_seed(kind: Natural) -> bool {
        true
    }
}

Some concepts that took me months to understand§

Who owns who?§

At first, when I was starting with Rust, I didn't understand the ownership system because I don't have experience writing in C or any language that involves pointers and references heavily. However, I self-studied just enough to understand these concepts and it's starting to makes sense! Well to me...

Although, I don't have years of experience writing in C, Rust babysits me teaching me about references and pointers while also protecting me from mistakes like using the same pointer to manipulate data, or doing stupid shit like dropping data from the heap too early.

I am resuming to learn C a few days after this to understand footguns Rust wants me to avoid.

Abstractions pamper me§

Rust just hides away some of the abstraction from you but also shows you that these elisions (thanks firstyear, new word) are not actually hidden. They're just common patterns most would take so elided so that they can be written a little less verbose, and a little less yuck.

Rust ecosystem§

Rust has like many popular crates to choose from. The community loves to curate and makes it way easier to getting started with Rust even for someone like me who still considers himself not a good programmer. I still do think that I am not good but I love to learn cool stuff.

What actually made me fall in love with Rust§

The reason is because of Rust's syntax. I know, someone may already have expected, "oh you love Rust because it's blazingly fast!!!", but the reality is, what got me hooked into Rust the first time was actually its verbose syntax. The first time I tried reading it, its verbosity made me feel comfortable like it's not hiding anything from me. Whereas, in Python, I always feel uncomfortable... I am not sure why, even though I have some experience with it during the Hyperskill beta test by JetBrains of which I completed at least 90% of the beta test.

But yeah, Rust's choice of symbols for its syntax and the feeling of "I am not hiding anything, I can tell you if you ask the right questions" is the reason I fell in love with the language.

BTW, I also heard you like Julia§

Nah... can't hate what I haven't written for a while. I guess packaging Julia is a pain in the ass, that much is true.

Articles from blogs I follow around the net

reqwest v0.13 - rustls by default

To end out the year, here comes a new major release of reqwest, the opinionated higher-level HTTP client for Rust. We don’t really need major breaking versions to keep providing value. Improvements keep coming all the time. But we did need one to make one…

via seanmonstarDecember 30, 2025

I hope generative AI does away with SEO

Have you ever searched for something on Google and found the first one, two, or three blog posts to be utter nonsense? That's because these blog posts have been optimized not for human consumption, but rather to entertain the search engine ranking algorith…

via pcloadletterDecember 30, 2025

Merry Christmas, Ya Filthy Animals (2025)

It’s my last day of writing for the year, so I’m going to try keep this one quick – it was knocked out over three hours, so I hope you can forgive me if it’s a bit clumsier than my usual writing. For some strange reason, one of the few clear memories I hav…

via LudicityDecember 27, 2025

ColdFusion++ Christmas Campaign: Catching a Coordinated Callback Calamity

UPDATE: Further analysis revealed the ColdFusion campaign represents a small fraction of a much larger operation. The two primary IPs (134.122.136.119, 134.122.136.96) generated over 2.5 million requests targeting 767 distinct CVEs across 47+ technology st…

via GreyNoise LabsDecember 26, 2025

Are people migrating away from GitHub?

I noticed some people migrating away from GitHub recently. I was curious to understand the rationale. Is it a blip or is it a sign of prolonged exodus?

via Rob O'Leary | BlogDecember 22, 2025

Status update, December 2025

Hi all! This month the new KMS plane color pipeline API has finally been merged! It took multiple years and continued work and review by engineers from multiple organizations, but at last we managed to push it over the finish line. This new API exposes to …

via emersionDecember 21, 2025

The Revolution Will Not Make the Hacker News Front Page

(with apologies to Gil Scott-Heron) If you get all of your important technology news from “content aggregators” like Hacker News, Lobste.rs, and most subreddits, you might be totally unaware of the important but boring infrastructure work happening largely…

via Dhole MomentsDecember 18, 2025

Yep, Passkeys Still Have Problems

It's now late into 2025, and just over a year since I wrote my last post on Passkeys. The prevailing dialogue that I see from thought leaders is "addressing common misconceptions" around Passkeys, the implication being that "you just don't understand it co…

via Firstyear's blog-a-logDecember 17, 2025

context—Odin's Most Misunderstood Feature

Even with the documentation on the topic, many people completely misunderstand what the context system is for, and what problem it actually solves. For those not familiar with Odin, in each scope, there is an implicit value named context. This context vari…

via Articles on gingerBillDecember 15, 2025

Announcing ic-dbms 0.1.0

What if I told you that this code: use candid::CandidType; use ic_dbms_api::prelude::{Text, Uint32}; use ic_dbms_canister::prelude::{DbmsCanister, Table}; use serde::Deserialize; #[derive(Debug, Table, CandidType, Deserialize, Clone, PartialEq, Eq…

via Christian Visintin BlogDecember 13, 2025

Theme selector

Two weeks ago I added dark mode to this website. It was late one night and I was revisiting an article and my eyes were tired, so that was that. It was based solely on system dark mode settings, and I started using some more nice, modern CSS features like …

via macwright.comDecember 09, 2025

OpenAI employees… are you okay?

You might have seen an article making the rounds this week, about a young man who ended his life after ChatGPT encouraged him to do so. The chat logs are really upsetting. Someone two degrees removed from me took their life a few weeks ago. A close friend …

via Drew DeVault's blogNovember 08, 2025

Comfort of Wabi Sabi

Comfort of accepting used things

via Ishan WritesOctober 25, 2025

i'm bored, so here's a useless 0day

i either want my US$2.5k professional-grade device backdoored or not at all

via maia blogAugust 20, 2025

Testing multiple versions of Python in parallel

Daniel Roy Greenfeld wrote about how to test your code for multiple versions of Python using `uv`. I follow up with a small improvement to the Makefile.

via Technically PersonalJuly 21, 2025

LLDB's TypeSystems Part 2: PDB

In my previous post, I described implementing PDB parsing as a can of worms. That might have been a bit of an understatement. PDB has been one "oh, it's gonna be twice as much work as I thought" after another. Implementing it has revealed many of the same …

via Cracking the ShellJuly 07, 2025

#Rx Writing Challenge 2025

This is a short reflection on my experience of the recent writing challenge I took part in. Over the past two weeks, I have participated in the #RxWritingChallenge 1—a daily, 30-minute writing group starting at 9 AM every morning. Surrounded by fellow doct…

via Ul-lingaApril 05, 2025

My coffee workflow

My coffee workflow by Clement Delafargue on April 1, 2025 Tagged as: coffee, espresso, flair58, v60. It is my first April cools’ and I guess I could start by talking about coffee. If you’ve seen me in person, it won’t be a surprise, I guess. This po…

via Clément Delafargue - RSS feedApril 01, 2025

Generated by openring-rs

favicon here hometagsblogmicrobio cvtech cvgpg keys