C++23

C++23 is complete and pretty much finalized, so let’s explore the new features in C++, from a data science point of view. This is not as large of a release as C++20 or C++11, but it’s still a hefty release with lots of nice new features - larger than C++17.

Some of the major new features are building on themes from C++20, such as vastly expanded ranges and views, more constexpr/consteval, module support for the standard library, std::print to supplement std::format, and a std::generator to support coroutines. There are also several general features, lambdas and classes get along much better now, there are new preprocessor additions (!), a stacktrace library, flat maps/sets, and new std::optional monadics, deducing this, and many various additions.

[Read More]

Announcing CLI11 2.0

CLI11, a powerful library for writing beautiful command line interfaces in C++11, has been updated to 2.0. A lot of deprecated things have been removed, and there was a lot of cleanup under-the-hood; making CLI11 simpler. A few defaults have changed slightly, like better TOML support by default.

CLI11 does a better job than ever understanding any sort of container you provide - complex numbers are natively supported, along with atomic types. A long requested feature, simple version flags, has been added. Subcommands are more customizable. And there have been quite a few bugfixes for rare issues.

[Read More]

C++20

The final meeting for new features in C++ is over, so let’s explore the new features in C++, from a data science point of view. This is the largest release of C++ since C++11, and when you consider C++14 and C++17 to be interim releases, the entire 9 year cycle is possibly the largest yet! It may not feel quite as massive as C++11, since we didn’t have interim releases for C++11 and because C++11 is a much more complete, useful language than C++03, but this is still a really impactful release! This is also the first version to include every major feature from Bjarne Stroustrup’s “The design and Evolution of C++”, also known as D&E, from 1994!

Let’s look at the major new features, as well as collections of smaller ones.

[Read More]

Announcing CLI11 1.6

CLI11, a powerful library for writing beautiful command line interfaces in C++11, has been updated to 1.6, the largest update ever. CLI11 output is more customizable than ever, and has a better functionality separation under the hood.

CLI11 has had the formatting system completely redesigned, with minor or complete customization of the output possible. Configuration files reading and writing also can be configured; a new example with json instead of ini formatting is included. Validators (finally) have custom help output, as well. Many odd corner cases have been made possible, such as interleaving options.

[Read More]

Include What You Use

Include-what-you-use is a promising little tool for cleaning up a codebase. It didn’t end up working for the use I had for it, but it still could be useful. Here is a quick guideline on installing it on macOS.

[Read More]

Comparing CLI11 and Boost PO

CLI11 started years ago as a set of tools built on Boost Program Options (PO), and has since matured into the powerful, easy-to-use stand-alone library it is available today. If you would like to see the original inspiration for CLI11, look at Program.hpp in CLI11 0.1. The rest of the post will focus on a comparison between making a CLI app in the two libraries. I am going to assume that you are preparing fairly basic but non-trivial programs in the following comparison.

TL;DR: CLI11 is more concise, and provides more control with better defaults in many cases, but was inspired by Boost PO.

[Read More]