<?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>Naufraghi nella rete &#187; informatica</title>
	<atom:link href="http://www.slug.it/naufraghi/tag/informatica/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slug.it/naufraghi</link>
	<description>… dolce m’è il naufragar in questo mare?</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:10:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>F2PY rulez!</title>
		<link>http://www.slug.it/naufraghi/f2py-rulez/</link>
		<comments>http://www.slug.it/naufraghi/f2py-rulez/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 18:37:36 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software libero]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=567</guid>
		<description><![CDATA[I recently found some old Fortran code from the paper Algorithm AS197 A Fast Algorithm for the Exact Likelihood of Autoregressive-Moving Average Models (Melard 1984) [pdf] <pre></pre>

. I&#8217;m not very fluent in Fortran77 and I don&#8217;t like the idea of &#8230; <a href="http://www.slug.it/naufraghi/f2py-rulez/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently found some old Fortran code from the paper <em>Algorithm AS197 A Fast Algorithm for the Exact Likelihood of Autoregressive-Moving Average Models (Melard 1984)</em> [<a href="http://www.stat.berkeley.edu/classes/s244/as197.pdf">pdf</a>] [<a href="http://lib.stat.cmu.edu/apstat/197">code</a>].</p>
<p>I&#8217;m not very fluent in Fortran77 and I don&#8217;t like the idea of rewriting a well tested piece of code introducing new bugs, so why not give a try to <a href="http://www.scipy.org/F2py">F2PY</a>?</p>
<blockquote><p>F2PY is a tool that provides an easy connection between Python and Fortran languages. F2PY is part of <a href="http://www.scipy.org/NumPy">NumPy</a>.<br />
F2PY creates extension modules from (handwritten or F2PY generated) signature files or directly from Fortran sources.</p></blockquote>
<p><a href="http://www.slug.it/naufraghi/ingegneria/interface-legacy-fortran-code-from-python-with-f2py/">Continue&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/f2py-rulez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL custom aggregate functions</title>
		<link>http://www.slug.it/naufraghi/postgresql-custom-aggregate-functions/</link>
		<comments>http://www.slug.it/naufraghi/postgresql-custom-aggregate-functions/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 22:48:50 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=544</guid>
		<description><![CDATA[Aggregate functions compute a single result from a set of input values. Like sum() or count() they operate on one or more columns and multiple rows and output a single result. In PostgreSQL is quite easy to create a custom &#8230; <a href="http://www.slug.it/naufraghi/postgresql-custom-aggregate-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.postgresql.org/pgdocs/postgres/functions-aggregate.html">Aggregate functions</a> compute a single result from a set of input values. Like <tt>sum()</tt> or <tt>count()</tt> they operate on one or more columns and multiple rows and output a single result.</p>
<p>In PostgreSQL is quite easy to create a <a href="http://developer.postgresql.org/pgdocs/postgres/xaggr.html">custom aggregate function</a>, the ingredients are:</p>
<ul>
<li>Create an aggregate function</li>
<li>Create a state update function</li>
<li>optional: create a final function</li>
</ul>
<p>For example, if we want to implement the <strong>avg</strong> function we can write:</p>
<pre>
CREATE AGGREGATE avg (float8)
(
    sfunc = float8_accum, -- {_count+=1, _sum+=value}
    stype = float8[],
    finalfunc = float8_avg, -- _sum / _count
    initcond = '{0,0}'
);
</pre>
<p>Now we need a bit more complex aggregate function to write&#8230;</p>
<p><a href="http://www.slug.it/naufraghi/ingegneria/postgresql-user-defined-aggregates/">continue&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/postgresql-custom-aggregate-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Human Computation</title>
		<link>http://www.slug.it/naufraghi/human-computation/</link>
		<comments>http://www.slug.it/naufraghi/human-computation/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:19:43 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[scienza]]></category>
		<category><![CDATA[società]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=421</guid>
		<description><![CDATA[Un problema è troppo difficile per un computer? Fallo diventare un gioco! Interessante talk su come convertire problemi complessi in giochi. Conoscevo Google Image Labeller, ma non sapevo ci fosse questo fiorire di giochi con secondi fini!]]></description>
			<content:encoded><![CDATA[<p>Un problema è troppo difficile per un computer? Fallo diventare un gioco!</p>
<p><object id="VideoPlayback" style="width: 400px; height: 326px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://video.google.com/googleplayer.swf?docid=-8246463980976635143&amp;hl=it&amp;fs=true" /><param name="allowfullscreen" value="true" /><embed id="VideoPlayback" style="width: 400px; height: 326px;" type="application/x-shockwave-flash" width="100" height="100" src="http://video.google.com/googleplayer.swf?docid=-8246463980976635143&amp;hl=it&amp;fs=true" allowfullscreen="true"></embed></object></p>
<p>Interessante talk su come convertire problemi complessi in giochi.</p>
<p>Conoscevo <a href="http://images.google.com/imagelabeler/">Google Image Labeller</a>, ma non sapevo ci fosse questo fiorire di giochi con secondi fini!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/human-computation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Caml Trading talk</title>
		<link>http://www.slug.it/naufraghi/caml-trading-talk/</link>
		<comments>http://www.slug.it/naufraghi/caml-trading-talk/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 10:33:02 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[finanza]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[ocaml]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=403</guid>
		<description><![CDATA[Chi gioca sul mercato finanziario? Investitori mettono del denaro a rischio e si attendono un ritorno proporzionato al rischio. il mercato finanziario esiste per loro ruolo non professionale Speculatori cercano di trovare cosa è sottovalutato prima che il mercato se &#8230; <a href="http://www.slug.it/naufraghi/caml-trading-talk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object id="VideoPlayback" style="width: 400px; height: 326px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://video.google.com/googleplayer.swf?docid=-2336889538700185341&amp;hl=en&amp;fs=true" /><param name="allowfullscreen" value="true" /><embed id="VideoPlayback" style="width: 400px; height: 326px;" type="application/x-shockwave-flash" width="100" height="100" src="http://video.google.com/googleplayer.swf?docid=-2336889538700185341&amp;hl=en&amp;fs=true" allowfullscreen="true"></embed></object></p>
<p>Chi gioca sul mercato finanziario?</p>
<ul>
<li><strong>Investitori </strong>
<ul>
<li>mettono del denaro a rischio e si attendono un ritorno proporzionato al rischio.</li>
<li>il mercato finanziario esiste per loro</li>
<li>ruolo non professionale</li>
</ul>
</li>
<li><strong>Speculatori </strong>
<ul>
<li>cercano di trovare cosa è sottovalutato prima che il mercato se ne accorga e lo comprano per riverderlo quando ha il massimo valore.</li>
<li>hanno interesse a prevedere il futuro</li>
<li>ruolo misto tra professionisti e hobbisti</li>
</ul>
</li>
<li><strong>Market Makers </strong>
<ul>
<li>vivono nello spazio tra il prezzo di vendita ed il prezzo di acquisto</li>
<li>un po&#8217; come il negoziante che rivende ciò che ha comprato</li>
<li>non ha particolare interesse a prevedere il futuro, al limite quello a breve termine</li>
<li>ruolo per professionisti</li>
</ul>
</li>
<li><strong>Arbitratori </strong>
<ul>
<li>comprano e vendono quantità (valute, &#8230;) su mercati diversi (America, Europa, Asia, &#8230;)</li>
<li>quando un mercato è poco fluido i suoi prezzi non sono attendibili e i prezzi dei mercati fluidi possono essere usati per fare inferenza sui mercati poco fluidi</li>
<li>le transazioni devono avvenire molto rapidamente</li>
<li>ruolo per professionisti strettamente legato con il ruolo di Market Maker</li>
</ul>
</li>
</ul>
<p>Jane Street lavora come Market Maker &#8211; Arbitratore.</p>
<p>[<em>altre cose che non ho voglia di trascrivere...</em>]</p>
<p>Poi viene presentata la particolare dinamicità dei lori sistemi, costretti ed aggiornarsi in tempo reale alle modifiche continue dei sitemi di Trading con cui si interfacciano per compiere le operazioni sui mercati.<br />
Per questo negli anni tutta la base di codice è via via migrata ad OCaml, che con il controllo statico dei tipi riesce a trovare la maggior parte delle incongruenze al momento della compilazione.</p>
<p>Altro vantaggio di OCaml è il fatto di incentivare uno stile di programmazione funzionale (nessuno usa gli oggetti in OCaml&#8230;), stile che facilita la fattorizzazione di pattern comuni a detta dello speaker molto più dello stile ad oggetti.</p>
<p>Terzo ma non ultimo vantaggio, vantaggio che accomuna un po&#8217; tutti i linguaggi della famiglia ML, la compilazione è rapida e produce codice performante pur senza dover scomodare ottimizzazioni aggressive (che a volte rendono imprevedibile la velocità del codice prodotto anche a seguito di una piccola modifica nel codice).</p>
<p>Vi è poi un vantaggio accessorio e non marginale per una azienda, la possibilità di trovare buoni programmatori da assumere. Il fatto di avere scelto un linguaggio di nicchia li porta a pescare in un paniere di programmatori molto più piccolo anche se spesso la selezione fatta a monte dal linguaggio non è casuale ma predilige programmatori che come minimo hanno avuto l&#8217;interesse a studiare un linguaggio &#8220;strano&#8221;.</p>
<p>In particolare interessante l&#8217;opinione del relatore su OCaml, F# ed i linguaggi funzionali vs ad oggetti, riassunta in un commento qua: <a href="http://ocaml.janestreet.com/?q=node/61#comment-139">Caml Trading talk at CMU</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/caml-trading-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dietro Dive Into Python 3</title>
		<link>http://www.slug.it/naufraghi/dietro-dive-into-python-3/</link>
		<comments>http://www.slug.it/naufraghi/dietro-dive-into-python-3/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 09:04:27 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[società]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=311</guid>
		<description><![CDATA[Oggi ho notato il sito diveintopython3.org. Incuriosito dal footer: This site is optimized for Lynx just because fuck you. I’m told it also looks good in graphical browsers. © 2001-4, 2009 ℳark Pilgrim, CC-BY-3.0 Sono andato a guardare nei sorgenti &#8230; <a href="http://www.slug.it/naufraghi/dietro-dive-into-python-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Oggi ho notato il sito <a href="http://diveintopython3.org/">diveintopython3.org</a>.</p>
<p>Incuriosito dal footer:</p>
<blockquote><p><em>This site is optimized for Lynx just because fuck you.<br />
I’m told it also looks good in graphical browsers.</em><br />
© 2001-4, 2009 <a type="amzn" search="Mark Pilgrim Python">ℳark Pilgrim</a>, CC-BY-3.0</p></blockquote>
<p>Sono andato a guardare nei sorgenti della pagina ed ho trovato questa interessante riflessione:</p>
<div class="codesnip-container" >
<p>&lt;!-<span>-</span> As I write this, the year is 2009, and the internet is STILL a battleground of so-called &#8220;intellectual property&#8221; disputes.  Some people would have you believe that without proper financial incentives, music, literature, and software would disappear.  After all, who would make music if they can&#8217;t make money on it?  Who would write?  Who would program?
</p>
<p>
I know the answer.  The answer is that musicians will make music, not because they can make money, but because musicians are the people who can&#8217;t not make music.  Writers will write because they can&#8217;t not write.  Most of the people you think of as artists are really just showmen.  They collect a paycheck and go home at 5 o&#8217;clock.  That&#8217;s not art, that&#8217;s commerce.
</p>
<p>
I&#8217;ve been programming since 1983 and releasing my code under Free Software licenses since 1993.  I&#8217;ve been writing and publishing under Free Content licenses since 2000.  I can&#8217;t imagine not doing this.  If you can imagine yourself not doing what you&#8217;re doing, do something else.  Do whatever it is you can&#8217;t not do. <span>-</span>-&gt;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/dietro-dive-into-python-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

