Today, I’m open sourcing protobluff, an extremely lightweight Protocol Buffers implementation for C. It entirely skips the decoding and encoding of messages, allows zero-copy updates and is heavily tested (100% coverage).
Gulp is a modern build system designed around the idea of streaming a set of input files down a pipeline of tasks for automated processing, e.g. concatenation, sourcemap generation, minification, revisioning and many more. LiveReload automatically reloads your application when detecting changes to the source and consists of two parts: a client, implemented as a browser extension (available for Chrome, Firefox, and more) and a server counterpart (we’ll use gulp-livereload, an elegant Gulp integration).
There are many tutorials on setting this up to work with Node.js projects (for starters see here, here and here), but nothing on getting it to work with compiled languages like Golang, so I thought I share my setup.
This is an attempt to provide a lightweight and clean implementation of a generic linked-in driver for communication between Erlang and C/C++ programs. It was designed from the ground up to support multi-threaded, non-blocking operations, has the ability to hold state across calls and is entirely customizable. The rationale behind this generic driver is to provide a default and clean implementation for communication between those two languages and to minimize the need to write boilerplate code.
Of course there is the Generic Erlang Port Driver (GEPD), which lets you generate a driver tailored to your needs by specifying function bindings via C macros. However, this generic linked-in driver implementation takes a different approach and provides the programmer with an easy to use interface without the need to generate any code and without any external dependencies. Additionally, the name of the driver is set via compiler flag, so that multiple instances of the same driver can be compiled and identified by different names without the need for code duplication. This is very handy if you design your program to be configured during compilation and need different configurations.
There’s an example linked-in driver included with the source which demonstrates the features of this implementation. You can dive into the code right away or keep reading for a detailed reference of features and a simple how-to.
The beauty of strange attractors has been fascinating me for a long time. Beside their visual appeal it is stunning that they are the result of really simple mathematical equations producing practically unpredictable numbers over a long period of time.
In this article I introduce and discuss a very simple and compact Processing.js script which is based on a two-dimensional quadratic map and a fractal pattern – a sequence of 12 letters – delivering the coefficients for the quadratic map.
Actually, I am not a physicist – I just like strange attractors from an aesthetic point of view. Okay, I am a bit of a math addict, too. However, it’s not as complicated as it may sound in the first place.
In the process of mining the data collected for my diploma thesis, I ran across a very useful tool called sorted grep which offers significant speed improvements over the common unix tool grep when it comes to very large pre-sorted files.
Traditional logfiles seem to be the first use case one can think of, as they are naturally growing large and have an inherent chronological order. However, there are other cases where sorted grep might be the weapon of choice, as it offers binary search packed in a very reasonable way.
This article will walk you through the setup and usage of the powerful tool sorted grep and give you some ideas where and how to use it.