You can say it shouldn’t matter. But it really does. It’s nice to have Unix process management, it’s great to be able to lash things together with stringly types blobs, but eventually, we always move from pidgin to creole (to borrow phrasing from actual linguistics).
-
Show this thread
-
Replying to @dakami
So how are process exit codes different from shared library return codes different, exactly? What makes it more likely that a stupid user will not check the former but will check the latter? Your argument is valid, but *this bug* is not a good example against processes and pipes
2 replies 0 retweets 1 like -
Replying to @marcan42
No, that’s what you’re not getting. It really is the fragility of the interface that gets you the “It returns content by default, hope you’re smart enough to check the error code, what do you mean nothing did” surprise not surprised dynamic
2 replies 0 retweets 2 likes -
Arguably nobody wanted to add a —just-give-me-what-you-got command line (or —insecure).
1 reply 0 retweets 0 likes -
Replying to @dakami
This is a backwards compatibility argument. gpg was designed with streamability in mind. Sure, you could add an --unbuffered argument, but then you'd break many existing use cases. We both know "secure by default" choices are hard when your public interface is frozen.
2 replies 0 retweets 0 likes -
Replying to @marcan42
They are. You tend to get to reset expectations with a major rev, which we do everywhere else every so often. libssh2 didn’t always exist.
1 reply 0 retweets 2 likes -
Replying to @dakami
This is harder with commandline apps (especially ones as dedicated to backwards compat as gpg) because people don't tend to introduce "gpg2" style "new interface here" breaks. It's a bigger change than library sonames (where you can at least install both at once).
2 replies 0 retweets 0 likes -
But yes, would it be nice for gpg to have a different, more modern interface? Sure. I just don't think blaming this bug on that is fair or reasonable. Something to work towards perhaps, but not a Big Glaring Problem.
3 replies 0 retweets 1 like -
The GnuPG APIs leave much to be desired. This is one of the many traps that developers need to watch out for. It all has Reasons, but today we have a better understanding of secure API design. I'm cautiously optimistic about both
@neopg_ &@nwalfield 'shttps://sequoia-pgp.org/2 replies 0 retweets 1 like -
Sure, I agree. I just don't think *this* is the bug we should be pointing at to make that point. You didn't check retcodes, you dun goofed. Even a Rust API with streaming support won't save you from that one.
2 replies 0 retweets 1 like
Of course in Rust you'd probably have a non-streaming wrapper that fully buffers and returns a Result and *then* you'd be totally safe (but if someone decides they need streaming and screw up, then yeah, they still get bit).
-
-
You could try to make the streaming API safer by having a streaming callback take an Option or a Result or something to kind of force errors out through the main path, but I can still see someone borking usage of that. Even Rust won't save you from poor error hygiene.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.