~/lightning

Lightning Talk: Write Valid C++ and Python in One File

Lightningat CppCon 2023 · on Monday, 2023-10-02· [developer-experience]
slides:none on file

A concrete hack that produces one source file both C++ and Python can parse: the C preprocessor emits C++ declarations and Python assignments by using macros that expand to MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER constants, #undef after use and a macro that creates a dummy print_namespace = 0 so Python imports a namespace-like object. The demo builds a single chimera file, compiles and imports correctly, claims an order‑of‑magnitude saving in update time, and leaves build number automation to a separate step.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.