Tag: metaprogramming

Lightning Talk: majsdown: Metaprogramming? In my Slides? – by Vittorio Romeo – CppCon 2022

  • Lobby
  • Tag Archives: metaprogramming

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

Lightning Talk: majsdown: Metacppcon.digital-medium.co.uk/tag/programming/">programming? In my Slides? - Vittorio Romeo - CppCon 2022
https://github.com/CppCon/CppCon2022

"Showcase of a new open-source flavour of Markdown I developed, allowing users to write inline ECMAScript 6 code directly as part of the Markdown source. The preprocessor is written in C++20 and uses the C/C++ QuickJS library.

Notable use cases: automatic Godbolt link generation, embedding C++ source files, stateful slides, decorating C++ code blocks, etc."
---

Vittorio Romeo

Vittorio Romeo (B.Sc. Computer Science, 6+ YoE at Bloomberg) works on mission-critical C++ infrastructure and provides Modern C++ training to hundreds of fellow employees.

He began cppcon.digital-medium.co.uk/tag/programming/">programming around the age of 8 and became a C++ enthusiast shortly after discovering the language. Vittorio created several open-source C++ libraries and games, published many video courses and tutorials, actively participates in the ISO C++ standardization process, and maintains the popular SFML library.

He co-authored the acclaimed "Embracing Modern C++ Safely" book (published in January 2022) with J. Lakos, R. Khlebnikov, and A. Meredith.

Vittorio is an active member of the C++ community with an ardent desire to share his knowledge and learn from others: he presented and offered workshops over 20 times at international C++ conferences (including CppCon, C++Now, ++it, ACCU, C++ On Sea, C++ Russia, and Meeting C++), covering topics of various nature.

He also maintains a website with advanced C++ articles and a YouTube channel featuring well-received modern C++11/14 tutorials. Lastly, he's active on StackOverflow, taking great care in answering interesting C++ question (90k reputation).
__

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

Lightning Talk: C++20 – A New Way of Meta-Programming? – by Kris Jusiak – CppCon 2022

  • Lobby
  • Tag Archives: metaprogramming

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

Lightning Talk: C++20 - A New Way of Meta-Programming? - Kris Jusiak - CppCon 2022
https://github.com/CppCon/CppCon2022

In this lightning talk we will explore a few template meta cppcon.digital-medium.co.uk/tag/programming/">programming techniques which C++20 enables.
---

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

Binary Object Serialization with Data Structure Traversal & Reconstruction in Cpp – Chris Ryan – CppCon 2022

  • Lobby
  • Tag Archives: metaprogramming

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

Binary Object Serialization with Data Structure Traversal & Reconstruction in C++ - Chris Ryan - CppCon 2022
https://github.com/CppCon/CppCon2022

This talk will describe a minimally intrusive technique to add serialization to a set of classes, traversing hierarchical and non-hierarchical data, persisting in a binary format and dynamic reconstruction

When storing, it can deduce the data types using Template Argument Deduction (TAD) and safely protects against recursive reentrancy.
When loading, it uses a reflection type technique for dynamic object creation using an automatic serializable type registration mechanism.

Reflection as a language feature will be unavailable until at least C++26. This serialization technique can dynamically recreate a persisted complex data structure/structure network. This is a platform agnostic technique.

Not everybody is yet able to migrate to C++20, so this is using a C++14 compliant SFINAE/std::enable_if<> mechanism. We will also explore optimizations and what it takes to convert this technique to use C++20 concepts.

The serialized data can be persisted to a disk file, shared memory for IPC or using network streams for live remote data sharing like HPC or gaming.

This is not trying to sell you on the use of the library but rather sharing metacppcon.digital-medium.co.uk/tag/programming/">programming techniques you can add to your toolbox.
---

Chris Ryan

Chris Ryan was classically trained in both software and hardware engineering. He is well experienced in Modern C++ on extremely large/complex problem spaces and Classic ‘C’ on Embedded/Firmware devices (large & small). Chris has no interest in C#/.,Net, Java, js or any web-ish tech.
---

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

Personal Log – Where No Init Has Gone Before in C++ – Andrei Zissu – CppCon 2022

  • Lobby
  • Tag Archives: metaprogramming

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

Personal Log - Where No Init Has Gone Before in C++ - Andrei Zissu - CppCon 2022
https://github.com/CppCon/CppCon2022

Can your code have logging entries whose sensitive messages don't show up in the shipped binaries? And can the following code snippet ever work?

static bool initially_false = false;
void no_one_calls_me() { DO_ON_INIT(initially_false = true); }
int main() {assert(initially_false == true); return 0;}

Well yes, this is actual working C++17 code! And yes, we can use this tool to produce a logger with vanishing strings!

