Pixel Art in Yarn
Since its inception in 2011, NextThought has used the same star-shaped logo created by Whitney Martin Design. The logo has taken many forms and appeared in many places over the years: mugs, hats, stress balls, business cards, shirts, gym bags, this blog—the list goes on and on. But could it be re-created in yarn?
Spoiler alert: yes. Yes it could.
Pre-release Version Pins are Sticky
The popular Python web framework Pyramid recently had a bug. Installing a released version of Pyramid, such as 1.8 or 1.9, somehow resulted in installing a pre-release version of one of its most important dependencies, WebOb. This was surprising and potentially disruptive in a production environment. Having been surprised by a similar bug in a different project, I followed this with interest.
Python's Old Iteration Protocol
A few places in the Python language reference coyly refer to "the old-style iteration protocol." What is that protocol and how is it different from "the new-style iteration protocol?" Does it have anything to do with the difference between old-style and new-style classes? Let's dig in to see how iteration works now, and how it used to work.
There and Back Again: My Journey to (and From) Emacs
This is the story of how I started using Emacs, switched away to vi, and then switched back to Emacs years later.
(This post is part of a series.)
Editor Wars: Violent Delights Have Violent Ends
As developers, one of the most important tools in our toolkits is our editor. Looking around the office, you'll find a wide variety of editors in use, everything from editors with long pedigrees to the most recently developed editor boasting the technology du jour.
The choice of editor can be a very personal thing. While we have no interest in starting or escalating the actual editor war, we thought it would be interesting to survey the office and collect some stories about editors and the people who use them in this ongoing (sporadic) series.
- There and Back Again: My Journey to (and From) Emacs — Jason Madden (2018-06-01)
Implementing gevent locks
Previously we talked about gevent's hub and how greenlets switch in and out of it to implement IO. This time, let's talk about how we can use those same primitives, plus the properties that make greenlets greenlets, to implement locks. We'll start by walking through some basics about locks and move on to how locks are used in Python when working with threads. All of that will be background for finally covering how gevent implements greenlet-based locks.
Python's weak references, __slots__, and Cython
By default, objects in Python can be weakly referenced. But if you use __slots__ in your class, or use Cython to compile it, that's no longer true without some extra effort. This lead to issue #1217 and issue #1211 in gevent's 1.3 release. Here, we'll discuss weak references, demonstrate the problem that __slots__ creates, and show the solution by implementing our own weak references.
gevent's hub
The hub is an important part of gevent, but aside from a few sentences in the high-level description of the event loop, and the API documentation, not a lot has been written about the hub, its purpose, or how it does what it does. This post aims to change that and answer questions like:
- What is the hub?
- How does the hub run the event loop?
- How do greenlets do IO? That is, how do they let the event loop run, while letting other greenlets run, and then pick right back up where they blocked?
Building A Blog
Like any good blog, this one includes a post about what technologies power it.