Rafi Hasan
  • Blog
  • Reading
  • Projects
  • Research
  • About

    Writings

    Generics in Rust with Monomorphization

    Aug 25, 2023

    Generics in Rust is not like in any other mainstream programming language except for C++ and uses something called Monomorphization. This approach is fantastic since it is basically zero cost.

    What is "dyn" in Rust and How it Powers Polymorphism

    Aug 15, 2023

    An exploration of the "dyn" keyword in Rust, trait objects, and how they enable polymorphism through dynamic dispatch.

    Zero cost abstraction in Rust

    Jul 6, 2023

    Zero cost abstraction is a fancy term that simply means that adding high-level constructs like a newtype, traits or generics does not contribute to any runtime cost.

    Async/Await in Golang

    Apr 11, 2022

    How to implement async/await in Golang.

    Golang Concurrency And Workerpool: Part 2

    Dec 4, 2020

    Concurrency limiting worker pool. We deep dive into building a robust worker pool.

    Golang Concurrency And Workerpool: Part 1

    Nov 7, 2020

    Concurrency limiting worker pool. We deep dive into building a simple workerpool solution.

    Ruby on Rails pattern: Service Objects

    Mar 5, 2019

    Service objects are a way to encapsulate complex business logic in Ruby on Rails applications.

    Memory Leaks in Node.js: Part 2

    Oct 1, 2018

    Memory leaks in Node.js. In this second part, we will discuss caching and unhandled promises.

    © 2026 Rafi Hasan.

    GitHub