Events

CppCon Program Highlights, 7 of N: (More) Boost

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The Boost.org libraries are central to Modern C++, and so CppCon includes thorough coverage of the "what's new and/or important" in Boost. Several Boost talks have already been mentioned in this blog post series about using Boost in particular domains -- here are additional Boost talks not yet posted here.

Breaking news: We start this post with a talk on Boost.ASIO because if you haven't learned ASIO yet, you'll certainly want to -- as of June 2014 it is (finally) on the fast track for ISO standardization, so a September CppCon talk on ASIO is quite timely.

In this post:

  • Boost.Asio and Boost.Serialization: Designs for Object Transmission
  • Implementing Wire Protocols with Boost Fusion
  • Metaprogramming with Boost.Hana: Unifying Boost.Fusion and Boost.MPL
  • How You Can Make a Boost C++ Library

 

Boost.Asio and Boost.Serialization: Designs for Object Transmission

Network programming in C++ frequently requires programmers to find a way to express C++ objects as a sequence of bytes which can be transmitted and reconstructed on another network endpoint. In the case of simpler objects (such as most PODs), object serialization is trivial to perform.

For more complex C++ constructs (polymorphic objects, etc), the approach to serialization is more challenging. This talk will discuss how two powerful Boost libraries, Asio and Serialization, can be used to craft C++ networking code that can handle a vast array of uses cases. A prototype for a message passing framework will be developed throughout the talk.

Programmers familiar with or interested in network programming (but perhaps unfamiliar with Boost.Asio, Boost.Serialization or both) are the intended audience. No prior knowledge of Boost.Asio and Boost.Serialization will be assumed, and alternatives to both libraries will be discussed.

Speaker: Bryce Adelstein-Lelbach Bryce Adelstein-Lelbach is a researcher at the Center of Computation and Technology (CCT) at Louisiana State University. He works on the HPX runtime system and his research interests include parallel and distributed programming frameworks for scientific applications. He has been working on HPX for over a year now.

 

Implementing Wire Protocols with Boost Fusion

There are a number of common serialization formats available which work well for marshaling C++ types into messaging protocols, e.g. ProtoBufs, Thrift, JSON, XML, FIX, etc. Unfortunately, not every protocol uses one of these popular encodings and instead implements a unique binary protocol. The classical "C" way of handling binary protocols is to use packed structs, unfortunately there are many binary protocols which are not particularly friendly to using this approach due to things like nested variable length data structures, etc.. The packed struct approach is also fairly limited in that it only generally supports primitive POD types.

This talk will explore an approach that uses Boost's Fusion library to implement an easily extensible serialization mechanism for on a non-trivial binary financial exchange protocol which exposes the underlying data in terms of "modern" C++ types. The talk will also cover aspects of general use of Boost Fusion and Boost MPL, type traits, enable_if, SFINAE, and other members of the C++ type system bestiary.

Speaker: Thomas Rodgers, Senior Software Engineer, DRW Trading Group. Thomas has been programming in C++ since 1989 and a member of the C++ Standards Committee since 2013. Thomas has worked in the financial industry since 1996 and currently works for DRW Trading Group in Chicago.

 

Metaprogramming with Boost.Hana: Unifying Boost.Fusion and Boost.MPL

Template metaprogramming sucks. No, seriously; you might like the imposed purely functional paradigm, but not the templates themselves. While C++11 has made our life easier, even simple metaprograms are often hard to write, impossible to maintain and slow to compile; we need better abstractions. In this talk, I will present Boost.Hana (https://github.com/ldionne/hana), an experimental C++14 library for heterogeneous computation. The library takes metaprogramming to a whole new level of expressiveness by unifying the well-known Boost.MPL and Boost.Fusion libraries under a single generic, purely functional interface. The library incorporates some of the most recent advances in C++ metaprogramming; I will give an overview of the most interesting implementation techniques used internally. Finally, I will show concrete ways to use the library so you, as a developer, can write less template black magic, increase your productivity and spend less time in coffee breaks waiting for the compiler (sorry).

Speaker: Louis Dionne Louis is a programming enthusiast and math student living in Quebec City, Canada. He focuses mainly on metaprogramming and functional programming in C++ or other languages. Recently, he has been looking at ways to make C++ metaprogramming more enjoyable by combining C++11/1y techniques with functional programming concepts. In particular, he is working on this very topic as a GSoC student with Boost for the summer of 2014.Website: http://ldionne.com

 

How You Can Make a Boost C++ Library

The purpose of this presentation is to encourage C++ programmers to create and submit new quality C++ libraries to Boost.

Premises: a) C++ needs more quality libraries b) There are many C++ programmers who would like to contribute libraries but they are discouraged by the amount of effort and associated heartache.

