Loading…
CppCon 2018 has ended

Sign up or log in to bookmark your favorites and sync them to your phone or calendar.

• Scripting and Parsing [clear filter]
Monday, September 24
 

11:00

Text Formatting For a Future Range-Based Standard Library
Text formatting has been a favorite problem of C++ library authors for a long time. The standard C++ iostreams have been criticized for being difficult to use due to their statefulness and slow due to runtime polymorphism. Despite its age, printf is still popular because of simplicity and speed. The Boost library offers two more alternatives, Boost.Format and Boost.LexicalCast. And finally, the P0645 standard proposal sponsored by Facebook is currently finding its way through the C++ committee.

All these approaches are still firmly based on standard containers and iterators. But the Standard Library is changing radically with the advent of ranges, range adaptors and functional style programming in C++. Generating optimized code with metaprogramming is becoming standard fare.

In this talk, I want to convince you that the combination of ranges with a bit of metaprogramming makes for a very elegant solution to the text formatting problem. We introduce a form of ranges with internal iteration, which are generating their elements one by one rather than exposing external iterators. We can use these generator ranges to represent the values to be formatted, conceptually turning them into lazily evaluated strings. These can be used just like regular strings are used today: in function returns; as standard algorithm input; embedded into other, equally lazily evaluated strings; and so on, before they are finally expanded for display. By choosing the right interfaces, we can optimize this expansion at compile-time, making it no less pretty to write, but more efficient to expand than any text formatting approaches that rely on format strings that must be parsed at runtime.

I believe that this approach is the natural extension of a range-based future standard library to text formatting.

Speakers
avatar for Arno Schoedl

Arno Schoedl

CTO, think-cell
Arno is the CTO of think-cell Software GmbH. He is responsible for the design, architecture and development of all their software products, and the evolution of the company's open source C++ library. Before founding think-cell, Arno worked at Microsoft Research and McKinsey. Arno... Read More →


Monday September 24, 2018 11:00 - 12:00
Telluride (407)
 
Wednesday, September 26
 

16:45

Accelerating Applications on a GPU with CUDA C++
CUDA is a parallel computing platform for a generic computing on Nvidia GPUs. We will focus on CUDA C/C++ programming, covering in detail various types of GPU memory (Shared/Global/Texture/ConstShared/Pinned), optimization of the work distribution between CUDA “threads”, precompiled CUDA code VS Runtime Compilation.
Often the CUDA code is written in C style, missing the opportunity to use safer and more readable C++ constructs. In the spirit of the conference a special focus will be given to the use of modern C++ features in the CUDA applications inside the device (“kernel”) code, host code, and more importantly – which of the C++ paradigms can cross the bridge between the two worlds.

Speakers
avatar for Michael Gopshtein

Michael Gopshtein

Framework TL, Eyeway Vision
Michael is a software engineer with more that 15 years of C++ experience. He worked on various performance-bound projects, like load generation on servers, network sniffing and packet analysis. In the recent years Michael is focused on Augmented Reality challenges in Eyeway Vision... Read More →


Wednesday September 26, 2018 16:45 - 17:45
Keystone (404)
  • Level Beginner, Intermediate
  • Tags CUDA, GPUs

16:45

Parsing C++
C++ is a notoriously hard language to parse. Its grammar is highly context-dependent and ambiguous, and cannot be parsed without semantic analysis and arbitrarily long lookahead. Not only programmers, but also compilers (and their authors) often struggle with interpreting certain C++ constructs correctly.

This talk sheds some light on the grammar of C++ and why parsing it is hard. We will discuss which of these problems are inherited from C, and which arise due to features unique to C++. We will also look at a reasonably easy-to-parse subset of C++ (and whether it ever occurs in real life). Most importantly, we will talk about why all this matters for the practical C++ developer, and not just for compiler writers. And of course, we will also show plenty of surprising, brain-twisting code snippets.

This talk is aimed at general C++ programmers and does not require any expert knowledge about parsing and semantic analysis.

Speakers
avatar for Timur Doumler

Timur Doumler

Timur Doumler is a C++ developer specialising in audio and music technology, active member of the ISO C++ committee, and part of the includecpp.org team. He is passionate about building communities, clean code, good tools, and the evolution of C++.
avatar for Dmitry Kozhevnikov

Dmitry Kozhevnikov

Team Lead in CLion, JetBrains
Dmitry works on C++ support in the CLion IDE by JetBrains, covering various aspects like the in-house C++ engine, inspections and refactoring engine, and clang integration.


Wednesday September 26, 2018 16:45 - 17:45
Copper Mountain Theater (2nd Floor)
 
Friday, September 28
 

10:30

Scripting at the Speed of Thought: Lua and C++ with sol3
A big part of accelerating development and promoting collaboration often translates to deferring a lot of the typical programmer work to a scripting language, to allow for those with more design-oriented ideas and experience to handle some of the workload. What happens, then, when you have to bind a scripting language like Lua into C++ to allow for this workflow?

This session is going to be all about how you enable non-developers and developers alike to rapidly increase their development productivity by turning routines and algorithms into data that can be shipped alongside your product in Lua. We will talk primarily how you can use the library sol2 to abstract away the muck of working with the Lua C API and instead focus on using and describing both Lua and C++ with each other in a simple manner. We will demonstrate some of the more interesting properties of sol such as Overloading Support, Container Support, Usertypes -- C++ classes made available with automatic support for unique/shared pointers -- and Tables.

By the time this session is over, you will have a firm grasp over what a good Lua Binding can offer you, and how you can accelerate your C++ development with it.

Speakers
avatar for JeanHeyd Meneide

JeanHeyd Meneide

Student, Columbia Unviersity
JeanHeyd "ThePhD" is a student at Columbia University in New York. Most of his programming is for fun and as a hobby, even if his largest open-source contribution -- sol2 -- is used across many industries. He is currently working towards earning his own nickname, climbing the academic... Read More →


Friday September 28, 2018 10:30 - 11:30
Telluride (407)