<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Equars People  - All</title>
  <id>tag:people.equars.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://people.equars.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://people.equars.com/" rel="alternate" type="text/html"/>
  <updated>2008-10-15T19:05:25Z</updated>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-10-15:173</id>
    <published>2008-10-15T19:00:00Z</published>
    <updated>2008-10-15T19:05:25Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="autum"/>
    <category term="blog"/>
    <category term="boston globe"/>
    <category term="photos"/>
    <link href="http://people.equars.com/2008/10/15/days-of-autumn" rel="alternate" type="text/html"/>
    <title>Days of Autumn</title>
<content type="html">
            &lt;p&gt;My favourite blog right now is &lt;a href=&quot;http://www.boston.com/bigpicture/&quot;&gt;The Boston Globe Big Picture&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.boston.com/bigpicture/2008/10/days_of_autumn.html&quot;&gt;Days of Autumn&lt;/a&gt; is awesome.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-10-08:172</id>
    <published>2008-10-08T10:36:00Z</published>
    <updated>2008-10-08T12:16:04Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="law"/>
    <category term="wireless"/>
    <link href="http://people.equars.com/2008/10/8/wireless-italian-law-2" rel="alternate" type="text/html"/>
    <title>Wireless Italian law</title>
<summary type="html">&lt;p&gt;I copy here the last update of &lt;a href=&quot;http://equars.com&quot;&gt;our&lt;/a&gt; page about the laws regulating wireless networks in Italy, &lt;a href=&quot;http://equars.com/wireless_normativa.html&quot;&gt;&#8220;Wireless: la normativa italiana&#8221;&lt;/a&gt; (italian only, sorry). Take this as  an experiment to test the compliance amongst italian blogs (and company sites!) of the original text  &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;CC License&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I copy here the last update of &lt;a href=&quot;http://equars.com&quot;&gt;our&lt;/a&gt; page about the laws regulating wireless networks in Italy, &lt;a href=&quot;http://equars.com/wireless_normativa.html&quot;&gt;&#8220;Wireless: la normativa italiana&#8221;&lt;/a&gt; (italian only, sorry). Take this as  an experiment to test the compliance amongst italian blogs (and company sites!) of the original text  &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;CC License&lt;/a&gt;.&lt;/p&gt;
&lt;ul class=&quot;pageindex&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;#norm2001&quot;&gt;Dal 2001 al luglio 2005&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#normpisanu&quot;&gt;Il decreto Pisanu (27 luglio 2005)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#normwifi&quot;&gt;Il decreto Landolfi (4 ottobre 2005)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#normwifi2&quot;&gt;Il decreto legge n. 248 (27 dicembre 2007)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#direu&quot;&gt;La direttiva europea 2006/24/CE (15 marzo 2006)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#normwifi3&quot;&gt;Il decreto legislativo n. 109 (30 maggio 2008)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#pot&quot;&gt;I limiti di potenza attuali&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Normativa dal 2001 al luglio 2005&lt;/h3&gt;

&lt;p&gt;
Fino al 2001 il riferimento legislativo per l&#8217;utilizzo di apparecchiature 
operanti nelle bande di frequenza [2,4 - 2,4835] GHz (comunemente detta banda a
2.4 GHz), [5,15 - 5,350] GHz e [5,47 - 5,725] GHz (comunemente dette bande a
5 GHz), utilizzate per la trasmissione 
wireless LAN, era dato dal DPR 447 del 5 Ottobre 2001. 
Il decreto stabiliva che tali frequenze potessero essere impiegate solo 
nell&#8217;ambito di LAN ad uso privato, mentre per connettere una WLAN alla 
rete pubblica occorreva un&#8217;autorizzazione generale del Ministero nonch&amp;eacute; 
il pagamento di un canone.
&lt;/p&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Decreto del Presidente della Repubblica n. 447 del 05 Ottobre 2001,&lt;br /&gt;
&lt;em&gt;Regolamento recante disposizioni in materia di licenze individuali 
e di autorizzazioni generali per i servizi di telecomunicazioni 
ad uso privato&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.ipzs.it/Pubblicazioni_ministeri/Min_comunicazioni/Bollettino/pdf/2002/02_2002/02_2002_3s/02_2002_3s.pdf&quot;&gt;http://www.ipzs.it/Pubblicazioni_ministeri/  [ &#8230; ] /02_2002_3s.pdf&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;
A partire dal gennaio 2002, il regolamento di attuazione dello stesso DPR 447
del 5 Ottobre 2001 consente l&#8217;utilizzo di dispositivi di WLAN che operano sulle
bande di frequenza appositamente assegnate, senza pi&amp;ugrave; la necessit&amp;agrave; di 
richiedere alcuna concessione.
&lt;br /&gt;
Il quadro regolamentare definitivo per l&#8217;utilizzo della tecnologia Wi-Fi 
&lt;em&gt;in ambito pubblico&lt;/em&gt; &amp;egrave; dato però dal cosiddetto &lt;em&gt;decreto Gasparri&lt;/em&gt;
del 28 Maggio 2003, che regola le condizioni per il rilascio delle 
autorizzazioni generali per la fornitura al pubblico dell&#8217;accesso 
Radio-LAN alle reti ed ai servizi di telecomunicazioni.
&lt;/p&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Decreto Gasparri 28 Maggio 2003,&lt;br /&gt;
&lt;em&gt;Regolamentazione dei servizi Wi-fi ad uso pubblico&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.comunicazioni.it/binary/min_comunicazioni/cittadini/DM_2003_05_28.pdf&quot;&gt;http://www.comunicazioni.it/ [ &#8230; ] / DM_2003_05_28.pdf&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt; 
La delibera dell&#8217;Autorit&amp;agrave; per le Garanzie nelle Comunicazioni
(num. 102/03/CONS) precisa che non &amp;egrave; necessario disporre di
licenza o autorizzazione per l&#8217;erogazione di servizi di connettivit&amp;agrave;
di rete nel caso l&#8217;attivit&amp;agrave; commerciale non abbia come oggetto sociale
principale l&#8217;attivit&amp;agrave; di telecomunicazioni (es. bar, alberghi, centri
commerciali) 
&lt;/p&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Delibera n. 102/03/CONS,&lt;br /&gt;
&lt;em&gt;Disposizioni regolamentari in materia di autorizzazioni generali&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.agcom.it/provv/d_102_03_CONS.htm&quot;&gt;http://www.agcom.it/provv/d_102_03_CONS.htm&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Il Decreto Pisanu (luglio 2005)&lt;/h3&gt;

&lt;p&gt;
Con il decreto &lt;em&gt;&#8220;Misure urgenti per il contrasto del terrorismo
internazionale&#8221;&lt;/em&gt;, noto come decreto Pisanu, del 27 luglio 2005, 
(modificato con la legge 31 luglio 2005, n. 155) alcune
delle norme citate precedentemente sono state variate.
Le norme si
applicano ai fornitori di una rete pubblica di comunicazioni o di un
servizio di comunicazione elettronica accessibile al pubblico. 
In particolare: 

&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;L&#8217;articolo 6, comma 1, impone la non cancellazione di tutti i dati
relativi al traffico telematico, escluso il contenuto
delle comunicazione e &lt;b&gt;limitatamente alle informazioni che consentono la
tracciabilit&amp;agrave; degli accessi e dei servizi&lt;/b&gt;.
&lt;/li&gt;

