Tag: Cpp20

Using C++14 in an Embedded “SuperLoop” Firmware – Erik Rainey – CppCon 2022

https://cppcon.org/
---

Using C++14 in an Embedded “SuperLoop” Firmware - Erik Rainey - CppCon 2022
https://github.com/CppCon/CppCon2022

This presentation covers what the execution environment of an embedded "superloop" firmware is in order to describe later why certain C++14 language and library features are used and others are not. This environment lacks many basic features and capabilities that traditional C++ programmers may think are common place but is able to be programmed in C++14 (and later) with a specific design paradigms and guidelines. Programmers with deeply embedded C experience will be familiar with some of the limitations of the environment but may find the C++ solutions quite refreshing! The talk will conclude with some comments on C++17 / C++20 features which will be quite valuable to embedded environments of all types.
---

Erik Rainey

Erik is a Senior Software Engineer at Amazon working in the Prime Air on low-level/embedded firmware written in C++ for drones. He has got more than 20 years of professional experience making 21st century technologies on embedded devices which can blink LEDs. He's also been a contributor to Khronos's OpenVX 1.0 specification.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #firmware

Filed under: UncategorizedTagged with: , , , , ,

Back to Basics: The C++ Core Guidelines – Rainer Grimm – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

Back to Basics: The C++ Core Guidelines - Rainer Grimm - CppCon 2022
https://github.com/CppCon/CppCon2022

Why do we need guidelines for modern C++? My answer boils down to three points:

1. C++ is complex for the novices

2. C++ is challenging for the professionals

3. C++ is used in safety-critical software

The C++ Core Guidelines are a C++ community-driven project by the editors Bjarne Stroustrup and Herb Sutter. They provide best practices for modern C++, including all important aspects of software development such as, for example, interfaces, functions, classes, concurrency, and templates. Applying the C++ Core Guidelines means writing correct software by design.
In my talk, I present the most important rules of the C++ Core Guidelines. My talk should not be your endpoint but your starting point for a more profound studying of their invaluable rules.
---

Rainer Grimm

Rainer has worked as a software architect, team lead, and instructor since 1999. In 2002, Rainer created a company-intern meeting for further education and had given training courses since 2002. Rainer's first tutorials were about proprietary management software, but he began teaching Python and C++ soon after. In his spare time, he likes to write articles about C++, Python, and Haskell and speak at conferences. Rainer publishes weekly on his English blog Modernes C++. Since 2016, Rainer has been an independent instructor, giving seminars about modern C++ and Python. Due to his profession, he constantly searches for the best way to teach modern C++. He published several books in various languages about modern C++ in the last ten years, including the last one "C++ Core Guidelines Explained: Best Practices for Modern C++".
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , ,

C++ Coroutines, from Scratch – Phil Nash – CppCon 2022

https://cppcon.org/
---

C++ Coroutines, from Scratch - Phil Nash - CppCon 2022
https://github.com/CppCon/CppCon2022

C++ 20 introduced coroutines into the language. Coroutines have the potential to greatly simplify some types of code - particularly, but not limited to, anything asynchronous in nature. But early adoption has been hindered by both the lack of library support in the standard and the inherent complexity of the feature itself (which, due to that lack of library support, you are typically more exposed to).

Now we have a bit of a “Blind men and an elephant” problem - where we’re getting disjointed glimpses of what coroutines, supposedly, are - without the big picture. I can’t claim to be able to give you a comprehensively big enough picture in a 60 or 120 minute talk, but my aim is to plot a journey through it by starting with a motivating example (a typical multiple async task problem), looking at how we might approach this without coroutines, then seeing what coroutines can do for us - and finally looking at what that would look like with library support.
---

Phil Nash

Phil Nash is the original author of the C++ test framework, Catch2, and composable command line parser, Clara. As Developer Advocate at SonarSource he’s involved with SonarQube, SonarLint and SonarCloud, particularly in the context of C++. He’s also a member of the ISO C++ standards committee, organiser of C++ London and C++ on Sea, as well as co-host and producer of the Cpp.chat and No Diagnostic Required podcasts.

