1,656 karma · joined Mar 24, 2014 (12y ago) · 1,717 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
It doesn’t have the Lua to C interop overhead. You can obviously ameliorate that overhead by working on batches in C, but if you have a large and complicated dataset in Lua and need to iterate through it in C, the overhead is constantly additive so it’s certainly not just “the performance of C” when you step into C, necessarily.
If on the other hand you’re dropping into C to do something like decode a compressed stream, then the interop overhead is negligible compared to the work done in C. However, that interop overhead will be present wherever you put the boundary layer....
comment 2y ago · link · parent
comment 2y ago · link · parent
This can be done manually by polling status of descriptors, and stepping into and out of callables / passed continuations by hand, or it can be done with a task scheduling API and typesafe chained async functions.
Pick your poison, I guess, but it probably scales better than using synchronous IO and thread-per-request.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
What I need to work reliably from C++ are 1. instantiation of imported templates, ideally including CRTP, and 2. handling in D of exceptions thrown from C++, because if I use a C++ library that throws, I need to be able to handle the exception.
So far I’ve found languages that can import template classes and functions from C++ (usually by extending LLVM/Clang), but no languages that have good, reliable cross-platform C++ exception handling.
comment 2y ago · link · parent
The thing with the AI content boom is that if there’s 1000x more of it than there is genuine indie stations, it gets harder to find the real content. Piping things through a top25 filter doesn’t fix that, or actively makes it worse due to the incentives to monopolize / plan the system.