by Davidbrcz on 8/13/24, 12:41 PM with 42 comments
by unwind on 8/13/24, 2:49 PM
- Binary message formatting for efficiency and data integrity (float to/from string is messy)
- Familiar printf()-style format strings that the compiler can check[*] gives type safety!
- No preprocessing and/or code generation from message templates or anything like that.
Really nice!
Edits: markdown and grammar.
[*]: This uses an extension I think to mark the argument as a format string
by chrchr on 8/13/24, 5:48 PM
by fisian on 8/13/24, 2:53 PM
by immibis on 8/13/24, 4:36 PM
by nurettin on 8/13/24, 6:10 PM
They don't force you to share the format strings at connection time. In fact, it is just a thin layer around sockets and you just override the message handler. I like it! Might be improved further with something like libfmt which is also used by spdlog.
by jbverschoor on 8/13/24, 3:32 PM
by tonyg on 8/13/24, 3:49 PM
by inetknght on 8/13/24, 6:05 PM
This library takes the idea of modern type safety and throws it away. Instead, the library leans in on `printf()` instead, which is known to be unsafe. And it does it in a memory-unsafe language.
...on a drone. Where safety needs to be important (even a small drone can do significant damage).
It's neat and all. But that's a killer anti-feature in my opinion. I wouldn't use it on my drones.
by khimaros on 8/13/24, 9:43 PM
by touringmachine on 8/13/24, 8:26 PM
by lukevp on 8/13/24, 2:29 PM
by lanstin on 8/13/24, 5:06 PM
And code gen and protocol descriptions bring a certain useful discipline to modifying existing protocols.
But it has that funky C style so I bet people using C like it.