Get the latest tech news
Cramming Scrapscript into Msgpack
Every scrapscript program can be crammed into "flat" scraps.
As a JSON replacement, it saves bandwidth while preserving native language features (e.g. tuples, records, objects, dates). cheaper to store programs on disk (or KV store) and load into memory it's a simple/convenient cross-platform compilation target with types, encoders/decoders can be magically inferred/generated/typechecked at compile-time msgpack is supported by 50+ languages/environments; all msgpack messages are already scraps, and scrap-specific extensions can be incrementally implemented in each host language num 002b+ addnum 002d- subtractnum 002a* multiplynum 002f/ dividenum 005e^ pownum 0025% modulonum 2525%% remaindercomp 003c< ltcomp 003e> gtcomp 3c3d<= ltecomp 3e3d>= gtemany 2b2b++ concatmany 3e2b>+ prependmany 2b3c+< appendbitty 2626&& andbitty 7c7cāā orbitty 5e5e^^ xornofun 3d3d== equalnofun 2f3d/= not equalfun 3c7c<ā pipe leftfun 7c3eā> pipe rightfun 3c3c<< compose leftfun 3e3e>> compose rightFancier operators are also available:
Or read this on Hacker News