August 2018

CppCast Episode 165: Formal Verification with Matt Fernandez

Episode 165 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Matt Fernandez from Intel Labs to discuss Formal Verification.

CppCast Episode 165: Formal Verification with Matt Fernandez

by Rob Irving and Jason Turner

About the interviewee:

Matthew Fernandez is a Research Scientist with Intel Labs. Matt began his programming career building Windows GUI applications and designing databases, before moving into operating system architecture and security. He has a PhD in formal verification of operating systems from the University of New South Wales in Australia, and worked with the Australian research group Data61. In the past, he has worked on compilers, device drivers and hypervisors, and now spends his days exploring new tools and techniques for functional correctness and verification of security properties. On the weekends, you can usually find Matt in a park with a good book, hunting for good coffee or helping a newbie debug their code. He hopes to avoid saying “monad” on this podcast.

CppCon 2017: Building Better Worlds: Developing a Procedural City Tool for Alien...--Alan Bucior

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Building Better Worlds: Developing a Procedural City Tool for Alien...

by Alan Bucior

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

When MPC was asked to create a massive CG city for the film Alien: Covenant, they looked to leverage procedural generation as a means for iterating on the overall shape and structure of the city, in place of a prohibitively large team of environment artists. After evaluating all the practical third party options, it was ultimately decided that the best option was to build a custom tool to procedurally assist artists' city-building skills. This allowed for rapid iteration on the overall look of the city by striking a balance between manual and procedural techniques.

The core algorithms were written in C++ for speed. The user interface was written in Python to accommodate quick feature changes, and a dash of Fabric Engine's KL helped with model import and rendering. This multi-language approach allowed the consistent application of the "best tool for the job" rule, which is a common pattern at MPC, allowing flexible teams with experts in a variety of skillsets.

This talk will detail the history and development of MPC's city building tool, "Machi". Alan Bucior, Lead Developer of Machi, reviews the algorithms for city layout and building placement, discusses how to implement algorithms in an artist-driven manner, and shares various insights gleaned through the development process and discussion with stakeholders.

Use the official Boost.Hana with MSVC 2017 Update 8 compiler--Bat-Ulzii Luvsanbat

Getting more conforming!

Use the official Boost.Hana with MSVC 2017 Update 8 compiler

by Bat-Ulzii Luvsanbat

From the article:

We would like to share a progress update to our previous announcement regarding enabling Boost.Hana with MSVC compiler. Just as a quick background, Louis Dionne, the Boost.Hana author, and us have jointly agreed to provide a version of Boost.Hana in vcpkg to promote usage of the library among more C++ users from the Visual C++ community. We’ve identified a set of blocking bugs and workarounds and called them out in our previous blog, and stated that as we fix the remaining bugs, we will gradually update the version of Boost.Hana in vcpkg, ultimately removing it and replacing it with master repo. We can conduct this development publicly in vcpkg without hindering new users who take a dependency on the library...

Modern C++: 7 Ways to Fake It Until You Have It--Jonathan Boccara

If you want.

Modern C++: 7 Ways to Fake It Until You Have It

by Jonathan Boccara

From the article:

Do you wish you had a later version of C++ in your production code? If you do, you’re not alone: a lot of C++ developers today don’t work with a compiler that supports the latest version of the standard.

It could be for many reasons: perhaps you have a lot of legacy code to migrate, or your clients do, or your hardware doesn’t have the adequate infrastructure yet. The point is, you can’t benefit from the latest features that the language offers, and that’s a shame because some of them would surely make your code more expressive.

But even if you can’t use those features, you don’t have to give up on their benefits. At least some of their benefits. There are way you could use the ideas of the new features in your code, to convey your intents more precisely.

Sure enough, it’s not as good as having them natively, which is why updating your compilers is still a necessity. But in the meantime, here are 7 ways to emulate those features, that will improve your code at a minimal cost...

Data-Oriented Design and Avoiding the C++ Object-Oriented Programming Zimmer Frame -- Leigh Johnston

An article about the increasing importance of data-oriented design within the context of C++.

Data-Oriented Design and Avoiding the C++ Object-Oriented Programming Zimmer Frame

by Leigh Johnston

From the article:

Object-oriented programming, OOP, or more importantly object-oriented design (OOD) has been the workhorse of software engineering for the past three decades but times are changing: data-oriented design is the new old kid on the block.

Use the official Boost.Hana with MSVC 2017 Update 8 compiler--Ulzii Luvsanbat

The vcpkg version of Boost.Hana now just points to the official master repo, instead of VC++ Team fork:

Use the official Boost.Hana with MSVC 2017 Update 8 compiler

by Ulzii Luvsanbat

From the article:

We would like to share a progress update to our previous announcement regarding enabling Boost.Hana with MSVC compiler. Just as a quick background, Louis Dionne, the Boost.Hana author, and us have jointly agreed...

CppCon 2017: Meta--Andrew Sutton

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Meta

by Andrew Sutton

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

For the past several years, I have been researching new languages to support safe and efficient network protocol processing, specifically for software-defined networking applications. The unfortunate outcome of that research is this conclusion: any language for that domain must also be a general purpose programming language. This is not an easy thing to do. Many of the language features I worked with simply generated expressions to compute packet and header lengths, read and write packet fields, and encode and decode entire packets. If we could do this in C++, I might not need an entirely new language.

Over the past year, Herb Sutter and I have collaborated to work on language support for compile-time programming, static reflection, metaclasses, and code generation in the C++ programming language. These facilities completely eliminate the need for the external tools, metacompilers, and domain-specific languages on which we frequently rely to generate high-performance encoders and decoders in C++.

In this talk, I will discuss how to use these evolving proposals to create facilities for encoding and decoding packets. In particular, I will discuss the background requirements of my work, the overall design of a network protocol library, and the reflection and generation facilities that implement the library.

Preprocessing Phase for C++17's Searchers--Bartlomiej Filipek

Searchers objects.

Preprocessing Phase for C++17's Searchers

by Bartlomiej Filipek

From the article:

Searchers from C++17 are a new way to perform efficient pattern lookups. The new standard offers three searchers: default_searcher , boyer_moore_searcher and boyer_moore_horspool_searcher. The last two implements algorithms that require some additional preprocessing for the input pattern. Is there a chance to separate preprocessing time from the search time?

Spaceship Operator--Simon Brand

The future?

Spaceship Operator

by Simon Brand

From the article:

You write a class. It has a bunch of member data. At some point, you realise that you need to be able to compare objects of this type. You sigh and resign yourself to writing six operator overloads for every type of comparison you need to make. Afterwards your fingers ache and your previously clean code is lost in a sea of functions which do essentially the same thing. If this sounds familiar, then C++20’s spaceship operator is for you. This post will look at how the spaceship operator allows you to describe the strength of relations, write your own overloads, have them be automatically generated, and how correct, efficient two-way comparisons are automatically rewritten to use them...