September 2015

C++ User Group Meetings in September

The monthly listing of C++ User Group Meetings:

C++ User Group Meetings in September

by Jens Weller

The list of Meetings:

9.9 C++ UG Utah - Regular Monthly Meeting
9.9 C++ UG San Francisco/ Bay area - Presentation and Q&A
9.9 C++ UG Washington, DC - Q & A / Info Sharing 10.9 C++ UG Dresden - Scripting in C++
14.9 C++ UG Denver - Denver Tech Center C++ Developers
14.9 C++ UG Bristol - Tim Perry
14.9 C++ UG Zentralschweiz - Coding Dojo
16.9 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
16.9 C++ UG North West/Seattle - The BBC micro: bit and C++
17.9 C++ UG Chicago - "Cross-compiling to C++" and "Can you make me more productive
21.9 C++ UG Austin - North Austin Monthly C/C++ Pub Social
23.9 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
23.9 C++ UG Washington, DC - Q & A / Info Sharing
24.9 C++ UG Rhein-Neckar - C++ Usergroup Meeting
24.9 C++ UG Bremen - C++ - Vorstellung eines Frameworks für den Integrationtest
24.9 C++ UG Arhus - Libreoffice Hackfest
30.9 C++ UG San Francisco/ Bay area - CppCon Trip Report

CppCon 2015 Program Highlights, 9 of N

The CppCon 2015 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++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Rcpp: Seamless R and C++ Integration
  • Mantid, A C++ framework for the reduction and analysis of neutron scattering data
  • Integrating generators EDSL's for Boost.Spirit X3
  • 3D Face Tracking and Reconstruction using Modern C++
  • Using Spirit X3 to Write Parsers
  • Boost Units Library for Correct Code

 

Rcpp: Seamless R and C++ Integration by Matt P. Dziubinski, Assistant Professor, Aalborg University

R is an open-source statistical language designed with a focus on data analysis. While its historical roots are in statistical applications, it is currently experiencing a rapid growth in popularity in all fields where data matters: from data science, through bioinformatics and finance, to machine learning. Key strengths contributing to this growth include its rich libraries ecosystem (over 6 thousands packages at the moment of writing) – often authored by the leading researchers in the field, providing early access to the latest techniques; beautiful, high-quality visualizations – supporting seamless exploratory data analysis and producing stunning presentations; all of this available in an interactive environment resulting in high productivity through fast iteration times.

At the same time, there are no free lunches in programming: the dynamic, interactive nature of R does have its costs, including a significant impact on run-time performance. In an era of growing data sizes and increasingly realistic models this concern is only becoming more important.

In this talk we provide an introduction to Rcpp – a library allowing smooth integration of R with C++, combining the productivity benefits of R for data science together with the performance of C++. First released in 2005, today it’s the most popular language extension for R -- used by over 400 packages. We'll also discuss challenges (as well as possible solutions) involved in integrating modern C++ code, and demonstrate the usage of popular C++ libraries in practice. We’ll conclude the talk with the RInside package allowing to embed R in C++.


Mantid, A C++ framework for the reduction and analysis of neutron scattering data by Steven Hahn, Data Analysis Software Engineer, Oak Ridge National Laboratory

Today one of the most important barriers between performing an experiment and publishing the results is the complex and time-consuming effort that individual researchers apply to data reduction and analysis. In a neutron experiment one must relate measured counts to a physically meaningful four-dimensional scattering function. While the first neutron scatters had to manually setup their instrument and record neutron counts – in handwriting – one single point at a time, users at a modern time of flight spectrometer rapidly collect hundreds of gigabytes of data in less than one day. High performance software is now a necessity. Rapid reduction, analysis and visualization provide feedback for users, helping them make optimal use of limited beam time. Software must also be accessible to and customized by users with a wide range of abilities and interests in programming. In this talk, I will discuss Mantid-(the Manipulation and Analysis Toolkit for Instrument Data), which is the framework designed for the reduction and analysis of data acquired at muon and neutron sources. It is a partnership between multiple user facilities including Rutherford Appleton Laboratory, Oxfordshire, UK, Oak Ridge National Laboratory, Tennessee, USA and the European Spallation Source, Scandinavia. The core of the Mantid Framework is written in C++ with the user interacting via a GUI or python bindings. I will describe real-world cross-platform situations we have encountered while supporting Mantid on Linux, OS X and Windows. This plus a climate that values stability over the latest operating systems and compilers creates challenges to utilizing new language and library features available in C++11/14. To better exploit parallelism on all of the supported platforms, we are wrapping parallel loops so that different implementations can be chosen at compile time. Considerable portions of Mantid provide domain-specific user interfaces to cross-platform libraries. One example is 3D visualization of the large multidimensional datasets generated in Mantid. Our approach utilizes the application widgets and rendering libraries from ParaView. Mantid provides plugins specifically designed for the Mantid data structures. A custom interface for visualization can be started within Mantid, creating a seamless environment for novice users not comfortable with the ParaView workflow.