Methodology: Walk through the website www.blincubator.com from the point of view of a C++ library contributor. It will address issues related to requirements, suggested tools, user feedback, library promotion. It will assume that the attendee is an intermediate to advanced C++ programmer with his own idea for a library.

Speaker: Robert Ramey Robert Ramey is a freelance Software Developer living in Santa Barbara, California. (See www.rrsd.com.) His long and varied career spans various aspects of software development including business data processing, product, embedded systems, custom software, and C++ library development. Lately, he has been mostly interested in C++ library design and implementation related to Boost. He is the author and maintainer of the Boost Serialization library and a frequent contributor to the Boost developers list. Website: http://www.rrsd.com

 

CppCon Third Keynote -- Boris Kolpackov

CppCon has announced its third keynote, filling out the keynote slots for this year’s event. It’s by respected gaming industry veteran Mike Acton on data-oriented design, which is essential for high performance -- or even reasonable performance -- on modern systems from servers to smartphones.

If you're wondering why data-oriented design is so 'essential,' as a backgrounder check out slides 31-37 of Herb Sutter's April 2014 talk and the cited example of a 50x performance difference achieved by doing nothing but changing the order of objects in memory. That's just an appetizer for Acton's keynote, and it's applicable to way more than gaming.

You won't want to miss this or any of this year's other keynotes and over 100 sessions in the 2014 program. From the announcement:

Data-Oriented Design and C++

by Mike Acton

The transformation of data is the only purpose of any program. Common approaches in C++ which are antithetical to this goal will be presented in the context of a performance-critical domain (console game development). Additionally, limitations inherent in any C++ compiler and how that affects the practical use of the language when transforming that data will be demonstrated.

Speaker’s bio: Mike Acton is Engine Director at Insomniac Games. When he’s not searching for new ways to optimize Insomniac’s engine, he dreams up new ways to help the development community. Mike can often be found extolling the virtues of understanding the data and hardware first along with programming for performance.

CppCon Program Highlights, 6 of N -- The Rubber and the Road

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++ developers live where the rubber meets the road, and so CppCon features lots of solid real-world rubber-meets-the-road technical content. Here are specific topics that likely apply to your codebase today, presented by the people who solving these problems today in demanding environments ranging from working on the world's fastest databases to the world's leading financial systems.

In this post:

  • Common-Sense Acceleration of Your MLOC Build
  • C++11 in the Wild: Techniques from a Real Codebase
  • Making Allocators Work

 

Common-Sense Acceleration of Your MLOC Build

In this talk, I lay out detailed examples of steps I took to dramatically improve build times, and ultimately developer productivity, in very large, legacy C/C++ codebases. Is it worth the extra money for SSD or a 15K RPM SAS? How do I make ccache and distcc work together? How do I profile-optimize my toolchain? What network topology issues come into play? These questions, and more, are addressed in detail so you can immediately apply what you've learned to shorten the timeline between when you make a change to your code and when you see it in action.

Speaker: Matt Hargett, CTO, PacerPro. Matt Hargett is Chief Technology Officer at PacerPro, and lives in San Francisco with his husband of 14 years. His first programming was on a TI 99/4a with his mother, and his first reverse engineering was on an 8086 to make shareware games easier to finish. Matt co-authored Pragmatic Unit Testing in C#, and has spoken at conferences around the world on network security, reverse engineering, unit testing, and static analysis. His hobbies include world travel, playing video games, and writing/publishing indie pop songs under the moniker "the making of the making of."

 

C++11 in the Wild: Techniques from a Real Codebase

This talk presents several reusable constructs from a production C++11 codebase, each of which would not be possible without C++11's new features. Auto() is what Alexandrescu's ScopeGuard looks like after a dozen years of C++ evolution. make_iterable() constructs a container from a pair of iterators, enabling simple "foreach" iteration over legacy containers. spaceship() is an efficient "strcmp" for tuples. Time permitting, we'll look at some more arcane code samples.

