<?xml version="1.0"?>
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:foaf="http://xmlns.com/foaf/0.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://planet.twistedmatrix.com/">
	<title>Planet Twisted</title>
	<link>http://planet.twistedmatrix.com/</link>
	<description>Planet Twisted - http://planet.twistedmatrix.com/</description>

	<items>
		<rdf:Seq>
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-1820178802485273800" />
			<rdf:li rdf:resource="http://thomas.apestaart.org/log/?p=1550" />
			<rdf:li rdf:resource="http://thomas.apestaart.org/log/?p=1545" />
			<rdf:li rdf:resource="http://thomas.apestaart.org/log/?p=1537" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-1092305370649938155" />
			<rdf:li rdf:resource="http://thomas.apestaart.org/log/?p=1533" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-5733547231775030285.post-1027076933217666834" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-5475982410609322184" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-1607892591835290429" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-434503138479121633" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-5693343238430975953" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-8113216263265382755" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-2947402524675148975" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-421072588329505406" />
			<rdf:li rdf:resource="http://moshez.wordpress.com/?p=828" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-2550867840265368435" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-9134345096761195058" />
			<rdf:li rdf:resource="http://moshez.wordpress.com/?p=826" />
			<rdf:li rdf:resource="tag:metajack.im:/2013/04/12/servo-update-upgrading-rust-gpu-rendering-and-automation/" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-5675153596571600829" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-1320441927711091098" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-8427610361209978790" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-4026604049418320001" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-7234681690694906707" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3067593860715012258.post-4310396179458702224" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-4350363846291077818.post-3291509457723722664" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-8061385243879530981" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-7215023495721058298" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-4906908003210950630" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-5989945146803525157" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-1267458971896358542.post-3283253923216843238" />
			<rdf:li rdf:resource="http://ashfall.github.com/blog/2013/03/23/pycon-2013-down-the-rabbit-hole" />
			<rdf:li rdf:resource="tag:metajack.im:/2013/03/22/joining-mozilla/" />
			<rdf:li rdf:resource="http://dreid.org/2013/03/22/the-talks-i-saw-at-pycon" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-3233128.post-8985265003193719658" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-1370493477066019323" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-5089448061330896036" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-2334767543439035515" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-6731652472434740839" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8825992.post-8627823263389307658" />
		</rdf:Seq>
	</items>
</channel>

<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-1820178802485273800">
	<title>Twisted Matrix Laboratories: Migration Report</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/f1Hs3pETcpc/migration-report.html</link>
	<content:encoded>&lt;p&gt;I have completed the migration &lt;a href=&quot;https://github.com/twisted-infra/braid&quot;&gt;scripts&lt;/a&gt; for deploying the &lt;a href=&quot;https://github.com/twisted-infra&quot;&gt;services&lt;/a&gt;
currently running on cube. They have been run against our new
machine, dornkirk which is currently running with a snapshot of data.
&lt;/p&gt;
&lt;p&gt;
It can currently be accessed by putting
&lt;/p&gt;


&lt;pre class=&quot;example&quot;&gt;66.35.39.66     twistedmatrix.com speed.twistedmatrix.com
&lt;/pre&gt;

