Mehdi Akiki

Posts tagged "python"

  • Published on

    Investigation · Part 9 of 10 · Types under the hood

    Runtime Type Tags: What Dynamic Languages Keep That Static Ones Throw Away

    A Python integer with the value 1 takes 28 bytes, and a million of them cost 36 MB where Rust would use 4. I expected mixed arrays to be slow in V8 and they were not. The cost that did show up was object shape, and it arrives as a cliff at the fifth shape.
  • Published on
    The right way to learn Kafka is to build a tiny log broker — not a fake queue with ack/delete. One topic, one log file, one offset per consumer group. That is the whole model.
  • Published on
    Exploring Python's dataclasses module - a decorator that automatically generates boilerplate code for classes that primarily store data, making them perfect for clean, readable data structures.
  • Published on
    Exploring Python 3.10's powerful structural pattern matching feature that brings functional programming patterns to Python with elegant syntax and powerful matching capabilities.
  • Published on
    Exploring Python's type hinting system - from basic annotations to advanced generic types, protocols, and runtime type checking that improves code quality and developer experience.