Marcel Fahle

Tough guy.

Custom Compilers With CodeKit

Recently I needed to do some static HTML stuff and wanted to use Haml for this. LiveReload, which I’m using since quite some time, lets you setup watchfolders and compiles all kinds of stuff for you like CoffeeScript, LESS, Sass and Haml. Unfortunately it would only accept the hash syntax used in ruby prior 1.9 and that’s because LiveReload uses my system ruby by default, which is 1.8.7.

shit adds up
1
2
3
%html{lang: 'en'}
vs
%html{:lang => 'en'}

It gives you the option to switch to another ruby version, but doesn’t support installations via rbenv (it will probably be introduced in version 3 of LiveReload). I read somewhere that RVM is supported, but I can’t validate this.

Long story short, I needed a different compiler to take advantage of the new syntax. Since I like the watchfolder simplicity of LiveReload, I took a look at CodeKit. From what I can say right now is, on the compiler end it does basically the same thing as LiveReload (please correct me if I’m wrong, I’m only using it for like 5 seconds), but offers a bit more flexibility when choosing your compiler. In my case I just went into the settings for Haml and pointed to the Haml binary inside my latest ruby installation (~/.rbenv/versions/1.9.3-p194/bin/haml), et voilĂ : Ruby 1.9 syntax in Haml.

Hello World

The blog is back, yay! Unfortunately I wasn’t able to save the data from my last blog, but that doesn’t really matter since the subject will mostly change anyway. It will still be mostly work related stuff, but since I shifted away from AS3 programming a while ago, most of the things you’ll find here is Ruby and JavaScript related.

To be more specific, these days I enjoy working with Rails, CoffeeScript, backbone.js and the shell, so expect a lot of that. I’ll also put all those things in here, I learned in my daily work life and want to remember in the future. That could range from highly advanced jedi tricks to absolutely beginner one-liners even your mother knows, but somehow I happened to just find out about. If I want to remember it, it’ll land in here, no matter how trivial it is.

So that paired with a few paragraphs on the projects I’m working on here and there and some personal things I’m interested in, like filmes and books and stuff, should lead to a collection of pretty awesome content, don’t you think?

Oh, and I’m doing the whole thing now in Octopress and vim, so bear with me if the look and feel of this blog will change a lot in the first days/weeks.

That being said, thanks a lot for stopping by and I hope you enjoy the ride.

Marcel Fahle, August 2012