More generally Phil’s an advocate for good testing practices, TDD and using the type system and functional techniques to reduce complexity and increase correctness. He’s previously worked in Finance and Mobile and offers training and coaching in TDD for C++.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #coroutines

Filed under: UncategorizedTagged with: , , , ,

Nth Pack Element in C++ – A Case Study – Kris Jusiak – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

Nth Pack Element in C++ - A Case Study - Kris Jusiak - CppCon 2022
https://github.com/CppCon/CppCon2022

Varadic packs have been with us since C++11, however getting the nth element efficiently out of a variadic pack still remains not optimal/difficult.
During the years, with new standards emerging, more and more approaches have been discovered but no silver bullet has been found yet or has it?
If understanding of how std::get<N>(tuple) works sounds compeling then this session is for you!

In this case study we will explore different techniques of accessing the nth element of a variadic pack... starting from naive approaches, through template meta-cppcon.digital-medium.co.uk/tag/programming/">programming tricks, to compiler intrinsics. We will also focus and deep dive into C++20 features which enables new techniques in order to understand modern ways of dealing with variadic packs...

Comparison against different solutions also will be conducted including compilation times as well as readability including comparison between different languages such as Rust, Nim, D, Circle and C++.

At the end of this session, the audience will have a better understanding of C++20 features and how to deal with variadic packs... and how it compares to different system languages.

Let's get ready to get nth element at CppCon 2022!
---

Kris Jusiak

Kris is a Senior Software Architect passionate about cppcon.digital-medium.co.uk/tag/programming/">programming and who has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial, LLC. He has an interest in modern C++ development with a focus on performance and quality. He is an open-source enthusiast with multiple open-source libraries where he uses template meta-cppcon.digital-medium.co.uk/tag/programming/">programming techniques to support the C++ rule - "Don't pay for what you don't use" whilst trying to be as declarative as possible with a help of domain-specific languages. Kris is also a keen advocate of extreme cppcon.digital-medium.co.uk/tag/programming/">programming techniques, Test/Behavior Driven Development and truly believes that 'the only way to go fast is to go well!'.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , , , ,

Killing C++ Serialization Overhead & Complexity – Eyal Zedaka – CppCon 2022

https://cppcon.org/
---

Killing C++ Serialization Overhead & Complexity - Eyal Zedaka - CppCon 2022
https://github.com/CppCon/CppCon2022

One of the hottest topics in C++ being data serialization, which is a major enabler for inter process communication, persisting the state of the program, or storing information in convenient way. That’s why there are countless data serialization frameworks out there, even ones made for cross programming-language communication.

When considering a serialization framework we face many considerations - convenience of use, performance, size of the library, size of the data, is the library applicable for embedded, support for cross language communication, build system dependencies (for those requiring to generate code in build time), and many more.

If I got you wondering about the above, and you are looking for some modern C++20 zero overhead macro-less serialization that requires close to nothing from you as a developer, together with almost unmatched performance, freestanding/embedded support out of the box, and a fair chance to blow your mind, this session is for you, hope to see you there!
---

Eyal Zedaka

Eyal Zedaka is a technical leader and C++ instructor, with more than 10 years of experience in C++, operating systems and device security. He is currently with Microsoft as principal manager, responsible for OS application sandboxing through virtualization. In the past, Eyal was manager of device security engineering of the Magic Leap augmented reality device, where he lead security features development and security research of the device, as well as the security architecture of the device and SoC from the requirement stage. Eyal designed C++ freestanding libraries for trusted execution environments, worked closely with embedded teams regarding C++ use in lower level areas. He has spoken at CppCon 2021 about using coroutines to implement C++ exceptions in freestanding environment and embedded systems.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #serialization

Filed under: UncategorizedTagged with: , , ,

10 Tips for Cleaner C++ 20 Code – David Sackstein – CppCon 2022

https://cppcon.org/
---

10 Tips for Cleaner C++ 20 Code - David Sackstein - CppCon 2022
https://github.com/CppCon/CppCon2022

