I spent 2 months learning about quantization and am extremely proud of the post I've written about it. I think these are some of the nicest visuals I've ever made, and I love how this compression technique invented in 1898 is being used on the bleeding edge in 2026.
ngrok.com/blog/quantiz...
Posts by Rodrigo Girão Serrão 🐍🚀
The post _was_ great, thanks for sharing. And the interactive visuals work really well. My favourite detail? The mechanical feel you get when you slide the slider for the integers and the corresponding base-2 bits flip.
Congratulations for all of the hard work you've been doing!
I forgot a semicolon and my site was down for ~4 hours without me even knowing.
The joys of programming. 😂
The REPL is a good one! 👍
This was ahead of Magritte's time :D
Thanks for educating me!
What is a “Magritte moment”?
What's your favourite vanilla Python feature?
(Abuses of the Python syntax are valid answers.)
For me it played to quickly on mobile so sometimes I even struggled understanding whose turn it was :) I think that’s the main benefit of having something persistent. Perhaps move notation at the bottom? 🤷
I like the rationale for the site!
Astral just entered into an agreement with OpenAI to integrate their Codex team!
openai.com/index/openai...
Thanks! I do my best 🙏
Diagram using recursive structural pattern matching and unpacking inside comprehensions (new in Python 3.15) to write a function that flattens deeply nested lists of objects.
Too many arrows?
That's a level around that diagram.
Decorator with arguments is actually a decorator factory, so it'll be a function that contains this structure inside it :D
Diagram showing the full decorator anatomy and the 9 parts that make up a general decorator.
Python decorators blueprint: a step by step explanation of the full decorator anatomy.
Steal this for when you're writing your own decorators.
Oh nice, that's better!
At least you managed to make it work! For a while, I couldn't do anything at all :P
Not sure I follow what you mean by “on normally spaced strings less replacing to do”.
I like " {2,}" because it's easy to miss the double space in the original " +"... I'll replace it, thanks!
I wrote 0 blog posts in February.
Today I already wrote 2.
Go figure. 🤷
Came up with 4 random ways to do this.
2, I recommend you use them (although 1 doesn't work!)
The other 2 are really cool — they use fixed points and `itertools.groupby` — but they'll be overkill 99.9% of times.
I meant “This is, shortEN runs of 2+ [...]”
It was a random thought, indeed.
For a bit more context, see the second approach and how it doesn't work 100%: mathspp.com/blog/remove-...
Nope because if you have newlines, for example, those will disappear!
How do you collapse runs of adjacent spaces in Python?
That is, shorter runs of 2+ consecutive spaces so there's only 1 space there?
I can't come up with a simple/straightforward way to do it with `str.join` and I'm surprised...
What am I missing?
Ok, obrigado!
Pretty impressive! Annoying, but impressive!
And do you have any idea of how much data you spent? In case something similar happens to me 😂
(My internet has been acting out.)
Pode dar um exemplo de cada só para eu não ter de rever a série até perceber? 🙏
Hey all! It's almost time for the next Python Lisbon Meetup! 🐍
On Thursday, pyctrl will be talking about exceptions. We'll cover the origin of exceptions, their usage in OOP, how best to manage them, and more. It's going to be exceptional! 💎
How did it go? 😬
Thanks for sharing! Neither star nor asterisk are usages that shock me. And yeah, sometimes it’s implied by the context, absolutely.