POSIX / System V Shared Memory vs Threads Shared Memory

I’ve been playing around with POSIX Shared Memory and I decided that I should write a bit on the different options when it comes to shared memory. So this is going to be a bit of a comparison between shared memory with POSIX Threads, POSIX Shared Memory objects but also a random collection of facts. Also I guess I should begin stating my main source of information: The Linux Programming Interface by Michael Kerrisk. This book is worth every penny. ...

February 22, 2015

Review of Learning Game AI Programming with Lua

I was approached by Packt Publishing to checkout a new book they published called Learning Game AI Programming with Lua by David Young. They gave me a copy of the ebook and I agreed on taking a look. I should say that when I read the title I though it will be a book about Game AI in the sense of finding your way in a maze, and stuff like that. But I was happily surprise to find that it’s about Game AI on a First Person Shooter perspective. It comes with an already setup framework that they call the “AI Sandbox” that provides an environment to actually try out the examples in a 3D rendered environment that actually look pretty decent. ...

February 10, 2015

Compute AES CMAC using OpenSSL/libcrypto

When I googled on how to perform the AES CMAC calculation using OpenSSL/libcrypto I couldn’t find any code example. I was no even sure that there was support for it of libcrypto so I downloaded the OpenSSL sources and dig into them until I found crypto/cmac/cmac.c. From there it was obvious that there is support for CMAC and that it follow the *{Init,Update,Final} pattern found in EVP api. So I give it I try and I’m sharing the basic source code here for later reference: ...

February 5, 2015

Comparing Hypervisors, LXC and Docker

I’ve been playing lately with virtualization technology and was struggling to understand how the hypervisors like QEMU/KVM , LXC and Docker related. So once I figured it out I decided I should write it down. ...

September 15, 2014

SSH Port forwarding through multiple hops [.ssh/config]

Anybody that have to work with lab at work knows the pain of connecting to them. Usually labs don’t have direct connectivity to the “regular” network and to connect to them involves a series of jumps though different machines. Just SSH connectivity is painful in those scenarios let alone port forwarding. Fortunately you can setup your ~/.ssh/config in such a way that will automate most of it, if not all. ...

June 10, 2014

rvm install 1.9.3 fails with 'configure: error: ANSI C-conforming const and volatile are mandatory'

So you tried rvm install 1.9.3 and that fails with a cryptic ANSI C-conforming const and volatile are mandatory… Well, here is how I solved it: ...

April 2, 2014

MCP23018 I2C communication advice

The past few pays I’ve been trying to get the MCP23018 working with the Teensy 2.0. I’m doing this to replace the firmware in my ErgoDox with my own since I can’t the the original ergodox-firmware to work. Finally I got the Teensy<->MCP23018 communication working so here is a summary of my experience. ...

January 16, 2014

Accessing C++ objects from Lua

Continuing the post about lua integration with C++. Now to more serious stuff. Let’s try to write a wrapper for a std::list<int>. Imagine that you have a std::list<int> in your C++ that you want to share with the Lua enviroment. So both C++ and Lua can access the list. ...

December 9, 2012

Sublime Text 2 integration with RVM and Rspec: Take number 2

On a previous post I’ve talk about how to get Sublime Text 2 to honor the .rvmrc files when executing both regular ruby and rspec. The solution described there, as pointed out in in the comments, is non-optimal. Correcting the old post seemed like a lot of work so I will prefer to post something new. ...

December 7, 2012

GDB posix_spawn failed on Mac OS X Mountain Lion

If you can’t debug with ddd or gdb on Mac OS X Mountain Lion due to posix_spawn failed error then just run sudo gdb or sudo ddd instead. ...

November 28, 2012