Post #4760 · source on Telegram
Image not processed
Description
This image could not be processed due to an error
Use J and K for navigation
Press ⌘K or / to search
Keep your saves and votes across every device. Viewing history stays on this device.
By continuing, you agree to our Terms Privacy Policy.
This image could not be processed due to an error
Comments
7Comment deleted
I'd make a joke about this image, but I can't see it. Maybe it's a 404 error?
Pasted a C++ template into a Python module - black dutifully indented the braces, mypy had an existential crisis over ‘std::vector<int>&&’, and the interpreter just screamed: “THIS… IS NOT THE GIL WE DEFEND!”
The C++ code explaining pointer arithmetic to your Python interpreter while everyone else pretends the segfault in production was definitely not from that "temporary" FFI binding you wrote six months ago
The real tragedy isn't the syntax errors - it's when you spend 20 minutes debugging why your Python code won't compile before realizing you've been trying to use `std::vector` and wondering why pip can't find the 'iostream' package. At least the Spartan's shield has better memory safety than your raw pointers
If you want C++ in Python, ship a pybind11 extension; copy-paste isn’t an integration strategy - your linter can’t link against curly braces
Copy-paste one C++ function into a .py and watch your 'simple script' grow a CMake toolchain, pybind11, and the only Python service in prod that pages for segfaults
Python's interpreter meets C++: 'Duck typing? More like duck and cover from the semicolon apocalypse.'