<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>jodal.dev - python</title>
    <subtitle>Personal blog of Stein Magnus Jodal</subtitle>
    <link rel="self" type="application/atom+xml" href="https://jodal.dev/tags/python/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://jodal.dev"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2019-12-23T00:00:00+00:00</updated>
    <id>https://jodal.dev/tags/python/atom.xml</id>
    <entry xml:lang="en">
        <title>10 years of Mopidy</title>
        <published>2019-12-23T00:00:00+00:00</published>
        <updated>2019-12-23T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2019/12/23/10y-of-mopidy/"/>
        <id>https://jodal.dev/2019/12/23/10y-of-mopidy/</id>
        
        <summary type="html">&lt;p&gt;Ten years ago today, on December 23, 2009, Mopidy was born. While chatting with
my friend and then-colleague Johannes Knutsen, we came up with the idea of
building an MPD server that could play music from Spotify instead of local
files.&lt;/p&gt;
&lt;p&gt;This is the story of the first decade of Mopidy.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>pathlib and paths with arbitrary bytes</title>
        <published>2019-12-10T00:00:00+00:00</published>
        <updated>2019-12-10T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2019/12/10/pathlib-and-paths-with-arbitrary-bytes/"/>
        <id>https://jodal.dev/2019/12/10/pathlib-and-paths-with-arbitrary-bytes/</id>
        
        <summary type="html">&lt;p&gt;The &lt;a rel=&quot;external&quot; href=&quot;https://docs.python.org/3/library/pathlib.html&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt; module
was added to the standard library in Python 3.4
and is one of the many nice improvements that Python 3
has gained over the past decade.
In three weeks, Python 3.5 will be the oldest version of Python
that still receives security patches.
This means that the presence of &lt;code&gt;pathlib&lt;/code&gt;
can soon be taken for granted on all Python installations,
and the quest towards replacing &lt;code&gt;os.path&lt;/code&gt; can begin for real.&lt;/p&gt;
&lt;p&gt;In this post, I’ll have a look at how &lt;code&gt;pathlib&lt;/code&gt; can be used to
handle file paths containing arbitrary bytes,
as this is valid on most file systems.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pykka 2.0 released with better ergonomics and performance improvements</title>
        <published>2019-05-07T00:00:00+00:00</published>
        <updated>2019-05-07T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2019/05/07/pykka-2.0/"/>
        <id>https://jodal.dev/2019/05/07/pykka-2.0/</id>
        
        <summary type="html">&lt;p&gt;I’ve finally released &lt;a rel=&quot;external&quot; href=&quot;https://pykka.readthedocs.io/&quot;&gt;Pykka&lt;/a&gt; 2.0, the
first major update to Pykka in almost six years.&lt;/p&gt;
&lt;p&gt;Pykka is a Python implementation of the actor model. The actor model
introduces some simple rules to control the sharing of state and cooperation
between execution units, which makes it easier to build concurrent
applications.&lt;/p&gt;
&lt;p&gt;Pykka 2.0 is a major release because it is backwards incompatible in several
minor ways. However, the backwards incompatible changes should only affect
quite narrow use cases.
Mopidy and its extensions,
which is the largest open source ecosystem I know of that uses Pykka,
runs unmodified on Pykka 2.0.&lt;/p&gt;
&lt;p&gt;In this blog post I’ll go through some of the more important improvements in
2.0.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Mopidy-MPRIS 2.0 released</title>
        <published>2018-12-07T00:00:00+00:00</published>
        <updated>2018-12-07T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2018/12/07/mopidy-mpris-2.0/"/>
        <id>https://jodal.dev/2018/12/07/mopidy-mpris-2.0/</id>
        
        <summary type="html">&lt;p&gt;I’ve released &lt;a rel=&quot;external&quot; href=&quot;https://github.com/mopidy/mopidy-mpris&quot;&gt;Mopidy-MPRIS&lt;/a&gt; 2.0, the
first major update to Mopidy-MPRIS in about 3.5 years.&lt;/p&gt;
&lt;p&gt;Mopidy-MPRIS is a Mopidy extension that makes &lt;a rel=&quot;external&quot; href=&quot;https://mopidy.com/&quot;&gt;Mopidy&lt;/a&gt;
controllable from other programs on the same machine through D-Bus. This makes
it possible to control Mopidy from various widgets in GNOME/KDE/etc, as well as
with keyboard media keys.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Bringing the Mopidy music server to the browser</title>
        <published>2017-08-26T00:00:00+00:00</published>
        <updated>2017-08-26T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2017/08/26/mopidy-in-the-browser/"/>
        <id>https://jodal.dev/2017/08/26/mopidy-in-the-browser/</id>
        
        <summary type="html">&lt;p&gt;Note: This is a blog post draft that was originally written in January 2013,
