Archive for the ‘python’ Category

I’ve been thinking a lot about where the death’s head symbol, ☠, appears in the Python semantic analysis. The Python language, underneath all the churn and symbols, is only about 40 semantics in size (see: Python, The Full Monty), and most of those are fairly well-defined. The problem lies in this simple example: def f(y): […]

Introduction I’ve been trying to grok Matt Might’s Parsing With Derivatives for a while, and one of the better, clearer explanations for it that I found is Yehonathan Sharvit’s Clojure version. Since Clojure isn’t a language I know very well, if at all, although I do know some Scheme, I decided to try and re-implement […]

New work: autorotate. As I mentioned earlier, I managed to score a brand new Microsoft Surface Pro 3 for $230 (not including the additional cost of a new keyboard, stylus, and power supply… sigh) from a woman who much preferred her MacBook and was moving and had to get rid of everything she didn’t want […]

My latest contribution to the world is Git Lint, a plug-in for git that allows you to pre-configure your linters and syntax checkers, and then run them all at once on only the things you’ve changed. About half of us still live in the command line, and I like being able to set-and-forget tools that […]

The Semantics of Python Import series has been important because the work I’m doing there supports work I’m doing elsewhere, namely modernizing the Hy import system to work with importlib, and then further shimming the import system to provide for heterogeneous source loaders. My showcase for all this has been Catalogia, a music collection management […]


Making any language loadable in Python

Posted by Elf Sternberg as Lisp, python

I may have inadvertently contributed to the Coffeescriptification of Python. And in doing so, I have learned way too much about Python internals. Coffeescript probably wasn’t the first programming language that transpiled to Javascript, but it was the first that caught on. Coffeescript and all its successors, like Clojurescript, Gorilla, and Earl Grey, exist because […]

This weekend I had a project to write.  I have a huge archive of MP3s left over from the mid-90s through mid-00’s, and they’re a bit of a mess and moving them onto my iPod is always a pain in the neck because they might be inconsistently labeled or have proto-Unicode issues or whatever.  So […]

Frequently, when dealing with remote APIs, there’s a progression of states with a definitive order and an endpoint.  Often, when comparing the existing state to the proposed state, I want to make sure state is progressing in the correct direction.  The stupid simple version of this is something like: ORDER_STATES = ( (‘PROCESSING’, _(“Processing”)), (‘APPROVED’, […]

I wish I’d known this a long time ago.  Django’s request object includes a dictionary of key/value pairs passed into the request via POST or GET methods.  That dictionary, however, works in a counter-intuitive fashion.  If a URL reads, then the expected content of request.GET[‘a’] would be ‘boo’, right?  And most of us who’ve […]

It drives me nuts that we in the Django community rely on Solr or Haystack to provide us with full-text search when MySQL provides a perfectly functional full-text search feature, at least at the table level and for modest projects. I understand that not every app runs on MySQL, but mine do, and I’m sure […]

Subscribe to Feed



February 2018
« Jan