I grew up in both the UK and China. So I'd like to think I have a little understanding of both cultures. China uses both the western gregorian calendar and a version of lunar calendar called 农历. This means I have a Chinese lunar birthday as well as a …
read moreOther articles
Asyncio backpressure - Processing lots of tasks in parallel
There's mixed feedback to Asyncio in the community. Some people passionately hate it whilst others believe "writing async make program go fast". This debate is way too much for me to cover here right now. Though maybe I'll look at it in the future.
For me I use asyncio a …
read moreDocker's MCP toolkit First Look
Short update since First Look at MCP. Docker has released it's MCP toolkit which includes a catalog of MCP servers as well as helpers to connect to the MCP clients.
It is exceeding easy to use it, docker is registered as a single MCP server for your client. And tools …
read moreFirst Look at MCP
Previously I've played with tool calling in Langchain and Python sandboxes. But recently MCP (Model Context Protocol) is front and center. So I tried to create my own github MCP in Python to integrate cursor with the github cli.
What is MCP?
Before we get started, its good to familiarise …
read morePython 3.14: State of free threading
In my posts earlier this year I talked about the parallelism performance on 3.13 free-threaded builds. In particular I looked at solving an advent of code problem. In How free are threads in Python now? I discovered significant performance penalties for using free-threading and a lack of tooling available …
read moret-strings: the good and the ugly
Why you should write your tools in Python Again
You're probably thinking that there are already plenty of tools written in Python.
But I see that most of the popular tools like
read moremypy
andflake8
are built for development environments. In contrast, general purpose cli tools tend to be built in other languages, for example most of the docker …Building a DSL with Python Operators
I've been a little obsessed with operator overloading lately. First using
|=
in sqlalchemy-builder and then using|
and@
in better-functools.I didn't actually know that these qualify as DSLs, specifically what's known as "internal DSLs". Funnily enough, I'm usually not a fan of DSLs. A few reasons come to mind:
- DSLs …
better-functools: Python functional fun
I recently put some effort into creating better-functools. It's a package that adds some tooling for functional programming in Python. And allows us to write some unique looking code in a manner similar to functional languages:
Why?
At a glance this doesn't look very "Pythonic". More complex …
read more