Deploying Yesod applications with Keter May 4, 2017

Keter is the Yesod’s deployment system, fully featured and a joy to use, but there are some pitfalls that the documentation doesn’t cover, and that the user has to find out for her self; So I’ll try to give them away here together with a walk-through tutorial.

Although Keter is flexible and general enough to be used with various kind of applications and web frameworks, here I’m going to assume you’re using it to deploy Yesod applications. Moreover, I’ll assume you’re using Yesod’s scaffolding, as it is the preferred way to write production ready applications.

What's wrong with Java? April 14, 2017

I’ve spitted out quite a bit of rant about Java before in this post, in which I basically list the annoyances that the ecosystem around Java imposes and how those problems are pretty much a big intersection with the problems of IDEs.

Here I’d like to talk about the problems of Java as a language. Although there are a few problems with Java, I can live with them if I have no other option but to write Java code; My hate to Java doesn’t really arise from Java being a bad language but rather from its surroundings.

Using Cassius (Shakespearean template) with Hakyll April 11, 2017

As a user of the Yesod framework, I’ve came to know and love the Cassius CSS templating language, although its reliance on Template Haskell is meant to fit better with the Yesod’s needs and makes it a bit cumbersome to use everywhere else, I still like the templating language itself and its features a lot.

That’s why I used it for styles generation in Silly Bytes together with Hakyll. In this post I will describe the process.

From Blogger to Hakyll April 10, 2017

Hakyll is an amazing static site generator written in Haskell, it allows for blog posts to be written in markdown, that are then compiled with pandoc, and is very well suited to be used with GitHub pages; It’s everything I wanted and more.

Silly Bytes went through its first 5 years of existence hosted on Google’s Blogger service, and it did well. Although Blogger offers a fair amount of flexibility, you can’t have total control over it, and having to write posts with the built in WYSIWYG interface or pasting the HTML output is one of the bigger pain points of it. I solved most of that by writing a CLI tool that allows me to write my posts offline in markdown, compile them, and deploy them from my terminal leveraging the Blogger’s convenient API. But I still have the feeling that it isn’t good enough.

In this post I will describe the process of porting an existing Blogger blog to Hakyll and GitHub pages using Silly Bytes itself as a case study.

How do I blog? - Blogger posts from markdown and CLI September 23, 2016

There are plans to migrate Silly Bytes to Hakyll and GitHub pages, but till then I’m still using Blogger and I wanted to make the posting process as painless and automatic as possible.

Every post I write is currently a separate git repo hosted on the Silly Bytes GitHub organization. The post is written and maintained in Markdown using Pandoc and a convenient Makefile generated by the made script.

Writing posts in Markdown is nice but is not very useful if you still have to mess around with Blogger’s web interface, so here is the plan:

  • Write post in Markdown
  • Use made to generate a Makefile
  • Generate HTML with the Makefile $ make
  • Push the HTML post to Blogger using Google APIs

Gentle introduction to STM32 ARM Cortex microcontrollers and boards programming September 11, 2016

So you have been using AVR, PIC or some other microcontroller for a while and discover that ST Microelectronics offers some pretty cheap 32 bit ARM and feature rich microcontrollers: STM32, and want to start playing with them but don’t know how or where to start; I’m here to help.

ARM is taking over the embedding wold, they’re ubiquitous in smart phones, tablets, laptops, other computers, cars, refrigerators, microwave ovens, monitors, printers, you name it!

Note: Be aware that ARM is an architecture that manufacturers can implement. Is a common mistake to think ARM is a microcontroller on itself, it is not.

TDD (Test-Driven Development) Physical Traffic Light August 28, 2016

Robert C. Martin (Uncle Bob) said in a talk:

Imagine you have a button that you can push, it will test your code and if everything is working a green light will come up, but if something is broken, a red light will come up […]

He was of course talking about TDD. I got inspired to build this little toy.

Hardware schematics, firmware and host software is available in this Github repo. Along with information on how to compile and use.

