Sign in

Jamie Chang

@changs.co.uk
24 followers 111 following 23 posts

blog.changs.co.uk

PostsRepliesMedia
Reposted by Jamie Chang
Real Python @realpython.com · 19/05/2026
📰🐍 Get the best Python links of the week: PyCoder’s Weekly Issue #735: Agentic Architecture, Python is Weird, 3.15, and More (2026-05-19) pycoders.com/issues/735
pycoders.com
PyCoder’s Weekly | Issue #735
Agentic Architecture, Python is Weird, 3.15, and More
032
Reposted by Jamie Chang
Real Python @realpython.com · 10/03/2026
📰🐍 Get the best Python links of the week: PyCoder’s Weekly Issue #725: Generators, __init__.py, Pointblank, and More (March 10, 2026) pycoders.com/issues/725
pycoders.com
PyCoder’s Weekly | Issue #725
Generators, __init__.py, Pointblank, and More
032
Jamie Chang @changs.co.uk · 29/01/2026
created a new website allowing users to run and share FastAPI and other apps right in a browser sandbox environment: jamie-chang.github.io/webasgi/?aut... Read more about the design in my blog post: blog.changs.co.uk/webasgi-run-...
010
Reposted by Jamie Chang
Real Python @realpython.com · 29/01/2026
🐍📩 Pycoders Weekly (Issue 719) — Django Tasks, Dictionaries, Ollama, and More pycoders.com/issues/719
042
Jamie Chang @changs.co.uk · 12/12/2025
I just completed all 12 days of Advent of Code 2025! #AdventOfCode adventofcode.com
adventofcode.com
Advent of Code 2025
030
Jamie Chang @changs.co.uk · 05/12/2025
I tried marimo recently and I really like it. blog.changs.co.uk/trying-out-m...
blog.changs.co.uk
Trying out marimo notebooks
As we approach the holiday seasons, we get to
000
Reposted by Jamie Chang
Sharun @sharunkumar.com · 11/11/2025
why the f**k would cursor rebind this?
051
Jamie Chang @changs.co.uk · 29/10/2025
Lazy imports in #Python are useful but limited by obscuring of typing information. In my latest blog post, I discuss a method to create typing information that more people should know about. blog.changs.co.uk/fixing-lazy-...
blog.changs.co.uk
Fixing lazy imports: Generating Static Types Dynamically
So I've just released a package called lazy-helper. This comes as lazy loading has been a hot topic once again due to the proposal PEP-810. Using...
020
Reposted by Jamie Chang
Christopher Trudeau @trudeau.dev · 24/10/2025
On this week's episode, @digiglean.bsky.social and I talk about loads of PEPs, more 3.14 news, and discuss what it means to have good engineering taste. With content from: @brianokken.bsky.social @miguelgrinberg.com @changs.co.uk @davepeck.org and others not on the 🦋
buff.ly
Episode #271: Benchmarking Python 3.14 & Enabling Asyncio to Scale – The Real Python Podcast
How does Python 3.14 perform under a few hand-crafted benchmarks? Does the performance of asyncio scale on the free-threaded build? Christopher Trudeau is back on the show this week, bringing another…
053
Reposted by Jamie Chang
Hugo van Kemenade @hugovk.dev · 19/10/2025
I benchmarked --help on a CLI with the ref implementation for PEP 810 (lazy imports). Because my CLI moved imports into functions just before they get used, I got a speedup of x1.3. Then I moved all the imports to the top like normal, and got a speedup of x2.9! hugovk.dev/blog/2025/la... #Python
hugovk.dev
Three times faster with lazy imports
3187
Jamie Chang @changs.co.uk · 10/10/2025
To celebrate the release of #Python 3.14| look at the often overlooked #asyncio changes: blog.changs.co.uk/python-314-3...
blog.changs.co.uk
Python 3.14: 3 Asyncio Changes
Python 3.14 was officially released on October 7th. There are a lot of new features and I've covered some of them before in: Python 3.14: 3...
000
Reposted by Jamie Chang
Thomas Wouters @yhg1s.bsky.social · 03/10/2025
Let me post a *non*-subskeet for once... We made a thing! discuss.python.org/t/pep-810-ex... #Python #PEP
discuss.python.org
PEP 810: Explicit lazy imports
👋 Hi everyone, We are very exited to share with you PEP 810: Explicit lazy imports: We’re proposing an opt-in lazy import syntax that defers module loading until first use, aiming for faster startup,...
76228
Reposted by Jamie Chang
Real Python @realpython.com · 16/09/2025
Python 3.14: 3 Smaller Features #python
blog.changs.co.uk
Python 3.14: 3 Smaller Features #python
With a jam packed 3.14 release around the corner, it's also important to look at the smaller features coming to Python
041
Jamie Chang @changs.co.uk · 15/09/2025
New blog post about measuring the speed and memory performance on different asyncio baackpressure solutions. blog.changs.co.uk/asyncio-back... #python #asyncio
blog.changs.co.uk
Asyncio backpressure - follow up
Previously when discussing asyncio backpressure I've made some claims that were not necessarily complete. I said: It works well for 100s of urls...
000
Jamie Chang @changs.co.uk · 11/09/2025
I'm excited to see UUID V7 being supported more universally. For databases, UUID 7 combines the flexibility and security of UUID 4 with time based ordering making it a great choice for IDs
072
Jamie Chang @changs.co.uk · 14/07/2025
Python 3.14: 3 smaller features share.google/j0VSOzZH2lck...
share.google
Python 3.14: 3 smaller features
Python 3.14 is just around the corner and it's jampacked with huge updates: Free threading and multiple interpreters? Template strings But as with...
000
Reposted by Jamie Chang
Simon Willison @simonwillison.net · 16/06/2025
If you use "AI agents" (LLMs calling tools in a loop) you need to be aware of the Lethal Trifecta Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...
simonwillison.net
The lethal trifecta for AI agents: private data, untrusted content, and external communication
If you are a user of LLM systems that use tools (you can call them “AI agents” if you like) it is critically important that you understand the risk of …
829880
Jamie Chang @changs.co.uk · 05/06/2025
#MCP is here to stay, so I tried implementing something slightly more useful than a weather tool. See how you can use custom MCP servers to help with your github workflow: blog.changs.co.uk/first-look-a...
blog.changs.co.uk
First 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...
000
Jamie Chang @changs.co.uk · 29/05/2025
Quick look at the state of free-threading in #python 3.14 beta blog.changs.co.uk/python-314-s...
Free threading and subinterpreter performance in 3.13 vs 3.14
010
Jamie Chang @changs.co.uk · 08/05/2025
Python3.14 beta 1 is out today, I go over how to use and abuse the new t-strings: blog.changs.co.uk/t-strings-th...
blog.changs.co.uk
t-strings: the good and the ugly
This one's hot off the press as the first beta for Python 3.14 (aka. π-thon) has hit. We're looking at a chunky release with a lot of new...
000
Reposted by Jamie Chang
Brett Cannon @brettcannon.fosstodon.org.ap.brid.gy · 10/04/2025
t-strings are coming! peps.python.org/pep-0750 discuss.python.org/t/pep750-templat…
peps.python.org
PEP 750 – Template Strings | peps.python.org
This PEP introduces template strings for custom string processing.
01313
Reposted by Jamie Chang
Real Python @realpython.com · 13/03/2025
My SQLAlchemy Cookbook #python
blog.changs.co.uk
My SQLAlchemy Cookbook #python
The post contains an embedded JupyterLite notebook containing a cookbook for SQLAlchemy. It focuses on the patterns you use in everyday ORM coding.
031
Jamie Chang @changs.co.uk · 12/03/2025
I've been unknowingly building DSLs using operators in #Python. Here I walkthough how you might do the same! blog.changs.co.uk/building-a-d...
blog.changs.co.uk
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...
000
Reposted by Jamie Chang
Real Python @realpython.com · 10/03/2025
Customising Pattern Matching Behaviour #python
blog.changs.co.uk
Customising Pattern Matching Behaviour #python
Jamie has been doing the [Advent of Code](https://adventofcode.com/) and two techniques that come up a lot in Python are iteration and pattern matching. This post talks about how they don't work well together and what you can do about it.
011
Jamie Chang @changs.co.uk · 09/03/2025
Check out my blog post on functional programming in Python, where I talk a bit more about my new #Python package blog.changs.co.uk/better-funct...
blog.changs.co.uk
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...
010
Jamie Chang @changs.co.uk · 04/03/2025
Been a little obsessed with #ocaml lately, so I've tried to bring some of #functional ergonomics into #Python. Checkout my new package better-functools pypi.org/project/bett...
Example of better-functools
010
Jamie Chang @changs.co.uk · 06/02/2025
TIL: though functools.partial can't be expressed using #Python types, both pyright and mypy support it fully. pyright-play.net?pythonVersio...
pyright-play.net
Pyright Playground
010
Jamie Chang @changs.co.uk · 03/02/2025
New blog post! Do you use #sqlalchemy? Have you run into this issue? #Python blog.changs.co.uk/sqlalchemy-f...
blog.changs.co.uk
Sqlalchemy Footgun: Discarding the statement
This one has frustrated me for a while. It starts off with a REST API route. For example in fastAPI @app.get(
010
Reposted by Jamie Chang
Charlie Marsh @crmarsh.com · 29/01/2025
We’re building a new static type checker for Python, from scratch, in Rust. From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
35722104
Jamie Chang @changs.co.uk · 25/01/2025
I love this almost completely useless graphql page where it shows you all the cool tools but doesn't give you any links to them. graphql.org/community/to...
graphql.org
Tools and Libraries | GraphQL
A collection of tools and libraries for GraphQL
110
Reposted by Jamie Chang
Simon Willison @simonwillison.net · 21/01/2025
If you have a browser that supports WebGPU (like Google Chrome) you try out the DeepSeek-R1 model based on Qwen2.5-Math-1.5B directly in your browser! It's a 1.28GB page load: huggingface.co/spaces/webml...
Screenshot of Spaces webml-community/deepseek-r1-webgpu" with "Running" status.

Prompt is "Solve the equation x^2 - 3x + 2 = 0

A "View reasoning" dropdown shows this:

To solve the quadratic equation (x^2 - 3x + 2 = 0), I'll start by factoring the left-hand side. I need two numbers that multiply to 2 and add up to -3. These numbers are -1 and -2.
Next, I'll rewrite the equation as (x - 1)(x - 2) = 0.
Using the zero product property, I'll set each factor equal to zero:

x - 1 = 0 leads to x = 1.
x - 2 = 0 leads to x = 2.

Therefore, the solutions to the equation are x = 1 and x = 2.

Below that a full solution is displayed:
"Step 1: Factor the Quadratic
We look for two numbers that multiply to +2 and add up to -3. These numbers are -1 and -2.
x^2 - 3x + 2 = (x - 1)(x - 2) = 0

Step 2: Apply the Zero Product Property
If the product of two factors is zero, at least one of the factors must be zero.
x - 1 = 0   or   x - 2 = 0

Step 3: Solve for x
x = 1   or   x = 2

Final Answer:
1 and 2
2257
Jamie Chang @changs.co.uk · 16/01/2025
How much are folks using #Python structural pattern matching? Here's how I use it: blog.changs.co.uk/jamies-patte...
blog.changs.co.uk
Jamie's Pattern Matching Cookbook
Structural pattern matching is probably the coolest new syntax introduced to Python. Added in 3.10, it's been a few years now and more people are...
022
Reposted by Jamie Chang
Savannah Ostrowski @savannah.dev · 06/01/2025
🚀🚀🚀
1101
Jamie Chang @changs.co.uk · 04/01/2025
A quick follow up to the last post of 2024, the first post of 2025. Here I use the not yet released subinterpreters feature in Python 3.13 to speed up my code. blog.changs.co.uk/how-good-are...
AoC day 6 2024 written using free-threads vs sub-interpreters. Ran on the 11 core M3 Macbook pro
000
Jamie Chang @changs.co.uk · 31/12/2024
Last post of 2024! I look at the challenges around free threaded Python. blog.changs.co.uk/how-free-are... #Python #aoc
blog.changs.co.uk
How free are threads in Python now?
Free-threaded Python (PEP-703) was released in October 2024. It enables true multi-threaded execution without the restriction of the GIL. I...
010
Reposted by Jamie Chang
Simon Willison @simonwillison.net · 05/12/2024
Found a fun new test prompt chatgpt.com/share/675223...
ChatGPT o1 screenshot

Prompt: Come up with a realistic, detailed implementation plan for building the machine from person of interest
4423
Jamie Chang @changs.co.uk · 02/12/2024
Can you safely execute LLM generated #Python code? blog.changs.co.uk/python-in-py... #Python #langchain
blog.changs.co.uk
Python-in-Python Sandboxing LLM Generated Code
I've been experimenting with Langchain for GPT based queries. One problem we often encounter with GPT is hallucinations. This makes certain...
000
Jamie Chang @changs.co.uk · 25/11/2024
I recently wrote about SQLAlchemy blog.changs.co.uk/my-sqlalchem... #python
blog.changs.co.uk
My SQLAlchemy Cookbook
I've worked with SQLAlchemy for a while now, and in my opinion it's the best ORM in Python. It's feature rich with strong support for all major...
000