To make software safe and sharable, scrapscript combines existing wisdom in new ways:
- all expressions are content-addressible “scraps”
- all programs are data
- all programs are “platformed”
Content-Addressible Everything
(see: content addressed storage)
Any chunk of the language can be replaced with a hash. Scraps are stored/cached/named/indexed in global distributed “scrapyards”. This is like an npm
but at the expression level
Expression level-versioning, every expression in the ecosystem can be independently spliced and “time-travelled”.
Magic compression: Instead of sharing large dumps of data, you can send references to any data anywhere. By sending references, other machines can opt to pull the data from cache or high-speed CDNs (see: CID)
First-class Network Requests
Scrapyards enable new compile-time primitives for verifying type-safety across network boundaries. “Contracts” are automatically inferred and enforced between clients, servers, and external APIs. (similar to Racket Contracts)
Publish
Scrapyards store scraps in an IPFS-like system with name and versioning information.