Speaker: Arthur O'Dwyer, MemSQL. Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. Now he works at MemSQL, making the world's fastest distributed SQL database.

 

Making Allocators Work

Memory is an important property for every object, as whatever resources it manages, it must occupy some memory. THe ability to customize memory allocation is important for every C++ program that cares about performance, debug ability and support.

The original C++ standard supported an allocator parameter for every container, yet this feature was widely derided or ignored, as it was underspecified to the point it could not portably be used. C++11 makes significant changes to the allocator model, that simply its use while making it more powerful.

The Library Fundamentals TS goes further, allowing allocators' type to be supplied at runtime, rather than compile type, using classic object oriented polymorphism - yet building on the infrastructure laid down in C++11.

This material should be of interest to both library authors and consumers, although clearly there are more details for the implementers to absorb. It also includes an interesting case study in C++11 compile time reflection, as required to implement the new 'allocator_traits' facility.

Speaker: Alisdair Meredith, Bloomberg LP and ISO C++ Library Working Group Chair. Alisdair Meredith is a software developer at BloombergLP in New York, and the C++ Standard Committee Library Working Group chair. He has been an active member of the C++ committee for just over a decade, and by a lucky co-incidence his first meeting was the kick-off meeting for the project that would become C++11, and also fixed the contents of the original library TR. He is currently working on the BDE project, BloombergLP's open source libraries that offer a foundation for C++ development, including a standard library implementation supporting the polymorphic allocator model proposed for standardization.

 

CppCon Program Highlights, 5 of N: Modern C++ and Databases

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

Whether you're using an in-memory flat database or a cloud-scale RDBMS, SQL and ODB databases continue to be a critical layer of modern software. But how do you use them well with modern C++? The following CppCon talks address this question, and as always are presented by the right people -- Those Who Know and Those Who Do, as usual with an international global perspective and including a two-part talk by CppCon's own Boris Kolpackov.

In this post:

  • sqlpp11, An SQL Library Worthy Of Modern C++
  • Persisting C++ Classes in Relational Databases with ODB
  • ODB, Advanced Weapons and Tactics

 

sqlpp11, An SQL Library Worthy Of Modern C++

SQL and C++ are both strongly typed languages. They should play well together. But most C/C++ interfaces to SQL databases are string based. They force the developer to effectively hide the SQL types, names and expression structures from the compiler. This defers the validation of SQL expressions until runtime, i.e. unit tests or even production. And the strings might even be vendor specific, because different databases expect different dialects of SQL in those strings.

That feels wrong. Modern C++ can do better.

This talk gives an introduction to sqlpp11, a templated embedded domain specific language for SQL in C++. It allows you to build type-safe SQL expressions with type-safe results, all of which can be verified at compile time, long before your code enters unit tests or even production.

In addition to its obvious use with relational databases, sqlpp11 can also serve as an SQL frontend for all kinds of data sources: Since sqlpp11 offers complete SQL expression trees even at compile time, it isn't hard to apply SQL expressions to std::vector or std::map for instance, or streams, or XML, or JSON, you name it. With your help, sqlpp11 could become for C++ what LINQ is for C#.

Speaker: Roland Bock, Head of Development, PPRO Financial Ltd., London/Munich.  Roland is Head of Development at PPRO Financial Ltd, an FCA regulated e-Money institute offering prepaid MasterCard card programs and comprehensive financial solutions for international electronic payment transactions. Since 2008 he has been using SQL in C++. Being unhappy with the string-based approach of most SQL libraries, he decided to do something about it and developed a type-safe EDSL for SQL in C++: sqlpp11, see https://github.com/rbock/sqlpp11. In his spare time Roland is preparing sqlpp11 to be proposed for boost and possibly also for the C++ standard. He lives and codes in Munich (Germany). C++ is his preferred language, especially since the arrival of C++11.

 

Persisting C++ Classes in Relational Databases with ODB

ODB is an open source, cross-platform and cross-database (SQLite, PostgreSQL, MySQL, MS SQL Server, Oracle) object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL, and without manually writing any mapping code.

In the first part of this two-part talk we will cover the basics of transactionally persisting, loading, updating, and deleting simple C++ classes in a database as well as querying the database for objects. We will then look into persisting C++ classes that have more interesting data members, such as containers and pointers to objects, or that form a polymorphic hierarchy. Support for C++11, Qt, and Boost value types, containers, and smart pointers will also be covered.

