Tag: programming

Back to Basics: RAII in C++ – Andre Kostur – CppCon 2022

  • Lobby
  • Tag Archives: programming

https://cppcon.org/
---

Back to Basics: RAII in C++ - Andre Kostur - CppCon 2022
https://github.com/CppCon/CppCon2022

The RAII (Resource Acquisition is Initialization) idiom is a powerful tool used to guard against resource mishandling in C++. Learn about the idiom, examples provided in the Standard Library, and some design considerations for writing your own RAII classes.
---

Andre Kostur

He has been a professional C++ developer for nearly 30 years, and was responsible for introducing and championing the use of C++ in his previous company. He is responsible for forming and leading a C++ Users Group as his current company, routinely presenting on all topics regarding C++ ranging from the basics to the latest developments in C++20 and beyond.
__

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 #raii

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

10 Years of Meeting C++ – Historical Highlights and the Future of C++ – Jens Weller – CppCon 2022

  • Lobby
  • Tag Archives: programming

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

10 Years of Meeting C++ - Historical Highlights and the Future of C++ - Jens Weller - CppCon 2022
https://github.com/CppCon/CppCon2022

As of 2022 its now 10 years that Meeting C++ exists. With this talk I'd like to share the experiences made through running and organizing a conference and platform for the C++ community during the last decade. Going from an all new C++11 to seeing C++23 becoming complete in 2022, the last years offered many interesting and exciting new things for C++. And the amazing thing is that this process hasn't stopped, looking forward we can see an entirely new version of C++ slowly taking shape. So lets take a look at the highlights we've had and whats ahead for C++ in the coming years.
---

Jens Weller

Jens Weller is the organizer and founder of Meeting C++. Doing C++ since 1998, he is an active member of the C++ Community. From being a moderator at c-plusplus.de and organizer of his own C++ User Group since 2011 in Düsseldorf, his roots are in the C++ Community. Today his main work is running the Meeting C++ Platform (conference, website, social media and recruiting). His main role has become being a C++ evangelist, as this he speaks and travels to other conferences and user groups around the world.
---

Videos Streamed & Edited by Digital Medium: http://online.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: , , , ,

Managing External API’s in Enterprise systems – Pete Muldoon – CppCon 2022

  • Lobby
  • Tag Archives: programming

https://cppcon.org/
---

Managing External API’s in Enterprise systems - Pete Muldoon - CppCon 2022
https://github.com/CppCon/CppCon2022

Many codebases use external libraries and wrap their associated API's for application use. Once these external dependencies are entrenched and widely used in your system even small changes in the use of these external APIs can force sweeping changes across your codebase.
This presentation will take an example request API and demonstrate using sound engineering choices how to encapsulate it to provide a more efficient modern interface i.e. move-only results, futures/promise instead of callbacks, void pointers etc.
After showing the use of this API, new requirements will now emerge that require new source data from the API potentially causing large scale code changes with branching required for a gradual transition from the old data source to the new source is rolled out.
We will explore various techniques to preserve the global calling semantics and introduce localized decoupling so wide spread code changes are not needed. These codes changes are transparent to the original callers of the API hence no calling code changes are needed. This approach will then be expanded to apply the same engineering techniques to the unit & system testing code. The final decommissioning and removal of the old code is explored and shown now to be simple and straight forwards.
Additional real world problems are then incorporated like batching, parallelization while again localizing code changes on the migration path.
This prioritizing of the migration path for introducing API use changes will lead to a novel perspective for the next time your codebase has external dependency changes imposed on it from within or without.

This is all backed up with code examples. This alternative approach has being successfully employed for real world situations in Bloomberg.
---

Pete Muldoon

Pete Muldoon has been using C++ since 1991. Pete has worked in Ireland, England and the USA and is currently employed by Bloomberg. A consultant for over 20 years prior to joining Bloomberg, Peter has worked on a broad range of projects and code bases in a large number of companies both tech and finance. Such broad exposure has, over time, shown what works and what doesn't for large scale engineering projects. He's a proponent of elegant solutions and expressive code.
---

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 #api