As part of this talk we will go behind the scenes of the DO_ON_INIT utility, the process involved in developing the idea and its surprisingly simple implementation details (under 20 lines of C++17 code, and even less in C++20).

We shall also see how this utility is instrumental in making possible the no-strings-attached logger and its associated automatically-generated decoding facility. We will implement a simple obfuscation technique which replaces logged strings with hashes at compile-time, to avoid shipping binaries containing sensitive textual giveaways. To decode such logs (in a separate decoder utility) we shall use DO_ON_INIT to automatically collect and register all the logged strings system-wide, along with their hashes, without requiring any additional tool (such as an in-house pre-processor).

This is yet another example of emergent behavior in C++, consisting of unrelated language features being put to use together in a novel and unexpected way. Could your idea be next?
---

Andrei Zissu

Andrei Zissu is an experienced cross-industry C++ developer, notably having worked on low-level reverse engineering systems employing API hooking, DLL injection and other advanced techniques. In early 2022 he joined the WG21 standards committee as a member of the Israeli NB, and is planning to explore the exciting realm of reflection.

Andrei is currently employed at Binah.ai, an Israeli startup developing ground breaking AI-based remote health monitoring technology. The feature presented in this talk has been developed by him in recent months for the Binah.ai C++17 codebase, and is being gradually staged into production code.

Andrei loves the occasional opportunity to explore the rough edges of C++. The latest such opportunity along with its discoveries will be presented in this talk.
---

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

What Can Compiler Benchmarks Reveal About Metaprogramming Implementation Strategies – Vincent Reverdy

  • Lobby
  • Tag Archives: metaprogramming

https://cppcon.org/
---

What Can Compiler Benchmarks Tell Us About Metaprogramming Implementation Strategies in C++ - Vincent Reverdy - CppCon 2022
https://github.com/CppCon/CppCon2022

In 2022, how do modern compilers really deal with metaprogramming code? And as a consequence what are the best metaprogramming patterns to maximize compile-time performance? Optimizing application runtime is often guided by a mix of popular knowledge, expertise, and, when required, hard cold benchmarking data. Over the years, tools have been developed to help with this process and make the most of available computing resources. But what about the few situations where the compile-time itself is critical, like in the case of metaprogramming-heavy libraries intended to be used at the core of large projects? Does the niche knowledge accumulated over the years in this regard really match the hard cold data coming from compilers? Additionally, how do compilers behave when pushed to their absolute limits? And is there a lot of discrepancy between the behaviors of different compilers?

This talk is an exploration of all these questions and what it means in practice for implementations. We will see how to build reliable portable benchmarks for compilers using advanced metaprogramming constructs both in C++20 as well as in C++17 when legacy compatibility matters. We will dive, in particular, into the internals of a metabenchmarking library that has been designed to help with the compile-time generation of such benchmarks. To better understand the real limit of modern compilers when it comes to generative programming strategies, we used supercomputers to explore the parameter space of these benchmarks. In this talk, we will dissect the results together to see if the popular knowledge is reflected in the data. This will allow us to analyze, amongst other things, the real cost of class templates, function templates, generic lambdas, value-based metaprogramming, and concepts on compile-time for various compilers and various compiler versions. And, in many cases, we will see that the results can be very counter-intuitive.

The goal of this talk is to give a clear and up-to-date picture of what really matters for compile-time today. But beyond that, the goal is also to provide guidelines on implementation strategies and metaprogramming patterns when compile-time matters. Finally, it also constitutes an invitation to compiler writers to compare their tools when facing particularly ill-behaved situations.
---

Vincent Reverdy

Vincent Reverdy is a Full Researcher in Computer Science and Astrophysics at French Center for Scientific Research (CRNS) and located at the Annecy Laboratory for Particle Physics (LAPP) in the French Alps. He also is a member of the French delegation to the C++ Standards Committee. After a PhD at the Paris Observatory in 2014 on the topic of numerical cosmology and general relativity for which he explored extensively advanced metaprogramming techniques, he joined the University of Illinois at Urbana-Champaign in the US. There, he led an interdisciplinary research group in both computer science and computational astrophysics, trying to bridge the gap between programming languages and computational sciences. In late 2019 he moved back to France to continue to work on software architecture aspects related to astrophysics, and joined CNRS in January 2022 to lead long-term research aiming at building bridges between theoretical computer science including type theory and category theory on one side, and computational sciences with a focus on numerical astrophysics on the other side. Finally, as a member of the C++ committee, he has been working extensively on low-level programming components, including bit manipulation, as well as mathematical abstractions.
__

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

Filed under: UncategorizedTagged with: , , , , ,

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

  • Lobby
  • Tag Archives: metaprogramming

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

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

  • Lobby
  • Tag Archives: metaprogramming

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