Thoughts Heap

A Blog by Roman Gonzalez.-

RSS
Sep
22nd
Thu
permalink
Don’t, Please ***don’t*** install puppet 2.7.3 with Ruby 1.9.2 ever, a freaking afternoon can be spent on that!

Me.

Thanks to this guy for pointing me in the right direction.

Stupid puppet and stupid ruby 1.9.2

Sep
20th
Tue
permalink

Loading package double-conversion- … <command line>: can’t load .so/.DLL for: stdc++ (libstdc++.so: cannot open shared object file: No such file or directory)

Recently I’ve been playing with the aeson library in Ubuntu oneiric, unfortunately I ran across this compilation error:


Loading package double-conversion-0.2.0.1 ... : can't load .so/.DLL for: stdc++ (libstdc++.so: cannot open shared object file: No such file or directory)

After a lot of investigation, I found a ticket on the Ttrac site of GHC that came up with a solution, I will summarize here so you don’t have to read the ticket yourself:

hvr:

If you are on a Ubuntu-like distribution and don’t mind exposing libstdc++.so you can link, you could symlink it to /usr/local/lib, e.g.


$ ln -vs $(gcc --print-file-name=libstdc++.so) /usr/local/lib/
`/usr/local/lib/libstdc++.so' -> `/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so'

basvandijk:

Note to others: I needed to do a

sudo ldconfig

after this to update my cache

Hope this helps.

Sep
19th
Mon
permalink

Crawler implementation in Haskell

Today at Noomii I was getting some new requirements for our crawler that is implemented in Ruby. The requirement list was quite dense, and I was wondering if it was a good idea to implement this functionality in Haskell :-).

Later, after finishing the morning scrum meeting, I got my hands on Bryan O’Sullivan’s slides from the StrangeLoop conference, I was really interested in checking them out, given that I’m looking for better approaches to teach Haskell myself at the Vancouver unMeetup. What a surprise when I see an implementation of a Crawler on the presentation, the timing is so perfect it just makes me wonder is fate.

If you are a Haskell aficionado you will find this presentation pretty entertaining

When you know you like a language, you just know…

Sep
18th
Sun
permalink
permalink
Elegance and familiarity are orthogonal

Rich Hickey (author of Clojure)

Meaning: Unless you are familiar with a concept/language etc, you are not able to tell if something is elegant or not.

Sep
16th
Fri
permalink
All the adversity I’ve had in my life, all my troubles and obstacles, have strengthened me… You may not realize it when it happens, but a kick in the teeth may be the best thing in the world for you.

Walt Disney.

Personal note: On the hardest times, just remember this.

permalink

Using and Parsing Dates in Haskell

Recently I’ve been playing around with the Github API, and I wanted to do some code using Haskell. I’ve been using several libraries like aeson, enumerator, http-enumerator, among others.

One of the details I was really concerned about was the time structures in Haskell, I didn’t know exactly which module to use, and there were at least two options:

After investigating a little bit about each, I settled down with Data.Time.Clock. The main reason to use it, was because this is the lib that Bryan O’Sullivan uses in his aeson library, and by seeing how he used it, I discovered how to parse dates from Strings easily in Haskell; using the Data.Time.Format, one has utility methods to parse strings into UTCTime. I did some handy code to parse the dates out of the Github api like so: I really recommend reading the aeson library, is one of a kind.

Aug
29th
Mon
permalink

Do yourself a favor…

Never compile ghc-platform… ever, it took me around 12 hours to finish compilation, not fun at all.

permalink
Aug
24th
Wed
permalink
Any fool can write code that computers can understand. Good programmers write code that humans can understand

Martin Fowler (via edgar)