Targeting 5 different database systems at the same time may sound like a daunting task but as we will see it is not that hard with ODB. Life would also be a lot easier if our C++ classes never changed. The next best thing is to have comprehensive tooling support. So we will conclude the first half with a discussion of database schema evolution and its support in ODB.

ODB, Advanced Weapons and Tactics

Hiding a relational database behind an ORM does not work. Did I just say that? Yes! Performance and scalability limitations always get in the way. Should we then throw away the whole ORM idea and go back to SQL? We don't have to. In fact, the bulk of ODB features were specifically designed to resolve these limitations without degenerating to JOINs and SQL. And that's what the second part of this talk is all about: bulk operations, object caches, lazy pointers, views, change-tracking containers, optimistic concurrency, object sections (partitions), and prepared and cached queries. By the end of the second half you will be ready for anything that real-world C++ object persistence and database access can throw at you.

Speaker: Boris Kolpackov Boris Kolpackov is a founder and chief software designer at Code Synthesis, a company focusing on the development of open-source tools and libraries for C++. For the past 10 years Boris has been working on solving interesting problems in the context of C++ using domain-specific languages (DSL), C++ parsing, source-to-source translation, and code generation. His notable projects to date include the ODB C++ ORM system as well as XSD and XSD/e XML Schema to C++ compilers.

CppCon Bonus Talk: C++ in MS Office -- Boris Kolpackov

cppcon-051.PNGThe CppCon organizers left a few slots in the CppCon 2014 program for "invited talks" on important but otherwise under-represented topics (such as game development, mobile and embedded systems, etc) or generally interesting and unusual uses of C++. On Tuesday, they announced the first two invited talks on Facebook’s heavy use of C++ in their server infrastructure.

Today, they announced another:

Bonus Talk: C++ in MS Office

by Boris Kolpackov

From the announcement:

Tony Antoun, Igor Zaika: "How Microsoft Uses C++ to Deliver Office (and More) Across iOS, Android, Windows, and Mac"

What does it take to target multiple major mobile devices (as well as traditional environments) with portable, efficient, single-source code? This talk demonstrates architectures, techniques, and lessons learned rooted in actual experience with using C++ to deliver several major cross-platform projects across iOS, Android, Windows, and Mac: Microsoft Office (Word, Excel, PowerPoint, OneNote) and the SQL Server PowerBI. Each presents a different case study: For example, Office already used C++, whereas PowerBI was originally written in Silverlight and then rewritten in C++; Office is a set of user-facing apps, whereas PowerBI is a system component. Although some of these are demanding first-tier “Cadillac” applications, we expect this experience to be a model for the future as more and more apps fall into this category and use C++ to target many popular platforms from (mostly) a single source base.

This talk covers the following key topics and tradeoffs: Rich vs. reach, including access to latest OS features (e.g., iOS 8 additions) and hardware features (e.g., vector units, GPUs). Consistency of functionality. Client code vs. server/service web code. Sharing vs. quality, including dialing appropriately between more shared code and high quality code. Drawing the line between the bulk of C++ code and interfacing with non-C++ for UX and PALs (platform adaptation/abstraction layers) for target-specific user interface and system services. Architecting PALs, including why “mini-PALs” rather than an “über-PAL.” Forcing “doing the right thing” and good architecture with composable components. How C++ enables things not feasible using other technologies. Velocity and enabling faster cross-platform development and deployment. Cost of maintenance, including time, size, and complexity (both breadth and depth). And, last but not least, developing in a single modern C++ source base built with different evolving C++ compilers, including VC++ and Clang/LLVM.

Speakers’ bio: Tony Antoun is Director of Development for APEX, focusing on delivering Office on all Apple platforms and form factors (iPhone, iPad, Mac), as well as aligning the Office experience on other major platforms (Win32, WinRT, Android). Before that, Dev Manager for SQL PowerBI – a cross-platform interactive client data visualization solution (iOS, WinRT, Web) connected to the SQL Reporting cloud service. Before that, Dev Manager for HD-DVD, cross-platform client solution for High Definition interactivity of media experiences (Win32, WinCE, Linux, Xbox).

