<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Erlang on Marcello Barnaba</title>
    <link>https://sindro.me/it/tags/erlang/</link>
    <description>Recent content in Erlang on Marcello Barnaba</description>
    <generator>Hugo</generator>
    <language>it</language>
    <lastBuildDate>Tue, 11 May 2010 19:00:00 +0000</lastBuildDate>
    <atom:link href="https://sindro.me/it/tags/erlang/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Oggi ho speso la giornata su Erlang-Ruby-Marshal ;-)</title>
      <link>https://sindro.me/it/posts/2010-05-11-spent-my-day-on-erlang-ruby-marshal-today/</link>
      <pubDate>Tue, 11 May 2010 19:00:00 +0000</pubDate>
      <guid>https://sindro.me/it/posts/2010-05-11-spent-my-day-on-erlang-ruby-marshal-today/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sindro.me/posts/2010-05-11-spent-my-day-on-erlang-ruby-marshal-today/erlang.png&#34; alt=&#34;Erlang logo&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;In sintesi, aggiunge il supporto per l&amp;rsquo;unmarshaling delle stringhe 1.9, e&#xA;implementa l&amp;rsquo;ultimo tipo mancante (&lt;code&gt;TYPE_LINK&lt;/code&gt;) che mancava dal codice. I test&#xA;ancora latitano, qualcuno vuole &lt;a href=&#34;http://github.com/vjt/erlang-ruby-marshal&#34; target=&#34;_blank&#34;&gt;dare una mano&lt;/a&gt;? :-)&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Added TYPE_LINK, needed because of how ruby 1.9 marshals strings.&#xA;&#xA;In 1.9, Ruby marshals the string encoding in the binary output, and&#xA;uses an Ivar construct (TYPE_IVAR) to wrap the string and adds an&#xA;&amp;#34;encoding&amp;#34; instance variable (notice: without a leading @) whose&#xA;value is the encoding itself.&#xA;&#xA;While the Ivar code worked correctly, the values of the encodings&#xA;are actually *strings*, that are being reused via the TYPE_LINK&#xA;construct, that wasn&amp;#39;t implemented.&#xA;&#xA;So, the get() and put() primitives are being used to store not&#xA;only tuples {id, sym} for symbols, but now store either&#xA;&#xA;  {{symbol, ID}, sym}&#xA;&#xA;  OR&#xA;&#xA;  {{value,  ID}, val}&#xA;&#xA;for the other types that use TYPE_LINK.&#xA;&#xA;By reading the ruby marshal.c source code, it looks like that MANY&#xA;data types save their values in the arg-&amp;gt;data hashtable, but by&#xA;inspecting the binary marshal output of, e.g, an array of floats,&#xA;links aren&amp;#39;t used.&#xA;&#xA;Thus, in this unmarshaler, links are considered, for now, only for&#xA;strings and regexes.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Forkami su GitHub: &lt;a href=&#34;http://github.com/vjt/erlang-ruby-marshal&#34; target=&#34;_blank&#34;&gt;http://github.com/vjt/erlang-ruby-marshal&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>CouchDB 0.11 Invalid UTF-8 JSON: Risolto</title>
      <link>https://sindro.me/it/posts/2010-04-03-couchdb-invalid-utf8-json/</link>
      <pubDate>Sat, 03 Apr 2010 19:00:00 +0000</pubDate>
      <guid>https://sindro.me/it/posts/2010-04-03-couchdb-invalid-utf8-json/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sindro.me/posts/2010-04-03-couchdb-invalid-utf8-json/couchdb.png&#34; alt=&#34;CouchDB logo&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Se il tuo CouchDB 0.11 ti spara l&amp;rsquo;errore &amp;ldquo;Invalid UTF-8 JSON&amp;rdquo; ad &lt;strong&gt;ogni&lt;/strong&gt; POST&#xA;o PUT che gli mandi, assicurati che nella tua&#xA;&lt;code&gt;$prefix/usr/lib/couchdb/erlang/lib&lt;/code&gt; non ci siano residui di installazioni&#xA;precedenti.&lt;/p&gt;&#xA;&lt;p&gt;Sul server di sviluppo &lt;a href=&#34;http://exelab.eu/&#34; target=&#34;_blank&#34;&gt;nostro&lt;/a&gt;, ho trovato due directory&#xA;(&amp;ldquo;couch-0.10&amp;rdquo; e &amp;ldquo;mochiweb-r97&amp;rdquo;) dalla vecchia installazione 0.10 che causavano&#xA;il problema.&lt;/p&gt;&#xA;&lt;p&gt;Questo vale se hai aggiornato da sorgenti, come probabilmente hai fatto, perché&#xA;ad aprile 2010 non è che ci fossero tutti questi pacchetti di CouchDB 0.11 :-).&lt;/p&gt;&#xA;&lt;p&gt;Un grazie enorme a &lt;a href=&#34;http://twitter.com/couchdb&#34; target=&#34;_blank&#34;&gt;@couchdb&lt;/a&gt; per &lt;a href=&#34;http://twitter.com/CouchDB/status/11495632471&#34; target=&#34;_blank&#34;&gt;avermi indicato&#xA;la direzione giusta&lt;/a&gt; dopo &lt;a href=&#34;http://mail-archives.apache.org/mod_mbox/couchdb-dev/201002.mbox/%3c112036548.3241265012630999.JavaMail.jira@brutus.apache.org%3e&#34; target=&#34;_blank&#34;&gt;aver&#xA;letto una segnalazione sulla mailing list&#xA;dev&lt;/a&gt;&#xA;— ma non volevo fare &amp;ldquo;rimuovi e reinstalla&amp;rdquo; perché mi piace capire cosa sta&#xA;succedendo ;-).&lt;/p&gt;&#xA;&lt;p&gt;&lt;small&gt;Nota a margine: che sia la fine dell&amp;rsquo;Hiatus? Spero di sì ;-p&lt;/small&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
