<?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>Serabe Reloaded &#187; Serabe</title>
	<atom:link href="http://www.serabe.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serabe.com</link>
	<description>Conecto ergo sum. Non conecto ergo urgueo.</description>
	<lastBuildDate>Sun, 09 Oct 2011 21:30:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Adding organization repos to Travis-CI: Part I</title>
		<link>http://www.serabe.com/2011/10/09/adding-organization-repos-to-travis-ci-part-i/</link>
		<comments>http://www.serabe.com/2011/10/09/adding-organization-repos-to-travis-ci-part-i/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 21:30:53 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[sproutcore]]></category>
		<category><![CDATA[travis-ci]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=594</guid>
		<description><![CDATA[It was a nice Friday, Porras and I were at the BeBanjOffice and  we were working on adding organization support to Travis-CI. First, we needed to find where the user repos were being fetch. Said and done, we found that travis is using the ServiceHookController to ask the server for repos (and to update them too, but [...]]]></description>
			<content:encoded><![CDATA[<p>It was a <a href="https://bebanjo.jottit.com/open_source_fridays" title="Open Source Fridays" >nice Friday</a>, <a href="https://github.com/porras" title="Porras' Github Profile" >Porras</a> and I were at the BeBanjOffice and  we were working on adding organization support to <a href="http://travis-ci.org/" title="Travis CI" >Travis-CI</a>.</p>
<p>First, we needed to find where the user repos were being fetch. Said and done, we found that travis is using the <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/app/controllers/service_hooks_controller.rb" title="ServiceHookController in Github" >ServiceHookController</a> to ask the server for repos (and to update them too, but don&#8217;t hurry, we&#8217;ll get there in part II). The controller was using the <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/app/models/user.rb#L40" title="github_repositories" >github_repositories</a> method in the <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/app/models/user.rb" title="User model" >User model</a>. Finally, we arrived to <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/lib/travis/github_api.rb" title="Travis::GithubApi" >Travis::GithubApi</a>, where all our questions found answers.</p>
<p><a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/lib/travis/github_api.rb#L32" title="repositories_for_user method" >repositories_for_user</a> just relied on <code>Octokit#repositories</code> for getting the repos, so we added all the code after the plus sign. You might think that this code lacks the proper security, is wrong and that it shouldn&#8217;t be there (and damn it, you&#8217;re right!) but there is no easy way to retrieve only the repos where the user has admin privileges (we wasted hours on this and a quick message to Github confirmed it).  Basically, it asks for all organizations for the given user (beware! You need to make your membership public, otherwise it won&#8217;t work) and then flat_map them to the repos in the given organization (whether the user can administrate them or not).</p>
<p>Later, the <code>each</code> block was added so we could know whether the repo belongs to the user or to an organization.</p>
<h2>Stop! Hammertime!</h2>
<p>We needed a way to let the user know that a repo actually belongs to an organization, so we added that info to the <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/app/assets/javascripts/app/templates/service_hooks/list.jst.hjs" title="Template code." >template</a> (that <code>{{#if content.organization_name}}</code> is ours <img src='http://www.serabe.com/wp-includes/images/smilies/icon_biggrin.gif' alt="icon biggrin Adding organization repos to Travis CI: Part I" class='wp-smiley' title="Adding organization repos to Travis CI: Part I" /> ) and added some <a href="https://github.com/porras/travis-ci/blob/66c763df9f1bf298aa8871816f7bcaf1bfbff30b/app/assets/stylesheets/application.scss#L909" title="SCSS code" >style</a> so it could look this awesome:</p>
<div class="thumbnail"><a href="http://skitch.com/e-serabe/fhqxc/travis-ci-distributed-build-platform-for-the-open-source-community" ><img style="max-width: 638px;" src="http://img.skitch.com/20110928-q5hyhyuddmqnsr7awgmxtj6ph5.medium.jpg" alt="20110928 q5hyhyuddmqnsr7awgmxtj6ph5.medium Adding organization repos to Travis CI: Part I"  title="Adding organization repos to Travis CI: Part I" /></a></div>
<p>We had some tough time trying to get it vertically centered, but after realizing that Github has its tags the same way as we do, we stop trying to fix it. And they still look awesome.</p>
<p>More coming in part II.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Adding organization repos to Travis-CI: Part I on Serabe Reloaded',url: 'http://www.serabe.com/2011/10/09/adding-organization-repos-to-travis-ci-part-i/',contentID: 'post-594',suggestTags: 'opensource,Ruby,sproutcore,travis-ci',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Adding organization repos to Travis CI: Part I" alt="article clipper Adding organization repos to Travis CI: Part I" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2011%2F10%2F09%2Fadding-organization-repos-to-travis-ci-part-i%2F&amp;title=Adding%20organization%20repos%20to%20Travis-CI%3A%20Part%20I" id="wpa2a_2"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Adding organization repos to Travis CI: Part I"  title="Adding organization repos to Travis CI: Part I" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2011/10/09/adding-organization-repos-to-travis-ci-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transforming CSS selector to an XPath query</title>
		<link>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/</link>
		<comments>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 18:42:41 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[nokogiri]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=589</guid>
		<description><![CDATA[So. Easy. PLAIN TEXT RUBY: require 'nokogiri'; Nokogiri::CSS.xpath_for&#40;css_selector&#41; &#160;]]></description>
			<content:encoded><![CDATA[<p>So. Easy.</p>
<div class="igBar"><span id="lruby-2"><a href="#" onclick="javascript:showPlainTxt('ruby-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-2">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'nokogiri'; Nokogiri::CSS.<span style="color:#9900CC;">xpath_for</span><span style="color:#006600; font-weight:bold;">&#40;</span>css_selector<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Transforming CSS selector to an XPath query on Serabe Reloaded',url: 'http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/',contentID: 'post-589',suggestTags: 'nokogiri,programming,Ruby',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Transforming CSS selector to an XPath query" alt="article clipper Transforming CSS selector to an XPath query" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2011%2F09%2F09%2Ftransforming-css-selector-to-xpath%2F&amp;title=Transforming%20CSS%20selector%20to%20an%20XPath%20query" id="wpa2a_4"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Transforming CSS selector to an XPath query"  title="Transforming CSS selector to an XPath query" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tries: la pronunciación se deja como ejercicio para el lector.</title>
		<link>http://www.serabe.com/2011/04/28/tries-la-pronunciacion-se-deja-como-ejercicio-para-el-lector/</link>
		<comments>http://www.serabe.com/2011/04/28/tries-la-pronunciacion-se-deja-como-ejercicio-para-el-lector/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 19:00:30 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=582</guid>
		<description><![CDATA[El repositorio de github de trie. Tomad y usad todos de él. Para ver el artículo de succint trie, añadid en Google Reader el feed http://stevehanov.ca/blog/index.php?atom El artículo se llama "Succint Data Structures: Cramming 80,000 words into a Javascript file". Próximamente la presentación en slideshare. Próximamente el vídeo. Cuando vea en qué formato sale lo de [...]]]></description>
			<content:encoded><![CDATA[<p>El repositorio de github de <a href="https://github.com/Serabe/trie" >trie</a>. Tomad y usad todos de él.</p>
<p>Para ver el artículo de succint trie, añadid en Google Reader el feed <code>http://stevehanov.ca/blog/index.php?atom</code> El artículo se llama "<em>Succint Data Structures: Cramming 80,000 words into a Javascript file</em>".</p>
<p>Próximamente la presentación en slideshare.</p>
<p>Próximamente el vídeo.</p>
<p>Cuando vea en qué formato sale lo de OvationApp, lo subo también (y también próximamente)</p>
<p>&nbsp;</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Tries: la pronunciación se deja como ejercicio para el lector. on Serabe Reloaded',url: 'http://www.serabe.com/2011/04/28/tries-la-pronunciacion-se-deja-como-ejercicio-para-el-lector/',contentID: 'post-582',suggestTags: '',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Tries: la pronunciación se deja como ejercicio para el lector." alt="article clipper Tries: la pronunciación se deja como ejercicio para el lector." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2011%2F04%2F28%2Ftries-la-pronunciacion-se-deja-como-ejercicio-para-el-lector%2F&amp;title=Tries%3A%20la%20pronunciaci%C3%B3n%20se%20deja%20como%20ejercicio%20para%20el%20lector." id="wpa2a_6"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Tries: la pronunciación se deja como ejercicio para el lector."  title="Tries: la pronunciación se deja como ejercicio para el lector." /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2011/04/28/tries-la-pronunciacion-se-deja-como-ejercicio-para-el-lector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Essential Guide to HTML5: a review</title>
		<link>http://www.serabe.com/2011/01/02/the-essential-guide-to-html5-a-review/</link>
		<comments>http://www.serabe.com/2011/01/02/the-essential-guide-to-html5-a-review/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 21:57:47 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=564</guid>
		<description><![CDATA[After reading this book I have some encountered feelings about it: on the one hand the content is correct, everything I tested worked fine, etc but on the other hand I really find annoying the form it is presented. When I started reading, I expected to find more about CSS3 (a topic almost not covered [...]]]></description>
			<content:encoded><![CDATA[<p>After reading this book I have some encountered feelings about it: on the one hand the content is correct, everything I tested worked fine, etc but on the other hand I really find annoying the form it is presented.</p>
<p>When I started reading, I expected to find more about CSS3 (a topic almost not covered in the book) and less Javascript, but since this is only an expectation, I'll try my best so it doesn't affect this review.</p>
<p>Since I wrote before, the content is correct. Covers a huge part of the new apis, the examples usedare not too complex yet interesting and it is not hard to follow. Without any doubt, the form code snippets are displayed. The code is displayed in a two-column table (one for code, one for comments) and each line (each line!) is commented. Seriously, I've seen the <code>&lt;html&gt;</code> line commented!</p>
<p>And even if the content is good, the table issue makes it really hard to read if you are a medium-experienced programmer. These are my encountered feelings: good content, not that good layout.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'The Essential Guide to HTML5: a review on Serabe Reloaded',url: 'http://www.serabe.com/2011/01/02/the-essential-guide-to-html5-a-review/',contentID: 'post-564',suggestTags: 'book',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="The Essential Guide to HTML5: a review" alt="article clipper The Essential Guide to HTML5: a review" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2011%2F01%2F02%2Fthe-essential-guide-to-html5-a-review%2F&amp;title=The%20Essential%20Guide%20to%20HTML5%3A%20a%20review" id="wpa2a_8"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 The Essential Guide to HTML5: a review"  title="The Essential Guide to HTML5: a review" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2011/01/02/the-essential-guide-to-html5-a-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a blur effect with rinzelight.</title>
		<link>http://www.serabe.com/2010/10/31/creating-a-blur-effect-with-rinzelight/</link>
		<comments>http://www.serabe.com/2010/10/31/creating-a-blur-effect-with-rinzelight/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 20:55:56 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Clojure]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[rinzelight]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=556</guid>
		<description><![CDATA[After releasing rinzelight 0.0.3, I wondered how hard addinga blur effect would be. So I started implementing it. We are going to do two 1D blur. In first place, open a repl and start emacs (or vim). Use rinzelight.image for reading northern-lights.jpg First, let's start creating a blur-kernel function with two parameters, width and sigma. [...]]]></description>
			<content:encoded><![CDATA[<p>After releasing <code>rinzelight</code> 0.0.3, I wondered how hard addinga blur effect would be. So I started implementing it.</p>
<p>We are going to do two 1D blur. In first place, open a repl and start emacs (or vim). Use rinzelight.image for reading northern-lights.jpg</p>
<p>First, let's start creating a <code>blur-kernel</code> function with two parameters, <em>width</em> and <em>sigma</em>. Rinzelight lacks of a <em>kernel-rank</em> constant, so let's add it. Open <code>src/rinzelight/constants</code> and add the following line to the end:</p>
<p><script src="https://gist.github.com/656993.js?file=constants.clj"></p>
<p>Now, we are ready to write the <code>blur-kernel</code> function:</p>
<p><script src="http://gist.github.com/657015.js?file=blur.clj"></script></p>
<p>We get a horizontal kernel, which we will apply twice, one horizontally and one vertically. For getting a vertical kernel, we write one final function called <code>transpose-horizontal-kernel</code>:</p>
<p><script src="http://gist.github.com/657116.js?file=blur.clj"></script></p>
<p>And now, we are ready to write the blur effect:</p>
<p><script src="http://gist.github.com/657119.js?file=blur.clj"></script></p>
<p>And this  is the result of a <code>(blur (read-image "samples/northern-lights.jpg") 5 1.5 repeat-op rendering-quality)</code>:</p>
<div id="attachment_558" class="wp-caption aligncenter" style="width: 250px"><a href="http://www.serabe.com/wp-content/uploads/2010/10/example-blur.png" ><img class="size-full wp-image-558" title="example-blur" src="http://www.serabe.com/wp-content/uploads/2010/10/example-blur.png" alt="example blur Creating a blur effect with rinzelight." width="240" height="160" /></a><p class="wp-caption-text">(blur img 5 1.5 repeat-op rendering-quality)</p></div>
<p>And that's it!</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a blur effect with rinzelight. on Serabe Reloaded',url: 'http://www.serabe.com/2010/10/31/creating-a-blur-effect-with-rinzelight/',contentID: 'post-556',suggestTags: 'clojure,rinzelight',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Creating a blur effect with rinzelight." alt="article clipper Creating a blur effect with rinzelight." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F10%2F31%2Fcreating-a-blur-effect-with-rinzelight%2F&amp;title=Creating%20a%20blur%20effect%20with%20rinzelight." id="wpa2a_10"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Creating a blur effect with rinzelight."  title="Creating a blur effect with rinzelight." /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/10/31/creating-a-blur-effect-with-rinzelight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing rinzelight 0.0.2</title>
		<link>http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/</link>
		<comments>http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 11:49:56 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Clojure]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[rinzelight]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=545</guid>
		<description><![CDATA[I started writing rinzelight long time ago. Exactly, I started on February. Sadly, since I wasn't getting a few points about Clojure, I stopped working on it twenty days after for half a year. But do not let me digress. Rinzelight is finally released! Actually, rinzelight 0.0.2 is released! But let me introduce you to [...]]]></description>
			<content:encoded><![CDATA[<p>I started writing <a href="http://github.com/Serabe/rinzelight" >rinzelight</a> long time ago. Exactly, I started on February. Sadly, since I wasn't getting a few points about Clojure, I stopped working on it twenty days after for half a year.</p>
<p>But do not let me digress. Rinzelight is finally released! Actually, rinzelight 0.0.2 is released! But let me introduce you to rinzelight.</p>
<h3>Opening an image.</h3>
<p>Just use <code>rinzelight.image</code> namespace. Then, just provide <code>read-image</code> of a filepath or an InputStream. Just like this:</p>
<script><html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.0.4</center>
</body>
</html>
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>&lt;html&gt;
&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor=&quot;white&quot;&gt;
&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx/1.0.4&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></code></noscript></div>
<h3>A hash?</h3>
<p>Yes. Four fields: image, format, width and height.</p>
<h3>It's an image. Let me see it!</h3>
<p>Command your repl to <code>display-image</code>.</p>
<h3>What about saving it?</h3>
<p>The correct spell is <code>write-image</code>. Just give it an image and an uri.</p>
<h3>I want to change an image's nature.</h3>
<p>If you want to, you can. Just look for namespaces under <code>rinzelight.effects</code>. Lookup tables and affine transforms are already available. There are even <code>map-image</code> and <code>map-pixel-location</code> functions. If you want to use <code>map-pixel-location</code>, take a look at <code>rinzelight.effects.helper-functions</code> for a helping hand.</p>
<h3>What about a few examples?</h3>
<p>I hide them under examples. They are a bit obfuscated using <code><a href="http://github.com/hugoduncan/criterium" >criterium</a></code> for benchmarking, but they are not hard to understand. For running them, use <code>lein run</code>. They'll take a bit, since I use them as benchmarks.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Introducing rinzelight 0.0.2 on Serabe Reloaded',url: 'http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/',contentID: 'post-545',suggestTags: 'clojure,rinzelight',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Introducing rinzelight 0.0.2" alt="article clipper Introducing rinzelight 0.0.2" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F10%2F17%2Fintroducing-rinzelight-0-0-2%2F&amp;title=Introducing%20rinzelight%200.0.2" id="wpa2a_12"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Introducing rinzelight 0.0.2"  title="Introducing rinzelight 0.0.2" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The One where I spent a morning because -0.5 turned to be parsed as 1/2</title>
		<link>http://www.serabe.com/2010/09/05/the-one-where-i-spent-a-morning-because-0-5-turned-to-be-parsed-as-12/</link>
		<comments>http://www.serabe.com/2010/09/05/the-one-where-i-spent-a-morning-because-0-5-turned-to-be-parsed-as-12/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:54:52 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[GeoGebra]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[geogebra]]></category>
		<category><![CDATA[jas]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=536</guid>
		<description><![CDATA[This summer, I have been doing some amazing stuff for GeoGebra. First of all, I would like to thank two people: Miguel, my mentor, who guided me through all that really advanced mathematical stuff; and Heinz Kredel, JAS creator and developer, who answered all my questions and implemented my suggestions as quickly as I could [...]]]></description>
			<content:encoded><![CDATA[<p>This summer, I have been doing some amazing stuff for GeoGebra. First of all, I would like to thank two people: Miguel, my mentor, who guided me through all that really advanced mathematical stuff; and Heinz Kredel, <a href="http://krum.rz.uni-mannheim.de/jas/" title="Java Algebraic System" >JAS</a> creator and developer, who answered all my questions and implemented my suggestions as quickly as I could write them.</p>
<p>This story is about a problem we found in JAS. It was really subtle, so I may need a brief introduction to the project I worked on: LocusEqu. That project retrieves the equation of "any" geometrical locus. If you don't know what a locus is, Wolfram Math World defines it as "<em>the set of all points (usually forming a curve or surface) satisfying some condition</em>" . LocusEqu generates a few EquationExpression, and then, by using a EquationTranslator, it generates a GenPolynomial&lt;BigRational&gt; object.</p>
<p>For translating doubles, it calls the BigRational constructor whose only argument is a String. This is the code:</p>
<p><script src="http://gist.github.com/566265.js"> </script></p>
<p>Can you spot the bug? Look at the 21st line. If <em>s</em> is "-0.5", then <em>n </em>is <strong>new BigInteger("-0")</strong>, and that's what makes "-0.5" be parsed as 1/2.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'The One where I spent a morning because -0.5 turned to be parsed as 1/2 on Serabe Reloaded',url: 'http://www.serabe.com/2010/09/05/the-one-where-i-spent-a-morning-because-0-5-turned-to-be-parsed-as-12/',contentID: 'post-536',suggestTags: 'bug,geogebra,jas,Java,programming',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="The One where I spent a morning because  0.5 turned to be parsed as 1/2" alt="article clipper The One where I spent a morning because  0.5 turned to be parsed as 1/2" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F09%2F05%2Fthe-one-where-i-spent-a-morning-because-0-5-turned-to-be-parsed-as-12%2F&amp;title=The%20One%20where%20I%20spent%20a%20morning%20because%20-0.5%20turned%20to%20be%20parsed%20as%201%2F2" id="wpa2a_14"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 The One where I spent a morning because  0.5 turned to be parsed as 1/2"  title="The One where I spent a morning because  0.5 turned to be parsed as 1/2" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/09/05/the-one-where-i-spent-a-morning-because-0-5-turned-to-be-parsed-as-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status update for GeoGebra.</title>
		<link>http://www.serabe.com/2010/07/12/status-update-for-geogebra/</link>
		<comments>http://www.serabe.com/2010/07/12/status-update-for-geogebra/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 20:41:04 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[GeoGebra]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[geogebra]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=522</guid>
		<description><![CDATA[My contributions for the first part of the first part of GSoC 2010 can be divided in two: general improvements and coding. General improvements I made a few general improvements on GeoGebra: Refactored build.dir in ant build file. Previously, build.dir wasn't in the root directory. A few ant tasks were added, such compile-grammar, compile-oe (outside [...]]]></description>
			<content:encoded><![CDATA[<p>My contributions for the first part of the first part of GSoC 2010 can be divided in two: general improvements and coding.</p>
<h3>General improvements</h3>
<p>I made a few general improvements on GeoGebra:</p>
<ol>
<li>Refactored build.dir in ant build file. Previously, build.dir wasn't in the root directory.</li>
<li>A few ant tasks were added, such compile-grammar, compile-oe (outside Eclipse), run-easyb and run-easyb-outside-eclipse.</li>
<li>SVN properties were set in order to work outside Eclipse. This way, .class files will be kept out of the repo without the intervention of any Eclipse plugin.</li>
<li>Easyb, a BDD groovy-based framework, has been included in order to test GeoGebra. It is not RSpec, but I guess it'll do.</li>
</ol>
<h3>Coding</h3>
<p>First, I started creating a few <strong>EquationPoint</strong> classes,  currently there are six <strong>EquationPoint </strong>children classes:</p>
<p><a href="http://www.serabe.com/wp-content/uploads/2010/07/Selección_003.png" ><img class="alignnone size-full wp-image-524" title="EquationPoint type hierarchy" src="http://www.serabe.com/wp-content/uploads/2010/07/Selección_003.png" alt="Selección 003 Status update for GeoGebra." width="384" height="254" /></a></p>
<ul>
<li><strong>EquationFreePoint</strong> represents an independent point.</li>
<li><strong>EquationSymbolicPoint</strong> represents a dependent point,  <strong>EquationSpecialSymbolicPoint</strong> standing only for the locus point.</li>
<li><strong>EquationNormalPoint</strong> and <strong>EquationPointVectorPoint</strong> are only auxiliar elements.</li>
</ul>
<p>Then, a few <strong>EquationElement</strong> classes were added, these stand for the different constructions:</p>
<p><a href="http://www.serabe.com/wp-content/uploads/2010/07/Selección_001.png" ><img class="alignnone size-full wp-image-525" title="EquationElement type hierarchy" src="http://www.serabe.com/wp-content/uploads/2010/07/Selección_001.png" alt="Selección 001 Status update for GeoGebra." width="384" height="364" /></a></p>
<p><strong>EquationElement</strong> is an abstract class containing a few basic methods:</p>
<ul>
<li><strong>forPoint</strong>: Given an EquationPoint, returns a String with the equation that means that the point is in the construction.</li>
<li><strong>isAlgebraic</strong>: returns true if the construction is algebraic, and false otherwise.</li>
</ul>
<p>Both <strong>EquationGenericCircle</strong> and <strong>EquationGenericLine</strong> are abstractions of specific line and circle contructions, all of them algebraic. <strong>EquationGenericSegment</strong> is to segment what <strong>EquationGenericLine</strong> is to lines. Obviously, <strong>EquationGenericSegment</strong> is not algebraic.</p>
<p>All of these classes are used together by<strong> EquationScope</strong>.</p>
<h3>A pause for a screenshot.</h3>
<p><a href="http://www.serabe.com/wp-content/uploads/2010/07/Selección_002_modificada.png" ><img title="Screenshot" src="http://www.serabe.com/wp-content/uploads/2010/07/Selección_002_modificada-300x132.png" alt="Selección 002 modificada 300x132 Status update for GeoGebra." width="300" height="132" /></a></p>
<p>Click for enlarge.</p>
<h3>A glimpse into the future.</h3>
<p>What to do next?:</p>
<ul>
<li><span style="text-decoration: line-through;">Maybe Equation should be a proper class, not just a String.</span></li>
<li>More equations.</li>
<li>Working out the locus equation.</li>
<li><span style="text-decoration: line-through;">Not using an algorithm twice.</span></li>
</ul>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Status update for GeoGebra. on Serabe Reloaded',url: 'http://www.serabe.com/2010/07/12/status-update-for-geogebra/',contentID: 'post-522',suggestTags: 'geogebra,gsoc,Java,programming',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Status update for GeoGebra." alt="article clipper Status update for GeoGebra." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F07%2F12%2Fstatus-update-for-geogebra%2F&amp;title=Status%20update%20for%20GeoGebra." id="wpa2a_16"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Status update for GeoGebra."  title="Status update for GeoGebra." /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/07/12/status-update-for-geogebra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About WordPress automatic upgrade.</title>
		<link>http://www.serabe.com/2010/06/30/about-wordpress-automatic-upgrade/</link>
		<comments>http://www.serabe.com/2010/06/30/about-wordpress-automatic-upgrade/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 23:06:44 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=517</guid>
		<description><![CDATA[I'm stupid, and here is why: Long, long time ago,  when WordPress 2.7 was released I got excited about  the automatic upgrade feature. I never got to get it working, but I didn't care at all. I don't have that many plug-ins, and sometimes in a while, I just uploaded all the files via FTP. [...]]]></description>
			<content:encoded><![CDATA[<p>I'm stupid, and here is why:</p>
<p>Long, long time ago,  when WordPress 2.7 was released I got excited about  the automatic upgrade feature. I never got to get it working, but I didn't care at all. I don't have that many plug-ins, and sometimes in a while, I just uploaded all the files via FTP. But I moved sergio.arbeo.net to WordPress after 3.0 release and then I realize that it was working there!</p>
<p>Then, wondering why, found out <a href="http://paheli.net/blog/2009/07/22/solved-wordpress-automatic-upgrade-problem/" >this post</a> with its really easy solution: just add the following two lines to the WordPress .htaccess:</p>
<blockquote><p><code># Ensure PHP5 being used</p>
<p># For WordPress auto upgrade</p>
<p>AddType x-mapp-php5 .php</p>
<p>AddHandler x-mapp-php5 .php</p>
<p></code></p></blockquote>
<p>As I said, I'm stupid.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'About WordPress automatic upgrade. on Serabe Reloaded',url: 'http://www.serabe.com/2010/06/30/about-wordpress-automatic-upgrade/',contentID: 'post-517',suggestTags: '',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="About WordPress automatic upgrade." alt="article clipper About WordPress automatic upgrade." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F06%2F30%2Fabout-wordpress-automatic-upgrade%2F&amp;title=About%20WordPress%20automatic%20upgrade." id="wpa2a_18"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 About WordPress automatic upgrade."  title="About WordPress automatic upgrade." /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/06/30/about-wordpress-automatic-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple mathematical concepts I: Induction.</title>
		<link>http://www.serabe.com/2010/03/29/simple-mathematical-concepts-i-induction/</link>
		<comments>http://www.serabe.com/2010/03/29/simple-mathematical-concepts-i-induction/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 23:54:17 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[induction]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[simple concepts]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=505</guid>
		<description><![CDATA[After reading this and this I realized something is really, really wrong about mathematical concepts out there. Proof by induction is a really, really simple yet powerful proof method.  In this post, I will talk about induction for natural numbers. Induction is based on two steps, usually called basis and inductive step. I will proof [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://www.flickr.com/photos/26013750@N00/4458595395/" title="New equals sign"  target="_blank"><img class="alignright" style="border: 0px initial initial;" src="http://farm3.static.flickr.com/2757/4458595395_2c1bbc10e5_m.jpg" border="0" alt="4458595395 2c1bbc10e5 m Simple mathematical concepts I: Induction." width="240" height="180" title="Simple mathematical concepts I: Induction." /></a><br />
After reading <a href="http://www.reddit.com/r/programming/comments/9fke9/how_do_i_get_a_better_grasp_of_proofs_by_induction/c0ckxl4" title="Reddit comment" >this</a> and <a href="http://www.reddit.com/r/programming/comments/9fke9/how_do_i_get_a_better_grasp_of_proofs_by_induction/c0cl47i" title="Reddit comment" >this</a> I realized something is really, really wrong about mathematical concepts out there. Proof by induction is a really, really simple yet powerful proof method.  In this post, I will talk about induction for natural numbers.</p>
<p>Induction is based on two steps, usually called <strong>basis</strong> and <strong>inductive step</strong>. I will proof that 1+2+...+n=n(n+1)/2  for all natural numbers using induction.</p>
<ol>
<li><strong>Basis</strong> or <strong>base case</strong> consists on proving the predicate for an initial value, usually a small one. In the example 1=1*2/2=1.</li>
<li><strong>Inductive step</strong> consists on supposing the <em>if</em> the predicate holds for <em>n</em>, then it also holds for n+1. In the example:</li>
</ol>
<p>1+2+...+n+(n+1)=(n+1)+n(n+1)/2 because we supposed that predicate held for <em>n</em>. We need to prove that this expression is equivalent to (n+1)(n+2)/2. Indeed,</p>
<p>(n+1)+n(n+1)/2=(n+1)(1+n/2)=(n+1)((2+n)/2)=(n+1)(2+n)/2</p>
<p>so the predicate has been proofed for all natural numbers.</p>
<p><strong>Why does induction work?</strong></p>
<p>Think of any natural number, as big as you want. Got it? We know that the predicate holds for 1, and that if the predicate holds for a number it holds for its successor. So it holds for 2, and for 3 and so on until it reach your number.</p>
<p><strong>Other types of induction.</strong></p>
<p>There are several types of inductions. Two of these types are <strong>structural induction</strong> and <strong>complete induction</strong>.</p>
<p><small><a href="http://creativecommons.org/licenses/by-nc-sa/2.0/" title="Attribution-NonCommercial-ShareAlike License"  target="_blank"><img src="http://www.serabe.com/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="cc Simple mathematical concepts I: Induction." width="16" height="16" align="absmiddle" title="Simple mathematical concepts I: Induction." /></a> <a href="http://www.photodropper.com/photos/"  target="_blank">photo</a> credit: <a rel="nofollow" href="http://www.flickr.com/photos/26013750@N00/4458595395/" title="hartboy"  target="_blank">hartboy</a></small></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Simple mathematical concepts I: Induction. on Serabe Reloaded',url: 'http://www.serabe.com/2010/03/29/simple-mathematical-concepts-i-induction/',contentID: 'post-505',suggestTags: 'induction,Mathematics,Maths,simple concepts',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Simple mathematical concepts I: Induction." alt="article clipper Simple mathematical concepts I: Induction." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2010%2F03%2F29%2Fsimple-mathematical-concepts-i-induction%2F&amp;title=Simple%20mathematical%20concepts%20I%3A%20Induction." id="wpa2a_20"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Simple mathematical concepts I: Induction."  title="Simple mathematical concepts I: Induction." /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2010/03/29/simple-mathematical-concepts-i-induction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