This is a physical toy traffic light to be used with software development TDD (and testing in general) tools. It will not boost your productivity nor make you a better programmer or TDD practitioner, but it looks cool :)

Lets explain how it works, it’s very simple:

Vim + Haskell August 11, 2016

So you’re writing in the right language using the right tool already, but let’s put some extra magic under our sleeves.


  • Omnicompletion
  • Compilation and testing
    • Building
    • Testing
  • GHCI integration
  • Hoogle integration
  • Convenient mappings
    • Argument text object
    • Jump to importations
    • Jump between functions
  • Ghc-mod integration
    • Type inserting
    • Case splitting
    • Type asserting
  • Hlint integration
    • Linting
    • Managing the locationlist
  • Code formatting
    • Hindent integration
    • Trailing white space
    • Trailing blank lines
    • Spaces over tabs
  • Easy arrows generation
  • Types abbreviations
  • Yesod Haskell web framework

PIC16F876A conversión analógica digital + UART (Ensamblador) July 14, 2016

NOTE: This post is available in Spanish only. Please use a software translator.

He dejado de usar microcontroladores PIC por los motivos explicados aquí; Pero voy a dedicar este post para escribir y explicar un programa sencillo escrito en ensamblador para el PIC16F876A.

El objetivo es el siguiente:

Se desea usar el microcontrolador para llevar a cabo la conversión analógica-digital de una tensión variable (un LDR o un potenciómetro por ejemplo) y transmitir el resultado usando la UART. Además debe ser posible recibir por la UART un byte que debe alterar la configuración del Conversor Análogo Digital (DAC) interno del microcontrolador para, por ejemplo, cambiar el canal de entrada de la señal analógica o modificar la velocidad del reloj de conversión.

Ratpoison, Fuzzy window selection July 13, 2016

A nice feature to have is the ability to jump to an arbitrary window by performing a quick fuzzy search with just a few characters. We can achieve this by using Ratpoison’s flexibility and the fantastic FZF tool.

The script will do the trick using FZF

Aprende Haskell rápido y difícil June 29, 2016

Esta es la traducción al español del artículo Haskell the hard way por Yann Esposito.

TL;DR*: Un corto y denso tutorial para aprender Haskell.

Asómbrate con Haskell

De verdad pienso que todos los desarrolladores deberían aprender Haskell. No creo que todos necesitan convertirse en ninjas de Haskell, pero deberían al menos descubrir que es lo que Haskell tiene para ofrecer. Aprender Haskell abre tu mente.

Seamlessly Vim-Tmux-WindowManager-Monitor navigation June 24, 2016

This Thoughtbot post describes how to make Vim and Tmux work together in Harmony based on this crhistoomey’s plugin, allowing you to traverse both your Vim and Tmux windows and panes respectively.

How to write C in 2016 June 19, 2016

Matt wrote a very interesting and totally recommended post about how to C (as of 2016). Keith Thompson wrote later a very detailed and rather useful critique with some extra notes about Matt’s post. Go ahead and read both articles now.

Here I would like to point out some things about tooling.

From PIC to AVR June 17, 2016

This is my humble contribution to the PIC vs AVR holy war.

TL;DR: I was a PIC user but decided I hate it, switched to AVR and love it!

PIC from Microchip and AVR from Atmel are both wonderful microcontrollers for hobbyist and professional as well (I am a hobbyist only if you’re wondering).

I used to love PIC microcontrollers and originally choose them because they are the most widely available in my location. But there are just so many annoyances that AVR solves so wonderfully!

Firefox control on steroids [Firefox + Ratpoison + Mozrepl] May 27, 2016

I’m not going to lie to you, what you’re about to read is really cool.

Controlling all sort of stuff with Ratpoison, as you can see in my previous posts, is pretty neat and you can extend it to control your browser as well.

These are the current capabilities:

Every command start with the Ratpoison prefix + ‘f’ like in C-t f: