Thu, 22 May 2014 11:00:00 +0000 Paolo Donadeo — LifeLOG/4Sigma 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 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