mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
cc1920749e
Your redbean can now interoperate with clients that require TLS crypto. This is accomplished using a protocol polyglot that lets us distinguish between HTTP and HTTPS regardless of the port number. Certificates will be generated automatically, if none are supplied by the user. Footprint increases by only a few hundred kb so redbean in MODY=tiny is now 1.0mb - Add lseek() polyfills for ZIP executable - Automatically polyfill /tmp/FOO paths on NT - Fix readdir() / ftw() / nftw() bugs on Windows - Introduce -B flag for slower SSL that's stronger - Remove mbedtls features Cosmopolitan doesn't need - Have base64 decoder support the uri-safe alternative - Remove Truncated HMAC because it's forbidden by the IETF - Add all the mbedtls test suites and make them go 3x faster - Support opendir() / readdir() / closedir() on ZIP executable - Use Everest for ECDHE-ECDSA because it's so good it's so good - Add tinier implementation of sha1 since it's not worth the rom - Add chi-square monte-carlo mean correlation tests for getrandom() - Source entropy on Windows from the proper interface everyone uses We're continuing to outperform NGINX and other servers on raw message throughput. Using SSL means that instead of 1,000,000 qps you can get around 300,000 qps. However redbean isn't as fast as NGINX yet at SSL handshakes, since redbean can do 2,627 per second and NGINX does 4.3k Right now, the SSL UX story works best if you give your redbean a key signing key since that can be easily generated by openssl using a one liner then redbean will do all the things that are impossibly hard to do like signing ecdsa and rsa certificates that'll work in chrome. We should integrate the let's encrypt acme protocol in the future. Live Demo: https://redbean.justine.lol/ Root Cert: https://redbean.justine.lol/redbean1.crt
101 lines
4.3 KiB
SQL
101 lines
4.3 KiB
SQL
M(2, g, "+", Add, x + y, "add")
|
||
M(2, g, "-", Sub, x - y, "sub")
|
||
M(2, g, "*", Mul, x *y, "multiply")
|
||
M(2, f, "/", Div, x / y, "division")
|
||
M(2, i, "%", Rem, x % y, "integer remainder")
|
||
M(2, i, "//", Idiv, x / y, "integer division")
|
||
M(2, g, "**", Expo, powl(x, y), "exponentiation")
|
||
|
||
M(1, i, "~", Not, ~x, "bitwise not")
|
||
M(2, i, "^", Xor, x ^ y, "bitwise xor")
|
||
M(2, i, "|", Or, x | y, "bitwise or")
|
||
M(2, i, "&", And, x &y, "bitwise and")
|
||
M(2, i, ">>", Shr, x >> y, "shift right")
|
||
M(2, i, "<<", Shl, x << y, "shift left")
|
||
|
||
M(1, i, "!", LogicalNot, !x, "logical not")
|
||
M(2, i, "||", LogicalOr, x || y, "logical or")
|
||
M(2, i, "&&", LogicalAnd, x &&y, "logical and")
|
||
|
||
M(2, g, "=", Equal1, x == y, "equal to")
|
||
M(2, g, "!=", Notequal, x != y, "not equal to")
|
||
M(2, g, "<", LessThan, x < y, "less than")
|
||
M(2, g, ">", GreaterThan, x > y, "greater than")
|
||
M(2, g, "<=", LessThanEqual, x <= y, "less than or equal to")
|
||
M(2, g, ">=", GreaterThanEqual, x >= y, "greater than or equal to")
|
||
|
||
M(1, i, "gray", Gray, gray(x), "gray coding")
|
||
M(1, i, "ungray", Ungray, ungray(x), "inverse gray coding")
|
||
M(1, i, "popcnt", Popcnt, Popcnt(x), "count bits")
|
||
|
||
M(1, g, "abs", Abs, fabsl(x), "absolute value")
|
||
M(2, g, "min", Min, fminl(x, y), "pops two values and pushes minimum")
|
||
M(2, g, "max", Max, fmaxl(x, y), "pops two values and pushes maximum")
|
||
|
||
M(2, g, "fmod", Fmod, fmodl(x, y), "trunc remainder")
|
||
M(2, g, "emod", Emod, emodl(x, y), "euclidean remainder")
|
||
M(2, g, "remainder", Remainder, remainderl(x, y), "rint remainder")
|
||
M(2, g, "hypot", Hypot, hypotl(x, y), "euclidean distance")
|
||
|
||
M(0, i, "false", False, 0, "0")
|
||
M(0, i, "true", True, 1, "1")
|
||
M(0, i, "intmin", IntMin, INT128_MIN, "native integer minimum")
|
||
M(0, i, "intmax", IntMax, INT128_MAX, "native integer maximum")
|
||
M(0, f, "e", Euler, M_E, "𝑒")
|
||
M(0, f, "pi", Fldpi, M_PI, "π")
|
||
M(0, f, "epsilon", Epsilon, EPSILON, "ɛ")
|
||
M(0, f, "inf", Inf, INFINITY, "∞")
|
||
M(0, f, "nan", Nan, NAN, "NAN")
|
||
M(0, f, "-0", Negzero, -0., "wut")
|
||
M(0, f, "l2t", Fldl2t, M_LOG2_10, "log₂10")
|
||
M(0, f, "lg2", Fldlg2, M_LOG10_2, "log₁₀2")
|
||
M(0, f, "ln2", Fldln2, M_LN2, "logₑ2")
|
||
M(0, f, "l2e", Fldl2e, M_LOG2E, "logₑ10")
|
||
M(2, f, "nextafter", Nextafter, nextafterl(x, y), "next ulp")
|
||
M(1, f, "significand", Significand, significandl(x), "mantissa")
|
||
|
||
M(1, f, "sqrt", Sqrt, sqrtl(x), "√𝑥")
|
||
M(1, f, "exp", Exp, expl(x), "𝑒ˣ")
|
||
M(1, g, "expm1", Expm1, expm1l(x), "𝑒ˣ-1")
|
||
M(1, g, "exp2", Exp2, exp2l(x), "2ˣ")
|
||
M(1, g, "exp10", Exp10, exp10l(x), "10ˣ")
|
||
M(2, g, "ldexp", Ldexp, ldexpl(x, y), "𝑥×2ʸ")
|
||
M(2, g, "scalb", Scalb, scalbl(x, y), "𝑥×2ʸ")
|
||
|
||
M(1, f, "log", Log, logl(x), "logₑ𝑥")
|
||
M(1, g, "log2", Log2, log2l(x), "log₂𝑥")
|
||
M(1, g, "log10", Log10, log10l(x), "log₁₀𝑥")
|
||
M(1, g, "ilogb", Ilogb, ilogbl(x), "exponent")
|
||
|
||
M(1, g, "sin", Sin, sinl(x), "sine")
|
||
M(1, g, "cos", Cos, cosl(x), "cosine")
|
||
M(1, g, "tan", Tan, tanl(x), "tangent")
|
||
M(1, g, "asin", Asin, asinl(x), "arcsine")
|
||
M(1, g, "acos", Acos, acosl(x), "arccosine")
|
||
M(1, g, "atan", Atan, atanl(x), "arctangent")
|
||
M(2, g, "atan2", Atan2, atan2l(x, y), "arctangent of 𝑥/𝑦")
|
||
|
||
M(1, g, "sinh", Sinh, sinhl(x), "hyperbolic sine")
|
||
M(1, g, "cosh", Cosh, coshl(x), "hyperbolic cosine")
|
||
M(1, g, "tanh", Tanh, tanhl(x), "hyperbolic tangent")
|
||
M(1, g, "asinh", Asinh, asinhl(x), "hyperbolic arcsine")
|
||
M(1, g, "acosh", Acosh, acoshl(x), "hyperbolic arccosine")
|
||
M(1, g, "atanh", Atanh, atanhl(x), "hyperbolic arctangent")
|
||
|
||
M(1, g, "round", Round, roundl(x), "round away from zero")
|
||
M(1, g, "trunc", Trunc, truncl(x), "round towards zero")
|
||
M(1, g, "rint", Rint, rintl(x), "round to even")
|
||
M(1, g, "nearbyint", Nearbyint, nearbyintl(x), "round to nearest integer")
|
||
M(1, g, "ceil", Ceil, ceill(x), "smallest integral not less than 𝑥")
|
||
M(1, g, "floor", Floor, floorl(x), "largest integral not greater than 𝑥")
|
||
|
||
M(1, f, "isnan", Isnan, isnan(x), "returns true if 𝑥=NAN")
|
||
M(1, f, "isinf", Isinf, isinf(x), "returns true if 𝑥=INFINITY")
|
||
M(1, f, "signbit", Signbit, signbit(x), "clears all bits but sign bit")
|
||
M(1, f, "isfinite", Isfinite, isfinite(x), "returns true if 𝑥≠INFINITY")
|
||
M(1, f, "isnormal", Isnormal, isnormal(x), "returns true if not denormal")
|
||
M(1, f, "fpclassify", Fpclassify, fpclassify(x),
|
||
"nan=0,inf=1,zero=2,subnorm=3,normal=4")
|
||
|
||
M(0, i, "rand", Rand, rand(), "deterministic random number")
|
||
M(0, i, "rand64", Rand64, rand64(), "64-bit random number")
|