That’s a feature of jj’s integration with Piper, and is not relevant outside of Google, as neither Piper nor that jj integration is available to anyone else.
Anything can be aliased by char, unsigned char, std::byte (as well as signed char in C), and usually uint8_t == unsigned char, thus by extension any valid void pointer can be cast to u8*.
Thus void*+size is usually the right type if ones only care for the memory representation of an object (cstring functions like memcpy, etc.)
With (2) being a wrapper to (1) that compilers will almost always inline, avoiding monomorphization costs (and (2) can also accept rvalues as argument).
(1) could also take std::span<const u8>, but (void*, size) is the more common idiom, more convenient to use and to read , as it is unambiguous which overload it is.
The pattern I notice more frequently at work now is:
"I'm working on X problem, I tried Y solution, AI thinks Z is wrong and W could be better, human opinion?"
This way there's never space for ambiguity, you showed you did your homework to the best of your extent, you already asked AI, all that's left is explicit request for human input.
It works quite well, and I appreciate it from both ends, as it saves everyone time.
I do this all the time in Emacs, which runs on an old computer and handles it quickly. None of the tasks on this list require significant CPU resources.
I actually think these constraints _help_ the average project as well. By enforcing remote builds and execution you completely remove the need for something like docker. You also get cloud backups for your code automatically.
reply