&lt;li&gt;L&#8217;articolo 6, comma 3, modifica alcuni articoli del Decreto Legislativo
30 giugno 2003, n. 196 (&lt;em&gt;&#8220;Codice in materia di protezione dei dati
personali&#8221;&lt;/em&gt;) e stabilisce che i dati relativi alle telecomunicazioni
telematiche devono essere essere conservati per sei mesi e poi per
ulteriori sei mesi.
&lt;/li&gt;

&lt;li&gt;L&#8217;articolo 7 invalida la delibera dell&#8217;Autorit&amp;agrave; per le Garanzie nelle
Comunicazioni (num. 102/03/CONS), indicando che &amp;egrave; necessario richiedere
un&#8217;autorizzazione al questore per chi mette a disposizione terminali
telematici. L&#8217;autorizzazione va richiesta per chi ne fa attivit&amp;agrave;
prevalente o esclusiva, o per chi ha pi&amp;ugrave; di 3 terminali installati.
Inoltre richiede la &lt;em&gt;&#8220;preventiva acquisizione di dati anagrafici riportati
su un documento di identit&amp;agrave; dei soggetti che utilizzano postazioni
pubbliche non vigilate per comunicazioni telematiche ovvero punti di
accesso ad Internet utilizzando tecnologia senza fili&#8221;&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Decreto Legge   27 luglio 2005, n.144,&lt;br /&gt;
&lt;em&gt;Misure urgenti per il contrasto del terrorismo internazionale&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.comunicazioni.it/binary/min_comunicazioni/normativa/DL_144_2005_07_27.pdf&quot;&gt;http://www.comunicazioni.it/ [ &#8230; ] /DL_144_2005_07_27.pdf&lt;/a&gt;
&lt;/div&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Legge 31 luglio 2005, n. 155,&lt;br /&gt;
&lt;em&gt;Conversione in legge, con modificazioni, del decreto-legge 27
luglio 2005, n. 144, recante misure urgenti per il contrasto del
terrorismo internazionale&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.parlamento.it/leggi/05155l.htm&quot;&gt;http://www.parlamento.it/leggi/05155l.htm&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;
Il sucessivo decreto attuativo fissa in modo rigido le modalit&amp;agrave;
di acquisizione dei dati anagrafici dei soggetti utilizzatori; in particolare
vengono richieste:
&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt; l&#8217;acquisizione dei dati riportati su un documento di identit&amp;agrave;, 
    &#8221;&lt;em&gt;nonch&amp;eacute; il tipo, il numero e la riproduzione del 
    documento presentato dall&#8217;utente&lt;/em&gt;&#8221;;
  &lt;/li&gt;
  &lt;li&gt; la raccolta e l&#8217;archiviazione di tali dati &#8221;&lt;em&gt;con modalita&#8217; informatiche&lt;/em&gt;&#8221;
    (l&#8217;archiviazione cartacea &amp;egrave; possibile solo in presenza di non pi&amp;ugrave;
    di tre terminali);
  &lt;/li&gt;
  &lt;li&gt;
la validit&amp;agrave; massima di 12 mesi, dall&#8217;ultima operazione di
identificazione, per gli abbonamenti, forniti anche mediante
credenziali di accesso prepagate o gratuite, nel caso che il fornitore
renda disponibili apparecchi terminali collocati in aree non vigilate; &lt;/li&gt;
  &lt;li&gt; la conservazione dei dati stessi fino al 31 dicembre 2007;&lt;/li&gt;
  &lt;li&gt;
lo stesso obbligo di identificazione imposto ai titolari o gestori di
un esercizio pubblico o di un circolo privato che mettono a
disposizione di clienti o soci apparecchi terminali, ai soggetti che
offrono accesso alle reti telematiche utilizzando tecnologia senza fili
in aree messe a disposizione del pubblico &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Decreto del Ministero dell&#8217;Interno del 16 agosto 2005,&lt;br /&gt;
&lt;em&gt;Misure di preventiva acquisizione di dati anagrafici dei soggetti
che utilizzano postazioni pubbliche non vigilate per comunicazioni
telematiche ovvero punti di accesso ad Internet utilizzando tecnologia
senza fili [&#8230;]&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.interno.it/mininterno/export/sites/default/it/sezioni/servizi/legislazione/sicurezza/legislazione_650.html&quot;&gt;http://www.interno.it/ [ &#8230; ] /legislazione_650.html&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Il Decreto Landolfi (ottobre 2005)&lt;/h3&gt;

&lt;p&gt;Il decreto del Ministero delle Comunicazioni
liberalizza l&#8217;erogazione di servizi Wi-Fi nel territorio
nazionale, modificando il precedente &lt;em&gt;decreto Gasparri 28 Maggio 2003&lt;/em&gt;.
In particolare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
L&#8217;articolo 1 liberalizza il servizio su tutto il territorio nazionale,
eliminando l&#8217;obbligo di fornire il servizio in aree a frequentazione pubblica
o locali aperti al pubblico.
&lt;/li&gt;

&lt;li&gt;
L&#8217;articolo 2 obbliga i soggetti autorizzati a consentire l&#8217;accesso
indipentemente dalla tecnologia utilizzati, favorendo di fatto gli
accordi di roaming tra
operatori diversi.
&lt;br /&gt;
Inoltre questo articolo si introduce il cosiddetto &lt;em&gt;&#8220;Diritto d&#8217;antenna&#8221;&lt;/em&gt;:
l&#8217;installazione di apparati e antenne deve essere garantita a condizioni
&lt;em&gt;&#8220;eque, trasparenti e non discriminatorie&#8221;&lt;/em&gt;. Non ci potranno essere
quindi installazioni di apparati in esclusiva per alcuni operatori.
&lt;/li&gt;


&lt;li&gt;
L&#8217;articolo 3 indica in 60 giorni il termine della sperimentazione per i
soggetti che stanno gi&amp;agrave; fornendo un servizio in maniera sperimentale.
&lt;/li&gt;

&lt;li&gt;
L&#8217;articolo 4, riprendendo il &lt;em&gt;decreto legislativo 1 agosto 2003 n. 259&lt;/em&gt;,
mantiene il regime di autorizzazione generale per i soggetti che
vogliono
fornire servizi radiolan. Tale autorizzazione &amp;egrave; da richiedere alla
Direzione generale per i servizi di comunicazione elettronica e
radiodiffusione
del Ministero delle Comunicazioni.
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt; Decreto Landolfi 4 ottobre 2005,&lt;br /&gt;
&lt;em&gt;Decreto sul Wi-Fi&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.comunicazioni.it/binary/min_comunicazioni/internet_wifi/Dec4oct05WIFI.htm&quot;&gt;http://www.comunicazioni.it/ [ &#8230; ] /Dec4oct05WIFI.htm&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Il Decreto Legge n. 248 (dicembre 2007)&lt;/h3&gt;

&lt;p&gt;Il decreto legge n. 248, &lt;em&gt;&#8220;Proroga di termini previsti da disposizioni legislative e disposizioni urgenti in materia finanziaria&#8221;&lt;/em&gt;, del 28 dicembre 2007, pubblicato sulla Gazzetta Ufficiale n. 302 del 31 dicembre 2007 (successivamente modificato dalla legge n. 31/08 del 27 febbraio 2008) modifica il &lt;a href=&quot;#normpisanu&quot;&gt;decreto Pisanu&lt;/a&gt; del 27 luglio 2005, prorogandone i termini. In particolare:&lt;/p&gt;

&lt;ul&gt;
   &lt;li&gt; L&#8217;articolo 34 modifica gli articoli 6 e 7 del citato &lt;a href=&quot;#normpisanu&quot;&gt;decreto Pisanu&lt;/a&gt;, postponendo il termine per la conservazione dei dati alla data di approvazione della &lt;a href=&quot;#&amp;quot;direu&amp;quot;&quot;&gt; direttiva europea 2006/24/CE &lt;/a&gt; e comunque non oltre il 31 dicembre 2008; il termine per la richiesta della licenza al questore &amp;egrave; posticipato al 31 dicembre 2008.
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt; Decreto Legge n. 248 28 dicembre 2007,&lt;br /&gt;
&lt;em&gt; Proroga di termini previsti da disposizioni legislative e disposizioni urgenti in materia finanziaria.&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.governo.it/Governo/Provvedimenti/dettaglio.asp?d=37921&quot;&gt;
http://www.governo.it/Governo/Provvedimenti/dettaglio.asp?d=37921&lt;/a&gt;
&lt;/div&gt;

&lt;div class=&quot;figure smalltext&quot;&gt;
Legge 27 febbraio 2008, n. 31,&lt;br /&gt;
&lt;em&gt;
Conversione in legge, con modificazioni, del decreto-legge 31 dicembre 2007, n. 248, recante proroga di termini previsti da disposizioni legislative e disposizioni urgenti in materia finanziaria
&lt;/em&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.parlamento.it/parlam/leggi/08031l.htm&quot;&gt;http://www.parlamento.it/parlam/leggi/08031l.htm&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;La Direttiva Europea 2006/24/CE (15 marzo 2006)&lt;/h3&gt;

&lt;p&gt;La direttiva europea 2006/24/CE, &lt;em&gt;&#8220;riguardante la conservazione di dati generati o trattati nell&#8217;ambito di fornitura di servizi di comunicazione elettronica accessibili al pubblico o di reti pubbliche di comunicazione&#8221;&lt;/em&gt;, del 15 marzo 2006, pubblicato sulla &lt;a href=&quot;http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2006:105:0054:0063:IT:PDF&quot;&gt;Gazzetta Ufficiale dell&#8217;Unione Europea n. L 105/54 del 13 aprile 2006&lt;/a&gt; chiarifica i dati oggetto del trattamento e i relativi termini di conservazione. In particolare:&lt;/p&gt;

&lt;ul&gt;
   &lt;li&gt; L&#8217;articolo 5 indica quali sono i dati da conservare per l&#8217;accesso Internet, la posta elettronica via Internet e la telefonia via Internet, ovvero
     &lt;ul&gt;
      &lt;li&gt; data e ora del log-in e del log-off del servizio di
        accesso Internet sulla base di un determinato fuso
        orario, unitamente all&#8217;indirizzo IP, dinamico o statico, assegnato dal fornitore di accesso Internet a
        una comunicazione e l&#8217;identificativo dell&#8217;abbonato o
        dell&#8217;utente registrato;
      &lt;/li&gt;
      &lt;li&gt;
      data e ora del log-in e del log-off del servizio di  posta elettronica
      su Internet o del servizio di telefonia via Internet sulla base di
      un determinato fuso orario.
      &lt;/li&gt;
     &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt; L&#8217;articolo 6 indica che il periodo di conservazione dei dati non deve
  essere inferiore a 6 mesi e superiore a 2 anni.
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt; Direttiva Europea 2006/24/CE 15 marzo 2006,&lt;br /&gt;
&lt;em&gt;riguardante la conservazione di dati generati o trattati nell&#8217;ambito della fornitura di servizi di comunicazione elettronica accessibili al pubblico o di reti pubbliche di comunicazione.&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2006:105:0054:0063:IT:PDF&quot;&gt;
http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2006:105:0054:0063:IT:PDF&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Il Decreto Legislativo n. 109 (30 maggio 2008)&lt;/h3&gt;

&lt;p&gt;Il decreto legislativo n. 109, &lt;em&gt;&#8220;Attuazione della direttiva 2006/24/CE riguardante la conservazione dei dati generati o trattati nell&#8217;ambito della fornitura di servizi di comunicazione elettronica accessibili al pubblico o di reti pubbliche di comunicazione e che modifica la direttiva 2002/58/CE&#8221;&lt;/em&gt;, 
del 30 maggio 2008, pubblicato sulla Gazzetta Ufficiale n. 141 del 18 giugno 2008 attua la  &lt;a href=&quot;#direu&quot;&gt;direttiva  europea 2006/24/CE&lt;/a&gt; del 15 marzo 2006. In particolare:&lt;/p&gt;

&lt;ul&gt;
   &lt;li&gt; L&#8217;articolo 2 modifica l&#8217;articolo 132  del &lt;em&gt;&#8220;Codice in materia di protezione dei dati personali&lt;/em&gt;, prevedendo un periodo di 12 mesi per  la conservazione dei dati di tipo telematico.
  &lt;/li&gt;
  &lt;li&gt; L&#8217;articolo 3 indica la categoria di dati da conservare. Per quanto riguarda i dati di traffico telematico, le categorie di dati sono:
    &lt;ul&gt;   
       &lt;li&gt;nome e indirizzo dell&#8217;abbonato o dell&#8217;utente registrato a cui &amp;egrave; stato assegnato univocamente un indirizzo IP; &lt;/li&gt;
       &lt;li&gt;indirizzo IP utilizzato e indirizzo di posta elettronica identificativi del mittente e indirizzo IP e nome a dominio pienamente qualificato del mail exchanger host, per l&#8217;invio della posta elettronica; &lt;/li&gt;
       &lt;li&gt; indirizzo IP utilizzato, numero telefonico e dati anagrafici identificativi del mittente, nel caso di servizi di telefonia via Internet.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;figure smalltext&quot;&gt; Decreto Legislativo n. 109 30 maggio 2008,&lt;br /&gt;
&lt;em&gt; Attuazione della direttiva 2006/24/CE riguardante la conservazione dei dati generati o trattati nell&#8217;ambito della fornitura di servizi di comunicazione elettronica accessibili al pubblico o di reti pubbliche di comunicazione e che modifica la direttiva 2002/58/CE.&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.parlamento.it/leggi/deleghe/08109dl.htm&quot;&gt;
http://www.parlamento.it/leggi/deleghe/08109dl.htm&lt;/a&gt;
&lt;/div&gt;

&lt;div class=&quot;figure smalltext&quot;&gt; Decreto Legislativo n. 196 30 giugno 2003,&lt;br /&gt;
&lt;em&gt; Codice in materia di protezione dei dati personali.&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.parlamento.it/leggi/deleghe/03196dl.htm&quot;&gt;
http://www.parlamento.it/leggi/deleghe/03196dl.htm&lt;/a&gt;
&lt;/div&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-09-01:169</id>
    <published>2008-09-01T22:17:00Z</published>
    <updated>2008-09-18T22:19:07Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="lenovo"/>
    <category term="sony"/>
    <link href="http://people.equars.com/2008/9/1/lenovo-thinkpad-laptop-rocks" rel="alternate" type="text/html"/>
    <title>Lenovo Thinkpad Laptop Rocks.</title>
<content type="html">
            &lt;p&gt;My &lt;a href=&quot;http://people.equars.com/~marco/vaio.html&quot;&gt;previous laptop&lt;/a&gt; collapsed: in the last few days both the wireless interface and the touchpad stopped working. The disk showed a few bad blocks and the bios had some quirks, while the cdrom stopped working a few months ago. At the end, this laptop it was not worth the money I paid for it, for the overall quality was in the low/medium end, and the price was in the very high end. I don’t think I will ever buy again a Vaio laptop.&lt;/p&gt;

&lt;p&gt;Now I’m the happy owner of a Lenovo T61; its quality is an order of magnitude better than the Vaio one. The keyboard has a very good feeling, and it’s by far the best laptop keyboard I’ve ever used. The construction is very solid, everything works with Gnu/Linux with little effort, and last but non least I’ve just paid for it now less € than I paid for the Vaio one year and a half ago. I recommend Lenovo if you want a business laptop.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-07-02:168</id>
    <published>2008-07-02T22:13:00Z</published>
    <updated>2008-09-18T22:19:18Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="matrix factorization"/>
    <category term="ruby"/>
    <link href="http://people.equars.com/2008/7/2/non-negative-matrix-factorization" rel="alternate" type="text/html"/>
    <title>Non-negative Matrix Factorization</title>
<content type="html">
            &lt;p&gt;Here it is a small ruby script that calculate the &lt;a href=&quot;http://en.wikipedia.org/wiki/NMF&quot;&gt;non-negative matrix factorization&lt;/a&gt; of a given matrix. I tried to mantain the notation consistent with the one used in the paper of &lt;a href=&quot;http://hebb.mit.edu/people/seung/papers/nmfconverge.pdf&quot;&gt;Lee and Seung&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The script requires the &lt;a href=&quot;http://rb-gsl.rubyforge.org/&quot;&gt;GSL&lt;/a&gt; library.&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;44&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;45&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;46&lt;tt&gt;
&lt;/tt&gt;47&lt;tt&gt;
&lt;/tt&gt;48&lt;tt&gt;
&lt;/tt&gt;49&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;50&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;51&lt;tt&gt;
&lt;/tt&gt;52&lt;tt&gt;
&lt;/tt&gt;53&lt;tt&gt;
&lt;/tt&gt;54&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;55&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;56&lt;tt&gt;
&lt;/tt&gt;57&lt;tt&gt;
&lt;/tt&gt;58&lt;tt&gt;
&lt;/tt&gt;59&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;60&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;61&lt;tt&gt;
&lt;/tt&gt;62&lt;tt&gt;
&lt;/tt&gt;63&lt;tt&gt;
&lt;/tt&gt;64&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;65&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;66&lt;tt&gt;
&lt;/tt&gt;67&lt;tt&gt;
&lt;/tt&gt;68&lt;tt&gt;
&lt;/tt&gt;69&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;70&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;71&lt;tt&gt;
&lt;/tt&gt;72&lt;tt&gt;
&lt;/tt&gt;73&lt;tt&gt;
&lt;/tt&gt;74&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;75&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;76&lt;tt&gt;
&lt;/tt&gt;77&lt;tt&gt;
&lt;/tt&gt;78&lt;tt&gt;
&lt;/tt&gt;79&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;80&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;81&lt;tt&gt;
&lt;/tt&gt;82&lt;tt&gt;
&lt;/tt&gt;83&lt;tt&gt;
&lt;/tt&gt;84&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;85&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;86&lt;tt&gt;
&lt;/tt&gt;87&lt;tt&gt;
&lt;/tt&gt;88&lt;tt&gt;
&lt;/tt&gt;89&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;90&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;91&lt;tt&gt;
&lt;/tt&gt;92&lt;tt&gt;
&lt;/tt&gt;93&lt;tt&gt;
&lt;/tt&gt;94&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;95&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;96&lt;tt&gt;
&lt;/tt&gt;97&lt;tt&gt;
&lt;/tt&gt;98&lt;tt&gt;
&lt;/tt&gt;99&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;100&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;101&lt;tt&gt;
&lt;/tt&gt;102&lt;tt&gt;
&lt;/tt&gt;103&lt;tt&gt;
&lt;/tt&gt;104&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;105&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;106&lt;tt&gt;
&lt;/tt&gt;107&lt;tt&gt;
&lt;/tt&gt;108&lt;tt&gt;
&lt;/tt&gt;109&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;110&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;111&lt;tt&gt;
&lt;/tt&gt;112&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;require(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;gsl&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;nmf&lt;/span&gt;(v, col, thresh)&lt;tt&gt;
&lt;/tt&gt;   r, c = v.shape&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# w * h = v&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   w = &lt;span class=&quot;co&quot;&gt;GSL&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Matrix&lt;/span&gt;.alloc(r, col)&lt;tt&gt;
&lt;/tt&gt;   h = &lt;span class=&quot;co&quot;&gt;GSL&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Matrix&lt;/span&gt;.alloc(col, c)&lt;tt&gt;
&lt;/tt&gt;   initrand(w, w.max)&lt;tt&gt;
&lt;/tt&gt;   initrand(h, h.max)&lt;tt&gt;
&lt;/tt&gt;   dist = thresh&lt;tt&gt;
&lt;/tt&gt;   iter = &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;while&lt;/span&gt;(dist &amp;gt;= thresh &amp;amp;&amp;amp; iter &amp;lt; &lt;span class=&quot;i&quot;&gt;1000&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;c&quot;&gt;# multiplicative update rule&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      dist, w, h = update(v, w, h)&lt;tt&gt;
&lt;/tt&gt;      puts &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;iter&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;dist&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#if (iter%10 == 0)&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      iter += &lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;   &lt;tt&gt;
&lt;/tt&gt;   puts &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;Ended in &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;iter&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; iteration(s) with dist=&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;dist&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; w, h&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;initrand&lt;/span&gt;(m, max)&lt;tt&gt;
&lt;/tt&gt;   r, c = m.shape&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(r&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |i|&lt;tt&gt;
&lt;/tt&gt;       &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(c&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |j|&lt;tt&gt;
&lt;/tt&gt;          m[i,j] = rand(max)&lt;tt&gt;
&lt;/tt&gt;       }&lt;tt&gt;
&lt;/tt&gt;   }&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;update&lt;/span&gt;(v, w, h)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# choose an update rule&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# v, w, h are GSL::Matrix objects&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   dist, w, h = update_eu(v, w, h)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; dist, w, h&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;update_eu&lt;/span&gt;(v, w, h)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# multiplicative update rule&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# for minimizing euclidean distance&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# v, w, h are GSL::Matrix objects&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   dist = dist_eu(v, w*h)&lt;tt&gt;
&lt;/tt&gt;   wt = w.transpose&lt;tt&gt;
&lt;/tt&gt;   ht =  h.transpose&lt;tt&gt;
&lt;/tt&gt;   h = h.mul_elements(wt * v).div_elements(wt * w * h)&lt;tt&gt;
&lt;/tt&gt;   w = w.mul_elements(v * ht).div_elements(w * h * ht)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; dist, w, h&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;update_kl&lt;/span&gt;(v, w, h)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# multiplicative update rule&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# for minimizing divergence&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# v, w, h are GSL::Matrix objects&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   dist = dist_kl(v, w*h)&lt;tt&gt;
&lt;/tt&gt;   wt = w.transpose&lt;tt&gt;
&lt;/tt&gt;   ht =  h.transpose&lt;tt&gt;
&lt;/tt&gt;   num = v.div_elements(w * h)&lt;tt&gt;
&lt;/tt&gt;   rh, ch = h.shape&lt;tt&gt;
&lt;/tt&gt;   rw, cw = w.shape&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(rh&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |i|&lt;tt&gt;
&lt;/tt&gt;       &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(ch&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |j|&lt;tt&gt;
&lt;/tt&gt;          h[i, j] *= w.col(i).mul(num.col(j)).sum / w.col(i).sum&lt;tt&gt;
&lt;/tt&gt;       }&lt;tt&gt;
&lt;/tt&gt;   }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(rw&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |i|&lt;tt&gt;
&lt;/tt&gt;       &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(cw&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |j|&lt;tt&gt;
&lt;/tt&gt;          w[i, j] *= h.row(j).mul(num.row(i)).sum / h.row(j).sum&lt;tt&gt;
&lt;/tt&gt;       }&lt;tt&gt;
&lt;/tt&gt;   }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; dist, w, h&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Euclidean distance&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;dist_eu&lt;/span&gt;(a, b)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# a,b are GSL::Matrix objects&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   dist = &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   (a-b).collect { |d| dist += d * d}&lt;tt&gt;
&lt;/tt&gt;   dist&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Kullback-Leibler divergence&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;dist_kl&lt;/span&gt;(a, b)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# a, b are GSL::Matrix objects&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   dist = &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   r, c = a.shape&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(r&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |i|&lt;tt&gt;
&lt;/tt&gt;       &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;.upto(c&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;) { |j|&lt;tt&gt;
&lt;/tt&gt;          &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; (b[i,j] == &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;) &lt;tt&gt;
&lt;/tt&gt;             puts &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;             dist = &lt;span class=&quot;i&quot;&gt;2&lt;/span&gt;**&lt;span class=&quot;i&quot;&gt;32&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;             &lt;span class=&quot;r&quot;&gt;break&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;          &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;          dist += a[i,j] * &lt;span class=&quot;co&quot;&gt;Math&lt;/span&gt;::log(a[i,j]/b[i,j]) - a[i,j] + b[i,j]&lt;tt&gt;
&lt;/tt&gt;       }&lt;tt&gt;
&lt;/tt&gt;   }&lt;tt&gt;
&lt;/tt&gt;   dist&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-07-01:167</id>
    <published>2008-07-01T22:10:00Z</published>
    <updated>2008-09-18T22:29:36Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="data correlation"/>
    <category term="ruby"/>
    <category term="tanimoto"/>
    <link href="http://people.equars.com/2008/7/1/tanimoto-coefficient" rel="alternate" type="text/html"/>
    <title>Tanimoto Coefficient</title>
<content type="html">
            &lt;p&gt;A small Ruby snippet to calculate the &lt;a href=&quot;http://en.wikipedia.org/wiki/Jaccard_index&quot;&gt;Tanimoto&lt;/a&gt; coefficient (aka extended Jaccard coefficient) of two real vectors.&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;Array&lt;/span&gt; &lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sum&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      inject( &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt; ) { |sum,x| sum+x }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sum_square&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      inject( &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt; ) { |sum,x| sum+x*x }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;*&lt;/span&gt;(other) &lt;span class=&quot;c&quot;&gt;# dot_product&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      ret = []&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;pc&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; !other.is_a? &lt;span class=&quot;co&quot;&gt;Array&lt;/span&gt; || size != other.size&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;pc&quot;&gt;self&lt;/span&gt;.each_with_index {|x, i| ret &amp;lt;&amp;lt; x * other[i]}&lt;tt&gt;
&lt;/tt&gt;      ret.sum&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;tanimoto&lt;/span&gt;(a, b)&lt;tt&gt;
&lt;/tt&gt;   dot = (a * b)&lt;tt&gt;
&lt;/tt&gt;   den = a.sum_square + b.sum_square - dot&lt;tt&gt;
&lt;/tt&gt;   dot.to_f/den.to_f&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# puts tanimoto([1,2,2],[3,3,1])&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-06-30:166</id>
    <published>2008-06-30T22:13:00Z</published>
    <updated>2008-09-25T11:26:55Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="data correlation"/>
    <category term="pearson"/>
    <category term="ruby"/>
    <link href="http://people.equars.com/2008/6/30/pearson-correlation-coefficient" rel="alternate" type="text/html"/>
    <title>Pearson Correlation Coefficient</title>
<content type="html">
            &lt;p&gt;A small Ruby snippet to calculate the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient&quot;&gt;Pearson produt-moment correlation coefficient&lt;/a&gt;:&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;Array&lt;/span&gt; &lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sum&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      inject( &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt; ) { |sum,x| sum+x }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sum_square&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      inject( &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt; ) { |sum,x| sum+x*x }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;mean&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      sum / size&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;*&lt;/span&gt;(other) &lt;span class=&quot;c&quot;&gt;# dot product&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      ret = []&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;pc&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; !other.is_a? &lt;span class=&quot;co&quot;&gt;Array&lt;/span&gt; || size != other.size&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;pc&quot;&gt;self&lt;/span&gt;.each_with_index {|x, i| ret &amp;lt;&amp;lt; x * other[i]}&lt;tt&gt;
&lt;/tt&gt;      ret.sum&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;x = &lt;span class=&quot;co&quot;&gt;Array&lt;/span&gt;.new(&lt;span class=&quot;i&quot;&gt;100&lt;/span&gt;) {|i| i }&lt;tt&gt;
&lt;/tt&gt;y = &lt;span class=&quot;co&quot;&gt;Array&lt;/span&gt;.new(&lt;span class=&quot;i&quot;&gt;100&lt;/span&gt;) {|i| -i*&lt;span class=&quot;i&quot;&gt;2&lt;/span&gt; }&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;sumx = x.sum&lt;tt&gt;
&lt;/tt&gt;sumy  = y.sum&lt;tt&gt;
&lt;/tt&gt;num = (x.size * (x*y)) - (sumx * sumy)&lt;tt&gt;
&lt;/tt&gt;den = &lt;span class=&quot;co&quot;&gt;Math&lt;/span&gt;.sqrt((x.size * x.sum_square) - sumx * sumx) * &lt;span class=&quot;co&quot;&gt;Math&lt;/span&gt;.sqrt((y.size * y.sum_square) - sumy * sumy)&lt;tt&gt;
&lt;/tt&gt;r = num &lt;span class=&quot;rx&quot;&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;den&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;puts &amp;quot;X= [&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;x.join(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;]&amp;quot;&lt;tt&gt;
&lt;/tt&gt;puts &amp;quot;Y= [&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;y.join(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;]&amp;quot;&lt;tt&gt;
&lt;/tt&gt;puts &amp;quot;r= &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;r&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;&amp;quot;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-06-18:165</id>
    <published>2008-06-18T21:56:00Z</published>
    <updated>2008-09-18T21:58:46Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="riemann hypothesis"/>
    <category term="zeta function"/>
    <link href="http://people.equars.com/2008/6/18/s" rel="alternate" type="text/html"/>
    <title>&#950;(s)</title>
<content type="html">
            &lt;p&gt;Such a terse and strong abstract, and a really short  &lt;a href=&quot;http://arxiv.org/abs/0806.2361&quot;&gt;paper&lt;/a&gt;, for an hypothesis that lasts unproved for a century. We shall see if the proof is correct. &lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-05-22:163</id>
    <published>2008-05-22T15:51:00Z</published>
    <updated>2008-05-23T08:20:46Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="erlang"/>
    <category term="fiber"/>
    <category term="ruby"/>
    <link href="http://people.equars.com/2008/5/22/ruby-fiber-ring-benchmark" rel="alternate" type="text/html"/>
    <title>Ruby Fiber Ring Benchmark</title>
<content type="html">
            &lt;p&gt;I stole an exercise from the &lt;a href=&quot;http://en.wikipedia.org/wiki/Erlang_%28programming_language%29&quot;&gt;Erlang&lt;/a&gt; world: the &lt;a href=&quot;http://people.equars.com/2008/5/22/erlang-ring-benchmark&quot;&gt;ring benchmark&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used the exercise as a way to get acquainted with a new class in Ruby, &lt;a href=&quot;http://pragdave.blogs.pragprog.com/pragdave/2007/12/pipelines-using.html&quot;&gt;Fiber&lt;/a&gt; (starting from the version 1.9). &lt;a href=&quot;http://en.wikipedia.org/wiki/Fiber_%28computer_science%29&quot;&gt;Fibers&lt;/a&gt; are a way to implement asymmetric &lt;a href=&quot;http://en.wikipedia.org/wiki/Coroutine&quot;&gt;coroutines&lt;/a&gt; in Ruby, &lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;25&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;35&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;44&lt;tt&gt;
&lt;/tt&gt;45&lt;tt&gt;
&lt;/tt&gt;46&lt;tt&gt;
&lt;/tt&gt;47&lt;tt&gt;
&lt;/tt&gt;48&lt;tt&gt;
&lt;/tt&gt;49&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;50&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;51&lt;tt&gt;
&lt;/tt&gt;52&lt;tt&gt;
&lt;/tt&gt;53&lt;tt&gt;
&lt;/tt&gt;54&lt;tt&gt;
&lt;/tt&gt;55&lt;tt&gt;
&lt;/tt&gt;56&lt;tt&gt;
&lt;/tt&gt;57&lt;tt&gt;
&lt;/tt&gt;58&lt;tt&gt;
&lt;/tt&gt;59&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;60&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;61&lt;tt&gt;
&lt;/tt&gt;62&lt;tt&gt;
&lt;/tt&gt;63&lt;tt&gt;
&lt;/tt&gt;64&lt;tt&gt;
&lt;/tt&gt;65&lt;tt&gt;
&lt;/tt&gt;66&lt;tt&gt;
&lt;/tt&gt;67&lt;tt&gt;
&lt;/tt&gt;68&lt;tt&gt;
&lt;/tt&gt;69&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;70&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;71&lt;tt&gt;
&lt;/tt&gt;72&lt;tt&gt;
&lt;/tt&gt;73&lt;tt&gt;
&lt;/tt&gt;74&lt;tt&gt;
&lt;/tt&gt;75&lt;tt&gt;
&lt;/tt&gt;76&lt;tt&gt;
&lt;/tt&gt;77&lt;tt&gt;
&lt;/tt&gt;78&lt;tt&gt;
&lt;/tt&gt;79&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;80&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;81&lt;tt&gt;
&lt;/tt&gt;82&lt;tt&gt;
&lt;/tt&gt;83&lt;tt&gt;
&lt;/tt&gt;84&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/ruby1.9&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;fiber&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;benchmark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;Ring&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   attr_reader &lt;span class=&quot;sy&quot;&gt;:id&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   attr_accessor &lt;span class=&quot;sy&quot;&gt;:attach&lt;/span&gt; &lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;initialize&lt;/span&gt;(id)&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@id&lt;/span&gt; = id&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@fiber&lt;/span&gt; = &lt;span class=&quot;co&quot;&gt;Fiber&lt;/span&gt;.new &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;         pass_message&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;|&lt;/span&gt;(other)&lt;tt&gt;
&lt;/tt&gt;      other.attach = &lt;span class=&quot;pc&quot;&gt;self&lt;/span&gt; &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; !other.nil?&lt;tt&gt;
&lt;/tt&gt;      other&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;resume&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@fiber&lt;/span&gt;.resume&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;pass_message&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;while&lt;/span&gt; message = message_in&lt;tt&gt;
&lt;/tt&gt;         message_out(message)      &lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;message_in&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@attach&lt;/span&gt;.resume &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; !&lt;span class=&quot;iv&quot;&gt;@attach&lt;/span&gt;.nil?&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;message_out&lt;/span&gt;(message)&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;co&quot;&gt;Fiber&lt;/span&gt;.yield(message)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;RingStart&lt;/span&gt; &amp;lt; &lt;span class=&quot;co&quot;&gt;Ring&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   attr_accessor &lt;span class=&quot;sy&quot;&gt;:message&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;initialize&lt;/span&gt;(n, m, message)&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@m&lt;/span&gt; = m&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@message&lt;/span&gt; = message&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;super&lt;/span&gt;(n)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;pass_message&lt;/span&gt; &lt;tt&gt;
&lt;/tt&gt;      loop { message_out(&lt;span class=&quot;iv&quot;&gt;@message&lt;/span&gt;) }&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;create_chain_r&lt;/span&gt;(i, chain)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# recursive version&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;r&quot;&gt;return&lt;/span&gt; chain &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; i&amp;lt;=&lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   r = chain.nil? ? &lt;span class=&quot;co&quot;&gt;Ring&lt;/span&gt;.new(i) :  chain | &lt;span class=&quot;co&quot;&gt;Ring&lt;/span&gt;.new(i)&lt;tt&gt;
&lt;/tt&gt;   create_chain(i&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;, r)&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;create_chain&lt;/span&gt;(n, chain)&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# loop version&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;span class=&quot;c&quot;&gt;# needed to avoid stack overflow for high n&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   n.downto(&lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;) {&lt;tt&gt;
&lt;/tt&gt;      chain = chain | &lt;span class=&quot;co&quot;&gt;Ring&lt;/span&gt;.new(n)&lt;tt&gt;
&lt;/tt&gt;   }&lt;tt&gt;
&lt;/tt&gt;   chain&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;n=&lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;[&lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;].to_i&lt;tt&gt;
&lt;/tt&gt;m=&lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;[&lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;].to_i&lt;tt&gt;
&lt;/tt&gt;mess=&lt;span class=&quot;sy&quot;&gt;:hello&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;tm  = &lt;span class=&quot;co&quot;&gt;Benchmark&lt;/span&gt;.measure {&lt;tt&gt;
&lt;/tt&gt;   ringu = &lt;span class=&quot;co&quot;&gt;RingStart&lt;/span&gt;.new(&lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;, m, mess)&lt;tt&gt;
&lt;/tt&gt;   chain = create_chain(n, ringu)&lt;tt&gt;
&lt;/tt&gt;   m.times { ringu.message = chain.resume }&lt;tt&gt;
&lt;/tt&gt;}.format(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;%10.6r&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;).gsub!(&lt;span class=&quot;rx&quot;&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\)&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;puts &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;n&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;m&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;tm&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


The comparison with the 
&lt;a href=&quot;http://people.equars.com/2008/5/22/erlang-ring-benchmark&quot;&gt;equivalent Erlang program&lt;/a&gt; 
is of course unfair, for one of the Erlang specialty is the spawning of cooperative processes. Anyway, here are the results:


&lt;table class=&quot;prettytable&quot;&gt;
&lt;tr&gt;
    &lt;th&gt;N&lt;/th&gt;
    ﻿&lt;th&gt;M&lt;/th&gt;
﻿    &lt;th&gt;Execution Time&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
﻿    &lt;th&gt;Ruby [ms]&lt;/th&gt;
    ﻿&lt;th&gt;Erlang [ms]&lt;/th&gt;
&lt;/tr&gt;                                
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 10&lt;/td&gt;
&lt;td&gt; 1&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 20&lt;/td&gt;
&lt;td&gt; 2&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 50&lt;/td&gt;
&lt;td&gt; 4&lt;/td&gt;
&lt;td&gt;10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 100&lt;/td&gt;
&lt;td&gt; 10&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 200&lt;/td&gt;
&lt;td&gt; 18&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 500&lt;/td&gt;
&lt;td&gt; 42&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt; 1000&lt;/td&gt;
&lt;td&gt; 82&lt;/td&gt;
&lt;td&gt;10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 10&lt;/td&gt;
&lt;td&gt; 15&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 20&lt;/td&gt;
&lt;td&gt; 23&lt;/td&gt;
&lt;td&gt;10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 50&lt;/td&gt;
&lt;td&gt; 60&lt;/td&gt;
&lt;td&gt;0
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 100&lt;/td&gt;
&lt;td&gt; 99&lt;/td&gt;
&lt;td&gt;10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 200&lt;/td&gt;
&lt;td&gt; 186&lt;/td&gt;
&lt;td&gt;20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 500&lt;/td&gt;
&lt;td&gt; 433&lt;/td&gt;
&lt;td&gt;50
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt; 1000&lt;/td&gt;
&lt;td&gt; 805&lt;/td&gt;
&lt;td&gt;90
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 10&lt;/td&gt;
&lt;td&gt; 320&lt;/td&gt;
&lt;td&gt;10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 20&lt;/td&gt;
&lt;td&gt; 423&lt;/td&gt;
&lt;td&gt;20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 50&lt;/td&gt;
&lt;td&gt; 809&lt;/td&gt;
&lt;td&gt;60
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 100&lt;/td&gt;
&lt;td&gt; 1479&lt;/td&gt;
&lt;td&gt;130
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 200&lt;/td&gt;
&lt;td&gt; 2803&lt;/td&gt;
&lt;td&gt;250
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 500&lt;/td&gt;
&lt;td&gt; 6914&lt;/td&gt;
&lt;td&gt;600
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;td&gt; 1000&lt;/td&gt;
&lt;td&gt; 15410&lt;/td&gt;
&lt;td&gt;1190
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 10&lt;/td&gt;
&lt;td&gt; 16168&lt;/td&gt;
&lt;td&gt;190
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 20&lt;/td&gt;
&lt;td&gt; 17491&lt;/td&gt;
&lt;td&gt;320
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 50&lt;/td&gt;
&lt;td&gt; 21348&lt;/td&gt;
&lt;td&gt;710
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 100&lt;/td&gt;
&lt;td&gt; 28314&lt;/td&gt;
&lt;td&gt;1480
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 200&lt;/td&gt;
&lt;td&gt; 41547&lt;/td&gt;
&lt;td&gt;2860
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 500&lt;/td&gt;
&lt;td&gt; 81166&lt;/td&gt;
&lt;td&gt;7200
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt; 1000&lt;/td&gt;
&lt;td&gt; 147570&lt;/td&gt;
&lt;td&gt;14190
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>enrico</name>
    </author>
    <id>tag:people.equars.com,2008-05-22:164</id>
    <published>2008-05-22T15:30:00Z</published>
    <updated>2008-05-22T15:31:30Z</updated>
    <category term="16% (Enrico's blog)"/>
    <category term="concurrency"/>
    <category term="erlang"/>
    <category term="programming"/>
    <link href="http://people.equars.com/2008/5/22/erlang-ring-benchmark" rel="alternate" type="text/html"/>
    <title>Erlang ring benchmark</title>
<content type="html">
            &lt;p&gt;Trying to be a &lt;a href=&quot;http://www.sdtimes.com/content/article.aspx?ArticleID=31222&quot;&gt;cool kid&lt;/a&gt;, 
I&#8217;ve recently spent some time playing with &lt;a href=&quot;http://www.erlang.org/&quot;&gt;Erlang&lt;/a&gt;.
So I&#8217;ve found in Joe Armstrong’s &lt;a href=&quot;http://www.pragprog.com/titles/jaerlang/programming-erlang&quot;&gt;Programming Erlang&lt;/a&gt; 
the following exercise:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;&#8221;Write a ring benchmark. Create N processes in a ring. Send a message round the ring M times so that a total of N * M messages get sent. Time how long this takes for different values of N and M.&lt;/p&gt;
    
    &lt;p&gt;Write a similar program in some other programming language you are familiar with. Compare the results. Write a blog, and publish the results on the Internet! &#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Already a &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;amp;q=erlang+ring+benchmark&quot;&gt;classic&lt;/a&gt; now &#8230;).&lt;/p&gt;

&lt;p&gt;I dutifully complied: here&#8217;s my solution. &lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;25&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;-&lt;span class=&quot;r&quot;&gt;module&lt;/span&gt;(ringu).&lt;tt&gt;
&lt;/tt&gt;-export([start/&lt;span class=&quot;i&quot;&gt;2&lt;/span&gt;]).&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;% ----------------------------------------------------------------------&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;start(&lt;span class=&quot;co&quot;&gt;N&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;) -&amp;gt; &lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt; = &lt;span class=&quot;pc&quot;&gt;self&lt;/span&gt;(),&lt;tt&gt;
&lt;/tt&gt;    statistics(runtime),&lt;tt&gt;
&lt;/tt&gt;    statistics(wall_clock),&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt; = spawn(fun() -&amp;gt; ringu(&lt;span class=&quot;co&quot;&gt;N&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;pc&quot;&gt;self&lt;/span&gt;(), &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt;) &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;),&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt; ! x,&lt;tt&gt;
&lt;/tt&gt;    receive &lt;tt&gt;
&lt;/tt&gt;        _ -&amp;gt; &lt;span class=&quot;pc&quot;&gt;true&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;,&lt;tt&gt;
&lt;/tt&gt;    {_, &lt;span class=&quot;co&quot;&gt;TCPU&lt;/span&gt;} = statistics(runtime),&lt;tt&gt;
&lt;/tt&gt;    {_, &lt;span class=&quot;co&quot;&gt;Time&lt;/span&gt;} = statistics(wall_clock),&lt;tt&gt;
&lt;/tt&gt;    io&lt;span class=&quot;sy&quot;&gt;:format&lt;/span&gt;(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;~nElapsed time: ~w ms~nCPU time:     ~w ms ~n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; ,&lt;tt&gt;
&lt;/tt&gt;          [&lt;span class=&quot;co&quot;&gt;Time&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;TCPU&lt;/span&gt;]).&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;% ----------------------------------------------------------------------&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;ringu(&lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt;) -&amp;gt; ringu_loop(&lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_1&lt;/span&gt;), &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt; ! itsover;&lt;tt&gt;
&lt;/tt&gt;ringu(&lt;span class=&quot;co&quot;&gt;N&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt;) -&amp;gt; &lt;tt&gt;
&lt;/tt&gt;    ringu_loop(&lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, spawn(fun() -&amp;gt; ringu(&lt;span class=&quot;co&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid_0&lt;/span&gt;) &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;)).&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;ringu_loop(&lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;) -&amp;gt; ringu_fwd_msg(&lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;);   &lt;tt&gt;
&lt;/tt&gt;ringu_loop(&lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;) -&amp;gt; ringu_fwd_msg(&lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;), ringu_loop(&lt;span class=&quot;co&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;, &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;).&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;ringu_fwd_msg(&lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt;) -&amp;gt;    &lt;tt&gt;
&lt;/tt&gt;    receive &lt;tt&gt;
&lt;/tt&gt;        &lt;span class=&quot;co&quot;&gt;X&lt;/span&gt; -&amp;gt; &lt;span class=&quot;co&quot;&gt;Pid&lt;/span&gt; ! &lt;span class=&quot;co&quot;&gt;X&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;%,&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; io:format(&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;,&lt;/span&gt;&lt;/span&gt; [])&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;.&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Benchmark results, and an (uneven :) ) comparison with an equivalent script in Ruby &lt;a href=&quot;http://people.equars.com/2008/5/22/ruby-fiber-ring-benchmark&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-05-21:161</id>
    <published>2008-05-21T22:13:00Z</published>
    <updated>2008-05-21T22:26:50Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="$"/>
    <category term="oil"/>
    <category term="prices"/>
    <link href="http://people.equars.com/2008/5/21/oil-price" rel="alternate" type="text/html"/>
    <title>Oil price</title>
<content type="html">
            &lt;p&gt;I&#8217;d like to reiterate a &lt;a href=&quot;http://perassi.org/2007/09/28/mea-culpa/&quot;&gt;past meme&lt;/a&gt;. This time I restrict the meme to  one single prediction:  please tell me wether you think the &lt;a href=&quot;http://tonto.eia.doe.gov/dnav/pet/pet_pri_spt_s1_d.htm&quot;&gt;crude oil price&lt;/a&gt; will pass the 150$ per barrell in the very near future, and, if you think that of it&#8217;s only matter of weeks, dare to say the exact day. I venture myself to bespeak the 30th of June, 2008.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://perassi.org/&quot;&gt;Carlo&lt;/a&gt;, &lt;a href=&quot;http://blog.bluendo.com/antitifoso/&quot;&gt;Alx&lt;/a&gt;, what do you think?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-05-14:160</id>
    <published>2008-05-14T22:15:00Z</published>
    <updated>2008-05-22T22:17:14Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="lighttpd"/>
    <category term="lua"/>
    <category term="mephisto"/>
    <category term="mongrel"/>
    <link href="http://people.equars.com/2008/5/14/caching-mephisto-with-lighttpd-and-mod_magnet" rel="alternate" type="text/html"/>
    <title>Caching Mephisto with lighttpd and mod_magnet</title>
<content type="html">
            &lt;p&gt;This blog uses &lt;a href=&quot;http://mephistoblog.com&quot;&gt;Mephisto&lt;/a&gt;, a &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;rails&lt;/a&gt; application, and &lt;a href=&quot;http://code.macournoyer.com/thin/&quot;&gt;Thin&lt;/a&gt; as backend webserver. The frontend webserver is &lt;a href=&quot;http://lighttpd.net&quot;&gt;Lighttpd&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While Mephisto has a good caching system, producing a static html file for every visited page, the file is still served via Thin, reducing the speed and the scalability of the system and introducing an unnecessary step.&lt;/p&gt;

&lt;p&gt;Lighttpd is very good at &lt;a href=&quot;http://www.lighttpd.net/benchmark&quot;&gt;serving static files&lt;/a&gt;,
thus I searched a way to serve a file from the cache directory of Mephisto, if present; 
I found a hack using &lt;a href=&quot;http://trac.lighttpd.net/trac/wiki/Docs%3AModMagnet&quot;&gt;mod_magnet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hereafter I wrote the relevant snippets of configuration files and how to put every piece in the right position.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; the same procedure should apply if you use &lt;a href=&quot;http://mongrel.rubyforge.org/&quot;&gt;Mongrel&lt;/a&gt; instead of Thin, for the relevant point is to bypass the backend rails webserver and serve all files (whether they exist) from the Mephisto cache. &lt;/p&gt;

&lt;p&gt;First I configure Lighttpd to proxy to Thin for the rails application. I assume Thin (or Mongrel) is listening on port 3000 on two hosts.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  HTTP[''host&quot;] == &quot;virtualhost.example.org&quot; {
        magnet.attract-physical-path-to = ( &quot;/var/www/cache_mephisto.lua&quot; ) 
        proxy.balance = &quot;hash&quot;
        proxy.server  = ( &quot;&quot; =&amp;gt; ( ( &quot;host&quot; =&amp;gt; &quot;10.0.0.1&quot;, &quot;port&quot; =&amp;gt;  3000 ),
                                ( &quot;host&quot; =&amp;gt; &quot;10.0.0.2&quot;, &quot;port&quot; =&amp;gt;  3000 ) ) )
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;magnet.attract-physical-path-to = ( &quot;/var/www/cache_mephisto.lua&quot; )&lt;/code&gt; is the magic trick.
 &lt;code&gt;cache_mephisto.lua&lt;/code&gt; is a script written in &lt;a href=&quot;http://www.lua.org/&quot;&gt;lua&lt;/a&gt; programming language.
The whole script is: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  local dir =  &quot;/path/to/mephisto/public/cache/&quot; .. lighty.request[&quot;Host&quot;]

  if ( lighty.env[&quot;request.uri&quot;] == nil or lighty.env[&quot;request.uri&quot;] == &quot;/&quot;) then
    file = dir .. &quot;/index.html&quot;
  else
    file = dir .. lighty.env[&quot;request.uri&quot;] ..  &quot;.html&quot;
  end

  if lighty.stat(file) then
  lighty.header[&quot;Content-Type&quot;] = &quot;text/html&quot;
  lighty.content = { { filename = file } }
  return 200
  end

 return lighty.RESTART_REQUEST
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Inside the script you should adapt the variable &lt;code&gt;dir&lt;/code&gt; to your Mephisto installation path. I need to append the virtual host name &lt;code&gt; lighty.request[&quot;Host&quot;] &lt;/code&gt; to the directory, for I run a multisite Mephisto installation; if you use a single site mephisto installation, probably you need to remove this append.&lt;/p&gt;

&lt;p&gt;Now for some benchmarks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;serving the file via Thin:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   Requests per second:    1.40 [#/sec] (mean)
   Time per request:       716.007 [ms] (mean)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;serving the file from the cache&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   Requests per second:    11.46 [#/sec] (mean)
   Time per request:       87.247 [ms] (mean)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Almost a tenfold improvement!&lt;/p&gt;

&lt;p&gt;Future works: serve from the cache the image files.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-04-20:157</id>
    <published>2008-04-20T20:06:00Z</published>
    <updated>2008-04-20T20:06:38Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="economy"/>
    <category term="usa"/>
    <link href="http://people.equars.com/2008/4/20/us-economy" rel="alternate" type="text/html"/>
    <title>US Economy</title>
<content type="html">
            &lt;p&gt;A thoughtful article: &lt;a href=&quot;http://www.falkvinge.com/2008/03/why-us-is-collapsing.html&quot;&gt;why Us economy is collapsing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A really interesting movie: &lt;a href=&quot;http://video.google.com/videoplay?docid=-9050474362583451279&quot;&gt;money as debt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;embed src=&quot;http://video.google.com/googleplayer.swf?docid=-9050474362583451279&amp;amp;amp;hl=en&quot;&gt; &amp;lt;/embed&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2008-03-13:156</id>
    <published>2008-03-13T11:19:00Z</published>
    <updated>2008-03-13T11:24:10Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="postgresql"/>
    <category term="rrdtool"/>
    <category term="ruby"/>
    <link href="http://people.equars.com/2008/3/13/postgresql-graph" rel="alternate" type="text/html"/>
    <title>Postgresql Graph</title>
<content type="html">
            &lt;p&gt;I wrote a small tool, &lt;a href=&quot;http://people.equars.com/~marco/software/postgresqlgraph&quot;&gt;postgresqlgraph&lt;/a&gt;, to monitor and plot the statistics of a &lt;a href=&quot;http://www.postgresql.org&quot;&gt;postgresql&lt;/a&gt; database, using &lt;a href=&quot;http://oss.oetiker.ch/rrdtool/&quot;&gt;rrdtool&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The tool is able to monitor every database created inside a postgresql installation.&lt;/p&gt;

&lt;p&gt;The parameters plotted for each database in the graph are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;numbackends: number of backends:&lt;/li&gt;
&lt;li&gt;xact_commit: transactions committed;&lt;/li&gt;
&lt;li&gt;xact_rollback: transactions rolled back;&lt;/li&gt;
&lt;li&gt;blks_read: blocks read from the disk;:&lt;/li&gt;
&lt;li&gt;blks_hit: blocks hit in the cache;&lt;/li&gt;
&lt;li&gt;tup_returned: tuples returned (only in postgresql 8.3)&lt;/li&gt;
&lt;li&gt;tup_fetched: tuples fetched (only in postgresql 8.3)&lt;/li&gt;
&lt;li&gt;tup_inserted: tuples inserted (only in postgresql 8.3)&lt;/li&gt;
&lt;li&gt;tup_updated: tuples updated (only in postgresql 8.3)&lt;/li&gt;
&lt;li&gt;tup_deleted: deleted (only in postgresql 8.3)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each parameter the graph shows the maximum and average values, and plots the derivative (rate change). &lt;/p&gt;

&lt;p&gt;The software is published under &lt;a href=&quot;http://www.fsf.org/licensing/licenses/gpl.html&quot;&gt;GPLv3&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;A demo is available &lt;a href=&quot;http://people.equars.com/~marco/software/postgresqlgraph/demo/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please feel free to submit me bugs, critics, improvements, or tell me if you find the tool of any worthwhileness.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2007-11-27:146</id>
    <published>2007-11-27T16:00:00Z</published>
    <updated>2007-11-27T16:10:38Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="murphy's law"/>
    <category term="software"/>
    <link href="http://people.equars.com/2007/11/27/snafu" rel="alternate" type="text/html"/>
    <title>SNAFU</title>
<content type="html">
            &lt;p&gt;I spent a frustrating week of problem solving (or at least trying to&#8230;) of obscure integration issues among different programs,
like trying to get &lt;a href=&quot;http://www.zabbix.org&quot;&gt;zabbix&lt;/a&gt; to talk with a &lt;a href=&quot;http://www.jabber.org&quot;&gt;jabber&lt;/a&gt; server (the solution was found in IPV6), reading  unuseful logs to debug problems (what the hell do you mean with &#8220;connection failed&#8221;? To what?) , recompiling software with arcane options, rebooting servers with the swap space full (&lt;a href=&quot;http://httpd.apache.org&quot;&gt;apache&lt;/a&gt;,  what are you doing?), or trying to stop a server that continues to reboot itself  at boot (&lt;a href=&quot;http://en.wikipedia.org/wiki/Xen&quot;&gt;Xen&lt;/a&gt;, please tell me why&#8230;), or  fighting with buggy &lt;a href=&quot;http://en.wikipedia.org/wiki/Spaghetti_code&quot;&gt;PHP&lt;/a&gt; frontend, and, last but not least, investigate why a &lt;a href=&quot;http://munin.projects.linpro.no/&quot;&gt;monitoring software&lt;/a&gt;  just stopped working.&lt;/p&gt;

&lt;p&gt;So I come to wonder if it exists a software that &#8220;just works&#8221;. If you ever happen to read this rambling and know such a software, please, please tell me. In the meanwhile I coined a law:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dela&#8217;s Law of software&lt;/strong&gt;: there is no software that &#8220;just works&#8221;&lt;br /&gt;
&lt;strong&gt;Corollary to the Dela&#8217;s Law of software&lt;/strong&gt;: if a software seems to &#8220;just work&#8221;, after some times it will stop to work for an obscure, unknown and very difficult to find reason.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://people.equars.com/">
    <author>
      <name>marco</name>
    </author>
    <id>tag:people.equars.com,2007-10-25:144</id>
    <published>2007-10-25T21:43:00Z</published>
    <updated>2007-10-25T22:30:12Z</updated>
    <category term="Hiraedd (Marco's blog)"/>
    <category term="math"/>
    <category term="turing machine"/>
    <link href="http://people.equars.com/2007/10/25/universal-turing-machine" rel="alternate" type="text/html"/>
    <title>Universal Turing Machine</title>
<content type="html">
            &lt;p&gt;So, it seems that the simplest &lt;a href=&quot;http://en.wikipedia.org/wiki/Universal_Turing_machine&quot;&gt;universal turing machine&lt;/a&gt; has been &lt;a href=&quot;http://blog.wolfram.com/2007/10/the_prize_is_won_the_simplest.html&quot;&gt;demonstrated&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The simplest universal turing machine (T. M.) is, well, the simplest: 2 states and 3 symbols (or colors, as they are called by &lt;a href=&quot;http://blog.wolfram.com/&quot;&gt; Stephen Wolfram&lt;/a&gt;), since a 2-states 2-symbols T.M. can not be universal. &lt;/p&gt;

&lt;p&gt;This particular machine has however a subtle issue, for it requires an infinite memory (or &#8221;tape&#8221; in the original definition of &lt;a href=&quot;http://en.wikipedia.org/wiki/Alan_Turing&quot;&gt;Turing&lt;/a&gt;), not satisfying perfectly the definition of universality given by &lt;a href=&quot;http://en.wikipedia.org/wiki/Martin_Davis&quot;&gt;Davis&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Marvin_Minsky&quot;&gt;Minsky&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The answer to the issue is that the pattern of bits in the memory can be set up without an universal  T.M., so the universality is independent from the encoding of the pattern. I wonder if a (2,3) universal T.M. can be built with finite memory.&lt;/p&gt;
          </content>  </entry>
</feed>
