惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
小众软件
小众软件
The Cloudflare Blog
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
博客园 - 叶小钗
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
Y
Y Combinator Blog
D
Docker
Microsoft Azure Blog
Microsoft Azure Blog

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
noise~lang — a probabilistic programming language
Manu Martínez-Almeida · 2026-06-27 · via Show HN
Figure 1. the noise field this language is named for — a fractal-noise surface drawn as ink contours. Move your cursor to disturb it.

Keep scrolling

The best way to learn a language is to watch it unfold in front of you — so keep scrolling. Six small programs, each one idea past the last, animate as you read them, then run for real on the compiled engine in your browser. It has a touch of magic to it: every variable here is a whole wave of possibility, and a query is what collapses it to a single number.

Examples

A catalogue of short programs, each a Monte-Carlo experiment with a known closed form, so the printed answer can be checked. Open any one in the playground to run and edit it — the real Noise compiler, built to WebAssembly and running in your browser. Each program gets its own shareable link.

Basics

Probability

Games & risk

Continuous & CLT

Signals & DSP

Functions & research

How it works

Noise is small by design. Everything above is built from a handful of ideas.

Everything is a distribution

A number is just a distribution with all its weight on a single point — a Dirac delta. Operators lift over random variables automatically — so X below is random, and Y is random too, with no special syntax. Propagating uncertainty reads exactly like ordinary arithmetic.

X ~ unif(-1, 1)
Y = 2 * X + 3   # Y is a distribution too

The tilde draws; equals transforms

A name bound with ~ is one fixed random draw that every mention reuses — so X − X is exactly 0, never "two samples." Independence comes from separate ~ bindings, exactly like writing X₁, X₂ on paper. No hidden re-draws, no surprises.

A ~ unif_int(1, 6)
B ~ unif_int(1, 6)   # two independent dice
A + B                # a genuine 2d6 distribution

Queries: P, E, Var, Q

Nothing is sampled until you ask. A query runs a fast columnar Monte-Carlo pass and reports an honest estimate — the printed digits reflect the standard error, and that error propagates through arithmetic, so 4·P(C) rounds itself correctly.

C = X**2 + Y**2 < 1
4 * P(C)   # ≈ 3.14

Independence is a shape

Put a shape on the tilde to draw a whole batch at once: ~[n] is an iid vector, ~[n, m] a matrix. A reducer collapses it back to one number — so the birthday paradox over 23 people, all 253 pairwise comparisons, is a single expression.

days ~[23] unif_int(1, 365)
P(has_duplicates(days))   # ≈ 0.51

if is a value, not a branch

When the condition is random, if c { a } else { b } does not take a path — it builds a new random variable, choosing a or b per sample. That single rule hands you max, min, abs, clamps and payoffs over distributions for free.

higher = if A > B { A } else { B }   # the larger of two dice

Performance

Almost every Noise program ends in “evaluate this expression over a few million random draws.” That loop is compiled, not interpreted. ~ and the distribution constructors build a graph IR that lowers three ways — a portable columnar interpreter, a native JIT via Cranelift, and a WebAssembly emitter for the browser — all sharing one cost model, so the backend only ever changes speed, never results (bit-identical across core counts).

You write a one-line P(...) and get an expert kernel for free. It is built from a stack of techniques, each with its own measured win:

  • Kernel fusion — the codegen backends emit one loop that draws its sources, computes the whole expression in registers, and stores only the result, erasing the interpreter's intermediate memory traffic.
  • Graph simplification — constant folding, finite-safe algebraic identities, and common-subexpression elimination shrink the DAG before any code is generated (so X + X is one draw, not two).
  • Inlined xoshiro256++ PRNG — the generator is emitted straight into the kernel as a handful of shifts/xors/rotates, with zero call overhead on native and in WASM alike.
  • Inlined transcendentalsln/sin/cos (the heart of normal, exp, and signals) become straight-line polynomial approximations (~1e-9 vs libm), roughly doubling transcendental-bound kernels and skipping a per-draw crossing of the JS boundary in the browser.
  • Multi-stream RNG — four independent xoshiro streams run at once to hide the generator's serial-dependency latency (the scalar form of SIMD), switched on only where the graph is latency-bound.
  • Columnar batches — the interpreter runs 1024 lanes through one instruction at a time: a tight, cache-friendly, auto-vectorizing pass over contiguous f64s.
  • Vectorized power-sum reduction — moments accumulate as raw power sums across eight unrolled lanes with no per-element divide: ~9.5× faster than a streaming Welford update, turning the reduction from the ceiling into a rounding error.
  • Deterministic multicore — sampling fans out with a work-stealing loop whose per-chunk accumulators merge as an exactly-associative monoid, so the answer is bit-identical regardless of thread count, and reproducible from a seed.
  • Profitability gate — a cost model emits a fused kernel only where it beats the vectorized interpreter, so codegen can change the speed but never lose.

The payoff, measured on a 14-core M4 Pro:

  • ~5.8 billion samples/sec (π Monte Carlo, generate + reduce, all cores), scaling ~9.6× from one core to all of them.
  • Within ~1.15× of hand-written, LLVM-compiled Rust per core — and faster end to end, because the one-liner fuses and fans out across every core with no flags or annotations.
  • In the browser the emitted WASM kernel runs the same fused loop at ~0.5–0.75× of native codegen — hundreds of millions of samples/sec, client-side.

The full write-up, with the benchmark tables behind each number, is in PERF.md.

About the creator

Manu Mtz.-Almeida. Creator of Gin, core contributor to Ionic, Stencil and Qwik. Principal engineer at Builder.io, working on compilers, high-performance systems, and AI agents.

I started Noise nine years ago and never quite finished it. The idea grew out of my telecommunications degree — a world of signals, noise, and probability — where I kept wishing for a language that could express uncertainty as naturally as it expresses arithmetic. This is that wish, picked up again all these years later.

github.com/manucorporat · x.com/manucorporat · linkedin