Filed under: UncategorizedTagged with: , , , , ,

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

  • Lobby
  • Tag Archives: programming

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

  • Lobby
  • Tag Archives: programming

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: , , , , , , , ,

Embracing Trailing Return Types and `auto` Return SAFELY in Modern C++ – Pablo Halpern – CppCon 2022

  • Lobby
  • Tag Archives: programming

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

Embracing Trailing Return Types and `auto` Return SAFELY in Modern C++ - Pablo Halpern - CppCon 2022
https://github.com/CppCon/CppCon2022

In the old days (and in C), the return type of a function was specified at the beginning of its prototype, after the storage-class specifiers, if any. Modern C++ adds two additional ways to specify a function's return type, adding convenience, uniformity of expression, and, in some cases, clarity. Trailing return types were introduced in C++11 and have several potential advantages over leading return types, especially for function templates and lambda expressions. Automatically deduced return types go a step further, allowing the programmer to eschew specification of the return type entirely and letting the compiler do all of the work. These features can be used to great advantage when the return type of a function is complex or is best expressed directly as the type of an expression. Used unwisely, though, deduced return types can impede readability, create excessive coupling between the interface and the implementation of a function, and create latent bugs in template code. In this talk, we will cover the syntax and restrictions for these two new features, examine their relationship to each other, explore several use cases for each, and -- most importantly -- probe potential pitfalls when attempting to employ these language features.
---

Pablo Halpern

Pablo Halpern has been cppcon.digital-medium.co.uk/tag/programming/">programming in C++ since 1989 and has been a member of the C++ Standards Committee since 2007. His major contributions to the standard have been in the areas of parallel and vector cppcon.digital-medium.co.uk/tag/programming/">programming constructs as well as on improvements to the usability of memory allocators. Pablo is a major contributor to the book, Embracing Modern C++ Safely by John Lakos and Vittorio Romeo (2021) and is the author of The C++ Standard Library from Scratch (2000). His current development focus is in moving the API of the open-source BDE library in the direction of the C++17 PMR allocator model. He lives with his partner in Boston, MA. When not working on books and allocators, he enjoys model rocketry, hiking, skiing, snowboarding, and watching opera. He has recently started learning Pickleball.
---

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: , , , , , , ,

Back to Basics: C++ API Design – by Jason Turner – CppCon 2022

  • Lobby
  • Tag Archives: programming

https://cppcon.org/
---

Back to Basics: C++ API Design - Jason Turner - CppCon 2022
https://github.com/CppCon/CppCon2022

Let’s face it: writing a C++ API can be a daunting task. You recognize that APIs are a critical aspect of your code, and you’d like to provide your users with a great experience, but how?

This talk will focus on one key aspect: "Making APIs Hard to Use Wrong." How do we design APIs that help, instead of hurt, our users?
---

Jason Turner

Jason Turner is a regular speaker at C++ conferences, the creator of the C++ Best Practices book, several C++ related Puzzle Books, “Learning C++ Best Practices” video series from O’Reilly and the http://cppbestpractices.com online C++ coding standards document. As a contractor, speaker and trainer he has specialized in helping others produce high quality C++ code.

Jason is also host of the YouTube video series, C++ Weekly.
__

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 #api

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

Case For a Standardized Package Description Format for External C++ Libraries – Luis Caro Campos

  • Lobby
  • Tag Archives: programming

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

The Case For a Standardized Package Description Format for External C++ Libraries - Luis Caro Campos - CppCon 2022
https://github.com/CppCon/CppCon2022

According to the most recent ISO C++ Developer Survey, the most common mechanism for consuming third-party libraries is by making the external source code part of the build, despite the recent advancements provided by package managers like Conan and vcpkg.

