community

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.

ACCU 2017 trip report--Anastasia Kazakova

You want to know what happened?

ACCU 2017 trip report

by Anastasia Kazakova

From the article:

Hi,

We’ve just returned from ACCU 2017 in Bristol, UK. Being amazed by the event I decided to share some notes here, and hope Phil will also jump in and share his impression. There are also reports by Vittorio Romeo, Simon Brand and Samathy Barratt which you might find interesting...

Registration for CppCon 2017 is Open

The next CppCon conference is in Bellevue, Washington September 24-29.

Registration for CppCon 2017 is Open

From the announcement:

In addition to the regular conference program there will be keynotes, lightning talks, and panels. There are also twelve pre- and post-conference classes (both two-day and one-day are offered) as well as a field trip to Boeing's Future of Flight tour.

C++ User Group Meetings in May

The monthly C++ User Group listing at Meeting C++:

C++ User Group Meetings in May 2017

by Jens Weller

From the article:

The monthly overview on upcoming C++ User Group Meetings. Lots of meeting are already planned for May, even more should be announced in the coming weeks.

There are 2 new C++ User Groups: Minneapolis, Stockholm (LLVM).

Pacific++ - Asia-Pacific C++ Conference 2017

The first major C++ conference in the Asia-Pacific region.

pacific++

About the conference:

The conference will be held at the Sudima Hotel on the 26th and 27th of October 2017, in Christchurch, New Zealand.

 

Boost 1.64.0 is released

The new boost is out!

Boost 1.64.0 is released

From the article:

New Libraries


Process:
Process library by Klemens D. Morgenstern, that provides cross platorm ways to allows you to:

  • create child processes
  • setup streams for child processes
  • communicate with child processes through streams (synchronously or asynchronously)
  • wait for processes to exit (synchronously or asynchronously)
  • terminate processes

Broken feature:

GitHub #67: "group.wait() does not return".

Updated Libraries

Any:

  • Suppressed false warnings about returning reference to temporary
  • boost::addressof is now used instead of directly taking the address #12615
  • Headers are not included using double quotes any more #12053
  • CI tests now run with address, leak, and undefined sanitizers
  • Added more test

Atomic:

  • Fixed possible incorrect code generation in 64-bit atomic operations on 32-bit x86 with gcc versions older than 4.7 and compatible compilers.

Config:

  • Added BOOST_NO_CXX11_SFINAE_EXPR defect detection.

...

Overload 138 is now available

ACCU’s Overload journal of April 2017 is out. It contains the following C++ related articles.

Overload 138 is now available

From the journal:

Breadth First, Depth First, Test First
You can approach a problem top-down or bottom-up. Frances Buontempo wonders if algorithms can help us choose the most appropriate direction. by Frances Buontempo

Space invaders in Elm
Elm is a functional language which compiles to JavaScript. Ossi Hanhinen provides an overview. by Ossi Hanhinen

Single Module Builds – The Fastest Heresy in Town
Unity builds can be controversial. Andy Thomason shows how much difference they can make to build times. by Andy Thomason

An Interview: Emyr Williams
CVu has been running a series of interviews. Frances Buontempo interviews the interviewer, Emyr Williams. by Frances Buontempo

(Not Really So) New Niche for C++: Browser!?
How do you run C++ in a browser? Sergey Ignatchenko demonstrates how to use Emscripten. by Sergey Ignatchenko

Contractual Loopholes
Compilers can optimise away functions you may want to time. Deák Ferenc explores ways to stop this happening. by Deák Ferenc

All About the Base
Representing numbers presents many choices. Teedy Deigh counts the ways. by Teedy Deigh