C++ Multiple Return Values

Posted by & filed under Uncategorized.

With a complex application, it is often convenient to have a function that returns not just one value. There are many different ways to achieve this in C++, from using a structure to taking advantage of the latest C++ 11 tuple class template. The obvious choice, returning an object, seems a bit overkill in many… Read more »

Towards ECMAScript 6 with Esprima 2

Posted by & filed under Uncategorized.

Little did I know that the start of my adventure with Esprima three years ago will result in something beyond my expectation. While the syntax tree format used by Esprima is not original (see SpiderMonkey Parser API), this de-facto format gains a lot of traction since it provokes a Cambrian explosion of composable JavaScript language… Read more »

SMTP Bar Joke and EHLO

Posted by & filed under Uncategorized.

Some time ago, I came up with a bar joke involving SMTP. Since I need to explain it a couple of times, I thought I just write it down as a blog post for future reference. The joke goes like this (as a tweet): A man walks into an SMTP bar. He says, "EHLO guys!"…. Read more »

C++ Class and Preventing Object Copy

Posted by & filed under Uncategorized.

In some cases, an instance of a C++ class should not be copied at all. There are three ways to prevent such an object copy: keeping the copy constructor and assignment operator private, using a special non-copyable mixin, or deleting those special member functions. A class that represents a wrapper stream of a file should… Read more »