Igor Zaika is the Development Manager for the Office Core Experience team at Microsoft, responsible for shared UX components and application framework used by Office applications. Before that, Igor worked in various areas related to Office client applications, ranging from building Word Object Model and integrating VBA (Visual Basic for Applications) with Office, to shipping first version of OneNote for the WinRT platform. Before joining Microsoft, Igor worked on 3D CAD application and contributed to the Kronos project.

CppCon Program Highlights, 4 of N: C++ and Modern Concurrency

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

CppCon would be incomplete without strong coverage of concurrency-related techniques. But this year's material isn't about just any old concurrency techniques -- it's about stitching high-update-rate data structures and highly responsive algorithms into high performance scalable code. As always, these talks are by the right people -- Those Who Know and Those Who Do in some of the leading efforts in our industry, from *nix to Windows and from IBM to Microsoft to BlackBerry.

In this post:

  • C++ Memory Model Meets High-Update-Rate Data Structures
  • Lock-Free Programming (or, Juggling Razor Blades)
  • Lock-Free by Example
  • Async Sequences and Algorithms to Compose Them

 

C++ Memory Model Meets High-Update-Rate Data Structures

Highly performant and scalable techniques such as RCU and hazard pointers have been quite successful in read-mostly situations. However, there do come times when updates are necessary. It would be convenient if there was some general update-side counterpart to these techniques, but sadly there is not yet any such thing. Nevertheless, there are a number of specialized update-side techniques whose performance and scalability rival those of RCU and hazard pointers. This talk will discuss several of them, one of which is a solution to a challenge to the speaker at the 2014 Issaquah C++ standards committee meeting. This talk will also provide an outlook into the future of low-overhead scalable updates.

Speaker: Paul E. McKenney, Distinguished Engineer, IBM Linux Technology Center. Paul E. McKenney has been coding for almost four decades, more than half of that on parallel hardware, where his work has earned him a reputation among some as a flaming heretic. Over the past decade, Paul has been an IBM Distinguished Engineer at the IBM Linux Technology Center. Paul maintains the RCU implementation within the Linux kernel, where the variety of workloads present highly entertaining performance, scalability, real-time response, and energy-efficiency challenges. He is also the editor of "Is Parallel Programming Hard, And, If So, What Can You Do About It?" Prior to that, he worked on the DYNIX/ptx kernel at Sequent, and prior to that on packet-radio and Internet protocols (but long before it was polite to mention Internet at cocktail parties), system administration, business applications, and real-time systems. His hobbies include what passes for running at his age along with the usual house-wife-and-kids habit. Website: http://www.rdrop.com/users/paulmck

 

Lock-Free Programming (or, Juggling Razor Blades)

Example-driven talk on how to design and write lock-free algorithms and data structures using C++ atomic -- something that can look deceptively simple, but contains very deep topics. (Important note: This is not the same as my "atomic Weapons" talk; that talk was about the "what they are and why" of the C++ memory model and atomics, and did not cover how to actually use atomics to implement highly concurrent algorithms and data structures.)

Speaker: Herb Sutter, Microsoft. Author, chair of the ISO C++ committee, software architect at Microsoft.

 

Lock-Free by Example

Dive into and follow along making a lock-free queue. In particular, a multi-producer, multi-consumer, growing, shrinking, mostly contiguous, lock-free circular queue. With this single (complicated!) example, we will come across, and attempt to solve, many of the typical problems found in lockfree programming, and delve into the pros and cons of various solutions to those problems.

Speaker: Tony Van Eerd, C++ Guy, BlackBerry. Tony Van Eerd has been coding for well over 25 years, and hopefully coding well for at least some of that. Most of that time has been in the graphics/video/film/broadcast industry (at Inscriber/Adobe), writing low level pixel++, high level UI, as well as threading and everything else in between. He now works at BlackBerry, watching over the BlackBerry APIs. He is also the company-wide "C++ guy" writing half of his code in emails and wiki pages.

 

Async Sequences and Algorithms to Compose Them

All have heard and some have wept over all the many ways to express sequences (eg. iterator, range, container) and the algorithms to compose them (eg. filter, transform, merge, zip) in C++. I will describe one more sequence that must have a representation and an algorithm library - A sequence of values that will arrive over time.

Speaker: Kirk Shoop, Developer, Microsoft Open Technologies, Inc. Hi! I have a family. I like food. I need sun (My need for sun must be why I live in Seattle). I like C++. I don't like threads (My aversion to using threads must be why I spend all my free time working on a library that composes sequences on many threads). I work at Microsoft Open Technologies, Inc.Website: http://kirkshoop.blogspot.com/Twitter handle: @kirkshoop

 

