<?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>lorenzo bolla&#039;s blog</title>
	<atom:link href="http://lbolla.info/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://lbolla.info/blog</link>
	<description></description>
	<lastBuildDate>Thu, 05 Jan 2012 14:09:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>ulint, Universal Lint</title>
		<link>http://lbolla.info/blog/2012/01/05/ulint-universal-lint/</link>
		<comments>http://lbolla.info/blog/2012/01/05/ulint-universal-lint/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 14:09:53 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=384</guid>
		<description><![CDATA[I&#8217;ve been using so many code static checkers lately, that I decided to write a wrapper around the ones I use the most. I called it: Universal Lint, ulint for short. At the moment, Python, Javascript and Haskell files are supported, but adding new linters/extension is trivial. Download it and use it!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using so many code static checkers lately, that I decided to write a wrapper around the ones I use the most.</p>
<p>I called it: <a href="https://github.com/lbolla/ulint">Universal Lint</a>, <a href="https://github.com/lbolla/ulint">ulint</a> for short.</p>
<p>At the moment, Python, Javascript and Haskell files are supported, but adding new linters/extension is trivial.</p>
<p>Download it and use it!</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2012/01/05/ulint-universal-lint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>500 on Youtube on non-existing videos</title>
		<link>http://lbolla.info/blog/2011/12/17/500-on-youtube-on-non-existing-videos/</link>
		<comments>http://lbolla.info/blog/2011/12/17/500-on-youtube-on-non-existing-videos/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:27:01 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=377</guid>
		<description><![CDATA[Now, this is embarassing&#8230; It looks like requesting a non-existent video on Youtube causes a &#8220;500 Internal Server Error&#8221;! For example: Valid url: http://www.youtube.com/watch?v=b5CeNunbHto Invalid url: http://www.youtube.com/watch?v=wtf Surely, a better response would be something like the one returned when  the videoId is misisng: http://www.youtube.com/watch?v= Seems like predictions became true.]]></description>
			<content:encoded><![CDATA[<p>Now, <a href="http://www.youtube.com/watch?v=wtf">this is embarassing&#8230;</a></p>
<p>It looks like requesting a non-existent video on Youtube causes a &#8220;500 Internal Server Error&#8221;!</p>
<p style="text-align: center;">
<div id="attachment_381" class="wp-caption aligncenter" style="width: 623px"><a href="http://lbolla.info/blog/wp-content/uploads/2011/12/capture.jpg"><img class="size-full wp-image-381 " title="500 on Youtube" src="http://lbolla.info/blog/wp-content/uploads/2011/12/capture.jpg" alt="500" width="613" height="359" /></a><p class="wp-caption-text">Requesting a non-existing video on Youtube returns 500!</p></div>
<p>For example:</p>
<ul>
<li>Valid url: <a href="http://www.youtube.com/watch?v=b5CeNunbHto">http://www.youtube.com/watch?v=b5CeNunbHto</a></li>
<li>Invalid url: <a href="http://www.youtube.com/watch?v=wtf">http://www.youtube.com/watch?v=wtf</a></li>
</ul>
<p>Surely, a better response would be something like the one returned when  the videoId is misisng: <a href="http://www.youtube.com/watch?v=">http://www.youtube.com/watch?v=</a></p>
<p>Seems like <a href="http://www.youtube.com/watch?v=OxXc_fXxMoE">predictions became true</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/12/17/500-on-youtube-on-non-existing-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSGrep benchmarking</title>
		<link>http://lbolla.info/blog/2011/11/30/hsgrep-benchmarking/</link>
		<comments>http://lbolla.info/blog/2011/11/30/hsgrep-benchmarking/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 23:38:02 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=369</guid>
		<description><![CDATA[Few days ago, I rewrote sgrep in Haskell. I was curious to know how it compares to grep in term of execution speed. In particular, I was interested to verify that hsgrep scales as O(log n), instead of O(n), with n being the size of the file analyzed. First of all, in order to have [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago, <a href="http://lbolla.info/blog/2011/11/27/hsgrep-sorted-grep-in-haskell/">I rewrote sgrep in Haskell</a>. I was curious to know how it compares to <a href="http://en.wikipedia.org/wiki/Grep">grep</a> in term of execution speed. In particular, I was interested to verify that hsgrep scales as O(log n), instead of O(n), with n being the size of the file analyzed.</p>
<p>First of all, in order to have similar performance to grep, I had to convert my original program to use <a href="http://hackage.haskell.org/packages/archive/bytestring/latest/doc/html/Data-ByteString.html">Haskell&#8217;s bytestrings</a>. <a href="https://github.com/lbolla/HSGrep/tree/bytestring">You can find the code here</a>.</p>
<p>Testing files are generated with <a href="https://github.com/lbolla/HSGrep/blob/bytestring/data/gendata.hs">this script</a>.</p>
<p>Here are the results obtained. grep is still faster for smallish files (I haven&#8217;t spent too much time tweaking hsgrep), but hsgrep scales much better and it wins for files larger than few megabytes!</p>
<p><a href="http://lbolla.info/blog/wp-content/uploads/2011/11/bench1.png"><img class="alignnone size-full wp-image-372" title="HSGrep benchmark" src="http://lbolla.info/blog/wp-content/uploads/2011/11/bench1.png" alt="" width="640" height="480" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/11/30/hsgrep-benchmarking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HSGrep: Sorted Grep in Haskell</title>
		<link>http://lbolla.info/blog/2011/11/27/hsgrep-sorted-grep-in-haskell/</link>
		<comments>http://lbolla.info/blog/2011/11/27/hsgrep-sorted-grep-in-haskell/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 16:30:40 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[sorted]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=363</guid>
		<description><![CDATA[As an exercise to learn Haskell, I wrote a specialized grep to work on sorted files. It uses binary search to scan a text file and print all the (consecutive) lines that start with a user defined string. My program is a rewrite of sgrep in Haskell: I called it HSGrep. Code is available on [...]]]></description>
			<content:encoded><![CDATA[<p>As an exercise to learn <a title="Haskell" href="http://haskell.org/haskellwiki/Haskell">Haskell</a>, I wrote a specialized grep to work on sorted files. It uses <a href="http://en.wikipedia.org/wiki/Binary_search_algorithm">binary search</a> to scan a text file and print all the (consecutive) lines that start with a user defined string.</p>
<p>My program is a rewrite of <a title="sgrep" href="http://sourceforge.net/projects/sgrep/">sgrep</a> in <a title="Haskell" href="http://haskell.org/haskellwiki/Haskell">Haskell</a>: I called it <a href="https://github.com/lbolla/HSGrep">HSGrep</a>.</p>
<p>Code is available on <a title="HSGrep" href="https://github.com/lbolla/HSGrep">github</a>.</p>
<p>Thanks a lot for <a href="http://codereview.stackexchange.com/q/6318/8638">all your useful suggestions</a>! As soon as possible, I&#8217;ll post some benchmarking <a href="http://lbolla.info/blog/2011/11/30/hsgrep-benchmarking/">here</a>. (EDIT: <a href="http://lbolla.info/blog/2011/11/30/hsgrep-benchmarking/">benchmarks now available!</a>)</p>
<p>After downloading the <a href="https://github.com/lbolla/HSGrep">source code</a>, build install and run it with:</p>
<pre class="brush: bash; title: ; notranslate">
$&gt; cabal build
$&gt; cabal install
$&gt; hslint &lt;string&gt; &lt;filename&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/11/27/hsgrep-sorted-grep-in-haskell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>git pre-commit hook for python and javascript</title>
		<link>http://lbolla.info/blog/2011/11/17/git-pre-commit-hook-for-python-and-javascript/</link>
		<comments>http://lbolla.info/blog/2011/11/17/git-pre-commit-hook-for-python-and-javascript/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 22:50:21 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gjslint]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pep8]]></category>
		<category><![CDATA[pyflakes]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=331</guid>
		<description><![CDATA[Following a recent discussion on HN, I decided to share my own git pre-commit hook. It&#8217;s a work-in-progress, so you can find the most updated version here. To use it, just drop it in your .git/hooks directory. At every git commit, it will run pep8 and pyflakes on .py files, and gjslint on .js files.]]></description>
			<content:encoded><![CDATA[<p>Following a <a href="http://news.ycombinator.com/item?id=3244475">recent discussion on HN</a>, I decided to share my own <a href="http://book.git-scm.com/5_git_hooks.html">git pre-commit hook</a>.</p>
<pre class="brush: python; title: ; notranslate">
#!/usr/bin/python

import os
import sys
import re
import subprocess

devnull = open(os.devnull, 'w')

def call(cmd):
    p = subprocess.Popen(cmd.split(),
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)
    out, err = p.communicate()
    return out.decode('utf-8'), err.decode('utf-8')

def execute(cmd, silent=False):
    if silent:
        params = {
                'stdout': devnull,
                'stderr': devnull,
                }
    else:
        params = {}

    retcode = subprocess.call(cmd.split(), **params)
    return retcode

def exists(cmd):
    return execute('which %s' % cmd, silent=True) == 0

def get_modified(ext):
    modified = re.compile('^(?:M|A).(?P&lt;name&gt;.*\.%s)' % ext)
    out, _ = call('git status --porcelain')
    modifieds = []
    for line in out.splitlines():
        match = modified.match(line.strip())
        if (match):
            modifieds.append(match.group('name'))
    return modifieds

def output(prg, out, err):
    print(' * %s:\n%s\n%s' % (prg, out, err))

def die(msg):
    print(msg)
    sys.exit(1)

def check_python():

    has_pep8 = exists('pep8')
    has_pyflakes = exists('pyflakes')
    if not (has_pep8 or has_pyflakes):
        die('Install PEP8 and PyFlakes!')

    modifieds = get_modified('py')
    rrcode = 0
    for file in modifieds:
        if has_pep8:
            out, err = call('pep8 %s' % file)
            if out or err:
                output('pep8', out, err)
                rrcode = rrcode | 1
        if has_pyflakes:
            retcode = execute('pyflakes %s' % file)
            rrcode = retcode | rrcode

    if rrcode != 0:
        sys.exit(rrcode)

def check_javascript():

    has_jsl = exists('gjslint')
    if not has_jsl:
        die('Install Closure-Lint!')

    modifieds = get_modified('js')
    rrcode = 0
    for file in modifieds:
        out, err = call('gjslint %s' % file)
        if out or err:
            output('gjslint', out, err)
            rrcode = rrcode | 1

    if rrcode != 0:
        sys.exit(rrcode)

def main():
    check_python()
    check_javascript()

if __name__ == '__main__':
    main()
</pre>
<p>It&#8217;s a work-in-progress, so you can find the <a href="https://github.com/lbolla/dotfiles/blob/master/githooks/pre-commit">most updated version here</a>.</p>
<p>To use it, just drop it in your <code>.git/hooks</code> directory. At every <code>git commit</code>, it will run <code><a href="http://pypi.python.org/pypi/pep8">pep8</a></code> and <code><a href="http://pypi.python.org/pypi/pyflakes/0.5.0">pyflakes</a></code> on <code>.py</code> files, and <code><a href="http://code.google.com/closure/utilities/docs/linter_howto.html">gjslint</a></code> on <code>.js</code> files.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/11/17/git-pre-commit-hook-for-python-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haskell and VIM</title>
		<link>http://lbolla.info/blog/2011/10/15/haskell-and-vim/</link>
		<comments>http://lbolla.info/blog/2011/10/15/haskell-and-vim/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 10:13:15 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[gist]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=319</guid>
		<description><![CDATA[I had to tinker quite a bit before finding a decent configuration for vim to edit Haskell files. Here are the packages and config files I use: Haskell mode: interaction with Haddock, compiler integration, and other general settings. Indentation: proper source code indentation. More configs to enforce good style (no tabs, tabstops, etc.):  You can [...]]]></description>
			<content:encoded><![CDATA[<p>I had to tinker quite a bit before finding a decent configuration for vim to edit Haskell files.</p>
<p>Here are the packages and config files I use:</p>
<ul>
<li><a href="http://projects.haskell.org/haskellmode-vim/">Haskell mode</a>: interaction with <a href="http://www.haskell.org/haddock/">Haddock</a>, compiler integration, and other general settings.</li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=1968">Indentation</a>: proper source code indentation.</li>
<li>More configs to enforce <a href="http://urchin.earth.li/~ian/style/haskell.html">good style</a> (no tabs, tabstops, etc.): <div id="gist-1289349" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">&quot; Add to .vimrc</span></div><div class='line' id='LC2'><span class="c">&quot; Need to have .vim/compiler/ghc.vim</span></div><div class='line' id='LC3'><br/></div><div class='line' id='LC4'>augroup HSK</div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;au Bufenter *.hs <span class="k">compiler</span> ghc</div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;autocmd <span class="nb">FileType</span> haskell <span class="k">setlocal</span> <span class="nb">formatoptions</span><span class="p">+=</span><span class="k">t</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;autocmd <span class="nb">FileType</span> haskell <span class="k">let</span> <span class="k">b</span>:ghc_staticoptions <span class="p">=</span> <span class="s1">&#39;-Wall -Werror&#39;</span></div><div class='line' id='LC8'>augroup END</div><div class='line' id='LC9'><br/></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1289349/facc0bdf500223ce6e34a802f5ce5123a28570f3/haskell-.vimrc.vim" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1289349#file_haskell_.vimrc.vim" style="float:right;margin-right:10px;color:#666">haskell-.vimrc.vim</a>
            <a href="https://gist.github.com/1289349">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">&quot; Add to .vim/ftplugin/haskell.vim</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="c">&quot; From Good Haskell Style http://urchin.earth.li/~ian/style/haskell.html</span></div><div class='line' id='LC4'><span class="k">setlocal</span> <span class="nb">expandtab</span></div><div class='line' id='LC5'><span class="k">setlocal</span> <span class="nb">tabstop</span><span class="p">=</span><span class="m">8</span></div><div class='line' id='LC6'><span class="k">setlocal</span> <span class="nb">shiftwidth</span><span class="p">=</span><span class="m">8</span></div><div class='line' id='LC7'><span class="k">setlocal</span> <span class="nb">textwidth</span><span class="p">=</span><span class="m">79</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1289349/9929a4ba18d76ada630aaaab8b534e53090b5155/haskell-ftplugin.vim" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1289349#file_haskell_ftplugin.vim" style="float:right;margin-right:10px;color:#666">haskell-ftplugin.vim</a>
            <a href="https://gist.github.com/1289349">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">&quot; Add to .vim/syntax/haskell.vim</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="c">&quot; From Good Haskell Style http://urchin.earth.li/~ian/style/haskell.html</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'><span class="nb">syn</span> cluster hsRegions add<span class="p">=</span>hsImport<span class="p">,</span>hsLineComment<span class="p">,</span>hsBlockComment<span class="p">,</span>hsPragma</div><div class='line' id='LC6'><span class="nb">syn</span> cluster hsRegions add<span class="p">=</span>cPreCondit<span class="p">,</span>cCppOut<span class="p">,</span>cCppOut2<span class="p">,</span>cCppSkip</div><div class='line' id='LC7'><span class="nb">syn</span> cluster hsRegions add<span class="p">=</span>cIncluded<span class="p">,</span>cDefine<span class="p">,</span>cPreProc<span class="p">,</span>cComment<span class="p">,</span>cCppString</div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'><span class="nb">syn</span> <span class="k">match</span> <span class="k">tab</span> <span class="nb">display</span> <span class="c">&quot;\t&quot; containedin=@hsRegions</span></div><div class='line' id='LC10'><span class="nb">hi</span> link <span class="k">tab</span> Error</div><div class='line' id='LC11'><span class="nb">syn</span> <span class="k">match</span> trailingWhite <span class="nb">display</span> <span class="c">&quot;[[:space:]]\+$&quot; containedin=@hsRegions</span></div><div class='line' id='LC12'><span class="nb">hi</span> link trailingWhite Error</div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1289349/9efa8b994364f76783c2dbce87ca5f64504d65e9/haskell-syntax.vim" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1289349#file_haskell_syntax.vim" style="float:right;margin-right:10px;color:#666">haskell-syntax.vim</a>
            <a href="https://gist.github.com/1289349">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</li>
</ul>
<p>You can also have them <a href="http://lbolla.info/blog/wp-content/uploads/2011/10/haskell-vim-config.tar.gz">bundled all together</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/10/15/haskell-and-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>they broke delicious</title>
		<link>http://lbolla.info/blog/2011/09/30/they-broke-delicious/</link>
		<comments>http://lbolla.info/blog/2011/09/30/they-broke-delicious/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 09:23:39 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[links]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/?p=316</guid>
		<description><![CDATA[the new redesign of delicious.com broke so many things, that I thought I had to take notes: bookmarklet in Chrome can&#8217;t be drag-n-dropped to the toolbar. its javascript code is also hard to copy and paste to create the bookmarklet &#8220;manually&#8221;. install links for the chrome and firefox extensions redirect to empty pages. documentation for developer [...]]]></description>
			<content:encoded><![CDATA[<p>the new redesign of <a href="http://www.delicious.com">delicious.com</a> broke so many things, that I thought I had to take notes:</p>
<ul>
<li><a title="bookmarklets" href="http://www.delicious.com/help/bookmarklets">bookmarklet</a> in Chrome can&#8217;t be drag-n-dropped to the toolbar. its javascript code is also hard to copy and paste to create the bookmarklet &#8220;manually&#8221;.</li>
<li>install links for the <a title="chrome extension" href="http://www.delicious.com/help/quicktour/chrome">chrome</a> and <a title="firefox extension" href="http://www.delicious.com/help/quicktour/firefox">firefox</a> extensions redirect to <a title="wtf!?" href="http://www.delicious.com/help/installff">empty pages</a>.</li>
<li><a href="http://www.delicious.com/help/tools">documentation for developer</a> is coming soon (!)</li>
<li>the <a href="http://www.delicious.com/">top-right menu</a> with the logged-in username and stuff is the most horrible I&#8217;ve ever seen: it changes its width on hover, the corners look interrupted (in Chrome, at least &#8212; I&#8217;m not bothered trying with other browsers)</li>
<li>what the hell are <a href="http://www.delicious.com/stacks/lbolla">stacks</a>? grouping can be done with tags, already, and I don&#8217;t want that much space in the page taken by a &#8220;social&#8221; feature! who needs it?</li>
<li>the list of links in the main personal page only shows 8 links on my screen&#8230; 8 links?! there&#8217;s way too much padding, too whitespaces, too much to scroll&#8230; it&#8217;s a bookmarking services, it should show you bookmarks in the most friendly way!</li>
<li>image: why should I use an image for myself? and if I don&#8217;t use one, <a href="http://www.delicious.com/static/img/profile/keyboardcat.png">I got assigned one by default</a>&#8230; please&#8230;</li>
</ul>
<p>I&#8217;ll add more to the list in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/09/30/they-broke-delicious/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>http client in haskell</title>
		<link>http://lbolla.info/blog/2011/09/26/http-client-in-haskell/</link>
		<comments>http://lbolla.info/blog/2011/09/26/http-client-in-haskell/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 15:05:28 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/2011/09/26/http-client-in-haskell/</guid>
		<description><![CDATA[To try to make sense of this, I decided to write a &#8220;simple&#8221; http client in Haskell in as many styles as I could think of: it&#8217;s a long time since I found so many new concepts while studying a new programming language&#8230;]]></description>
			<content:encoded><![CDATA[<p>To try to make sense of <a href="http://learnyouahaskell.com/functors-applicative-functors-and-monoids">this</a>, I decided to write a &#8220;simple&#8221; http client in Haskell in as many styles as I could think of:</p>
<pre class="brush: haskell; title: ; notranslate">
import Network.HTTP
import Control.Applicative

url = &quot;http://www.haskell.org/haskellwiki/Haskell&quot;

--  Imperative style
fetch_1 = do
	rsp &lt;- Network.HTTP.simpleHTTP (getRequest url)
	body &lt;- getResponseBody rsp
	return (take 1000 body)

--  With Functors' fmap
fetch_2 = do
	rsp &lt;- Network.HTTP.simpleHTTP (getRequest url)
	fmap (take 1000) (getResponseBody rsp)

--  With Applicative's &gt;&gt;=
fetch_3 = fmap (take 1000) (Network.HTTP.simpleHTTP (getRequest url) &gt;&gt;= getResponseBody)

--  &quot;fmap f x&quot; is the same as &quot;pure f &lt;*&gt; x&quot; (Applicative's law)
fetch_4 = pure (take 1000) &lt;*&gt; (Network.HTTP.simpleHTTP (getRequest url) &gt;&gt;= getResponseBody)

--  &quot;pure f &lt;*&gt; x&quot; is the same as &quot;f &lt;$&gt; x&quot;
fetch_5 = (take 1000) &lt;$&gt; (Network.HTTP.simpleHTTP (getRequest url) &gt;&gt;= getResponseBody)
</pre>
<p>it&#8217;s a long time since I found so many new concepts while studying a new programming language&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/09/26/http-client-in-haskell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pylint.vim</title>
		<link>http://lbolla.info/blog/2011/08/25/pylint-vim/</link>
		<comments>http://lbolla.info/blog/2011/08/25/pylint-vim/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 10:48:52 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[pylint]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/2011/08/25/pylint-vim/</guid>
		<description><![CDATA[vim + python + pylint is a powerful combination, especially when using this vim plugin. unfortunately, the script stopped working after a pylint upgrade: you can download the fixed version here! if interested, the patch looks like this:]]></description>
			<content:encoded><![CDATA[<p>vim + python + <a href="http://www.logilab.org/857">pylint</a> is a powerful combination, especially when using this <a href="http://www.vim.org/scripts/script.php?script_id=891">vim plugin</a>.</p>
<p>unfortunately, the script stopped working after a pylint upgrade:</p>
<pre class="brush: bash; title: ; notranslate">
$ pylint --version
pylint 0.24.0,
astng 0.22.0, common 0.56.0
Python 2.7.2 (default, Jun 29 2011, 11:10:00)
[GCC 4.6.1]
</pre>
<p>you can download the <a href="https://gist.github.com/1170413">fixed version here</a>!</p>
<p>if interested, the patch looks like this:</p>
<pre class="brush: diff; title: ; notranslate">
diff pylint.vim.orig pylint.vim
69c69
&lt; CompilerSet makeprg=(echo\ '[%]';\ pylint\ -r\ y\ %)
---
&gt; CompilerSet makeprg=(echo\ '[%]';\ pylint\ -r\ y\ --output-format=parseable\ %)
74c74
&lt; CompilerSet efm=%+P[%f],%t:\ %#%l:%m,%Z,%+IYour\ code%m,%Z,%-G%.%#
---
&gt; CompilerSet efm=%f:%l:\ [%t]%m,%f:%l:%m
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/08/25/pylint-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>md5 vs sha1 in python</title>
		<link>http://lbolla.info/blog/2011/08/24/md5-vs-sha1-in-python/</link>
		<comments>http://lbolla.info/blog/2011/08/24/md5-vs-sha1-in-python/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 15:53:51 +0000</pubDate>
		<dc:creator>lbolla</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sha1]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://lbolla.info/blog/2011/08/24/md5-vs-sha1-in-python/</guid>
		<description><![CDATA[If you are interested to know if the myth about MD5 being faster than SHA1 holds for Python, here is the result I got on my box: Result is: MD5 is faster, but only just, in Python 2.7.2. Considering that MD5 is broken, I think I&#8217;ll use SHA1&#8230;]]></description>
			<content:encoded><![CDATA[<p>If you are interested to know if the <a href="http://omnifarious.livejournal.com/363945.html">myth about MD5 being faster than SHA1</a> holds for Python, here is the result I got on my box:</p>
<pre class="brush: python; title: ; notranslate">
In [1]: import hashlib

In [2]: %timeit hashlib.md5('text text text').hexdigest()
1000000 loops, best of 3: 1.29 us per loop

In [3]: %timeit hashlib.sha1('text text text').hexdigest()
1000000 loops, best of 3: 1.4 us per loop
</pre>
<p>Result is: MD5 is faster, but only just, in Python 2.7.2. Considering that <a href="http://en.wikipedia.org/wiki/MD5">MD5 is broken</a>, I think I&#8217;ll use SHA1&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lbolla.info/blog/2011/08/24/md5-vs-sha1-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

