community

CppCon 2016: STL Algorithms - why you should use them, and how to write your own--Marshall Clow

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

STL Algorithms - why you should use them, and how to write your own

by Marshall Clow

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

One of the most powerful features of the C++ standard library is the collection of basic algorithms. Everyone knows about sort and copy, but there are is a lot of powerful capabilities in the other algorithms as well. In this talk, I will explore some of the algorithms in the library, and give a rationale for writing your own, along with examples.

The motivation for writing your own algorithms is that you can create generic building blocks that can be used over and over again in your library or application, and which will allow your to program at a higher level of abstraction. Instead of thinking, "how do I sort this vector", you just call std::sort. The same should apply to the algorithms that are specific to your domain - once you write them.

CppCon 2016: Garbage In, Garbage Out: Arguing about Undefined Behavior...--Chandler Carruth

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

Garbage In, Garbage Out: Arguing about Undefined Behavior...

by Chandler Carruth

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

There has been an overwhelming amount of tension in the programming world over the last year due to something that has become an expletive, a cursed and despised term, both obscene and profane: **undefined behavior**. All too often, this issue and the discussions surrounding it descend into unproductive territory without actually resolving anything.

In this talk, I'm going to try something very bold. I will try to utterly and completely do away with the use of the term "undefined behavior" in these discussions. And I will unquestionably fail. But in the process of failing, I will outline a framework for understanding the actual root issues that the software industry faces here, and try to give constructive and clear paths forward, both for programmers and the programming language.

And, with luck, I will avoid being joined on stage by any unruly nasal demons.

C++ Online Compilers--Arne Mertz

Did you ever use them?

C++ Online Compilers

by Arne Mertz

From the article:

Online compilers can be useful tools to quickly compile a snippet of code without having to install a proper compiler on our computer. They can be especially useful to play with the newest language features, to share code snippets online or to compare different compilers...

corsl - Coroutine support library--Alexander Bessonov

Interesting library

corsl - Coroutine support library

by Alexander Bessonov

From the article:

corsl stands for "Coroutine Support Library" and consists of a number of utility classes and functions that simplify asynchronous programming in Windows. It is inspired by an amazing cppwinrt library, developed by Microsoft.

cppwinrt was created as a language projection for Windows Runtime, which is supported by Windows 8 or later operating systems. It is impossible to use in prior Windows versions.

One of the goals of corsl library was being able to use it under Windows Vista or later operating system...

C++Now 2017--Michael Park

Trip report!

C++Now 2017

by Michael Park

From the article:

I just returned from C++Now 2017 in Aspen, CO. This was my second time attending the conference and it was just as amazing as last year. My girlfriend decided to come along this time, since Aspen is such a beautiful place. We flew into Denver, rented a car and took the beautiful 4-hour drive into Aspen. She was very happy ��. Strongly recommended...

ACCU 2017 Videos Online

The recordings of the recent ACCU conference in Bristol are now online.

ACCU 2017 Conference Channel

by the ACCU conference

About the conference:

All the speaker made the this years conference to one of the most successful ones. Below are the speakers listed with C++ sessions.

Day One with Louis Dionne, Anastasia Kazakova, Roger Orr, Marshall Clow, Frank Birbacher, Timur Doumler, Kevlin Henney

Day Two with Hubert Matthews, Arne Metz, Guy Davidson, Peter Sommerlad, John Lakos

Day Three with Atho Truu, Daniel Garcia, Petr Kudriavtsev, Steven Simpson, Sergei Sadovnikov, Dominic Robinson, Bjorn Fahller

Day Four with Vittorio Romeo, Phil Nash, Niall Douglas, Anthony Williams, Odin Holmes

Herb Sutter's closing keynote about C++ meta classes will be released later.

 

 

 

CppCon 2016: The strange details of std::string at Facebook--Nicholas Ormrod

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

The strange details of std::string at Facebook

by Nicholas Ormrod

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Standard strings are slowing you down. Strings are everywhere. Changing the performance of std::string has a measurable impact on the speed of real-world C++ programs. But how can you make strings better? In this talk, we'll explore how Facebook optimizes strings, especially with our open-source std::string replacement, fbstring. We'll dive into implementation tradeoffs, especially the storage of data in the struct; examine which standard rules can and cannot be flouted, such as copy-on-write semantics; and share some of the things we've learned along the way, like how hard it is to abolish the null-terminator. War stories will be provided.

CppCon 2016: Leak-Freedom in C++... By Default--Herb Sutter

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

Leak-Freedom in C++... By Default

by Herb Sutter

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Lifetime safety means writing code that, by construction, is guaranteed to eliminate two things: (a) use of null/dangling pointers (including pointerlike things such as references, iterators, views, and ranges), and (b) leaks (including the rare 1% case where we’re tempted to admit the possibility of an ownership cycle or need to support lock-free concurrent data structures).

Last year, my CppCon 2015 talk “Writing Good C++14… By Default” focused on (a), null/dangling, because it's the more difficult and usually more serious problem. I gave an overview of a new approach of using static analysis rules to eliminate use of null and dangling in C++. That work continues and we’re in the process of writing down the formal rules for the approach that I showed last year.

This year, the focus will be on (b), leaks: The talk aims to begin with a set of simple rules, the “5-minute talk” to demonstrate that a handful of rules can be taught broadly to programmers of all levels, and results in code that is clean and free of leak bugs by construction.

But, since we’ll still have 85 minutes left, we can use the time to spelunk through a series of “Appendix” code examples, in which we'll demonstrate "why and how" to apply those rules to a series of increasingly complex/difficult situations, and that are aimed at increasingly advanced and “clever” (note: not always a good thing) programs and programmers. We’ll address questions such as: How should we represent Pimpl types? How should we represent trees – what should the child and parent pointer types be, and (when) should they be unique and when shared? How should we deal with “intra-module” or “encapsulated” cycles when you control all the objects in the cycle, such as all the nodes within a Graph? And what about “inter-module” or “compositional” cycles when you don’t know in advance about all the objects that could be in the cycle, such as when combining libraries written by different people in a way that may or may not respect proper layering (notoriously, using callbacks can violate layering)? The answers focus on cases where we have solid guidance, and then move toward some more experimental approaches for potentially addressing the ~1% of cases that aren’t yet well covered by unique_ptr, shared_ptr, and weak_ptr.