SG20 Education and Recommended Videos for Teaching C++ -- Christopher Di Bella

In today’s blog, we look at both the newly minted Study Group for education in the C++ Standard Committee. We also look at a small number of conference videos that I recommend teachers consider while they’re waiting for this Study Group to produce usable materials.

SG20 Education and Recommended Videos for Teaching C++

by Christopher Di Bella

From the article:

As articulated in P1231, the goal of SG20 is not to provide normative curricula for teaching C++, but rather to provide teaching and curriculum guidelines.

...

Below are a list of conference videos that I’ve compiled for teachers to watch (and will update if recommendations come in). There’s well over a day’s worth of videos below, but these aren’t a random assortment of my favourite conference videos. Rather, they are sessions that communicate values about:

  • teaching people how to write programs using C++, or
  • writing C++ programs using approaches the community agrees produce better code.

CppCast Episode 178: Performance Analysis and Optimization with Denis Bakhvalov

Episode 178 of CppCast the first podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Denis Bakhvalov from Intel joins us to talk about C++ Performance Analysis and Optimization.

CppCast Episode 178: Performance Analysis and Optimization with Denis Bakhvalov

by Rob Irving and Jason Turner

About the interviewee:

Denis is a C++ developer with almost 10 years of experience. Denis started his journey as a developer of desktop applications, then moved to embedded and now he works at Intel, doing C++ compiler development. He enjoys writing the fastest-possible code and staring at the assembly. Denis is a father of 2, he likes to play soccer and chess.

Madrid Cpp meetup: Bare metal programming

New Madrid C++ comin' atcha:

Embedded systems: Bare metal programming

By Madrid C/C+

In Spanish from the event brief: 

Acabamos el año con uno de los meetups más esperados de la temporada: sistemas embebidos. Nos adentramos en un terreno inexplorado por muchos de nosotros, pero que tienen gran relevancia en el mundo industrial: IoT, domótica, industria del automóvil,...

An Extraterrestrial Guide to C++ Formatting--Victor Zverovich

The future of now.

An Extraterrestrial Guide to C++ Formatting

by Victor Zverovich

From the article:

Consider the following use case: you are developing the Enteropia[2]-first Sepulka[3]-as-a-Service (SaaS) platform and have a server code written in C++ that checks the value of sepulka’s squishiness received over the wire and, if the value is invalid, logs it and returns an error to the client. Squishiness is passed as a single byte and you want to format it as a 2-digit hexadecimal integer, because that is, of course, the Ardrite[1] National Standards Institute (ANSI) standard representation of squishiness. Let’s implement the logging part using different formatting facilities provided by C++...

Quick Q: Is it useful to pass std::weak_ptr to functions?

Quick A: yes

Recently on SO:

Is it useful to pass std::weak_ptr to functions?

Consider this toy example.

struct PointerObserver
{
    std::weak_ptr<int> held_pointer;

    void observe( std::weak_ptr<int> p )
    {
        held_pointer = std::move(p);
    }

    void report() const
    {
        if ( auto sp = held_pointer.lock() )
        {
            std::cout << "Pointer points to " << *sp << "\n";
        }
        else
        {
            std::cout << "Pointer has expired.\n";
        }
    }
};

In this example, a function observe holds state.

Its weak_ptr parameter communicates that this smart pointer is not owning, but reserves the ability to own at a later time, safely detecting if the pointer has expired.

How to build a JIT compiler in C++ with LLVM -- Mark Leone

At the December 2018 meetup of Utah C++ Programmers, Mark Leone will give us a presentation on how to build a JIT compiler in C++ with LLVM. Food will be provided, so please RSVP so we have a proper headcount.

How to build a JIT compiler in C++ with LLVM

by Mark Leone

About the meetup:

In this talk I'll show how to compile a simple programming language into machine code using the LLVM compiler toolkit. I'll start with a simple lexer (using re2c) that converts a stream of characters into a stream of tokens (e.g. numbers and identifiers), followed by a simple parser (using recursive descent) that produces a syntax tree. Then I'll show how to generate LLVM intermediate code (IR), optimize it, and generate machine code using the LLVM JIT engine. Full source code will be available afterwards.

No compiler experience will be required, although a reasonable familiarity with C++ will be assumed. Check out the LLVM Tutorial for a preview of similar material.

About the speaker: Mark Leone has been working with C++ as a graphics software engineer for 20 years. He recently joined the OptiX ray tracing team at NVIDIA here in Salt Lake City. He has over two dozen movie credits for his previous work at Pixar and Weta Digital (in New Zealand).

How to optimize C and C++ code in 2018--Iurii Krasnoshchok

Are you aware?

How to optimize C and C++ code in 2018

by Iurii Krasnoshchok

From the article:

We are still limited by our current hardware. There are numerous areas where it just not good enough: neural networks and virtual reality to name a few. There are plenty of devices where battery life is crucial, and we must count every single CPU tick. Even when we’re talking about clouds and microservices and lambdas, there are enormous data centers that consume vast amounts of electricity.

Even boring tests routine may quietly start to take 5 hours to run. And this is tricky. Program performance doesn‘t matter, only until it does.

A modern way to squeeze performance out of silicon is to make hardware more and more sophisticated...

Trip Report: C++ Standards Meeting in San Diego, November 2018--Botond Ballo

New trip report.

Trip Report: C++ Standards Meeting in San Diego, November 2018

by Botond Ballo

From the article:

A few weeks ago I attended a meeting of the ISO C++ Standards Committee (also known as WG21) in San Diego, California. This was the third committee meeting in 2018; you can find my reports on preceding meetings here (June 2018, Rapperswil) and here (March 2018, Jacksonville), and earlier ones linked from those. These reports, particularly the Rapperswil one, provide useful context for this post...