On the other hand, the same survey reflects that build times are still one of the major pain points reported by most C++ developers. So what is hindering the adoption of package managers to handle third-party dependencies to help avoid time spent compiling external code that we are less likely to be working on?

In the almost 40 years of history of C++, the proliferation of build system solutions, and the evolving conventions, have made consuming external C++ libraries incredibly challenging: there is no interoperability in the way usage requirements are propagated between libraries and build systems. Earlier attempts at providing an abstraction layer include tools such as Pkg-Config and Libtool, however they have their limitations. More recently, CMake-generated configuration files that correctly express usage requirements have become more predominant, however, they are very much tied to CMake and are difficult to consume from other build systems.

To mitigate this, package maintainers for public binary repositories have had to turn to an intricate set of patches on top of third party source build scripts in order to achieve interoperability. Is there a world where we can further isolate the implementation details of build systems and the way to consume libraries? What role do new language features such as C++ modules play in this landscape? Some of these conventions even affect package managers for other languages that provide bindings to C/C++ libraries, such as Python.

This talk provides an overview of how the evolving conventions of the past 40 years are still having an impact on our ability to consume externally-provided C++ libraries, and opens a discussion on what properties a package definition format would have to satisfy in order to achieve isolation between build systems and package managers.
---

Luis Caro Campos

Luis is a Electronics and Computer Engineer based in the UK, with previous experience as a C++ engineer in the field of Computer Vision and Robotics. Currently, he is concerned with the problem of enabling Software Development at scale: focused on the tooling and processes to support large teams of engineers in writing code. He is currently part of the Conan team at JFrog, focused on the problems of the C++ community at large.
---

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: , , , , , ,

Using Modern C++ to Eliminate Virtual Functions – Jonathan Gopel – CppCon 2022

  • Lobby
  • Tag Archives: programming

https://cppcon.org/
---

Using Modern C++ to Eliminate Virtual Functions - Jonathan Gopel - CppCon 2022
https://github.com/CppCon/CppCon2022

As of C++20, there are no cases in which statically linked programs require virtual functions. This talk will explore techniques for replacing runtime polymorphism with compile-time polymorphism such that virtual functions are never necessary. This talk will also address the higher-order concern of when it might make sense to avoid virtual functions or remove them from a codebase, as that decision ultimately is a design decision that only the author of the code can make. Attendees can expect to come away with a stronger understanding of the purposes of virtual functions and the mechanisms in modern C++ that can now be used to achieve those same purposes.
---

Jonathan Gopel

Jonathan is a C++ enthusiast who likes to tinker with the latest language features. He spends a lot of time thinking about designing beautiful, easy to use APIs, and believes that the hard part is interfacing with the humans, not the machines. In his spare time, Jonathan pursues outdoor sports - especially climbing, skiing, and running.
---

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 #functions

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

Back to Basics: C++ Smart Pointers – David Olsen – CppCon 2022

  • Lobby
  • Tag Archives: programming

https://cppcon.org/
---

Back to Basics: C++ Smart Pointers - David Olsen - CppCon 2022
https://github.com/CppCon/CppCon2022

Smart pointers were one of the many powerful additions to C++11, providing programmers with easy-to-use tools to help manage memory resources and avoid certain kinds of memory errors. This back-to-basics session will give you a solid foundation in smart pointers, explaining what smart pointers are in general and how to use the standard smart pointer types std::unique_ptr and std::shared_ptr. It will present a set of clear guidelines for when and how to use smart pointers. Attendees will leave this session having learned, among other things, how to write code that never leaks memory.
---

David Olsen

David Olsen has more than two decades of software development experience in a variety of programming languages and development environments. For the last six years he has been the lead engineer for the NVIDIA HPC C++ compiler, focusing on running parallel algorithms on GPUs. He is a member of the ISO C++ committee, where he was the champion for the extended floating-point feature in C++23.
---

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 #coding

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