<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rlazo&#039;s blog</title>
	<atom:link href="http://www.rlazo.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rlazo.org</link>
	<description></description>
	<lastBuildDate>Sun, 14 Mar 2010 18:34:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a tarball from a specific git commit</title>
		<link>http://www.rlazo.org/2010/03/13/create-a-tarball-from-a-specific-git-commit/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2010/03/13/create-a-tarball-from-a-specific-git-commit/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 03:10:28 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=180</guid>
		<description><![CDATA[I have this code I&#8217;m working on that is needs to be deployed remotely (Fabric makes this SO easy) and I&#8217;m using git as my version control system. Well, I was creating tarballs for this, but I was basically doing them as similar as I could to what git had in the tree (ignoring the [...]]]></description>
			<content:encoded><![CDATA[<p>I have this code I&#8217;m working on that is needs to be deployed remotely (<a href="http://docs.fabfile.org/0.9.0/index.html">Fabric makes this SO easy</a>) and I&#8217;m using git as my version control system. Well, I was creating tarballs for this, but I was basically doing them as similar as I could to what git had in the tree (ignoring the same files, etc.), so it was kind of repetitive and, boring. Well, git to the rescue!!!</p>
<p><code><br />
git archive --format=tar HEAD | gzip > myproject.tar.gz<br />
</code></p>
<p>And you have a nice clean zipped tarball of your code as is on HEAD, without tears <img src='http://www.rlazo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Git is awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2010/03/13/create-a-tarball-from-a-specific-git-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome type ahead</title>
		<link>http://www.rlazo.org/2010/03/09/chrome-type-ahead/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2010/03/09/chrome-type-ahead/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 03:30:08 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Chrome]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=175</guid>
		<description><![CDATA[Don&#8217;t you wish you just could type the text of a link and then press enter to follow it on a web page? It would save tons of time! Well, there is a chrome extension that allows you to do that. My favorite extension to date by far.
Chrome type ahead
Enjoy
]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t you wish you just could type the text of a link and then press enter to follow it on a web page? It would save tons of time! Well, there is a chrome extension that allows you to do that. My favorite extension to date <strong>by far</strong>.</p>
<p><a href="https://chrome.google.com/extensions/detail/cpecbmjeidppdiampimghndkikcmoadk/">Chrome type ahead</a></p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2010/03/09/chrome-type-ahead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance of in operator using list and set</title>
		<link>http://www.rlazo.org/2010/02/25/performance-of-in-operator-using-list-and-set/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2010/02/25/performance-of-in-operator-using-list-and-set/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 04:16:49 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=163</guid>
		<description><![CDATA[I had this use case where I have to check which elements of a list of words where available in another list of words. So I decided to use the operator in﻿. Just for further reference a tried the following:

# common code for all test
base_list = [...]
query_list = [...]


Pretty simple method:

for word in query_list:
  [...]]]></description>
			<content:encoded><![CDATA[<p>I had this use case where I have to check which elements of a list of words where available in another list of words. So I decided to use the operator <strong>in﻿.</strong> Just for further reference a tried the following:</p>
<div>
<pre name="code" class="python"># common code for all test
base_list = [...]
query_list = [...]</pre>
</div>
<ol>
<li><strong>Pretty simple method:</strong>
<div>
<pre name="code" class="python">for word in query_list:
  if word in base_list:
    # do something</pre>
</div>
<p>For a list of 4284 elements against a list of 107 it took 9 seconds. Using simple lists, this method is the most straight forward of all, and also the slowest one.</li>
<li><strong>Sorting things:</strong>
<div>
<pre name="code" class="python">base_list.sort()
for word in query_list:
  if word in base_list:
    # do something</pre>
</div>
<p>After sorting the list, guess what? Yeap, nothing changed, same 9 seconds</li>
<li><strong>What about sets?</strong>
<div>
<pre name="code" class="python">bs = set(base_list)
for word in query_list:
  if word in bs:
    # do something</pre>
</div>
<p>Using sets this is <strong>another history</strong>, 0.6 seconds for the same amount of data; but&#8230; if this could be achived turning one of lists into a set, what if&#8230;</li>
<li><strong>Using more sets</strong>
<div>
<pre name="code" class="python">bs = set(base_list)
qs = set(query_list)
solution = bs.intersection(qs)</pre>
</div>
<p>0.02 seconds.</li>
</ol>
<p>Well, as you can see, sets are great.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2010/02/25/performance-of-in-operator-using-list-and-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changes in the website</title>
		<link>http://www.rlazo.org/2010/01/23/changes-in-the-website/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2010/01/23/changes-in-the-website/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 18:07:41 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=160</guid>
		<description><![CDATA[I&#8217;m sure you have noticed the fact that this website has changed (if not, welcome!). Well, there was some issues with the previous one and after fixing the code I was completely unable to make it work again, there was some problems with python + django + mysql, very very weird (process forking, memory issues [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you have noticed the fact that this website has changed (if not, welcome!). Well, there was some issues with the previous one and after fixing the code I was completely unable to make it work again, there was some problems with python + django + mysql, very very weird (process forking, memory issues and alike), so I sadly ended giving up and installing the only blogging system made in php (or in some other language) that I would change for the one made by myself: wordpress. I have to say that it&#8217;s really nice in it&#8217;s latest incarnation <img src='http://www.rlazo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>I&#8217;ll try to update my blog a little bit more often, so stay tunned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2010/01/23/changes-in-the-website/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Awesome 3.4-rc* and default floating layout</title>
		<link>http://www.rlazo.org/2009/10/02/awesome-3-4-rc-and-default-floating-layout/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/10/02/awesome-3-4-rc-and-default-floating-layout/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 03:45:56 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Awesome]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=80</guid>
		<description><![CDATA[I think awesome wm is, well awesome. I tried the last rc but I found that all the tags were set to the floating layout by default, so digging through the internet I found these bug that is exactly what was happening to me:

For the lazy ones, here is the solution:

Change:
   tags[s] = [...]]]></description>
			<content:encoded><![CDATA[<p>I think awesome wm is, well awesome. I tried the last rc but I found that all the tags were set to the floating layout by default, so digging through the internet I found <a href="http://awesome.naquadah.org/bugs/index.php?do=details&amp;task_id=646">these bug</a> that is exactly what was happening to me:
</p>
<p>For the lazy ones, here is the solution:
</p>
<p>Change:<br />
   tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s)
</p>
<p>to:<br />
   tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
</p>
<p>taken shamelessly from the ticket.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/10/02/awesome-3-4-rc-and-default-floating-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs 23 released!</title>
		<link>http://www.rlazo.org/2009/07/30/emacs-23-released/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/07/30/emacs-23-released/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 21:57:29 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=78</guid>
		<description><![CDATA[Read the announce and new features here
]]></description>
			<content:encoded><![CDATA[<p><a href="http://lists.gnu.org/archive/html/info-gnu-emacs/2009-07/msg00000.html">Read the announce and new features here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/07/30/emacs-23-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems shuting down Gentoo with kernel 2.6.29</title>
		<link>http://www.rlazo.org/2009/07/02/problems-shuting-down-gentoo-with-kernel-2-6-29/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/07/02/problems-shuting-down-gentoo-with-kernel-2-6-29/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 21:55:40 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=76</guid>
		<description><![CDATA[I updated my laptop a few days ago and suddenly it failed to shutdown correctly, it powered down but without finishing the shutdown process. Today, while reading the spanish users mailing list I found the solution.

In /etc/conf.d/alsasound, set:

UNLOAD_ON_STOP=&#8221;no&#8221;

KILLPROC_ON_STOP=&#8221;no&#8221;

This fixed the problem. Here is the original thread
]]></description>
			<content:encoded><![CDATA[<p>I updated my laptop a few days ago and suddenly it failed to shutdown correctly, it powered down but without finishing the shutdown process. Today, while reading the spanish users mailing list I found the solution.
</p>
<p>In /etc/conf.d/alsasound, set:
</p>
<p>UNLOAD_ON_STOP=&#8221;no&#8221;
</p>
<p>KILLPROC_ON_STOP=&#8221;no&#8221;
</p>
<p>This fixed the problem. <a href="http://archives.gentoo.org/gentoo-user-es/msg_de8a93ed8d83e645099a8bb5aca45771.xml">Here is the original thread</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/07/02/problems-shuting-down-gentoo-with-kernel-2-6-29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What did I do the past 3 months?</title>
		<link>http://www.rlazo.org/2009/06/23/what-did-i-do-the-past-3-months/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/06/23/what-did-i-do-the-past-3-months/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 11:57:27 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=74</guid>
		<description><![CDATA[Well, I&#8217;ve been doing an internship at a known internet company and it has been an awesome experience. I&#8217;ve learned quite a lot, I had an amazing host and a very supportive team. Now I&#8217;m on my way back home, and there&#8217;s nothing like a couple of hours in an airport to raise the blogging [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;ve been doing an internship at a <a href="http://www.google.com">known internet company</a> and it has been an awesome experience. I&#8217;ve learned quite a lot, I had an amazing host and a very supportive team. Now I&#8217;m on my way back home, and there&#8217;s nothing like a couple of hours in an airport to raise the blogging enthusiasm.
</p>
<p>I worked with java, that language that I didn&#8217;t like too much because, as on of my friends at work said, there is too much plumbing needed to do anything. But, now I feel more respectful to the java camp, and definitely I&#8217;m going to keep writing some code in java, after all, if you consider that skills are based on real production code written, java would be my &#8220;main&#8221; language. (Although is hard to admit)
</p>
<p>I did practice some elisp, and I realized tahat even with <a href="http://www.jetbrains.com/idea/">cool IDE&#8217;s</a> with pretty nice features, nothing beats emacs at manipulating text files.  Changing editors is a very hard topic, you have to deal with muscle memory and such, and then you found thos little things you take for granted as&#8230; <a href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Moving-Point">how to move</a>.
</p>
<p>Well now is time to go back, to my girlfriend and my family!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/06/23/what-did-i-do-the-past-3-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you want to show off emacs?</title>
		<link>http://www.rlazo.org/2009/05/17/do-you-want-to-show-off-emacs/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/05/17/do-you-want-to-show-off-emacs/#comments</comments>
		<pubDate>Sun, 17 May 2009 09:15:12 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=71</guid>
		<description><![CDATA[Take a look at this screencast. Just amazing, I found it while reading the emacs wiki page of cedet.
]]></description>
			<content:encoded><![CDATA[<p>Take a look at <a href="http://platypope.org/yada/emacs-demo/">this screencast</a>. Just amazing, I found it while reading the <a href="http://emacswiki.org/">emacs wiki</a> page of <a href="http://cedet.sourceforge.net/">cedet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/05/17/do-you-want-to-show-off-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elisp func to create a dummy admin.py</title>
		<link>http://www.rlazo.org/2009/03/10/elisp-func-to-create-a-dummy-admin-py/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rlazo.org/2009/03/10/elisp-func-to-create-a-dummy-admin-py/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 15:57:30 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.rlazo.org/?p=68</guid>
		<description><![CDATA[While writing a django app, I faced the tedious task of updating the corresponding admin.py file for the models I was writing. Because I didn&#8217;t want to customize any of the admin options just yet all I had to do is insert new register entries on the file (one for model). I grew tired of [...]]]></description>
			<content:encoded><![CDATA[<p>While writing a django app, I faced the tedious task of updating the corresponding admin.py file for the models I was writing. Because I didn&#8217;t want to customize any of the admin options just yet all I had to do is insert new register entries on the file (one for model). I grew tired of this pretty soon so I wrote this elisp function to update an admin.py file easily. Hope this helps somebody
</p>
<div class="codehilite">
<pre><span class="p">(</span><span class="nb">defun</span> <span class="nv">rl/django-admin-all-models</span><span class="p">()</span>
<span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
<span class="p">(</span><span class="k">let</span> <span class="p">((</span><span class="nv">content</span> <span class="s">&quot; &quot;</span><span class="p">))</span>
  <span class="p">(</span><span class="nv">with-temp-buffer</span>
    <span class="p">(</span><span class="nv">insert</span> <span class="s">&quot;from models import *\n&quot;</span><span class="p">)</span>
    <span class="p">(</span><span class="nv">insert</span> <span class="s">&quot;from django.contrib import admin\n\n&quot;</span><span class="p">)</span>
    <span class="p">(</span><span class="k">let</span> <span class="p">((</span><span class="nv">text-start</span> <span class="p">(</span><span class="nv">point</span><span class="p">)))</span>
  <span class="p">(</span><span class="nv">insert-file-contents</span> <span class="s">&quot;models.py&quot;</span><span class="p">)</span>
  <span class="p">(</span><span class="nv">keep-lines</span> <span class="s">&quot;^class.*$&quot;</span> <span class="nv">text-start</span> <span class="p">(</span><span class="nv">point-max</span><span class="p">))</span>
  <span class="p">(</span><span class="nv">while</span> <span class="p">(</span><span class="nv">re-search-forward</span> <span class="s">&quot;^class \\(\\w+\\).*&quot;</span> <span class="no">nil</span> <span class="no">t</span><span class="p">)</span>
    <span class="p">(</span><span class="nv">replace-match</span> <span class="s">&quot;admin.site.register(\\1)&quot;</span><span class="p">))</span>
  <span class="p">(</span><span class="nv">write-file</span> <span class="s">&quot;admin.py&quot;</span> <span class="no">nil</span><span class="p">)))))</span>
</pre>
</div>
<p>A word of warning: this <strong>will</strong> override your current admin.py</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlazo.org/2009/03/10/elisp-func-to-create-a-dummy-admin-py/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