This research at ORNL’s High Flux Isotope Reactor and Spallation Neutron Source was sponsored by the Scientific User Facilities Division, Office of Basic Energy Sciences, US Department of Energy.


Integrating generators EDSL's for Boost.Spirit X3 by Felipe Magno de Almeida, Owner, Expertise Solutions

Based on the presentation I made on C++Now 2015 for Developing EDSL's for Boost.Spirit V2, present the development of generators for Boost.Spirit X3 (next version of boost spirit) and how that can be used for higher abstraction EDSL's while, through template metaprogramming, create parsers and generators automatically from the same grammar, using CORBA format as an example, while dealing with endianness, alignment and asymmetric grammars. This work is based on the library mORBid (https://github.com/expertisesolutions/mORBid) and (https://github.com/expertisesolutions/giop).


3D Face Tracking and Reconstruction using Modern C++ by Patrik Huber, PhD student in computer vision, University of Surrey

In this talk, I will present my work in computer vision, namely landmark detection and 3D face tracking, and the two C++ libraries that were developed in the process. The first part of the talk will give an introduction to detecting facial landmark points and work through a hello-world code example that presents and uses the superviseddescent library, a cross-platform library for cascaded regression that can be used to solve problems like landmark detection or pose estimation. The second part of the talk will present an approach that uses the found landmarks from the first part to use a 3D face model to track a person's face. With the library presented in the process, we hope to make 3D models easier to use and more widespread in the community. Both libraries are designed to be lightweight and simple to use, and try to follow modern C++11/14 programming paradigms. The talk concludes with my views on code sustainability in academia and a wish list of standard library features for computer vision.


Using Spirit X3 to Write Parsers by Michael Caisse, Ciere Consulting

Parsing is a common problem in many domains. The complexity of using a library often pushes developers to ad-hoc solutions utilizing std::string manipulations, regular expressions, or nested if/switch statements. Most “quick hack” implementations are unmaintainable.

Spirit provides a Domain Specific Embedded Language (DSEL) that allows grammars to be described in a natural and declarative manner just like writing PEG or EBNF directly in your C++ code. X3 is the third major release of the Spirit library and improves both compile and run times while simplifying the much of the library.

In this tutorial session you will be introduced to Spirit X3, attribute parsing, and variety of tips to writing efficient and maintainable parsers. We will build a JSON parser during the session to illustrate techniques and usage of the library. This session is applicable toward anyone needing to parse data.


Boost Units Library for Correct Code by Robert Ramey, Proprietor, Robert Ramey Software Development

I will give a presentation on the Boost Units library.

This library implements a zero runtime facility for performing dimensional analysis checking and automatic units conversion on C++ expressions. I have found this indispensable for coding scientific programs involving a variety of complex physical units. The documentation of the Boost Units library is totally complete and accurate, but totally inpenetrable. I had to spend way too much time figuring out how to use this. By attending this meeting, you're going to avoid this pain and just get the benefit of simpler programs that contain fewer bugs.

CppCon 2015 Program Highlights, 8 of N

The CppCon 2015 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++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Case study: Evolving legacy code
  • Lessons in Sustainability: How to Maintain a C++ Codebase for Decades
  • CopperSpice: A Pure C++ GUI Library
  • Writing Great Libraries in 89 Easy Steps
  • Qt: modern user interfaces for C++

 

Case study: Evolving legacy code by Rachel Cheng (Software Engineer, F5 Networks) and Michael VanLoon (Principal Software Engineer, F5 Networks)

We will be presenting on the evolution of a legacy monitoring subsystem modernized to C++11 with enhanced interfaces and better programming techniques. The presentation will cover some abstracted example problem areas, the solutions, and talk about the strategy employed to modernize the code.


Lessons in Sustainability: How to Maintain a C++ Codebase for Decades by Titus Winters, Software Engineer, Google

Google maintains (we believe) the largest monolithic C++ codebase in the world with over 100M lines of C++ code. Early commits to this repository date back to the late 1990s. About 4000 engineers submit at least one change in C++ every week. We’ve learned a few things about what it takes to maintain a codebase at this scale.

In this talk I’ll present some of the lessons we’ve learned over the years with respect to policies, technology, education, design, and maintenance of a long-lived monolithic codebase.


CopperSpice: A Pure C++ GUI Library by Barbara Geller and Ansel Sermersheim, Co-Founders, CopperSpice

CopperSpice is a collection of cross platform GUI libraries derived from Qt 4.8. Our libraries use current C++11 technology to implement Reflection, without requiring moc (a code generator) or any preprocessing. We will discuss what Reflection is, how this technology can be used, and why it can be difficult to implement.

The focus of this presentation is to show the core implementation of CopperSpice. Source code from CopperSpice will be shown to explain how we implemented Reflection using pure C++11. We will also demonstrate small samples of code which use the CopperSpice libraries.

Technologies covered in this presentation will include templates, variadic templates, and template specialization.

No prior knowledge of CopperSpice or Qt is required. A working knowledge of templates in C++11 would be helpful.


Writing Great Libraries in 89 Easy Steps by Zach Laine, Sr. Programmer, Nvidia

Writing code that does what you want it to do, correctly and efficiently, is hard. Doing so when you don't even know yet what you want the code to do yet is quite a bit harder. Yet this is the job of a library writer -- the users of a library may have a very different use case from that of the original author.

How do library writers develop correct and efficient APIs that are also:

- easy to use correctly - hard to use incorrectly - highly reusable - gracefully interoperable with other code

This talk gives lots of practical advice and techniques for accomplishing those goals and more.


Qt: modern user interfaces for C++ by Milian Wolff, Software Engineer, KDAB (Deutschland) GmbH&Co KG

The C++ language evolved significantly in the recent past, and so did many frameworks and libraries in the big ecosystem surrounding it.

For twenty years now, Qt is being used on a multitude of platforms to create native looking, compelling graphical user interfaces.

It offers C++ libraries and tools for building desktop, mobile and embedded applications. Qt gives engineers APIs for developing using two dimensional controls, integrating 3D using OpenGL, embedding web content, as well as a new declarative domain-specific language called QML, which is extensible using C++. Qt is also much more than a UI toolkit and provides a multitude of helper libraries for various use-cases, such as localization, database access, XML and JSON parsing and much more.

During this talk, I will give an introduction to Qt and present its capabilities in how it can be utilized to write modern UIs using C++, both in 2D as well as 3D. Additionally, I will show how some of its features, like the integrated web engine or QML, can be leveraged to go beyond C++. While at it, I hope to clear up some outdated misconceptions about Qt and its relationship to standard C++ and the STL as well as Boost and other libraries.

Finally, I will present the KDE Frameworks, an open source collection of high quality, cross platform Qt libraries that are being used by the KDE Software Collection. KDE frameworks are to Qt as Boost is to the STL. Recent development makes it simpler than ever to use these libraries in external applications.

CppCon 2015 Call for Volunteers

cppcon-019.PNGCppCon is just 19 days away! The event has nearly 50 volunteers so far but there are still spots open. It's a great (and free) way to be part of the festival and take in the sessions.

Call for Volunteers

From the announcement:

If you would like to attend CppCon 2015, see great C++ content, and meet our speakers and attendees, but a week’s registration doesn’t fit your time or money budget, consider volunteering.

We are looking for volunteers to help run the conference. We need people to help assemble registration packets and badges, register attendees, assist speakers with Audio/Video, and in general be on hand to make things run smoothly. In exchange, we’ll see to it that you’ll spend at least half of your time in sessions. It would be great if you could join us for the whole week, but if you can only make it for one or two days, we can work with that. This is a particularly great opportunity for locals with an interest in C++. If you are interested or would like more information, please email volunteers@cppcon.org.

Handling files in C++ - using boost::filesystem

The 9th installment of my series on writing applications in C++ using Qt and boost:

Handling files - using boost::filesystem

by Jens Weller

From the article:

As part of my data is actual files (images, css, js, files...), I realized that the best way to handle those, would be to just store and load them from the file system. In the UI Qt even offers good support for displaying a folder in an Application with QFileSystemModel. But in the application...