News

wxWidgets 3.1.2 released

New 3.1.2 release of wxWidgets, free and open source library for creating native GUI applications, is now available. 

wxWidgets 3.1.2 Release

by wxWidgets

About the release:

There have been more than 1200 commits from 75 contributors (41 with multiple contributions) since 3.1.1, which makes it difficult to summarize them in this short post. The primary focus of this release is on bug fixes (closing more than 100 bugs from wxTrac) and incremental improvements in preparation for the next stable 3.2.0 release, however there is a usual lot of new features as well, including:

Initial support for macOS 10.14 and its dark mode.
Support for non-integer font sizes and arbitrary font weights.
New wxLZMA{Input,Output}Stream classes.
Add wxDataViewToggleRenderer::ShowAsRadio(), wxDisplay::GetPPI(), wxGrid::SetCornerLabelValue(), wxHtmlEasyPrinting::SetPromptMode(), wxJoystickEvent::GetButtonOrdinal(), wxToolbook::EnablePage().

Standard Ranges--Eric Niebler

Coming soon.

Standard Ranges

by Eric Niebler

From the article:

As you may have heard by now, Ranges got merged and will be part of C++20. This is huge news and represents probably the biggest shift the Standard Library has seen since it was first standardized way back in 1998.

This has been a long time coming. Personally, I’ve been working toward this since at least November 2013, when I opined, “In my opinion, it’s time for a range library for the modern world,” in a blog post on input ranges. Since then, I’ve been busy building that modern range library and nailing down its specification with the help of some very talented people.

Future blog posts will discuss how we got here and the gritty details of how the old stuff and the new stuff play together (we’re C++ programmers, we love gritty details), but this post is strictly about the what...

span: the best span--Barry Revzin

An answer.

span: the best span

by Barry Revzin

From the article:

This post is a response to RangeOf: A better span, which has many problems worth addressing in detail. While most of this post will deal with specifically std::span<T> (which is indeed the best span), the last section will also discuss a recent addition to the standard library: std::ranges::subrange<T*>...

Haifa::C++ meetup - Future direction of C++ and C++20: on the road towards heterogeneous programming

The upcoming Haifa::C++ meetup (Dec. 18) will feature a special talk:

Future direction of C++ and C++20: on the road towards heterogeneous programming

By Michael Wong

From the event description:

C++ 20 is sure to be a major release but have you ever wondered if there is a direction to C++?
The first half of this talk will devote to the Directions Groups' description of where future C++ is heading and show some of the features that have already landed towards C++20. Next, the current status of parallel programming support in C++ will be discussed, along with an outline of the upcoming features related to parallelism in C++20 and TSs. Lastly, the way C++ moves towards heterogeneous support will be highlighted, describing changes that started in C++11 with lambda, pushed forward with C++17 with Thread of Execution, and soon to enter C++20 with executors. These form a subtle but definite direction towards heterogeneous programming support.

 

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.

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).