Lightning Talk: Write Valid C++ and Python in One File - Roth Michaels - CppCon 2023

Sdílet
Vložit
  • čas přidán 18. 04. 2024
  • cppcon.org/
    ---
    Lightning Talk: Write Valid C++ and Python in One File - Roth Michaels - CppCon 2023
    github.com/CppCon/CppCon2023
    A demo of a neat/horrifying hack to use the preprocessor to define a constants file that can be consumed by C++ and Python.
    ---
    Roth Michaels
    Roth Michaels is a Principal Software Engineer at Native Instruments, an industry leader in real-time audio software for music production and broadcast/film post-production. In his current role he is involved with software architecture and bringing together three merged engineering organizations and legacy codebases: Brainworx, iZotope, and Native Instruments. He also supports the Audio Research team to help accelerate moving research to productization and developing fast prototyping tools for product teams. Before merging with Native Instruments, when he joined iZotope, Roth was the lead library designer of a new internal cross-platform "Glass", part of which is now available as open-source. More recently in his former role as Mix/Master Software Architect, Roth helped develop the reference implementation to move iZotope's products to subscription and led the team that launched the company’s first SaaS offering for music producers. Roth studied music composition at Brandeis University and continued his studies in the Dartmouth Digital Musics program. Roth began his career in software development writing software for his own compositions, and the works of other composers and artists, and teaching MaxMSP to composers and musicians; both private instruction and designing university courses. Before joining iZotope, he was working as a consultant for small startups working on mobile applications specializing in location services and Bluetooth.
    ---
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    CZcams Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
    ---
    Registration for CppCon: cppcon.org/registration/
    #cppcon #cppprogramming #cpp #pythonprogramming
  • Věda a technologie

Komentáře • 15

  • @bruderdasisteinschwerermangel

    this looks like the kind of "temporary workaround" solution you find in your project and git blame will date it like 6 years back, truly beautiful

  • @SergeantPepper
    @SergeantPepper Před 28 dny +1

    I like it. I feel this is exactly why C had the preprocessor in the first place, and they limit it to one file so it doesn't get out of hand. 👍

  • @sirhenrystalwart8303
    @sirhenrystalwart8303 Před 29 dny +1

    This is pretty clever. Personally, I would create a tiny python binding with a function to return the version number, and let c++ be the source of truth.

  • @gerard144
    @gerard144 Před 28 dny

    The preprocessor just keeps on giving!

  • @hbobenicio
    @hbobenicio Před 29 dny

    That was genius!!!

  • @muzikleringucu
    @muzikleringucu Před 25 dny

    clever. the same logic can be used in cmake as well. thanks for idea

  • @EzekielWarren
    @EzekielWarren Před 29 dny +1

    horrible (i love it)

  • @Eyalkamitchi1
    @Eyalkamitchi1 Před 29 dny

    lol wtf this is genius, we need to implement this for the entire language

  • @bruradagast
    @bruradagast Před 28 dny

    hilarious 🤣🤣🤣

  • @BenjaminWheeler0510
    @BenjaminWheeler0510 Před 29 dny

    ever heard of JSON?

  • @lsp0
    @lsp0 Před 29 dny

    Just because you can doesn't mean you should

  • @IsmeGenius
    @IsmeGenius Před 23 dny +1

    Sadly I have an experience working with code that used this approach. It was some serialization code, and it was not pretty.
    It my seem cool, but it is disgusting.
    Correct way? Brace yourself, write a generator which takes JSON or something and outputs normal C++ and python files.

  • @organichand-pickedfree-ran1463

    disgusting😂