frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Iterflow – Composable streaming statistics for JavaScript/TS

https://www.npmjs.com/package/@mathscapes/iterflow
1•gvsh_maths•1h ago

Comments

gvsh_maths•1h ago
Iterflow is a zero-dependency TypeScript library that adds streaming statistical operations (rolling variance, EWMA, Pearson correlation, z-score anomaly detection) as chainable stages in lazy iterator pipelines.

ES2025 Iterator Helpers give you lazy `map`, `filter`, `take` natively, but no statistics. @stdlib/stats/incr gives you streaming accumulators but they're standalone objects, not pipeline stages. If you want `filter -> window -> variance -> take` you're writing the loop yourself. Iterflow fills that gap:

```typescript import { iter } from '@mathscapes/iterflow';

const anomalies = iter(requestLatencies) .streamingZScore() .enumerate() .filter(([_, z]) => Math.abs(z) > 3) .map(([i, z]) => ({ index: i, zScore: z })) .take(10) .toArray(); ```

O(1) memory, stops after 10 anomalies, z-score is computed from prior observations only (current value doesn't skew its own score).

Algorithms in there: Welford's variance, EWMA with configurable decay, streaming Pearson correlation (6 scalars of state), monotonic deque windowed min/max, circular buffer windowing, quickselect median. All implemented directly -- zero runtime deps.

Some benchmark numbers (synthetic, Node.js v22, ARM64):

- filter-map-take(1000) on 1M elements: ~296x over `.filter().map().slice()` - Streaming correlation vs recompute-each-step: ~780x at N=10k - Standalone single-stat with no pipeline: 3-5x slower than a hand-rolled loop (generator tax)

I wrote a paper on the algorithms and benchmarks too: https://doi.org/10.5281/zenodo.18610143

GitHub: https://github.com/mathscapes/iterflow npm: `npm install @mathscapes/iterflow`

Curious if anyone has use cases I haven't considered, or thoughts on the API. MIT licensed.

Dystopia: W3C (West World WebKit Corporation) in 2024

https://svgees.us/blog/dystopia.html
1•lioeters•58s ago•0 comments

Back to FreeBSD: Part 1

https://hypha.pub/back-to-freebsd-part-1
1•enz•4m ago•0 comments

Node.js in the Browser

https://github.com/userland-run/nano
1•dietz•5m ago•1 comments

What's the best way to learn a new language?

https://www.bbc.com/future/article/20260220-whats-the-best-way-to-learn-a-new-language
2•1659447091•6m ago•0 comments

Show HN: ScreenCommander – Let LLM Agents control your desktop via CLI

https://github.com/0xSMW/screencommander
1•aethelyon•11m ago•1 comments

Debian's Master Is Deleting Criticism of SystemD and Other Things

https://techrights.org/n/2026/02/21/Debian_s_Master_is_Deleting_Criticism_of_SystemD_and_Other_Th...
1•amcclure•13m ago•0 comments

Show HN: This week I learned 100 English word with alarm clock

https://vocabalarm.com/
1•tien198722•16m ago•0 comments

Show HN: Atlassian-CLI, unified CLI tool for Jira, Confluence, Bitbucket and JSM

https://github.com/omar16100/atlassian-cli
1•omar16100•18m ago•0 comments

Louis de Broglie – Nobel Lecture [pdf]

https://www.nobelprize.org/uploads/2016/04/broglie-lecture.pdf
1•ColinWright•18m ago•0 comments

Show HN: Clawdrop – how do you use OpenClaw?

https://clawdrop.org/
1•dhruvkar•20m ago•0 comments

Show HN: Secret Sanitizer – auto-masks secrets when you paste into AI chats

https://github.com/souvikghosh957/secret-sanitizer-extension
1•souvikghosh957•20m ago•0 comments

30 Years of Decompilation and the Unsolved Structuring Problem: Part 1 (2024)

https://mahaloz.re/dec-history-pt1
1•userbinator•22m ago•0 comments

Reliving Late Nights Watching MTV with ErsatzTV

https://rafichaudhury.com/site/blog/ersatztv
1•rchaud•29m ago•0 comments

The Pleasures and Pains of Coffee (1830)

https://quod.lib.umich.edu/m/mqrarchive/act2080.0035.002/10
1•jxmorris12•30m ago•0 comments

Disagree and commit is not disagree and complain

https://dougrathbone.com/blog/2026/02/22/disagree-and-commit-is-not-disagree-and-complain
1•wiredone•31m ago•0 comments

Show HN: Microterm runs Linux VM in any browser tab via WASM, RISCV64 emulation

https://microterm.dev/
1•Xlab•33m ago•0 comments

Show HN: Kickstart – Set up a Claude Code project in 3seconds from clipboard

https://github.com/m4suisui/kickstart
1•m4sui•36m ago•0 comments

Why SaaS companies are scared Takes ODE 15 mins to do what takes them 6 months

https://www.llewellynsystems.com
1•LLSODE•37m ago•0 comments

Claude Opus 4.6 Fast Mode: 2.5x Faster, 6x More Expensive

https://www.marc0.dev/en/blog/claude-opus-4-6-fast-mode-pricing-6x-cost-breakdown-1770499078106
1•mefengl•44m ago•0 comments

Built an open-source tool that lets you deploy containers to your VPS via MCP

https://github.com/ddalcu/mcp-deploy
1•ddalcu•45m ago•1 comments

CDC: Why Decompression Is Worth the Complexity

https://wael.nasreddine.com/nixos/cdc-why-decompression-worth-co
2•kalbasit•51m ago•1 comments

Show HN: Brood, a reference-first AI image editor for macOS

https://github.com/kevinshowkat/brood
1•latentcraft•52m ago•1 comments

Amazon's cloud unit hit by outage involving AI tools in December

https://www.reuters.com/business/retail-consumer/amazons-cloud-unit-hit-by-least-two-outages-invo...
1•1vuio0pswjnm7•55m ago•0 comments

Show HN: Clawscan – Open-source security scanner for OpenClaw AI agents

https://github.com/osmankidwai-bot/clawscan
1•clawscan•56m ago•0 comments

A chat-style site for Hacker News trends

https://github.com/1997roylee/yc-chat
1•1997roylee•1h ago•1 comments

Forgelink Is Here

1•frostfrazer•1h ago•0 comments

Show HN: HashTrade – Open-source LLM trading agent with episodic memory

https://github.com/mertozbas/hashtrade
1•mertozbas•1h ago•1 comments

I just started a Substack where I talk about building Midrop

https://klaudjo.substack.com/subscribe
1•Klaudjo_shkurta•1h ago•0 comments

Show HN: Threatmodeling Tool to outgrow spreadsheets, word and MS-TMT

https://www.threatmodeling-tool.com/blog
1•Rana_KV•1h ago•0 comments

Amazfit T-Rex Ultra 2 review:flagship battery life at fraction of Garmin's price

https://www.t3.com/active/fitness-trackers/amazfit-t-rex-ultra-2-review
1•teleforce•1h ago•0 comments