Viktor Kirilov

speaker

With 7 years of professional experience with C++ in the games and VFX industries, Viktor currently spends his time writing open source software (since 01.01.2016) - and occasionally doing some contract work. His latest work has been the implementation of hot code-reloading at runtime for the Nim programming language. He is also the author of doctest - "The fastest feature-rich C++11 single-header testing framework". His interests are the making of games and game engines, high-performance code, data-oriented design, cryptocurrencies, optimizing workflows and incorporating good practices in the software development process such as testing and the use of modern tools like static analysis or instrumentation. Viktor is from Sofia, Bulgaria and his profession is his hobby.

Personal website: http://onqtam.com/.

 

Presentations

C++ as Assembly 2.0 - Hello Nim (2019)


In C++ it takes more than 5000 lines of code to properly implement optional - a value and a bool (hopefully without bugs and design flaws - fingers crossed! and let's not mention build times…).

Nim is a statically typed systems and applications programming language which offers some of the most powerful metaprogramming capabilities. It is the next iteration of imperative language design and aims to dethrone C/C++ for high-performance coding - among its rivals are Rust and D. Nim is also perfectly suited for software typically written in C#, Java, JavaScript, etc. - basically all types of software. Nim can bridge the gap between business logic and high performance, sprinkling improved developer productivity on top. Nim is compiled to C/C++ (and JavaScript among others) and thus interoperability is straightforward and without any performance penalties - lots of existing C/C++ software can be reused and built upon.

The talk outline is as follows:

  • the landscape of (compiled & high performance) programming languages and their use in the industry
  • thoughts on the evolution of C++ and where it fits
  • introduction to Nim - features and capabilities
  • metaprogramming and introspection in Nim (HTML DSL example)
  • the whole-program compilation model of Nim - how the compiler actually works and what the generated C++ code looks like
  • a thorough comparison with C++ (language features and workflow)
  • interfacing with C++
  • the future of the language and ways to go forward

It's time to treat C++ as assembly and the C++ ecosystem as just another platform which a language such as Nim can target. Typescript is a bright example of a better tool for software development on top of a stable system.

 

The Hitchhiker's Guide to Faster Builds - Part 1 of 2 (2018)


C++ is notorious for things such as performance, expressiveness, the lack of a standard build system and package management, complexity and long compile times.

The inability to iterate quickly is one of the biggest killers of productivity. This talk is aimed at anyone interested in improving the last of these points - it will provide insights into why compilation (and linking) take so long for C++ and will then provide an exhaustive list of techniques and tools to mitigate the problem, such as:

  • tooling and infrastructure - hardware, build systems, caching, distributed builds, diagnostics of bottlenecks, code hygiene,
  • techniques - unity builds, precompiled headers, linking (static vs shared libraries),
  • source code modification - the PIMPL idiom, better template use, annotations,
  • modules - what they are, when they are coming to C++ and what becomes obsolete because of them.

 

The Hitchhiker's Guide to Faster Builds - Part 2 of 2 (2018)


C++ is notorious for things such as performance, expressiveness, the lack of a standard build system and package management, complexity and long compile times.

The inability to iterate quickly is one of the biggest killers of productivity. This talk is aimed at anyone interested in improving the last of these points - it will provide insights into why compilation (and linking) take so long for C++ and will then provide an exhaustive list of techniques and tools to mitigate the problem, such as:

  • tooling and infrastructure - hardware, build systems, caching, distributed builds, diagnostics of bottlenecks, code hygiene,
  • techniques - unity builds, precompiled headers, linking (static vs shared libraries),
  • source code modification - the PIMPL idiom, better template use, annotations,
  • modules - what they are, when they are coming to C++ and what becomes obsolete because of them.

 

Mix tests and production code with doctest - implementing and using the fastest modern C++ testing framework (2017)


doctest is new to the C++ testing framework scene but is by far the fastest both in compile times (by orders of magnitude) and runtime compared to other such feature-rich alternatives.

It brings the ability of compiled languages such as D / Rust / Nim to have tests written directly in the production code by providing a fast, transparent and flexible test runner with a clean interface which can be removed entirely from the binary along with all tests for release builds of the software that are shipped to customers.

By attending this talk you will get familiar with the framework and see how it's different from all the rest. To make things more interesting the presentation will not just focus on using the framework, but will delve into useful and generally applicable C++ techniques from its implementation for more than half the session length which can be applied in different areas of your work – like how to:

  • register code automatically before the program enters main()
  • decompose expressions with templates
  • translate exceptions – extendable by the user
  • write a header-only library which compiles very fast
  • implement assert macros that don't result in code bloat
  • deal with warnings
  • loop a void owl once with while((void)0,0)