The objective of this session is to provide guidelines and tips that will help the audience write readable, testable and extensible code with modern C++.
One of the greatest challenges we face, as programmers, is to make sure that our code can be understood and used by our colleagues - and not only by the compiler.

As the complexity of C++ increases, the compiler is able to deduce and optimize more of our code, but often at the cost of making it more obscure for our colleagues.
Code that is difficult to read is difficult to test, to maintain and to extend.

In the session I propose to help the audience understand the core problems that we introduce as our programming becomes more advanced, and how we can avoid them.
The main part of the session will discuss some fairly complex and advanced C++ code which is difficult to understand. I will then demonstrate 10 easily applicable tips to make it easier to understand and to test. The benefits will be clearly evident.

There will also be a short discussion with the audience to increase the confidence that the guidelines and the tips are readily applicable in there own diverse projects.
---

David Sackstein

David is an experienced software programmer, consultant and instructor. His passion is to write readable, extensible and testable code and to help others do the same.
David leverages his broad background with a number of programming languages to achieve this goal in C++ too.
He has spoken at ACCU and at CppCon on coroutines and fibers and demonstrated how these tools can help simplify complex programs in C++.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #cppprogramming

Filed under: UncategorizedTagged with: , , , , ,

A Faster Serialization Library Based on Compile-time Reflection and C++ 20 – Yu Qi – CppCon 2022

https://cppcon.org/
---

A Faster Serialization Library Based on Compile-time Reflection and C++ 20 - Yu Qi - CppCon 2022
https://github.com/CppCon/CppCon2022

A serialization library based on compile-time reflection and C++20 is much more easier to use than protobuf and msgpack, no DSL definition, no macros and no invasive because of c++ 20.

The library is 3x faster than msgpack and protobuf, even hundreds times faster in some special scene, how to do it?

1. How to reflect an object with c++20;
2. Design a parsing faster data formats utilize static reflection;
3. Do special optimization for trivial copyable objects according to static reflection;
4. Compile time type hash make binary data size smaller and deserialization more safe;
5. std::optional can help to keep backward compatibility;

The talk will cover above points.
---

Yu Qi

