A
Aknin
tech.blog.aknin.name · Personal blog · on HN since 2010
Yaniv Aknin writes about Python internals, web development and HTTP design.
What HN saysHN commenters recommend his Python's Innards series as a detailed look at CPython's C internals, and one links his post on atomic counters with HTTP PATCH.
17HN people shared it
6linked it in comments
16stories submitted
281story points
6 years agolast shared
2010people per year2026
Most-shared posts
- 1Python's Innards: Introduction (2010)4 people · 173 points · first shared 2010 · 12 comments on HN
- 2Python’s Innards4 people · 7 points · first shared 2010 · discussion on HN
- 3RESTfully atomically incrementing a counter using HTTP PATCH2 people · 1 points · first shared 2012 · discussion on HN
- 4I wish someone wrote django-static-upstream2 people · 1 points · first shared 2012 · discussion on HN
- 5Hacker irked by reincarnation1 people · 30 points · first shared 2012 · 32 comments on HN
- 6Python’s Innards: for my wife1 people · 29 points · first shared 2010 · 5 comments on HN
- 7Mailing list debates considered harmful1 people · 21 points · first shared 2010 · 18 comments on HN
- 8Python's Innards: Naming1 people · 8 points · first shared 2010 · discussion on HN
- 9Guido’s Python: Introduction1 people · 3 points · first shared 2010 · discussion on HN
- 10Nginx+gzip module might silently corrupt data upon backend failure1 people · 3 points · first shared 2011 · discussion on HN
- 11Guido’s Python: Objects 1011 people · 2 points · first shared 2010 · discussion on HN
- 12Heroku is great However...1 people · 2 points · first shared 2012 · discussion on HN
- 13Guido's Python Object1 people · 1 points · first shared 2010 · discussion on HN
- 14Internals1 people · first shared 2017
What HN people wrote when they linked it
int_19h · 2017-03-10
This series of blog posts is also great:
https://tech.blog.aknin.name/tag/internals/
I spent a lot of time reading it while working on the mixed-mode Python debugger for Visual Studio (which, coincidentally, supports both Python 2 and Python 3 - they do really share a lot of things). Much of that work involved parsing and writing internal Python data structures directly, since Python interpreter may be unusable when the current instruction pointer is inside native code (GIL not held, various system locks held etc).
teolicy · 2012-02-26
I’m not a Rubyist, but I’ve written a post recently about using PATCH to increment/decrement counters atomically. Perhaps it could be of value here, I’d love to see it in Rails: http://tech.blog.aknin.name/2012/02/08/restfully-atomically-incrementi…
(commented this on the article as well)
alecdbrooks · 2013-12-11
Thanks for the link! I'm not interested in Ruby per se, but it's fascinating nonetheless from the perspective of data structures and how they are implemented in C.
On a related note, I've found a much less comprehensive (but still useful) guide to Python internals: http://tech.blog.aknin.name/category/my-projects/pythons-innards/.
eliben · 2013-11-16
I you want to see some real Python internals (complete with low-level C gore), take a look at Yaniv Aknin's series starting here - http://tech.blog.aknin.name/2010/04/02/pythons-innards-introduction/
... and my own series - http://eli.thegreenplace.net/category/programming/python/python-intern… in particular starting with http://eli.thegreenplace.net/2010/06/30/python-internals-adding-a-new-…
kiwidrew · 2012-07-31
There's a good post from late 2011, in the context of 12-factor deployment on Heroku, where the author muses about just using a pure Python server behind a CDN to serve static content:
...and yeah, I think I should bloody use this server as a backend to serve my in production.
http://tech.blog.aknin.name/2011/12/28/i-wish-someone-wrote-django-sta…
abecedarius · 2014-11-04
I don't think so; https://docs.python.org/3/library/dis.html#python-bytecode-instruction… was the closest I found when I was writing a compiler for a subset of Python, and that doc was a little sketchy and out of date. I ended up consulting the CPython source a lot and reading some helpful blog series:
http://docs.python.org/devguide/compiler.html
http://akaptur.github.io/blog/categories/python-internals/
http://eli.thegreenplace.net/category/programming/python/python-intern…
http://tech.blog.aknin.name/category/my-projects/pythons-innards/
http://www.matusiak.eu/numerodix/blog/category/python-internals/
Also Python 2 comes with a 'compiler' module which reimplements the built-in compiler in Python. (The real one is in C. The Python one was dropped from Python 3.)