<?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>DestaqueBlog &#187; app</title>
	<atom:link href="http://weblog.destaquenet.com/tag/app/feed/" rel="self" type="application/rss+xml" />
	<link>http://weblog.destaquenet.com</link>
	<description>Blog da equipe Destaquenet.</description>
	<lastBuildDate>Tue, 23 Nov 2010 17:06:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Understanding Open Source Licenses with Clojure</title>
		<link>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/</link>
		<comments>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 12:52:51 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[compojure]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[licensator]]></category>
		<category><![CDATA[licenses]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=1236</guid>
		<description><![CDATA[You only know how cool it is to develop or contribute to an open source project until you do so. The worst part is to define which license to use, and this task is frequently neglected by software developers. Recently &#8230; <a href="http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You only know how cool it is to develop or contribute to an open source project until you do so. The worst part is to define which license to use, and this task is frequently neglected by software developers.</p>
<p>Recently we released <a href="http://licensator.appspot.com">Licensator</a>, a simple web application that gathers information on the most popular open source licenses and helps you choose the right license for your own projects.</p>
<p>The language behind Licensator is <a href="http://clojure.org">Clojure</a>, which proved to be great to solve this sort of problem. We&#8217;ll see today how the application&#8217;s main algorithm works.</p>
<p><span id="more-1236"></span></p>
<h3>REPL: where it all begins</h3>
<p>One of the strengths of dynamic languages is how easily we can transform ideas into working code, and Clojure is no exception. In fact, I decided to write Licensator in one of these coding sessions in the <a href="http://clojure.org/repl_and_main">REPL</a>, Clojure&#8217;s interactive shell. After a few minutes playing with it I saw the problem was indeed easy to solve.</p>
<p>Despite the huge number of licenses, we can easily extract information common to all of them, i.e., if it&#8217;s copyleft, or if a licensed work can be used by closed source software, etc.</p>
<p>Let&#8217;s take the <a href="http://www.opensource.org/licenses/apache2.0.php">Apache v2.0</a> license:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def *licenses*
     <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">long-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache License v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">short-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">url</span> <span style="color: #ff0000;">&quot;http://www.opensource.org/licenses/apache2.0.php&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">derivative-work</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">affero</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-distribution</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-use</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span>
                         <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span> <span style="color: #66cc66;">:</span><span style="color: #555;">public-domain</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>You can see the remaining licenses <a href="http://github.com/danielfm/licensator/blob/master/src/licensator/licenses.clj">here</a>.</p>
<p>Considering all licenses have the same set of information, how can we find the licenses that are not reciprocal and have explicit copyright terms?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">bsd</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>If you know a little bit about functional programming, this code should be easy to follow. In any case, what this code does is return the <code>:id</code> of all licenses where <code>:copyright</code> is <code>true</code> and <code>:copyleft</code> is <code>false</code>.</p>
<p>Another example: which licenses are compatible with Apache v2.0 and <a href="http://www.opensource.org/licenses/cddl1.php">CDDL v1.0</a>?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>use 'clojure<span style="color: #66cc66;">.</span><span style="color: #b1b100;">set</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Here we used the <a href="http://clojure.github.com/clojure/clojure.set-api.html">clojure.set</a> namespace, which provides a few useful functions to deal with relational algebra. The code is very similar to the previous one; the only difference is that now we used the <code>subset?</code> function to get the licenses compatible with <code>[:apl-v20 :cddl-v10]</code>.</p>
<p>One last example: which reciprocal licenses are compatible with Apache v2.0?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">agpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">gpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>At this point we can see that there is no magic behind the algorithm; what it does is to filter the list of licenses based on a function.</p>
<h3>The solution</h3>
<p>The code we saw up until now works fine, but it&#8217;s not appropriate to solve the problem since the matching logic is spread all over the place.</p>
<p>It would be better to express the search criteria as a map object&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def cmap
     <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>&#8230;so we need a function to filter the licenses based on that input, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn find-matches <span style="color: #66cc66;">&#91;</span>cmap data<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>filter <span style="color: #66cc66;">&#40;</span>where cmap<span style="color: #66cc66;">&#41;</span> data<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Here we have <code>where</code>, yet to be coded, that returns a function that filters the elements (licenses) in <code>data</code> according to the criteria map <code>cmap</code>.</p>
<p>First things first. Which conditions of <code>cmap</code> match the Apache v2.0 license?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn criteria-matches? <span style="color: #66cc66;">&#91;</span>license <span style="color: #66cc66;">&#91;</span>kval cval<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
  <span style="color: #ff0000;">&quot;Checks whether the criteria condition centry is true for license.&quot;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>lval <span style="color: #66cc66;">&#40;</span>kval license<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
      true
      <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span>true true true<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>A license can only be considered compatible with the given criteria if the list only yields <code>true</code>. Therefore, in this case, the Apache v2.0 license is considered to be compatible:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>every? true? <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> true</pre></div></div>

<p>Given all this, a possible implementation of the <code>where</code> function might be:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn where
  <span style="color: #ff0000;">&quot;Returns a function that checks whether all conditions in cmap match for license lentry.&quot;</span>
  <span style="color: #66cc66;">&#91;</span>cmap<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>lentry<span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>res <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>centry<span style="color: #66cc66;">&#93;</span>
		     <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>cval <span style="color: #66cc66;">&#40;</span>val centry<span style="color: #66cc66;">&#41;</span>
			   lval <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>key centry<span style="color: #66cc66;">&#41;</span> lentry<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		       <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
			 true
			 <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
      <span style="color: #66cc66;">&#40;</span>every? true? res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>This code is a combination of the previous two snippets; <code>where</code> gets the criteria map <code>cmap</code> and returns a second function, which in turn gets a license entry <code>lentry</code> and checks whether all criteria conditions match.</p>
<p>Since <code>where</code> is used along with <code>filter</code> in <code>find-matches</code>, all licenses compatible with the criteria map <code>cmap</code> are returned:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">&#40;</span>find-matches cmap *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>What I like about Clojure &#8212; and functional programming languages in general &#8212; is the ridiculous amount of code it takes to solve certain problems. This algorithm, for example, has only 15 (really short) lines of code. Where is your God now?! <img src='http://weblog.destaquenet.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>You can see <a href="http://github.com/danielfm/licensator">the whole thing</a> in Github.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entendendo Licenças Open Source com Clojure</title>
		<link>http://weblog.destaquenet.com/2010/10/05/entendendo-licencas-open-source-com-clojure/</link>
		<comments>http://weblog.destaquenet.com/2010/10/05/entendendo-licencas-open-source-com-clojure/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 12:52:42 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[Português]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[compojure]]></category>
		<category><![CDATA[licenças]]></category>
		<category><![CDATA[licensator]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programação funcional]]></category>
		<category><![CDATA[projeto]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=1141</guid>
		<description><![CDATA[Só quem desenvolve ou contribui com projetos open source sabe como é legal. A pior parte é definir sob qual licença soltar o código, e essa tarefa é muitas vezes negligenciada por desenvolvedores de software. Para quem não viu, recentemente &#8230; <a href="http://weblog.destaquenet.com/2010/10/05/entendendo-licencas-open-source-com-clojure/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Só quem desenvolve ou contribui com projetos open source sabe como é legal. A pior parte é definir sob qual licença soltar o código, e essa tarefa é muitas vezes negligenciada por desenvolvedores de software.</p>
<p>Para quem não viu, recentemente colocamos no ar o <a href="http://www.destaquenet.com/portifolio/licensator/">Licensator</a>, uma aplicação web que, além de reunir informações sobre as licenças open source mais populares, é capaz de indicar as licenças apropriadas para cada caso.</p>
<p>A linguagem escolhida para implementar o projeto foi <a href="http://clojure.org">Clojure</a>, que se mostrou excelente para resolver esse tipo de problema. Veremos hoje como o principal algoritmo da aplicação funciona.</p>
<p><span id="more-1141"></span></p>
<h3>REPL: onde tudo começa</h3>
<p>Um dos pontos fortes das linguagens dinâmicas é a facilidade em transformar idéias em código funcional, e com Clojure não é diferente. A idéia por trás do Licensator surgiu justamente em uma dessas sessões de codificação no <a href="http://clojure.org/repl_and_main">REPL</a>, o ambiente interativo da linguagem. Após alguns minutos brincando, vi que o problema era simples de resolver.</p>
<p>Apesar do elevado número de licenças, podemos facilmente extrair informações comuns a todas elas, como: se a licença é copyleft, se pode ser usada por código fechado (proprietário), entre outras coisas.</p>
<p>Por exemplo, vamos pegar a licença <a href="http://www.opensource.org/licenses/apache2.0.php">Apache v2.0</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def *licenses*
     <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">long-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache License v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">short-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">url</span> <span style="color: #ff0000;">&quot;http://www.opensource.org/licenses/apache2.0.php&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">derivative-work</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">affero</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-distribution</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-use</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span>
                         <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span> <span style="color: #66cc66;">:</span><span style="color: #555;">public-domain</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>A lista completa de licenças pode ser vista <a href="http://github.com/danielfm/licensator/blob/master/src/licensator/licenses.clj">aqui</a>.</p>
<p>Considerando que todas as licenças têm esse mesmo conjunto de informações, como podemos saber quais licenças não são recíprocas e possuem cláusulas explícitas de copyright?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">bsd</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Se você conhece um pouco sobre programação funcional, este código deve ser fácil de acompanhar. De qualquer forma, o que ele faz é retornar o <code>:id</code> de todas as licenças onde <code>:copyright</code> é verdadeiro e <code>:copyleft</code> é falso.</p>
<p>Outro exemplo: quais licenças são compatíveis com Apache v2.0 e <a href="http://www.opensource.org/licenses/cddl1.php">CDDL v1.0</a>?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>use 'clojure<span style="color: #66cc66;">.</span><span style="color: #b1b100;">set</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Aqui usamos a namespace <a href="http://clojure.github.com/clojure/clojure.set-api.html">clojure.set</a>, que conta com algumas funções úteis para álgebra relacional. O código é muito parecido com o anterior; a mudança é que agora usamos a função <code>subset?</code> para buscar as licenças compatíveis com <code>[:apl-v20 :cddl-v10]</code>.</p>
<p>Último exemplo: quais licenças recíprocas são compatíveis com Apache v2.0?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">agpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">gpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Neste ponto já se pode perceber que não existe mágica nenhuma por trás do algoritmo; o que ele faz é filtrar as licenças com base numa função.</p>
<h3>A solução</h3>
<p>O código que acabamos de ver funciona, mas não é apropriado para resolver o problema uma vez que a lógica de consulta se encontra fixa no código.</p>
<p>O ideal seria se os critérios de busca fossem expressados como um map&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def cmap
     <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>&#8230;portanto precisamos de uma função que faça a filtragem das licenças com base nesse mapa, algo como:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn find-matches <span style="color: #66cc66;">&#91;</span>cmap data<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>filter <span style="color: #66cc66;">&#40;</span>where cmap<span style="color: #66cc66;">&#41;</span> data<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>No caso, essa função <code>where</code>, que ainda não definimos, deve retornar uma função que filtre os elementos (licenças) em <code>data</code> de acordo com o mapa de critérios <code>cmap</code>.</p>
<p>Vamos por partes. Quais condições em <code>cmap</code> são verdadeiras para a licença Apache v2.0?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn criteria-matches? <span style="color: #66cc66;">&#91;</span>license <span style="color: #66cc66;">&#91;</span>kval cval<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
  <span style="color: #ff0000;">&quot;Verifica se o critério 'centry' é verdadeiro para a licença 'license'.&quot;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>lval <span style="color: #66cc66;">&#40;</span>kval license<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
      true
      <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span>true true true<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Uma licença só pode ser considerada compatível com os critérios se a lista retornada contém apenas valores verdadeiros. Portanto, neste caso, a licença Apache v2.0 é considerada compatível com os critérios informados:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>every? true? <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> true</pre></div></div>

<p>Logo, uma possível implementação para a função <code>where</code> seria:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn where
  <span style="color: #ff0000;">&quot;Retorna função que diz se todos os critérios em 'cmap' são verdadeiros para a licença 'lentry'.&quot;</span>
  <span style="color: #66cc66;">&#91;</span>cmap<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>lentry<span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>res <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>centry<span style="color: #66cc66;">&#93;</span>
		     <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>cval <span style="color: #66cc66;">&#40;</span>val centry<span style="color: #66cc66;">&#41;</span>
			   lval <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>key centry<span style="color: #66cc66;">&#41;</span> lentry<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		       <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
			 true
			 <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
      <span style="color: #66cc66;">&#40;</span>every? true? res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Este código é uma junção dos dois anteriores. A função <code>where</code> recebe o mapa <code>cmap</code> com os critérios de pesquisa, e retorna uma segunda função. Esta função recebe uma licença <code>lentry</code> e verifica se todos os critérios informados são verdadeiros para esta licença.</p>
<p>Como <code>where</code> é usada em conjunto com <code>filter</code> na função <code>find-matches</code>, isso fará com que todas as licenças compatíveis sejam retornadas:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">&#40;</span>find-matches cmap *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Uma das coisas legais de Clojure &#8212; e outras linguagens funcionais &#8212; é a quantidade ridícula de código necessário para resolver certos problemas. Este algoritmo, por exemplo, tem apenas 15 linhas (muito curtas) de código. Onde está seu Deus agora?! <img src='http://weblog.destaquenet.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>O <a href="http://github.com/danielfm/licensator">código da aplicação</a> está no Github para quem tiver interesse em ver o restante do código.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2010/10/05/entendendo-licencas-open-source-com-clojure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Você gostaria de ver Django-flash incluído no Django como uma Contrib app?</title>
		<link>http://weblog.destaquenet.com/2009/06/19/voce-gostaria-de-ver-django-flash-incluido-no-django-como-uma-contrib-app/</link>
		<comments>http://weblog.destaquenet.com/2009/06/19/voce-gostaria-de-ver-django-flash-incluido-no-django-como-uma-contrib-app/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:14:46 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[Off Topic]]></category>
		<category><![CDATA[Português]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[contrib]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-flash]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[projeto]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=535</guid>
		<description><![CDATA[Django-flash, um despretencioso projeto de software livre desenvolvido pela Destaquenet, tem recebido excelentes críticas por quem o vem utilizando regularmente. Sua adoção vem crescendo vagarosamente, mas consistentemente. Nem preciso dizer o quanto isso é gratificante para nós. De um tempo &#8230; <a href="http://weblog.destaquenet.com/2009/06/19/voce-gostaria-de-ver-django-flash-incluido-no-django-como-uma-contrib-app/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://djangoflash.destaquenet.com">Django-flash</a>, um despretencioso projeto de <em>software</em> livre desenvolvido pela <a href="http://www.destaquenet.com">Destaquenet</a>, tem recebido excelentes críticas por quem o vem utilizando regularmente. Sua adoção vem crescendo vagarosamente, mas consistentemente. Nem preciso dizer o quanto isso é gratificante para nós.</p>
<p>De um tempo para cá, eu fui contactado por alguns desses usuários perguntando sobre a possibilidade de ter o nosso projeto incluído na distribuição do <a href="http://www.djangoproject.com/">Django</a>, na forma de uma <a href="http://docs.djangoproject.com/en/dev/ref/contrib/">Contrib app</a>. Eu achei a idéia excelente, pois eu penso que um <em>framework</em> como o Django deveria se preocupar em resolver um <a href="http://weblog.destaquenet.com/2009/02/06/mensagens-flash-a-la-rails-para-django-com-django-flash/">problema tão recorrente</a> quanto este que o Django-flash se propõe a resolver.</p>
<p>Se você utiliza Django-flash em seus projetos, não deixe de acompanhar <a href="http://code.djangoproject.com/ticket/4604">essa discussão</a>. Se possível, nos dê sua opinião sobre o que poderia ser feito para melhorar ainda mais o projeto e, assim, facilitar sua inclusão no Django.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2009/06/19/voce-gostaria-de-ver-django-flash-incluido-no-django-como-uma-contrib-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

