From Closures to an AST in a Kotlin Transform Graph
The article discusses the transition from using Kotlin lambdas to an Abstract Syntax Tree (AST) in the kumulant streaming statistics library. This change aims to facilitate the serialization of transforms and filters for cloud deployment, allowing users to define their configurations in YAML. While the new approach introduces some complexity, it ultimately enhances flexibility and usability for users who need to customize their statistical computations.
- ▪Kumulant is a streaming statistics library that processes numbers and maintains an accumulator.
- ▪The initial implementation relied on Kotlin lambdas, which posed serialization challenges for cloud deployment.
- ▪The redesign replaces closures with a sealed AST, allowing for more complex expressions and easier YAML configuration.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3900227) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Rasmus Ros Posted on May 18 • Originally published at eignex.com From Closures to an AST in a Kotlin Transform Graph #architecture #computerscience #kotlin #opensource kumulant is a streaming statistics library: you feed it numbers, it maintains an accumulator like a mean or a quantile sketch, and you read snapshots back.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).