Thu, 22 May 2014 11:00:00 +0000 Paolo Donadeo — LifeLOG/Personal consultancy Paolo Donadeo's personal Internet site and blog https://www.donadeo.net/ p.donadeo@gmail.com (Paolo Donadeo) Installing OPAM 1.1.1 on a CentOS 6.5 https://www.donadeo.net/post/2014/installing-opam-1-1-1-on-a-cenos-6-5 https://www.donadeo.net/post/2014/installing-opam-1-1-1-on-a-cenos-6-5 p.donadeo@gmail.com (Paolo Donadeo) Wed, 21 May 2014 23:00:00 +0000 2014-05-22T11:00:00.000Z English 4Sigma Computer programming Objective Caml Article <div> <p class="noindent">I'm in this situation: I need to compile an OCaml program on a CentOS 6.5 server. This is actually quite problematic, because CentOS 6.5 provide out of the box a very old OCaml 3.11.2, released by INRIA in January 2010, more than four years ago.</p> <p class="noindent">No problem, <a href="https://opam.ocaml.org/" title="OPAM - Home">OPAM</a> come to the rescue! No. The OPAM team doesn't provide a binary executable compatible with the (actually very old) system libraries present in CentOS. </p> <p class="noindent">Ok, step back: OPAM can be compiled from sources (<a href="https://opam.ocaml.org/doc/Advanced_Install.html" title="OPAM - Advanced Install">instructions here</a>) so it's just a matter of minutes. Again: nope. To compile OPAM you need at least OCaml 3.12.1, while in CentOS we have only 3.11.2.</p> <p class="noindent">Step back: first compile and install OCaml from sources. This time I say no, because the whole point of OPAM is to get an up and running OCaml environment in a few minutes, which is <strong>actually true</strong> in most cases.</p> <p class="noindent">I decide to install OCaml using <a href="https://godi.camlcity.org/godi/get_godi.html" title="Get GODI">GODI</a>, the “old” OCaml source distribution, the one everybody used before OPAM was born. So the fastest steps to have an OPAM and OCaml environment on a CentOS server are:</p> <ul> <li>download and install GODI;</li> <li>clone the <a href="https://github.com/ocaml/opam" title="GITHUB - ocaml/opam">OPAM repository</a>, compile and install it; it will find a “system” compiler provided by GODI;</li> <li><code>$ opam switch 4.01.0</code> will recompile a new environment;</li> <li><code>$ opam switch remove system</code> to delete the “system” environment;</li> <li><code>$ rm -Rf ~/godi</code>.</li> </ul> <p class="noindent">No root access is required in this process, I usually install OPAM in <code>~/opam</code>, and GODI in <code>~/godi</code>.</p> <p class="noindent">There is an irony in all this story: GODI has been <strong>the</strong> OCaml source distribution for years, and the coming of OPAM, which is actually newer and has some important features missing in GODI, has produced many frictions in the OCaml community, that in the end caused the <a href="https://blog.camlcity.org/blog/godi_shutdown.html" title="GODI is shutting down">shut down of GODI</a>.</p> <p class="noindent">The moral part here is: embrace the new things, but don't be too impatient in throwing out the window the precious work that, in the end, still works.</p> <p class="noindent">In any case, I want to thank both Gerd Stolpmann (author of GODI) and the OPAM team: they gave to the OCaml community a mature, industrial grade, set of tools to use OCaml.</p> </div> https://www.donadeo.net/post/2014/installing-opam-1-1-1-on-a-cenos-6-5#commentary https://www.donadeo.net/post/2014/installing-opam-1-1-1-on-a-cenos-6-5/feed 5 Debugging memory in OCaml: any advice? https://www.donadeo.net/post/2012/debugging-memory-in-ocaml-any-advice https://www.donadeo.net/post/2012/debugging-memory-in-ocaml-any-advice p.donadeo@gmail.com (Paolo Donadeo) Mon, 27 Feb 2012 23:37:00 +0000 2012-02-27T23:37:00.000Z English 4Sigma Computer programming Objective Caml Article <div> <a title="Memory consumption chart" class="zoom-box-image" href="https://www.donadeo.net/static/2012/02/server_rss.png"><img class="little left" src="https://www.donadeo.net/static/2012/02/server_rss_small.png" alt="Memory consumption chart" /></a> <p class="noindent">A server I just deployed (written in OCaml, of course) seems to eat RAM at breakfast. This is the chart of the RSS field of "ps" in the past 24h (click to enlarge). The program starts with almost 6 Mb and is now reaching 40 Mb, in a linear trend that has nothing good to say.</p> <p class="noindent">Any advice on how to debug the memory consumption?</p> </div> https://www.donadeo.net/post/2012/debugging-memory-in-ocaml-any-advice#commentary https://www.donadeo.net/post/2012/debugging-memory-in-ocaml-any-advice/feed 1 Words of wisdom… https://www.donadeo.net/post/2011/words-of-wisdom https://www.donadeo.net/post/2011/words-of-wisdom p.donadeo@gmail.com (Paolo Donadeo) Tue, 27 Sep 2011 17:00:00 +0000 2011-09-27T17:00:00.000Z English Job Computer programming Random thoughts <div><p class="noindent">…from <a href="https://en.wikipedia.org/wiki/Edsger_W._Dijkstra" title="Edsger W. Dijkstra - Wikipedia, the free encyclopedia">Edsger Dijkstra</a>: “Program testing can be used to show the presence of bugs, but never to show their absence!”</p></div> Segnalazione… pubblicitaria https://www.donadeo.net/post/2011/segnalazione-pubblicitaria https://www.donadeo.net/post/2011/segnalazione-pubblicitaria p.donadeo@gmail.com (Paolo Donadeo) Sun, 06 Mar 2011 23:57:00 +0000 2011-03-06T23:57:00.000Z Italian 4Sigma Information technology News <div> <p class="noindent">Brevissimo post per segnalarvi la nascita di un nuovo fantastico <a href="https://blog.4sigma.it/" title="Blog dello Studio Associato 4Sigma">blog</a>, cui tengo molto visto che racconterà storie interessanti (si spera) che riguardano una piccola realtà italiana, lo <a href="https://www.4sigma.it" title="Home page dello studio">Studio Associato 4Sigma</a>.</p> <p class="noindent">Il fatto che incidentalmente io sia uno dei soci dello studio non vi tragga in inganno: il mio giudizio sul nuovo blog è del tutto disinteressato <kbd>;-)</kbd></p> <p class="noindent">Di cosa tratterà? A dire la verità non lo so ancora, per adesso direi che parleremo di tutto quello che possiamo ritenere interessante su due fronti, almeno: la gestione ed i problemi che affronta una piccola realtà che vuole fare della qualità (in Italia!) la propria bandiera e qualche argomento più prettamente tecnico, ispirato dalle quotidiane battaglie con la tecnologia informatica.</p> <p class="noindent">Non disdegneremo anche qualche aneddoto divertente nel rapporto di amore/odio con i clienti e, soprattutto, le critiche ai cosiddetti professionisti dell'ambiente. Che spesso si rivelano degli autentici truffatori.</p> </div> Incubo PHP https://www.donadeo.net/post/2010/incubo-php https://www.donadeo.net/post/2010/incubo-php p.donadeo@gmail.com (Paolo Donadeo) Thu, 25 Nov 2010 20:10:00 +0000 2010-11-25T20:10:00.000Z Italian 4Sigma Computer programming PHP Random thoughts <div><p class="noindent">Sto facendo la manutenzione di un vecchio sito che <a href="https://www.4sigma.it">avevamo scritto</a> in PHP.</p> <p class="noindent">Avevo pessimi ricordi di PHP, ma non mi ricordavo più <em>quanto</em> fosse un incubo programmare in questo, chiamiamolo così, linguaggio.</p> <p class="noindent">Disgustoso!</p></div> https://www.donadeo.net/post/2010/incubo-php#commentary https://www.donadeo.net/post/2010/incubo-php/feed 1 OCaml per programmatori Python https://www.donadeo.net/post/2010/ocaml-per-programmatori-python https://www.donadeo.net/post/2010/ocaml-per-programmatori-python p.donadeo@gmail.com (Paolo Donadeo) Sun, 22 Aug 2010 22:08:00 +0000 2010-08-22T22:08:00.000Z Italian Personal consultancy Computer programming Objective Caml Python Article <div><p class="noindent">Sorry for English speaking people, but this post makes sense only for Italians, so it's in Italian :-)</p> <p>Qualche mese fa, precisamente a fine Febbraio, mi è stato chiesto di presentare in un breve workshop il linguaggio <a href="https://caml.inria.fr/ocaml/index.en.html">Objective Caml</a> che, manco a dirlo, è il mio linguaggio di programmazione preferito. Mi ero riproposto di scrivere qualcosa in merito, ma una serie di problemi me lo ha impedito, così colmo con qualche mese di ritardo la lacuna.</p> <p>L'invito mi è arrivato da <a href="https://www.develer.com/website/en">Develer</a>, un'azienda con sede <a href="https://www.develer.com/website/en/location/">vicino Firenze</a> molto attenta alla formazione ed alle novità nel mondo delle tecnologie informatiche. In questo caso la novità non sta tanto nel linguaggio OCaml, che ha ormai 14 anni, quanto nel volersi avvicinare alla programmazione funzionale con uno sguardo pragmatico.</p> <p>Develer è poi l'azienda che contribuisce in maniera sostanziale alla realizzazione del <a href="https://www.pycon.it/">PyCon Italia</a>, una splendida manifestazione che è un unicum nel panorama culturale italiano, e non solo per i programmatori appassionati di Python, ma per tutti gli sviluppatori e smanettoni sufficientemente <em>smart</em> da non ignorare Python.</p> <p>Il background culturale legato a Python e l'assoluto digiuno di programmazione funzionale hanno portato ad un workshop in cui ho cercato di mostrare alcuni dei concetti della <a href="https://en.wikipedia.org/wiki/Functional_programming">FP</a>, utilizzando OCaml, e spiegandone nel contempo la sintassi in estrema sintesi, mostrando qualche parallelo con Python.</p> <p>Non so se il risultato sia stato positivo per Develer, perché da un lato non sono un vero esperto OCaml, e dall'altro ho dovuto (voluto?) concentrare in poco tempo una serie di concetti non banali, per cui forse non è stato facile per i presenti seguire il discorso. Comunque sia, nessuno mi ha tirato pomodori :-)</p> <p>Per il workshop ho ovviamente preparato una piccola presentazione che potete <a href="https://www.donadeo.net/static/2010/08/ocaml_per_prog_python.pdf">scaricare in formato PDF</a>, sperando possa essere utile a qualcuno, non fosse altro per l'elenco di link a risorse relative ad OCaml. La presentazione è distribuita con licenza <a href="https://creativecommons.org/licenses/by-sa/2.5/it/deed">Creative Commons (Attribuzione, condividi allo stesso modo)</a>, il che vuol dire che se siete così matti da copiarne dei pezzi, almeno ricordatevi di citarmi tra gli autori.</p></div> https://www.donadeo.net/post/2010/ocaml-per-programmatori-python#commentary https://www.donadeo.net/post/2010/ocaml-per-programmatori-python/feed 3 Google Android https://www.donadeo.net/post/2010/google-android https://www.donadeo.net/post/2010/google-android p.donadeo@gmail.com (Paolo Donadeo) Sat, 17 Jul 2010 12:13:00 +0000 2010-07-17T12:13:00.000Z English Digital life Job Article <div><p class="first-par">First of all Google decided to bind its brand new and "revolutionary" operating system to an old pile of crap like <a href="https://www.paulgraham.com/gh.html">Java</a>.</p> <p class="first-par">Then the Big G decided to enlighten us with <a href="https://www.theregister.co.uk/2010/07/12/google_app_inventor_for_android/">App inventor</a>, nothing more than a toy for kids.</p> <p class="first-par">As a consequence of this policy, aimed to entice smart people, someone decided to write <a href="https://www.theregister.co.uk/2010/07/15/php_android/">PFA, PHP for Android</a>, doubtless an excellent idea.</p> <p class="first-par">My question now is: what's next? Maybe COBOL?</p></div>