CppCon Bonus Talks: C++ at Facebook -- Boris Kolpackov

cppcon-053.PNGIn the CppCon spirit of talks "by the C++ community for the C++ community" given by Those Who Know and Those Who Do in some of the leading code bases in our industry, we're very pleased to relay this just announced on CppCon.org:

Bonus Talks: C++ at Facebook

by Boris Kolpackov

From the announcement:

We left a few slots in the CppCon 2014 program for what we call “invited talks.” They are used to fill in important but otherwise under-represented topics (such as game development, mobile and embedded systems, etc) or generally interesting and unusual uses of C++. Today we are ready to announce the first two invited talks which are on Facebook’s heavy use of C++ in their server infrastructure:

Marcelo Juchem: "Meta Techniques: Heterogeneous Polymorphism and Fast Prototyping at Facebook"

As data driven systems evolve there’s an ever growing demand for bringing new functionality into existing systems in an efficient, maintainable and least intrusive manner. When implementing features with different semantics or interfaces, virtual inheritance requires a compromise between design simplicity and performance. This implies a need for new techniques to achieve heterogeneous polymorphism efficiently. With C++11 and 14, type lists, type maps and variants can now be trivially implemented by the initiated. Facebook moves fast so we quickly adopted the new standards to further explore the capabilities of the type system. This talk demonstrates some meta-programming techniques like reflection and compile-time built structures to achieve heterogeneous polymorphism and fast prototyping.

Speaker’s bio: Marcelo Juchem is a Software Engineer at Facebook, working in stream processing and spam fighting systems. Fascinated by template meta-programming, he sees the C++ compiler as a powerful type juggler and programmable code generator. Such capabilities allow the combinatoric composition of types into efficient abstractions, reducing code duplication and enabling non-library writers to design logical components interaction and semantics rather than deal with low level details.

Drew Paroski: "C++@Facebook: How HHVM Uses Modern C++ for Fun and Profit (Both Literally)"

After an overview of HHVM’s architecture and history, this talk delves into what made C++ the language of choice when writing VMs and execution engines, including performance, benefits over assembly, and enabling C++ to call into JIT’d code. We cover the importance of control over ‘unsafe’ details: for memory layout, unions, casting, and bit-stealing. HHVM found important wins from being able to ensure that certain structures (Classes) are allocated in low-memory (i.e. addresses that fit within 32-bits) which allowed use of 32-bit immediates in machine code and 32-bit fields in objects. Also, being able to have fine control over memory allocation enabled having “huge pages”, a feature exposed in Linux (and other OSes) that allowed using fewer iTLB entries which gave a significant boost for Facebook’s PHP codebase. The talk will also mention some things that got in the way and how they were dealt with. Some were language features, such as virtual functions, member pointers. Before move constructors and rvalues were introduced in C++11, there were performance issues with returning smart pointers. While these were things that got in the way, it’s a testament to C++’s flexibility that there were always ways to work around these things in a stable fashion.

