Pros and Cons of Alternative Function Syntax in C++

C++11 introduced an alternative syntax for writing function declarations. Instead of putting the return type before the name of the function (e.g. int func()), the new syntax allows us to write it after the parameters (e.g. auto func() -> int). This leads to a couple of questions: Why was such an alternative syntax added? Is it meant to be a replacement for the original syntax? To help you with these questions, the present blog post tries to summarize the advantages and disadvantages of this newly added syntax.
Read More

Implementing DBSCAN from Distance Matrix in Rust

We will implement the DBSCAN clustering algorithm in Rust. As its input, the algorithm will take a distance matrix rather than a set of points or feature vectors. This will make the implemented algorithm useful in situations when the dataset is not formed by points or when features cannot be easily extracted. The complete source code, including comments and tests, is available on GitHub.
Read More

Computing Context Triggered Piecewise Hashes in Rust

This post introduces my Rust wrapper for ssdeep by Jesse Kornblum, which is a C library and program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length. In contrast to standard hashing algorithms, CTPH can be used to identify files that are highly similar but not identical.
Read More

A LaTeX Template For Responses To Referees’ Reports

Upon sending a revised version of a submitted paper to a journal, one is generally required to enclose a statement on the revision based on the referees’ report. In this statement, you basically respond to comments from the referees. A friend of mine asked me whether I could publish the LaTeX template I have been using for writing such statements. Well, here you go :).
Read More

My Tmux Configuration

Tmux is a great tool that allows you to have separate terminal sessions inside a single terminal window. Inside each session, you can have multiple windows, and each window can be separated into multiple panes. Take a look at this screenshot to get an idea. In this post, I would like to share and explain my configuration of this tool. Hopefully, you will find some nice tweaks in there that will help you to speed up your workflow.
Read More

Structures and Member Initializers in C++

Since C++11, one can put the initialization of data members directly into structure or class definition. However, this change has consequences with regards to the construction of such structures. Indeed, by adding member initializers into a structure may render your previously working code non-compilable. In the present post, I describe this change, the related issues, and explain how to get around them.
Read More