The project is great. The HN comments are embarrassing. Isn’t it ironic to imply laziness by chiming in with “vibe coded” which in itself is such a lazy reaction.
ddtaylor 2 hours ago [-]
Thank you for sharing. The only thing I don't understand why this is a header only implementation with a macro that goes in a C++ file.
#define CANVAS_ITY_IMPLEMENTATION
erwincoumans 42 minutes ago [-]
It is common for header-only libraries: you need to include this header in one c++ using the macro for linking (don't use that macro in other c++ files to avoid duplicate symbols). In C++, you can declare a function as many times as you want, but you can only define it (write the actual body) once in the entire project.
ddtaylor 10 minutes ago [-]
I understand that part, but I don't see why do this instead of basic Makefile or CMake setup. It seems like more work than a regular linker at that point. For what purpose?
socalgal2 2 hours ago [-]
that's a common pattern in C++ land because there is no standard way to use libraries in C++
https://github.com/a-e-k/canvas_ity/issues/11#issuecomment-2...
https://github.com/p-ranav/awesome-hpp