Speaker’s bio: Drew Paroski is a Software Engineer at Facebook and a co-creator of the HipHop Virtual Machine (HHVM) and the Hack programming language. Among other things, Drew is the primary designer and implementor of HHVM’s virtual instruction set architecture and Hack’s Collections framework, and he was a core contributor to HHVM’s JIT compiler in the early days of the project. Before Facebook, Drew worked at Microsoft helping improve the performance of Microsoft’s virtual machine for .NET languages (C#, VB.NET, F#, and more) known as the Common Language Runtime. Drew has been coding in C++ for over 10 years, and he enjoys designing and optimizing complex low-level systems.

CppCon Program Highlights, 3 of N: C++ and the Modern Game

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

No C++ conference (or 'Con) would be complete without covering a perennial stronghold for tight C++ code: games. What can be said that hasn't been said before? Some interesting answers will be found in the following talks, which cover the gamut from casual homebrew games to the world's top "AAA" titles... and a little bird tells us there may be some additional leading-edge game-related content still to be announced for CppCon. As always, these talks are by the right people -- Those Who Know and Those Who Do in some of the leading efforts in our industry.

In this post:

  • How Ubisoft Montreal Develops Games for Multicore -- Before and After C++11
  • C++ in Huge AAA Games
  • Quick game development with C++11/C++14

 

How Ubisoft Montreal Develops Games for Multicore -- Before and After C++11

Multicore hit the video game industry in a big way. Every platform we develop for now comes in a multicore configuration, and we're always under pressure to exploit the hardware to its fullest. This talk will share our experience learning to develop C++ software for multicore processors over the last decade. It will also explore the new concurrency support in C++11, and examine the way C++11 has influenced the way we develop multicore software so far.

Speaker: Jeff Preshing, Technical Architect, Ubisoft. Jeff Preshing is a Technical Architect at Ubisoft Montreal, where he's worked on games such as Rainbow Six Vegas, Child of Light and Assassin's Creed Unity. He also maintains a blog where he writes frequently about lock-free programming and the C++11 atomic library.

 

C++ in Huge AAA Games

Video games like Assassin's Creed or Rainbow Six are among the biggest code bases with a single static linking. Iteration-time is critical to develop a great game and keeping a complete compilation-time of a few minutes is a constant challenge. This talk will explain the C++ usage reality at Ubisoft Montreal for huge projects. Ideas will be shared regarding performance, debugging and iteration time.

Speaker: Nicolas Fleury, Technical Architect, Ubisoft. Nicolas Fleury has been in video game industry for over 10 years, working as a Technical Architect on projects like Prince of Persia and currently on Rainbow Six: Siege. Before working in the game industry, he worked in computer assisted surgery, speech recognition and telecoms.

 

Finally, to underscore that C++ is not just for "big AAA" titles, CppCon is very pleased to include this fresh talk by a superb young up-and-coming open source gaming guru -- if you haven't heard his name yet, don't worry, you will:

Quick Game Development with C++11/C++14 

Modern C++ has made game development a much more pleasurable experience. Features such as smart pointers and variadic templates are invaluable in speeding up the development process and in making the code cleaner and more robust. New easy-to-use multimedia libraries such as SFML, SDL and Cinder make dealing with graphics, sounds and input very easy, and work well with modern code principles. This talk guides the audience through the creation of an Arkanoid/Breakout clone in under 200 lines of code, using C++11/C++14 features and idioms. Chronologically sequential code segments, compiled and executed one by one, will show the attendees how a game is created from scratch, slowly becoming a playable product, step by step. The end result will be a small game, completely written in modern C++ code. Topics covered will range from basic graphics programming to entity management and collision detection/response.

Speaker: Vittorio Romeo. Vittorio is an Italian 19 year old Computer Science student at the University of Messina. He started programming at a very young age and soon became an enthusiast of the C++ language. While following the evolution of the C++ standard and embracing the newest features, he worked on many open-source project, such as general-purpose libraries and free multiplatform independent games, which are still being maintained and expanded today. Vittorio also participated as a speaker at Messina's 2013 Linux Day event and he is currently creating an online game-development C++11 video tutorial series for beginners.

CppCon Program Highlights, 2 of N: C++ and the Modern Web

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

Note: Early Bird registration ends in about 24 hours from the time of this post.

 

Some people seem to think that "web" and "C++" don't belong in the same sentence, but part of what you need to know about modern C++ is how essential it is for web services, how to use web services from C++ code, and the new tools available to compile C++ code to run in the browser -- any browser. In these talks, the CppCon program covers development in this exciting modern area, and we think you'll see that the speakers include the creators of the key technologies -- Those Who Know and Those Who Do in some of the leading efforts in our industry.

In this post:

  • Emscripten and asm.js: C++'s Role in the Modern Web 
  • Embind and Emscripten: Blending C++11, JavaScript, and the Web Browser
  • Using C++ to Connect to Web Services

 

Emscripten and asm.js: C++'s Role in the Modern Web

All major web browsers are written in C++, but C++ is starting to fill an important role in web *content* as well: While JavaScript is the only standards-compliant language available to websites, compiling other languages to JavaScript has been shown to be practical and effective. This talk will explain how Emscripten, an LLVM-based open source compiler from C++ to JavaScript, lets you run a C++ codebase on the web at near-native speed. To achieve that level of performance, Emscripten emits asm.js, a strict subset of JavaScript that is easy for JavaScript engines to optimize, and was designed specifically as a compilation target for languages like C and C++. We'll also discuss some of the more challenging aspects of compiling C++ to JavaScript, stemming from the C++ language itself, libraries and toolchains, and some thoughts on possible solutions.

Speaker: Alon Zakai, Mozilla. Alan works on Emscripten, an LLVM-based compiler from C++ to JavaScript, as well as other projects related to porting existing content to the web. Twitter handle: @kripken

 

Embind and Emscripten: Blending C++11, JavaScript, and the Web Browser

Emscripten compiles C or C++ source code into JavaScript so it can run in a web browser. Emscripten is commonly used to port games to the web with no download or plugin required.

Embind is a C++11 binding library that makes it easy to expose libraries written in C++ to JavaScript. This allows JavaScript applications to take advantage of existing bodies of C++ code. In addition, C++ compiled into the asm.js subset of JavaScript is often faster than hand-written JavaScript, so Embind makes it convenient to accelerate JavaScript applications by writing high-performance functionality in C++.

With several motivating examples, this lecture will cover the design of embind, how variadic templates and constexpr facilitate interesting optimizations, and how embind minimizes its impact on the size of the generated JavaScript.

Speaker: Chad Austin, Technical Director, IMVU. Chad is a Senior Technical Director at IMVU, where he works on highly scalable backend systems, front-end web architectures, and optimizing the bits and bytes of 3D graphics pipelines. C++ was Chad's first love, and he once mowed "C++" into his back yard before a rainstorm, where it stayed for weeks. Website: http://chadaustin.me Twitter: @chadaustin

 

Using C++ to Connect to Web Services

Many languages have great support for connecting to web services. Trying to connect C++ applications to the cloud is difficult. The C++ standard library doesn't contain anything for networking (yet), and with the proliferation of devices, being able to do so in a cross platform manner is even more appealing. Often requiring use of multiple different styled, and potentially low level, libraries where asynchrony wasn't designed from the start. Or by building your own abstract layers over platform and operating system APIs, all of which distract from focusing on the core logic of your application.

The C++ REST SDK makes connecting to services easier by creating APIs focused on simplicity and asynchrony, built using tasks from the Parallel Patterns Library. This is done by putting together a series of cross platform libraries for working with HTTP, WebSockets, JSON, URIs, and OAuth. In many cases building on top of other popular open source libraries like Boost, OpenSSL, and WebSocket++. This talk will take a practical approach looking at what is involved in connecting to some of the common popular services from C++, using the C++ REST SDK and other libraries. Several tutorial style example and demos will be done using C++ code that runs on all the major platforms.

Speaker: Steve Gates, Microsoft. Steve Gates is a senior engineer on the Visual C++ team at Microsoft. Joining Microsoft in 2007, he's worked on various runtimes and libraries for parallel and asynchronous programming, including the Parallel Patterns Library. For the past couple of years he's been focusing on improving the experience in C++ for connecting to services. Specifically working on the C++ Rest SDK (Casablanca) open source project. Outside of work Steve's interests include growing vegetables, food preservation, and eating great food.

Introducing the CppCon House Band: Jim Basnight

cppcon-basnight.pngAs already announced, CppCon is recording all sessions and panels, including on-mic Q&A. However, note that only the sessions will be recorded, not all of CppCon -- things that you can experience only by attending including lightning talks, BoFs, hackathons, extended Q&A with the 70+ speakers (when you follow them around after their mics turn off or enjoy extended ad-hoc hallway chats), live house band performances, other extra technical and social events in breaks and evening, and...

... wait. Did we say "live house band performances"?

We did indeed.

As part of presenting CppCon, the Foundation is proud to sponsor live music by a great local Seattle area act, The Jim Basnight Band. Jim and the boys  will be playing CppCon all five days and serving up all kinds of original music and covers, from rock and pop to funk and soul and a few surprises. Be sure to get to each day's plenary session early to rock out, and enjoy their Pacific Northwest musical vibe at other times throughout the week. The band has a deep song catalog, so get your requests ready.

We hope you'll join us in September to enjoy not only the deep technical breadth and depth of 2014's premier C++ conference program, but also the round-the-clock "unconference" and musical parts of the fun and refreshing spirit of CppCon.

Hundreds of attendees have already registered for C++'s "Woodstock 2014." Early Bird registration ends tomorrow.

 

(If you're reading this via a newsreader and don't get the embedded audio, visit this post on isocpp.org and enjoy.)