Yu is a C++ programmer with 15 years experience who lives in Hangzhou, Zhejiang province, China. He loves modern C++ and has founded an open source community ( http://www.purecpp.cn/ ) to promote modern C++ in China. His focus is distributed systems and he is the author of rest_rpc, an RPC library implemented in C++14. Yu's github is https://github.com/qicosmos . Yu wrote a Chinese language book about C++11 in 2015: http://item.jd.com/11701870.html The title translates as "C++11 In Depth."
---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #serialization

Filed under: UncategorizedTagged with: , , , , , ,

From C++ Templates to C++ Concepts – Metaprogramming: an Amazing Journey – Alex Dathskovsky

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

From C++ Templates to C++ Concepts - The Amazing Journey of Metaprogramming - Alex Dathskovsky - CppCon 2022
https://github.com/CppCon/CppCon2022

Metaprogramming is been with us since C++98 but as the language evolves we have more tools and the code get simpler and clearer. In this talk we will cover the history of Templates and how the usage and readability became clearer and simpler with each standard. We will develop a concept with c++11-c++17 for checking if a type is container and then we will discover how c++20 concepts make the whole thing much easier.
In this talk we will cover the grounds of Template meta programming with quick walkthrough of how templates work and how template metaprogramming has evolved with every C++ standard. The talk will have present the evolution and benefits with many code examples. The larges example will be the development of a concept for Containers and how it is simplified with Concepts.
---

Alex Dathskovsky

Alex has over 16 years of software development experience, working on systems, low-level generic tools and high-level applications. Alex has worked as an integration/software developer at Elbit, senior software developer at Rafael, technical leader at Axxana, Software manager at Abbott Israel and now a group manager a technical manager at Speedata.io an Exciting startup the will change Big Data and analytics as we know it .On His current Job Alex is developing a new CPU/APU system working with C++20, Massive metaprogramming and development of LLVM to create the next Big thing for Big Data.

Alex is a C++ expert with a strong experience in template meta-programming. Alex also teaches a course about the new features of modern C++, trying to motivate companies to move to the latest standards.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cpp #cppprogramming

Filed under: UncategorizedTagged with: , , , , , , ,

A Lock-Free Atomic Shared Pointer in Modern Cpp – Timur Doumler – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

A Lock-Free Atomic Shared Pointer in Modern Cpp - Timur Doumler - CppCon 2022
https://github.com/CppCon/CppCon2022

std::shared_ptr is a standard smart pointer utility widely used in modern C++. A commonly overlooked property of std::shared_ptr is that while its control block is thread-safe, the shared_ptr itself isn't. To fix this, C++20 introduced std::atomic<std::shared_ptr>. However, existing implementations are typically not lock-free, rendering std::atomic<std::shared_ptr> useless for low-latency and real-time applications.

What would it take to implement a lock-free atomic shared_ptr? In this talk, we first discuss the motivation and use case, review how std::shared_ptr works and the history of std::atomic<std::shared_ptr>. We then look at existing implementations and different implementation strategies. Finally, we present a new implementation of a lock-free atomic shared_ptr which is portable to multiple platforms.
---

Timur Doumler

Timur Doumler is the Developer Advocate for C++ tools at JetBrains and an active member of the ISO C++ standard committee. As a developer, he worked many years in the audio and music technology industry and co-founded the music tech startup Cradle. Timur is passionate about building inclusive communities, clean code, good tools, low latency, and the evolution of the C++ language.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , , , , ,

MDSPAN – A Deep Dive Spanning C++, Kokkos & SYCL – Nevin Liber – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

MDSPAN - A Deep Dive Spanning C++, Kokkos & SYCL - Nevin Liber - CppCon 2022
https://github.com/CppCon/CppCon2022

This talk is a deep dive into the history behind MDSPAN (it’s roots being in Kokkos::View), the C++ standardization effort behind it (current status, various tradeoffs made over time, and language changes to help support it) and how SYCL is looking to leverage it in the future. MDSPAN is a non-owning multidimensional array reference, currently slated to be one of the flagship libraries added to C++23. View/reference vocabulary types first entered C++17 with string_view (a non-owning string reference), followed by span (a non-owning single dimension contiguous memory reference) and the ranges library. MDSPAN is the natural progression of this, and one that is critical to distributed (eg. CPU/GPU cppcon.digital-medium.co.uk/tag/programming/">programming) and high-performance computing.

MDSPAN got its roots from Kokkos::View, One key difference between Kokkos::View & MDSPAN: Kokkos::View may be owning (reference-counted reference semantics) or non-owning. The former is also being standardized for C++26 as MDARRAY, although with value and not reference-counted semantics. Separately, in 2014 Microsoft proposed a similar type, array_view, be added to the standard. After a year and a half and seven revisions, it was ultimately abandoned in favor of what is now MDSPAN because it did not provide a zero-overhead abstraction.

The MDSPAN proposal itself has taken seven years and has been through 17 revisions (so far), with input from many different companies as well as the C++ Committee. What changed over the years and why did it change? In parallel, two key language changes were made which ultimately improved the interface: deprecating the comma operator inside square brackets, and the addition of the multidimensional subscript operator. This allows the natural syntax of a[I, j, k] instead of inferior alternatives like a(i, j, k), a[I][j][k] or even a[Index(i), j, k].
---

Nevin Liber

Nevin “:-)” Liber is a Computer Scientist in the ALCF (Argonne Leadership Computing Facility) division of Argonne National Laboratory, where he works on the oneAPI/DPC++/SYCL backend for Kokkos for Aurora. He also represents Argonne on the SYCL and C++ Committees, the latter as Vice Chair of LEWGI/SG18. Back when he started out working at Bell Labs over three decades ago, a friend of his called and asked “What do you know about C++? You folks invented it!” That was enough to get a relatively shy junior engineer to go find the local expert so he could go play with it, and the rest is history! He has worked in C++ across various industries and platforms (big data, low-latency, operating systems, embedded, telephony and now exascale computing, just to name a few). He has also been a C++ Committee member since 2010 and hosted both the C++ and C standards meetings in Chicago.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , , , , , ,