Milhouse on software, engineering, and Emacs.

Tech talk about concurrency in Ruby

TL;DR: I’ve given a talk recently (in pt-br) about the principles of Ruby Concurrency. The video is shown bellow.

Read More

Caveats for interrupting Ruby code

TL;DR: In this brief post I will highlight a problem I faced recently with Ruby while handling interrupts in multi-threaded code.

Read More

Writing a Redis client in pure bash, part 2

TL;DR: In a previous post we built a Redis REPL from scratch using pure bash. In this post we will walk through a refactoring of the original code to turn it into something resembling a library. I will also show some more bash niceties as we go along.

Read More

Writing a Redis client in pure bash, part 1

TL;DR: After 180 hours of Witcher 3 gameplay, it’s time to get back to reality. In this post I will walk through the implementation of a simple cli for Redis using nothing but pure Bash script. This post has absolutely no practical implications other than providing an example to explain some of Bash’s nice features.

Read More

What I'm currently up to

TL;DR: Its been a while since I last posted something over here. In this post I will tell the interested reader what I’m up to recently. If you’re going to consider something from this post, consider this: Stop everything you’re doing and go play The Witcher 3.

Read More

Module prepend as around advices

TL;DR: In this post I will show how you can achieve something like aspect oriented programming’s (AOP) around advice by using plain Ruby modules. I will show examples where this technique can be used to DRY out your code by centralizing cross-cutting concerns.

Read More

Simple Thread Pool in Ruby

TL;DR: In this post I will show how one could implement a simple Thread Pool in Ruby. With this thread pool implementation, We will implement a parallel-ish task runner. Of course this implementation is not “industrial strength”, but it is a fun exercise nonetheless.

Read More