Beware of C++11 `auto`

Here’s a puzzler for you: given the code below, what does the for loop print? using HandlersMap = std::map<std::string, std::function<std::string(const std::string&)>>; using MetaMap = std::map<std::string, HandlersMap>; void insert(MetaMap& meta, const std::string& key, const std::string& sub) { auto handlers = meta[key]; handlers[sub] = [=](const std::string& msg) { return “The response for ” + sub + ” … More Beware of C++11 `auto`

Detection of Fast-Moving Objects (FOM) using OpenCV

A “fast-moving object” (FOM) in the world of image detection is defined as one whose motion is faster than can be captured by a single image, and will result in a blurred “streak”. This poses some challenges when trying to detect its speed and trajectory, as well as estimating future trajectory and impact. Typical examples … More Detection of Fast-Moving Objects (FOM) using OpenCV

File Encryption Utility now offers file sharing

With the 0.5.0 version just released, crytto now allows file sharing (e.g., via email) by sharing public keys: encrypt_send -o /tmp/my-secret.enc \ -p /home/marco/.ssh/ \ ./my-secret.doc This generates an encrypted file (in the location specified with the -o option) and an equally encrypted “passphrase” which can then be sent (ideally via a separate sharing mechanism; although, as … More File Encryption Utility now offers file sharing

Gossip-based Failure Detectors – 0.8.0 released

We have just released version 0.8.0 of our distlib C++ library that implements a number of popular distributed systems algorithms. This concludes a first iteration of the “SWIM Gossip Protocol” for failure detection: the implementation is now fully thread-safe and can scale up to many servers with minimal process overhead. The gossip_example.cpp toy server shows how a client … More Gossip-based Failure Detectors – 0.8.0 released

File Encryption (and Decryption) Made Easy

A new release of the Crytto library (0.4.0) has just been published, which greatly simplifies encrypting (and decrypting) files The new release adds the decrypt script which, when combined with the existing automatic retrieval of the encryption key from the keystore, makes it a breeze to decrypt files. For example, if you had encrypted your … More File Encryption (and Decryption) Made Easy