Thu, 22 May 2014 11:00:00 +0000 Paolo Donadeo — LifeLOG 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 First release of OCaml binding of Lua library https://www.donadeo.net/post/2012/first-release-of-ocaml-lua https://www.donadeo.net/post/2012/first-release-of-ocaml-lua p.donadeo@gmail.com (Paolo Donadeo) Sat, 01 Sep 2012 14:06:00 +0000 2012-09-01T14:06:00.000Z English Spare time Computer programming Objective Caml Lua News <div> <p class="noindent">I'm happy to announce the first release of ocaml-lua, the OCaml binding of the Lua library. With ocaml-lua you can embed a Lua interpreter in an OCaml program in a few lines of code, and use Lua for configuration or customization purposes.</p> <p class="noindent">Here are some references:</p> <ul> <li>The homepage of the project is hosted on <a href="https://ocaml-lua.forge.ocamlcore.org/">OCaml Forge</a>;</li> <li>The complete library reference (ocamldoc generated) is <a href=" https://ocaml-lua.forge.ocamlcore.org/api-lua/">here</a>;</li> <li>Source tarballs are on the download page on <a href="https://forge.ocamlcore.org/frs/?group_id=167">OCaml Forge</a>;</li> <li>The official GIT repository is <a href="https://forge.ocamlcore.org/scm/browser.php?group_id=167">here</a>;</li> <li>Bug reports and feature requests are on my page on <a href="https://github.com/pdonadeo/ocaml-lua/issues">GitHub</a>.</li> </ul> <p class="noindent">I hope it could be useful.</p> </div> Online backup with Crashplan: my experience https://www.donadeo.net/post/2012/online-backup-with-crashplan--my-experience https://www.donadeo.net/post/2012/online-backup-with-crashplan--my-experience p.donadeo@gmail.com (Paolo Donadeo) Sun, 25 Mar 2012 13:06:02 +0000 2012-03-25T13:41:59.000Z English Digital life Internet Review <div> <a title="Crashplan ETA for the first backup" class="zoom-box-image" href="https://www.donadeo.net/static/2012/03/crashplan_client.png"><img class="little left" src="https://www.donadeo.net/static/2012/03/crashplan_client_small.png" alt="Crashplan ETA for the first backup" /></a> <p class="noindent">Following <a href="https://lifehacker.com/5787572/set-up-an-automated-bulletproof-file-back-up-solution">this article of Lifehacker</a> I decided to give a try to <a href="https://www.crashplan.com/">Crashplan</a>, an online "cloud" backup service that seemed very promising to me because it supports many platforms (Linux and Android included) and offers an unlimited space plan for one computer for only <a href="https://www.crashplan.com/consumer/store.vtl">$36 a year</a>. </p> <p>Installing the client for Linux is very easy, and presents all the typical backup options (timing, include/exclude paths, and so on).</p> <p>I decided to include <em>all</em> the directory I already backup with a script of mine on a USB external hard drive.</p> <p>The problem here is visible in the screenshot I saved: the estimated time for completing the first backup was 52 days!</p> <p>It's not Crashplan fault, of course, but the fact is that here in Italy we are still very far from using a remote service like that.</p> <p>Maybe I'll retry again in a a few… years.</p> </div> https://www.donadeo.net/post/2012/online-backup-with-crashplan--my-experience#commentary https://www.donadeo.net/post/2012/online-backup-with-crashplan--my-experience/feed 1 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 L'Italia nella classifica World Bank https://www.donadeo.net/post/2011/italia-classifica-wb https://www.donadeo.net/post/2011/italia-classifica-wb p.donadeo@gmail.com (Paolo Donadeo) Sat, 12 Nov 2011 23:25:14 +0000 2011-11-12T23:35:18.000Z Italian Writing Politics Article <div> <p class="noindent">Vi segnalo un <a href="https://www.economist.com/node/21538180" title="The Italian crisis: Addio, Silvio | The Economist">articolo molto interessante</a> di The Economist, di cui cito solo uno dei capoversi finali:</p> <blockquote> <p>«The Italy Mr Berlusconi will hand to his successor ranks 87th in the World Bank’s Ease of Doing Business survey, behind Albania. The bank found it was harder to get an electricity supply than in Sudan. In Transparency International’s latest corruption perceptions index, Italy ranked 67th. Rwanda and several other African countries were cleaner.»</p> </blockquote> <p>Questa è la <a href="https://www.doingbusiness.org/rankings" title="Ranking of economies - Doing Business - World Bank Group">classifica originale</a> che certifica che l'Italia è <em>davvero</em> nel Quarto Mondo. È infatti molto interessante scoprire che è più facile fare affari in Ghana che in Italia.</p> <p>Ringrazio <a href="https://www.erix.it/" title="Erix home page">Enrico Colombini</a> per avermi segnalato l'articolo ed essersi andato a cercare il sito doingbusiness.org.</p> </div> Sōchin (壯鎭) https://www.donadeo.net/post/2011/sochin https://www.donadeo.net/post/2011/sochin p.donadeo@gmail.com (Paolo Donadeo) Tue, 18 Oct 2011 22:20:00 +0000 2011-10-18T22:20:00.000Z English Life Karate Random thoughts <div> <p class="noindent">I'm learning Sōchin (壯鎭). What the heck is Sōchin? It's a kata. It's a Karate-do thing. Never mind what a kata is or what Karate-do is, watch <a href="https://www.youtube.com/watch?v=1pdwgB7qOe0" title="Kata SOCHIN + Bunkai by Italian National Kata team - YouTube">this video</a>. <strong><kbd>:-)</kbd></strong></p> <p class="noindent">And not, I don't even remotely resemble Valdesi.</p> </div> Thanks Mr. Ritchie https://www.donadeo.net/post/2011/thanks-mr-ritchie https://www.donadeo.net/post/2011/thanks-mr-ritchie p.donadeo@gmail.com (Paolo Donadeo) Thu, 13 Oct 2011 21:46:52 +0000 2011-10-13T21:51:51.000Z English Digital life Computer programming Linux Article <div><p class="noindent">Today Unix, or some other operating system deeply inspired by Unix, is pervasive: servers, embedded devices (notably Android, but it's only one) and the “revolutionary” Mac OSX is itself an incarnation of the ideas and works of Dennis Ritchie.</p> <p class="noindent"><a title="Google Search for “Dennis Ritchie”" href="https://donadeo.net/u/4x">Dennis Ritchie</a> worked on Unix more than 40 years ago, and my questions is: what will we use in forty years? Probably something Dennis Ritchie was working some months ago.</p> <p class="noindent">Thanks Mr. Ritchie.</p></div> 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> Google+ and your privacy https://www.donadeo.net/post/2011/google-and-your-privacy https://www.donadeo.net/post/2011/google-and-your-privacy p.donadeo@gmail.com (Paolo Donadeo) Thu, 07 Jul 2011 22:02:02 +0000 2011-07-07T22:02:02.000Z English Digital life Random thoughts <div> <a title="Google+ privacy warning" class="zoom-box-image" href="https://www.donadeo.net/static/2011/07/google_plus_privacy.png"><img class="little left" src="https://www.donadeo.net/static/2011/07/google_plus_privacy_small.png" alt="Google+ privacy warning" /></a> <p class="noindent">Yesterday I was impressed by a privacy warning of Google+. While I was resharing a friend's post, Google+ remembered me that the original post had a limited visibility, and to take account of this fact. Click the image on the left to read the original message.</p> <p>So <a title="Google+ home page" href="https://plus.google.com/">Google+</a> starts it's journey with a strong accent to your privacy concern: you are invited not to tell everyone your business, because it's a valuable information, only Google wants to know... <kbd>;-)</kbd></p> </div> Quando sei nei guai? https://www.donadeo.net/post/2011/quando-sei-nei-guai https://www.donadeo.net/post/2011/quando-sei-nei-guai p.donadeo@gmail.com (Paolo Donadeo) Wed, 15 Jun 2011 21:12:05 +0000 2011-06-15T21:12:05.000Z Italian Family Random thoughts <div> <p class="noindent">Oggi ho capito che sei nei guai quando nella tua rubrica indirizzi in Google Contacts sei costretto ad aggiungere l'etichetta “badanti”.</p> <p>E quando ti rendi conto, dopo aver avuto qualche colloquio, che il tuo numero di telefono cellulare è ormai di pubblico dominio, che ti chiama chiunque e che quando chiedi gentilmente: “posso chiederle chi le ha dato il mio numero?”; ti senti rispondere, altrettanto gentilmente, con un nome straniero impronunciabile e mai sentito prima.</p> <p>привет!</p> </div>