Yet Another cGA Implementation, Now in Haskell.

A year ago, I mentioned that I always write a cGA implementation when I learn a new language. Then, I was trying to get back to fluent in Haskell. A couple of days ago, Martin Pelikan just did the same and wanted to compare implementations. So, what did I do? I looked for my implementation to post it here. I took a look at the code and change a couple of things, but I can say that the Haskell implementation is the shortest working implementation that I have ever written in any language. It is shorter than the versions I wrote in Scala and Erlang. Python could get awkwardly compressed using some functional flavor to get close to this, but dynamic typing… C, C++, Java, Go and other friends, are far away when you look in the rear Haskell mirror. Anyway, the code below implements cGA for binary strings. You chose the population size, the number of bits, and the evaluation function. Also, some of the constructs are simple and elegant that do not need much explanation (not to mention maintainability…) ...

Mar 22, 2014 · 2 min · 389 words · Xavier Llorà

Little Corners

Summer 2013. Roaming around Girona. Visiting corners long forgotten. Taking déjà vu turns. Permanent ephemeral moments.

Aug 22, 2013 · 1 min · 16 words · Xavier Llorà

Yet Another cGA Implementation, Now in Erlang.

Wanna have some Sunday afternoon fun? Just refresh your Erlang skills. Since this is me having fun, what better way to do so than to write yet another implementation of the compact Genetic Algorithm originally (cGA) proposed by Georges Harik? I am going to skip describing the original algorithm and focus a bit on how to implement it in Erlang instead. You can find some nice books elsewhere and more information on the Erlang site. Erlang is an interesting mix of functional and logic programming languages. If you ever wrote code in ProLog, Erlang is going to look familiar. It will also look familiar if you are coming from Haskell, although, being Erlang a dynamically typed language, you will miss the type system and inference. Nevertheless, give it a chance. It concurrent model is worthwhile reading about. I will it for further posts thought. ...

Jul 8, 2013 · 4 min · 761 words · Xavier Llorà

Pacific Views

Winter of 2013, strolling down the Pacific cost. From Half Moon Bay to San Luis Obispo everything is crisp. Too crisp to let it pass by. Everything is oddly energized by the wind, rocked by the waves, supported by drift wood, embraced by warm low sunlight. Everything is crisp, too crisp, like a kite strolling down the Pacific cost.

Jul 7, 2013 · 1 min · 59 words · Xavier Llorà

Revamping My Blog

I have been away from my blog for quite a long time. I have barely posted anything compelling in the last three years. Most of the updates were the sporadic announcements to ACM SigEvo’s GECCO conference, but event that was spotty at best. Yes, like everybody else, I gravitated toward social media (pick your favorite poison here). I spend quite a bit of time thinking what I wanted to use my blog for. Should it be the same kind of blog? Should I change it under the hood? Should I give it a golden retirement since it seems I have no stories to share anymore? Then in the mist of all this unanswered questions, I realized I wanted my blog to be what it has been all along. It is whatever I need it to be. Yes, some thoughts are faster to share on ephemeral social media outlets, but there are things you want to keep around longer. Hence, I decided to start a face lift as part of this renewed path. Talking about look and feel, I kept it pretty similar as you may have realized. No big changes, mostly layout updates, removing as much clutter as possible, a bit of font sprinkling here and there, but eventually trying to keep it pretty much the same. I guess that I like the cozy feeling of it feeling familiar. However, one thing I decided to change, after people I care deeply kept insisting that I should, was to build a more permanent home, as I mentioned earlier, for those moments you want to keep around long after the social media rapid timing has digested them into oblivion. Curating photos into gift wrapped packages you find while window shopping was one of those itches that help drove change. As a result of it, you may now see a photo stream top main menu entry. It is a running stream of some of the photos I share on my G+ profile. Under this running photo stream, you will find soon some of those gift-wrapped packages containing some of the photos I cannot shake away. Today, I am adding one. Make sure you check it out. Will this revamping of the blog make me post more often? That is another story. ...

Jul 5, 2013 · 2 min · 378 words · Xavier Llorà