&lt;p&gt;
in &lt;code&gt;/etc/hosts&lt;/code&gt;. Please tests it, and verify that things appear to be
working, but be aware that any changes will be lost, when the
transition occurs.
&lt;/p&gt;
&lt;p&gt;
At some point Monday or Tuesday, there will be some downtime for mail
and the mailing lists, as mail-service is migrated to the new
machine. For those that have accounts on cube, your data will be
copied to the new machine at this point.
&lt;/p&gt;
&lt;p&gt;
On Wednesday, at about 10 MDT (16 UTC), there will be downtime of all
twisted services, as live data is transfered over. This may last
up-to a couple of hours.
&lt;/p&gt;
&lt;p&gt;
This work is made possible by the sponsorship of individuals and
organizations which have donated to the Twisted project, part of the
Software Freedom Conservancy, a not-for-profit organization that helps
promote, improve, and develop open source software.  Thanks!
&lt;/p&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/f1Hs3pETcpc&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-05-19T06:45:55+00:00</dc:date>
	<dc:creator>Tom Prince (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="http://thomas.apestaart.org/log/?p=1550">
	<title>Thomas Vander Stichele: Organizing photo libraries</title>
	<link>http://thomas.apestaart.org/log/?p=1550</link>
	<content:encoded>&lt;p&gt;The weather’s picking up so it’s time for spring cleaning around the house.  When I moved back to Barcelona three years ago I took with me my old analogue photos and negatives, with the idea of sorting through them at some point and getting them digitized.  And while I’m at it, maybe it’s time to pull all my various folders of photos together too and organize them.&lt;/p&gt;
&lt;p&gt;Well, I finally started.  I grouped the negatives, labeled them by year, put them in individual envelopes, and handed them off to a professional lab to scan them after doing a quick test run on one set (which turned out great, but it’s *really* annoying me that they scan to JPEG by default, charge 40% extra for TIFF, and use a non-multiple-of-8 resolution to scan at which means I can’t losslessly rotate the negatives.  Yes, I’m anal.)&lt;/p&gt;
&lt;p&gt;So now I pulled together all my various folders of photos, and before I start doing tagging and stuff like that, I want to organize them in a decent folder layout.  Googling for ideas pretty much suggests that the way to go is&lt;/p&gt;
&lt;p&gt;YYYY/MM/DD&lt;/p&gt;
&lt;p&gt;with possibly some description together with the DD&lt;/p&gt;
&lt;p&gt;I’m not really happy about that, however, because there are certain things I’d like to be able to do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;easily see where photos come from – did I make them ? did I get them from someone ? Did I download them from Facebook ?&lt;/li&gt;
&lt;li&gt;Are these original files from a camera without editing ?&lt;/li&gt;
&lt;li&gt;Are these the original scans ? From negatives ? From actual photos ? Or are they retouched, rotated, denoised, …&lt;/li&gt;
&lt;li&gt;Are these photos SFW ? Can I point my media center slideshow to this directory and have it safely show any photos under it ? (What do you mean, you’ve never snowboarded at night in only your underwear, and mooning the photographer ?) Or maybe not even SFW, but simply watchable and reasonable quality or subject material?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I realize some of these issues can not be resolved simply with a directory layout.  But I’m sure some of you must have had similar issues or come up with a slightly better layout ? &lt;/p&gt;
&lt;p&gt;Point me in the right direction please.&lt;/p&gt;</content:encoded>
	<dc:date>2013-05-18T11:51:02+00:00</dc:date>
	<dc:creator>Thomas</dc:creator>
</item>
<item rdf:about="http://thomas.apestaart.org/log/?p=1545">
	<title>Thomas Vander Stichele: morituri and Hidden Track One Audio</title>
	<link>http://thomas.apestaart.org/log/?p=1545</link>
	<content:encoded>&lt;p&gt;I have tomorrow (saturday) blocked out for a whole day of &lt;a href=&quot;https://thomas.apestaart.org/morituri/trac&quot;&gt;morituri&lt;/a&gt; hacking as I will be home alone.&lt;/p&gt;
&lt;p&gt;One of the things a lot of morituri users are puzzled by is its relentless drive to extract every single sample of audio from the CD.  Currently, even if it’s a really short pre-gap, and most likely just an inaccurate master or burn, with no useful audio in it.&lt;/p&gt;
&lt;p&gt;For me, that was a design goal of morituri – I want to be able to exactly reproduce a CD as is.  That is to say, ripping a CD should extract *all* audio from the CD, and it should be possible to make a copy of that CD and then rip that copy, and end up with exactly the same result as from the original CD.  (I’m sure there’s a fancy scientific term for that that I can’t remember right now)&lt;/p&gt;
&lt;p&gt;To a lot of other people, it seems to be annoying and they don’t like having those small almost empty files lying around.&lt;/p&gt;
&lt;p&gt;So I thought I’d do something about that, and that it might be useful as well to analyze my current collection of tracks and figure out what’s in there.  Maybe I can find some hidden gems that I hadn’t noticed before?&lt;/p&gt;
&lt;p&gt;So I added a quick task to morituri that calculates the maximum sample value (I didn’t want to use my own level element in GStreamer for this as I wanted to make sure it was actual digital zero; this should be done in an element instead though, but I preferred the five minute hack for this one).&lt;/p&gt;
&lt;p&gt;And then I ran:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
rip debug maxsample /mnt/nas/media/audio/rip/morituri/own/album/*/00*flac
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Sadly, that turned up 0 as the biggest sample for all these tracks!&lt;/p&gt;
&lt;p&gt;Wait, what? I spent all that time on getting those secret tracks ripped just to get none? That’s not possible! I know some of those tracks!&lt;/p&gt;
&lt;p&gt;Maybe the algorithm is wrong.  Nope, it works fine on all the regular tracks.&lt;/p&gt;
&lt;p&gt;Oh, crap.  Maybe morituri has been ripping silence all this time because my CD drive can’t get that data off.  Yikes, that would be a bit of egg on my face.&lt;/p&gt;
&lt;p&gt;No, it works if I check that Bloc Party track I know about.&lt;/p&gt;
&lt;p&gt;Ten minutes of staring at the screen to realize that, while I was outputting names from a variable from the for loop over my arguments, the track I was actually passing to the task was always the first one.  Duh.  Problem solved.&lt;/p&gt;
&lt;p&gt;As for what I found in my collection:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a cute radio jingle that brought back memories from a live bootleg I had made myself of Bloem.  That’s from over ten years ago, but that must have been around the time I learned about the existence of HTOA and wanted to get one in&lt;/li&gt;
&lt;li&gt;found unknown HTOA tracks on Art Brut’s Bang Bang Rock &amp;amp; Roll, Mew’s Half the world is watching me; not their best stuff&lt;/li&gt;
&lt;li&gt;soundscapey or stagesetting tracks on QOTSA’s Songs for the Deaf, Motorpsycho’s Angels and Daemons at play And Blissard; not that worth it (the Blissard track was ok, but really quiet)&lt;/li&gt;
&lt;li&gt;
Pulp hid a single piano chord in a 2 second pre-gap on This is Hardcore; very curious.  It’s not an intro to the first track, because it doesn’t fit with the sound at all.
&lt;/li&gt;
&lt;li&gt;Damien Rice hid a demo version of 9 Crimes (the first track) in the pregap; instead of piano and female vocals, he plays guitar and sings all the parts.&lt;/li&gt;
&lt;li&gt;Got reacquainted with my favourite HTOA tracks: the orchestral quasi-wordless medley on the Luke Haines/Das Capital disc; the first Bloc Party album with a beautiful instrumental (up there with the hidden track at the end of Placebo’s first album; both bands delivering an atypical but stunning moodscape; the beautiful cover of Ben Kenobi’s Theme by Arab Strap on the Cherubs EP (no idea why that landed in my album dir, that needs to be fixed); the silly Soulwax skit for their second album.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Of course, Wikipedia has the &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_albums_with_tracks_hidden_in_the_pregap&quot;&gt;last word on everything&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I note that they think Pulp recorded a cymbal, not a piano.  And now that I see the title of the QOTSA hidden track, I get the joke I think.&lt;/p&gt;
&lt;p&gt;In total, on my album collection of 1564 full CD’s, I have 171 HTOA’s ripped, 138 tracks of pure digital silence, and only about 11 are actually useful tracks.&lt;/p&gt;
&lt;p&gt;I expected to find more gems in my collection.  I’ll go through ep’s, singles and compilations next just to be sure.&lt;/p&gt;
&lt;p&gt;But with this code in hand, maybe it’s time to add something to morituri to save the silent HTOA tracks as pure .cue information.&lt;/p&gt;</content:encoded>
	<dc:date>2013-05-10T20:08:31+00:00</dc:date>
	<dc:creator>Thomas</dc:creator>
</item>
<item rdf:about="http://thomas.apestaart.org/log/?p=1537">
	<title>Thomas Vander Stichele: Votes for talks at open source conferences</title>
	<link>http://thomas.apestaart.org/log/?p=1537</link>
	<content:encoded>&lt;p&gt;I’ve never been a fan of voting for talks, because it tends to be poorly implemented under the guise of democracy.  Of course it’s easy for me to talk, I’ve never organized anything at that scale.&lt;/p&gt;
&lt;p&gt;I’ll give two examples on why I feel this way, one of which triggering today’s blog post.&lt;/p&gt;
&lt;p&gt;First off, my colleague Marek submitted a talk to Djangocon.  The talk was about how to use &lt;a href=&quot;https://github.com/f3at/feat&quot;&gt;feat&lt;/a&gt; (a toolkit we wrote for livetranscoding) to serve Django pages, but in such a way that they can use Deferreds to remove the concurrency bottleneck of “1 request at a time” per process running Django.&lt;/p&gt;
&lt;p&gt;Personally, to me, this is one of the most irritating design choices of Django – from the ground up it was built synchronously (which could have been fine in most places).  But the fact that, when you get a request, you have to always synchronously respond to it (and block every other request for that process in the meantime) is a design choice that could have easily been avoided.&lt;/p&gt;
&lt;p&gt;In our particular use case, it was really painful.  If our website has to do an API request to some other service we don’t control that can easily take 30 seconds, our process throughput suddenly becomes 2 pages per minute.  All the while, the server is sitting there waiting.&lt;/p&gt;
&lt;p&gt;Yes, you can throw RAM at the problem and start 30 times more processes; or thread out API requests; or farm it out to Celery, and do some back-and-forthing to see when the call’s done.  Or do any other number of workarounds for a fundamental design choice.&lt;/p&gt;
&lt;p&gt;Since we like Twisted, we preferred to throw Twisted at the problem, and ended up with something that worked.&lt;/p&gt;
&lt;p&gt;Anyway, that’s a lot of setup to explain what the talk was about.  Marek submitted the talk to DjangoCon, and honestly I didn’t expect it to get much traction because, when you’re inside Django, you think like Django, and you don’t really realize that this is a real problem.  Most people who do realize it switch away to something else.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But to my surprise, Marek’s talk was the most-voted talk!&lt;/strong&gt; I wish I could link to the results, but of course that vote site is no longer online.&lt;/p&gt;
&lt;p&gt;I guess I expected that would mean he’d be presenting at DjangoCon this year.  So I asked him today when his talk was, and he said “Oh that’s right.  I did not get accepted.”&lt;/p&gt;
&lt;p&gt;Well, that was a surprise.  Of course, the organising committee reserves the right to decide on their own – maybe they just didn’t like the talk.  But if you ask your potential visitors to vote, you’d expect the most-voted talk to make it on the schedule no ?&lt;/p&gt;
&lt;p&gt;The feedback Marek got from them was surprising too, though.  Their first response was that this talk was too similar to another talk, titled “How to combine JavaScript &amp;amp; Django in a smart way”.  Now, I’m not a JavaScript expert, but from the title alone I can already tell that it’s very unlikely that these two talks have many similarities beyond the word ‘Django’.&lt;/p&gt;
&lt;p&gt;After refuting that point, their second reason was that they wanted more experienced speakers (but they didn’t ask Marek for his experience), and their third reason was that the talk was in previous editions of DjangoCon US/EU (it’s unclear whether they meant his talk or the JavaScript one, but Marek’s definitely wasn’t, and we couldn’t find any mention of the other talk in previous conferences.  I’m also not sure why that even matters one way or the other. This email thread was in Polish, so I have to rely on Marek’s interpretation of it)&lt;/p&gt;
&lt;p&gt;Personally, my reaction would have been to complain to the organizers or Django maintainers.  Marek’s flegmatic attitude was much better though – after such an exchange, he simply doesn’t want to have anything to do with the conference.&lt;/p&gt;
&lt;p&gt;He’s probably right – &lt;strong&gt;it’s hard to argue with someone who doesn’t want to invite you and is lying about the reasons.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The second example is &lt;a href=&quot;http://bcndevcon.org/&quot;&gt;BCNDevCon&lt;/a&gt;, a great conference here in Barcelona, organized by a guy who used to work for Flumotion who I have enormous respect for.  I’ve never seen anyone create such a big conference over so little time.&lt;/p&gt;
&lt;p&gt;He believes strongly in the democratic aspect, and as far as I can tell constructs the schedule solely based on the votes.&lt;/p&gt;
&lt;p&gt;Sadly I didn’t go to the last one, and the reason is simply because I felt that the talks that made it were too obviously corporate.  A lot of talks were about Microsoft products, and you could tell that they won votes because people’s coworkers voted on talks.  I’m not saying that’s necessarily wrong – given that he worked at our company and has friends here, I’m sure people working here presenting at his conference have also done vote tending.  It’s natural to do so.  But there should be a way to balance that out.&lt;/p&gt;
&lt;p&gt;I think the idea of voting is good, but implementation matters too.  Ideally, you would only want people that actually are going to show up to vote.  I have no idea how you can ensure that, though.  Do you ask people to pre-pay ? Do you ask them to commit to pay if at least 50% of their votes make it in the final schedule, kickstarter-style ?&lt;/p&gt;
&lt;p&gt;These two examples are on opposite extremes of voting.  One conference simply disregards completely what people vote on.  If I had voted or bought a ticket, I would feel lied to.  Why waste the time of so many people? The other conference puts so much stock in the vote, that I feel the final result was strongly affected.  I seriously doubt all those Windows 8 voters actually showed up.&lt;/p&gt;
&lt;p&gt;Does anyone have good experiences with conference voting that did work? Feel free to share!&lt;/p&gt;</content:encoded>
	<dc:date>2013-05-07T11:53:26+00:00</dc:date>
	<dc:creator>Thomas</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-1092305370649938155">
	<title>Twisted Matrix Laboratories: April end-month report</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/8Gd_AiPANzk/april-end-month-report.html</link>
	<content:encoded>&lt;p&gt;
During the second half of the month, I have concentrated on the
continuing development &lt;a href=&quot;https://github.com/twisted-infra/braid&quot;&gt;tools&lt;/a&gt; to automate the deployment of twisted
infrastructure.
&lt;/p&gt;
&lt;p&gt;
I've also spent some time developing some command-line &lt;a href=&quot;https://github.com/tomprince/amptrac&quot;&gt;tools&lt;/a&gt; for
interacting with trac. It currently support view tickets, listing
review tickets, and grabbing attachments (including applying them in
git with an appropriate commit message). I plan to add support for
doing reviews, as well.
&lt;/p&gt;
&lt;p&gt;
This work is made possible by the sponsorship of individuals and
organizations which have donated to the Twisted project, part of the
Software Freedom Conservancy, a not-for-profit organization that helps
promote, improve, and develop open source software.  Thanks!
&lt;/p&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/8Gd_AiPANzk&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-05-04T02:10:26+00:00</dc:date>
	<dc:creator>Tom Prince (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="http://thomas.apestaart.org/log/?p=1533">
	<title>Thomas Vander Stichele: If I was 16 years younger…</title>
	<link>http://thomas.apestaart.org/log/?p=1533</link>
	<content:encoded>&lt;p&gt;I’d totally try and be the &lt;a href=&quot;https://blog.pinboard.in/2013/04/seeking_a_summer_pintern/&quot;&gt;intern for pinboard&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The money is great for a summer job, but that’s not the important part.  pinboard seems interesting, it’s a real service, and it’s (I assume) small enough to understand from top to bottom.  Contrary to, say, a Google Summer of Code project, you get to touch a real existing service, and from what I can tell from the blog you get to do it with a smart and funny guy.&lt;/p&gt;
&lt;p&gt;You’ve got five weeks left; even if you’re in the middle of exams right now, apply!&lt;/p&gt;
&lt;p&gt;(And if you do, why not add the features to merge and rename tags while you’re at it?)&lt;/p&gt;</content:encoded>
	<dc:date>2013-05-03T21:30:25+00:00</dc:date>
	<dc:creator>Thomas</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-5733547231775030285.post-1027076933217666834">
	<title>Jonathan Lange: Deliberately being naughty</title>
	<link>http://code.mumak.net/2013/04/deliberately-being-naughty.html</link>
	<content:encoded>I don't get a whole lot of time to hack on things outside of work. Maybe one or two slots of about two hours in a good week. What I want is for that time to be fun, creative, and hopefully useful for others.&lt;br /&gt;&lt;br /&gt;When I do get such discretionary time, what I often end up doing is code review. I believe that finishing things is more important than starting them, and know how much it sucks to be waiting for someone to review your code.&lt;br /&gt;&lt;br /&gt;So, I'll do a couple of code reviews (some of which might be strictly blocking on me). And then I'll run out of time.&lt;br /&gt;&lt;br /&gt;This means I rarely work on anything I actually find fun. Code reviews are rarely fun.&lt;br /&gt;&lt;br /&gt;There's a similar, related thing working on a project that's got a backlog of code reviews, like, say Twisted. Twisted has forty or fifty patches right now that are waiting for someone to review them. Do I want to fix bugs in Twisted? That would be contributing to the patch problem, so probably not. Do I want to do code reviews? Well, I guess I should, but I'll probably find something else to do instead.&lt;br /&gt;&lt;br /&gt;I don't think Twisted should change its policy. I think the solution is for people like me to volunteer more time doing something they don't necessarily enjoy for the sake of achieving some broader, nobler outcome.&lt;br /&gt;&lt;br /&gt;However, for me to sustain myself and keep enjoying open source and my chosen career, I've decided to make sure that I regularly schedule &quot;naughty time&quot;. That's going to be time where I don't work on the thing that I should be working on, but instead play with something I find interesting at the time, even if it's not the best thing to do.</content:encoded>
	<dc:date>2013-04-29T13:23:33+00:00</dc:date>
	<dc:creator>Jonathan Lange (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-5475982410609322184">
	<title>Future Foundries: Unittesting With Localized Patching</title>
	<link>http://blog.futurefoundries.com/2013/04/unittesting-with-localized-patching.html</link>
	<content:encoded>In my previous two posts, I gave examples of alternatives to patching in unittests: &lt;a href=&quot;http://blog.futurefoundries.com/2013/04/unittesting-without-patching.html&quot;&gt;class-based&lt;/a&gt; and &lt;a href=&quot;http://blog.futurefoundries.com/2013/04/unittesting-without-patching-followup.html&quot;&gt;function-based&lt;/a&gt; parameterization. Nick Coghlan pointed out that my example of patching was a little bit of a strawman argument - the most global (and therefore the most side-effecty) way of doing patching. Here's what he wrote:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;While  your point about the risks of patching destructive calls is valid, if  you're going to decry the practice of using mocks in tests, at least  decry a version which uses them properly. In your first example you are  patching the wrong module - you shouldn't patch os._exit (with  potentially non-local effects), you should patch the module under test  so that *in that module only*, the reference &quot;os._exit&quot; resolves to your  patched function.&lt;br /&gt;&lt;br /&gt;Most functions under test *aren't* destructive  (so you'll get the expected test result failure), and by jumping  straight to dependency injection in cases where you don't need it, you  can end up adding a huge amount of complexity to your production code  without adequate reason *and* give yourself additional code paths to  test in the process. Dependency injection should be used only if there  is a *production* related reason for adding it (and &quot;this function is  destructive, so we should use dependency injection rather than mocking  to test it&quot; is a valid reason).&lt;br /&gt;&lt;br /&gt;For those non-destructive cases,  you can avoid most of the non-local effects without adding complexity to  the production code by localising your mock operation to as narrow a  target as possible. &lt;/blockquote&gt;The version of patching he suggests is definitely a lot better than my initial example, so let's take a look. First, the module we're going to test: &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;import os&lt;br /&gt;&lt;br /&gt;def exit_with_result(function):&lt;br /&gt;    result = function()&lt;br /&gt;    if result:&lt;br /&gt;        os._exit(0)&lt;br /&gt;    else:&lt;br /&gt;        os._exit(1)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;And now the patch-based tests, based on example code from Nick Coghlan (any mistakes were added by me): &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;import unittest&lt;br /&gt;# Note that we don't import os, because we're not touching it!&lt;br /&gt;&lt;br /&gt;import exitersketch&lt;br /&gt;&lt;br /&gt;class FakeOS:&lt;br /&gt;    EXIT_NOT_CALLED = object()&lt;br /&gt;    CALLED_WITH_DEFAULT = object()&lt;br /&gt;&lt;br /&gt;    def __init__(self, module):&lt;br /&gt;        self.module = module&lt;br /&gt;        self.exit_code = self.EXIT_NOT_CALLED&lt;br /&gt;&lt;br /&gt;    def _exit(self, code=CALLED_WITH_DEFAULT):&lt;br /&gt;        self.exit_code = code&lt;br /&gt;&lt;br /&gt;    def __getattr__(self, attr):&lt;br /&gt;        return getattr(self.original_os, attr)&lt;br /&gt;&lt;br /&gt;    def __enter__(self):&lt;br /&gt;        self.original_os = self.module.os&lt;br /&gt;        self.module.os = self&lt;br /&gt;        return self&lt;br /&gt;&lt;br /&gt;    def __exit__(self, *args):&lt;br /&gt;        self.module.os = self.original_os&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ExiterTests(unittest.TestCase):&lt;br /&gt;&lt;br /&gt;    def test_exiter_success(self):&lt;br /&gt;        with FakeOS(exitersketch) as fake:&lt;br /&gt;            exitersketch.exit_with_result(lambda: True)&lt;br /&gt;        self.assertEqual(fake.exit_code, 0)&lt;br /&gt;&lt;br /&gt;    def test_exiter_failure(self):&lt;br /&gt;        with FakeOS(exitersketch) as fake:&lt;br /&gt;            exitersketch.exit_with_result(lambda: False)&lt;br /&gt;        self.assertEqual(fake.exit_code, 1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    unittest.main()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;This version is definitely a superior form of patching: only one module's view is impacted. Notice also the use of &lt;code&gt;__getattr__&lt;/code&gt; to ensure overriding &lt;code&gt;exitersketch.os&lt;/code&gt; only overrides &lt;code&gt;os._exit&lt;/code&gt; and not other parts of the &lt;code&gt;os&lt;/code&gt; module. Nonetheless, it still suffers from the inherent problem of patching: it's overriding more state than necessary. Thus it's still possible to call destructive functions by mistake if you rearrange your imports. For non-destructive functions it's still possible to have a test unexpectedly call a patched function, albeit only from code in the same module rather than globally. If you are going to use patching, though, making the patching as local as possible is definitely the way to go.</content:encoded>
	<dc:date>2013-04-25T19:05:28+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-1607892591835290429">
	<title>Future Foundries: Unittesting Without Patching: A Followup</title>
	<link>http://blog.futurefoundries.com/2013/04/unittesting-without-patching-followup.html</link>
	<content:encoded>I got a couple questions about &lt;a href=&quot;http://blog.futurefoundries.com/2013/04/unittesting-without-patching.html&quot;&gt;my previous post&lt;/a&gt; asking why I didn't show the simpler, function-based style of parameterization. This style does make unittesting possible, and with less complexity than creating a new class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;import os&lt;br /&gt;&lt;br /&gt;def exit_with_result(function, _exit=os._exit):&lt;br /&gt;    result = function()&lt;br /&gt;    if result:&lt;br /&gt;        _exit(0)&lt;br /&gt;    else:&lt;br /&gt;        _exit(1)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The problem is that when you add arguments to a function, the parameterization leaks into your public API. This means that:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You need to document the fact that these extra arguments (e.g. &lt;code&gt;_exit&lt;/code&gt; in the example above) should not be used.&lt;/li&gt;&lt;li&gt;&lt;code&gt;*args&lt;/code&gt; and &lt;code&gt;**kwargs&lt;/code&gt; can't be used at all.&lt;/li&gt;&lt;li&gt;Changing the function signature later on can be more difficult.&lt;/li&gt;&lt;li&gt;If you have large numbers of things you need to parameterize, the function definition gets pretty long and ugly.&lt;/li&gt;&lt;/ul&gt;In the class style in contrast the public API is not affected by the need to unittest.&lt;br /&gt;&lt;br /&gt;What's more, you will often have a group of related functions using the same modules, functions or classes. By grouping them in a class, you can implement the parameterization hook once, rather than for every function. You can see an example of this &lt;a href=&quot;https://github.com/itamarst/crochet/blob/master/crochet/_eventloop.py&quot;&gt;in Crochet&lt;/a&gt; (specifically the &lt;code&gt;Eventloop&lt;/code&gt; class), where the parameterized reactor is used by multiple functions. If the code you need to parameterize is already a method, setting the parameters in &lt;code&gt;__init__&lt;/code&gt; or as a class attribute is even more attractive, requiring only minimal additional complexity.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; If you go with this style of parameterization, you still need to assert that in the default case it actual calls the correct function (e.g. &lt;code&gt;os._exit&lt;/code&gt; for &lt;code&gt;exit_with_result&lt;/code&gt;). Probably the nicest way to do so is to use &lt;code&gt;inspect.getcallargs&lt;/code&gt;.</content:encoded>
	<dc:date>2013-04-25T18:40:41+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-434503138479121633">
	<title>Duncan McGreggor: OpenStack Developer Summit: Heat Followup</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/oL4onDmS1JI/openstack-developer-summit-heat-followup.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-2hnHY6RH64w/UVxf7PCDPvI/AAAAAAAAAEI/F2fdJljI62g/s1600/openstack-logo52.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-2hnHY6RH64w/UVxf7PCDPvI/AAAAAAAAAEI/F2fdJljI62g/s1600/openstack-logo52.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Folks are finally starting to recover from the OpenStack Developer Summit that was held in Portland, Oregon recently. All reports indicate that it was a truly phenomenal experience, record-breaking in many ways, and something that has inspired incredible enthusiasm within the community. And that's great news, since there's an enormous amount of work to be done this release ;-)&lt;br /&gt;
&lt;br /&gt;
Of particular &lt;a href=&quot;http://technicae.cogitat.io/2013/04/autoscale-and-orchestration-heat-of.html&quot;&gt;importance to many&lt;/a&gt; in the community is the work around maturing the autoscaling feature in &lt;a href=&quot;https://wiki.openstack.org/wiki/Heat&quot;&gt;OpenStack Heat&lt;/a&gt;. There was a fantastic session at the summit, facilitated by the bow-tied and most dapper Ken Wronkiewicz (&lt;a href=&quot;http://www.rackspace.com/blog/the-heat-is-on-for-autoscaling-at-openstack-summit-portland/&quot;&gt;his notes from the Summit&lt;/a&gt; were published on the Rackspace blog). &lt;br /&gt;
&lt;br /&gt;
In preparation for the session, the following resources were created:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blueprints.launchpad.net/heat/+spec/heat-autoscaling&quot;&gt;https://blueprints.launchpad.net/heat/+spec/heat-autoscaling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://etherpad.openstack.org/heat-autoscaling&quot;&gt;https://etherpad.openstack.org/heat-autoscaling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.openstack.org/cfp/details/172&quot;&gt;http://summit.openstack.org/cfp/details/172&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
That one in the middle is important, as it is also where notes were taken during the actual session itself (see the section entitled &quot;ODS Session Notes&quot;). Devs at Rackspace have started going through the notes from the session and started planning work around this -- all of which will be carried on in the open, on the OpenStack mail list (tagged with &quot;[Heat]&quot;), on Freenode, and on &lt;a href=&quot;https://github.com/openstack/heat/&quot;&gt;github&lt;/a&gt;/&lt;a href=&quot;https://review.openstack.org/#/q/status:open,n,z&quot;&gt;gerrit&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The discussion at the Summit indicated strong interest in building a REST API for the existing autoscaling feature. Needless to say, there is a lot involved in this, touching upon significant OpenStack components like Quantum, LBaaS, and Ceilometer. Once the appropriate code is in place, a REST API will need to be created, features will need to be expanded/added, etc., and we'll be off and running :-)&lt;br /&gt;
&lt;br /&gt;
Lots to do, and lots of great energy and excitement around this to keep us all chugging through this cycle.&lt;br /&gt;
&lt;br /&gt;
On that note, we'd like to send out a special &quot;thanks&quot; to all the countless folks who worked so hard to make ODS happen. This event anchors us in a most excellent way, providing the insight and fuel that supports future development work so well!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=oL4onDmS1JI:NUlN-S1dlY0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=oL4onDmS1JI:NUlN-S1dlY0:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=oL4onDmS1JI:NUlN-S1dlY0:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=oL4onDmS1JI:NUlN-S1dlY0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=oL4onDmS1JI:NUlN-S1dlY0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=oL4onDmS1JI:NUlN-S1dlY0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=oL4onDmS1JI:NUlN-S1dlY0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=oL4onDmS1JI:NUlN-S1dlY0:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/oL4onDmS1JI&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-23T23:55:39+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-5693343238430975953">
	<title>Duncan McGreggor: Tea Time at Rackspace SF</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/LUqfPe-1VXg/tea-time-at-rackspace-sf.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-7CErHoGdA60/UXb5kkQzw5I/AAAAAAAAAE0/KFhmC2Zq3D4/s1600/traditional-chinese-tea-ceremony.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-7CErHoGdA60/UXb5kkQzw5I/AAAAAAAAAE0/KFhmC2Zq3D4/s1600/traditional-chinese-tea-ceremony.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;177&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the Rackspace teams here in the SF office doesn't to standups; it does &quot;tea time&quot; instead. A delightful change, to be sure. One of my coworkers published a &lt;a href=&quot;http://www.rackspace.com/blog/tea-time-because-we-wont-stand-for-a-standup/&quot;&gt;Rackspace blog post&lt;/a&gt; about this today.&lt;br /&gt;
&lt;br /&gt;
More than a gratutious reblog, I wanted to highlight this bit of lovely coincidence I came across while reading &lt;a href=&quot;http://www.amazon.com/Turings-Cathedral-Origins-Digital-Universe/dp/0375422773&quot;&gt;Turing's Cathedral&lt;/a&gt; last night: &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;Afternoon tea— a ritual introduced at Fine Hall by Oswald Veblen, who, according to Herman Goldstine, “tried awfully hard to be an Englishman”— was served on real china daily at exactly three o’clock. According to Oppenheimer, “tea is where we explain to each other what we do not understand.”&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Dyson, George (2012-03-06). Turing's Cathedral: The Origins of the Digital Universe (p. 90). Knopf Doubleday Publishing Group. Kindle Edition.  &lt;/i&gt;&lt;/blockquote&gt;
The part of the book where this quote occurred was discussing &lt;a href=&quot;http://www.ias.edu/articles/fine-hall&quot;&gt;Fine Hall&lt;/a&gt; 
which was built for Von Neumann's computer team at the Princeton 
Institute for Advanced Studies.&lt;br /&gt;
&lt;br /&gt;
And, yes, tea time is a great time for our team mates to explain to each other what they don't understand.&lt;br /&gt;
&lt;br /&gt;
In case you missed it above, here's the link again:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;a href=&quot;http://www.rackspace.com/blog/tea-time-because-we-wont-stand-for-a-standup/&quot;&gt;http://www.rackspace.com/blog/tea-time-because-we-wont-stand-for-a-standup/&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=LUqfPe-1VXg:zeB0gaqwGvs:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=LUqfPe-1VXg:zeB0gaqwGvs:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=LUqfPe-1VXg:zeB0gaqwGvs:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=LUqfPe-1VXg:zeB0gaqwGvs:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=LUqfPe-1VXg:zeB0gaqwGvs:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=LUqfPe-1VXg:zeB0gaqwGvs:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=LUqfPe-1VXg:zeB0gaqwGvs:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=LUqfPe-1VXg:zeB0gaqwGvs:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/LUqfPe-1VXg&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-23T22:48:13+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-8113216263265382755">
	<title>Twisted Matrix Laboratories: April mid-month Fellowship report</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/0x_acxT2ICI/april-mid-month-fellowship-report.html</link>
	<content:encoded>&lt;p&gt; 
During the first half of the month, 43 tickets got some attention that they
would not have received without the sponsored development.  The result
was 17 closed tickets and 24 other tickets unblocked for other
developers to resume work on.
&lt;/p&gt;
&lt;p&gt;
I set up an official git mirror that contains all the branches,
including release branches and tags on &lt;a href=&quot;https://github.com/twisted/twisted&quot;&gt;github&lt;/a&gt; and documented my
workflow on the &lt;a href=&quot;https://twistedmatrix.com/trac/wiki/GitMirror&quot;&gt;wiki&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I've &lt;a href=&quot;https://twistedmatrix.com/trac/wiki/Infrastructure/CubeSetup&quot;&gt;documened&lt;/a&gt; &lt;a href=&quot;https://github.com/twisted-infra/sandbox&quot;&gt;how&lt;/a&gt; our current infrastructure (&lt;a href=&quot;https://en.wikipedia.org/wiki/Cube_(film)&quot;&gt;cube&lt;/a&gt;), and with the help of Jonathan Stoppani, I've
been working on &lt;a href=&quot;https://github.com/twisted-infra/braid&quot;&gt;scripts&lt;/a&gt; to automate the deployment of its successor (&lt;a href=&quot;http://escaflowne.wikia.com/wiki/Emperor_Isaac_Dornkirk&quot;&gt;dornkirk&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
This work is made possible by the sponsorship of individuals and
organizations which have donated to the Twisted project, part of the
Software Freedom Conservancy, a not-for-profit organization that helps
promote, improve, and develop open source software.  Thanks!
&lt;/p&gt;
&lt;p&gt;
The tickets I reviewed, that have now been closed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/3844&quot;&gt;#3844 (Parse mIRC format codes)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/4696&quot;&gt;#4696 (client endpoint: process)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5386&quot;&gt;#5386 (Get rid of references and code specific to Python 2.3)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5411&quot;&gt;#5411 (ftp_NLST and ftp_LIST should only send data as &quot;str&quot;)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5952&quot;&gt;#5952 (Improve docstring for test_notTrapped in twisted.test.test_failure)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5955&quot;&gt;#5955 (Move inlineCallbacks test from twisted.test.test_failure to somewhere better (test_defer?))&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5989&quot;&gt;#5989 (Standardize twisted names examples to use task.react)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6120&quot;&gt;#6120 (twisted.web.http.Request.__repr__ is untested)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6240&quot;&gt;#6240 (Merge `twisted/internet/_utilspy3.py` into `twisted/internet/utils.py`)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6284&quot;&gt;#6284 (FTP.ftp_STOR() should handle IsADirectoryError error)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6350&quot;&gt;#6350: Add a few unittest2 assertions to TestCase&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6391&quot;&gt;#6391 (Improve the format of http.Request.__repr__ to include eg class and object identity)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6392&quot;&gt;#6392: Typo in test_irc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6400&quot;&gt;#6400 (trial.test.test_directoryNotPackage is incorrect)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6405&quot;&gt;#6405 (os.geteuid and os.getegid are called unnecessarily in SSHPublicKeyDatabase.checkKey)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6430&quot;&gt;#6430 (test_loader.FileTest.test_filenameNotPython should create its test data)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6439&quot;&gt;#6439 (Spelling mistakes in pb-intro.xhtml)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
Other tickets I have reviewed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/2061&quot;&gt;#2061: _sslverify.py: Wrong use of param caCerts in OpenSSLCertificateOptions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/3701&quot;&gt;#3701: Add a checker for ISSHPrivateKey which parameterizes the location of the keys&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/4891&quot;&gt;#4891: twisted.web.http does not throttle pipelined requests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5228&quot;&gt;#5228: twisted.test.test_paths.FilePathTestCase.test_getPermissions_Windows creates undeleteable file&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5270&quot;&gt;#5270: Add API to endpoints for connecting a protocol instance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5329&quot;&gt;#5329: Replace deprecated string functions with str methods in t.w.p.irc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5435&quot;&gt;#5435: twisted.web.client.RedirectAgent doesn't inform caller of final URI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5531&quot;&gt;#5531: Add anonymous support to Conch SSHFactory&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5532&quot;&gt;#5532: AMP Command specification format&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5787&quot;&gt;#5787: trial –order for selecting an order for running test cases&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5795&quot;&gt;#5795: Failure's startDebugMode should allow using a debugger other than pdb&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/585&quot;&gt;#585: Include sendfile(2) support into defaultreactor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5951&quot;&gt;#5951: Documentation for the best way to get a reference to a reactor reads as contradictory&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6115&quot;&gt;#6115: twisted.web.http.parseContentRange has no unit tests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6119&quot;&gt;#6119: twisted.web.http.Request.parseCookies has incomplete test coverage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6166&quot;&gt;#6166: Deprecate pickling support (__getstate__ and __setstate__) in twisted.internet._sslverfiy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6341&quot;&gt;#6341: Replace usage of twisted.python.text and deprecate it&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6342&quot;&gt;#6342: Deprecate twisted.python.hashlib&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6390&quot;&gt;#6390: Using trial -j can result in wrong paths in sys.path&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6393&quot;&gt;#6393: Utility function to pretty-format list of things&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6395&quot;&gt;#6395: Delete twisted.words.protocols.msn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6402&quot;&gt;#6402: twisted.words setup metadata is not up to date anymore&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6426&quot;&gt;#6426: test_mail.py failure&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6437&quot;&gt;#6437: twisted.trial.unittest.TestCase.flushWarnings may fail if run without .py files (with only .pyc or .pyo files)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
Other tickets I have worked on:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6251&quot;&gt;#6251 (Add a helper function for getting the body of an HTTP request.)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6348&quot;&gt;#6348 (trial doesn't show `DeprecationWarnings` by default on 2.7)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/0x_acxT2ICI&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-18T17:15:34+00:00</dc:date>
	<dc:creator>Tom Prince (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-2947402524675148975">
	<title>Future Foundries: Unittesting Without Patching</title>
	<link>http://blog.futurefoundries.com/2013/04/unittesting-without-patching.html</link>
	<content:encoded>&lt;p&gt;Python has the power to override any attribute on any module or class, but just because you can doesn't mean you should. This is true in regular code, but just as true of unittests. Many testing libraries (&lt;code&gt;mock&lt;/code&gt;, Twisted's &lt;code&gt;trial&lt;/code&gt;, &lt;code&gt;py.test&lt;/code&gt;) provide facilities for overriding some piece of global state; you can also do so manually. Occasionally these facilities prove invaluable, but often they are used unnecessarily. Better alternatives are available.&lt;/p&gt; &lt;p&gt;Before I explain why patching is problematic, let's look at an example. Consider the following module:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;import os&lt;br /&gt;&lt;br /&gt;def exit_with_result(function):&lt;br /&gt;    result = function()&lt;br /&gt;    if result:&lt;br /&gt;        os._exit(0)&lt;br /&gt;    else:&lt;br /&gt;        os._exit(1)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;On the face of it patching is necessary to test this example. The tests would look something like this:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;import unittest&lt;br /&gt;import os&lt;br /&gt;&lt;br /&gt;from exitersketch import exit_with_result&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ExiterTests(unittest.TestCase):&lt;br /&gt;    def setUp(self):&lt;br /&gt;        self.exited = None&lt;br /&gt;        self.originalExit = os._exit&lt;br /&gt;        os._exit = self.fakeExit&lt;br /&gt;&lt;br /&gt;    def fakeExit(self, code=0):&lt;br /&gt;        self.exited = code&lt;br /&gt;&lt;br /&gt;    def tearDown(self):&lt;br /&gt;        os._exit = self.originalExit&lt;br /&gt;&lt;br /&gt;    def test_exiter_success(self):&lt;br /&gt;        exit_with_result(lambda: True)&lt;br /&gt;        self.assertEqual(self.exited, 0)&lt;br /&gt;&lt;br /&gt;    def test_exiter_failure(self):&lt;br /&gt;        exit_with_result(lambda: False)&lt;br /&gt;        self.assertEqual(self.exited, 1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    unittest.main()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;Having seen patching, and seen that it works as a testing technique, why should we avoid it?&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Patching is fragile. If the example above changed &lt;code&gt;import os&lt;/code&gt; to &lt;code&gt;from os import _exit&lt;/code&gt;, the patching would need to be modified. However, if you forgot to modify the patching, unexpected code will run.  In this case, your test run will mysterious exit half way through. If the function you are attempting to patch is more destructive, worse things may happen: credit cards may get charged, data may get deleted, etc..&lt;/li&gt;&lt;li&gt;Patching leads to unexpected behaviour. Because patching is a global change, the patched code may be called not just by the function being tested, but by code it is calling which happens to use the same patched code.&lt;/li&gt;&lt;li&gt;Patching indicates bad design. Code code should be designed to be easily testable. Having to modify global state suggests that the code is not as modular as one might hope.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;How to avoid patching? Parameterization, aka dependency injection. We refactor the code to accept the &lt;code&gt;_exit&lt;/code&gt; function as a parameter. Notice the the public API has not changed:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;import os&lt;br /&gt;&lt;br /&gt;class _API(object):&lt;br /&gt;    def __init__(self, exit):&lt;br /&gt;        self.exit = exit&lt;br /&gt;&lt;br /&gt;    def exit_with_result(self, function):&lt;br /&gt;        result = function()&lt;br /&gt;        if result:&lt;br /&gt;            self.exit()&lt;br /&gt;        else:&lt;br /&gt;            self.exit(1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_api = _API(os._exit)&lt;br /&gt;exit_with_result = _api.exit_with_result&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;Our tests can now test both that &lt;code&gt;_API.exit_with_result&lt;/code&gt; class has the correct behavior in general, and that the public &lt;code&gt;exit_with_result&lt;/code&gt; is going to call &lt;code&gt;os._exit&lt;/code&gt; in particular.&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;import unittest&lt;br /&gt;import os&lt;br /&gt;&lt;br /&gt;from exiter import _api, _API, exit_with_result&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ExiterTests(unittest.TestCase):&lt;br /&gt;    def setUp(self):&lt;br /&gt;        self.exited = None&lt;br /&gt;&lt;br /&gt;    def fakeExit(self, code=0):&lt;br /&gt;        self.exited = code&lt;br /&gt;&lt;br /&gt;    def test_api(self):&lt;br /&gt;        self.assertIsInstance(_api, _API)&lt;br /&gt;        self.assertEqual(_api.exit, os._exit)&lt;br /&gt;        self.assertEqual(exit_with_result, _api.exit_with_result)&lt;br /&gt;&lt;br /&gt;    def test_exiter_success(self):&lt;br /&gt;        _API(self.fakeExit).exit_with_result(lambda: True)&lt;br /&gt;        self.assertEqual(self.exited, 0)&lt;br /&gt;&lt;br /&gt;    def test_exiter_failure(self):&lt;br /&gt;        _API(self.fakeExit).exit_with_result(lambda: False)&lt;br /&gt;        self.assertEqual(self.exited, 1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    unittest.main()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;The same technique is useful when you are tempted to store some state in a module. Instead, store an instance of a class:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;class _Counter(object):&lt;br /&gt;    value = 0&lt;br /&gt;&lt;br /&gt;    def increment(self):&lt;br /&gt;        self.value += 1&lt;br /&gt;&lt;br /&gt;    def value(self):&lt;br /&gt;        return self.value&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_counter = _Counter()&lt;br /&gt;increment = _counter.increment&lt;br /&gt;value = _counter.value&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;As I've demonstrated, patching can often be avoided by restructuring code to be more testable. The same Python features that make patching so easy also make avoiding patching just as easy. Given the choice, you should avoid changing global state when testing individual components.&lt;/p&gt;</content:encoded>
	<dc:date>2013-04-18T17:14:20+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-421072588329505406">
	<title>Duncan McGreggor: Cruising HTTP with LFE</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/ATHnopFXsfg/cruising-http-with-lfe.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-fonndtAAXJI/UUAGF-K1LpI/AAAAAAAAADk/YZs-7OwO608/s1600/LispFlavoredErlang-medium.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-fonndtAAXJI/UUAGF-K1LpI/AAAAAAAAADk/YZs-7OwO608/s200/LispFlavoredErlang-medium.png&quot; border=&quot;0&quot; width=&quot;168&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the &lt;a href=&quot;http://technicae.cogitat.io/2013/04/getting-started-with-lfe-on-ubuntu.html&quot;&gt;last post&lt;/a&gt;, you learned how to get LFE running on Ubuntu. This one will give you some insight into how LFE can be used in something approaching real-world problems. In the next post, we're going to jump back into &lt;a href=&quot;http://technicae.cogitat.io/search/label/%CE%BB-calculus&quot;&gt;the lambda calculus&lt;/a&gt;, and we'll see some more LFE shortly after that.&lt;br /&gt;
&lt;br /&gt;
Because &lt;a href=&quot;http://lfe.github.io/&quot;&gt;Lisp Flavored Erlang&lt;/a&gt; is 100% compatible with Erlang Core, it has access to all the Erlang libraries, OTP, and many third-party modules, etc.  Naturally, this includes the Erlang HTTP client, &lt;span&gt;httpc&lt;/span&gt;. Today we're going to be taking a look at how to use &lt;span&gt;httpc&lt;/span&gt; from LFE. Do note, however that this post is only going to provide a taste, just enough to give you a sense of the flavor, as it were. &lt;br /&gt;
&lt;br /&gt;
If you would like more details, be sure to not only give the &lt;a href=&quot;http://erlang.org/doc/man/httpc.html&quot;&gt;official docs&lt;/a&gt; a thorough reading, but to take a look at the &lt;a href=&quot;http://erlang.org/doc/apps/inets/http_client.html&quot;&gt;HTTP Client section&lt;/a&gt; of the &lt;a href=&quot;http://erlang.org/doc/apps/inets/&quot;&gt;&lt;span&gt;inets&lt;/span&gt; Reference Manual&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Note that for the returned values below, I elide large data structures. If you run them in the LFE REPL yourself, you can view them in all of the line-consuming glory.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Synchronous &lt;span&gt;GET&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let's get started with a simple example. The first thing we need to do is start the &lt;span&gt;inets&lt;/span&gt; application. With that done, we'll then be able to make client requests:&lt;br /&gt;


Now we can perform an HTTP &lt;span&gt;GET&lt;/span&gt;:


This just makes a straight-forward HTTP request (defaults to &lt;span&gt;GET&lt;/span&gt;) and returns a bunch of associated data:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;HTTP version&lt;/li&gt;
&lt;li&gt;status code&lt;/li&gt;
&lt;li&gt;reason phrase&lt;/li&gt;
&lt;li&gt;headers&lt;/li&gt;
&lt;li&gt;body&lt;/li&gt;
&lt;/ul&gt;
All of that data is dumped into our &lt;span&gt;result&lt;/span&gt; variable. Here's the same &lt;span&gt;GET&lt;/span&gt; but with pattern matching set up so that we can easily access all that data:&lt;br /&gt;


For those not familiar with Erlang patterns, we've just told LFE the following:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;the return value of the function we're going to call is going to be a tuple composed of an atom (&lt;span&gt;'ok&lt;/span&gt;) and another tuple&lt;/li&gt;
&lt;li&gt;the nested tuple is going to be composed of a tuple, some headers, and a body&lt;/li&gt;
&lt;li&gt;the &lt;i&gt;next&lt;/i&gt; nested tuple is going to be composed of the HTTP version, status code, and status code phrase&lt;/li&gt;
&lt;/ul&gt;
If you'd like to learn more about using patterns in LFE, be sure to view the &lt;a href=&quot;http://lfe.github.io/user-guide/diving/5.html&quot;&gt;patterns page&lt;/a&gt; of the LFE User Guide. &lt;br /&gt;
&lt;br /&gt;
Once the request returns, we can check out the variables we set in the pattern:&lt;br /&gt;
 
&lt;br /&gt;
That's great if everything goes as expected and we get a response from the server. What happens if we don't?&lt;br /&gt;
&lt;br /&gt;
Well, errors don't have the same nested data structure that the non-error results have, so we're going to have to make some changes to our pattern if we want to extract parts of the error reason. Pattern matching for just the &lt;span&gt;'error&lt;/span&gt; atom and the error reason, we can get a sense of what that data structure looks like:&lt;br /&gt;
 
&lt;br /&gt;
Looking at just the data stored in the reason variable, we see:&lt;br /&gt;


If you check out the &lt;a href=&quot;http://erlang.org/doc/man/httpc.html#request-1&quot;&gt;docs for &lt;span&gt;httpc&lt;/span&gt; &lt;span&gt;request&lt;/span&gt;&lt;/a&gt; and look under &quot;Types&quot;, you will see that the error returned can be one of three things:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;a tuple of &lt;span&gt;connect_failed&lt;/span&gt; and additional data&lt;/li&gt;
&lt;li&gt;a tuple of &lt;span&gt;send_failed&lt;/span&gt; and additional data&lt;/li&gt;
&lt;li&gt;or just unspecified additional data&lt;/li&gt;
&lt;/ul&gt;
In our example our additional data is a tuple of the address we were trying to connect to and the specific error type that for our failed connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Async &lt;span&gt;GET&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now that we've taken a quick look at the synchronous example, let's make a foray into async. We'll still be using &lt;span&gt;httpc&lt;/span&gt;'s &lt;span&gt;request&lt;/span&gt; function, but we'll need to use one of the longer forms were extra options need to be passed, since that's how you tell the &lt;span&gt;request&lt;/span&gt; function to perform the request asynchronously and not synchronously.&lt;br /&gt;
&lt;br /&gt;
For clarity of introducing the additional options, we're going to define some variables first:

You can read more about the options in the &lt;a href=&quot;http://erlang.org/doc/man/httpc.html#request-1&quot;&gt;&lt;span&gt;httpc&lt;/span&gt; docs&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
With the variables defined, let's make our async call:


The sender receives the results, and since we sent from the LFE REPL, that's the process that will receive the data. Let's keep our pattern simple at first -- just the request id and the result data:&lt;br /&gt;


Needless to say, parsing the returned data is a waste of Erlang's pattern matching, so let's go back and do that again, this time with a nice pattern to capture the results. We'll need to do another request, though, so that something gets sent to the shell:&lt;br /&gt;


Now we can set up a pattern that will allow us to extract and print just the bits that we're looking for. The thing to keep in mind here is that the scope for the variables is within the receive call, so we'll need to display the values within that scope:&lt;br /&gt;


This should demonstrate the slight differences in usage and result patterns between the sync and async modes.&lt;br /&gt;
&lt;br /&gt;
Well, that about sums it up for an intro to the HTTP client in LFE! But one last thing, for the sake of completeness. Once we're done, we can shut down inets:&lt;br /&gt;


&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ATHnopFXsfg:vw_9KarUxFk:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ATHnopFXsfg:vw_9KarUxFk:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ATHnopFXsfg:vw_9KarUxFk:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ATHnopFXsfg:vw_9KarUxFk:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ATHnopFXsfg:vw_9KarUxFk:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ATHnopFXsfg:vw_9KarUxFk:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ATHnopFXsfg:vw_9KarUxFk:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ATHnopFXsfg:vw_9KarUxFk:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/ATHnopFXsfg&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-18T15:32:00+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="http://moshez.wordpress.com/?p=828">
	<title>Moshe Zadka: Public letter to Congresswoman Jackie Speier, CA14</title>
	<link>http://moshez.wordpress.com/2013/04/16/public-letter-to-congresswoman-jackie-speier-ca14/</link>
	<content:encoded>&lt;p&gt;Dear Congresswoman Speier,&lt;/p&gt;
&lt;p&gt;I have already called your office, so I am sorry if this is redundant, but they did not have an answer for me. I am sending you this message because of my concern about HR 624, the “Cyber Intelligence Sharing and Protection Act”, also known as CISPA. It appears that it would be up for a vote in Congress soon. I am worried for my privacy, as well as for the privacy of other Americans, were this bill to be passed. This law violates due process by allowing private companies to hand data to the “government” even when they are under contract to not do so, without any court order. I am sure most people working for Federal agencies are good and honest people, but this allows one bad apple to grab whatever data they need for whatever private means they have with no judicial oversight. It also allows private companies to hack into computers as long as they believe “it is necessary” — in essence privatizing law enforcement, again without proper judicial oversight. &lt;/p&gt;
&lt;p&gt;In the wake of the tragedy in Boston, the US must, of course, be ever-vigilant against threats. However, laws like CISPA, making our country more surveiled and less free, are essentially give terrorists what they want — to terrorize us into hurting out essential freedoms.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Moshe Zadka&lt;/p&gt;
&lt;br /&gt;  &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=moshez.wordpress.com&amp;amp;blog=2210753&amp;amp;post=828&amp;amp;subd=moshez&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; border=&quot;0&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-16T17:33:31+00:00</dc:date>
	<dc:creator>moshez</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-2550867840265368435">
	<title>Duncan McGreggor: Twisted SSH: Rendering a Log-in Banner/MOTD in Conch</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/DMkHnCaip0Y/twisted-ssh-rendering-log-in-bannermotd.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://1.bp.blogspot.com/-UFw-54CdHh8/T68u-c2ePsI/AAAAAAAAAKI/52Nm1aD3meM/s1600/2000px-Twisted_Logo_(software).png&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-UFw-54CdHh8/T68u-c2ePsI/AAAAAAAAAKI/52Nm1aD3meM/s200/2000px-Twisted_Logo_(software).png&quot; border=&quot;0&quot; width=&quot;188&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A few weeks ago, I pinged my peeps on #twisted asking why the banner for a custom SSH server wasn't rendering properly. After some digging around and some inconsistent results (well, consistently bad results for me), we weren't able to resolve anything, and I had to set the problem aside.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The Symptom&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The first thing I had tried was subclassing &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;Manhole&lt;/span&gt; from &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;twisted.conch.manhole&lt;/span&gt;, overriding (and up-calling) &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;connectionMade&lt;/span&gt;, writing the banner to the terminal upon successful connection. This didn't work, so I then tried overriding &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;initializeScreen&lt;/span&gt; by subclassing &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;twisted.conch.recvline.RecvLine&lt;/span&gt;. Also a no-go. And by &quot;didn't work&quot; here's what I mean:&lt;br /&gt;
&lt;br /&gt;
In both Linux (Ubuntu 12.04 LTS, gnome-terminal) and Mac (OS X 10.6.8, Terminal.app), after a successful login to the Twisted SSH server, the following sequence would occur:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;an interactive Python prompt was rendered, e.g., &quot;:&amp;gt;&amp;gt;&quot;&lt;/li&gt;
&lt;li&gt;the banner was getting written to the terminal, and&lt;/li&gt;
&lt;li&gt;the terminal screen refreshed with the prompt at the top&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
This all happened so quickly, that I usually never even saw #1 and #2. Just the second &quot;:&amp;gt;&amp;gt;&quot; prompt from #3. Only by scrolling up the terminal buffer would I see that the banner had actually been rendered. Even though I was doing my &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminal.write&lt;/span&gt; after &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;connectionMade&lt;/span&gt; and &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;initializeScreen&lt;/span&gt;, it didn't seem to matter.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Discovery!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Some time last week, I put together example Twisted plugins showing what the problem was, and the circumstances under which a banner simply didn't get rendered. The idea was that I would provide some bare-bones test cases that demonstrated where the problem was occurring, post them to IRC or the Twisted mail list, and we could finally get it resolved. 'Cause, ya know, I really want my banners ...&lt;br /&gt;
&lt;br /&gt;
While tweaking the second Twisted plugin example, I finally poked my head into the right method and discovered the issue. Here's what's happening:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;twisted.conch.recvline.RecvLine.connectionMade&lt;/span&gt; calls &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;t.c.recvline.RecvLine.initializeScreen&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;t.c.recvline.RecvLine.initializeScreen&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; does a &lt;/span&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminal.reset&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;, writes the prompt, and then switches to insert mode. But this is a red herring. Since something after &lt;/span&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;initializeScreen&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; is causing the problem, we really need to be asking &quot;who's calling &lt;/span&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;connectionMade&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;?&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;t.c.manhole_ssh.TerminalSession.openShell&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; is what kicks it off when it calls the &lt;/span&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;transportFactory&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; (which is really &lt;/span&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;TerminalSessionTransport&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;openShell&lt;/span&gt; takes one parameter, &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;proto&lt;/span&gt; -- this is very important :-)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;openShell&lt;/span&gt; instantiates &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;TerminalSessionTransport&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;TerminalSessionTransport&lt;/span&gt; does one more thing after calling the &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;makeConnection&lt;/span&gt; method on an &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;insults.ServerProtocol&lt;/span&gt; instance (the one I had tried overriding without success), and as such, this is the prime suspect for what was preventing the banner from being properly displayed: it calls  &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;chainedProtocol.terminalProtocol.terminalSize&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;chainedProtocol&lt;/span&gt; is an &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;insults.ServerProtocol&lt;/span&gt; instance, and its &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminalProtocol&lt;/span&gt; attribute is set when &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;ServerProtocol.connectionMade&lt;/span&gt; is called.&lt;/li&gt;
&lt;li&gt;A quick check reveals that &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminalProtocol&lt;/span&gt; is none other than the &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;proto&lt;/span&gt; parameter passed to &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;openShell&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
But what &lt;i&gt;is&lt;/i&gt; &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;proto&lt;/span&gt;? Some debugging (and the fact that of the three &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminalSize&lt;/span&gt; methods in all of twisted, only one is an actual implementation) reveals that &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;proto&lt;/span&gt; is a &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;RecvLine&lt;/span&gt; instance. Reading that method uncovers the culprit in our whodunnit:  the first thing the method does is call &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminal.eraseDisplay&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Bingo! (And this is what I was referring to above when I said &quot;poked my head&quot; ...)&lt;br /&gt;
&lt;br /&gt;
Since this was called after all of my attempts to display a banner using both &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;connectionMade&lt;/span&gt; and &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;initializeScreen&lt;/span&gt;, there's no way my efforts would have succeeded.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Here's What You Do&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
How do you get around this? Easy! Subclass :-)&lt;br /&gt;
&lt;br /&gt;
The class  &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;TerminalSessionTransport&lt;/span&gt; in &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;t.c.manhole_ssh&lt;/span&gt; is the bad boy that calls &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;terminalSize&lt;/span&gt; (which calls &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;eraseDisplay&lt;/span&gt;). It's the last thing that &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;TerminalSessionTransport&lt;/span&gt; does in its &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;__init__&lt;/span&gt;, so if we subclass it, and render our banner at the end of our &lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;__init__&lt;/span&gt;, we should be golden. And we are :-)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-rkj5zKv34qo/T7Ej7FRUKAI/AAAAAAAAAKU/v9EGXJwQu4o/s1600/Screenshot+from+2012-05-14+11:21:43.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-rkj5zKv34qo/T7Ej7FRUKAI/AAAAAAAAAKU/v9EGXJwQu4o/s400/Screenshot+from+2012-05-14+11:21:43.png&quot; border=&quot;0&quot; width=&quot;400&quot; height=&quot;230&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You can see an example of this &lt;a href=&quot;https://github.com/dreamhost/dreamssh/blob/master/dreamssh/shell/base.py#L74&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Not sure if this sort of thing is better off in projects that make use of Twisted, or if it would be worth while to add this feature to Twisted itself. Time (and blog comments) will tell.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Epilogue&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
As is evident from the screenshot above (and the link), this feature is part of the &lt;a href=&quot;https://github.com/dreamhost/dreamssh&quot; target=&quot;_blank&quot;&gt;DreamSSH&lt;/a&gt; project. There are a handful of other nifty features/shortcuts that I have implemented in DreamSSH (plus some cool ones that are coming) and I'm using them in projects that need a custom SSH server. I released the &lt;a href=&quot;http://pypi.python.org/pypi/DreamSSH&quot; target=&quot;_blank&quot;&gt;first version of DreamSSH&lt;/a&gt; last night, and there's a pretty clear README on the github project page.&lt;br /&gt;
&lt;br /&gt;
One of the niftier things I did last night in preparation for the release was to dig into Twisted plugins and override some behaviour there. In order to make sure that the conveniences I had provided for devs with the Makefile were available for anyone who had DreamSSH installed, I added subcommands... but if the service was already running, these would fail. How to work around that (and other Twisted plugin tidbits) are probably best saved for another post, though :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=DMkHnCaip0Y:YbwHbrW941c:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=DMkHnCaip0Y:YbwHbrW941c:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=DMkHnCaip0Y:YbwHbrW941c:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=DMkHnCaip0Y:YbwHbrW941c:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=DMkHnCaip0Y:YbwHbrW941c:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=DMkHnCaip0Y:YbwHbrW941c:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=DMkHnCaip0Y:YbwHbrW941c:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=DMkHnCaip0Y:YbwHbrW941c:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/DMkHnCaip0Y&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-15T04:25:41+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-9134345096761195058">
	<title>Duncan McGreggor: Getting Started with LFE on Ubuntu</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/ggwtEbTVTOU/getting-started-with-lfe-on-ubuntu.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-Zqe5Lmg49Sc/UWs6VpQITjI/AAAAAAAAAEk/qO7_SEd0mek/s1600/LFE-on-Ubuntu.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-Zqe5Lmg49Sc/UWs6VpQITjI/AAAAAAAAAEk/qO7_SEd0mek/s320/LFE-on-Ubuntu.png&quot; border=&quot;0&quot; width=&quot;320&quot; height=&quot;239&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
For those that don't know, there is a fully &lt;a href=&quot;http://erlangcentral.org/&quot;&gt;Erlang&lt;/a&gt; Core-compatible &lt;a href=&quot;http://en.wikipedia.org/wiki/Lisp-1_vs._Lisp-2#The_function_namespace&quot;&gt;Lisp-2&lt;/a&gt; that runs on the Erlang VM and produces &lt;span&gt;.beam&lt;/span&gt; files that can be used in any Erlang application. This manna from heaven is &lt;a href=&quot;https://github.com/rvirding/lfe/&quot;&gt;LFE&lt;/a&gt;, or Lisp Flavored Erlang. It was started about 5 years ago by &lt;a href=&quot;http://rvirding.blogspot.com/&quot;&gt;Robert Virding&lt;/a&gt;, one of the co-creators of the Erlang programming language, and has inspired other similar efforts: &lt;a href=&quot;http://elixir-lang.org/&quot;&gt;Elixir&lt;/a&gt; (a Ruby-alike) and &lt;a href=&quot;http://joxa.org/&quot;&gt;Joxa&lt;/a&gt; (a Lisp-1). (Incidentally, Robert has also created &lt;a href=&quot;https://github.com/rvirding/erlog&quot;&gt;Prolog&lt;/a&gt; and &lt;a href=&quot;https://github.com/rvirding/luerl.git&quot;&gt;Lua&lt;/a&gt; implementations that run on top of the Erlang VM!)&lt;br /&gt;
&lt;br /&gt;
The new &lt;a href=&quot;http://lfe.github.io/&quot;&gt;LFE docs site&lt;/a&gt; (a continuous work in progress) has some good introductory materials for the curious reader:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;a href=&quot;http://lfe.github.io/quick-start/1.html&quot;&gt;Quick Start&lt;/a&gt; guide &lt;/li&gt;
&lt;li&gt;An as yet incomplete &lt;a href=&quot;http://lfe.github.io/user-guide/intro/1.html&quot;&gt;User Guide&lt;/a&gt; (most of the introductory chapters are finished)&lt;/li&gt;
&lt;li&gt;A tutorial on Erlang's &lt;a href=&quot;http://lfe.github.io/tutorials/processes/1.html&quot;&gt;Lightweight Processes in LFE&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
This blog post aims to bring some of those hidden materials into the consciousness of Ubuntu users. If you are averse to Erlang syntax, LFE opens up a whole new world to you :-)&lt;br /&gt;
&lt;br /&gt;
The examples below assume Ubuntu 12.10. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting Erlang&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Erlang R15B01 comes with Ubuntu 12.10. If that's all you need, then this will suite you just fine:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span&gt;$ sudo apt-get install erlang&lt;/span&gt;&lt;/blockquote&gt;
If you are wanting to test against multiple versions of Erlang, you should check out the &lt;a href=&quot;https://github.com/spawngrid/kerl&quot;&gt;kerl&lt;/a&gt; project, which lets you install a wide variety of Erlang versions (including the latest releases) side-by-side.&lt;br /&gt;
&lt;br /&gt;
You'll also need git, if you don't yet have it installed:&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span&gt;$ sudo apt-get install git&lt;/span&gt;&lt;/blockquote&gt;
Currently, &lt;a href=&quot;https://github.com/rebar/rebar&quot;&gt;rebar&lt;/a&gt; is required to build all the LFE files. If you're going to be building LFE projects, you'll want this anyway ;-) Rebar will be in Ubuntu 13.04, but it's not in 12.10, so you'll need to get it:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;$ wget https://github.com/rebar/rebar/wiki/rebar&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;$ chmod 755 rebar&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;$ sudo mv rebar /usr/local/bin&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting and Building LFE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here's what you need to do to build LFE:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;$ mkdir -p ~/lab/erlang &amp;amp;&amp;amp; cd ~/lab/erlang&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;$ git clone https://github.com/rvirding/lfe.git&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;$ cd lfe&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;$ make compile&lt;/span&gt;&lt;/blockquote&gt;
If you looked at your &lt;span&gt;./ebin&lt;/span&gt; directory when you cloned the repo, you would have seen that there were no &lt;span&gt;.beam&lt;/span&gt; files in it. After compiling, it is full of &lt;span&gt;.beam&lt;/span&gt;s ;-)&lt;br /&gt;
&lt;br /&gt;
Sidebar: A common pattern in Erlang applications is the use of a &lt;span&gt;deps&lt;/span&gt; directory under one's project dir where dependencies can be installed without conflicting with any system-wide installs, providing versioning independence, etc. Managing these with rebar has been very effective for projects, where simply calling &lt;span&gt;rebar compile&lt;/span&gt; puts everything your app needs in &lt;span&gt;./deps&lt;/span&gt;. Projects that depend upon LFE are doing this, but we'll cover that in a future blog post.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using LFE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With everything compiled, we can jump right in! Let's fire up the REPL, and do some arithmetic as a sanity check:&lt;br /&gt;


&lt;br /&gt;
How about a message to &lt;span&gt;stdout&lt;/span&gt;?&lt;br /&gt;


&lt;br /&gt;
Any form starting with &lt;span&gt;:&lt;/span&gt; is interpreted as a call to a module. The full form is &lt;span&gt;(: &amp;lt;module name&amp;gt; &amp;lt;function name&amp;gt; &amp;lt;arguments&amp;gt;)&lt;/span&gt;. As such, you can see that we're calling the &lt;span&gt;format&lt;/span&gt; function in the (built-in) &lt;span&gt;io&lt;/span&gt; module.&lt;br /&gt;
&lt;br /&gt;
Also, it's good to know that there are certain things that you can't do in the REPL, e.g., defining modules, macros, functions, and records. Erlang expects that these sorts of activities take place in modules. However, we can explore a little more before we write our first module. Let's use the REPL's &lt;span&gt;set&lt;/span&gt; form and &lt;span&gt;lambda&lt;/span&gt; to define a function anyway (albeit, in a somewhat awkward fashion):&lt;br /&gt;


&lt;br /&gt;
That wasn't too bad ;-) We're seeing the external module call, again -- this time to the math library. Now let's use a module of our own devising...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Creating Modules&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In another terminal (but same working directory), let's create a module in a file called my-module.lfe, with the following content:&lt;br /&gt;


&lt;br /&gt;
&lt;br /&gt;
Note that the module name in the code needs to match the file name (minus the extension) that you used for the module.&lt;br /&gt;
&lt;br /&gt;
Back in the REPL terminal window, let's compile this module and run the defined function:&lt;br /&gt;


&lt;br /&gt;
Let's add another function to the module that demonstrates the benefits of Erlang's multiple-arity support:&lt;br /&gt;


&lt;br /&gt;
Re-compiling and running the functions, we are greeted with success:&lt;br /&gt;


&lt;br /&gt;
Lastly, let's convert the power function we defined in the previous section using our REPL-workaround to a &quot;real&quot; function, defined in our new module:&lt;br /&gt;


&lt;br /&gt;
And then let's try it out:&lt;br /&gt;


&lt;br /&gt;
Perfect.&lt;br /&gt;
&lt;br /&gt;
(Of course, it's rather absurd to redefine &lt;span&gt;pow&lt;/span&gt; to &lt;span&gt;exp&lt;/span&gt;, when there is basically nothing to gain by it ;-) It's just a quick demo...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-fonndtAAXJI/UUAGF-K1LpI/AAAAAAAAADk/YZs-7OwO608/s1600/LispFlavoredErlang-medium.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-fonndtAAXJI/UUAGF-K1LpI/AAAAAAAAADk/YZs-7OwO608/s200/LispFlavoredErlang-medium.png&quot; border=&quot;0&quot; width=&quot;168&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
There's lots more to learn; this has been just a small sip from a hot mug o' LFE.&lt;br /&gt;
&lt;br /&gt;
However, it's definitely enough to get you started and, should you be interested in following along in future LFE blog posts, you'll have everything you need to get the most out of those.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ggwtEbTVTOU:u1YYyF5iqXw:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ggwtEbTVTOU:u1YYyF5iqXw:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ggwtEbTVTOU:u1YYyF5iqXw:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ggwtEbTVTOU:u1YYyF5iqXw:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ggwtEbTVTOU:u1YYyF5iqXw:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ggwtEbTVTOU:u1YYyF5iqXw:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=ggwtEbTVTOU:u1YYyF5iqXw:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=ggwtEbTVTOU:u1YYyF5iqXw:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/ggwtEbTVTOU&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-15T02:06:50+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="http://moshez.wordpress.com/?p=826">
	<title>Moshe Zadka: Babies — a guide</title>
	<link>http://moshez.wordpress.com/2013/04/13/babies-a-guide/</link>
	<content:encoded>&lt;p&gt;Some people have asked me to summarize the collection of links I posted about &lt;a href=&quot;https://moshez.wordpress.com/2013/03/04/parenting-resources/&quot;&gt;baby development&lt;/a&gt;. Here is my unauthorized summary. There are links to the original resources throughout the post.&lt;/p&gt;
&lt;p&gt;A lot of the following information is based on, or inspired by, the Educaring philosophy as put down by &lt;a href=&quot;http://www.magdagerber.org/blog.html&quot;&gt;Magda Gerber&lt;/a&gt; and taught by &lt;a href=&quot;http://www.rie.org&quot;&gt;RIE&lt;/a&gt;. &lt;a href=&quot;http://www.rie.org/educaring&quot;&gt;Educaring&lt;/a&gt; philosphy is based on trust in the child to initiate development, giving children safe areas to explore in an uninterrupted way, involving the child in all child-care activities, observing the child and responding to her needs and being consistent when limits are concerned. The central theme is respect for the &lt;a href=&quot;http://www.janetlansbury.com/2013/01/the-surprisingly-positive-results-of-respectful-parenting-5-rie-baby-basics/&quot;&gt;child as a whole person in his own right.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When babies are born, they have one mode of communication — crying. Therefore, a lot of what parents do in the first few months is dealing with crying babies. The blogosphere, unsurprisingly, reacted with a wealth of information to the question “what do I do with a crying baby?”. The basic newborn care advice — check diaper, burp, and &lt;a href=&quot;http://www.secretsofbabybehavior.com/2013/01/readers-question-infant-feeding-cues.html&quot;&gt;feed&lt;/a&gt; — only goes so far. If your baby is not giving you hunger signs — clenched fingers and fists over chest and tummy, flexed arms and legs, rooting, fast breathing or sucking noises or motions — feeding might stop the crying even if it is not the best idea.&lt;/p&gt;
&lt;p&gt;After those, comes the “unexplained crying”. “Unexplained”, of course, is not a fact about the crying — it is a fact about the parent. &lt;a href=&quot;http://www.handinhandparenting.org/news/16/64/Listening-to-Nursing-Children&quot;&gt;Babies have feelings too&lt;/a&gt; and need to express them.&lt;/p&gt;
&lt;p&gt;The diagnosis of “colic” as long stretches of unexplained crying is giving way to the concept of &lt;a href=&quot;http://www.purplecrying.info/what-is-the-period-of-purple-crying.php&quot;&gt;“PURPLE” crying&lt;/a&gt;. PURPLE stands for “Peak” (of crying) “Unexpected” “Resists soothing” “Pain-like face” “Long lasting” (several hours a day) “Evening” (also known as “the witching hour”, around twilight). Apparently all mammals go through their own equivalent of PURPLE crying, the human animal between 2 weeks and 3-5months.&lt;/p&gt;
&lt;p&gt;Listening to the crying, being compassionate without trying to stop it, is important. &lt;a href=&quot;http://www.janetlansbury.com/2012/10/would-you-pick-up-this-crying-baby/&quot;&gt;Crying is a form of communication&lt;/a&gt;. When we do want to soothe the baby, &lt;a href=&quot;http://www.parenting-with-love.com/soothing-your-baby-the-calms-way/&quot;&gt;CALMS&lt;/a&gt;&lt;a href=&quot;http://www.regardingbaby.org/2013/01/13/take-a-calms-approach-to-your-crying-baby/&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; is a popular approach. [C]heck in with yourself, and connect with your feelings — you want to calm yourself before calming the baby down. [A]llow yourself to take a breath and relax. [L]isten to what your baby is trying to tell you. [M]irror — empathize with the baby’s feeling, voicing his emotions as best you can. [S]oothe your baby. It is OK if the soothing initially makes the crying harder — the baby might need to voice the hurt feelings first. Sometimes, the end result of this approach is to &lt;a href=&quot;http://www.regardingbaby.org/2012/09/28/holding-her-through-the-tears/&quot;&gt;“hold the baby through the tears”&lt;/a&gt;, being calm and letting the baby cry as long as she needs to. When soothing a baby, pick a tactic (singing, bouncing, etc.) and stick to it — &lt;a href=&quot;http://www.secretsofbabybehavior.com/2009/06/baby-behavior-basics-part-2-many-moods.html&quot;&gt;switching tactics is a bad idea&lt;/a&gt;. &lt;a href=&quot;http://www.secretsofbabybehavior.com/2009/06/baby-behavior-basics-part-4-crying-your.html&quot;&gt;Repetition, repetition, repetition&lt;/a&gt;. There are &lt;a href=&quot;http://www.regardingbaby.org/2012/05/05/is-the-happiest-baby-on-the-block-the-most-oppressed-why-im-not-a-fan-of-the-5-s-method-of-calming-crying-babies/&quot;&gt;reasons to be wary of the “5S”&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Parents need to understand that sometimes the baby will cry, and this &lt;a href=&quot;http://www.parenting-with-love.com/help-for-moms-with-crying-babies-2/&quot;&gt;does not mean they are failing as parents&lt;/a&gt;. Unfortunately, that is exactly &lt;a href=&quot;http://www.regardingbaby.org/2012/11/23/if-attachment-parenting-isnt-working-try-this/&quot;&gt;what attachment parenting is teaching&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Second only to crying in the amount of energy parents spend obsessing about is the baby’s sleep. Nursing kids to sleep does not make them sleep longer — &lt;a href=&quot;http://www.magdagerber.org/3/post/2012/09/helping-your-baby-to-get-the-sleep-she-needs.html&quot;&gt;putting them to sleep earlier does&lt;/a&gt;. Althought &lt;a href=&quot;http://www.secretsofbabybehavior.com/2013/02/quick-tip-dont-move-bedtime-up-too-soon.html&quot;&gt;not too much earlier, and not too soon&lt;/a&gt;. Wait for them to display sleep signs, and put them to bed then. Babies’ “long-stretches” of sleep start from 3 hours at newborn, through 4 hours at two months, 4-5 at 4 months, 6 hours at 6 months and by 1 year old, 80% of babies sleep through the night. &lt;a href=&quot;http://www.secretsofbabybehavior.com/2013/02/reader-questions-sleep-review.html&quot;&gt;Routines, especially at 4 months and beyond, are useful for helping babies sleep&lt;/a&gt;. Babies are woken up by &lt;a href=&quot;http://www.secretsofbabybehavior.com/2009/06/baby-behavior-basics-part-1-3-reasons.html&quot;&gt;hunger, dreams or discomfort&lt;/a&gt;. Some babies fight sleep, and &lt;a href=&quot;http://www.secretsofbabybehavior.com/2013/01/readers-questions-drowsy-babies.html&quot;&gt;need to be helped there&lt;/a&gt;. SIDS is mostly a risk while sleeping, follow &lt;a href=&quot;http://www.secretsofbabybehavior.com/2012/01/aap-recommendations-to-reduce-risk-of.html&quot;&gt;AAP recommendations to reduce risk&lt;/a&gt;: put babies on their backs to sleep, use a firm sleep surface, room-sharing but no bed sharing and keep soft objects and loose bedding out of the crib.&lt;/p&gt;
&lt;p&gt;A distant third is how children play. Even &lt;a href=&quot;http://www.janetlansbury.com/2012/11/7-myths-that-discourage-independent-play/&quot;&gt;babies can do independent play&lt;/a&gt; as long as they are placed, carefully, on their back until they have learned to roll to their tummies. It is OK if the baby does not “do” anything — just kicking their legs and staring is fine. The area, of course, must be safe — a no-”no” area, where everything possible is permissible. It is OK, and even good, to stay near the child and observe — but even if they seem frustrated, not to help them (this is like giving someone the solution to a riddle). Babies are perfectly capable of entertaining themselves this way. Babies can start having &lt;a href=&quot;http://www.janetlansbury.com/2013/02/baby-talk-dont-miss-the-magic/&quot;&gt;play-dates early on&lt;/a&gt; — if we believe them capable, if we are attentive to their moods, make it into a routine, and are patient with them. As always, observing them in quiet is important. &lt;a href=&quot;http://www.healthychildren.org/English/ages-stages/baby/sleep/Pages/Back-to-Sleep-Tummy-to-Play.aspx?nfstatus=401&amp;amp;nftoken=00000000-0000-0000-0000-000000000000&amp;amp;nfstatusdescription=ERROR%3a+No+local+token&quot;&gt;Tummy time is important developmentally&lt;/a&gt;. Start slow, get down to your baby’s level and provide entertainment while the baby is on his tummy. Avoid having tummy time right after feeding, or when the baby is upset. Keep it calm and quiet, so the baby is not scared by what she cannot see. &lt;a href=&quot;http://www.regardingbaby.org/2013/02/21/tummy-time-babys-way/&quot;&gt;Be patient&lt;/a&gt; — the baby will eventually want tummy time.&lt;/p&gt;
&lt;br /&gt;  &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=moshez.wordpress.com&amp;amp;blog=2210753&amp;amp;post=826&amp;amp;subd=moshez&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; border=&quot;0&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-13T23:10:55+00:00</dc:date>
	<dc:creator>moshez</dc:creator>
</item>
<item rdf:about="tag:metajack.im:/2013/04/12/servo-update-upgrading-rust-gpu-rendering-and-automation/">
	<title>Jack Moffitt: Servo Update: Upgrading Rust, GPU Rendering, and Automation</title>
	<link>http://feedproxy.google.com/~r/metajack/~3/nqVIhFl8Y3I/</link>
	<content:encoded>&lt;p&gt;I've been working on Servo for three weeks now. There's an enormous amount of
work to do, and I want to capture what's going on and how it's
progressing. This should be the first of many such updates on the project.&lt;/p&gt;

&lt;h1&gt;Day One&lt;/h1&gt;

&lt;p&gt;When I arrived, Servo no longer built at all, at least not on OS X. Servo often
requires bleeding edge versions of Rust, and backwards incompatible changes to
Rust are still happening on a regular basis. Since all of the contributors to
Rust work on different platforms, when porting to a new Rust compiler, some
platforms have gotten left behind. This was particularly acute this time
because Rust 0.6 contained a lot of syntax changes, mostly things that got
removed from the language, and many pieces of Servo were using syntax that was
deprecated in Rust 0.5, and was finally deleted entirely in Rust 0.6.&lt;/p&gt;

&lt;h1&gt;Upgrading to Rust 0.6&lt;/h1&gt;

&lt;p&gt;Rust 0.6 removed a lot of keywords and syntax from the language. Porting Servo
required modifying all the constants, many function declarations, many import
statements, etc. These changes were largely mechanical. There were a few
changes that weren't so easy.&lt;/p&gt;

&lt;p&gt;Mutable fields are being removed from the language, and mutability will be
controlled by the mutability of the struct itself. Not all of these had to be
removed in Servo, but many of them did, and removing them often required
slightly changing the data structures and their type signatures. In some cases
this was trivial, but in a few cases these changes needed more care. In
particular, lots of these changes bumped up against the Rust borrow checker,
which ensures it's safe to hand out pointers to memory. There are still some
bugs in the borrow check, and workarounds are not always straightforward.&lt;/p&gt;

&lt;p&gt;It took me about a week and a half to work my way through all the dependent
libraries and Servo itself at which point I had a build. By the end of that
second week I had landed the language upgrade to servo as well as some Rust
library changes that were needed. The end result is that Servo is now using
Rust 0.6 syntax, but it requires a post-0.6 version of Rust due to the Rust
changes not landing quite in time for the 0.6 release.&lt;/p&gt;

&lt;h1&gt;GPU Rendering&lt;/h1&gt;

&lt;p&gt;Servo uses many forms of parallelism, but one bit of low hanging fruit is to
move to a fully GPU rendering path. Currently compositing is done on the GPU,
but rendering to the various layers is done on the CPU. This is how most
current browsers operate as well.&lt;/p&gt;

&lt;p&gt;We're moving to rendering on the GPU as well which should speed up some things
a bit. Instead of rendering in parallel to several layers, Servo will render
directly into textures on the GPU which the compositor can use without doing
CPU to GPU memory transfers.&lt;/p&gt;

&lt;p&gt;This required upgrading the rendering stack to a newer version of Azure
(Mozilla's drawing library) and a new version of Skia (the specific backend
that Azure uses on OS X, Linux, and Android). Now that this part is done,
we'll be adding texture layers to the renderer and switching drawing to those.&lt;/p&gt;

&lt;h1&gt;Automation&lt;/h1&gt;

&lt;p&gt;We're setting up build and testing automation for Servo now, which should help
ensure Servo remains buildable on all platforms. Rust has an amazing set of
tools for this already, which we are hoping to reuse fully. Buildbot machines
run builds and tests, and a GitHub bot called Bors handles dispatching builds
for patches that have been reviewed and merging pull requests that have passed
tests.&lt;/p&gt;

&lt;p&gt;For now this work will be on Linux, but we hope to expand it to cover OS
X and Android as well in the near future. Once Servo is a little farther
along, we plan to put up nightly snapshots so more people can follow along
with our progress.&lt;/p&gt;

&lt;h1&gt;Other Work&lt;/h1&gt;

&lt;p&gt;There's tons of other work in progress on both Servo and Rust. The DOM
bindings are getting improved, a new Rust scheduler that will make performance
and I/O better is in progress, a more optimized C FFI in Rust should also
land soon, and the rustpkg package manager is shaping up which we'll be
switching to for more and more of Servo as it matures.&lt;/p&gt;

&lt;p&gt;We need more help in lots of areas. Please join us in IRC in
&lt;a href=&quot;http://chat.mibbit.com/?server=irc.mozilla.org&amp;amp;channel=%23servo&quot;&gt;#servo&lt;/a&gt; or
on the &lt;a href=&quot;https://lists.mozilla.org/listinfo/dev-servo&quot;&gt;mailing list&lt;/a&gt;. We'll be
trying to mark bugs and projects that are well suited for new contributors. If
you want to work on Servo and write Rust code all the time,
&lt;a href=&quot;http://careers.mozilla.org/en-US/position/obMdXfwR&quot;&gt;we're hiring&lt;/a&gt;.&lt;/p&gt;
    &lt;img src=&quot;http://feeds.feedburner.com/~r/metajack/~4/nqVIhFl8Y3I&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-12T16:40:00+00:00</dc:date>
	<dc:creator>Jack Moffitt (jack@metajack.im)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-5675153596571600829">
	<title>Future Foundries: SSH Into Your Python Server</title>
	<link>http://blog.futurefoundries.com/2013/04/ssh-into-your-python-server.html</link>
	<content:encoded>Have you ever wanted to see what's going on inside your Python server? With &lt;a href=&quot;https://pypi.python.org/pypi/crochet&quot;&gt;Crochet&lt;/a&gt; and Twisted, you can add a Python prompt to you process that is accessible via SSH, allowing you to poke around in the internals of your running program. Here's an example session to a Flask server:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;$ ssh admin@localhost -p 5022&lt;br /&gt;admin@localhost's password: ******&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; app&lt;br /&gt;&amp;lt;flask.app.Flask object at 0x28a96d0&amp;gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; app.url_map&lt;br /&gt;Map([&amp;lt;Rule '/' (HEAD, OPTIONS, GET) -&amp;gt; index&amp;gt;,&lt;br /&gt; &amp;lt;Rule '/static/&amp;lt;filename&amp;gt;' (HEAD, OPTIONS, GET) -&amp;gt; static&amp;gt;])&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; from twisted.internet import reactor&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; reactor._selectables&lt;br /&gt;{9: &amp;lt;SSHServerTransport #0 on 5022&amp;gt;, 3: &amp;lt;&amp;lt;class 'twisted.internet.tcp.Port'&amp;gt; of twisted.conch.manhole_ssh.ConchFactory on 5022&amp;gt;, 6: &amp;lt;twisted.internet.posixbase._UnixWaker object at 0x28a2510&amp;gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;The code to start the SSH server has quite a lot of boilerplate, so I &lt;a href=&quot;http://tm.tl/6429&quot;&gt;filed a ticket&lt;/a&gt; to provide a utility function. If you're using the system Twisted, you may need to install Twisted's Conch package, e.g. &lt;code&gt;apt-get install python-twisted-conch&lt;/code&gt; on Ubuntu.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;import logging&lt;br /&gt;&lt;br /&gt;from flask import Flask&lt;br /&gt;from crochet import setup, in_reactor&lt;br /&gt;setup()&lt;br /&gt;&lt;br /&gt;# Web server:&lt;br /&gt;app = Flask(__name__)&lt;br /&gt;&lt;br /&gt;@app.route('/')&lt;br /&gt;def index():&lt;br /&gt;    return &quot;Welcome to my boring web server!&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@in_reactor&lt;br /&gt;def start_ssh_server(reactor, port, username, password,&lt;br /&gt;                     namespace):&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    Start an SSH server on the given port, exposing a Python&lt;br /&gt;    prompt with the given namespace.&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    from twisted.conch.insults import insults&lt;br /&gt;    from twisted.conch import manhole, manhole_ssh&lt;br /&gt;    from twisted.cred.checkers import (&lt;br /&gt;        InMemoryUsernamePasswordDatabaseDontUse as MemoryDB)&lt;br /&gt;    from twisted.cred.portal import Portal&lt;br /&gt;&lt;br /&gt;    sshRealm = manhole_ssh.TerminalRealm()&lt;br /&gt;    def chainedProtocolFactory():&lt;br /&gt;        return insults.ServerProtocol(manhole.Manhole,&lt;br /&gt;                                      namespace)&lt;br /&gt;    sshRealm.chainedProtocolFactory = chainedProtocolFactory&lt;br /&gt;&lt;br /&gt;    portal = Portal(&lt;br /&gt;        sshRealm, [MemoryDB(**{username: password})])&lt;br /&gt;    reactor.listenTCP(port, manhole_ssh.ConchFactory(portal),&lt;br /&gt;                      interface=&quot;127.0.0.1&quot;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    import sys&lt;br /&gt;    logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)&lt;br /&gt;    start_ssh_server(&lt;br /&gt;        5022, &quot;admin&quot;, &quot;secret&quot;, {&quot;app&quot;: app}).wait()&lt;br /&gt;    app.run()&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;</content:encoded>
	<dc:date>2013-04-12T16:11:04+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-1320441927711091098">
	<title>Duncan McGreggor: The Lambda Calculus: A Quick Primer</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/38a_z-AZrDc/the-lambda-calculus-quick-primer.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-6VOclHLsn8U/UWMiLE5aa0I/AAAAAAAAAEY/SrJ6d2vVi9s/s1600/Lambda.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-6VOclHLsn8U/UWMiLE5aa0I/AAAAAAAAAEY/SrJ6d2vVi9s/s200/Lambda.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;The λ-Calculus Series&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://technicae.cogitat.io/2013/04/the-lambda-calculus-brief-history.html&quot;&gt;A Brief History&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A Quick Primer for λ-Calculus&lt;/li&gt;
&lt;li&gt;Reduction Explained&lt;/li&gt;
&lt;li&gt;Church Numerals&lt;/li&gt;
&lt;li&gt;Arithmetic&lt;/li&gt;
&lt;li&gt;Logic&lt;/li&gt;
&lt;li&gt;Pairs and Lists&lt;/li&gt;
&lt;li&gt;Combinators&lt;/li&gt;
&lt;/ol&gt;
To the untrained eye, the notation used in λ-calculus can be a bit confusing. And by &quot;untrained&quot;, I mean your average programmer. This is a travesty: reading the notation of λ-calculus should be as easy to do as recognizing that the following phrase demonstrates variable assignation:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;x = 123&lt;/span&gt;&lt;/blockquote&gt;
So how do we arrive at a state of familiarity and clarity from a starting state of confusion? Let's dive in with some examples, and take it step at a time :-) Once we've got our heads wrapped around Alonzo Church's notation, we'll be able to easily read it -- and thus convert it into code! (We will have lots of practice in the coming posts to do just that.)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A Quick Primer for λ-Calculus&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here's one of the simplest definitions in λ-calculus that you're going to see: the identity function:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λx.x&lt;/span&gt;&lt;/blockquote&gt;
This reads as &quot;Here is a function that takes &lt;span&gt;x&lt;/span&gt; as an argument and returns &lt;span&gt;x&lt;/span&gt;.&quot; Let's do some more:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λxy.x&lt;/span&gt;&lt;/blockquote&gt;
&quot;Here is a function that takes &lt;span&gt;x&lt;/span&gt; and &lt;span&gt;y&lt;/span&gt; as arguments and returns only &lt;span&gt;x&lt;/span&gt;.&quot;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λx.&lt;/span&gt;&lt;span&gt;&lt;span&gt;λy.&lt;/span&gt;xy&lt;/span&gt;&lt;/blockquote&gt;
&quot;An outer function takes &lt;span&gt;x&lt;/span&gt; as an argument and an inner function takes &lt;span&gt;y&lt;/span&gt; as an argument, returning the &lt;span&gt;x&lt;/span&gt; and the &lt;span&gt;y&lt;/span&gt;.&quot; Note that this is exactly equivalent to the following (by convention):&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λxy.xy&lt;/span&gt;&lt;/blockquote&gt;
Let's up the ante with a function application:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λf.&lt;/span&gt;&lt;span&gt;&lt;span&gt;λ&lt;/span&gt;x.f x&lt;/span&gt;&lt;/blockquote&gt;
&quot;Here is a function that takes a function &lt;span&gt;f&lt;/span&gt; as its argument; the inner function takes &lt;span&gt;x&lt;/span&gt; as its argument; return the result of the function &lt;span&gt;f&lt;/span&gt; when given the argument &lt;span&gt;x&lt;/span&gt;.&quot; For example, if we pass a function &lt;span&gt;f&lt;/span&gt; which returns its input multiplied by 2, and we supplied a value for &lt;span&gt;x&lt;/span&gt; as 6, then we would see an output of 12. &lt;br /&gt;
&lt;br /&gt;
Let's take that a little further:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span&gt;λ&lt;/span&gt;&lt;span&gt;f.&lt;/span&gt;&lt;span&gt;&lt;span&gt;λ&lt;/span&gt;x.f (f (f x))&lt;/span&gt;&lt;/blockquote&gt;
&quot;Here is a function that takes a function &lt;span&gt;f&lt;/span&gt; as its argument; the inner 
function takes &lt;span&gt;x&lt;/span&gt; as its argument. Apply the function f to the argument &lt;span&gt;x&lt;/span&gt;; take that result and apply &lt;span&gt;f&lt;/span&gt; to it. Then do it a third time, returning that result.&quot; If we had the same function as the example above and passed the same value, our result this time would be 48 (i.e., 6 * 2 * 2 * 2).&lt;br /&gt;
&lt;br /&gt;
That's most of what you need to read λ-calculus expressions. Next we'll take a peek into the murky waters of  λ-calculus reduction and find that it's quite drinkable, that we were just being fooled by the shadows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=38a_z-AZrDc:wTzu_FUjWDc:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=38a_z-AZrDc:wTzu_FUjWDc:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=38a_z-AZrDc:wTzu_FUjWDc:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=38a_z-AZrDc:wTzu_FUjWDc:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=38a_z-AZrDc:wTzu_FUjWDc:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=38a_z-AZrDc:wTzu_FUjWDc:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=38a_z-AZrDc:wTzu_FUjWDc:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=38a_z-AZrDc:wTzu_FUjWDc:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/38a_z-AZrDc&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-11T15:55:46+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-8427610361209978790">
	<title>Duncan McGreggor: The Lambda Calculus: A Brief History</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/vo1VocolvTw/the-lambda-calculus-brief-history.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-6VOclHLsn8U/UWMiLE5aa0I/AAAAAAAAAEU/WQTM0-l_MxA/s1600/Lambda.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-6VOclHLsn8U/UWMiLE5aa0I/AAAAAAAAAEU/WQTM0-l_MxA/s1600/Lambda.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Over this past weekend I took a lovely journey into the heart of the lambda calculus, and it was quite amazing. My explorations were made within the context of &lt;a href=&quot;https://github.com/rvirding/lfe/&quot;&gt;LFE&lt;/a&gt;. Needless to say, this was a romp of pure delight. In fact, it was &lt;i&gt;so&lt;/i&gt; much fun and helped to clarify for me so many nooks and crannies of something that I had simply not explored very thoroughly in the past, that I &lt;i&gt;had&lt;/i&gt; to share :-)&lt;br /&gt;
&lt;br /&gt;
The work done over the past few days is on its way to becoming part of the &lt;a href=&quot;http://lfe.github.io/&quot;&gt;documentation for LFE&lt;/a&gt;. However, this is also an excellent opportunity to share some clarity with a wider audience. As such, I will be writing a series of blog posts on λ-calculus from a very hands-on (almost practical!) perspective. There will be some overlap with the LFE documentation, but the medium is different and as such, the delivery will vary (sometimes considerably).&lt;br /&gt;
&lt;br /&gt;
This series of posts will cover the following topics:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;A Brief History&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://technicae.cogitat.io/2013/04/the-lambda-calculus-quick-primer.html&quot;&gt;A Quick Primer for λ-Calculus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reduction Explained&lt;/li&gt;
&lt;li&gt;Church Numerals&lt;/li&gt;
&lt;li&gt;Arithmetic&lt;/li&gt;
&lt;li&gt;Logic&lt;/li&gt;
&lt;li&gt;Pairs and Lists&lt;/li&gt;
&lt;li&gt;Combinators&lt;/li&gt;
&lt;/ol&gt;
The point of these posts is not to expound upon that which has already been written about endlessly. Rather, the hope is to give a very clear demonstration of what the lambda calculus &lt;i&gt;really&lt;/i&gt; is, and to do so with clear examples and concise prose. When the gentle reader is able see the lambda calculus in action, with lines of code that clearly show what is occurring, the mystery will disappear and an intuition for the subject matter will quite naturally begin to arise. This post is the first in the series; I hope you enjoy them as much as I did rediscovering λ-calculus :-)&lt;br /&gt;
&lt;br /&gt;
Let us start at the beginning... &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A Brief History&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The roots of functional programming languages such as Lisp, ML, Erlang, Haskell and others, can be traced to the concept of recursion in general and λ-calculus in particular. In previous posts, I touched upon &lt;a href=&quot;http://technicae.cogitat.io/2012/12/the-secret-history-of-lambda.html&quot;&gt;how we ended up with the lambda&lt;/a&gt; as a symbol for the anonymous function as well as &lt;a href=&quot;http://technicae.cogitat.io/2013/04/maths-and-programming-whence-recursion.html&quot;&gt;how recursion came to be a going concern&lt;/a&gt; in modern mathematics and then computer science.&lt;br /&gt;
&lt;br /&gt;
In both of those posts we saw &lt;a href=&quot;http://en.wikipedia.org/wiki/Alonzo_Church&quot;&gt;Alonzo Church&lt;/a&gt; play a major role, but we didn't really spend time on what is quite probably considered his greatest contribution to computer science, if not mathematics itself: λ-calculus. Keep in mind that the &lt;a href=&quot;http://en.wikipedia.org/wiki/Peano_axioms&quot;&gt;Peano axioms&lt;/a&gt; made use of recursion, that &lt;a href=&quot;http://en.wikipedia.org/wiki/Giuseppe_Peano&quot;&gt;Giuseppe Peano&lt;/a&gt; played a key role in &lt;a href=&quot;http://en.wikipedia.org/wiki/Bertrand_Russell&quot;&gt;Bertrand Russell&lt;/a&gt;’s development of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Principia_Mathematica&quot;&gt;Principia&lt;/a&gt;, that Alonzo Church sought to make improvements on the Principia, and λ-calculus eventually arose from these efforts.&lt;br /&gt;
&lt;br /&gt;
Invented in 1928, Alonzo didn't publish λ-calculus until 1932. When an inconsistency was discovered, he revised it in 1933 and republished. Furthermore, in this second paper, Church introduced a means of representing positive integers using lambda notation, now known as Church numerals. With Church and Turing both publishing papers on computability in 1936 (based respectively upon λ-calculus and the concept of &lt;a href=&quot;http://en.wikipedia.org/wiki/Turing_machine&quot;&gt;Turing machines&lt;/a&gt;), they proposed solutions to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Entscheidungsproblem&quot;&gt;Entscheidungsproblem&lt;/a&gt;. Though &lt;a href=&quot;http://en.wikipedia.org/wiki/Kurt_G%C3%B6del&quot;&gt;Gödel&lt;/a&gt; preferred Turing's approach, &lt;a href=&quot;http://en.wikipedia.org/wiki/J._Barkley_Rosser&quot;&gt;Rosser&lt;/a&gt; suggested that they were equivalent definitions in 1939. A few years later, &lt;a href=&quot;http://en.wikipedia.org/wiki/Stephen_Cole_Kleene&quot;&gt;Kleene&lt;/a&gt; proposed the &lt;a href=&quot;http://en.wikipedia.org/wiki/Church%27s_thesis_%28constructive_mathematics%29&quot;&gt;Church Thesis&lt;/a&gt; (1943) and then later formally demonstrated the equivalence between his teacher's and Turing's approaches giving the combination the name of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis&quot;&gt;Church-Turing Thesis&lt;/a&gt; (1952, in his &lt;u&gt;Introduction to Metamathematics&lt;/u&gt;). Within eight years, &lt;a href=&quot;http://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29&quot;&gt;John McCarthy&lt;/a&gt; published his now-famous paper describing the work that he had started in 1958: &quot;Recursive Functions of Symbolic Expressions and Their Computation by Machine&quot;. In this paper, McCarthy outlined his new programming language Lisp, citing Church's 77-page book  (1941, &lt;u&gt;Calculi of Lambda Conversion&lt;/u&gt;), sending the world off in a whole new direction.&lt;br /&gt;
&lt;br /&gt;
Since that time, there has been on-going research into λ-calculus. Indisputably, λ-calculus has had a tremendous impact on research into computability as well as the practical applications of programming languages. As programmers and software engineers, we feel its impact -- directly and indirectly -- on a regular, almost daily basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=vo1VocolvTw:sLZR-E3PrOM:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=vo1VocolvTw:sLZR-E3PrOM:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=vo1VocolvTw:sLZR-E3PrOM:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=vo1VocolvTw:sLZR-E3PrOM:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=vo1VocolvTw:sLZR-E3PrOM:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=vo1VocolvTw:sLZR-E3PrOM:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=vo1VocolvTw:sLZR-E3PrOM:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=vo1VocolvTw:sLZR-E3PrOM:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/vo1VocolvTw&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-11T15:53:17+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-4026604049418320001">
	<title>Future Foundries: Crochet: Background Operations for Threaded Applications</title>
	<link>http://blog.futurefoundries.com/2013/04/crochet-background-operations-for.html</link>
	<content:encoded>In my previous post I showed &lt;a href=&quot;https://pypi.python.org/pypi/crochet&quot;&gt;Crochet&lt;/a&gt; doing a blocking call against a Twisted API. In this example, you can see how Twisted and Crochet allow you to run an operation in the background. An HTTP request for a new user starts a download in the background, and a reference is stored in the user's session. Every time the user reloads the page, a check is made to see if the download is finished, and if it is done it is display. You can also see the &lt;code&gt;stash()&lt;/code&gt;/&lt;code&gt;retrieve_result()&lt;/code&gt; API in use, which allows temporarily storing results under a key suitable for serialization in a session object.&lt;br /&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;import logging&lt;br /&gt;from flask import Flask, session, escape&lt;br /&gt;from crochet import setup, in_reactor, retrieve_result, TimeoutError&lt;br /&gt;setup()&lt;br /&gt;&lt;br /&gt;app = Flask(__name__)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@in_reactor&lt;br /&gt;def download_page(reactor, url):&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    Download a page.&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    from twisted.web.client import getPage&lt;br /&gt;    return getPage(url)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@app.route('/')&lt;br /&gt;def index():&lt;br /&gt;    if 'download' not in session:&lt;br /&gt;        # @in_reactor functions return a DeferredResult:&lt;br /&gt;        result = download_page('http://google.com')&lt;br /&gt;        session['download'] = result.stash()&lt;br /&gt;        return &quot;Starting download, refresh to track progress.&quot;&lt;br /&gt;&lt;br /&gt;    # retrieval is a one-time operation:&lt;br /&gt;    result = retrieve_result(session.pop('download'))&lt;br /&gt;    try:&lt;br /&gt;        download = result.wait(timeout=0.1)&lt;br /&gt;        return &quot;Downloaded: &quot; + escape(download)&lt;br /&gt;    except TimeoutError:&lt;br /&gt;        session['download'] = result.stash()&lt;br /&gt;        return &quot;Download in progress...&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    import os, sys&lt;br /&gt;    logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)&lt;br /&gt;    app.secret_key = os.urandom(24)&lt;br /&gt;    app.run()&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;</content:encoded>
	<dc:date>2013-04-10T17:08:05+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-7234681690694906707">
	<title>Duncan McGreggor: Interview with Erlang Co-Creators</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/W00WVpAvuxI/interview-with-erlang-co-creators.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://4.bp.blogspot.com/-iR9SXsfKR20/UT_3CEIkNKI/AAAAAAAAADU/6ZqJHwDtiIM/s1600/erlang-logo-darkback.png&quot;&gt;&lt;img src=&quot;http://4.bp.blogspot.com/-iR9SXsfKR20/UT_3CEIkNKI/AAAAAAAAADU/6ZqJHwDtiIM/s1600/erlang-logo-darkback.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;167&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A few weeks back -- the week of the PyCon sprints, in fact -- was the &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2013&quot;&gt;San Francisco Erlang conference&lt;/a&gt;. This was a small conference (I haven't been to one so small since PyCon was at GW in the early 2000s), and absolutely charming as a result. There were some really nifty talks and a lot of fantastic hallway and ballroom conversations... not to mention Robert Virding's very sweet &lt;a href=&quot;https://twitter.com/oubiwann/status/316006519646855168/photo/1&quot;&gt;Raspberry Pi Erlang-powered wall-sensing Lego robot&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
My first Erlang Factory, the event lasted for two fun-filled days and culminated with a &lt;a href=&quot;https://twitter.com/oubiwann/status/316005811690287104/photo/1&quot;&gt;stroll in the evening sun of San Francisco&lt;/a&gt; down to the Rackspace office where we held a &lt;a href=&quot;http://www.meetup.com/Erlang-Factory-SF-Bay-Area/events/109049612/&quot;&gt;Meetup mini-conference&lt;/a&gt; (beer, food, and three more talks). Conversations lasted until well after 10pm with the &lt;a href=&quot;https://twitter.com/oubiwann/status/315330456671367168/photo/1&quot;&gt;remaining die-hards&lt;/a&gt; making a trek through the nighttime streets SOMA and the Financial District back to their respective abodes.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-UTNPsMlxcvY/UQBSsj_BQWI/AAAAAAAAADA/SZjwtfYECMw/s1600/RackspaceLogoMedium.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-UTNPsMlxcvY/UQBSsj_BQWI/AAAAAAAAADA/SZjwtfYECMw/s1600/RackspaceLogoMedium.png&quot; border=&quot;0&quot; width=&quot;191&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Before the close of the conference, however, we managed to sneak a ride (4 of us in a Mustang) to Scoble's studio and conduct an interview with &lt;a href=&quot;http://joearms.github.io/&quot;&gt;Joe Armstrong&lt;/a&gt; and &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2012/speakers/RobertVirding&quot;&gt;Robert Virding&lt;/a&gt;. We covered some of the basics in order to provide a gentle overview for folks who may not have been exposed to Erlang yet and are curious about what it has to offer our growing multi-core world. This wend up on the &lt;a href=&quot;http://www.rackspace.com/blog/rackspace-takes-a-look-at-the-erlang-language/&quot;&gt;Rackspace blog&lt;/a&gt; as well as the &lt;a href=&quot;http://www.building43.com/videos/2013/03/26/rackspace-takes-a-look-at-the-erlang-language/&quot;&gt;Building 43&lt;/a&gt; site. We've got a couple of teams using Erlang in Rackspace; if you're interested, be sure to email &lt;a href=&quot;mailto:steven.pestorich@RACKSPACE.COM&quot;&gt;Steve Pestorich&lt;/a&gt; and ask him what's available!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=W00WVpAvuxI:z_5UtlrkeH0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=W00WVpAvuxI:z_5UtlrkeH0:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=W00WVpAvuxI:z_5UtlrkeH0:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=W00WVpAvuxI:z_5UtlrkeH0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=W00WVpAvuxI:z_5UtlrkeH0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=W00WVpAvuxI:z_5UtlrkeH0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=W00WVpAvuxI:z_5UtlrkeH0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=W00WVpAvuxI:z_5UtlrkeH0:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/W00WVpAvuxI&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-09T21:25:25+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3067593860715012258.post-4310396179458702224">
	<title>Future Foundries: Presenting Crochet: Use Twisted as a library</title>
	<link>http://blog.futurefoundries.com/2013/04/presenting-crochet-use-twisted-as.html</link>
	<content:encoded>Twisted is an event-driven framework; by default it expects to run the reactor event loop in your main thread to drive your application. If however you're writing a Django or Flask application you may want to use Twisted as just another library. Unless you choose to use Twisted as a WSGI container, this requires you to run the reactor in a thread. Today I am happy to announce &lt;a href=&quot;https://pypi.python.org/pypi/crochet&quot;&gt;Crochet&lt;/a&gt;, which makes using Twisted even easier in this situation.&lt;br /&gt;&lt;br /&gt;Here's an example program using Crochet, allowing it to easily use Twisted from a normal, blocking command-line tool:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;from __future__ import print_function&lt;br /&gt;&lt;br /&gt;from crochet import setup, in_reactor&lt;br /&gt;setup()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@in_reactor&lt;br /&gt;def mx(reactor, domain):&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    Return list of MX domains for a given domain.&lt;br /&gt;    &quot;&quot;&quot;&lt;br /&gt;    from twisted.names.client import lookupMailExchange&lt;br /&gt;    def got_records(result):&lt;br /&gt;        hosts, authorities, additional = result&lt;br /&gt;        return [str(record.name) for record in additional]&lt;br /&gt;    d = lookupMailExchange(domain)&lt;br /&gt;    d.addCallback(got_records)&lt;br /&gt;    return d&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def main(domain):&lt;br /&gt;    print(&quot;Mail servers for %s:&quot; % (domain,))&lt;br /&gt;    for mailserver in mx(domain).wait():&lt;br /&gt;        print(mailserver)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    import sys&lt;br /&gt;    main(sys.argv[1])&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;When we run it on the command line, output looks this:  &lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;$ python mxquery.py gmail.com&lt;br /&gt;Mail servers for gmail.com:&lt;br /&gt;alt2.gmail-smtp-in.l.google.com&lt;br /&gt;alt2.gmail-smtp-in.l.google.com&lt;br /&gt;alt3.gmail-smtp-in.l.google.com&lt;br /&gt;alt3.gmail-smtp-in.l.google.com&lt;br /&gt;alt4.gmail-smtp-in.l.google.com&lt;br /&gt;alt4.gmail-smtp-in.l.google.com&lt;br /&gt;alt1.gmail-smtp-in.l.google.com&lt;br /&gt;gmail-smtp-in.l.google.com&lt;br /&gt;gmail-smtp-in.l.google.com&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;The library provides much more functionality, but that's the gist of it: it runs and stops the Twisted reactor for you, and wraps asynchronous results in a blocking API. If you'd like to try out Crochet, or learn more about its other features, visit Crochet's &lt;a href=&quot;https://pypi.python.org/pypi/crochet&quot;&gt;PyPI page&lt;/a&gt;.</content:encoded>
	<dc:date>2013-04-09T18:40:52+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-4350363846291077818.post-3291509457723722664">
	<title>Jp Calderone: There, I Fixed It</title>
	<link>http://as.ynchrono.us/2013/04/there-i-fixed-it.html</link>
	<content:encoded>&lt;p&gt;Got a new hard drive for my Inspiron 1545 - an SSD, at last!  Turns out it was probably just in time too, as I found an unrecoverable bad block on the WD it is replacing. &lt;/p&gt; &lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/side-by-side.jpg&quot; title=&quot;SSD / WD side-by-side&quot; /&gt;  &lt;p&gt;Just one problem.  The SSD is smaller than the drive it is replacing.  Not narrower (they're both 2.5&quot; drives - which means they're both 2.75&quot; wide).  But thinner.  I suppose that dimension isn't standardized by anybody.  But surely that can't actually be a problem?  After all, thinner still fits in the drive bay... &lt;/p&gt; &lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/drive-not-found.jpg&quot; title=&quot;drive not found&quot; /&gt; &lt;p&gt;Guess it is a problem after all.  Near as I can tell, the SATA port in the Inspiron requires the drive to completely fill the bay in order to force the all the contacts to ... contact. &lt;/p&gt; &lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/thick-thin-comparison.jpg&quot; title=&quot;drive thick/thin comparison&quot; /&gt; &lt;p&gt;Good thing the problem is that it's too thin, not too thick.  I can fix this. &lt;/p&gt; &lt;div&gt;&lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/drive-with-scrap.jpg&quot; style=&quot;width: 40%;&quot; title=&quot;drive-with-scrap&quot; /&gt;&lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/drive-with-scrap-taped.jpg&quot; style=&quot;width: 40%;&quot; title=&quot;drive-with-scrap-taped&quot; /&gt;&lt;/div&gt; &lt;p&gt;Problem solved. &lt;/p&gt; &lt;img src=&quot;https://s3.amazonaws.com/jcalderone-photographs/replacement-drive/success.jpg&quot; title=&quot;yea I installed debian on it&quot; /&gt; &lt;p&gt;Thanks for the well-engineered hardware, guys. &lt;/p&gt;</content:encoded>
	<dc:date>2013-04-08T22:49:59+00:00</dc:date>
	<dc:creator>Jean-Paul Calderone (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-8061385243879530981">
	<title>Twisted Matrix Laboratories: Join Twisted for Google Summer of Code and the Outreach Program for Women</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/xEhVh6EVIC8/join-twisted-for-google-summer-of-code.html</link>
	<content:encoded>&lt;br /&gt;
Twisted is once again participating in Google's Summer of Code this year, as well as the GNOME Outreach Program for Women. If you're a student interested in working on Twisted as part of a paid internship, please visit our &lt;a href=&quot;http://twistedmatrix.com/trac/wiki/GSoC2013&quot;&gt;Google SoC&lt;/a&gt; page. We use best practices like in-depth code reviews and full coverage unit tests, so this is a great way to improve your technical skills whether you're a beginner or an expert programmer.&lt;br /&gt;
&lt;br /&gt;
In addition, Twisted is once again participating the &lt;a href=&quot;https://live.gnome.org/OutreachProgramForWomen&quot;&gt;GNOME Outreach Program for Women&lt;/a&gt;, with the generous support of Mozilla, providing a paid internship for one woman to spend the summer participating in and contributing to Twisted. Unlike Google's program, the outreach program is not restricted to students; if you qualify, we do encourage you to apply to both. This internship is appropriate for any level of open source experience.&lt;br /&gt;
&lt;br /&gt;
If you have worked on an open source project before, great! If not, we'll help you learn the development and communication tools we use as part of the internship. Some Python experience is a prerequisite, and a small initial contribution to Twisted is a part of applying (if this sounds intimidating, don't worry, we'll help you pick a task to complete and you'll have lots of support as you work through submitting your first patch.) Please check out the &lt;a href=&quot;https://twistedmatrix.com/trac/wiki/WomenOutreach2013&quot;&gt;full OPW&lt;/a&gt; and &lt;a href=&quot;https://twistedmatrix.com/trac/wiki/GSoC2013&quot;&gt;GSoC&lt;/a&gt; descriptions and apply today!&lt;br /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/xEhVh6EVIC8&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-05T01:40:57+00:00</dc:date>
	<dc:creator>Itamar Turner-Trauring (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-7215023495721058298">
	<title>Duncan McGreggor: Autoscale and Orchestration: the Heat of OpenStack</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/qL_4LL37XWY/autoscale-and-orchestration-heat-of.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-2hnHY6RH64w/UVxf7PCDPvI/AAAAAAAAAEE/baimMc7CxHM/s1600/openstack-logo52.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-2hnHY6RH64w/UVxf7PCDPvI/AAAAAAAAAEE/baimMc7CxHM/s200/openstack-logo52.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Several months before I joined Rackspace last year, there were efforts under way to provide an Autoscaling solution for Rackspace customers. Features that we needed in OpenStack and Heat hadn't been released yet, and there were no OpenStack experts on the Autoscaling team. As such, the engineers began developing a product that met Rackspace customer needs, integrated with the&lt;br /&gt;
existing monitoring and load-balancing infrastructure, and made calls to OpenStack Nova APIs as part of the scaling up and down process.&lt;br /&gt;
&lt;br /&gt;
At PyCon this year, Monty Taylor, Robert Collins, Clint Byrum, Devananda van der Veen, and I caught up and chatted about what their views were of the current status of autoscaling support in OpenStack Heat. It seems that the two pieces we need the most -- LBaas and support for external monitoring systems (perhaps via webhooks) -- are nascent and not ready for prime-time yet. Regardless, Monty and his team encouraged us to dive into Heat, contribute patches, and in general, release our work for consumption by other Stackers.&lt;br /&gt;
&lt;br /&gt;
Deeply encouraged by these interactions, we took this information to Rackspace management and, to quote Monty Python, &lt;a href=&quot;http://www.youtube.com/watch?v=enSYlCEz5VI&quot;&gt;there was much rejoicing&lt;/a&gt;. Obviously OpenStack is huge for Rackspace. Even more, there is a lot of excitement about Heat, the existing autoscaling features in OpenStack, and getting our engineers involved and contributing to these efforts.&lt;br /&gt;
&lt;br /&gt;
In the course of these conversations, we discovered that Heat was getting lots of attention internally. It turns out that another internal Rackspace project had been doing something pretty cool: they were experimenting with the development of a portable syntax for application description and deployment orchestration. Their work had started to converge on some of the functionality provided by Heat, and they had a similar experience as the Autoscaling team. The timing was right to contribute what they have learned and align all of their continued efforts with adding value to Heat.&lt;br /&gt;
&lt;br /&gt;
Along these lines, we are building &lt;a href=&quot;http://lists.openstack.org/pipermail/openstack-dev/2013-April/007126.html&quot;&gt;two new teams&lt;/a&gt; that will focus on Heat development: one &lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-UTNPsMlxcvY/UQBSsj_BQWI/AAAAAAAAADA/SZjwtfYECMw/s1600/RackspaceLogoMedium.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-UTNPsMlxcvY/UQBSsj_BQWI/AAAAAAAAADA/SZjwtfYECMw/s200/RackspaceLogoMedium.png&quot; border=&quot;0&quot; width=&quot;191&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
contributing to features related to autoscaling (not necessarily limited to Heat) and the other contributing to the ongoing conversations regarding the separation of concerns between orchestration and configuration management. Everyone -- from engineers to management -- is very excited about this new direction in which our teams are moving. Not only will it bring new developers to OpenStack, but it is aligning our teams with Rackspace's OpenStack roots and the company's vision for supporting the growing cloud community.&lt;br /&gt;
&lt;br /&gt;
Simply put: we're pretty damned pumped and looking forward to more good times with OpenStack :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=qL_4LL37XWY:0nPUp8LrWR0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=qL_4LL37XWY:0nPUp8LrWR0:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=qL_4LL37XWY:0nPUp8LrWR0:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=qL_4LL37XWY:0nPUp8LrWR0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=qL_4LL37XWY:0nPUp8LrWR0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=qL_4LL37XWY:0nPUp8LrWR0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=qL_4LL37XWY:0nPUp8LrWR0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=qL_4LL37XWY:0nPUp8LrWR0:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/qL_4LL37XWY&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-04T02:19:53+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-4906908003210950630">
	<title>Twisted Matrix Laboratories: Twisted 13.0.0 released</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/f-6tAoQhobU/on-behalf-of-twisted-matrix.html</link>
	<content:encoded>On behalf of Twisted Matrix Laboratories, I am pleased to announce the release of Twisted 13.0.&lt;br /&gt;
&lt;br /&gt;
Among the 70 tickets closed, we can see:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A new 
&lt;a href=&quot;http://twistedmatrix.com/documents/13.0.0/core/howto/defer-intro.html&quot;&gt;Introduction to Deferreds&lt;/a&gt;  document.&lt;/li&gt;
&lt;li&gt;A fix in twisted.web.template where attributes were not quoted
properly, risking HTML injection. &lt;/li&gt;
&lt;li&gt;Support for unicode domain names in twisted.names SRVConnector and
Name classes, after a 12.3 regression &lt;/li&gt;
&lt;li&gt;A workaround for platform limitations when trying to schedule events
far in the future.&lt;/li&gt;
&lt;/ul&gt;
For more information, see the NEWS file here:

 &lt;a href=&quot;http://twistedmatrix.com/Releases/Twisted/13.0/NEWS.txt&quot;&gt;NEWS.txt&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Download it now from

 &lt;a href=&quot;http://pypi.python.org/packages/source/T/Twisted/Twisted-13.0.0.tar.bz2&quot;&gt;Twisted-13.0.0.tar.bz2&lt;/a&gt; or &lt;a href=&quot;http://pypi.python.org/packages/2.7/T/Twisted/Twisted-13.0.0.win32-py2.7.msi&quot;&gt;Twisted-13.0.0.win32-py2.7.msi&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to the supporters of Twisted via the Software Freedom Conservancy
and to the many contributors for this release.&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/f-6tAoQhobU&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-03T11:20:55+00:00</dc:date>
	<dc:creator>Thomas Hervé (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-5989945146803525157">
	<title>Duncan McGreggor: Maths and Programming: Whence Recursion?</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/fs7k_bfXrs0/maths-and-programming-whence-recursion.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s1600/Lambda.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s200/Lambda.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
As a manager in the software engineering industry, one of the things that I see on a regular basis is a general lack of knowledge from less experienced developers (not always &quot;younger&quot;!) with regard to the foundations of computing and the several related fields of mathematics. There is often a great deal of focus on what the hottest new thing is, or how the industry can be changed, or how we can innovate on the decades of profound research that has been done. All noble goals.&lt;br /&gt;
&lt;br /&gt;
Notably, another trend I've recognized is that in a large group of devs, there are often a committed few who &lt;i&gt;really&lt;/i&gt; know their field and its history. That is always so amazing to me and I have a great deal of admiration for the commitment and passion they have for their art. Let's have more of that :-)&lt;br /&gt;
&lt;br /&gt;
As for myself, these days I have many fewer hours a week which I can dedicate to programming compared to what I had 10 years ago. This is not surprising, given my career path. However, what it &lt;i&gt;has&lt;/i&gt; meant is that I have to be much more focused when I do get those precious few hours a night (and sometimes just a few per week!). I've managed this in an ad hoc manner by taking quick notes about fields of study that pique my curiosity. Over time, these get filtered and a few pop to the top that I really want to give more time.&lt;br /&gt;
&lt;br /&gt;
One of the driving forces of this filtering process is my never-ending curiosity: &quot;&lt;i&gt;Why&lt;/i&gt; is it that way?&quot; &quot;How did this come to be?&quot; &quot;What is the &lt;i&gt;history&lt;/i&gt; behind that convention?&quot; I tend to keep these musings to myself, exploring them at my leisure, finding some answers, and then moving on to the next question (usually this takes several weeks!).&lt;br /&gt;
&lt;br /&gt;
However, given the observations of the recent years, I thought it might be constructive to ponder aloud, as it were. To explore in a more public forum, to set an example that the vulnerability of curiosity and &quot;not knowing&quot; is quite okay, that even those of us with lots of time in the industry are constantly learning, constantly asking.&lt;br /&gt;
&lt;br /&gt;
My latest curiosity has been around recursion: who first came up with it? How did it make it's way from abstract maths to programming languages? How did it enter the consciousness of so many software engineers (especially those who are at ease in functional programming)? It turns out that an answer to this is actually quite closely related to a previous post I wrote on &lt;a href=&quot;http://technicae.cogitat.io/2012/12/the-secret-history-of-lambda.html&quot;&gt;the secret history of lambda&lt;/a&gt;. A short version goes something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Giuseppe_Peano&quot;&gt;Giuseppe Peano&lt;/a&gt; wanted to establish a firm foundation for logic and maths in general. As part of this, he ended up creating &lt;a href=&quot;http://en.wikipedia.org/wiki/Peano_axioms&quot;&gt;consistent axioms&lt;/a&gt; around the hard-to-define natural numbers, counting, and arithmetic operations (which utilized recursion).  While visiting a conference in Europe, &lt;a href=&quot;http://en.wikipedia.org/wiki/Bertrand_russell&quot;&gt;Bertrand Russell&lt;/a&gt; was deeply impressed by the dialectic talent of Peano and his unfailing clarity; he queried Peano as to his secret for success (Peano told him) and them asked for all of his published works. Russell proceeded to studied these quite deeply and eventually co-wrote the &lt;a href=&quot;http://en.wikipedia.org/wiki/Principia_mathematica&quot;&gt;Principia Mathematica&lt;/a&gt;, which &lt;a href=&quot;http://en.wikipedia.org/wiki/Alonzo_Church&quot;&gt;Alonzo Church&lt;/a&gt; (along with his grad students) sought to improve upon later. Alonzo Church ended up developing the &lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_calculus&quot;&gt;lambda calculus&lt;/a&gt; based on his work around the Principia and his student, &lt;a href=&quot;http://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29&quot;&gt;John McCarthy&lt;/a&gt;, later created the first functional programming language, &lt;a href=&quot;http://en.wikipedia.org/wiki/Lisp_%28programming_language%29&quot;&gt;Lisp&lt;/a&gt;, utilizing concepts from the lambda calculus (recursion and function composition).&lt;br /&gt;
&lt;br /&gt;
In the course of reading between 40-50 mathematics papers (including various histories) over the last week, I have learned far more than I had originally intended. So much so, in fact, that I'm currently working on a very fun recursion tutorial that not only covers the usual practical stuff, but steps the reader through programming implementations of the Peano axioms, arithmetic definitions, the Ackermann function, and parts of the lambda calculus.&lt;br /&gt;
&lt;br /&gt;
I've got a few more blog post ideas cooking that dive into functions, their history and evolution. We'll see how those pan out. Even more exciting, though, was having found interesting papers discussing the evolution of functions and the birth of &lt;a href=&quot;http://en.wikipedia.org/wiki/Category_theory&quot;&gt;category theory&lt;/a&gt; from algebraic topology. This, needless to say, spawned a whole new trail of research, papers, and books... and I've got some great ideas for future blog posts/tutorials around this topic as well. (I've encountered category theory before, but watching it appear unsearched and unbidden in the midst of the other reading was quite delightful).&lt;br /&gt;
&lt;br /&gt;
In closing, I enjoy reading not only the original papers (and correspondence between great thinkers of a previous era), but also the meanderings and rediscoveries of my peers. I've run across blog posts like this in the past, and they were quite enchanting. I hope that we continue to foster that in our industry, and that we see more examples of it in the future.&lt;br /&gt;
&lt;br /&gt;
Keep on questing ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=fs7k_bfXrs0:RAHB4RRDBLY:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=fs7k_bfXrs0:RAHB4RRDBLY:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=fs7k_bfXrs0:RAHB4RRDBLY:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=fs7k_bfXrs0:RAHB4RRDBLY:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=fs7k_bfXrs0:RAHB4RRDBLY:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=fs7k_bfXrs0:RAHB4RRDBLY:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=fs7k_bfXrs0:RAHB4RRDBLY:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=fs7k_bfXrs0:RAHB4RRDBLY:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/fs7k_bfXrs0&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-03T00:33:31+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-1267458971896358542.post-3283253923216843238">
	<title>Twisted Matrix Laboratories: Report the Third</title>
	<link>http://feedproxy.google.com/~r/TwistedMatrixLaboratories/~3/7khcyPdCWFQ/report-third.html</link>
	<content:encoded>&lt;p&gt;
During the past three weeks, 23 tickets got some attention that they
would not have received without the sponsored development.  The result
was 9 closed tickets and 8 other tickets unblocked for other
developers to resume work on.
&lt;/p&gt;
&lt;p&gt;
I also spent some time working on getting newly donated slaves setup,
as well as documenting the setup of the main twistedmatrix.com
server, in preparation for automating the redeployment of services to
new hardware.
&lt;/p&gt;
&lt;p&gt;
This work is made possible by the sponsorship of individuals and
organizations which have donated to the Twisted project, part of the
Software Freedom Conservancy, a not-for-profit organization that helps
promote, improve, and develop open source software.  Thanks!
&lt;/p&gt;
&lt;p&gt;
The tickets I reviewed, that have now been closed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/1333&quot;&gt;#1333: Survey existing FTP servers and clients to figure out how LIST works&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/3908&quot;&gt;#3908: Code using twisted.names.client.Resolver is hard to unit test&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6240&quot;&gt;#6240: Merge `twisted/internet/_utilspy3.py` into `twisted/internet/utils.py`&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6337&quot;&gt;#6337: OpenSSLCertificateOptions doesn’t disallow SSLv2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6354&quot;&gt;#6354: Main NEWS file is not generated properly anymore&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6377&quot;&gt;#6377: print traceback in successResultOf error reporting&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6380#comment:4&quot;&gt;#6380: Add optional expected exception types to failureResultOf&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6392&quot;&gt;#6392: Typo in test_irc&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
Other tickets I have reviewed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5126&quot;&gt;#5126: Add http cache support to Agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5270&quot;&gt;#5270: Add API to endpoints for connecting a protocol instance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5386&quot;&gt;#5386: Get rid of references and code specific to Python 2.3&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5411&quot;&gt;#5411: ftp_NLST and ftp_LIST should only send data as &quot;str&quot;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/5955&quot;&gt;#5955: Move inlineCallbacks test from twisted.test.test_failure to somewhere better (test_defer?)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6286&quot;&gt;#6286: SSL server endpoints string syntax results in creation of DefaultOpenSSLContextFactory&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6341&quot;&gt;#6341: Replace usage of twisted.python.text and deprecate it&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6350&quot;&gt;#6350: Add a few unittest2 assertions to TestCase&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;
Tickets I have closed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6316#comment:7&quot;&gt;#6316: Minor cleanup of pam tests in `twisted.test.test_newcred`.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;
Other tickets I have worked on:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/1009&quot;&gt;#1009: Document inlineCallbacks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6251&quot;&gt;#6251: Add a helper function for getting the body of an HTTP request.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6284&quot;&gt;#6284: FTP.ftp_STOR() should handle IsADirectoryError error&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6286&quot;&gt;#6286: SSL server endpoints string syntax results in creation of DefaultOpenSSLContextFactory&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twistedmatrix.com/trac/ticket/6363&quot;&gt;#6363: Make twisted.trial.unittest._iterateTests public.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/TwistedMatrixLaboratories/~4/7khcyPdCWFQ&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-28T08:59:33+00:00</dc:date>
	<dc:creator>Tom Prince (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="http://ashfall.github.com/blog/2013/03/23/pycon-2013-down-the-rabbit-hole">
	<title>Ashwini Oruganti: PyCon 2013: Down the Rabbit Hole</title>
	<link>http://ashfall.github.com/blog/2013/03/23/pycon-2013-down-the-rabbit-hole/</link>
	<content:encoded>&lt;p&gt;So there was PyCon. And there was me.&lt;/p&gt;

&lt;p&gt;Now there are two ways in which I can tell you how it was. I can use some really big words and give you a dry report of events.  But that’s boring, and there’s enough boring stuff out there.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;“Speak English!” said the Eaglet. “I don’t know the meaning of half those long words, and I don’t believe you do either!”&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;So here’s a recollection of whatever I can remember, without using many big words.&lt;/p&gt;




&lt;p&gt;It started on March 12, at least the interesting part did.&lt;/p&gt;

&lt;p&gt;I was welcomed into SJC with a PyLadies banner and a smiling Lynn Root. I also met Hynek, and we drove to the hotel and I guess that’s about it for the first day.&lt;/p&gt;

&lt;p&gt;The next day, i.e. March 13, I went to the Convention Centre, met Yarko, who printed my badge. I met Steve Holden - no wait, didn’t really meet, I jumped into his way and talked to him - I wonder how weird it looked. I did some volunteering - moved boxes, helped out at the registration desk - was fun. I then trotted around the venue with Stuart, this time &lt;em&gt;pretending&lt;/em&gt; to do some volunteering.  Met Doug - he’s nice, and gave me more work. I saw Guido at the Language Summit, and he was getting coffee alone, but looked somewhat tired, so I decided to leave him alone. I wasn’t equally kind to Glyph though, and chatted a lot, everything from the history of Twisted to, well… DuckDuckGo.&lt;/p&gt;

&lt;p&gt;I also wasn’t that kind to Asheesh, and badgered him loads. He called me weird because Twisted didn’t scare me. Jessica, who’s super-humanly awesome, by the way, if you didn’t already know, gathered lots of folks from Boston and OpenHatch, and we all hung out and ate food. Good food, actually, in case you were wondering. I also got to know the secret to how &lt;em&gt;paulproteus&lt;/em&gt; is omnipresent on IRC &lt;em&gt;(he’s everywhere you look!)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Later that night, I met &lt;em&gt;nedbat&lt;/em&gt; and a few CPython core devs who told me stories about old Twisted days and some insider-info on Glyph, his name and identity and stuff. Not going to write about that though - if you want to know, get your own tickets to PyCon. We also discussed some cool MIT Media labs stuff, and I met Steve again, and he seemed to remember my name &lt;em&gt;(I guess that means I must have weirded him out significantly earlier)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Moving on to the 14th of March. The day started with me meeting Itamar, who had a tutorial later that day. Then had lunch with some Twisted people, and then there was that tutorial. I met Jean-Paul for the first time, and learnt that I had caused him so much anguish during the summer that he decided to get a new job this summer. I apologised profusely, but I think the damage is done. Oh, and I threw my laptop on the floor, because you know, no one wants to not look like a fool in a room full of people.&lt;/p&gt;

&lt;p&gt;Then I went back to my room, after revealing a nervous-wrecked self to Glyph and Ying. I woke up next day and went to attend the Keynote. Now, I was quite sleepy and tired and lost and fretting a bit over my talk, so I wasn’t expecting to find a 30 minute lecture too interesting. To my immense surprise, I actually enjoyed it. I met Michelle and a few other PyLadies, and we all got a Raspberry Pi each, and then I vanished until my talk.&lt;/p&gt;

&lt;p&gt;I saw that there were actual people present in my talk, which was quite surprising. Oh wait, there were some really helpful people in the Green Room, a special mention must go to David, who was great at calming nerves - he asked me to take two bottles of water to the talk - and I did. Anyway, &lt;a href=&quot;http://lanyrd.com/2013/pycon/sccqmf/&quot;&gt;it&lt;/a&gt; seemed to have gone by okay - I did throw the mic on the floor in the middle of my talk (I guess I throw things around a lot) and then there were some issues with the computer, but anyway, I kept talking, it’s hard to shut me up. People were nice, they laughed at my jokes and Glyph let me call him a liar. After the talk, I saw that the Twisted core team was holding some signs up, which spelt “Go Ashfall/Ashwini”, and that’s nice enough to make you cry. I didn’t cry though, because everything was being &lt;a href=&quot;http://pyvideo.org/video/1740/twisted-logic-endpoints-and-why-you-shouldnt-be&quot;&gt;recorded&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Later that day, I ate some more good food with the Twisted people, and heard more stories.&lt;/p&gt;

&lt;p&gt;The next day, the 16th of March, I got to the Keynote. And then there was Glyph’s talk. He mentioned my name and referred to some stuff I’d said in my talk (and did not, unlike me, call me a liar - I guess he’s nice), and everyone is saying that this makes me a celebrity. I don’t think it works that way, but if you believe so and want an autograph or something, feel free to drop me a mail.&lt;/p&gt;

&lt;p&gt;Then there was the PyLadies lunch, where I met more awesome people, and had some more good food. I attended Lynn’s talk next, and then went to dinner with Guido. Yes, &lt;em&gt;the&lt;/em&gt; Guido who wrote Python. My friends insist that I must describe this part well, so here it is: we drove in his car to a steakhouse, and I sat to his left. Ate food. Drank lemonade. Heard some interesting stories. Yes, PyCon exposes you to loads of stories, it is cool that way. Then Guido dropped me back to the Convention Center where everyone got together and talked about goats, which was very informative.&lt;/p&gt;

&lt;p&gt;Oh, also, Disney gave away Wreck-it Ralph action figures to all the speakers (and hence, me), and Paul Hildebrandt is one of the nicest and kindest people I have talked to. Just saying. Also, Armin Rigo is awesome - he’s perhaps the only incredibly intelligent person involved with programming I’ve met who seemed genuinely happy about life (and not grumpy at all).&lt;/p&gt;

&lt;p&gt;The next day, which was also my last day at PyCon, I attended Guido’s Keynote, and then everyone agreed that I wasn’t lying when I said that I had become cynical about software. We had the annual Twisted dinner and I had an interesting conversation with Zooko, who accepted (and even adopted) my mispronunciation of IRC nicks without hesitation or revolt. I sat with Bradley and learnt a lot, with interesting insights from Duncan - about Usenet, about embarrassing email conversations, and about proprietary software pains, I should probably write more about that sometime.&lt;/p&gt;

&lt;p&gt;And then there was the Twisted sprint, which I couldn’t attend for long, but everyone signed the Twisted book for me (also, Jessica mentioned me in the credits of that book - again, people tell me it makes me a celebrity of sorts).&lt;/p&gt;

&lt;p&gt;Well, that’s that. I met most of the Twisted team, and they were all incredibly nice. But before I finish, I would like to thank the Python Software Foundation, PyLadies, and everyone involved with PyCon, for making it possible for me to attend, and I hope I see you all again next year!&lt;/p&gt;

&lt;p&gt;So then, how was PyCon 2013? Welcoming? Engaging? Awesome? I guess you should decide for yourself.&lt;/p&gt;</content:encoded>
	<dc:date>2013-03-23T22:53:00+00:00</dc:date>
</item>
<item rdf:about="tag:metajack.im:/2013/03/22/joining-mozilla/">
	<title>Jack Moffitt: Joining Mozilla</title>
	<link>http://feedproxy.google.com/~r/metajack/~3/p-toczV_EAc/</link>
	<content:encoded>&lt;p&gt;On Monday, I join Mozilla to work on
&lt;a href=&quot;https://github.com/mozilla/servo&quot;&gt;Servo&lt;/a&gt;, a new and experimental web browser
engine built on &lt;a href=&quot;http://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt;, a new systems programming
language. I am perhaps the first professional Rust programmer.&lt;/p&gt;

&lt;p&gt;This will also be the first time in over a decade that I'm not working in a
small company or a startup (usually both). I've been thinking for a while that
it would be nice to work for a company that has real resources to solve
problems, as opposed to being at the mercy of venture capitalists or the whims
of users. Mozilla's mission statement is one that is easy for me to get
behind, and they are doing very interesting things at
&lt;a href=&quot;http://www.mozilla.org/en-US/research/&quot;&gt;Mozilla Research&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I enjoy working on difficult and important projects, and it's hard for me to
imagine much that is more difficult or important than web browsers. It's an
added bonus to be working in and (hopefully) contributing to a new programming
language. I also love working with smart people, and Mozilla seems to have
those in abundance.&lt;/p&gt;

&lt;p&gt;This is going to be awesome.&lt;/p&gt;
    &lt;img src=&quot;http://feeds.feedburner.com/~r/metajack/~4/p-toczV_EAc&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-22T10:52:00+00:00</dc:date>
	<dc:creator>Jack Moffitt (jack@metajack.im)</dc:creator>
</item>
<item rdf:about="http://dreid.org/2013/03/22/the-talks-i-saw-at-pycon">
	<title>David Reid: The Talks I Saw At Pycon</title>
	<link>http://dreid.org</link>
	<content:encoded>&lt;p&gt;PyCon 2013 was amazing. Here are video links to the talks I saw whose videos are currently available. I liked them all.&lt;/p&gt;

&lt;p&gt;In no particular order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1736/worry-free-parsers-with-parsley&quot;&gt;Worry-Free Parsers with Parsley&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1778/crypto-101&quot;&gt;Crypto 101&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1698/death-by-a-thousand-leaks-what-statically-analys&quot;&gt;Death by a thousand leaks: what statically-analysing 370 Python extensions looks…&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1681/so-easy-you-can-even-do-it-in-javascript-event-d&quot;&gt;So Easy You Can Even Do It in JavaScript: Event-Driven Architecture for Regular …&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1727/solid-python-application-deployments-for-everybod&quot;&gt;Solid Python Application Deployments For Everybody&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1668/keynote-2&quot;&gt;Keynote - Eben Upton&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1848/opening-statements&quot;&gt;Opening Statements&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1740/twisted-logic-endpoints-and-why-you-shouldnt-be&quot;&gt;Twisted Logic: Endpoints and Why You Shouldn’t Be Scared of Twisted&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1677/how-the-internet-works&quot;&gt;How the Internet works&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1667/keynote-1&quot;&gt;Guido van Rossum’s Keynote&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1694/so-you-want-to-write-an-interpreter&quot;&gt;So you want to write an interpreter?&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://pyvideo.org/video/1684/the-end-of-object-inheritance-the-beginning-of&quot;&gt;The End Of Object Inheritance &amp;amp; The Beginning Of A New Modularity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, these are just a few of the talks at the conference, you can find more at &lt;a href=&quot;http://pyvideo.org/category/33/pycon-us-2013&quot;&gt;pyvideo.org&lt;/a&gt;.&lt;/p&gt;</content:encoded>
	<dc:date>2013-03-22T07:00:00+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-3233128.post-8985265003193719658">
	<title>Donovan Preston: Guido doesn't want non-portable assembly in Python and it's understandable</title>
	<link>http://donovanpreston.blogspot.com/2013/03/guido-doesnt-want-non-portable-assembly.html</link>
	<content:encoded>&lt;p&gt;(I wrote a long comment in the &lt;a href=&quot;https://news.ycombinator.com/item?id=5395385&quot;&gt;Hacker News discussion of Guido's slides about his plans for async io and asymmetric coroutines in Python 3.4&lt;/a&gt;, but I thought it was good enough to deserve a blog post)&lt;/p&gt;

&lt;p&gt;From a certain perspective [Guido's desire to keep non-portable stack slicing assembly out of Python] is a rational decision. Because the CPython API relies so heavily on the C stack, either some platform-specific assembly is required to slice up the C stack to implement green threads, or the entire CPython API would have to be redesigned to not keep the Python stack state on the C stack.&lt;/p&gt;

&lt;p&gt;Way back in the day &lt;a href=&quot;http://www.python.org/dev/peps/pep-0219/&quot;&gt;the proposal for merging Stackless into mainline Python&lt;/a&gt; involved removing Python's stack state from the C stack. However there are complications with calling from C extensions back into Python that ultimately killed this approach.&lt;/p&gt;

&lt;p&gt;After this Stackless evolved to be a much less modified fork of the Python codebase with a bit of platform specific assembly that performed &quot;stack slicing&quot;. Basically when a coro starts, the contents of the stack pointer register are recorded, and when a coro wishes to switch, the slice of the stack from the recorded stack pointer value to the current stack pointer value is copied off onto the heap. The stack pointer is then adjusted back down to the saved value and another task can run in that same stack space, or a stack slice that was stored on the heap previously can be copied back onto the stack and the stack pointer adjusted so that the task resumes where it left off.&lt;/p&gt;

&lt;p&gt;Then around 2005 the Stackless stack slicing assembly was ported into a CPython extension as part of py.lib. (By Armin Rigo. A million thanks from me for this.) This was known as greenlet. Unfortunately all the original codespeak.net py.lib pages are 404 now, but &lt;a href=&quot;http://agiletesting.blogspot.com/2005/07/py-lib-gems-greenlets-and-pyxml.html&quot;&gt;here's a blog post from around that time that talks about it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Finally the &lt;a href=&quot;https://pypi.python.org/pypi/greenlet&quot;&gt;relevant parts of greenlet were extracted&lt;/a&gt; from py.lib into a standalone greenlet module, and eventlet, gevent, et cetera grew up around this packaging of the Stackless stack slicing code.&lt;/p&gt;

&lt;p&gt;So you see, using the Stackless strategy in mainline python would have either required breaking a bunch of existing C extensions and placing limitations on how C extensions could call back into Python, or custom low level stack slicing assembly that has to be maintained for each processor architecture. CPython does not contain any assembly, only portable C, so using greenlet in core would mean that CPython itself would become less portable.&lt;/p&gt;

&lt;p&gt;Generators, on the other hand, get around the issue of CPython's dependence on the C stack by unwinding both the C and Python stack on yield. The C and Python stack state is lost, but a program counter state is kept so that the next time the generator is called, execution resumes in the middle of the function instead of the beginning.&lt;/p&gt;

&lt;p&gt;There are problems with this approach; the previous stack state is lost, so stack traces have less information in them; the entire call stack must be unwound back up to the main loop instead of a deeply nested call being able to switch without the callers being aware that the switch is happening; and special syntax (yield or yield from) must be explicitly used to call out a switch.&lt;/p&gt;

&lt;p&gt;But at least generators don't require breaking changes to the CPython API or non-portable stack slicing assembly. So maybe now you can see why Guido prefers it.&lt;/p&gt;

&lt;p&gt;Myself, I decided that the advantages of transparent stack switching and interoperability outweighed the disadvantages of relying on non-portable stack slicing assembly. However Guido just sees things in a different light, and I understand his perspective.&lt;/p&gt;</content:encoded>
	<dc:date>2013-03-22T04:10:13+00:00</dc:date>
	<dc:creator>Donovan Preston (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-1370493477066019323">
	<title>Duncan McGreggor: Rendering ReST with Klein and Twisted Templates</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/zoXwejI03es/rendering-rest-with-klein-and-twisted.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://en.wikipedia.org/wiki/File:Twisted_Logo_%28software%29.svg&quot;&gt;&lt;img src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Twisted_Logo_(software).svg/200px-Twisted_Logo_(software).svg.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In a previous life, I spent about 25 hours a day worrying about &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_management_system&quot;&gt;content management systems&lt;/a&gt; written in Python. As a result of the battle scars built up during those days, I have developed a pretty strong aversion for a heavy &lt;span id=&quot;goog_371946543&quot;&gt;&lt;/span&gt;CMS&lt;span id=&quot;goog_371946544&quot;&gt;&lt;/span&gt; when a simple approach will do. &lt;i&gt;Especially&lt;/i&gt; if the users are technologically proficient.&lt;br /&gt;
&lt;br /&gt;
At &lt;a href=&quot;http://mindpool.io/&quot;&gt;MindPool&lt;/a&gt;, we're building out our infrastructure right now using &lt;a href=&quot;http://twistedmatrix.com/trac/&quot;&gt;Twisted&lt;/a&gt; so that we can take advantage of the super amazing numbers of protocols that Twisted supports to provide some pretty unique combined services for our customers (among the many other types of services we are providing). For our website, we're using the &lt;a href=&quot;http://bottlepy.org/&quot;&gt;Bottle&lt;/a&gt;/&lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;Flask&lt;/a&gt;-inspired &lt;a href=&quot;https://github.com/twisted/klein&quot;&gt;Klein&lt;/a&gt; as our micro web framework, and this uses the most excellent &lt;a href=&quot;http://twistedmatrix.com/documents/current/web/howto/twisted-templates.html&quot;&gt;Twisted templating&lt;/a&gt;. (We are, of course, also using &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;Twitter Bootstrap&lt;/a&gt;.)&lt;br /&gt;
&lt;br /&gt;
Here's the rub, though: we want to manage our content in the git repo for our site with &lt;a href=&quot;http://docutils.sourceforge.net/rst.html&quot;&gt;ReStructured Text&lt;/a&gt; files, and there's no way to tell the template rendering machinery (the &lt;a href=&quot;https://github.com/twisted/twisted/blob/master/twisted/web/_flatten.py#L97&quot;&gt;flattener code&lt;/a&gt;) to allow raw HTML into the mix. As such, my first attempt at ReST support was rendering HTML tags all over the user-facing content.&lt;br /&gt;
&lt;br /&gt;
This ended up being a blessing in disguise, though, as I was fairly unhappy with the third-party dependencies that had popped up as a result of getting this to work. After a couple false starts, I was hot on the trail of a good solution: convert the &lt;a href=&quot;http://docutils.sourceforge.net/&quot;&gt;docutils&lt;/a&gt;-generated HTML (from the ReST source files) to &lt;a href=&quot;https://github.com/twisted/twisted/blob/master/twisted/web/_stan.py&quot;&gt;Twisted Stan tags&lt;/a&gt;, and push &lt;i&gt;those&lt;/i&gt; into the renderers.&lt;br /&gt;
&lt;br /&gt;
This ended up working like a champ. Here's what I did:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Created a couple of utility functions for easily getting HTML from ReST and Stan from ReST.&lt;/li&gt;

&lt;li&gt;Wrote a custom &lt;a href=&quot;http://twistedmatrix.com/documents/current/api/twisted.web.iweb.IRenderable.html&quot;&gt;IRenderable&lt;/a&gt; for ReST content (not strictly necessary, but organizationally useful, given what else will be added in the future).&lt;/li&gt;

&lt;li&gt;Updated the base class for &quot;content&quot; page templates to dispatch, depending upon content type.&lt;/li&gt;

&lt;/ol&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8315/8061537867_a86c1d96f5_b.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8315/8061537867_a86c1d96f5_b.jpg&quot; border=&quot;0&quot; width=&quot;320&quot; height=&quot;97&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Afterwards I was rewarded with some nicely rendered content on the staging MindPool site :-) (once the content text has been completed, we'll be pushing it live).&lt;br /&gt;
&lt;br /&gt;
Kudos to &lt;a href=&quot;https://twitter.com/dreid&quot;&gt;David Reid&lt;/a&gt; for Klein and (as usual) to the &lt;a href=&quot;http://twistedmatrix.com/trac/wiki/TwistedCommunity&quot;&gt;Twisted community&lt;/a&gt; for one hell of a framework that is the engine of &lt;i&gt;my&lt;/i&gt; internet. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=zoXwejI03es:PJAnum6XFIs:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=zoXwejI03es:PJAnum6XFIs:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=zoXwejI03es:PJAnum6XFIs:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=zoXwejI03es:PJAnum6XFIs:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=zoXwejI03es:PJAnum6XFIs:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=zoXwejI03es:PJAnum6XFIs:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=zoXwejI03es:PJAnum6XFIs:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=zoXwejI03es:PJAnum6XFIs:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/zoXwejI03es&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-14T03:44:37+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-5089448061330896036">
	<title>Duncan McGreggor: GIMP 2.8 and the Taming of Two Decades' Graphics Habits</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/QTFyLhl3cIc/gimp-28-and-taming-of-two-decades.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8322/8058043163_0eb47f3ac2_z.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8322/8058043163_0eb47f3ac2_z.jpg&quot; border=&quot;0&quot; width=&quot;320&quot; height=&quot;208&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
At long last, I find myself in a 100% comfort zone with &lt;a href=&quot;http://www.gimp.org/&quot;&gt;the GIMP&lt;/a&gt;. As a user, it's been a long road to get here ... I can't even imagine what the development teams have experienced over the past 16 years. Regardless, I am infinitely grateful for their efforts over that time, their hard work to bring the world a completely free, open source application for incredibly sophisticated image manipulation, drawing, and even painting.&lt;br /&gt;
&lt;br /&gt;
I'll provide some more details on my experiences with GIMP 2.8, but first... a romp through the past!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8451/8058043075_85b176200f_z.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8451/8058043075_85b176200f_z.jpg&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;133&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I've been using graphics programs since my first exposure to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Macintosh_Plus&quot;&gt;Macintosh Plus&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Macintosh_SE&quot;&gt;SE&lt;/a&gt; machines in the late 1980s, where the head of the science department at Bangor High School often found himself without access to his machine (yeah, thanks to me...). As much as a science geek as I was, it was actually the graphics programs to which I was addicted. In particular, I was obsessed with using &lt;a href=&quot;http://en.wikipedia.org/wiki/MacPaint&quot;&gt;MacPaint&lt;/a&gt; to draw  -- pixel by pixel -- a dithered bitmap of a photograph leaning next to the monitor.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8311/8058041996_277d0e7087_z.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8311/8058041996_277d0e7087_z.jpg&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;131&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
About 6 or 7 years later, I was at it again doing graphics work on a non-profit's Mac (running &lt;a href=&quot;http://en.wikipedia.org/wiki/System_7&quot;&gt;System 7&lt;/a&gt;) with &lt;a href=&quot;http://en.wikipedia.org/wiki/Adobe_Photoshop_version_history#Macintosh&quot;&gt;Photoshop 3.0&lt;/a&gt; -- my first exposure to this software. It was absolutely mind-blowingly awesome what Photoshop enabled one to do with digital images. I was consumed. If I was awake, I was at the computer, creating something whacky from scratch or morphing something old into a new form. Though the work that I had done was focused on graphics for HTML and getting into the nascent field of &quot;web design,&quot; some of my efforts ended up getting published as illustrations for a book.&lt;br /&gt;
&lt;br /&gt;
I continued doing graphics as part of my work (in some form or another) from then on, usually borrowing a friend's machine in order to use Photoshop (which I could not afford). Despairing of not having my own copy of the software,  I would often try out other drawing, painting, and image manipulations applications. Without fail, none would ever measure up to the power and even more, the usability, of Photoshop.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8179/8058043123_98bf5e5a93.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8179/8058043123_98bf5e5a93.jpg&quot; border=&quot;0&quot; width=&quot;295&quot; height=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
It wasn't too much after this that I got involved with Linux and open source software. As for many from that time, my life has not been the same since. But those early years were painful. My first distro (Slackware), I had to manually hack the ethernet drivers in C just to get connected to the network using my particular hardware. Regardless, Linux was all I could think about; it was all I wanted to use.&lt;br /&gt;
&lt;br /&gt;
Desperately hungering for a Photoshop-like experience on Linux, I searched HotBot on a regular basis, and finally discovered GIMP. Based on a quick glance at the now-historic splash screens, it looks like my first use of the GIMP started after the 1.0 release, though I didn't start using it more regularly until 1.2 (which had my favorite GIMP splash screen to date). &lt;br /&gt;
&lt;br /&gt;
Despite my hopes and the best efforts of an amazing development team, the GIMP infuriated me. What took one step in Photoshop usually took about 5 steps in the GIMP. The user interface was anti-intuitive, and seemed to be built by folks with an intimate knowledge of the underlying API and reflected this far too well.&lt;br /&gt;
&lt;br /&gt;
With each major release of the GIMP, I would find myself downloading and installing it, but only actually using it a handful of times. Ultimately, I'd run crying back to Photoshop, borrowing a friend's computer or persuading someone to give me an unused copy. The very nature of graphic arts is visual and intuitive... I felt that the GIMP was blocking that natural flow. As a result, I couldn't get anything done in it (and what little I did looked bad).&lt;br /&gt;
&lt;br /&gt;
Year later, while working at &lt;a href=&quot;http://www.canonical.com/&quot;&gt;Canonical&lt;/a&gt;, I had several opportunities to create graphics for various fun projects, gags, or practical jokes. Given the nature of the company's mission, I made sure to do that work using the GIMP. Though the pain of the old days had faded considerably, and GIMP had, by 2008, reached a much higher degree of usability, I still found myself enduring awkward workflow moments on a regular basis and this continued throughout the 4 years of version 2.6's release. However, during that time, an impressive selection of GIMP plugins were created, some of which I came to adore so completely that I would switch from Photoshop &lt;i&gt;to&lt;/i&gt; GIMP, just so I could use them on a project. This was a new -- and amazingly welcome -- change for me.&lt;br /&gt;
&lt;br /&gt;
Then, earlier this year, the last few pieces fell into place. &lt;br /&gt;
&lt;br /&gt;
With the release of GIMP 2.8 in May, I have not looked for nor pined over any other sophisticated graphics programs. At long last, the GIMP completely satisfies. The biggest single point of pain for me in 2.6 (given that I was running on Mac OS X most of the time) was the lack of single-window  support. For every UI interaction, I had to click twice -- once to focus on the window, and once to actually perform the given action. It was crazy-making. 2.8 finally released the goodness of single-window mode for GIMP users around the globe. Futhermore, since I have been a layer-using maniac since Photoshop 3.0 and my graphics files tend to reach into the 200 and 300 MB range due to the numbers of layers (and resolution, of course), I have a desperate need to organize the chaos of all those layers. Prior to 2.8, my layer pallet on large projects was almost completely unnavigable. With 2.8, sanity and cleanliness abounds.&lt;br /&gt;
&lt;br /&gt;
And there's more :-) Check out this short list:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;single-window mode&lt;/li&gt;
&lt;li&gt;multi-column dock windows&lt;/li&gt;
&lt;li&gt;increased screen real-estate&lt;/li&gt;
&lt;li&gt;layer groups&lt;/li&gt;
&lt;li&gt;Cairo is used for all rendering&lt;/li&gt;
&lt;li&gt;on-canvas text editing&lt;/li&gt;
&lt;/ul&gt;
For more details, you'll want to visit &lt;a href=&quot;http://www.gimp.org/release-notes/gimp-2.8.html&quot;&gt;this page&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Oddly, this walk down memory lane and ultimate endorsement of the GIMP relates to MindPool.  I used the GIMP to do all the complicated graphics work for our initial branding, logos, etc. &lt;a href=&quot;https://picasaweb.google.com/mindpoollabs/MindPoolGraphics&quot;&gt;Looking at the results&lt;/a&gt;, I'm sure if seems fairly silly and even trivial... but there's a LOT that went into that simplicity :-)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8042/8058155835_4dc4d3734b.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8042/8058155835_4dc4d3734b.jpg&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
For instance, the shot of the moon is actually taken from a photograph of the moon. It has been passed through multiple filters in order to get just the level of abstract color and shape I was looking for. Similarly for the water, but the settings were actually quite different to achieve the result I was seeking. I think the layer count peaked around 30 in one version of the file.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8177/8058177918_a3c2e512f6_b.jpg&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8177/8058177918_a3c2e512f6.jpg&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;67&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Another example is the logo that we'll be using for the &lt;a href=&quot;http://mindpool.io/&quot;&gt;company's main site&lt;/a&gt;. This also took advantage of some plugins (new and old), though mostly it relied upon paths, brush strokes, and mask layers (the latter for the water pool reflection watermarked into the image). The new features in 2.8 made all of that work very easy to do. No longer is the tool interfering with my workflow; rather, it is facilitating it. Working with graphics using open source tools is now an absolute pleasure for me.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://farm9.staticflickr.com/8173/8055158571_48006e655d_o.png&quot;&gt;&lt;img src=&quot;http://farm9.staticflickr.com/8173/8055158571_be8fccf395.jpg&quot; border=&quot;0&quot; width=&quot;320&quot; height=&quot;90&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
For giggles, I'm including a screenshot of GIMP 2.8 in action, with my single-window mode view stretched across two 27&quot; monitors (full version is &lt;a href=&quot;http://www.flickr.com/photos/oubiwann/8055158571/in/photostream&quot;&gt;here&lt;/a&gt;). Graphical editing has never been so clean!&lt;br /&gt;
&lt;br /&gt;
Thanks, GIMP team :-) It's nice to finally be home.&lt;br /&gt;
&lt;br /&gt;
Fun link: For the historically inclined, you might enjoy &lt;a href=&quot;http://www.webdesignerdepot.com/2010/02/20-years-of-adobe-photoshop/&quot;&gt;this quick read&lt;/a&gt; about the beginnings of Photoshop and the family that made it all happen :-)&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=QTFyLhl3cIc:3RUCrIakhEk:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=QTFyLhl3cIc:3RUCrIakhEk:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=QTFyLhl3cIc:3RUCrIakhEk:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=QTFyLhl3cIc:3RUCrIakhEk:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=QTFyLhl3cIc:3RUCrIakhEk:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=QTFyLhl3cIc:3RUCrIakhEk:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=QTFyLhl3cIc:3RUCrIakhEk:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=QTFyLhl3cIc:3RUCrIakhEk:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/QTFyLhl3cIc&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-14T03:44:13+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-2334767543439035515">
	<title>Duncan McGreggor: Getting Started with Steel Bank Common Lisp</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/-4EvBXSlGAE/getting-started-with-steel-bank-common.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s1600/Lambda.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s200/Lambda.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
As some of you know, I've been a closet Lisp fan for several years. When I first joined &lt;a href=&quot;http://www.canonical.com/&quot;&gt;Canonical&lt;/a&gt; in 2008, I was hacking on Lisp in Python, so that I could do &lt;a href=&quot;http://en.wikipedia.org/wiki/Genetic_programming&quot;&gt;genetic programming&lt;/a&gt; in Python. In fact, my first and only lightening talk at a Canonical sprint was on genetic algorithms and programming :-)  (This was the same set of lightening talks that &lt;a href=&quot;https://launchpad.net/~vds&quot;&gt;Vincenzo Di Somma&lt;/a&gt; gave a wonderful presentation on his photography; completely unrelated: this is one of my favorite &lt;a href=&quot;https://twimg0-a.akamaihd.net/profile_images/431392761/IoEunSaduh.jpg&quot;&gt;pics of Vincenzo&lt;/a&gt; :-) ).&lt;br /&gt;
&lt;br /&gt;
A few years later, I talked to &lt;a href=&quot;https://twitter.com/jimbaker&quot;&gt;Jim Baker&lt;/a&gt; about Python's AST, and how one might be able to do genetic programming by manipulating it directly, instead of running a Lisp in Python.&lt;br /&gt;
&lt;br /&gt;
Throughout all this time, I've been touching in with various community projects, hacking on various Lispy Things, reading, etc., but generally doing so quite quietly. Over the past few months, however, I've really gotten into it, and Lisp has become a real force in my life, rapidly playing just as dominant a role as Python.&lt;br /&gt;
&lt;br /&gt;
Similarly, &lt;a href=&quot;http://mindpool.io/&quot;&gt;MindPool&lt;/a&gt; has become active in several Lisp projects; as such, there are a great many things to share now. However, before I begin all that, I'd like to take an opportunity to get folks up and running with an example Lisp environment.&lt;br /&gt;
&lt;br /&gt;
Future posts will explore various areas of Common Lisp, Scheme dialects, I/O loops, etc., but this one will provide a basis for all future posts that relate to Common Lisp and specifically the &lt;a href=&quot;http://www.sbcl.org/&quot;&gt;Steel Bank implementation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Installing SBCL&lt;/b&gt;&lt;br /&gt;
If you don't have SBCL (Steel Bank Common Lisp; &lt;a href=&quot;http://en.wikipedia.org/wiki/Steel_Bank_Common_Lisp&quot;&gt;a pun on it's source parent&lt;/a&gt;, CMUCL), you need to install it:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;For Ubuntu (12.04 LTS has 1.0.55): &lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;$ sudo apt-get install sbcl&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Or &lt;span style=&quot;font-size: small;&quot;&gt;you can go to &lt;/span&gt;the &lt;/span&gt;&lt;a href=&quot;http://www.sbcl.org/platform-table.html&quot;&gt;download page&lt;/a&gt; for everyone else.&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;span&gt;apt-get&lt;/span&gt; for Lisp&lt;/b&gt; &lt;br /&gt;
Next, you'll need to install &lt;a href=&quot;http://www.quicklisp.org/&quot;&gt;Quicklisp&lt;/a&gt; (as you might have surmised, it's like Debian &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;apt-get&lt;/span&gt;&lt;/span&gt; for Common Lisp). The instructions on &lt;a href=&quot;http://www.quicklisp.org/beta/&quot;&gt;this page&lt;/a&gt; will get you up and running with Quicklisp.&lt;br /&gt;
&lt;br /&gt;
I like having quicklisp available when I run SBCL, so I did the following after installing Quicklisp (and you might want to as well) from the &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;sbcl&lt;/span&gt;&lt;/span&gt; prompt:&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;* (ql:add-to-init-file)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Readline Support&lt;/b&gt; &lt;br /&gt;
The default installation of SBCL doesn't have readline support for the REPL, so using your arrow keys won't give you the expected result (your command history). To remedy that, you can use a readline wrapper. First, install &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;rlwrap&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Ubuntu: &lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;$ sudo apt-get install rlwrap&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Mac OS X: &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;$ brew install rlwrap&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
Then, create &lt;span style=&quot;font-size: small;&quot;&gt;the&lt;/span&gt; &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;chmod&lt;/span&gt;&lt;/span&gt;ed 755 script &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;~/bin&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;/start-sbcl&lt;/span&gt;&lt;/span&gt; with the following content (make sure that &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;~/bin&lt;/span&gt;&lt;/span&gt; is in your path):&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;rlwrap sbcl&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
At which point you can run the following and have access to a command history in SBCL:&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;$ start-sbcl&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;*&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why Steel Bank?&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/CMU_Common_Lisp&quot;&gt;CMUCL&lt;/a&gt; gained an excellent reputation for being a highly performant, optimized implementation of Lisp. Based on CMUCL and continuing this tradition of excellent performance, SBCL's reputation preceded it. Over a range of different types of programs, SBCL not only compares favorably to other Lisp dialects, it &lt;a href=&quot;http://shootout.alioth.debian.org/u64q/which-programs-are-fastest.php?gcc=on&amp;amp;gpp=on&amp;amp;java=on&amp;amp;sbcl=on&amp;amp;go=on&amp;amp;ghc=on&amp;amp;ocaml=on&amp;amp;clojure=on&amp;amp;hipe=on&amp;amp;erlang=on&amp;amp;python3=on&amp;amp;yarv=on&amp;amp;perl=on&amp;amp;calc=chart&quot;&gt;seriously kicks ass all over&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
SBCL comes in at 8th place in that benchmark ranking, beating out Go in 9th place. In all the languages that made it into the Top 10, I've only ever touched C, C++, Java, Scala, Lisp, and Go. In my list, SBCL made the Top 5 :-) Regardless, of all of them, Lisp has the syntax a find most pleasurable. Given my background in Python, this is not surprising ;-)&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;What's next? &lt;/b&gt;&lt;br /&gt;
Funny that you should ask... given my background with &lt;a href=&quot;http://twistedmatrix.com/&quot;&gt;Twisted&lt;/a&gt;, I'll give you one guess ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-4EvBXSlGAE:xDuboeKzL7Q:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-4EvBXSlGAE:xDuboeKzL7Q:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-4EvBXSlGAE:xDuboeKzL7Q:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-4EvBXSlGAE:xDuboeKzL7Q:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-4EvBXSlGAE:xDuboeKzL7Q:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-4EvBXSlGAE:xDuboeKzL7Q:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-4EvBXSlGAE:xDuboeKzL7Q:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-4EvBXSlGAE:xDuboeKzL7Q:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/-4EvBXSlGAE&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-14T03:43:27+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-6731652472434740839">
	<title>Duncan McGreggor: libevent for Lisp: A Signal Example</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/1dXSU5oTb3o/libevent-for-lisp-signal-example.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s1600/Lambda.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-c1OHL64rUD0/UHtJyO5kp0I/AAAAAAAAAFw/3oGNoK636e0/s200/Lambda.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
At MindPool, there are several async I/O options we've been exploring for Lisp:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;CMUCL/SBCL's &lt;a href=&quot;http://common-lisp.net/project/cmucl/doc/cmu-user/serve-event.html&quot;&gt;SERVE-EVENT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://common-lisp.net/project/iolib/&quot;&gt;IOlib&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/jadahl/cl-event&quot;&gt;cl-event&lt;/a&gt; (&lt;a href=&quot;http://libevent.org/&quot;&gt;libevent&lt;/a&gt; for Lisp, using &lt;a href=&quot;http://www.cliki.net/cffi&quot;&gt;cffi&lt;/a&gt;; three years old)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/orthecreedence/cl-async&quot;&gt;cl-async&lt;/a&gt; (also using cffi libevent wrapper, actively developed) &lt;/li&gt;
&lt;/ul&gt;
As luck would have it, I started with cl-event, and it was a fun little adventure (given the fact that it hasn't been maintained). I corresponded with the very nice original author a bit, asking if there were any updates in other locations, but sadly there weren't.&lt;br /&gt;
&lt;br /&gt;
I was ready to dive in and get things current, when one last Google search turned up &lt;a href=&quot;https://github.com/orthecreedence/cl-async&quot;&gt;cl-async&lt;/a&gt;. This little bugger was hard to find, as at that point it had not been listed on &lt;a href=&quot;http://www.cliki.net/&quot;&gt;CLiki&lt;/a&gt;. (But it is now :-)). &lt;a href=&quot;http://www.linkedin.com/in/andrewmlyon&quot;&gt;Andrew Lyon&lt;/a&gt; has done a tremendous amount of work on cl-async, with a very complete set of bindings for libevent. This is just what I had been looking for, so I jumped in immediately.&lt;br /&gt;
&lt;br /&gt;
As one might imagine from the topic of this post, there's a lot to be explored, uncovered, and developed further around async programming in Lisp. I'll start off slowly with a small example, and add more over the course of time.&lt;br /&gt;
&lt;br /&gt;
I also hope to cover IOlib and SBCL's SERVE-EVENT in some future posts. Time will tell... For now, let's get started with cl-async in SBCL :-)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dependencies&lt;/b&gt;&lt;br /&gt;
In a &lt;a href=&quot;http://blog.mindpool.io/2012/10/getting-started-with-steel-bank-common.html&quot;&gt;previous post&lt;/a&gt;, I discussed getting an environment set up with SBCL, I the rest of this post assumes that has been read and done :-) &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting cl-async and Setting Up an SBCL Environment for Hacking&lt;/b&gt;&lt;br /&gt;
Now let's download cl-async and install the Libevent bindings :-)&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
With the Lisp Libevent bindings installed, we're now ready to create a Lisp image to assist us when exploring cl-async. A Lisp image saves the current state of the REPL, with all the loaded libaries, etc., allowing for rapid start-ups and script executions. Just the thing, when you're iterating on something :-)
&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
&lt;b&gt;Example: Adding a Signal Handler&lt;/b&gt;&lt;br /&gt;
Let's dive into some signal handling now! Here is some code I put together as part of an effort to beef up the examples in cl-async:
&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Note that the &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;as:&lt;/span&gt;&lt;/span&gt; is a nickname for the package namespace &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;cl-async:&lt;/span&gt;&lt;/span&gt;. 
&lt;br /&gt;
&lt;br /&gt;
As one might expect, there is a function to start the event loop. However, what is a little different is that one doesn't initialize the event loop directly, but with a callback. As such, one cannot set up handlers, etc., except within the scope of this callback.&lt;br /&gt;
&lt;br /&gt;
We've got the &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;setup-handler&lt;/span&gt;&lt;/span&gt; function for that, which adds a callback for a &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;SIGINT&lt;/span&gt;&lt;/span&gt; event. Let's try it out :-) &lt;br /&gt;
&lt;br /&gt;


Once your script has finished loading the core, you should see output like the above, with no return to the shell prompt.
&lt;br /&gt;
&lt;br /&gt;
When we send a &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;SIGINT&lt;/span&gt;&lt;/span&gt; with &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;^C&lt;/span&gt;&lt;/span&gt;, we can watch our callback get fired:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Next up, we'll take a look at other types of handlers in cl-async.&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=1dXSU5oTb3o:_BPt37EQLB0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=1dXSU5oTb3o:_BPt37EQLB0:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=1dXSU5oTb3o:_BPt37EQLB0:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=1dXSU5oTb3o:_BPt37EQLB0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=1dXSU5oTb3o:_BPt37EQLB0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=1dXSU5oTb3o:_BPt37EQLB0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=1dXSU5oTb3o:_BPt37EQLB0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=1dXSU5oTb3o:_BPt37EQLB0:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/1dXSU5oTb3o&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-14T03:42:51+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8825992.post-8627823263389307658">
	<title>Duncan McGreggor: Async in Clojure: Playing with Agents, Part II</title>
	<link>http://feedproxy.google.com/~r/ElectricDuncan/~3/-rOfcnLV7Gw/async-in-clojure-playing-with-agents_30.html</link>
	<content:encoded>&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&lt;a style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-wGUH0hB0Yls/UI62EO3wsBI/AAAAAAAAALw/HiyFdql7fIY/s1600/clojure-logo-large.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-wGUH0hB0Yls/UI62EO3wsBI/AAAAAAAAALw/HiyFdql7fIY/s200/clojure-logo-large.png&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In &lt;a href=&quot;http://blog.mindpool.io/2012/10/async-in-clojure-playing-with-agents.html&quot;&gt;the last post&lt;/a&gt;, we took a look at basic usage of &lt;a href=&quot;http://clojure.org/&quot;&gt;Clojure&lt;/a&gt;'s &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;agent&lt;/span&gt;&lt;/span&gt; function. In this post, we'll dive a little bit deeper&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Validation&lt;/b&gt;
&lt;br /&gt;
We glossed over the options that you can define when creating an agent; one of them is the &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;validator&lt;/span&gt;&lt;/span&gt; which one can use to check before the agent is updated with the passed value.&lt;br /&gt;
&lt;br /&gt;
If we want to make sure that our &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;read-agent&lt;/span&gt;&lt;/span&gt; always gets a string value, this is all we have to do:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Similarly, any function that takes a single value as a parameter can be used here. As you can see, we had to change our default value for the agent from &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;nil&lt;/span&gt;&lt;/span&gt; to &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt; since there is now a string validator. If we hadn't, any time we tried to use that agent, we'd get &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;java.lang.IllegalStateException&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;When Things Go Wrong&lt;/b&gt;&lt;br /&gt;
Another option you can set when defining an agent is the error handler. This will be used in the event of an error, including if a value fails to be validated by your validator function. Here's an example:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
With both of these options, you don't have to set them when the agent is defined; you can do it later with a function call, if you so desire (or if needs demand it):&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
&lt;b&gt;Watch This!&lt;/b&gt;&lt;br /&gt;
So, we've got an error handler but no event handler? Yup. However, you &lt;i&gt;can&lt;/i&gt; actually get callback-like behavior using &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;watch&lt;/span&gt;&lt;/span&gt;es. Check this out:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Now, any time our agent's state changes, the function passed to the watch will fire. As described in &lt;a href=&quot;http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/add-watch&quot;&gt;the docs&lt;/a&gt;, the parameters are: the agent, a key of your devising (must be unique per agent), and the handler that you want to have fired upon state change. The handler takes as parameters: the key you defined, the agent, the agent's old value, and the agent's new value.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;All Together Now&lt;/b&gt;&lt;br /&gt;
With all our example code in place, we can now exercise the whole thing at once. Here's the whole thing:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
To simply demonstrate the async nature and the callbacks in action, let's run the following:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Eventually, our callback will render output very much like the following:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Do note, however, that if we called a series of &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;send-off&lt;/span&gt;&lt;/span&gt;s with different times (using the same agent and watch), we wouldn't see the ones with shorter times come back first. We'd see the callback output in the same order we called &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;send-off&lt;/span&gt;&lt;/span&gt;. This is because the &lt;span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;watch&lt;/span&gt;&lt;/span&gt; function is called synchronously on the agent's thread before any pending &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;send-off&lt;/span&gt;&lt;/span&gt;s (or &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span&gt;send&lt;/span&gt;&lt;/span&gt;s) are called. In future posts, I'll cover ways around this (constructing agents on the fly as well as exploring alternative solutions with external libraries).&lt;br /&gt;
&lt;br /&gt;
Regardless, with these primitives, there are all sorts of things one can do. For instance...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dessert&lt;/b&gt;&lt;br /&gt;
To close, check out this neat little bit of code that sends 1,000,000 messages in a ring. This code creates a chain of agents, and then actions are relayed through it (taken from the &lt;a href=&quot;http://clojure.org/agents&quot;&gt;agents doc page&lt;/a&gt;): &lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
Kicking this puppy off, our million messages finish in about 1 second :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;


&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-rOfcnLV7Gw:9NSCnqvzGZ0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-rOfcnLV7Gw:9NSCnqvzGZ0:4cEx4HpKnUU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-rOfcnLV7Gw:9NSCnqvzGZ0:4cEx4HpKnUU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-rOfcnLV7Gw:9NSCnqvzGZ0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-rOfcnLV7Gw:9NSCnqvzGZ0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-rOfcnLV7Gw:9NSCnqvzGZ0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?i=-rOfcnLV7Gw:9NSCnqvzGZ0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?a=-rOfcnLV7Gw:9NSCnqvzGZ0:qj6IDK7rITs&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ElectricDuncan?d=qj6IDK7rITs&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ElectricDuncan/~4/-rOfcnLV7Gw&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-03-14T03:40:32+00:00</dc:date>
	<dc:creator>Duncan McGreggor (noreply@blogger.com)</dc:creator>
</item>

</rdf:RDF>
