Four short links: 23 October 2019
Safe Interfaces, WebAssembly Numbers, Userland Dataflow, and Serverless Data Processing in Go
- How Not to Rewrite it in Rust — A much better alternative is to reuse the original library and just publish a safe interface to it. As this comment on Lobsters says, Rust can add safety guarantees even to C code! When using a C library, you may need to know things such as “if I pass a pointer to the library, who will free it and when?”, “can this be NULL?”, “is this thread-safe?”, “can I call this function more than once?”. In C, these things are in the manual, but Rust can express them in the type system. When writing Rust wrappers, I literally copy prose from the documentation into Rust type system and have the compiler enforce RTFM!
- A Study on the Prevalence of WebAssembly in the Wild — we examine the prevalence of WebAssembly in the Alexa top one million websites and find that as many as one out of 600 sites execute Wasm code. Moreover, we perform several secondary analyses, including an evaluation of code characteristics and the assessment of a Wasm module’s field of application. Based on this, we find that over 50% of all sites using WebAssembly apply it for malicious deeds, such as mining and obfuscation.
- Userland — an integrated dataflow environment for user applications. Very cool idea! Very early and docs not everywhere, but see this video for demos and explanation of philosophy. (via Twitter)
- Bigslice — a system for fast, large-scale, serverless data processing using Go.