left unattended for 1689 days, and rediscovered and published unedited in
August 2017.&lt;/p&gt;
&lt;p&gt;During the five years since Mopidy entered the browser with its HTTP JSON-RPC
API and the Mopidy.js JavaScript library, many successful Mopidy web
clients have been built on top of this foundation. The APIs themselves have
survived the test of time and have required minimal maintenance, just as I
hoped when implementing the APIs back in November 2012.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://mopidy.com/&quot;&gt;Mopidy&lt;/a&gt; is a music server written in
Python. It plays music from various sources, including local disk and Spotify.
Mopidy can be remote-controlled by, among others, &lt;abbr title=&quot;Music Player
Daemon&quot;&gt;MPD&lt;/abbr&gt; clients.&lt;/p&gt;
&lt;p&gt;In Mopidy 0.10, released in the middle of December, we added an HTTP frontend.
The HTTP frontend takes Mopidy’s full core API and makes it available from
JavaScript in the browser. This means that you now can make your own web
clients for Mopidy in JavaScript, and Wouter van Wijk has already started on
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/pimusicbox/mopidy-musicbox-webclient&quot;&gt;his client&lt;/a&gt; (&lt;em&gt;updated
link&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;I’d like to write a bit about how we made the HTTP client.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>netsgiro: a parser and builder for AvtaleGiro and OCR Giro files</title>
        <published>2017-05-21T00:00:00+00:00</published>
        <updated>2017-05-21T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2017/05/21/netsgiro-released/"/>
        <id>https://jodal.dev/2017/05/21/netsgiro-released/</id>
        
        <summary type="html">&lt;p&gt;Today I released the first stable release of
&lt;a rel=&quot;external&quot; href=&quot;https://netsgiro.readthedocs.io/&quot;&gt;netsgiro&lt;/a&gt; to
&lt;a rel=&quot;external&quot; href=&quot;https://pypi.org/project/netsgiro/&quot;&gt;PyPI&lt;/a&gt;. netsgiro is a Python 3.4+ library
for parsing and building &lt;a rel=&quot;external&quot; href=&quot;https://www.nets.eu/&quot;&gt;Nets&lt;/a&gt; “OCR” files.&lt;/p&gt;
&lt;p&gt;AvtaleGiro is a direct debit solution that is in widespread use in Norway, with
more than 15 000 companies offering it to their customers. OCR Giro is used by
Nets and Norwegian banks to update payees on recent deposits to their bank
accounts. In combination, AvtaleGiro and OCR Giro allows for a high level of
automation of invoicing and payment processing.&lt;/p&gt;
&lt;p&gt;The “OCR” file format and file format name originates in days when giro
payments were delivered on paper to your bank and then processed either
manually or using optical character recognition, OCR. I’m not sure how old the
format is, but some of the examples in the OCR Giro specification use dates in
1993, and the specification changelog starts in 1999 and ends in 2003. A couple
of decades later, the file format is still in daily use by Nets’ AvtaleGiro
and OCR Giro services. In other words, I have high hopes that this will be a
very stable open source project requiring minimal maintenance efforts.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>March and April contributions</title>
        <published>2016-04-30T00:00:00+00:00</published>
        <updated>2016-04-30T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2016/04/30/march-and-april-contributions/"/>
        <id>https://jodal.dev/2016/04/30/march-and-april-contributions/</id>
        
        <summary type="html">&lt;p&gt;The following is a short summary of my open source work in March and April,
almost like in previous months, except that I haven’t spent as much time as
previously on Open Source the last two months.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>February contributions</title>
        <published>2016-03-01T00:00:00+00:00</published>
        <updated>2016-03-01T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2016/03/01/february-contributions/"/>
        <id>https://jodal.dev/2016/03/01/february-contributions/</id>
        
        <summary type="html">&lt;p&gt;The following is a short summary of my open source work in February, just like
&lt;a href=&quot;https://jodal.dev/2015/11/30/november-contributions/&quot;&gt;in&lt;/a&gt;
&lt;a href=&quot;https://jodal.dev/2016/01/01/december-contributions/&quot;&gt;previous&lt;/a&gt;
&lt;a href=&quot;https://jodal.dev/2016/02/01/january-contributions/&quot;&gt;months&lt;/a&gt;.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>January contributions</title>
        <published>2016-02-01T00:00:00+00:00</published>
        <updated>2016-02-01T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2016/02/01/january-contributions/"/>
        <id>https://jodal.dev/2016/02/01/january-contributions/</id>
        
        <summary type="html">&lt;p&gt;The following is a short summary of my open source work in January, just like I
did back in &lt;a href=&quot;https://jodal.dev/2015/11/30/november-contributions/&quot;&gt;November&lt;/a&gt; and
&lt;a href=&quot;https://jodal.dev/2016/01/01/december-contributions/&quot;&gt;December&lt;/a&gt;.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>December contributions</title>
        <published>2016-01-01T00:00:00+00:00</published>
        <updated>2016-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2016/01/01/december-contributions/"/>
        <id>https://jodal.dev/2016/01/01/december-contributions/</id>
        
        <summary type="html">&lt;p&gt;The following is a short summary of my open source work in December, following
up on &lt;a href=&quot;https://jodal.dev/2015/11/30/november-contributions/&quot;&gt;my first report in November&lt;/a&gt;.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>November contributions</title>
        <published>2015-11-30T00:00:00+00:00</published>
        <updated>2015-11-30T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2015/11/30/november-contributions/"/>
        <id>https://jodal.dev/2015/11/30/november-contributions/</id>
        
        <summary type="html">&lt;p&gt;The following is a short summary of my open source work in November. My hope is
that keeping better track of what I’m doing will help me reflect on how I spend
my time, and help me to focus my efforts better.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Debian packaging of Mopidy</title>
        <published>2014-10-28T00:00:00+00:00</published>
        <updated>2014-10-28T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2014/10/28/debian-packaging/"/>
        <id>https://jodal.dev/2014/10/28/debian-packaging/</id>
        
        <summary type="html">&lt;p&gt;My first upload to Debian as a Debian Maintainer, Mopidy 0.19.4-3, landed in
Debian testing today, well in time for the upcoming freeze.&lt;/p&gt;
&lt;p&gt;The new version adjusts the LSB facilities the sysvinit script depends on, to
make sure that DNS lookups, DBus (used by Mopidy-MPRIS), and Avahi (used for
Zeroconf service publishing) are available before Mopidy starts.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>pyspotify v2.0.0b1 released, with new event loop and audio sinks</title>
        <published>2014-04-24T00:00:00+00:00</published>
        <updated>2014-04-24T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2014/04/24/pyspotify-v2.0.0b1/"/>
        <id>https://jodal.dev/2014/04/24/pyspotify-v2.0.0b1/</id>
        
        <summary type="html">&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://pyspotify.readthedocs.io/&quot;&gt;pyspotify&lt;/a&gt; 2.x is a full rewrite of pyspotify.
While pyspotify 1.x is a CPython C extension, pyspotify 2.x uses
&lt;a rel=&quot;external&quot; href=&quot;http://cffi.readthedocs.org/&quot;&gt;CFFI&lt;/a&gt; to make 100% of the libspotify C library
available from Python. It works on CPython 2.7 and 3.2+, as well as PyPy 2.1+.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Comics v2.3.0 released with better mobile support</title>
        <published>2014-04-07T00:00:00+00:00</published>
        <updated>2014-04-07T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2014/04/07/comics-v2.3.0/"/>
        <id>https://jodal.dev/2014/04/07/comics-v2.3.0/</id>
        
        <summary type="html">&lt;p&gt;Version 2.3.0 of &lt;a rel=&quot;external&quot; href=&quot;http://comics.readthedocs.org/&quot;&gt;my comics aggregator&lt;/a&gt; is now
released. As always, dependencies have been updated, including the routine
Django upgrade from Django 1.5 to 1.6, just in time for the upcoming 1.7
release. The largest change this time around is the move from Bootstrap 2 to 3,
which includes a refreshed, flatter design and lots of tweaking to make Comics
both look good and work nicely on mobile devices, something it didn’t use to
do.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>New Python wrapper for libspotify</title>
        <published>2014-02-14T00:00:00+00:00</published>
        <updated>2014-02-14T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2014/02/14/new-python-wrapper-for-libspotify/"/>
        <id>https://jodal.dev/2014/02/14/new-python-wrapper-for-libspotify/</id>
        
        <summary type="html">&lt;p&gt;Today, after about nine months of working on it now and then, I uploaded the
first alpha release of &lt;a rel=&quot;external&quot; href=&quot;https://pyspotify.readthedocs.io/&quot;&gt;pyspotify 2.0&lt;/a&gt; to
&lt;a rel=&quot;external&quot; href=&quot;https://pypi.python.org/pypi/pyspotify&quot;&gt;PyPI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;pyspotify provides a Python interface to &lt;a rel=&quot;external&quot; href=&quot;http://www.spotify.com/&quot;&gt;Spotify’s&lt;/a&gt;
online music streaming service. With it you can access music metadata, search
in Spotify’s library of 20+ million tracks, manage your Spotify playlists, and
play music from Spotify. All from your own Python applications.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Mopidy packaged in Debian and Ubuntu</title>
        <published>2013-12-28T00:00:00+00:00</published>
        <updated>2013-12-28T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2013/12/28/mopidy-packaged-in-debian-and-ubuntu/"/>
        <id>https://jodal.dev/2013/12/28/mopidy-packaged-in-debian-and-ubuntu/</id>
        
        <summary type="html">&lt;p&gt;Looking back to my last post from September, my goal was to have
the music server &lt;a rel=&quot;external&quot; href=&quot;https://mopidy.com/&quot;&gt;Mopidy&lt;/a&gt; packaged in Debian by the end
of the year and in Ubuntu in time for the 14.04 LTS release in April. As of
yesterday, Mopidy 0.17.0 is a part of &lt;a rel=&quot;external&quot; href=&quot;http://packages.debian.org/source/sid/mopidy&quot;&gt;Debian
unstable&lt;/a&gt; and &lt;a rel=&quot;external&quot; href=&quot;https://launchpad.net/ubuntu/+source/mopidy&quot;&gt;Ubuntu
trusty&lt;/a&gt;, just a few days after
Mopidy’s fourth anniversary on December 23.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pykka packaged in Debian and Ubuntu</title>
        <published>2013-09-03T00:00:00+00:00</published>
        <updated>2013-09-03T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2013/09/03/pykka-packaged-in-debian-and-ubuntu/"/>
        <id>https://jodal.dev/2013/09/03/pykka-packaged-in-debian-and-ubuntu/</id>
        
        <summary type="html">&lt;p&gt;The Python actor library &lt;a rel=&quot;external&quot; href=&quot;http://pykka.readthedocs.io/&quot;&gt;Pykka&lt;/a&gt; is now packaged as
&lt;code&gt;python-pykka&lt;/code&gt; and &lt;code&gt;python3-pykka&lt;/code&gt; in
&lt;a rel=&quot;external&quot; href=&quot;http://packages.debian.org/source/sid/python-pykka&quot;&gt;Debian unstable&lt;/a&gt; and
&lt;a rel=&quot;external&quot; href=&quot;https://launchpad.net/ubuntu/+source/python-pykka&quot;&gt;Ubuntu saucy&lt;/a&gt;, soon to be
Ubuntu 13.10. In a few more days, the packages will be probably be available in
Debian testing as well.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Mopidy hosted by Rackspace</title>
        <published>2013-07-22T00:00:00+00:00</published>
        <updated>2013-07-22T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2013/07/22/mopidy-hosted-by-rackspace/"/>
        <id>https://jodal.dev/2013/07/22/mopidy-hosted-by-rackspace/</id>
        
        <summary type="html">&lt;p&gt;A week ago &lt;a rel=&quot;external&quot; href=&quot;https://twitter.com/jessenoller/status/355757374906183680&quot;&gt;Jesse Noller
tweeted&lt;/a&gt; that
&lt;a rel=&quot;external&quot; href=&quot;http://www.rackspace.com/&quot;&gt;Rackspace&lt;/a&gt; would provide free Rackspace cloud
accounts for open source projects. It only took a couple of hours from I first
mailed Jesse to we had two servers up and running.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pykka v1.2.0 with eventlet support and future transformations</title>
        <published>2013-07-18T00:00:00+00:00</published>
        <updated>2013-07-18T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2013/07/18/pykka-v1.2.0/"/>
        <id>https://jodal.dev/2013/07/18/pykka-v1.2.0/</id>
        
        <summary type="html">&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://pykka.readthedocs.io/&quot;&gt;Pykka&lt;/a&gt; v1.2.0 is now available from PyPI, GitHub, and
&lt;a rel=&quot;external&quot; href=&quot;https://apt.mopidy.com/&quot;&gt;APT&lt;/a&gt;. It’s about half a year since the previous
release, during which no serious bugs have been found.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Speeding up a Django web site without touching the code</title>
        <published>2011-10-19T00:00:00+00:00</published>
        <updated>2011-10-19T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/10/19/speeding-up-a-django-web-site-without-touching-the-code/"/>
        <id>https://jodal.dev/2011/10/19/speeding-up-a-django-web-site-without-touching-the-code/</id>
        
        <summary type="html">&lt;p&gt;I’ve recently been tweaking my server setup for a Django 1.3 web site with the
goal of making it a bit faster. Of course, there is a lot of speed to gain by
improving e.g. the number of database queries needed to render a web page, but
the server setup also has an effect on the web site performance. This is a log
of my findings.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Traversable attributes in Pykka</title>
        <published>2011-10-06T00:00:00+00:00</published>
        <updated>2011-10-06T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/10/06/traversable-attributes-in-pykka/"/>
        <id>https://jodal.dev/2011/10/06/traversable-attributes-in-pykka/</id>
        
        <summary type="html">&lt;p&gt;In &lt;a rel=&quot;external&quot; href=&quot;https://pykka.readthedocs.io/&quot;&gt;Pykka&lt;/a&gt; 0.13–which was released almost two
weeks ago–traversing the attributes of an actor is about 8.3 times faster than
it used to be. To paraphrase Apple: “8.3X faster. That’s amazing!” &lt;em&gt;(Update:
This was written a couple of hours before the news of Jobs’ passing arrived.
May he continue to inspire us.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, what is “traversable attributes”? Let’s take a few steps back.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>pyspotify 1.2 released</title>
        <published>2011-06-08T00:00:00+00:00</published>
        <updated>2011-06-08T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/06/08/pyspotify-1-2-released/"/>
        <id>https://jodal.dev/2011/06/08/pyspotify-1-2-released/</id>
        
        <summary type="html">&lt;p&gt;pyspotify is a Python wrapper for
&lt;a rel=&quot;external&quot; href=&quot;https://developer.spotify.com/en/libspotify/&quot;&gt;libspotify&lt;/a&gt;, which give
developers access to the &lt;a rel=&quot;external&quot; href=&quot;https://www.spotify.com/&quot;&gt;Spotify&lt;/a&gt; music streaming
service.&lt;/p&gt;
&lt;p&gt;Today, I tagged pyspotify 1.2 at &lt;a rel=&quot;external&quot; href=&quot;https://github.com/mopidy/pyspotify&quot;&gt;GitHub&lt;/a&gt;
and pushed the new release to
&lt;a rel=&quot;external&quot; href=&quot;http://pypi.python.org/pypi/pyspotify/1.2&quot;&gt;PyPI&lt;/a&gt;. I’ve also made deb packages
of libspotify and pyspotify available at
&lt;a rel=&quot;external&quot; href=&quot;https://apt.mopidy.com/&quot;&gt;apt.mopidy.com&lt;/a&gt;.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Log from the debugging of a segfault</title>
        <published>2011-05-24T00:00:00+00:00</published>
        <updated>2011-05-24T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/05/24/log-from-the-debugging-of-a-segfault/"/>
        <id>https://jodal.dev/2011/05/24/log-from-the-debugging-of-a-segfault/</id>
        
        <summary type="html">&lt;p&gt;&lt;em&gt;The following is a cleaned up log I wrote for myself while debugging a bug.
Writing a log while working helps me keep track of the debugging effort in case
I’m interrupted (life, sleep, work, etc.). It also requires me to explain all
findings to myself in fully spelled out sentences, making my thoughts
considerably easier to follow.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In addition to serving as an example of a personal debug log, I hope it can be
useful as an introduction to debugging segfaults or other low-level bugs.&lt;/em&gt;&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pykka, and porting Pykka to Python 3</title>
        <published>2011-03-29T00:00:00+00:00</published>
        <updated>2011-03-29T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/03/29/pykka-and-porting-pykka-to-python-3/"/>
        <id>https://jodal.dev/2011/03/29/pykka-and-porting-pykka-to-python-3/</id>
        
        <summary type="html">&lt;p&gt;This is somewhat of an introduction to &lt;a rel=&quot;external&quot; href=&quot;https://pykka.readthedocs.io/&quot;&gt;Pykka&lt;/a&gt;,
a Python library implementing the actor model, which I’ve been working on now
and then since November. And it’s still just 300 lines of code!&lt;/p&gt;
&lt;p&gt;The goal of the actor model is to make it easier to develop concurrent programs
by removing all shared state and use messaging for all communication. Removing
shared state and doing lots of messaging doesn’t make anything easier by
itself, but it avoids common problems in concurrent programs like proper lock
usage and data corruption (due to the absence of proper lock usage). Also, I
believe the actor model makes it easier to reason about concurrent programs,
which is a nice property since software development often feels like 10%
development and 91% debugging.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>multiprocessing.Connection is not free</title>
        <published>2011-03-20T00:00:00+00:00</published>
        <updated>2011-03-20T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/03/20/multiprocessing-connection-is-not-free/"/>
        <id>https://jodal.dev/2011/03/20/multiprocessing-connection-is-not-free/</id>
        
        <summary type="html">&lt;p&gt;I’ve
&lt;a href=&quot;https://jodal.dev/2011/03/06/pickling-multiprocessing-connection-objects/&quot;&gt;previously written&lt;/a&gt;
about how to wrap &lt;code&gt;multiprocessing.Connection&lt;/code&gt; objects in a class that makes
&lt;code&gt;Connection&lt;/code&gt; objects picklable, and thus transferable over another
&lt;code&gt;Connection&lt;/code&gt;. That approach is still valid, but don’t use it–or &lt;code&gt;Connection&lt;/code&gt;
objects at all–for lots of use-once-and-throw-away connections.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Traits in Python using multiple inheritance</title>
        <published>2011-03-15T00:00:00+00:00</published>
        <updated>2011-03-15T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/03/15/traits-in-python-using-multiple-inheritance/"/>
        <id>https://jodal.dev/2011/03/15/traits-in-python-using-multiple-inheritance/</id>
        
        <summary type="html">&lt;p&gt;As you probably know, if a class needs to handle two mostly unrelated concerns, the
class should probably be split into two. This way, your will achieve
&lt;a rel=&quot;external&quot; href=&quot;http://en.wikipedia.org/wiki/Cohesion_(computer_science)&quot;&gt;higher cohesion&lt;/a&gt; in your
code, which is generally considered a good thing. Though, there are times where
you need to address two mostly unrelated concerns in a single class.&lt;/p&gt;
&lt;p&gt;The Scala programming language has a concept they call
&lt;a rel=&quot;external&quot; href=&quot;http://www.scala-lang.org/node/126&quot;&gt;traits&lt;/a&gt;. Scala traits can be compared to
Java interfaces, except that Scala traits may be partially or fully
implemented, like abstract classes. As with Java interfaces, you can &lt;em&gt;mixin&lt;/em&gt;
multiple traits in a class. If any of the traits has colliding method
signatures, the last trait mixed in overrides the earlier ones. Just as with
regular inheritance and interfaces, the class &lt;em&gt;must&lt;/em&gt; implement any methods that
has not been implemented by the traits, and &lt;em&gt;may&lt;/em&gt; override any methods that
already has been implemented.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pickling multiprocessing Connection objects</title>
        <published>2011-03-06T00:00:00+00:00</published>
        <updated>2011-03-06T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jodal.dev/2011/03/06/pickling-multiprocessing-connection-objects/"/>
        <id>https://jodal.dev/2011/03/06/pickling-multiprocessing-connection-objects/</id>
        
        <summary type="html">&lt;p&gt;For safe message-based communication between threads and processes in Python, I
tend to use
&lt;a rel=&quot;external&quot; href=&quot;http://docs.python.org/library/multiprocessing.html&quot;&gt;multiprocessing&lt;/a&gt;’s
&lt;code&gt;Queue&lt;/code&gt; and &lt;code&gt;Pipe&lt;/code&gt;. A pattern often seen is using a queue for sending messages
from multiple producers to a single consumer.&lt;/p&gt;
&lt;p&gt;When a producer wants a response to its message, I create a &lt;code&gt;Pipe&lt;/code&gt; and
piggy-back one end of the &lt;code&gt;Pipe&lt;/code&gt; (a &lt;code&gt;Connection&lt;/code&gt; object) to the message. I use
Python dicts as messages, and use the string “reply_to” as the dictionary key
for the connection objects.&lt;/p&gt;
&lt;p&gt;When the queue consumer processes a message, it doesn’t know who the sender is
or how to reach him. Though, if the message has an attached &lt;code&gt;Connection&lt;/code&gt;
object, the consumer can–almost magically–respond to the sender, across
thread and process boundaries.&lt;/p&gt;
&lt;p&gt;All good? Nope.&lt;/p&gt;</summary>
        
    </entry>
</feed>
