A 'decide' primitive: natural-language switch statements via on-device browser LLMs
cocktailpeanut · x · 2026-09-21
cocktailpeanut proposes a disruptive idea: a "Nano Jev" built directly into the browser as a JS method, which naturally implies open weights by default.
Chrome already supports on-device LLMs via Gemini Nano and the LanguageModel API, but this goes further. LLMs produce unknown-length sequential output requiring streaming; a small predetermined output space can run in parallel, making latency deterministic — so the whole inference fits in a single clause. He introduces a new primitive "decide": looks like switch, but the closure is async and can call async methods, letting you use natural language queries instead of switch without any third-party API.
Related event: Developer Proposes 'decide' Primitive for Browser-side AI(2 posts)→
More from coding & agent
- Agent Substrate Runtime Can Suspend and Resume Per Tool Call — jonathangrahl · 2026-09-21
- Turn any local LLM into a confidence-scored classifier via logprobs, full llama.cpp recipe included — DivideHorror3217 · 2026-09-21
- Ruff author charliermarsh: he only started using agents meaningfully in December 2025 — charliermarsh · 2026-09-21
- Open-source LLaMA-Factory fine-tunes 100+ LLMs; 200 examples can beat frontier models — Roger_M_Taylor · 2026-09-21
- SWE-2 free across Devin Cloud Agents, CLI and Desktop until October 8 — silasalberti · 2026-09-21
- Delta and OpenTable block AI agents, hinting at a coming platform stand-off — Scobleizer · 2026-09-21