Updated Site and Updated Looks

Here we go! It has been a while. I finally got around getting rid of WordPress for this site. The amount of functionality and machinery required to just render a simple blog started to show its age. I just wanted a simple, easy to update, website. Eventually, I settled for Hugo, a fast framework to create websites. Moving out of WordPress required the following steps: Go to the managed WordPress installation and get an export of all posts and pages. Download all the files uploaded that are part of the site content. After multiple failed attempts, blog2md turned out to be the tool that got me the farther. It converted the export into a collection of markdown files for each post and page. It also output files for contents, but I discarded those since most of them were old ping backs. Then, quite a bit of manual clean up. Shortcodes for embedded content etc. needed to be converted to Hugo’s shortcodes. I could have automated, but the numbers were small and I also wanted to reread all the content. Move the uploads to the right place and make sure all markdown correctly links to it. At this point, I was able to create and bring up the Hugo development server locally using some random theme so I could see a working version of how the site would work. After this milestone, yes, a few more hours cleaning up content but now everything was quick to iterate. Once all the content was ready, time to move to the looks. ...

Mar 28, 2020 · 2 min · 314 words · Xavier Llorà

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à