I hereby claim:
- I am dhh1128 on github.
- I am danielhardman (https://keybase.io/danielhardman) on keybase.
- I have a public key ASC5mGC4Dkg3IL-cTVqannhJNbbJnaWCAEu4CZfnXcgiVAo
To claim this, I am signing this object:
{ | |
"header": { | |
"alg": "EdDSA", | |
"typ": "passport", | |
"ppt": "vvp", | |
// OOBI of AID for (signing software invoked by SBC of) OP | |
"kid": "https://wit1.provenant.net:5631/oobi/E0F9C28367E4011E7BA587831C1B8DEBA/witness", | |
} | |
"payload": { | |
// originating TN in E164 format; see https://www.rfc-editor.org/rfc/rfc8225#section-5.2.1 |
I hereby claim:
To claim this, I am signing this object:
#define eprintf(fmt, ...) \ | |
fprintf(stderr, fmt, ##__VA_ARGS__) |
// Accept any number of args >= N, but expand to just the Nth one. | |
// Here, N == 6. | |
#define _GET_NTH_ARG(_1, _2, _3, _4, _5, N, ...) N | |
// Define some macros to help us create overrides based on the | |
// arity of a for-each-style macro. | |
#define _fe_0(_call, ...) | |
#define _fe_1(_call, x) _call(x) | |
#define _fe_2(_call, x, ...) _call(x) _fe_1(_call, __VA_ARGS__) | |
#define _fe_3(_call, x, ...) _call(x) _fe_2(_call, __VA_ARGS__) |
// Define two overrides that can be used by the expansion of | |
// our main macro. | |
#define _MY_CONCAT3(a, b, c) a b c | |
#define _MY_CONCAT2(a, b) a b | |
// Define a macro that uses the "paired, sliding arg list" | |
// technique to select the appropriate override. You should | |
// recognize this as similar to the GET_NTH_ARG() macro in | |
// previous examples. | |
#define _GET_OVERRIDE(_1, _2, _3, NAME, ...) NAME |
// Accept any number of args >= N, but expand to just the Nth one. The macro | |
// that calls us still only supports 4 args, but the set of values we might | |
// need to return is 1 larger, so we increase N to 6. | |
#define _GET_NTH_ARG(_1, _2, _3, _4, _5, N, ...) N | |
// Count how many args are in a variadic macro. We now use GCC/Clang's extension to | |
// handle the case where ... expands to nothing. We must add a placeholder arg before | |
// ##__VA_ARGS__ (its value is totally irrelevant, but it's necessary to preserve | |
// the shifting offset we want). In addition, we must add 0 as a valid value to be in | |
// the N position. |
// Accept any number of args >= N, but expand to just the Nth one. In this case, | |
// we have settled on 5 as N. We could pick a different number by adjusting | |
// the count of throwaway args before N. Note that this macro is preceded by | |
// an underscore--it's an implementation detail, not something we expect people | |
// to call directly. | |
#define _GET_NTH_ARG(_1, _2, _3, _4, N, ...) N | |
// Count how many args are in a variadic macro. Only works for up to N-1 args. | |
#define COUNT_VARARGS(...) _GET_NTH_ARG(__VA_ARGS__, 4, 3, 2, 1) |
#define eprintf(fmt, ...) \ | |
fprintf(stderr, fmt, ##__VA_ARGS) |
#define eprintf(fmt, ...) \ | |
fprintf(stderr, fmt, __VA_ARGS__) |
void spaceship::take_evasive_action(list<threat> threats_by_proximity) { | |
course escape_vector = nullptr; | |
list<threat> weighted_threats = order_by_evasion_priority( | |
threats_by_proximity, multiply_by_threat_severity); | |
if (this->has_warp()) { | |
bool warp_is_practical = true; | |
double max_safe_warp = 1.0; | |
// do a bunch of calculations about whether warp is |