From e43df6cdb4c28c01b3dfb0d288f51e6e15252dca Mon Sep 17 00:00:00 2001 From: oc-code-02 Date: Mon, 23 Nov 2026 20:11:09 -0600 Subject: [PATCH] docs: migrate roc-investigation (dated record + living catalogue) --- ...24T02-09-38Z_research_roc-investigation.md | 16 + .../blog-catalogue-2026-11-23.md | 277 +++++++ .../ecosystem-2026-11-23.md | 243 ++++++ .../platform-design-exploration-2026-11-23.md | 733 ++++++++++++++++++ ...-11-23T22-00-25Z_research_roc-ecosystem.md | 81 ++ .../community-and-zulip-digest.md | 181 +++++ .../libraries-and-packages.md | 83 ++ .../overview-and-state-of-roc.md | 86 ++ .../platforms.md | 70 ++ .../real-projects-and-production-use.md | 106 +++ .../talks-releases-showcases.md | 201 +++++ .../the-new-compiler.md | 151 ++++ .../zulip-digest-2026-11-23.md | 344 ++++++++ doc/README.md | 1 + doc/living/roc/talks-and-announcements.md | 231 ++++++ 15 files changed, 2804 insertions(+) create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/2026-11-24T02-09-38Z_research_roc-investigation.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/blog-catalogue-2026-11-23.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/ecosystem-2026-11-23.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/platform-design-exploration-2026-11-23.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/2026-11-23T22-00-25Z_research_roc-ecosystem.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/community-and-zulip-digest.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/libraries-and-packages.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/overview-and-state-of-roc.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/platforms.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/real-projects-and-production-use.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/talks-releases-showcases.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/the-new-compiler.md create mode 100644 doc/2026-11-24T02-09-38Z_research_roc-investigation/zulip-digest-2026-11-23.md create mode 100644 doc/living/roc/talks-and-announcements.md diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/2026-11-24T02-09-38Z_research_roc-investigation.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/2026-11-24T02-09-38Z_research_roc-investigation.md new file mode 100644 index 000000000..3e845167b --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/2026-11-24T02-09-38Z_research_roc-investigation.md @@ -0,0 +1,16 @@ +# Roc investigation — research corpus + +The research corpus behind the Roc ecosystem investigation, gathered 2026-11-23: the blog catalogue, ecosystem survey, platform-design exploration, Zulip digest, and the repo-bundle research set. The talks/media catalogue lives separately as a living document at `doc/living/roc/talks-and-announcements.md`, maintained by the weekly Roc digest and media sweep. + +## Provenance + +Migrated 2026-11-24 from hatch-personal (`workspace/roc-investigation/`) under the DOCS-MIGRATION programme (#5983, tracking #13877): code-project research material lives in this repo's `doc/` area; the hatch repos keep only hatch-operational material. This is a dated research record — it states what was known when the research was done and is not rewritten later. Source files are copied byte-for-byte, preserving relative paths. + +## Contents + +- `blog-catalogue-2026-11-23.md` +- `ecosystem-2026-11-23.md` +- `platform-design-exploration-2026-11-23.md` +- `zulip-digest-2026-11-23.md` +- `repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/` — 8 files (the bundle front page plus 7 research pages), relative paths preserved +- Living split: `talks-and-announcements.md` is NOT in this record; it lives at `doc/living/roc/talks-and-announcements.md` diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/blog-catalogue-2026-11-23.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/blog-catalogue-2026-11-23.md new file mode 100644 index 000000000..4004b47c3 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/blog-catalogue-2026-11-23.md @@ -0,0 +1,277 @@ +# Roc — Blog & News Catalogue + +**Compiled:** 2026-11-23 · **Lane:** ROC-BLOG · **Companion to:** `ecosystem-2026-11-23.md`, `talks-and-announcements.md`, `zulip-digest-2026-11-23.md` (all same-day; this file flags deltas against them rather than repeating them). + +**The single most important structural fact:** **roc-lang.org has no dated blog.** The site +(inventory verified against its source repo, [roc-lang/www.roc-lang.org](https://github.com/roc-lang/www.roc-lang.org), +`website/content/`) consists of undated, living design pages. Roc's dated "blog" voice lives in +three other places: Richard Feldman's personal blog ([rtfeldman.com](https://rtfeldman.com), 4 posts), +Luke Boswell's personal blog ([lukewilliamboswell.github.io](https://lukewilliamboswell.github.io), 8 posts), +and — for actual announcements — the Roc Zulip and GitHub release pages. **The 0.1.0-RC1 release +(2026-11-21) was announced only on Zulip; no website or blog post about it exists yet** (a community +showcase for the eventual 0.1.0 announcement post was being assembled in #show and tell as of 2026-11-23). + +**Counts:** 12 dated blog posts (4 Feldman + 8 Boswell) · 11 roc-lang.org content pages (incl. an +18-question FAQ) · talks/podcasts consolidated in §5 · third-party posts in §6. + +Kind tags: `release` · `compiler internals` · `language design` · `ecosystem` · `community` · `funding`. + +--- + +## 1. roc-lang.org — the site's own pages (undated living documents) + +Author for all: Richard Feldman / the Roc team, unless noted. These pages are the project's +design manifesto; they are revised in place, so "date" is meaningless — what matters is what +they currently commit to. + +| Page | Link | Summary | Kind | +|---|---|---|---| +| **Fast** | [roc-lang.org/fast](https://www.roc-lang.org/fast) | What "fast" commits to: outperform mainstream GC languages (Go, C#, Java, JS) as the goal; explicitly a *non-goal* to beat C/C++/Zig/Rust, whose memory unsafety gives them a higher ceiling. Platforms choose memory strategies per domain (skip deallocation for scripts, per-request arenas for web servers, meshing compaction for long-lived state). Build goal: normally under 1s, ideally under the ~100 ms perception threshold, via caching. | language design | +| **Functional** | [roc-lang.org/functional](https://www.roc-lang.org/functional) | Roc as a pure functional language with escape hatches that don't break purity: local `var $x` mutation visible at every use site, `for`/`while`/`return`, and the pure/effectful split in the type system (`->` vs `=>`, `!`-suffixed names). Contains the canonical **Opportunistic Mutation** explanation: semantically immutable values, mutated in place when uniquely referenced. Also confirms the old `Task`-based effect design is gone — effectful functions are now called directly. | language design | +| **Friendly** | [roc-lang.org/friendly](https://www.roc-lang.org/friendly) | The friendliness programme: small unambiguous syntax (no inheritance, no monkey patching, static dispatch), a zero-configuration formatter, Elm-style helpful compiler errors, `expect`-based testing built into the language, and the ability to run a program that has compile errors (crashing only if execution reaches them — noted as partially implemented). Future testing plans named: benchmarking, generative/snapshot tests, simulated I/O, "reproduction replays." | language design | +| **FAQ** (18 questions) | [roc-lang.org/faq](https://www.roc-lang.org/faq) | The project's book of settled refusals and rationales — see the question list below. Highlights: **no `Maybe`/`Option`** (use descriptive tag unions and `Try`); **no linear, dependent, refinement, or uniqueness types — "the plan is for Roc to never have" them**; **the compiler will never be self-hosted** (Zig is the permanent implementation language); no JS/JVM/CLR/BEAM targets, ever; **one platform per app, platforms do not compose** (exclusivity is the point); no wildcard imports, *because they would break parallel name resolution*; no function equality; UPL license rationale; name origin (the mythological bird + the `.roc` extension). | language design | +| **BDFN (Governance)** | [roc-lang.org/bdfn](https://roc-lang.org/bdfn) | Feldman is "Benevolent Dictator For Now": he has final say today, and his stated last act as BDFN will be to hand decision-making to a successor system — expected "well after a 1.0 release." The open problem he names: designing governance that keeps feature growth slow without forcing it to zero, since committee-driven languages accrete complexity by default. | community | +| **Community** | [roc-lang.org/community](https://www.roc-lang.org/community) | Zulip is the hub; monthly online meetups (show-and-tell format); no Roc conference has ever been held. Documents the informal idea → proposal → implementation pipeline for design changes — deliberately no RFC process at the project's current size, with BDFN as tiebreaker. | community | +| **Foundation** | [roc-lang.org/foundation](https://roc-lang.org/foundation) | The Roc Programming Language Foundation: 501(c)(3), board = Feldman (President), Folkert de Vries (VP), Anton Van Moere (Secretary). Public documents posted include the 1023-EZ, the **2025 Form 990-N**, and the IRS determination letter — i.e. the transparency filings are current. | funding | +| **Donate** | [roc-lang.org/donate](https://www.roc-lang.org/donate) | The live ask: **$4,000 USD/month** to fund one longtime contributor full-time, via Every.org, Liberapay, and GitHub Sponsors. Unchanged from what the ecosystem report found on the homepage. | funding | +| **Different Names** | [roc-lang.org/different-names](https://www.roc-lang.org/different-names) | A Rosetta table for newcomers: `List.fold` = foldl/reduce/inject, `List.keep_if` = filter/select, `?` = bind/flatMap/`>>=`, etc. Small page, but it documents the new compiler's snake_case builtin naming (`fold_rev`, `keep_if`, `drop_if`). | language design | +| **Tutorial** | [roc-lang.org/tutorial](https://www.roc-lang.org/tutorial) | The language tutorial (reference, not a post). Per the Zulip digest, the mini-tutorial is slated for replacement before 0.1.0 and the full language reference is expected "after 0.1.0." | language design | +| **Install** (6 OS pages) | [roc-lang.org/install](https://www.roc-lang.org/install) | Per-OS install guides (Linux, macOS, Windows, Nix, other). Distribution reality behind them: nightlies + the RC, Homebrew (announced 2026-11-21), signed macOS binaries (2026-11-20) — all Zulip-announced, per the digest. | release | + +**FAQ question index** (for Space builders): name origin · strings/Unicode posture · no wildcard +`exposing` · no Maybe/Option/null · no BigNum/BigDecimal (I128/Dec128 instead) · no higher-kinded +or higher-rank types · no default currying · **advanced types (linear/dependent/refinement/ +uniqueness): never** · platforms don't compose · no high-level compilation targets · **compiler +never self-hosted** · UPL license · no function equality. + +--- + +## 2. rtfeldman.com — Richard Feldman's blog (complete: 4 posts) + +| Date | Title | Summary | Kind | +|---|---|---|---| +| 2024-04-29 | **Functional Semantics in Imperative Clothing** | [rtfeldman.com/imperative-clothing](https://rtfeldman.com/imperative-clothing) — Introduces the `!` suffix (implemented by Luke Boswell): effectful calls that *look* imperative but desugar to `Task.await` chains over pure functions, motivated by porting a Bash build script for the roc-lang.org site itself. Explains effects-as-values: functions return descriptions of I/O; the platform's runtime interprets them, free to choose sync, async, or io_uring strategies. **Historical caveat:** this documents the *old* compiler's Task-based design. The new compiler kept the `!` sigil but replaced the semantics — effectful functions are now direct (`=>` types), with no `Task` in between. | language design | +| 2024-05-28 | **0.1 + 0.2** | [rtfeldman.com](https://rtfeldman.com) — The roadmap post: what Roc's first two numbered releases would contain and the project's versioning philosophy. Written two years before RC1; the 0.1.0 that finally shipped as an RC in Nov 2026 is recognisably the release scoped here. | release | +| 2026-07-15 | **How Our Rust-to-Zig Rewrite is Going** | [rtfeldman.com/rust-to-zig](https://rtfeldman.com/rust-to-zig) — The milestone retrospective: 487 days, ~300K lines of Rust → Zig, feature parity reached. Incremental builds 10.0s/3.4s (Rust) → 0.035s (Zig `-fincremental`); hot code loading; Rocci Bird ported as the parity proof (31 KB wasm, under half the old output); the compiler running in the browser as a 2.5 MB wasm on the homepage. Safety ledger: 2 Zig use-after-frees (in error-message paths) vs 21 Rust-era memory-corruption reports, all miscompilations. Drew a large HN thread (discussion distilled at [hndistilled.com/story/48933149](https://hndistilled.com/story/48933149/)). | compiler internals / release | +| 2026-10-22 | **How close can pure FP get to C?** | [rtfeldman.com/fp-vs-c](https://rtfeldman.com/fp-vs-c) — The roc-deflate result: Åhdén's pure-Roc DEFLATE (which he runs in paid production), tuned by Feldman, benchmarks a median 2.6% (M1) / 8.9% (Ryzen 3900X) behind libdeflate over 144 Silesia runs, byte-identical output. Also the post that said 0.1.0 was "still weeks away" — the last blog word on the release before RC1. Peaked at #8 on HN, #4 on Lobsters, #2 on r/programming (per the Zulip digest). | compiler internals / ecosystem | + +**Cadence read:** 2 posts in 2024, none in 2025, 2 in 2026 — every post is a milestone +retrospective, not a running commentary. Feldman's blog is a *megaphone fired twice a year*. + +--- + +## 3. Luke Boswell's blog — lukewilliamboswell.github.io (complete: 8 posts) + +Boswell is the ecosystem's second author and its platform engine (basic-cli, roc-ray, roc-gui, +the native platforms, roc-parser, the awesome list). His blog is where platform internals get explained. + +| Date | Title | Summary | Kind | +|---|---|---|---| +| 2023-12-15 | **Fullstack Roc + htmx — an early exploration** | First of a three-part series building a fullstack web app with Roc + htmx on the old compiler — the exploratory work that led toward his later platform tooling. | ecosystem | +| 2024-01-25 | **Building a GUI platform — Action-State using Zig and raylib** | The design seed of what became RocRay: an action-state GUI/platform experiment with a Zig host over raylib. | ecosystem / compiler internals | +| 2024-02-27 | **Fullstack Roc + htmx — Events** | Part 2 of the htmx series: event handling in the fullstack setup (~15 min read). | ecosystem | +| 2024-03-14 | **Building a Text Editor — Terminal UI** | A short build log of a terminal text editor in Roc (~2 min read) — early basic-cli-era experimentation. | ecosystem | +| 2024-06-19 | **Fullstack Roc + htmx — Data Table** | Part 3 of the htmx series: data tables (~15 min read). The last post before a ~14-month gap. | ecosystem | +| 2025-08-30 | **Roc Platforms: Supporting multi-entrypoint hosts** | [lukewilliamboswell.github.io/roc-platforms-multi-entrypoint](https://lukewilliamboswell.github.io/roc-platforms-multi-entrypoint/) — **The most technically significant post in this catalogue that the earlier research had not catalogued.** Platform hosts expect multiple entrypoint symbols (`init!`, `update!`, `render!`); the prebuilt interpreter shim exposes only one generic entrypoint (`roc_entrypoint`). Solution: at runtime the CLI generates a tiny LLVM bitcode adapter (via Zig's `std.zig.llvm.Builder`) defining each host symbol and forwarding to the shim with an `entry_idx`. Result: fast interpreted dev loops for multi-entrypoint platforms — GUIs, games, Android — with no host ABI change. This is the mechanism underneath the whole autumn-2026 platform burst. | compiler internals | +| 2026-11-23 | **Roc platform for native Android apps** | [lukewilliamboswell.github.io](https://lukewilliamboswell.github.io) — Launch post for roc-native-android (repo created 2026-11-22): the roc-signals reactive engine ported onto a Zig JNI bridge + Kotlin host, real Android widgets, no WebView, with a companion `android.roc` CLI that scaffolds and builds APKs; emulator-verified only. Two disclosures worth recording verbatim in substance: Boswell says he has no mobile experience and **"delegated much of the implementation to Opus 5.5"**, putting it together "over a few hours on the weekend" — posted four days after a longtime contributor's Zulip "Goodbye" over LLM-generated code (see §7). Also note: the post links roc-signals under **lukewilliamboswell/**, not rtfeldman/ (see §7, delta D1). | ecosystem / release | + +--- + +## 4. Related systems — state and cadence (blog + repo + Zulip evidence) + +The platform layer is where the blog evidence and the release trains meet. (Versions as of +2026-11-23; full detail in `ecosystem-2026-11-23.md` §2–§3.) + +| System | What it is | State & cadence | +|---|---|---| +| **basic-cli** (roc-lang) | The default CLI platform (Rust host): files, Cmd, Http, Tcp, Sqlite, Tty, signals. | Official–active. **0.28.1**, needs nightly-2026-11-13+. 0.26→0.28.1 across Oct–Nov 2026 — roughly fortnightly, tracking nightlies within days. | +| **basic-webserver** (roc-lang) | HTTP server platform (Rust, hyper+tokio): Sqlite, SSE, forms, static files. | Official–active, fastest-moving official platform: **0.17 → 0.22.0 in ~six weeks** (0.22.0 on 2026-11-16), pinning nightly-2026-11-15. | +| **roc-signals** | Feldman's reactive-signals UI engine (web + native GUI); the engine inside roc-native-android and roc-gui-era UI work. | Experimental–active. **0.3.0** released in the digest window ("reactive engine overhauled"); native-GUI starter archives shipped as `gui-0.1.0-rc.1/2/3`. **Repo now under lukewilliamboswell** (see delta D1). | +| **roc-native-android** | Native Android apps in pure Roc — real widgets, no WebView; Kotlin shell, no Gradle; arm64. | Experimental/PoC, **created 2026-11-22**, v0.0.1; launch post 2026-11-23 (§3). Examples: counter, todos, stopwatch, a virtualised 10,000-contact list, HTTP, sensor "ports." | +| **roc-native-macos** | Native macOS apps (Boswell). | Experimental; on the current awesome list; not separately audited. | +| **roc-gui** | Desktop GUI platform on GPUI (Zed's framework). | Experimental but substantial: created 2026-09-14, **25 releases in ~10 weeks**, 0.1.0-rc1 in the digest window; README says not for production. Its dev loop depends on the multi-entrypoint mechanism in Boswell's Aug 2025 post. | +| **RocRay / roc-ray** | 2D games/visual tools over raylib (Zig host); ships a 177-page manual (v0.12.3). | Community–active: **51 releases** lifetime, 0.12.x current; the steadiest release cadence in the ecosystem after the official platforms. | +| **Joy** (Niclas Åhdén) | Full-stack isomorphic web framework/platform (Elm architecture both sides). | Community–active; 0.35.0; 5 releases since Dec 2024 — slow cadence, but the ecosystem's only framework with ~2 years of production use behind it (see §5, Åhdén's talk). | +| **roc-cloudflare-workers** (Karakatiza666) | Roc on Cloudflare Workers: wasm32 reactor + JS shim; typed D1/R2/KV/Queues/Workers AI modules. | Experimental, solo: created 2026-10-26, **10 releases in under a month** (v0.0.10) — the fastest cadence in the ecosystem, and single-author. | +| **Rocco** (Braeden Foster / pixelsprout) | 3D engine platform (Odin host, WebGPU). | The Zulip window's most active project: v0.6.0 (Oct 28) → **v0.10.0 (Nov 4)** → web builds via Roc→wasm + WebGPU (Nov 16). | +| **concave** (Jack Scully) | Convex-style reactive web platform on 0.1.0-RC1 (Cloud Run + serverless Postgres). | Announced 2026-11-23 — brand new; its author hit the missing compiler-API wall within days (digest §4). | +| **roxum** (kaza) | axum-style web platform. | Announced 2026-11-07; RC1-compatible per its author's report. | +| **Exercism Roc track** | The learning on-ramp: 110 exercises. | Fully migrated to the new compiler Aug 2026; **running on 0.1.0-RC1** as of 2026-11-22. The clearest adoption signal that the RC is real. | + +**Cadence summary:** official platforms release every ~2 weeks against dated nightlies; +community platforms range from RocRay's steady train to the Cloudflare platform's +10-releases-in-a-month solo sprint. Everything pins a *nightly*, not a release — until +0.1.0 lands, nightly pins are the ecosystem's versioning system. + +--- + +## 5. Talks & podcasts (consolidated; Δ = new or corrected vs `talks-and-announcements.md`) + +The earlier investigation's talks file is thorough for 2019–2025; it stands. This section is the +watch-first core plus everything newer. **Δ items are additions from this pass.** + +**Watch first** +- **GOTO Unscripted, "Roc & Zig: A Compiler Rewrite Story"** (June 5, 2026) — Feldman + Andrew + Kelley on the rewrite, hot code loading, and incremental compilation. + [youtube.com/watch?v=FbvtbuhCiDU](https://www.youtube.com/watch?v=FbvtbuhCiDU) +- **FUNARCH 2026 keynote, "Functional Mechanical Sympathy"** (Sept 17, 2026, Utrecht) — Feldman + on designing a language around how hardware actually works; a full talk-length companion to the + fp-vs-C post. [conf.researchr.org](https://conf.researchr.org/details/funarch-2026/funarch-2026-papers/2/Functional-Mechanical-Sympathy) +- **Strange Loop 2021, "Outperforming Imperative with Pure Functional Languages"** — the canonical + Roc talk; ~98K views, still the highest-reach Roc video. Covers opportunistic mutation and the + performance thesis. [thestrangeloop.com/2021](https://thestrangeloop.com/2021/outperforming-imperative-with-pure-functional-languages.html) + +**Δ New since / missing from the talks file** +- **Δ "A Preview of Roc 0.1.0"** — Feldman, hallway.video, **2026-08-13**. A recorded preview of + the release, two months before RC1. [hallway.video](https://hallway.video) (listing-level; the + ecosystem report cites it from GitHub, this pass did not re-verify the video page.) +- **Δ "Roc and Joy: Productivity in Production"** — **Niclas Åhdén**, Func Prog Sweden, + **2026-11-10**. The ecosystem's most experienced production user presenting his framework — + notable because it is a *non-Feldman* conference talk by a practitioner, the rarest kind in + this list. + +**The Feldman conference canon** (detail in `talks-and-announcements.md`) +- YOW! 2022, "Unwrapped: Roc's memory-safe tag unions" · GOTO CPH 2022, "An Outsider's Guide to + Roc's Type System" · GOTO Chicago 2023, "Simplicity in Language Design: Live-coding a Roc FFI + example" · GOTO 2023, "Rust & Zig Combined" · Strange Loop 2023, "Revise, Iterate, Repeat" · + YOW! 2023, "Outperforming Imperative with FP (Reprise)" · Craft Conf 2025, "What makes Roc's + compiler fast" · Code BEAM Europe 2025 (Elm→Roc design lessons) · Systems Distributed '25, + "Building Distributed Systems with Roc". + +**Podcasts** — Rust in Production S05E04 (Nov 13, 2025; the best production-use interview) · +The Changelog #645 (the Zig rewrite, practitioner detail) · Developer Voices (June 2025) · +ADSP 157–159 (three-part deep dive) · Elixir Wizards (Jan 2024) · Software Unscripted Ep. 85 · +Software Engineering Radio Ep. 553. + +**Engagement read:** Roc's talks are overwhelmingly Feldman. The two Δ additions are the first +signs of breadth — a release-preview format and a production-user talk — but as of Nov 2026 there +is still no second regular conference voice. + +--- + +## 6. Notable third-party posts about Roc + +| When | Post | Read | +|---|---|---| +| 2022-12 | **JesterXL, "Roc Lang for Advent of Code 2022"** ([dev.to](https://dev.to/jesterxl/roc-lang-for-advent-of-code-2022-2c9b)) | A hands-on experience report from the old-compiler era — historically interesting as a newcomer's-eye view of pre-rewrite Roc. | +| 2025-06 | **"Roc func-prog-lang, vs Elm, Go, Rust, Zig"** ([blog.dragansr.com](https://blog.dragansr.com/2025/06/roc-func-prog-lang-vs-elm-go-rust-zig.html)) | A structured comparison from a polyglot blogger; neutral-to-positive; written entirely from the old compiler's world. | +| n.d. | **Test Double, "Super Performant New ROC Language"** (Q&A with consultant Eric Newbury) ([testdouble.com](https://testdouble.com/insights/super-performant-new-roc-language)) | Practitioner Q&A from a consultancy blog — one of the few non-community-insider evaluations. | +| 2026-03-29 | **"Roc Has a Free Fast Functional Language…"** ([dev.to](https://dev.to/gabrielanhaia/roc-has-a-free-fast-functional-language-but-nobody-knows-it-55k2)) | Shallow overview ("nobody knows it" is the thesis); useful mainly as evidence of Roc's discoverability problem. | +| 2026-07-03 | **AlopexDB, "Getting Started with Roc"** ([asopi.tech](https://asopi.tech/posts/roc-lang-intro/)) | An *evaluation* post (SQL-parser project) — but **stale**: describes Roc as alpha/pre-1.0 with old-compiler characteristics weeks after the parity post landed. The clearest exhibit that third-party coverage has not caught up with the new compiler. Cite with care (the earlier investigation flags its version numbers as unreliable). | +| 2026-10 | **"Roc vs. C: Performance Evaluation"** ([dev.to](https://dev.to/bryce78666/roc-vs-c-performance-evaluation-of-the-deflate-algorithm-2k8a)) | Derivative of Feldman's fp-vs-C post; low independent value. | +| ongoing | **Steve Howell, roc.lynrummy.com** — a book + tutorial for the new compiler, apps built through agentic (Claude-assisted) development, and Wasm demos of Luke's roc-ray examples running in the browser. | The most substantial third-party *learning material* for the new compiler; also another data point for AI-assisted Roc development (§7, F5). | +| ongoing | **HN discussion of the rewrite post** ([hndistilled.com/story/48933149](https://hndistilled.com/story/48933149/)) | The substantive external critique surface: Rust-vs-Zig safety/tooling debate, skepticism about bolt-on borrow checking, build-speed evidence. Where the informed outside argument about Roc actually happened in 2026. | + +**Absence worth naming:** no "why we left Roc" post, no major-outlet review, and no independent +benchmark suite coverage surfaced. External writing about Roc in 2026 is mostly *reactions to +Feldman's own posts*. + +--- + +## 7. Findings — the interesting and the load-bearing + +**F1. Roc has no blog; it has a manifesto site, two personal blogs, and a chat.** +Release news lives on Zulip and GitHub releases. The website's README still framed 0.1 as not +ready while RC1 was already public (noted in the ecosystem report), and the 0.1.0 announcement +post is being assembled after the fact. Anyone (or any census) watching roc-lang.org for news +will systematically lag reality by weeks. **This is the pass's main methodological finding.** + +**F2. The site is a record of deliberate, permanent refusals — and it just hardened one.** +The FAQ now states in writing: never linear/dependent/refinement/uniqueness types, never a +self-hosted compiler, never JS/JVM/CLR/BEAM targets, never platform composition, no Maybe. +Feldman's 2026-11-23 Zulip answer on linear types ("the cure is worse than the disease") is not +an offhand remark — it is the site policy verbatim. Roc's design identity is defined as much by +this refusal list as by its features. + +**F3. The `!` sigil has a documented lineage — and its founding document is now obsolete.** +The April 2024 post introduced `!` as sugar desugaring to `Task.await` chains. The new compiler +kept the surface syntax and replaced the machinery (direct effectful functions, `=>` types, no +Task). The blog post was never updated to say so; the /functional page carries the current design. +Readers landing on the 2024 post from search will learn a semantics that no longer exists. + +**F4. The multi-entrypoint post is the missing manual for the platform burst.** +Boswell's Aug 2025 interpreter-shim/LLVM-bitcode-adapter post (§3) explains *how* roc-gui, +roc-native-android and friends get fast dev loops despite multi-symbol host ABIs. It predates +those platforms' public launches and reads, in hindsight, as their enabling infrastructure. +It was absent from the earlier research's catalogue (it was cited in the Zulip digest only as +the roc dev REPL root cause). + +**F5. The ecosystem's LLM-code question has a concrete, current data point — on the record.** +Four days after a longtime contributor's "Goodbye" over LLM-generated code (Zulip, 2026-11-19; +no policy adopted, per the digest), the project's most prolific platform author published a +platform launch post stating he "delegated much of the implementation to Opus 5.5" and built it +in a weekend — openly, on his own blog, with no evident pushback. A third-party book author is +simultaneously showcasing Claude-built Roc apps. Whatever the community decides, the practice is +already normalised at the centre of the ecosystem; the controversy is about *disclosure and +review norms*, not existence. + +**F6. The RC1 → 0.1.0 trajectory, as the public record tells it.** +Blog record: roadmap scoped 0.1 in May 2024 → parity post (Jul 2026) says "later this year" → +fp-vs-C post (Oct 22) says "weeks away" → silence. The actual RC1 announcement (Nov 21), the +zero-blocker status, and Feldman's floated option of promoting RC1 directly to 0.1.0 all exist +**only on Zulip**. The blog trail corroborates the census's trajectory but is not where its +facts live; nothing on any blog surface post-dates or contradicts the 2026-11-23 investigation. + +**F7. Engagement is real but narrow.** +Feldman's two 2026 posts are the ecosystem's entire mass-media surface: HN front-page threads, +#8 HN / #4 Lobsters / #2 r/programming for the deflate post. Third-party coverage is thin, +partly stale (AlopexDB), partly derivative (dev.to). Roc's reputation is currently carried by +its founder's writing — effective, and a single point of failure. + +**F8. Ecosystem health, as the blog itself supports it.** +Posting cadence is low (Feldman: 2 posts/yr, both milestone retrospectives; Boswell: 2 posts in +15 months after a quiet stretch) but every post marks something shipped. The blog surface is +100% Feldman + Boswell — the same ~5-person concentration the ecosystem report measured in code +is also true of the *writing*. The honest read: a small project whose public narrative is +disciplined and milestone-driven, whose real activity (releases, platforms, community projects) +is substantially larger than its blog footprint suggests — visible only if you read Zulip and +the release pages. + +### Census deltas vs the 2026-11-23 investigation + +- **D1 (correction): roc-signals ownership.** The ecosystem report lists roc-signals as + Feldman's (`github.com/rtfeldman/roc-signals`). Boswell's 2026-11-23 post links it as + `github.com/lukewilliamboswell/roc-signals` and describes the engine as his experiment. + Current evidence: the signals engine is Boswell-driven and the repo lives under his account. +- **D2 (addition): Boswell's multi-entrypoint post (2025-08-30)** — a substantive compiler- + internals document missing from the prior catalogue; now §3/F4. +- **D3 (addition): Feldman's "Functional Semantics in Imperative Clothing" (2024-04-29)** — the + fourth rtfeldman post; prior research covered 3 of 4. Its content is superseded (F3). +- **D4 (addition): two talks** — "A Preview of Roc 0.1.0" (2026-08-13) and Åhdén's "Roc and + Joy" (2026-11-10) — now §5. +- **D5 (corroboration, not contradiction):** the FAQ's "never" on linear types hardens the + digest's same-day Zulip report into site policy (F2). +- **No contradictions found.** Nothing on roc-lang.org, rtfeldman.com, or Boswell's blog + post-dates the investigation (all research is same-day, 2026-11-23) or conflicts with its + claims about RC1, platform versions, or ecosystem concentration. Where the surfaces disagree + in *freshness* (website vs Zulip), Zulip is ahead — see F1/F6. + +--- + +## 8. Front-page picks for the Roc Space + +Six items, chosen to mirror the Iroh Space's shape (headline state → deep dives → people → +primary sources): + +1. **0.1.0-RC1: where the release actually stands** — Zulip-announced Nov 21, zero blockers, + RC1 may be promoted directly to 0.1.0; the website announcement doesn't exist yet. (The + Space's news card; sources: Zulip digest + §7/F6.) +2. **"How Our Rust-to-Zig Rewrite is Going"** (Feldman, Jul 2026) — the 487-day rewrite + retrospective; the single best entry point to modern Roc. +3. **"How close can pure FP get to C?"** (Feldman, Oct 2026) — roc-deflate vs libdeflate; + the performance thesis with production receipts. +4. **"Roc Platforms: Supporting multi-entrypoint hosts"** (Boswell, Aug 2025) — the compiler + internals underneath the GUI/Android platform wave; the catalogue's best hidden gem. +5. **"Roc platform for native Android apps"** (Boswell, Nov 2026) — the newest platform and + the signals engine's proving ground; also the ecosystem's LLM-use data point. +6. **The settled refusals** (FAQ + BDFN) — never linear types, never self-hosted, one platform + per app, BDFN succession-by-design. Roc's design identity in one card. + +--- + +*Method note: roc-lang.org inventory verified against the site's source repo file tree +(2026-11-23); page texts read from source markdown. rtfeldman.com index fetched 2026-11-23; +all four posts accounted for. Boswell's blog enumerated from its source repo content tree; +all eight posts titled/dated from source, the two most recent read in full or near-full. +One fetch (Boswell's homepage, rendered) was rate-limited by the browser service and routed +around via the repo source instead. Items marked "listing-level" were not opened in full.* diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/ecosystem-2026-11-23.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/ecosystem-2026-11-23.md new file mode 100644 index 000000000..a45c6af5b --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/ecosystem-2026-11-23.md @@ -0,0 +1,243 @@ +# The Roc Ecosystem — November 2026 + +**Report date:** 2026-11-23 · **Scope:** platforms, libraries/packages, the new (Zig) compiler, real projects, and the last ~6 months of movement. +**Method:** primary sources only where possible — [roc-lang.org](https://www.roc-lang.org), Richard Feldman's posts on [rtfeldman.com](https://rtfeldman.com), GitHub repos and release pages, and the community awesome list ([lukewilliamboswell/roc-awesome](https://github.com/lukewilliamboswell/roc-awesome)). All web sources were read on 2026-11-23. Aggregator/overview articles were checked against primary sources and, where they conflicted, discarded (see §7). + +**Maturity labels used throughout:** + +- **Official–active** — maintained by the roc-lang org, tracking current nightlies. +- **Community–active** — third-party, releasing against the new compiler in recent weeks. +- **Experimental / PoC** — real and runnable, but self-described as early or proof-of-concept. +- **Legacy / superseded** — built for the old Rust compiler; not on the current (new-compiler) awesome list; treat as abandoned unless re-verified. + +--- + +## TL;DR + +- Roc's compiler was rewritten from Rust to Zig. **Feature parity with the old compiler was reached in July 2026**, and the new compiler is now the only one that matters: both official platforms, the Exercism track, and essentially every active community project target it, pinned to dated nightlies. +- **Roc 0.1.0 — the language's first numbered release in eight years — had not shipped as of 2026-11-23.** Feldman (2026-10-22) said it was "still weeks away." Downstream projects and the nixpkgs update already talk about a "0.1.0 release candidate," so an RC is imminent or quietly circulating, but the [roc repo README](https://github.com/roc-lang/roc) still says Roc is "not ready for a 0.1 release yet." **Nightlies are the real distribution.** +- The platform layer is small but genuinely active: two official platforms (basic-cli, basic-webserver) shipping frequent releases, plus a burst of new community platforms in autumn 2026 — a Cloudflare Workers platform (Oct 2026), a native Android platform (created 2026-11-22), a GPUI-based desktop GUI, a raylib games platform with 51 releases, and a 3D engine. +- There is real production use, but it is concentrated: essentially one prolific consultant (Niclas Åhdén) running Roc + his Joy framework in production for ~2 years, plus one very large body of new-compiler application code by Steve Howell (a live group chat and ~33k lines of Roc). A pure-Roc deflate implementation runs in paid production within ~9% of libdeflate's speed. +- The language itself changed in the rewrite: effectful functions are suffixed `!`, `Result` became `Try`, methods (`list.map(...)`) landed, and new builtins (`Iter`/`Stream`) exist. Old-compiler code does not carry over unchanged. + +--- + +## 1. The new compiler (Zig rewrite) + +### What happened + +- The rewrite of the compiler from Rust to Zig was announced in February 2025 and took **487 days**. The codebase went from ~300K lines of Rust to **464K lines of Zig**; the [roc repo](https://github.com/roc-lang/roc) is now ~92.9% Zig (6,207 stars, ~56K commits, 430 forks, read 2026-11-23). +- **Feature parity was reached in July 2026.** The primary source is Feldman's retrospective, ["How Our Rust-to-Zig Rewrite is Going"](https://rtfeldman.com/rust-to-zig) (2026-07-15), which is also the best single document on the rewrite's rationale and results. +- The legacy Rust compiler line ended at alpha1 (2025-01-29) through alpha4-rolling (2025-08-26) and is superseded. Distribution of the new compiler is via **nightlies** (`nightly-YYYY-MM-DD-`, [roc-lang/nightlies](https://github.com/roc-lang/nightlies)); the [setup-roc](https://github.com/roc-lang/setup-roc) GitHub Action supports `nightly-new-compiler`, and Nix users have the [roc-lang/roc-overlay](https://github.com/roc-lang/roc-overlay) flake. nixpkgs itself moved its roc package from alpha4 to `nightly-2026-11-09-9e85de7` in November 2026, noting a 0.1.0 release candidate was expected "in the coming weeks" ([maintainermode.org PR #564994](https://maintainermode.org/pr/564994)). + +### What the new compiler does that the old one didn't + +From [Feldman's rewrite retrospective](https://rtfeldman.com/rust-to-zig) and [roc-lang.org](https://www.roc-lang.org): + +- **Build speed:** incremental builds went from 10.0s (Rust 1.85) / 3.4s (Rust 1.97) to **0.035s** on Zig 0.17 with `-fincremental`. Caveat: stable Zig 0.16.0 has a bug that breaks `-fincremental` on this codebase (fix landed upstream; the team is waiting on the next stable), and `-fincremental` is currently x86-64 only. +- **Hot code loading in dev:** `roc server.roc` picks up source edits per-request without a restart. +- **Reproducible cross-compilation:** `roc build --target=x64musl` produces byte-identical output across hosts. +- **Zero-parse caching:** `roc check` / `roc test` write an on-disk cache (structure-of-arrays layout, 32-bit indices) that is read back without parsing. +- **New internals:** a new parser (Anthony Bullard, Sam Mohr), a new type checker (Jared Ramirez), and new lambda-set resolution (Ayaz Hafiz, prototyped in OCaml — polymorphic defunctionalization). +- **Language-level additions:** string interpolation inside patterns; compile-time execution of pure functions (demonstrated as a zero-allocation HTTP router); an in-browser build of the compiler shipped as the "echo" platform (2.5 MB wasm, embedded on the roc-lang.org homepage, by Stephan). +- **Memory-safety retrospective:** the post counts 2 Zig-compiler use-after-free bugs found in the new compiler's error-message paths, versus 21 Rust-era memory-corruption reports — all of which were miscompilations, none in compiler logic. Feldman's conclusion is that the rewrite did not trade away safety in practice. + +### Language changes in the new compiler + +Per the current [roc-lang.org examples](https://www.roc-lang.org/examples) and release notes: + +- Effectful functions are suffixed with `!` (`main!`, `echo!`); pure vs effectful is visible in every signature. +- `Result` is now **`Try`**. +- **Methods** exist: `list.map(...)`, `n.to_str()`. +- New builtins **`Iter`** and **`Stream`**; `for!` loops; local mutable variables via `var $x`. + +### What's still missing / not done + +- **0.1.0 itself.** Feldman's 2026-10-22 post ["How close can pure FP get to C?"](https://rtfeldman.com/fp-vs-c) says Roc is "still weeks away from its first numbered release, 0.1.0, eight years in the making." His talk ["A Preview of Roc 0.1.0"](https://hallway.video) (2026-08-13) previews it. Some downstream READMEs (e.g. roc-native-android, §2) already say "the 0.1.0 release candidate or a recent nightly," but no numbered release was present on the roc repo as of 2026-11-23. +- Documentation is the acknowledged gap: Feldman, in the rewrite retrospective's closing section: "in its current state you can still expect a variety of bugs, incomplete features, and unfinished docs. I have a lot of documentation to write between now and then!" +- The project is still fundraising for sustainability: the roc-lang.org homepage (read 2026-11-23) seeks **$4,000 USD/month** to fund one longtime contributor full-time. The Roc Programming Language Foundation is a 501(c)(3) nonprofit ([rtfeldman.com/rust-to-zig](https://rtfeldman.com/rust-to-zig)). Current corporate sponsors per the repo README: Lambda Class, ohne-makler, Decem (earlier sponsors named in Feldman's post: rwx, Vendr, NoRedInk, Tweede Golf, Martian). + +### Who has moved to the new compiler + +- **Both official platforms** (basic-cli, basic-webserver) — new-compiler only, tracking nightlies within days (§2). +- **The Exercism Roc track** — fully migrated August 2026 (110 exercises; maintainer Aurélien Geron hand-updated 108 beginner exercises; [Exercism forum thread 68377](https://forum.exercism.org), [track](https://exercism.org/tracks/roc)). +- **Essentially the entire current awesome list** — every platform and package in §2–§3 that is labelled Community–active pins a November 2026 nightly. +- **Rocci Bird** (the WASM-4 game, §4) was ported as the feature-parity proof. +- Old-compiler projects that did not migrate are listed as Legacy/superseded in §2–§3. + +--- + +## 2. Platforms + +A Roc *platform* is the host program (in Rust, Zig, Go, …) that provides an app its effects — files, network, UI. Platforms are where most ecosystem action is. + +### Official (roc-lang org) + +| Platform | What it's for | Status | +|---|---|---| +| **[basic-cli](https://github.com/roc-lang/basic-cli)** | Command-line apps: the default general-purpose platform. Host in Rust. Modules include Stdout/Stdin (streaming lines and chunks), File/Path (writer API, permissions such as OwnerOnly/PublicRead, symlinks), Cmd, Http, Tcp, UnixSocket, Sqlite, Tty (raw mode), Signal (SIGINT/SIGTERM/SIGUSR1/SIGUSR2/SIGWINCH), Env, Locale. | **Official–active.** Latest **0.28.1**, requiring nightly-2026-11-13 or newer. 0.26.0 was a large consistency release (typed `Duration`/`Utc`/`Monotonic`, unified `Err(EndOfInput)`, one error tag per module, mimalloc on Linux static hosts). Maintained mainly by Luke Boswell, with release automation by Anton-4. [Releases](https://github.com/roc-lang/basic-cli/releases) | +| **[basic-webserver](https://github.com/roc-lang/basic-webserver)** | HTTP servers. Host in Rust (hyper + tokio). Ships Sqlite, server-sent events, HTML/forms/static-file support. | **Official–active, very fast-moving.** Latest **0.22.0**, pinning nightly-2026-11-15. It shipped 0.17 → 0.22 across roughly six weeks in Oct–Nov 2026. [Releases](https://github.com/roc-lang/basic-webserver/releases) | + +### Community — new compiler + +| Platform | What it's for | Status | +|---|---|---| +| **[RocRay / roc-ray](https://github.com/lukewilliamboswell/roc-ray)** (Luke Boswell) | 2D games and visual tools over raylib; Zig host. Drawing, audio, keyboard/mouse/gamepad, files, networking, screen recording; macOS/Linux/Windows x64. Explicitly 2D-only (3D planned) and not a GUI toolkit. Ships real example programs: Breakout, Pong, Snake, Pixel Workshop, Spark Run, Cave Climb, Particles, Live Plot, Postcard Studio. | **Community–active.** 80 stars, 1,579 commits, **51 releases** (created 2024-01-13). The roc-lang.org example pins release **0.12.1** (nightly-2026-11-12); the [manual](https://lukewilliamboswell.github.io/roc-ray/roc-ray.pdf) is at 0.12.3. | +| **[roc-gui](https://github.com/lukewilliamboswell/roc-gui)** (Luke Boswell) | Native desktop GUI on **GPUI** (Zed's UI framework); cross-platform (macOS, Linux/Wayland, Windows). Ships a behavioural/performance test harness and a performance observatory streaming to SQLite; the repo gallery shows a dozen demo apps (HTTP Workbench, Database Browser, Terminal Workspace, Redis Explorer, …). | **Experimental, but substantial.** Created 2026-09-14; 733 commits, 25 releases in ~10 weeks. README: "still an early-stage platform. Do not use it in production." | +| **[roc-signals](https://github.com/rtfeldman/roc-signals)** (Richard Feldman) | Reactive-signals UI engine, for the web and for native GUI. Its native-GUI docs ship starter archives as release candidates (`gui-0.1.0-rc.1/2/3` per OS) pinned to nightly-2026-09-04 ([docs](https://github.com/rtfeldman/roc-signals/blob/HEAD/www/content/docs/native-gui.md)). The same signals engine powers roc-native-android (below). | **Experimental–active.** Feldman's own current UI project; the engine is at 0.8.0-rc1 per the awesome list. | +| **[roc-native-android](https://github.com/lukewilliamboswell/roc-native-android)** (Luke Boswell) | Native Android apps in pure Roc — real Android widgets, **no WebView**. Reactive engine from roc-signals; arm64 only; Kotlin shell, no Gradle. Examples: counter, todos, stopwatch, contacts (a virtualised 10,000-contact list), http, and "ports" (battery/accelerometer exposed from Kotlin). | **Experimental / PoC — brand new.** Created **2026-11-22** (the day before this report); v0.0.1, 20 commits; self-described "early proof of concept." Luke's launch post, "Roc platform for native Android apps," is dated 23 Nov 2026 on [lukewilliamboswell.github.io](https://lukewilliamboswell.github.io). Its README already references "the 0.1.0 release candidate or a recent nightly." | +| **[roc-native-macos](https://github.com/lukewilliamboswell/roc-native-macos)** (Luke Boswell) | Native macOS apps. | **Experimental.** Listed on the current awesome list; not separately audited for this report. | +| **[Joy](https://github.com/niclas-ahden/joy)** (Niclas Åhdén) | Full-stack / isomorphic web framework + platform: Elm-architecture client and server in one language. | **Community–active; the ecosystem's most battle-tested framework.** 66 stars, 256 commits, 5 releases (created 2024-12-10); current README pins Joy **0.35.0** + joy-html 0.18.0. README self-label: "early development, not production-ready… expect breaking changes" — yet its author runs it in production (§4), and its js-framework-benchmark numbers are competitive with Elm/Leptos/Solid. | +| **[roc-cloudflare-workers](https://github.com/Karakatiza666/roc-cloudflare-workers)** (Karakatiza666) | Roc on **Cloudflare Workers**: apps compile to a wasm32 reactor behind a JS shim. Typed modules for fetch, D1, R2, KV, Cache API, Durable Object SQL, Queues, and Workers AI; Zig host; effects await JS promises via JSPI. Companion CLI: `roc-cloudflare-workers-cli`. | **Experimental — brand new and solo.** Created **2026-10-26**; already at **v0.0.10** (10 releases in under a month, 216 commits, 0 stars). | +| **[roc-tower-platform](https://github.com/grayrest/roc-tower-platform)** (grayrest) | Web servers with pure handlers on Rust hyper/Tower + SQLite. | **Community–active** (current awesome list). | +| **[basic-ssg](https://github.com/lukewilliamboswell/basic-ssg)** (Luke Boswell) | Static site generation. | **Community–active** (current awesome list). | +| **[roc-fuzz](https://github.com/lukewilliamboswell/roc-fuzz)** (Luke Boswell; originally bhansconnect) | Fuzz-testing platform. | **Community–active** (current awesome list). | +| **[roc-wasm4](https://github.com/lukewilliamboswell/roc-wasm4)** (Luke Boswell) | Games for the WASM-4 fantasy console. Its game Rocci Bird was the new compiler's feature-parity demo (§4). | **Community–active** (current awesome list). | +| **[Rocco](https://github.com/BraedenFoster/rocco)** (Braeden Foster) | Experimental **3D engine** platform: engine in Odin, WebGPU rendering; a game is a model plus five pure functions producing a `Scene` value. glTF, PBR, shadows, bloom; macOS/Linux/Windows/web builds. | **Experimental.** (Via Steve Howell's site, §4, read 2026-11-23.) | +| **[roc-screensaver](https://github.com/showell/roc-screensaver)** (Steve Howell) | Zig platform with its own software rasterizer: one Roc app runs both as a Windows screensaver and as a web page. Three screensavers ship on it, including "Lanterns, a sunrise made for Roc's 0.1.0 launch"; ~8,155 lines of Roc apps. | **Experimental–active** (single-author, shipping). | +| **[restricted-roc](https://codeberg.org/removewingman/restricted-roc)** (removewingman, Codeberg) | CLI platform that can sandbox itself — restricts syscalls and filesystem access. | **Experimental** (current awesome list). | +| **Platform templates** (Luke Boswell) | Scaffolding for writing new platforms in [Go](https://github.com/lukewilliamboswell/roc-platform-template-go), [Rust](https://github.com/lukewilliamboswell/roc-platform-template-rust), [Zig](https://github.com/lukewilliamboswell/roc-platform-template-zig). | **Community–active.** Worth noting: the "write your own platform" path is a supported, templated workflow, which is how the long tail above exists at all. | + +### Legacy-compiler platforms (not on the current awesome list) + +Treat as **legacy / superseded** unless re-verified: roc-aws-lambda and roc-aws-lambda-runtime (isaacvando), roc-iced (tarkah), roc-microbit (bhansconnect, embedded), static-site-gen (isaacvando), roc-ecs (ageron), roc-parallel demo (ageron). Aurélien Geron (ageron) also maintains **roclet** (reactive Roc notebooks in the browser) and new-compiler-updated forks of basic-cli/basic-webserver (updated 2026-10-05). + +--- + +## 3. Libraries and packages + +Roc packages are distributed as bundles via GitHub releases (there is no central registry like crates.io). The list below is the **new-compiler** canon per the current [roc-awesome](https://github.com/lukewilliamboswell/roc-awesome) README (read 2026-11-23). + +### Parsing and text + +- **[roc-parser](https://github.com/lukewilliamboswell/roc-parser)** (Luke Boswell) — parser combinators plus ready-made parsers for CSV, JSON, YAML, XML, Markdown, AsciiDoc, HTTP, and Roc source itself. The ecosystem's flagship parsing package. +- **[roc-regex](https://github.com/grayrest/roc-regex)** (grayrest) — regular expressions. +- **[roc-ascii](https://github.com/hasnep/roc-ascii)** (Hasnep) — ASCII text handling. +- **[unicode](https://github.com/roc-lang/unicode)** (roc-lang) — graphemes and code points. +- **[path](https://github.com/roc-lang/path)** (roc-lang) — path types. +- **[http](https://github.com/roc-lang/http)** (roc-lang) — HTTP client types, v2.0.0. + +### Data and serialisation (mostly Karakatiza666) + +- **[roc-cbor](https://github.com/Karakatiza666/roc-cbor)** — CBOR with derived readers/writers (0.5.0). +- **[roc-toml](https://github.com/Karakatiza666/roc-toml)** — TOML 1.0 with comment-preserving edits. +- **[roc-jwt](https://github.com/Karakatiza666/roc-jwt)** — JWT decode + claims (bring-your-own crypto). +- **[roc-semver](https://github.com/Karakatiza666/roc-semver)**, **[roc-tar](https://github.com/Karakatiza666/roc-tar)**, **[roc-base58](https://github.com/Karakatiza666/roc-base58)**, **[roc-s2-geometry](https://github.com/Karakatiza666/roc-s2-geometry)** (port of Google's S2 geometry), **[roc-websocket](https://github.com/Karakatiza666/roc-websocket)** (RFC 6455, platform-agnostic), **[roc-app-header](https://github.com/Karakatiza666/roc-app-header)** (parse/edit Roc app headers, MVS version selection). +- **[roc-rvn](https://git.sr.ht/~jwoudenberg/roc-rvn)** (Jasper Woudenberg, SourceHut) — a Roc-like serialisation format ("Roc Value Notation"). + +### Dates and time + +- **[roc-time](https://github.com/lukewilliamboswell/roc-time)** (Luke Boswell) — date/time, 0.3 line, microsecond profile. +- **[roc-isodate](https://github.com/imclerran/roc-isodate)** (imclerran) — ISO date parsing/formatting. +- **[roc-gregorian](https://github.com/jwoudenberg/roc-gregorian)** (Jasper Woudenberg) — Gregorian calendar math. + +### Databases and network services + +- **[roc-pg](https://github.com/niclas-ahden/roc-pg)** (Niclas Åhdén) — PostgreSQL client with **compile-time checked SQL**. (Supersedes the old-compiler agu-z/roc-pg.) +- **[roc-redis](https://github.com/jaredramirez/roc-redis)** (Jared Ramirez) — Redis client, binary-safe, platform-agnostic. + +### The Åhdén suite (Niclas Åhdén — all new-compiler, production-driven) + +One author accounts for a large share of the serious package ecosystem, written for his production work (§4): [roc-deflate](https://github.com/niclas-ahden/roc-deflate) (§4), roc-base64, roc-crc32, roc-md5, roc-hmac, roc-scram, [roc-openapi](https://github.com/niclas-ahden/roc-openapi) (validate request bodies against OpenAPI 3.x), [roc-playwright](https://github.com/niclas-ahden/roc-playwright) (browser automation), **[roc-spec](https://github.com/niclas-ahden/roc-spec)** (parallel test runner with isolated environments), **[roc-vcr](https://github.com/niclas-ahden/roc-vcr)** (record/replay HTTP in tests), roc-sendgrid, roc-url, roc-xlsx, roc-zip, roc-xml, roc-prng, roc-database-url, roc-human-readable-file-size, roc-maybe, roc-non-zero, joy-html. + +### The Boswell suite (Luke Boswell) + +- **[weaver](https://github.com/lukewilliamboswell/weaver)** — ergonomic CLI argument parser (originally by smores56). +- **[roc-docx](https://github.com/lukewilliamboswell/roc-docx)** — read/write Word documents, pure Roc. +- **[roc-font](https://github.com/lukewilliamboswell/roc-font)** — TTF/OTF parsing and text shaping, pure Roc. +- **[roc-graph-layout](https://github.com/lukewilliamboswell/roc-graph-layout)** — graph layout plus Mermaid parsing/rendering. +- **[roc-pdf](https://github.com/lukewilliamboswell/roc-pdf)**, **[roc-pandoc](https://github.com/lukewilliamboswell/roc-pandoc)**, roc-ansi, **[plume](https://github.com/lukewilliamboswell/plume)** (interactive charts via Plotly.js), roc-time (above). + +### Other packages + +- **[roc-random](https://github.com/kili-ilo/roc-random)** (kili-ilo) — random generation (successor to jancvanb/roc-random). +- **[rocsat](https://github.com/mpizenberg/rocsat)** (Matthieu Pizenberg) — a SAT solver in Roc. +- **[terrocotta](https://github.com/obust/terrocotta)** (obust) — GUI library with Clay-style layout + MVU, rendering via roc-ray. + +### Tooling + +- **[roc-syntax-mcp](https://github.com/Karakatiza666/roc-syntax-mcp)** (Karakatiza666, on npm) — an MCP server that teaches coding agents Roc: it indexes the language reference, builtins, basic-cli, basic-webserver, roc-parser, roc-random, and third-party platforms such as roc-ray; every topic app passes `roc check` against its pinned release. A sign of the times: the ecosystem is already building tooling *for AI agents* writing Roc. +- **[tree-sitter-roc](https://github.com/faldor20/tree-sitter-roc)** (faldor20) — grammar updated for the new syntax; powers Helix/Neovim. +- **[zed-roc](https://github.com/h2000/zed-roc)**, **[roc-vscode](https://github.com/roc-lang/roc-vscode)** — editor support. +- **[setup-roc](https://github.com/roc-lang/setup-roc)** (roc-lang) — GitHub Action; **[release-package](https://github.com/roc-lang/release-package)** (roc-lang) — package publishing workflow. +- **[bundle-roc-library](https://github.com/hasnep/bundle-roc-library)** + **pre-commit-roc** (Hasnep); **[roc-just](https://github.com/grayrest/roc-just)** (just task-runner port); **[roc-blueprint](https://github.com/lukewilliamboswell/roc-blueprint)** (typed dev-environment/task declarations in Roc — roc-gui's build is driven by it); **[roc2nix](https://github.com/jrmurr/roc2nix)**; **[roc-start](https://github.com/imclerran/roc-start)** (scaffolder; older listing, status unverified). + +### Superseded / abandoned (old-compiler era, absent from the current list) + +lukewilliamboswell/roc-json (built-in JSON plus roc-parser cover this now), Hasnep/roc-html (joy-html is the live one), Hasnep/roc-math, quelgar/roc-utils, isaacvando/rtl (template language), isaacvando/gob (a stack language written in Roc). + +--- + +## 4. Real projects + +Honest scale labels: **Production** = someone depends on it / it earns money · **Substantial hobby** = large, finished, used by its author/community, not commercial · **Demo/toy** = exists to demonstrate the language or a platform. + +### Production + +- **Niclas Åhdén's production Roc (Joy framework)** — *Production, small-team/consulting scale.* Åhdén (instateam.se) has used Roc in production for ~2 years; Feldman calls him "Roc's most prolific production user." His Func Prog Sweden talk (2026-11-10), "Roc and Joy: Productivity in Production," states Joy "already powers real web apps in the wild." His package suite (§3) is the by-product of that work. Sources: [rtfeldman.com/fp-vs-c](https://rtfeldman.com/fp-vs-c), [github.com/niclas-ahden](https://github.com/niclas-ahden). +- **roc-deflate** — *Production, single-package.* Åhdén's pure-Roc DEFLATE implementation runs in **paid production**. Feldman spent weeks optimising it and benchmarked it against libdeflate over 144 Silesia-corpus runs (levels L1–L12): median **8.9% slower than libdeflate on a Ryzen 9 3900X, 2.6% slower on M1**, worst case 18% slower, best case ~18% faster, byte-identical output. Honest caveats from the same post: roc-deflate's APIs are non-streaming only, and one heavily optimised package is not the general case. Source: [rtfeldman.com/fp-vs-c](https://rtfeldman.com/fp-vs-c) (2026-10-22). + +### Substantial hobby / community infrastructure + +- **Steve Howell's [roc.lynrummy.com](https://roc.lynrummy.com) portfolio** — *Substantial hobby, production-adjacent.* The largest public body of new-compiler Roc application code found in this investigation, all UPL-1.0 and, by the author's own account, built "through agentic development, with Claude"; the apps also run in-browser as wasm. + - **roc-chat** — a live production group chat at chat.lynrummy.com that replaced the group's earlier Zig chat: **~33,000 lines of Roc in 171 modules** (+ ~10,000 lines in 45 spec modules, ~2,300 `expect`s) on a custom Zig-host platform (29 hosted functions, the filesystem as the database, SSE live updates, password/GitHub/device-code sign-in; AI agents are chat members with their own keys). + - **roc-markdown** — 5,780 lines; "finished… in production"; renders every roc-chat message; held to 314 frozen CommonMark/GFM spec examples. + - **roc-syntax-color** — 5,242 lines; syntax highlighting for 7 languages. + - **Safari Ride** — 14,268 lines, 98 modules, 816 expects; plus a 39-chapter online book, *Safari Ride: a tour of a real Roc program* (early draft). + - **A BASIC interpreter** — 6,733 lines; ECMA-55 Minimal BASIC plus the 1978 Creative Computing dialect; graded against 208 NBS test programs and 99 games from *BASIC Computer Games*. + - **Roc on Shale** — 25 Roc programs, ~25,700 lines: code-check/report scripts for his Shale agent scripting language. + - **Seattle Delivery** (4,704 lines; vehicle-routing solver, Clarke–Wright + local search, bit-for-bit reproducible native vs wasm), **Fast Track** (4,166 lines; board game with search AI), **Dog Park** (3,688 lines; herding game), **Safari Walk** (1,666 lines; built on the Rocco 3D engine), a shared 1,439-line chess kit behind Knight's Tour / Eight Queens, the roc-screensaver platform (§2), and animated shorts (*Trick or Treat*, *Welcome to Roc*, *Robot Thanksgiving*). + +### Demos and smaller projects + +- **Rocci Bird** (bhansconnect, 2024; art by Luke DeVault) — *Demo, but a load-bearing one.* A WASM-4 Flappy-Bird-like, ported to the new compiler as the feature-parity proof: `roc build --opt=size` produces a **31 KB wasm**, less than half the old compiler's output. Playable on itch.io and embedded in Feldman's rewrite post. Source: [rtfeldman.com/rust-to-zig](https://rtfeldman.com/rust-to-zig). +- **roc-ray example games/tools** (with the platform, §2) — Breakout, Spark Run, Cave Climb, Pixel Workshop, Particles, Live Plot, Postcard Studio. *Small-but-complete.* +- **kai** ([thebrandonlucas/kai](https://github.com/thebrandonlucas/kai)) — a CLI frontend for Nix, listed as a showcase app on the awesome list. +- **roc-gui demo apps** (§2) — a dozen GPUI demo applications (HTTP Workbench, Database Browser, Redis Explorer, …) shipped as the platform's gallery. + +### Learning / puzzle scenes + +- **Exercism Roc track** — 110 exercises, fully migrated to the new compiler in August 2026. This is the main on-ramp for new users and a real signal of new-compiler adoption. [exercism.org/tracks/roc](https://exercism.org/tracks/roc) +- **Advent of Code** — [lukewilliamboswell/aoc](https://github.com/lukewilliamboswell/aoc) (puzzle solutions) is on the current awesome list's showcases. Roc has an AoC presence through individual solvers rather than an organised scene. +- **Game jams** — no distinct Roc game-jam institution was found in this pass; the games energy is concentrated in roc-ray / roc-wasm4 / Rocco examples instead. (Stated plainly rather than padded.) +- **Community hub** — the Roc Zulip is the project's centre of gravity (linked from every official page); a public export is browsable at [roc-lang.github.io/zulip-export](https://roc-lang.github.io/zulip-export). Announcements there were corroborated against the web sources above rather than scraped for this report. + +--- + +## 5. What's new in the last ~6 months (May – Nov 2026) + +| When | What | +|---|---| +| 2026-07-15 | **Feature parity** for the Zig rewrite + Feldman's retrospective, ["How Our Rust-to-Zig Rewrite is Going"](https://rtfeldman.com/rust-to-zig). | +| Aug 2026 | **Exercism Roc track fully migrated** to the new compiler (110 exercises). | +| 2026-08-13 | Feldman's talk **"A Preview of Roc 0.1.0"** ([hallway.video](https://hallway.video)). | +| 2026-09-14 | **roc-gui** created (GPUI desktop GUI platform); 25 releases by late November. | +| Oct–Nov 2026 | **basic-cli 0.26 → 0.28.1** and **basic-webserver 0.17 → 0.22.0** release trains, tracking November nightlies. | +| 2026-10-22 | ["How close can pure FP get to C?"](https://rtfeldman.com/fp-vs-c) — the roc-deflate vs libdeflate result; "weeks away" from 0.1.0. | +| 2026-10-26 | **roc-cloudflare-workers** platform created; iterated to v0.0.10 within a month. | +| Nov 2026 | **nixpkgs** moves roc from alpha4 to a new-compiler nightly; roc-lang.org's examples section rebuilt around the new compiler (examples validated against nightlies of 2026-11-12/15, including a terminal Snake on basic-cli 0.28.0 and a RocRay example). | +| 2026-11-10 | Åhdén's Func Prog Sweden talk, "Roc and Joy: Productivity in Production." | +| 2026-11-22/23 | **roc-native-android** created (2026-11-22) and announced (2026-11-23). | +| Ongoing | **roc-syntax-mcp** — agent-facing tooling for the new compiler; Steve Howell's entire lynrummy portfolio is a 2026, agent-developed body of work. | + +--- + +## 6. Exists / New / Actually used — the separation Drew asked for + +- **Exists (and is current):** the new compiler (nightlies), basic-cli, basic-webserver, roc-ray, Joy, roc-parser, roc-pg, roc-signals, the Åhdén and Boswell package suites, Exercism track. +- **New (last ~6 months):** feature parity itself; roc-gui (Sep 2026); roc-cloudflare-workers (Oct 2026); roc-native-android (Nov 2026); the basic-webserver 0.17→0.22 velocity; roc-syntax-mcp; language changes (`Try`, methods, `Iter`/`Stream`) becoming the documented norm. +- **Actually used (evidence of real use, not just existence):** roc-deflate in paid production; Joy powering production web apps for ~2 years; roc-chat as a live group chat; Exercism learners on 110 exercises; roc-ray's shipped example tools; Howell's Shale tooling scripts (25 programs used on his own project). +- **Exists but legacy:** everything in the "Legacy/superseded" lists in §2–§3 — old-compiler code that has not been ported and should not be cited as current ecosystem. + +--- + +## 7. Caveats and source quality + +- **Pre-release language.** Everything above sits on nightly compilers. Pins move weekly; a package that is "current" today names a specific November 2026 nightly in its header. Expect breakage until 0.1.0 lands. +- **Small numbers, honestly.** The ecosystem's centre of mass is a handful of people: Feldman (compiler, roc-signals), Luke Boswell (basic-cli, roc-ray, roc-gui, the native platforms, roc-parser, the awesome list itself), Niclas Åhdén (Joy + the production package suite), Karakatiza666 (data formats + Cloudflare), Steve Howell (applications). Bus factor is the ecosystem's biggest risk, and the $4k/month fundraising goal (§1) is the project's own acknowledgement of it. +- **Aggregator articles are unreliable here.** A July 2026 overview on asopi.tech, for example, cites platform versions (basic-cli 0.20.0 / basic-webserver 0.13.1) that were already stale against the release pages, and a "basic-graphics" platform appears in dev.to-era material but in no current list. Every version number in this report comes from the project's own release page or README as read on 2026-11-23. +- **Zulip** is where announcements happen first; this report corroborated them via the public web (repos, blogs, talks) and the [public Zulip export](https://roc-lang.github.io/zulip-export) exists for anyone who wants the primary feed. + +--- + +*Compiled 2026-11-23 from primary sources read the same day.* diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/platform-design-exploration-2026-11-23.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/platform-design-exploration-2026-11-23.md new file mode 100644 index 000000000..e1e5b79b1 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/platform-design-exploration-2026-11-23.md @@ -0,0 +1,733 @@ +# Roc Platforms Deep-Dive + A Composable Platform Family for ID Apps + +**Date:** 2026-11-23 · **Lane:** ROC-PLATFORMS-DESIGN +**Companions:** `ecosystem-2026-11-23.md`, `blog-catalogue-2026-11-23.md` (§4 cadence, F2/F4), +`talks-and-announcements.md`, `zulip-digest-2026-11-23.md` — all same-day, same folder. +**Method:** primary sources read 2026-11-23 — repo READMEs/release pages (via GitHub), +the RocRay manual (lukewilliamboswell.github.io/roc-ray, v0.12.3), Boswell's +multi-entrypoint post, and the platforms' own comparison docs. Corrections to the +earlier reports are flagged **[CORRECTION]** where they occur. + +**The question Drew posed:** what does each of these platforms actually *do* and +*allow* — and could we build our own family of platforms, in whatever languages, +that treats their capabilities as a mix-and-match catalogue, so the host running +an id app decides which capabilities that app gets — including a system-level +wrapper that gives every app one D1, one R2, one KV and meters its bytes, and an +Android permission model over native capabilities? + +Short answer: **yes, and Roc is unusually well-shaped for it — because in Roc a +platform is already a capability contract.** The app can do *nothing* except +through functions the platform chooses to expose. The work is not inventing the +security model; it is (1) standardising the catalogue, (2) putting provisioning +and metering in the host where the app cannot reach it, and (3) accepting that +composition happens in *our* platform layer, never in the app's platform slot — +upstream has made "platforms do not compose" permanent policy (FAQ, catalogue F2). + +--- + +# Part 1 — The platforms, one by one + +## 1.1 RocRay (`roc-ray`) — 2D games and visual tools over raylib + +- **Repo / author / licence:** lukewilliamboswell/roc-ray, Luke Boswell. + UPL-1.0. Created 2024-01-13; 1,579 commits; **51 releases**, current manual + 0.12.3 (roc-lang.org example pins 0.12.1, nightly-2026-11-12). +- **Host language:** Zig, wrapping raylib (C). Targets macOS (Intel + Apple + silicon), Linux x86-64, Windows x86-64. +- **What it does:** a host-owned frame loop for programs that draw a fresh + picture many times a second — arcade/puzzle games, simulations, live plots, + generative art, small editors. Explicitly *not* a GUI toolkit (no widgets), + *not* a large engine (no editor, scene graph, physics engine, asset pipeline), + and 2D only today (3D models/cameras/lighting planned, not present; no raw + OpenGL/`rlgl` escape hatch). +- **App model / entrypoints:** the app supplies `init!`, `update!`, `render!` + plus a startup `config`. The host runs the loop and enforces *where* effects + may happen: drawing only in `render!`; file reads and other waiting work only + in `init!` or a task; everything else in `update!`. Input is a **value** — + `update!` receives this cycle's keys, mouse, gamepads, elapsed time and window + state — rather than polled global state. Resources (textures, sounds, fonts, + shaders) are released when the model stops referring to them; there is no + `Unload*`. +- **Capability surface the host grants:** + - *Always, no declaration:* window, drawing (shapes, images, text, 2D + cameras, shaders, offscreen render targets, tilemaps), keyboard/mouse/ + gamepad input, audio playback (sounds + streamed music), clocks/timers, + entropy, terminal output, the read-only directory beside the executable, + in-memory SQLite, and — once the app names itself with `with_app_id` — its + own private data/config/cache directories. + - *Only if declared:* see gating below. Behind declarations sit files and + directory handles, HTTP, UDP, subprocess commands, environment variables, + clipboard, screen capture/recording (screenshot + GIF), and file-backed + SQLite databases. + - *User-mediated, no declaration:* a file the user drops on the window or + names on the command line — the user's act of choosing it *is* the grant. + There is deliberately **no file-open dialog**. +- **The app author's view:** `frame.rectangle!(…)`, `frame.texture!(…)`, + `Audio.load_sound!(store, "jump.wav")`, `sound.play!()`, + `dir.read_text!(path)` — methods on opaque handles (`frame`, `store`, `dir`), + never raw paths or globals. Collision/geometry is pure code in `Math`; + gravity and collision response are the app's own `update!` code. +- **Capability gating — the most important precedent in this whole report.** + RocRay is the one platform here with a real, designed permission system + (manual chapter "Permissions: what your app can access"): + - The app declares each outside-the-window access in its startup config: + `.with_permission(Directory("assets", ReadOnly))`, + `.with_permission(HttpOrigin("https://api.example.com"))`, + `.with_permission(EnvVar("WEATHER_TOKEN"))`, or `with_permissions([…])`. + - **"That statement is a declaration, and it is the only permission there + is: nobody is prompted, and there are no launch flags."** Access is + visible in the app's source and can be changed only by changing its + source. Undeclared access is refused by the host. + - Files are reached through **directory handles, not paths** — a handle is + minted only for a declared directory (or a user-chosen file), and all + reads/writes are relative beneath it. This is capability-style scoping, + not string-path checking. + - Honest limit (the manual states what it does *not* protect against): the + declaration is authored by the app itself. It constrains a *well-behaved + or compromised-library* app and makes its reach auditable at a glance; it + is not a sandbox against a malicious app author, and there is no + operator-side grant file separate from the source — yet. That gap is + exactly where our design (§2.2) adds a host-side grant the app cannot edit. +- **Maturity:** the steadiest community platform in the ecosystem — shipped + example programs (Breakout, Pong, Snake, Pixel Workshop, Spark Run, Cave + Climb, Particles, Live Plot, Postcard Studio), a 177-page manual, a + performance observatory, headless smoke-test mode. Still pre-1.0 Roc: the + README warns the API may change as Roc changes. + +## 1.2 roc-gui — native desktop GUI on GPUI + +- **Repo / author / licence:** lukewilliamboswell/roc-gui, Luke Boswell. + UPL-1.0 (with GPUI's own licence notices vendored). **[CORRECTION:** an + automated metadata pass reported MIT; the repo page and LICENSE say + UPL-1.0.**]** Created 2026-09-14; 733 commits; **25 releases in ~10 weeks**, + 0.1.0 line. +- **Host language:** **Rust** (`crates/host`, Cargo workspace) hosting **GPUI**, + Zed's GPU-accelerated UI framework. Cross-platform native UI: macOS, Linux + (Wayland), Windows. +- **What it does / allows:** state-driven *widget* applications — the thing + RocRay refuses to be. The gallery is the capability statement: HTTP + Workbench, Database Browser, File Explorer, Terminal Workspace, Image + Library, Music Player, Clipboard History, System Monitor, Settings Center, + Device Configurator, Animation Studio, Redis Explorer. In other words the + intended surface is a full desktop-workbench surface: windows/layouts/text + input, filesystem browsing, outbound HTTP, database/Redis clients, terminal + hosting, clipboard, media playback, system metrics. +- **App author's view:** a state-driven declarative UI in Roc over GPUI's + rendering; the host owns the event loop, GPU drawing, and platform widgets. + Multi-entrypoint host (`init!`/`update!`/`render!`-style symbols) — enabled + by Boswell's interpreter-shim mechanism (§1.8). +- **Ships with two facilities no other platform here has:** a built-in + behavioural/performance **test harness** (S-expression scenario format) and + a **performance observatory streaming to SQLite**. For our purposes that + observatory is a proof that a Roc host can emit a structured per-app + telemetry stream as a platform feature — the shape our metering wants (§2.3). +- **Capability gating today:** none documented. The platform's surface is + effectively all-or-nothing: an app on roc-gui gets the workbench surface. + No per-app subsetting, no declaration system comparable to RocRay's. This + is the norm for young platforms, and the reason gating must be *our* + platform layer's job, not something we wait for upstream to add. +- **Maturity:** README in bold: "still an early-stage platform. **Do not use + it in production.**" Substantial and fast-moving, but the Roc API is + explicitly still being developed. + +## 1.3 roc-signals — the reactive UI engine underneath the GUI wave + +- **Repo / author / licence:** **lukewilliamboswell/roc-signals**, UPL-1.0. + **[CORRECTION to the ecosystem report, per catalogue delta D1:** the repo + lives under Boswell, not rtfeldman; Feldman originated the signals design, + Boswell is the current driver.**]** This incarnation created 2026-06-29; + 1,868 commits; 35 tags. Versioning is two-layered: the *engine package* is + at **0.8.0-rc1** (the URL Android apps pin), the web platform release line + reached **0.3.0** in the digest window ("reactive engine overhauled"). +- **What it is:** not a host surface but an **engine written in Roc** that + compiles *with* the app. A platform for interactive browser apps: you write + the UI in pure Roc; the engine compiles to WebAssembly alongside it and + updates **exactly the DOM that depends on what changed**. There is **no + virtual DOM**. +- **The model:** a *signal* is a read-only value whose state dependencies are + declared when it is built. State lives in three places: a shared **store** + of cells readable at any depth of the view; **tables** of rows edited by key + and drawn through sorted/filtered windows; and **local state** belonging to + one piece of view. Shared state is written only by **decisions** — pure + functions that *return their writes* — so the engine learns what changed + from the write itself, never by diffing values. Slow work runs as typed + **worker tasks** in Web Workers instantiating the same module. Effects are + described as data and performed by a small JavaScript runtime; **ports** + (`Port`/`PortJson`) are typed messages out to host-language services. +- **Why it matters here:** roc-signals is the shared engine inside + roc-native-android (§1.4) and the UI approach of the GPUI-era work. It is + the clearest example in the ecosystem of a *capability-shaped library*: the + view runs once, every write declares its footprint, and the host learns the + app's effects as data before performing them. A host that receives effects + as data is a host that can **gate, meter, and log** them — §2.2 leans on + exactly this. +- **Contrast the author himself draws (README, "Roc Signals and Joy"):** + Joy = one Model, one `update`, view rebuilt per event and diffed by the + host, `lazy` to skip unchanged subtrees, and server rendering of the same + views. Signals = fine-grained updates, more to learn, client-only. Both: + pure Roc UI → wasm, effects as data, small JS runtime, nightly-pinned, + APIs expected to change. +- **Capability gating:** the engine has no permission system; gating would + live in the host that performs its requested effects and answers its ports. + Its contribution to gating is architectural: effects-as-data makes host + mediation *natural* rather than bolted-on. +- **Maturity:** experimental–active; js-framework-benchmark entries, `.scm` + behaviour specs that run natively in milliseconds and replay in headless + Chrome, fuzz targets on its own codecs/lifecycle. Not a settled API. + +## 1.4 roc-native-android — native Android apps in pure Roc + +- **Repo / author / licence:** lukewilliamboswell/roc-native-android, Luke + Boswell, UPL-1.0. Created **2026-11-22**; v0.0.1; 20 commits. Self-described + "early proof of concept… written for a bit of fun, and to help with the + development of the reactive engine." The launch post discloses Boswell has + no mobile background and delegated much implementation to an LLM over a + weekend; emulator-verified only. +- **Host shape:** a small **Kotlin shell** (no Gradle project) + a **Zig JNI + bridge**. The Roc app is built `roc build --target=arm64musl` into + `libapp.so`; a companion CLI written in Roc (`android.roc`) scaffolds, + packages (aapt2/zipalign/apksigner), installs and runs the APK. **arm64 + only**, API 26+. +- **What it allows:** *real Android widgets, no WebView.* The app builds its + screen from `pf.Ui` builders — columns/rows/cards, lists, scroll views with + virtualised windows (the contacts example scrolls 10,000 contacts drawing + only what's on screen), text, buttons, links, text fields, checkboxes, + switches, sliders, a system file picker. Tapping "+" in the counter updates + exactly one text view — the roc-signals engine (§1.3) doing fine-grained + updates against native views instead of the DOM. +- **Effect surface (README "Limits", i.e. the honest list):** timers and + intervals; **HTTP** via `Engine.http` (HTTPS only in practice — plain + `http://` is blocked by Android's default network policy; no cookie store + or HTTP cache); **local storage** persisted across restarts and **session + storage** for the process lifetime; **device facts** — online status, + visibility, languages, time zone, `prefers-color-scheme` / + `prefers-reduced-motion` media queries; **files** — choose via the system + chooser, read, digest (SHA-256), save, upload, download; and **ports**. + Workers are *not* supported: an app that asks for one stops with + "unsupported effect kind". No gestures (drag/long-press/swipe) yet. +- **Ports — the extensibility mechanism, and the seed of a permission + model:** an app reaches the rest of Android (sensors, notifications, + camera) through **typed messages to services written in Kotlin**. The + app's activity supplies services by overriding + `RocActivity.portServices` (see `DevicePorts.kt`); the shipped `ports` + example calls device info, Toast, battery level, and the accelerometer + this way. Crucial limit: an app packaged by `android.roc` **cannot add + Kotlin services yet** — ports currently work only in the repo's own Gradle + build. The mechanism exists; the packaging path for third-party services + does not. +- **Capability gating today:** two layers exist, neither is a per-app + permission system. (1) *Android's own*: the generated manifest and Android's + runtime permissions bound what the shell process may do at all — but every + Roc app inside the shell shares that one grant set. (2) *The engine's + effect list*: the host supports a fixed set of effect kinds and refuses + others ("unsupported effect kind") — a coarse, platform-wide gate, not a + per-app one. There is no manifest of *Roc-level* capabilities, no way to + give app A the accelerometer port but not the file port. §2.4 designs it. +- **Maturity:** brand-new PoC. Its value to us is the *shape*: signals engine + + real widgets + typed ports to host services is precisely the shape an id + Android platform wants; almost everything about it would need hardening. + +## 1.5 Joy — full-stack Elm-architecture web framework (Åhdén) + +- **Repo / author / licence:** niclas-ahden/joy, Niclas Åhdén. **Apache-2.0** + **[CORRECTION: the ecosystem report's MIT attribution was wrong; repo and + `gh` metadata both say Apache-2.0.]** Created 2024-12-10; 256 commits; 5 + releases; current **Joy 0.35.0 + joy-html 0.18.0**. +- **Host language:** Rust (with a `wasm32-unknown-unknown` client build and a + small JS runtime — the compressed bundle is ~27.5 KB total, of which the + wasm is ~22 KB and the minified JS runtime ~5 KB). +- **What it does:** *isomorphic* full-stack apps in one language. The app + exports `Model, Msg, init, update, view, subscriptions` — the Elm + architecture, on both sides. The same `view` renders to HTML **on the + server** (via joy-html) and hydrates/runs **on the client**; effects are + values (`pf.Effect`) returned alongside the model; the roadmap goal is + convenient front↔back communication in the style of Leptos Server Functions + / message-passing over SSE, websockets, or plain requests. Its surrounding + suite is production-shaped: **roc-pg** (PostgreSQL with compile-time-checked + SQL), roc-openapi, roc-vcr, roc-spec, roc-playwright, roc-sendgrid. +- **Performance evidence:** js-framework-benchmark keyed/non-keyed CPU + geomean 29.6/26.7 ms — in Elm/Leptos/Solid territory, well ahead of React + (40.7) in the author's local run; memory 3.6 MB. +- **Capability gating:** none as a permission system — a Joy app's reach is + whatever its server host process can do (database, network, mail). The + Elm-architecture discipline does give one audit property: every effect is + an explicit `Effect(Msg)` value produced by `update`, so the *set* of + effect kinds an app can emit is enumerable from its types. Nobody has + built the host-side gate that observation makes possible. +- **Maturity — the paradox to state plainly:** README says "early + development, not production-ready… expect breaking changes," *and* its + author has run it in production for ~2 years across real client web apps + (Func Prog Sweden, 2026-11-10: "Roc and Joy: Productivity in Production"). + Both are true: it is battle-tested by exactly one expert operator, who is + also its maintainer. Bus factor 1. + +## 1.6 roc-cloudflare-workers — Roc on Cloudflare Workers, typed bindings + +- **Repo / author / licence:** Karakatiza666/roc-cloudflare-workers, single + author, UPL-1.0. Created **2026-10-26**; 216 commits; **10 releases in under + a month**, current 0.0.10 (pinned nightly-2026-11-06). Zero stars; solo. +- **Host shape:** the app compiles to a **wasm32 reactor**; the host is in + **Zig**; a **JS shim** (`makeHandler`, generated `worker.js`) runs it inside + workerd. Effects are *direct-style* hosted functions that await JS promises + through **JSPI** (JavaScript Promise Integration) — the new compiler's + direct effects (§1.8) doing real work, no Task layer. +- **What it allows — a typed module per Workers API:** the app imports + `pf.Worker`, `pf.Request`, `pf.Response`, and one module per binding: + **D1** (SQL, sessions/bookmarks), **R2** (objects, multipart), **KV** + (with metadata), **Cache API**, **Durable Object SQL** storage (SQLite- + backed classes, RPC interfaces between objects and across Workers via + service bindings), **Queues**, **Workers AI**, Vectorize, Email, Tcp, + Hyperdrive config, rate-limit bindings, cron triggers, tail events. + The app is a single `event!` entrypoint dispatching through + `Worker.new({ fetch!, scheduled!, queue!, … , objects: […], bindings: […], + crons: […] })`; a handler kind with no handler is `Unhandled`. +- **The binding discipline — the second key precedent in this report.** + A binding is named in Roc: `D1.binding("DB")`, `Kv`/`R2` likewise, + `Object.namespace("ROOMS", { class: room })`. The app *declares* the + bindings it uses in `Worker.new({ bindings: [db.declare(), …] })`, which + lands in the **wasm manifest**. Two independent checkers consume that + declaration: the shim verifies **at the first event** that `env` actually + contains each declared binding *with the right kind*, and the companion CLI + (`roc-cfw sync`) statically checks the Wrangler config against the manifest + and prints the exact config fragments to add. Cross-Worker RPC interfaces + are checked the same way (`Rpc.iface("Ledger")` name-matching). + In other words: **declare-in-code → manifest-in-artifact → verify-at-load → + verify-in-config**, all typed. That is a capability manifest system, built + by one person in a month, in Roc, today. +- **Metering hooks already present:** the test helper can *count calls per + binding* (`count: ["DB"]`; a D1 call = one round trip — `all/run/first/ + raw/batch/exec`; KV `get/getWithMetadata/put/delete/list`; R2 likewise), + the shim has a `wrapEnv` interception point (its counting is built on it), + and `makeHandler(module, { stats: true })` emits an `x-roc-stats` header + with allocator/request numbers. None of this is a quota system — but the + interception point a quota system needs (`wrapEnv`: every binding access + passes through one shim function) already exists and is already used for + counting in tests. +- **Known gaps (author's own list):** no Roc-authored Workflows or + HTMLRewriter (they need JS→Roc calls), no explicit Durable Object + transactions, KV-backed DO classes refused, Images/Browser Rendering/mTLS + unmodule'd (reachable only via a raw `Js` escape program — note: an + *escape hatch exists*, which any gating design must reckon with), several + surfaces tested only against Miniflare/workerd locally, not the edge. +- **Capability gating today:** Cloudflare's own model — a binding exists in + `env` or it doesn't; the platform adds declaration + verification, not + restriction. Per-app subsetting *within* a Worker isn't a concept (one + Worker = one app). But composed with one-Worker-per-app deployment, the + binding set **is** the app's capability set, enforced by the operator who + writes the Wrangler config. That is Drew's model, already operational in + miniature (§2.3). + +## 1.7 The officials, briefly — basic-cli and basic-webserver + +- **basic-cli** (roc-lang, Rust host, **0.28.1**, nightly-2026-11-13+): the + default general-purpose platform. Surface: Stdout/Stdin (streaming), + File/Path (typed writer API, file permissions, symlinks), Dir, Cmd, Http, + Tcp, UnixSocket, **Sqlite**, Tty raw mode, Signal (INT/TERM/USR1/USR2/ + WINCH), Env, Locale, Utc/time. Gating: none — a basic-cli app has the + whole surface; the process's OS permissions are the only boundary. + Significance for us: it is the *reference catalogue* of what a mature Roc + platform module list looks like, and the module set our server platform + would start from. +- **basic-webserver** (roc-lang, Rust host on hyper + tokio, **0.22.0**, + nightly-2026-11-15; 0.17→0.22 in ~six weeks): HTTP request/response plus + **typed server-sent events**, pooled Sqlite, pooled outbound HTTP, + bounded request bodies, forms/static files, server lifecycle. Two design + choices worth stealing: (1) **finite defaults as a runtime contract** — + admitted SSE responses (256), framed SSE event size (1 MiB), body bounds, + with deliberate overload behaviour instead of unbounded queues; (2) a + **host-owned observation point** — opt-in access logging/metrics configured + in `init!`, where the host observes each request through exactly one + terminal event (response end / failure / drop), covering Roc responses, + native files, overload and disconnect uniformly. That terminal-event + discipline is precisely the accounting point a metering host needs. + Gating: none per-app; the listener defaults to `127.0.0.1:8000` and durable + state is pushed to SQLite/external services by design. + +## 1.8 The two cross-cutting mechanisms + +**Multi-entrypoint hosts (Boswell, 2025-08-30).** GUI/game/Android hosts need +several entrypoint symbols (`init!`, `update!`, `render!`); Roc's prebuilt +interpreter shim exposed only one generic `roc_entrypoint`. Boswell's fix: +at runtime the CLI generates a tiny LLVM-bitcode adapter (via Zig's +`std.zig.llvm.Builder`) defining each host symbol and forwarding to the shim +with an `entry_idx`. No host ABI change; fast interpreted dev loops for +multi-entrypoint platforms. This post is the enabling infrastructure under +the entire autumn-2026 platform burst — and, for us, the proof that a host +can present *many* narrow entrypoints (per-capability surfaces) without +compiler surgery. + +**Direct effects in the new compiler.** The old design returned `Task` +values the platform interpreted. The new compiler kept the `!` sigil and +replaced the semantics: effectful functions are called **directly** +(`=>` in types), the platform's hosted functions *are* the effects. The +Cloudflare platform's JSPI-awaited hosted functions and basic-webserver's +model both run on this. Consequences for gating are §2.2's subject: direct +effects remove the "effects as inspectable data" property Task had — except +where an engine (roc-signals) deliberately reintroduces it above the +platform layer. + +### Gating summary (Part 1's bottom line) + +| Platform | Per-app subsetting today? | Mechanism present | +|---|---|---| +| RocRay | **Partial — the real thing, app-authored** | Source-level declarations, host-enforced, handle-scoped files | +| Cloudflare Workers | **Operator-side, by deployment** | Typed binding declarations → manifest → load-time + config verification; `wrapEnv` interception; per-binding call counting in tests | +| Android | Coarse only | Android OS permissions (per-shell, not per-app); fixed host effect-kind list | +| roc-gui | No | All-or-nothing surface; (observatory proves telemetry is buildable) | +| roc-signals | No (by design — it's an engine) | Effects-as-data *enables* a host gate | +| Joy | No | Effect values enumerable by type; no host gate built | +| basic-cli / basic-webserver | No | OS process boundary; finite-limit contracts; host observation points | + +Nobody ships "operator grants a subset to a third-party app." Two platforms +ship the two halves of it: RocRay ships *declaration + host refusal*; +Cloudflare ships *declaration → manifest → operator-side verification + +interception*. Our design is those two halves joined, with the grant held by +the operator instead of written by the app author. + +--- + +# Part 2 — The design: an id platform family + +## 2.1 The composition problem, and why it doesn't kill the vision + +Roc's rule is absolute and now written into the FAQ as a permanent refusal: +**an app binds to exactly one platform; platforms do not compose.** Drew's +vision — mix-and-match capability functions, chosen per deployment — appears +to ask for the forbidden thing. It survives by relocating the composition: + +- **Composition happens at platform-construction time, in our layer, not at + app-binding time.** We ship *one id platform per target class* — + `id-server`, `id-android`, `id-desktop` (and later `id-edge` on the + Cloudflare shape) — each a single ordinary Roc platform. Inside each + platform, the host is assembled from a **shared capability catalogue**: + a versioned list of capability modules (`cap.files`, `cap.http.client`, + `cap.http.server`, `cap.sql.d1`, `cap.objects.r2`, `cap.kv`, + `cap.queue`, `cap.ui.widgets`, `cap.render2d`, `cap.sensors`, …), each + with a typed Roc API surface, a host implementation, a declaration syntax, + and a metering schema. Two deployments of `id-server` can enable + *different catalogue subsets* — the platform binary is built (or + configured) per deployment profile, the way the Cloudflare shim is + generated per app manifest. +- **The app declares; the operator grants; the host enforces.** The app + states the subset it uses (RocRay-style declarations, generalised). The + operator's deployment config states the subset it *grants* — and the + grant, not the declaration, is authoritative: an app that declares + `cap.sensors.camera` on a deployment that grants only + `[cap.kv, cap.sql.d1]` fails at load with the ungranted names listed, + exactly as `roc-cfw sync` fails a Wrangler config that doesn't match the + manifest. Declaration-without-grant is a build/deploy error, never a + runtime surprise. +- **What is portable across targets is the catalogue, not the binary.** The + same capability *name, Roc API, declaration and metering schema* appear in + `id-server` (backed by real D1), in `id-android` (backed by local SQLite / + on-device storage), and in a test platform (backed by in-memory fakes — + the Cloudflare test helper's seeded-Miniflare pattern). An id app's pure + logic and capability calls stay identical; only the platform line in its + header changes. This is platform-switching, which Roc has always + supported, used as the composition seam. + +**Where direct effects help and hinder.** *Help:* hosted functions are just +functions — a host can implement a capability function as a **checking +wrapper** (grant check → meter → delegate) with no interpreter to build, +and JSPI/native async composes normally; per-call overhead is one branch +and one counter. *Hinder:* with Task gone, effects are no longer data the +host can inspect *before* performing them; you cannot statically enumerate +"what will this app do?" from a Task chain, because there is no chain. +Mitigations, in order of strength: (1) **the declaration is the static +statement** — the compiler already guarantees the app can only *name* +capability functions its platform exposes, so a platform built from a +granted subset makes ungranted capabilities **unnameable**, which is +stronger than any runtime check; (2) where effects-as-data is wanted +(UI surfaces), keep the roc-signals pattern — decisions return writes, +the host applies them — recovering inspectability exactly where the +attack/abuse surface justifies it; (3) runtime wrapper checks as +defence-in-depth for capabilities granted but *scoped* (this directory, +that origin, this byte budget), where the scope can't be expressed by +omission. + +The honest summary: **omission is the gate, wrappers are the fence, +declarations are the audit.** Roc's one-platform rule forces the gate to +be omission — which happens to be the strongest form. + +## 2.2 The capability catalogue (the artefact we would actually maintain) + +Each catalogue entry is a contract with five parts: + +1. **Name + version** (`cap.sql.d1@1`) — appears in app declarations, + operator grants, manifests, and metering records under one string. +2. **Roc API surface** — the module the app imports (`Id.D1` with + `binding`, `rows!`, `run!`, …), modelled on the Cloudflare platform's + typed modules, including its error tags (`BadParam`, …) so failures are + values, not crashes. +3. **Declaration + grant syntax** — RocRay-shaped: app-side + `.with_permission(...)`-equivalents generalised to scopes + (`Directory("data", ReadWrite)`, `HttpOrigin("https://…")`, + `D1Binding("DB", [Read])`); operator-side grant files per deployment. +4. **Host implementation(s)** — one per target class, in whatever language + fits the host (Zig for edge/Android bridge, Rust for server/desktop, + Kotlin for Android services, JS for the Workers shim). The contract is + the Roc API + the metering schema; the language is an implementation + detail (§2.5). +5. **Metering schema** — the countable events and their units (§2.3): + for storage caps: bytes-read, bytes-written, rows-read, rows-written, + objects, keys; for network: requests, bytes in/out, origins; for + compute-ish caps: calls, wall time. Defined *in the catalogue*, so + every host implementation meters identically and bills/limits are + comparable across targets. + +Existing platforms map onto the catalogue as prior art, per capability: +files/directories from RocRay (handle-scoped) and basic-cli (typed writer +API); HTTP server + SSE + finite limits from basic-webserver; D1/R2/KV/ +Queues/Durable Objects from roc-cloudflare-workers; widgets from roc-gui +and roc-native-android's `Ui`; 2D rendering from RocRay; reactive state +from roc-signals; ports from roc-native-android. We would be *cataloguing +and re-hosting* proven surfaces, not inventing APIs from a blank page. + +## 2.3 The provisioning/metering wrapper (Drew's D1/R2/KV sketch, designed) + +**The sketch:** system-level apps wrap the capabilities so that *every app +gets one D1 database, one R2 bucket/prefix, one KV namespace*; apps import +the same libraries; *we* limit the bytes each app may read and write. + +**Where things live.** Three distinct roles, and the design's first rule is +not to blur them: + +- **The provisioner** (a system app / operator tool, *not* in the app's + process): on app registration, creates-or-assigns the app's D1 database, + its R2 bucket (or a dedicated prefix in a shared bucket — bucket-per-app + is cleaner for lifecycle and deletion; prefix-per-app is cheaper at + thousands of apps; the catalogue contract should hide which), and its KV + namespace. It writes the app's **grant record**: app id, capability set, + binding names → real resource ids, and **budgets** (below). This is the + Wrangler-config role, generalised: the Cloudflare platform proves the + declare→manifest→verify loop; the provisioner adds *create* to the front + of it and *budgets* to the record. +- **The host shim** (in the serving process, *outside* the app's reach): + every capability call passes through the host's hosted functions — there + is nowhere else for it to pass; that is what a Roc platform *is*. The + shim resolves the app's binding names to its provisioned resources + (the app literally cannot name another app's database: its `D1.binding + ("DB")` resolves through the provisioner's map, and the underlying + resource id never appears in app code), checks the grant, **meters**, + and delegates. The Cloudflare platform's `wrapEnv` is this interception + point in embryo; its test helper's per-binding call counting is the + metering loop in embryo. +- **The app**: imports `Id.D1`, `Id.R2`, `Id.Kv` and writes ordinary code. + It holds no credentials, no resource ids, no quota logic. + +**Metering.** Count in the shim, at the same granularity the Cloudflare +test helper already counts (per binding, per operation kind), extended +with the byte dimensions Drew named: + +- **D1:** rows read / rows written (D1's own billing dimensions) **plus** + bytes: request SQL + parameters in, result rows out (serialised size). + Byte-accurate result sizes are available at the shim because every row + crosses it (the platform's CBOR layer already measures what it encodes). +- **R2:** bytes read (GET/HEAD responses), bytes written (PUT/multipart + parts), object count, storage byte-days if we want a holding cost. +- **KV:** reads, writes, deletes, lists; bytes in values in/out. +- Counters live in a **metering store the app cannot write** — in our + estate's terms, a row per (app, capability, window) in the operator's + own D1/Turso plane, flushed by the host, never by the app. Windows: + per-minute (burst), per-day and per-month (budget), aligned with the + Turso→D1 audit's D1 plane: the wrapper's natural home is the same D1 + estate G1–G3 migrate the PM/dashboard plane into, and its counters are + exactly the kind of telemetry-mirror workload that audit classified + MOVE-CLEAN. Per-scope metering walls already exist in our route layer + (the `openai-payg-free` wall, #13839); this is the same pattern at the + app-platform layer: **count locally, wall at the scope, reset on the + window.** + +**Enforcement: deny, don't throttle — with one exception.** When a budget +is exhausted the shim returns the capability's ordinary error tag +(`Err(QuotaExceeded)` in the module's error union) rather than slowing +down: (1) errors-as-values is Roc's idiom and the app's `Try` handling +already has a path for it; (2) a throttled storage layer creates +partial-write states that are far harder to reason about than a clean +refusal; (3) denial is *auditable* — the refusal is itself a metered +event. The exception is **burst shaping on shared-fate resources** +(inbound request admission, SSE connections, outbound HTTP): there, +basic-webserver's finite-defaults contract is the model — bounded queues, +deliberate overload behaviour — because the resource being protected is +the host, not the app's budget. Budgets get **soft/hard pairs**: a soft +line that emits an operator event (and, in the fleet's idiom, a PM-stack +notification) and a hard line that denies. First offence shape: warn at +80%, deny at 100%, reset at window close; all three numbers are grant- +record fields, not code. + +**What the Cloudflare platform proves is already buildable in Roc today:** +typed per-API modules over D1/R2/KV with Roc-idiomatic errors; a binding +declaration that compiles into a wasm **manifest**; load-time verification +of that manifest against the live environment; config verification as a +CLI; per-binding call counting; an env-interception point in the shim; +and apps that run against seeded local fakes (Miniflare) with the *same* +manifest. Missing from it, and ours to build: provisioning (it assumes +Wrangler/an operator made the resources), byte-level metering (it counts +calls), budget enforcement, and multi-app tenancy (it is one-app-per- +Worker by construction). None of the missing four requires a Roc language +change; all four live in the shim/provisioner layer. **That is the +buildable-today core of Drew's sketch.** + +**Mapping onto our estate:** id apps are the tenants; the fleet's broker/ +PM plane is the operator; D1 is the provisioned store (with Turso staying +the broker-core/embedding store per the audit's STAY-TURSO verdict — an +app that needs vector search gets a `cap.vector.turso` catalogue entry +rather than a D1 pretence). Grant records are natural broker-side state; +the deny-path error is a natural fit for the id crate's existing +capability/ceiling vocabulary (Meadowcap-style attenuation: a grant *is* +an attenuated capability set, and sub-grants to sub-tasks are attenuation +with smaller budgets — the P2P synthesis's composition A/C language +applies verbatim at this layer). + +## 2.4 The Android permission model + +**Starting point (§1.4):** roc-native-android gives us real widgets, the +signals engine, a fixed effect-kind list, system-mediated file picking, +and **ports** to Kotlin services — inside one Kotlin shell whose Android +manifest permissions every hosted Roc app currently shares. + +**The model we would layer in, in four strata:** + +1. **Android's own permissions (unchanged, outermost).** The shell's + manifest declares the union of permissions any hosted app *could* be + granted (INTERNET, sensors, notifications, …), and Android's runtime + permission flow remains the user's OS-level consent. Nothing we build + replaces this; we build *inside* it. +2. **The id-app manifest (ours, per app).** Each id app ships a Roc-level + capability declaration — the same catalogue names as everywhere else: + `cap.fs.appdata`, `cap.fs.picker`, `cap.http`, `cap.net.info`, + `cap.sensors.accelerometer`, `cap.sensors.battery`, `cap.notify.toast`, + `cap.ui.widgets`, `cap.render2d`, `cap.storage.local`, `cap.clock`, … + The declaration is compiled into the app artifact (the Cloudflare + manifest pattern) and is *also* rendered for humans: an install screen + that says, in plain words, what this app may do — RocRay's "what your + app can access" chapter, turned into an install-time document. +3. **The operator/user grant (authoritative).** The device-side host + holds the grant: declaration ∩ policy. Policy sources, in precedence + order: the fleet's device management (for our own devices), the + installing user's toggles (per-capability, revocable at runtime — + Android's settings idiom), and the app's declaration as the ceiling + (a grant can never exceed a declaration; an app cannot talk its way + into a capability it didn't declare, because — §2.1 — in a platform + built from the granted subset the ungranted capability is + *unnameable* in its API surface). +4. **Host enforcement (innermost, mechanical).** Three enforcement + points, all host-side: (a) **ports are registered per grant** — the + Kotlin shell only registers a `portServices` entry for a granted + capability, so an ungranted sensor port *does not exist* for that + app (today's `RocActivity.portServices` override becomes a + grant-driven registry); (b) **effect kinds are checked per app** — + today's platform-wide "unsupported effect kind" refusal becomes + "ungranted effect kind" for this app, same code path, finer key; + (c) **filesystem scope is handle-based** — app-data directory by + default; anything wider only via the system picker (user's act = + grant for that file, RocRay's rule) or a declared+granted directory + handle; raw paths never cross the API. + **Rendering as a grant** falls out naturally: `cap.ui.widgets` (the + `Ui` builders) and `cap.render2d` (a RocRay-style canvas surface) are + different catalogue entries with different host entrypoints; a + background/sensor app holds neither and *cannot draw*; a game holds + `render2d` but not, say, `fs` beyond its app-data handle. Because the + signals engine updates views through the host, even a granted UI + capability is mediated — the host sees every view mutation the app + requests. + +**What roc-native-android would need to grow to carry this:** (i) the +packaging path for third-party Kotlin port services (today ports work +only in the repo's Gradle build — the single biggest gap); (ii) a +per-app (not per-shell) service registry and effect-kind table; +(iii) a manifest step in `android.roc` that embeds the capability +declaration into the APK and generates the human-readable grant screen; +(iv) multi-app hosting or a disciplined one-shell-per-app packaging so +grants can't bleed across apps sharing a process; (v) gestures and the +remaining widget surface, for product completeness rather than for the +permission model. Items (i)–(iv) are host/tooling work in Kotlin/Zig/Roc +CLI code — none needs upstream Roc changes, but all of it is *ours to +own* if we build on a 20-commit PoC (§2.5). + +## 2.5 Honest limits + +- **Pre-1.0 churn is the tax on everything.** Roc is at 0.1.0-RC1 + (2026-11-21, Zulip-announced, zero blockers); every platform pins a + *nightly*, APIs are explicitly unstable, and the Cloudflare platform + shipped breaking changes in most of its ten releases. A platform family + built now must budget a standing "nightly bump" chore per platform — + small per bump (the ecosystem does it fortnightly), fatal if ignored + for a quarter. +- **The ecosystem is ~5 people.** Boswell alone is basic-cli, RocRay, + roc-gui, roc-native-android, roc-signals' current driver, roc-parser + and the awesome list. Åhdén is Joy + roc-pg + the production suite. + Karakatiza666 is the Cloudflare platform + most data-format packages. + Feldman is the compiler. Consuming any of these is a dependency on a + person; the project's own $4k/month fundraising goal is the tell. +- **Fork vs consume, priced honestly:** + - *Consume* (pin a release URL, track upstream): cheapest now; you + inherit their roadmap and their breaking changes; viable for + RocRay-shaped and Cloudflare-shaped surfaces where our changes are + additive (catalogue wrappers *around* their modules). + - *Fork* (copy the platform, own it): you own the nightly-bump chore, + the host bugs, and the divergence — forever. Justified only where + the platform *is* our product surface: the id-server and id-android + hosts, where grant enforcement and metering must be in code we + control. Even there, fork the *shape* and track upstream's API + evolution socially (Zulip) rather than merging code. + - *Re-host* (our host, their API): the middle path the catalogue + enables — keep the Roc API surface compatible with upstream's so + apps and examples port, implement the host ourselves where + enforcement must live. This is the recommended default for the + storage caps, and it is what "platform-as-capability-contract" + means in practice. +- **The multi-language point (Drew's "may write in different + languages"):** nothing in the design requires our hosts to be Roc or + to share a language with each other. The portable artefact is the + **contract**: catalogue name, Roc API module, declaration/grant + syntax, manifest format, metering schema. Hosts already demonstrate + the spread — Zig (RocRay, Cloudflare, Android bridge), Rust + (basic-cli, basic-webserver, roc-gui, Joy), Kotlin (Android shell), + JS (Workers shim, signals runtime). Roc's platform ABI is a C-shaped + boundary; a host in Go or Odin (Rocco's engine is Odin) is ordinary. + What must *not* fork is the contract: two hosts implementing + `cap.sql.d1@1` with different error tags or different metering units + would silently break the family's one promise — same app code, same + limits, any target. +- **What this does not give us:** a sandbox against malicious *native* + code (Roc apps are compiled code in the host process; the capability + model governs what the platform *offers*, and Roc's purity makes the + offer meaningful — an app cannot syscall around its platform in pure + Roc — but a compromised compiler/host is out of scope, as it is for + RocRay's own stated threat model); upstream platform composition + (never coming, by policy); and a stable 1.0 to build on (RC1 is + close, not landed). + +## 2.6 The build order this implies (smallest first proof) + +1. **Catalogue v0** — names + Roc APIs + metering schemas for the + storage trio (`cap.sql.d1`, `cap.objects.r2`, `cap.kv`) and + `cap.http.server`, lifted from the Cloudflare modules and + basic-webserver's limits contract. +2. **A shim prototype on the Cloudflare shape** — one app, provisioner- + created D1/R2/KV, `wrapEnv`-style interception, call+byte counters + into an operator D1, hard-deny at a tiny budget, proven by the + platform's own test-helper pattern (seeded fakes, counted calls). +3. **Declaration→grant verification** — RocRay's declaration syntax + + `roc-cfw sync`'s manifest checking, with the operator grant file as + the authority. +4. **Android strata 2–4** on top of roc-native-android's ports, in the + repo-build form first (where ports work today). +5. Only then: desktop (`roc-gui` surface) and `render2d` as grantable + caps, and the second target class that proves the catalogue is + actually portable. + +--- + +*Sources: repo pages and READMEs for roc-ray, roc-gui, roc-signals, +roc-native-android, joy, roc-cloudflare-workers, basic-cli, +basic-webserver (read 2026-11-23); RocRay manual v0.12.3, esp. +"Permissions: what your app can access", "Files, assets, and databases", +"Coming from raylib"; roc-cloudflare-workers README/MODULES summaries +incl. binding manifest, `sync` verification, test-helper counting and +`wrapEnv`; roc-signals README incl. its Joy comparison; roc-native-android +README incl. Limits and Port sections; Boswell, "Roc Platforms: +Supporting multi-entrypoint hosts" (2025-08-30); roc-lang.org FAQ +(platform composition refusal). Version/star/commit figures as of +2026-11-23 and will drift.* diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/2026-11-23T22-00-25Z_research_roc-ecosystem.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/2026-11-23T22-00-25Z_research_roc-ecosystem.md new file mode 100644 index 000000000..ee6eb2eb9 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/2026-11-23T22-00-25Z_research_roc-ecosystem.md @@ -0,0 +1,81 @@ +# Roc ecosystem — research record (2026-11-23) + +A snapshot of the Roc programming language ecosystem as of 2026-11-23: the new +(Zig) compiler and its first release candidate, the platform layer, the package +ecosystem, real projects and production use, what the community has been +deciding and shipping, and the talks/releases/showcases worth watching. + +Compiled from primary sources read 2026-11-23: [roc-lang.org](https://www.roc-lang.org), +Richard Feldman's posts on [rtfeldman.com](https://rtfeldman.com), GitHub repos +and release pages, the community awesome list +([lukewilliamboswell/roc-awesome](https://github.com/lukewilliamboswell/roc-awesome)), +and a 30-day read of the Roc Zulip (2026-10-24 → 2026-11-23, 2,355 messages +across all 19 public streams) summarised in our own words. + +## The headline facts + +- **Roc 0.1.0-RC1 shipped on 2026-11-21** — the first release candidate in + Roc's history, built from the new Zig compiler. As of 2026-11-23 no blocker + bugs had been reported, and Feldman has said RC1 may be promoted directly to + 0.1.0 (an RC2 remains his base expectation). See + [the new compiler](the-new-compiler.md). +- The compiler rewrite from Rust to Zig took 487 days, reached **feature + parity in July 2026**, and the new compiler is now simply "the compiler": + both official platforms, the Exercism track, and essentially every active + community project target it, pinned to dated nightlies. +- The platform layer is small but genuinely active: two official platforms + ([basic-cli](https://github.com/roc-lang/basic-cli), + [basic-webserver](https://github.com/roc-lang/basic-webserver)) shipping + frequent releases, plus an autumn-2026 burst of community platforms — a + Cloudflare Workers platform, a native Android platform created 2026-11-22, a + GPUI desktop GUI, a raylib games platform, and a 3D engine. See + [platforms](platforms.md). +- There is real production use, but it is concentrated: principally one + consultant (Niclas Åhdén) running Roc + his Joy framework in production for + ~2 years, a pure-Roc deflate implementation in paid production within ~9% of + libdeflate's speed, and one very large body of new-compiler application code + by Steve Howell. See [real projects](real-projects-and-production-use.md). +- The language changed in the rewrite: effectful functions are suffixed `!`, + `Result` became `Try`, methods landed, and new builtins (`Iter`/`Stream`) + exist. Old-compiler code does not carry over unchanged. +- Two community decisions worth knowing: **linear types were decided against** + (FBIP is Roc's answer), and a live, unresolved conversation about + LLM-generated code and community culture is under way with **no policy + adopted yet**. See [community and Zulip digest](community-and-zulip-digest.md). + +## Pages + +- [Overview and state of Roc](overview-and-state-of-roc.md) — what Roc is, + where the project stands, who carries it, and the honest caveats. +- [The new compiler](the-new-compiler.md) — the Rust-to-Zig rewrite, feature + parity, language changes, what's still missing, and the RC1 → 0.1.0 + promotion question. +- [Platforms](platforms.md) — official and community platforms, with maturity + labels, plus the legacy-compiler platforms to treat as superseded. +- [Libraries and packages](libraries-and-packages.md) — the new-compiler + package canon: parsing, data formats, databases, the two big author suites, + tooling, and the superseded list. +- [Real projects and production use](real-projects-and-production-use.md) — + production, substantial hobby, and demo projects with honest scale labels. +- [Community and Zulip digest](community-and-zulip-digest.md) — the last 30 + days of developments and decisions: RC1 reaction, the linear-types + decision, the LLM-code conversation stated neutrally, the documentation + push, and tooling/distribution progress. +- [Talks, releases and showcases](talks-releases-showcases.md) — videos and + talks to watch first, written announcements, and the demos people are + showing off. + +## Maturity labels used in these pages + +- **Official–active** — maintained by the roc-lang org, tracking current nightlies. +- **Community–active** — third-party, releasing against the new compiler in recent weeks. +- **Experimental / PoC** — real and runnable, but self-described as early or proof-of-concept. +- **Legacy / superseded** — built for the old Rust compiler; treat as abandoned unless re-verified. + +## Source quality note + +Aggregator/overview articles about Roc are unreliable (stale version numbers +were found and discarded during this research). Every version number in these +pages comes from the project's own release page or README as read on +2026-11-23, and Zulip material is summarised in our own words with links to +the topics rather than quoted at length. diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/community-and-zulip-digest.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/community-and-zulip-digest.md new file mode 100644 index 000000000..f2fb59012 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/community-and-zulip-digest.md @@ -0,0 +1,181 @@ +# Community and Zulip digest — 2026-10-24 → 2026-11-23 + +The Roc Zulip ([roc.zulipchat.com](https://roc.zulipchat.com)) is the +project's centre of gravity. This page summarises 30 days of it — 2,355 +messages across all 19 public streams — in our own words: developments, +decisions, and the conversations that matter, with links into the topics. +Routine Q&A (most of #beginners) is not covered. The public export is also +browsable at [roc-lang.github.io/zulip-export](https://roc-lang.github.io/zulip-export). + +Most active voices in the window: notramo (523 messages), Steve Howell +(438), Richard Feldman (270), Luke Boswell (235), Krzysztof Skowronek (157), +Anton (115). The Roc Online Meetup for November was held Nov 22 (the October +meetup was Oct 24); meetup discussion fed the `--opt=speed` priority decision +recorded on [the new compiler](the-new-compiler.md) page. + +## Roc 0.1.0-RC1 — reaction and status + +Feldman's announcement (47 messages, 71 reactions — the most-reacted topic of +the month): +[Release candidate: Roc 0.1.0-RC1](https://roc.zulipchat.com/#narrow/channel/397893-announcements/topic/Release%20candidate%3A%20Roc%200.1.0-RC1/near/642546747). + +- RC1 shipped 2026-11-21; the rules, bugfix bar, benchmarks, and the open + promotion question are laid out on [the new compiler](the-new-compiler.md) + page. +- Community reports were uniformly smooth: packages and platforms updated + without issue (Niclas Åhdén; kaza's roxum; pixelsprout's Rocco engine; + Bryce Miller's Tigerbeetle client and roc-pg). Roux builds except + [roc#13382](https://github.com/roc-lang/roc/issues/13382), which Zak Kohler + worked around. +- Two non-blockers noted: a basic-cli `Cmd.exec!` process-replacement quirk + when running via `roc ` (issue to be filed), and an investigated + cold-`roc check` slowdown on one small example (0.05 s CPU on the + 2026-11-03 nightly vs 1.00 s on RC1 on a noisy machine; the write-up hedges + heavily on measurement noise). +- The "How close can pure FP get to C?" blog post did the rounds the same + month: #8 on Hacker News, #4 on Lobsters, #2 on r/programming at peak. + +## Language-design decisions + +### Linear types — decided against (Nov 22–23) + +Steve Howell asked for linear types to enforce resource cleanup (auto-close) +in his roc-chat server (#ideas, 48 messages). Feldman's answer, in detail: +verifying compile-time uniqueness requires either a very restrictive memory +model (e.g. Goose) or roughly the same type-system complexity and annotation +verbosity as Rust — in his phrase, the cure is worse than the disease. Roc's +answer remains **FBIP** (Functional But In-Place), which Feldman notes came +from Koka via Folkert's thesis adviser. Expect this request to keep +recurring; the reasoning is now on record. + +### Reflection / reification — the biggest design conversation of the month + +Two large #ideas threads — "SurrealDB query builder based on reifying" (270 +messages) and "Reflection — typed function bodies as Roc values (reifying)" +(194 messages). Karakatiza maintains a compiler fork with working +reification — +[github.com/Karakatiza666/roc/tree/reify](https://github.com/Karakatiza666/roc/tree/reify) +— with design docs and examples, used to build type-safe query builders. +This is experimental-fork work, not a mainline commitment, but it's where the +typed-reflection design is being hashed out. Related threads: "Type +reflection — Zig `@typeInfo()` equivalent" and a CBOR-serialization design +thread (39 messages). + +### Compiler API — wanted, not planned + +Jack Scully's Convex-style platform needs an app's exported endpoints with +resolved types; today that means hand-rolled parsers or `--introspect` hacks +(#platform development, "Compiler API?", Nov 22). Luke Boswell pointed to an +old tooling gist. Feldman's caution, generalised from the linear-types +thread: exposing IR/APIs makes them unchangeable (his example: a main reason +Atom got surpassed by VS Code), so the project intends to be very careful +about what APIs to expose. + +### Smaller design threads + +- "Reworking Rust Glue" (19 messages — Karl's RustGlue.roc may replace the + repo's glue scripts as the recommended starting point). +- "Requiring more type annotations?" (18 messages). +- "In file evaluation/repl" (17 messages — Kilian Vounckx, returning after a + long absence, proposed REPL-style in-file evaluation; nothing decided). +- A regression was found and filed: unwrapping an `Ok` in `main!` stopped + compiling (works at top level) — Niclas Åhdén filed + [roc#13281](https://github.com/roc-lang/roc/issues/13281) at Feldman's + request (Nov 20). + +## The LLM-generated code conversation — stated neutrally + +The month's most emotionally charged conversation, recorded here because it +may produce policy: + +- **"Goodbye"** (#off topic, 52 messages, 65 reactions, Nov 19–21): Hannes — + an early, multi-year contributor who built the roc-packages index + ([hasnep.github.io/roc-packages](https://hasnep.github.io/roc-packages)) — + announced he is leaving. In his framing, show-and-tell is now dominated by + LLM-generated code he learns nothing from, chat contains many + LLM-isms, and he prefers the Gleam community, which in his view values + effort over output. He explicitly does **not** think Roc should be anti-LLM + like Zig. +- A sibling thread — "roc on a unikernel (venting about LLM policies)" (#show + and tell, 125 messages) — started from the Zig project auto-closing an + LLM-disclosed issue with a clear reproducer, and ranged widely over + upstream-project LLM policies. +- **Feldman's response** (Nov 20): a warm goodbye to Hannes; on policy, in + short, he is not sure and needs to think more, based on what other + communities have done; every community is going through some version of + this and compositions are changing either way; his stated personal view is + to advocate common ground and kindness. **No policy has been adopted.** +- Constructive proposals floated: self-reported "human-code scores" / + AI-declaration standards for shared projects (removewingman linked + ai-declaration.md). Anton gently pushed back that the team's actual focus + has been solving bugs, improving performance, and updating packages and + platforms. +- For calibration, the same window's biggest body of new application code + (Steve Howell's portfolio, see the projects page) is openly described by + its author as built through agentic development with Claude, and it was + received as a showcase contribution. Both facts are part of the record. + +## The documentation push (#contributing) + +The "Docathon?" thread (144 messages, **73 reactions — the most-reacted +topic overall**) became a month-long docs effort ahead of 0.1.0: + +- **15 new code examples on the website** (Aurélien Geron, Oct 27): + AdvancedParsing, Loops, NestedTypes, NominalTypes, OpenRecords, Paths, + PatternAliases, Polymorphism, RecursiveTypes, RocRay, Sets, Streams, + StringPatterns, Unicode, WrappingArithmetic — reviewed by Anton and Luke + Boswell. +- The mini-tutorial **will be replaced before 0.1** (Anton). +- Langref expectations set explicitly to "after 0.1.0" (PR #12758) — the + project's line is not to promise things unnecessarily. +- **New website search is live** (Nov 1). +- Steve Howell is writing "a little Roc book" — early draft at + [roc.lynrummy.com/tutorial](https://roc.lynrummy.com/tutorial/introduction.html). +- A community **Roc style guide** (Steve Howell, LLM-drafted, human review + requested) drew concrete state-machine idiom rules from notramo in a + 96-message #beginners thread. + +## Tooling and distribution progress + +- **Official VS Code extension** (announced Nov 5, Anton): syntax + highlighting (including Roc in doc comments/Markdown), diagnostics as you + type, formatting (format-on-save default), hover with inferred types. + Publisher verification is pending on Microsoft's side. Luke Boswell's fork + inspired vital components of it. +- **Signed macOS nightly binaries** (Nov 20, 18 reactions): Intel and Apple + Silicon nightlies are now officially signed — no more Gatekeeper warnings. +- **Homebrew install** announced Nov 21; Anton will also make a PR to add Roc + to **mise**. +- **Exercism:** the Roc track is now running on 0.1.0-RC1 (Nov 22). +- **ReleaseSafe nightlies** are now published alongside regular nightlies + (Anton, in the LSP-bug thread) for people who want that extra security. +- **LSP outage fixed:** the month's biggest bug thread — "LSP does not work + after latest nightly" (#bugs, 79 messages, Oct 25 → Nov 14) — was confirmed + fixed on Nov 13–14. The thread also ranged into LSP/compiler-memory + security trade-offs. +- **Build-times survey** (#announcements, Oct 24): Niclas Åhdén published + per-project LOC/s numbers on the pre-RC compiler (e.g. a 76k-LOC server at + ~5.9k LOC/s cold) — a useful baseline for the RC1 improvements. + +## What's shipping — platforms, projects, packages + +Covered in full on the [platforms](platforms.md), +[libraries](libraries-and-packages.md), and +[projects](real-projects-and-production-use.md) pages. The November-window +headlines: the Rocco game engine's run from v0.6.0 to v0.10.0 plus web +builds; the concave, roxum, Kite, and trantor platform announcements; +Roclet reactive notebooks; roc-chat deployed; Roc on a unikernel; +roc-native-android 0.0.1 piloting the roc-signals engine; and a heavy release +cadence from Luke Boswell's package suite (roc-signals 0.3.0, roc-fuzz 0.7.0, +roc-docx 0.1.0-rc1, roc-pdf 0.1.0, plume 0.5.0/0.6.0, roc-ray 0.12.0, +roc-graph-layout 0.3.0-rc3, roc-gui 0.1.0-rc1) plus roc-playwright 0.13.0 and +roc-isodate 0.8.0. New contributors keep arriving — e.g. Jack Scully +(formally-verified kernels background), who within days was building the +concave platform. + +## Bugs stream, otherwise + +A recursive-types inference issue (known root-cause family), a crash on +nested derived encoders (Nov 22), and the Zig 0.17 arena bug noted on the +compiler page. Nothing else in the window looked release-blocking — which is +consistent with the RC1 status above. diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/libraries-and-packages.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/libraries-and-packages.md new file mode 100644 index 000000000..2bf8924af --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/libraries-and-packages.md @@ -0,0 +1,83 @@ +# Libraries and packages + +Roc packages are distributed as bundles via GitHub releases — there is no +central registry like crates.io. The list below is the **new-compiler** canon +per the current [roc-awesome](https://github.com/lukewilliamboswell/roc-awesome) +README (read 2026-11-23), plus releases announced in the November Zulip +window. + +## Parsing and text + +- **[roc-parser](https://github.com/lukewilliamboswell/roc-parser)** (Luke Boswell) — parser combinators plus ready-made parsers for CSV, JSON, YAML, XML, Markdown, AsciiDoc, HTTP, and Roc source itself. The ecosystem's flagship parsing package. +- **[roc-regex](https://github.com/grayrest/roc-regex)** (grayrest) — regular expressions; described in November as "competitive with Rust's regex crate" on wide-SIMD machines. +- **[roc-ascii](https://github.com/hasnep/roc-ascii)** (Hasnep) — ASCII text handling. +- **[unicode](https://github.com/roc-lang/unicode)** (roc-lang) — graphemes and code points. +- **[path](https://github.com/roc-lang/path)** (roc-lang) — path types. +- **[http](https://github.com/roc-lang/http)** (roc-lang) — HTTP client types, v2.0.0. + +## Data and serialisation (mostly Karakatiza666) + +- **[roc-cbor](https://github.com/Karakatiza666/roc-cbor)** — CBOR with derived readers/writers (0.5.0). +- **[roc-toml](https://github.com/Karakatiza666/roc-toml)** — TOML 1.0 with comment-preserving edits. +- **[roc-jwt](https://github.com/Karakatiza666/roc-jwt)** — JWT decode + claims (bring-your-own crypto). +- **[roc-semver](https://github.com/Karakatiza666/roc-semver)**, **[roc-tar](https://github.com/Karakatiza666/roc-tar)**, **[roc-base58](https://github.com/Karakatiza666/roc-base58)**, **[roc-s2-geometry](https://github.com/Karakatiza666/roc-s2-geometry)** (port of Google's S2 geometry), **[roc-websocket](https://github.com/Karakatiza666/roc-websocket)** (RFC 6455, platform-agnostic), **[roc-app-header](https://github.com/Karakatiza666/roc-app-header)** (parse/edit Roc app headers, MVS version selection). +- **[roc-rvn](https://git.sr.ht/~jwoudenberg/roc-rvn)** (Jasper Woudenberg, SourceHut) — a Roc-like serialisation format ("Roc Value Notation"). +- Note: two independent packages both named **roc-markdown** exist (Karl's and Steve Howell's) — flagged in-chat as a possible confusion. + +## Dates and time + +- **[roc-time](https://github.com/lukewilliamboswell/roc-time)** (Luke Boswell) — date/time, 0.3 line, microsecond profile. +- **[roc-isodate](https://github.com/imclerran/roc-isodate)** (imclerran) — ISO date parsing/formatting; 0.8.0 released in November 2026. +- **[roc-gregorian](https://github.com/jwoudenberg/roc-gregorian)** (Jasper Woudenberg) — Gregorian calendar math. + +## Databases and network services + +- **[roc-pg](https://github.com/niclas-ahden/roc-pg)** (Niclas Åhdén) — PostgreSQL client with **compile-time checked SQL**. (Supersedes the old-compiler agu-z/roc-pg.) Bryce Miller's Tigerbeetle client and roc-pg were among the packages confirmed working on RC1. + +## The Åhdén suite (Niclas Åhdén — all new-compiler, production-driven) + +One author accounts for a large share of the serious package ecosystem, +written for his production work (see the projects page): +[roc-deflate](https://github.com/niclas-ahden/roc-deflate), roc-base64, +roc-crc32, roc-md5, roc-hmac, roc-scram, +[roc-openapi](https://github.com/niclas-ahden/roc-openapi) (validate request +bodies against OpenAPI 3.x), +[roc-playwright](https://github.com/niclas-ahden/roc-playwright) (browser +automation; 0.13.0 in November), +**[roc-spec](https://github.com/niclas-ahden/roc-spec)** (parallel test runner +with isolated environments), +**[roc-vcr](https://github.com/niclas-ahden/roc-vcr)** (record/replay HTTP in +tests), roc-sendgrid, roc-url, roc-xlsx, roc-zip, roc-xml, roc-prng, +roc-database-url, roc-human-readable-file-size, roc-maybe, roc-non-zero, +joy-html. + +## The Boswell suite (Luke Boswell) + +- **[weaver](https://github.com/lukewilliamboswell/weaver)** — ergonomic CLI argument parser (originally by smores56). +- **[roc-docx](https://github.com/lukewilliamboswell/roc-docx)** — read/write Word documents, pure Roc; 0.1.0-rc1 in November. +- **[roc-pdf](https://github.com/lukewilliamboswell/roc-pdf)** — 0.1.0 in November, and **in production**: Niclas Åhdén generates real-estate record-sale flyers with it. +- **[roc-font](https://github.com/lukewilliamboswell/roc-font)** — TTF/OTF parsing and text shaping, pure Roc. +- **[roc-graph-layout](https://github.com/lukewilliamboswell/roc-graph-layout)** — graph layout plus Mermaid parsing/rendering; 0.3.0-rc3 in November. +- **[roc-pandoc](https://github.com/lukewilliamboswell/roc-pandoc)**, roc-ansi, **[plume](https://github.com/lukewilliamboswell/plume)** (interactive charts via Plotly.js; 0.5.0 ported to the modern compiler, then 0.6.0, in November), roc-time (above). + +## Other packages + +- **[roc-random](https://github.com/kili-ilo/roc-random)** (kili-ilo) — random generation (successor to jancvanb/roc-random). +- **[rocsat](https://github.com/mpizenberg/rocsat)** (Matthieu Pizenberg) — a SAT solver in Roc. +- **[terrocotta](https://github.com/obust/terrocotta)** (obust) — GUI library with Clay-style layout + MVU, rendering via roc-ray. +- **[roc-syntax-color](https://github.com/showell/roc-syntax-color)** (Steve Howell) — 5,242 lines; syntax highlighting for 7 languages. + +## Tooling + +- **[roc-syntax-mcp](https://github.com/Karakatiza666/roc-syntax-mcp)** (Karakatiza666, on npm) — an MCP server that teaches coding agents Roc: it indexes the language reference, builtins, basic-cli, basic-webserver, roc-parser, roc-random, and third-party platforms such as roc-ray; every topic app passes `roc check` against its pinned release. A sign of the times: the ecosystem is already building tooling *for AI agents* writing Roc. +- **[tree-sitter-roc](https://github.com/faldor20/tree-sitter-roc)** (faldor20) — grammar updated for the new syntax; powers Helix/Neovim. +- **[zed-roc](https://github.com/h2000/zed-roc)**, **[roc-vscode](https://github.com/roc-lang/roc-vscode)** — editor support. The **official VS Code extension** was announced Nov 5 (see the digest page): syntax highlighting (including Roc in doc comments/Markdown), diagnostics as you type, formatting, hover with inferred types. +- **[setup-roc](https://github.com/roc-lang/setup-roc)** (roc-lang) — GitHub Action; **[release-package](https://github.com/roc-lang/release-package)** (roc-lang) — package publishing workflow. +- **[bundle-roc-library](https://github.com/hasnep/bundle-roc-library)** + **pre-commit-roc** (Hasnep); **[roc-just](https://github.com/grayrest/roc-just)** (just task-runner port); **[roc-blueprint](https://github.com/lukewilliamboswell/roc-blueprint)** (typed dev-environment/task declarations in Roc — roc-gui's build is driven by it); **[roc2nix](https://github.com/jrmurr/roc2nix)**; **[roc-start](https://github.com/imclerran/roc-start)** (scaffolder; older listing, status unverified). + +## Superseded / abandoned (old-compiler era, absent from the current list) + +lukewilliamboswell/roc-json (built-in JSON plus roc-parser cover this now), +Hasnep/roc-html (joy-html is the live one), Hasnep/roc-math, +quelgar/roc-utils, isaacvando/rtl (template language), isaacvando/gob (a stack +language written in Roc). diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/overview-and-state-of-roc.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/overview-and-state-of-roc.md new file mode 100644 index 000000000..b94ebff60 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/overview-and-state-of-roc.md @@ -0,0 +1,86 @@ +# Overview and state of Roc + +Roc is a functional programming language built around a distinctive bargain: +pure functional code with full type inference, compiled to fast native +binaries via opportunistic in-place mutation and static reference counting, +with all side effects supplied by a *platform* — a host program (written in +Rust, Zig, Go, …) that provides files, network, UI, and so on. The language +grew out of Elm's lineage (Richard Feldman created Roc after years as a core +Elm figure), and its design bet is that a language can be both friendly and +very fast. The landmark talk +["Outperforming Imperative with Pure Functional Languages"](https://hacker-tube.org/watch/vzfy4EKwG_Y) +(Strange Loop 2021) remains the clearest statement of why Roc exists. + +## Where the project stands (2026-11-23) + +- The compiler was rewritten from Rust to Zig over 487 days; the + [roc repo](https://github.com/roc-lang/roc) is now ~92.9% Zig (6,207 stars, + ~56K commits, read 2026-11-23). Feature parity with the old compiler was + reached in July 2026, and the new compiler is the only one that matters — + see [the new compiler](the-new-compiler.md). +- **Roc 0.1.0-RC1 shipped 2026-11-21**, the language's first release candidate + and the run-up to its first numbered release in eight years. Nightlies + ([roc-lang/nightlies](https://github.com/roc-lang/nightlies)) remain the + real distribution channel. +- The ecosystem's centre of gravity is the **Roc Zulip**, linked from every + official page; a public export is browsable at + [roc-lang.github.io/zulip-export](https://roc-lang.github.io/zulip-export). + The last 30 days there are summarised in + [community and Zulip digest](community-and-zulip-digest.md). +- The **Exercism Roc track** — 110 exercises, fully migrated to the new + compiler in August 2026 and running on 0.1.0-RC1 as of 2026-11-22 — is the + main on-ramp for new users ([exercism.org/tracks/roc](https://exercism.org/tracks/roc)). + +## Who carries it + +The centre of mass is a handful of people, and these pages name them because +the ecosystem cannot be understood without them: + +- **Richard Feldman** — language creator; compiler, [roc-signals](https://github.com/rtfeldman/roc-signals), + and the project's public voice ([rtfeldman.com](https://rtfeldman.com)). +- **Luke Boswell** — basic-cli, [roc-ray](https://github.com/lukewilliamboswell/roc-ray), + [roc-gui](https://github.com/lukewilliamboswell/roc-gui), the native + Android/macOS platforms, roc-parser, and the awesome list itself. +- **Niclas Åhdén** — the [Joy](https://github.com/niclas-ahden/joy) framework + and the production-driven package suite; described by Feldman as Roc's most + prolific production user. +- **Karakatiza666** — data-format packages and the Cloudflare Workers platform. +- **Steve Howell** — the largest public body of new-compiler application code + ([roc.lynrummy.com](https://roc.lynrummy.com)). + +## Sustainability and risk, stated plainly + +- The roc-lang.org homepage (read 2026-11-23) seeks **$4,000 USD/month** to + fund one longtime contributor full-time. The Roc Programming Language + Foundation is a 501(c)(3) nonprofit. Current corporate sponsors per the repo + README: Lambda Class, ohne-makler, Decem (earlier sponsors named by Feldman: + rwx, Vendr, NoRedInk, Tweede Golf, Martian). +- **Bus factor is the ecosystem's biggest risk.** A small number of authors + account for the compiler, both official platforms, most serious packages, + and most production use. +- **Everything is pre-1.0 and mostly pre-0.1.** Packages pin specific dated + nightlies in their headers and pins move weekly; expect breakage until + 0.1.0 lands and some churn after it. +- Documentation is the acknowledged gap — Feldman, closing his rewrite + retrospective: in its current state you can still expect "a variety of bugs, + incomplete features, and unfinished docs." A community documentation push + ahead of 0.1.0 is under way (see the digest page). + +## Exists / new / actually used + +- **Exists (and is current):** the new compiler (nightlies + RC1), basic-cli, + basic-webserver, roc-ray, Joy, roc-parser, roc-pg, roc-signals, the Åhdén + and Boswell package suites, the Exercism track. +- **New (last ~6 months):** feature parity itself; RC1; roc-gui (Sep 2026); + roc-cloudflare-workers (Oct 2026); roc-native-android (Nov 2026); the + basic-webserver 0.17 → 0.22 release velocity; agent-facing tooling + (roc-syntax-mcp); the language changes (`Try`, methods, `Iter`/`Stream`) + becoming the documented norm. +- **Actually used (evidence of real use, not just existence):** roc-deflate in + paid production; Joy powering production web apps for ~2 years; roc-chat as + a live group chat; Exercism learners on 110 exercises; roc-ray's shipped + example tools; roc-pdf generating real-estate flyers in production. +- **Exists but legacy:** old-compiler platforms and packages listed as + legacy/superseded in [platforms](platforms.md) and + [libraries and packages](libraries-and-packages.md) — code that has not been + ported and should not be cited as current ecosystem. diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/platforms.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/platforms.md new file mode 100644 index 000000000..a278647fd --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/platforms.md @@ -0,0 +1,70 @@ +# Platforms + +A Roc *platform* is the host program (in Rust, Zig, Go, …) that provides an +app its effects — files, network, UI. Platforms are where most ecosystem +action is. Maturity labels are defined in the +[index](2026-11-23T22-00-25Z_research_roc-ecosystem.md). + +## Official (roc-lang org) + +| Platform | What it's for | Status | +|---|---|---| +| **[basic-cli](https://github.com/roc-lang/basic-cli)** | Command-line apps: the default general-purpose platform. Host in Rust. Modules include Stdout/Stdin (streaming lines and chunks), File/Path (writer API, permissions such as OwnerOnly/PublicRead, symlinks), Cmd, Http, Tcp, UnixSocket, Sqlite, Tty (raw mode), Signal (SIGINT/SIGTERM/SIGUSR1/SIGUSR2/SIGWINCH), Env, Locale. | **Official–active.** Latest **0.28.1**, requiring nightly-2026-11-13 or newer. 0.26.0 was a large consistency release (typed `Duration`/`Utc`/`Monotonic`, unified `Err(EndOfInput)`, one error tag per module, mimalloc on Linux static hosts). Maintained mainly by Luke Boswell, with release automation by Anton-4. [Releases](https://github.com/roc-lang/basic-cli/releases) | +| **[basic-webserver](https://github.com/roc-lang/basic-webserver)** | HTTP servers. Host in Rust (hyper + tokio). Ships Sqlite, server-sent events, HTML/forms/static-file support. | **Official–active, very fast-moving.** Latest **0.22.0**, pinning nightly-2026-11-15. It shipped 0.17 → 0.22 across roughly six weeks in Oct–Nov 2026. [Releases](https://github.com/roc-lang/basic-webserver/releases) | + +## Community — new compiler + +| Platform | What it's for | Status | +|---|---|---| +| **[RocRay / roc-ray](https://github.com/lukewilliamboswell/roc-ray)** (Luke Boswell) | 2D games and visual tools over raylib; Zig host. Drawing, audio, keyboard/mouse/gamepad, files, networking, screen recording; macOS/Linux/Windows x64. Explicitly 2D-only (3D planned) and not a GUI toolkit. Ships real example programs: Breakout, Pong, Snake, Pixel Workshop, Spark Run, Cave Climb, Particles, Live Plot, Postcard Studio. | **Community–active.** 80 stars, 1,579 commits, **51 releases** (created 2024-01-13). The roc-lang.org example pins release **0.12.1** (nightly-2026-11-12); the [manual](https://lukewilliamboswell.github.io/roc-ray/roc-ray.pdf) is at 0.12.3. | +| **[roc-gui](https://github.com/lukewilliamboswell/roc-gui)** (Luke Boswell) | Native desktop GUI on **GPUI** (Zed's UI framework); cross-platform (macOS, Linux/Wayland, Windows). Ships a behavioural/performance test harness and a performance observatory streaming to SQLite; the repo gallery shows a dozen demo apps (HTTP Workbench, Database Browser, Terminal Workspace, Redis Explorer, …). | **Experimental, but substantial.** Created 2026-09-14; 733 commits, 25 releases in ~10 weeks. README: "still an early-stage platform. Do not use it in production." A 0.1.0-rc1 was cut during the November Zulip window. | +| **[roc-signals](https://github.com/rtfeldman/roc-signals)** (Richard Feldman) | Reactive-signals UI engine, for the web and for native GUI. Its native-GUI docs ship starter archives as release candidates pinned to nightly-2026-09-04 ([docs](https://github.com/rtfeldman/roc-signals/blob/HEAD/www/content/docs/native-gui.md)). The same signals engine powers roc-native-android (below). | **Experimental–active.** Feldman's own current UI project; roc-signals 0.3.0 overhauled the reactive engine during November 2026. | +| **[roc-native-android](https://github.com/lukewilliamboswell/roc-native-android)** (Luke Boswell) | Native Android apps in pure Roc — real Android widgets, **no WebView**. Reactive engine from roc-signals; arm64 only; Kotlin shell, no Gradle. Examples: counter, todos, stopwatch, contacts (a virtualised 10,000-contact list), http, and "ports" (battery/accelerometer exposed from Kotlin). | **Experimental / PoC — brand new.** Created **2026-11-22**; v0.0.1, 20 commits; self-described "early proof of concept." Luke's launch post, "Roc platform for native Android apps," is dated 23 Nov 2026 on [lukewilliamboswell.github.io](https://lukewilliamboswell.github.io). | +| **[roc-native-macos](https://github.com/lukewilliamboswell/roc-native-macos)** (Luke Boswell) | Native macOS apps. | **Experimental.** Listed on the current awesome list; not separately audited for this record. | +| **[Joy](https://github.com/niclas-ahden/joy)** (Niclas Åhdén) | Full-stack / isomorphic web framework + platform: Elm-architecture client and server in one language. | **Community–active; the ecosystem's most battle-tested framework.** 66 stars, 256 commits, 5 releases (created 2024-12-10); current README pins Joy **0.35.0** + joy-html 0.18.0. README self-label: "early development, not production-ready… expect breaking changes" — yet its author runs it in production (see the projects page), and its js-framework-benchmark numbers are competitive with Elm/Leptos/Solid. | +| **[roc-cloudflare-workers](https://github.com/Karakatiza666/roc-cloudflare-workers)** (Karakatiza666) | Roc on **Cloudflare Workers**: apps compile to a wasm32 reactor behind a JS shim. Typed modules for fetch, D1, R2, KV, Cache API, Durable Object SQL, Queues, and Workers AI; Zig host; effects await JS promises via JSPI. Companion CLI: `roc-cloudflare-workers-cli`. | **Experimental — brand new and solo.** Created **2026-10-26**; already at **v0.0.10** (10 releases in under a month, 216 commits, 0 stars). | +| **[roc-tower-platform](https://github.com/grayrest/roc-tower-platform)** (grayrest) | Web servers with pure handlers on Rust hyper/Tower + SQLite. | **Community–active** (current awesome list). | +| **[basic-ssg](https://github.com/lukewilliamboswell/basic-ssg)** (Luke Boswell) | Static site generation. | **Community–active** (current awesome list). | +| **[roc-fuzz](https://github.com/lukewilliamboswell/roc-fuzz)** (Luke Boswell; originally bhansconnect) | Fuzz-testing platform. | **Community–active** (current awesome list). roc-fuzz 0.7.0 (Nov 2026) packs many fuzz targets into one binary. | +| **[roc-wasm4](https://github.com/lukewilliamboswell/roc-wasm4)** (Luke Boswell) | Games for the WASM-4 fantasy console. Its game Rocci Bird was the new compiler's feature-parity demo. | **Community–active** (current awesome list). | +| **[Rocco](https://github.com/BraedenFoster/rocco)** (Braeden Foster; engine work by pixelsprout) | Experimental **3D engine** platform: engine in Odin, WebGPU rendering; a game is a model plus five pure functions producing a `Scene` value. glTF, PBR, shadows, bloom; macOS/Linux/Windows/web builds. | **Experimental — and November's most active project.** v0.6.0 (Oct 28: positional audio, PBR/shadow maps, tone mapping, gamepad) → v0.10.0 (Nov 4: environments, fog, bloom) → **web builds via Roc→wasm + WebGPU** (Nov 16) with an interactive web tour. | +| **[roc-screensaver](https://github.com/showell/roc-screensaver)** (Steve Howell) | Zig platform with its own software rasterizer: one Roc app runs both as a Windows screensaver and as a web page. Three screensavers ship on it, including "Lanterns, a sunrise made for Roc's 0.1.0 launch"; ~8,155 lines of Roc apps. | **Experimental–active** (single-author, shipping). | +| **[restricted-roc](https://codeberg.org/removewingman/restricted-roc)** (removewingman, Codeberg) | CLI platform that can sandbox itself — restricts syscalls and filesystem access. | **Experimental** (current awesome list). | +| **Platform templates** (Luke Boswell) | Scaffolding for writing new platforms in [Go](https://github.com/lukewilliamboswell/roc-platform-template-go), [Rust](https://github.com/lukewilliamboswell/roc-platform-template-rust), [Zig](https://github.com/lukewilliamboswell/roc-platform-template-zig). | **Community–active.** Worth noting: the "write your own platform" path is a supported, templated workflow, which is how the long tail above exists at all. | + +## New platforms announced in the November Zulip window + +Summarised from [community and Zulip digest](community-and-zulip-digest.md): + +- **concave** (Jack Scully, Nov 23) — Convex-inspired reactive web platform + on 0.1.0-RC1: serverless, scale-to-zero, front+back reactivity, deploys to + Google Cloud Run + serverless Postgres. +- **roxum** (kaza, Nov 7) — web platform bringing axum's style/safety to Roc + ([github.com/KouYuume/roxum](https://github.com/KouYuume/roxum)). +- **roc-platform-patcher** (Scott Campbell, Oct 30) — "alter & tailor + platforms": inject middleware into a platform to observe/alter effects, + monitor allocations, stub or hot-swap effect implementations. +- **DST platform thesis** (Jan Rüggeberg) — a deterministic-simulation-testing + platform simulating a basic-cli subset for a Raft KV store; Luke Boswell + called DST an excellent pitch for Roc and a possible validation of compiler + determinism. +- **trantor** (Karl) — "an extensible platform system," listed for the 0.1.0 + showcase. +- **Kite** (Karl, Nov 23) — a native GUI platform, just pushed to GitHub, + feedback wanted. + +One open platform need from the same window: a **compiler API / introspection +surface**. Jack Scully's concave needs an app's exported endpoints with +resolved types; today that means hand-rolled parsers or `--introspect` hacks. +Feldman is cautious about exposing compiler APIs at all — exposing IR/APIs +makes them unchangeable — so this is wanted, not planned. + +## Legacy-compiler platforms (not on the current awesome list) + +Treat as **legacy / superseded** unless re-verified: roc-aws-lambda and +roc-aws-lambda-runtime (isaacvando), roc-iced (tarkah), roc-microbit +(bhansconnect, embedded), static-site-gen (isaacvando), roc-ecs (ageron), +roc-parallel demo (ageron). Aurélien Geron (ageron) also maintains **roclet** +(reactive Roc notebooks in the browser, running even offline — +[ageron.github.io/roclet](https://ageron.github.io/roclet/)) and +new-compiler-updated forks of basic-cli/basic-webserver (updated 2026-10-05). diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/real-projects-and-production-use.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/real-projects-and-production-use.md new file mode 100644 index 000000000..08bd31256 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/real-projects-and-production-use.md @@ -0,0 +1,106 @@ +# Real projects and production use + +Honest scale labels: **Production** = someone depends on it / it earns money · +**Substantial hobby** = large, finished, used by its author/community, not +commercial · **Demo/toy** = exists to demonstrate the language or a platform. + +## Production + +- **Niclas Åhdén's production Roc (Joy framework)** — *Production, + small-team/consulting scale.* Åhdén (instateam.se) has used Roc in + production for ~2 years; Feldman calls him "Roc's most prolific production + user." His Func Prog Sweden talk (2026-11-10), "Roc and Joy: Productivity in + Production," states Joy "already powers real web apps in the wild." His + package suite (see the libraries page) is the by-product of that work. + Sources: [rtfeldman.com/fp-vs-c](https://rtfeldman.com/fp-vs-c), + [github.com/niclas-ahden](https://github.com/niclas-ahden). +- **roc-deflate** — *Production, single-package.* Åhdén's pure-Roc DEFLATE + implementation runs in **paid production**. Feldman spent weeks optimising + it and benchmarked it against libdeflate over 144 Silesia-corpus runs + (levels L1–L12): median **8.9% slower than libdeflate on a Ryzen 9 3900X, + 2.6% slower on M1**, worst case 18% slower, best case ~18% faster, + byte-identical output. Honest caveats from the same post: roc-deflate's APIs + are non-streaming only, and one heavily optimised package is not the general + case. Source: [rtfeldman.com/fp-vs-c](https://rtfeldman.com/fp-vs-c) + (2026-10-22). +- **roc-pdf in production** — *Production, single-package.* Niclas Åhdén + generates real-estate record-sale flyers with Luke Boswell's roc-pdf 0.1.0 + (reported in the November Zulip window). + +## Substantial hobby / community infrastructure + +- **Steve Howell's [roc.lynrummy.com](https://roc.lynrummy.com) portfolio** — + *Substantial hobby, production-adjacent.* The largest public body of + new-compiler Roc application code found in this investigation, all UPL-1.0 + and, by the author's own account, built "through agentic development, with + Claude"; the apps also run in-browser as wasm. + - **roc-chat** — a live production group chat at chat.lynrummy.com that + replaced the group's earlier Zig chat: **~33,000 lines of Roc in 171 + modules** (+ ~10,000 lines in 45 spec modules, ~2,300 `expect`s) on a + custom Zig-host platform (29 hosted functions, the filesystem as the + database, SSE live updates, password/GitHub/device-code sign-in; AI + agents are chat members with their own keys). + - **roc-markdown** — 5,780 lines; "finished… in production"; renders every + roc-chat message; held to 314 frozen CommonMark/GFM spec examples. + - **roc-syntax-color** — 5,242 lines; syntax highlighting for 7 languages. + - **Safari Ride** — 14,268 lines, 98 modules, 816 expects; plus a 39-chapter + online book, *Safari Ride: a tour of a real Roc program* (early draft). + - **A BASIC interpreter** — 6,733 lines; ECMA-55 Minimal BASIC plus the 1978 + Creative Computing dialect; graded against 208 NBS test programs and 99 + games from *BASIC Computer Games*. + - **Roc on Shale** — 25 Roc programs, ~25,700 lines: code-check/report + scripts for his Shale agent scripting language. + - **Seattle Delivery** (4,704 lines; vehicle-routing solver, Clarke–Wright + + local search, bit-for-bit reproducible native vs wasm), **Fast Track** + (4,166 lines; board game with search AI), **Dog Park** (3,688 lines; + herding game), **Safari Walk** (1,666 lines; built on the Rocco 3D + engine), a shared 1,439-line chess kit behind Knight's Tour / Eight + Queens, the roc-screensaver platform, and animated shorts (*Trick or + Treat*, *Welcome to Roc*, *Robot Thanksgiving*). + - Also from the November window: **Roc on a unikernel** — a Roc app running + on zig-metal-unikernel + zig-webbox. + - Howell is also writing "a little Roc book" — early draft at + [roc.lynrummy.com/tutorial](https://roc.lynrummy.com/tutorial/introduction.html). +- **Roclet** (Aurélien Geron, Nov 2) — reactive notebooks in Roc running in + the browser, even offline ([ageron.github.io/roclet](https://ageron.github.io/roclet/)). + +## Demos and smaller projects + +- **Rocci Bird** (bhansconnect, 2024; art by Luke DeVault) — *Demo, but a + load-bearing one.* A WASM-4 Flappy-Bird-like, ported to the new compiler as + the feature-parity proof: `roc build --opt=size` produces a **31 KB wasm**, + less than half the old compiler's output. Playable on itch.io and embedded + in Feldman's rewrite post. Source: + [rtfeldman.com/rust-to-zig](https://rtfeldman.com/rust-to-zig). +- **roc-ray example games/tools** (with the platform) — Breakout, Spark Run, + Cave Climb, Pixel Workshop, Particles, Live Plot, Postcard Studio. + *Small-but-complete.* +- **kai** ([thebrandonlucas/kai](https://github.com/thebrandonlucas/kai)) — a + CLI frontend for Nix, listed as a showcase app on the awesome list. +- **roc-gui demo apps** — a dozen GPUI demo applications (HTTP Workbench, + Database Browser, Redis Explorer, …) shipped as the platform's gallery. +- **Rocco "Agent town"** — an experiment visualising Claude/Codex tool-call + events inside the Rocco 3D engine (November 2026). + +## Learning / puzzle scenes + +- **Exercism Roc track** — 110 exercises, fully migrated to the new compiler + in August 2026 and on 0.1.0-RC1 as of Nov 22. This is the main on-ramp for + new users and a real signal of new-compiler adoption. + [exercism.org/tracks/roc](https://exercism.org/tracks/roc) +- **Advent of Code** — [lukewilliamboswell/aoc](https://github.com/lukewilliamboswell/aoc) + (puzzle solutions) is on the current awesome list's showcases. Roc has an + AoC presence through individual solvers rather than an organised scene. The + community's December 2025 run on the then-brand-new compiler — dozens of + small real programs, with the core team actively supporting on Zulip — was + the new compiler's first public stress test. +- **Game jams** — no distinct Roc game-jam institution was found in this + pass; the games energy is concentrated in roc-ray / roc-wasm4 / Rocco + examples instead. (Stated plainly rather than padded.) + +## The 0.1.0 showcase + +A community showcase for the 0.1.0 announcement blog post is being assembled +in #show and tell (40 messages, 44 reactions in the November window) — +Feldman explicitly wants variety to show Roc's "long tail of domains." +Projects named for it include Karl's trantor platform and the Rocco engine. diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/talks-releases-showcases.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/talks-releases-showcases.md new file mode 100644 index 000000000..62a797b80 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/talks-releases-showcases.md @@ -0,0 +1,201 @@ +# Talks, releases and showcases + +The public-showcase side of Roc: people showing off the language, the new +compiler, and what has actually shipped. Recent and new-compiler material +first; landmark older talks a newcomer should still watch are included and +marked. Compiled 2026-11-23. + +## Watch first — the new compiler + +- **Roc & Zig: A Compiler Rewrite Story** — Anjana Vakil & Richard Feldman, + GOTO Unscripted (recorded at GOTO Copenhagen; published to YouTube June 5, + 2026). Feldman traces the ground-up rewrite of Roc's ~300K-line compiler + from Rust to Zig, and how it coincided with the year AI coding assistants + went from test-porting grunt work to genuine architectural collaborators. + Also states on the record that "Roc v1" (0.1) is due before the end of + 2026. **This is the single best watch-first item for the new compiler.** + https://www.youtube.com/watch?v=XSXGf3oN2yU&list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i +- **A Preview of Roc 0.1.0** — Richard Feldman (2026-08-13). The talk preview + of the first numbered release. https://hallway.video +- **Functional Mechanical Sympathy** (keynote) — Richard Feldman, FUNARCH + 2026 (ACM SIGPLAN workshop on Functional Software Architecture, co-located + with ICFP 2026, Indianapolis, August 2026). Feldman, now listed with Zed + Industries, argues functional programs can be made fast by architecting + with the machine in mind — the performance philosophy behind Roc, + presented as a research-community keynote rather than a product pitch. + https://www.conference-publishing.com/toc/ICFPWS26FUNARCH/abs +- **Roc and Joy: Productivity in Production** — Niclas Åhdén, Func Prog + Sweden (2026-11-10). The production talk: Joy powering real web apps, by + the ecosystem's most prolific production user. + +## Landmark Feldman talks + +- **Outperforming Imperative with Pure Functional Languages** — Strange Loop + 2021. *The* landmark Roc talk (~98K views): how a pure functional language + can match or beat imperative performance via opportunistic in-place + mutation, static reference counting, and unboxed values. Still the + clearest introduction to why Roc exists. + https://hacker-tube.org/watch/vzfy4EKwG_Y +- **Simple Functional Effects with Tag Unions** — YOW! 2022. A design talk on + Roc's approach to effects: managed effects expressed with tag unions + instead of monads or effect systems, so effectful code stays readable and + fully inferred. Listed in GOTO's Functional Programming playlist (item 73). + https://www.youtube.com/playlist?list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i +- **Why Static Typing Came Back** — GOTO Copenhagen 2022. Not Roc-specific, + but the talk that frames Roc's design bet: why dynamic languages dominated + the 1990s and why modern inference-based static typing (Roc's included) + reclaimed their advantages. https://www.hallway.video/watch/Tml94je2edk +- **Calling Functions Across Languages** — GOTO Chicago 2023. On FFI and + calling across languages in-process; directly relevant to how Roc + platforms (written in Rust/Zig/etc.) host Roc applications. + https://www.hallway.video/watch/ZOvxa9aKCCg +- **Rust & Zig Combined** — GOTO 2023. How the *original* Roc compiler + combined a Rust codebase with Zig (for its surgical linker and LLVM + bitcode work) — the prequel that makes the later full Zig rewrite much + less surprising. Listed in GOTO's Functional Programming playlist (item 30). + https://www.youtube.com/playlist?list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i +- **Intro to Roc & Innovation in Functional Programming** — Richard Feldman & + James Lewis, GOTO Unscripted interview (recorded GOTO Copenhagen, released + April 2024). A relaxed long-form intro: Roc's origins in Elm, platform + architecture, parsing strategy, and where Feldman thinks functional + programming is heading. + https://play.fountain.fm/episode/zdpbCUHdYtpjynPqmIdg + +## Other contributors + +- **Type-directed Defunctionalization in the Presence of Type Classes and + Monomorphization** — Ayaz Hafiz, paper presented at WITS 2024 (Workshop on + the Implementation of Type Systems, London, January 2024). The academic + write-up of Roc's lambda-set specialization — the compiler technique that + lets higher-order Roc code compile to optimal closure-free machine code. + Hafiz also built the new compiler's lambda-set resolution system, so this + is the design lineage of a core piece of the rewrite. + https://roc.zulipchat.com/user_uploads/22008/HudpAdrSn4Rys-i9pv8ZyGBu/ACM-SIGPLAN-Proceedings-Template.pdf + +## Podcasts + +- **Roc with Richard Feldman** — Rust in Production, Season 5 Episode 4 + (corrode), November 13, 2025. The most production-focused recent interview: + why the team moved the compiler from Rust to Zig, what Rust can learn from + that decision, and Roc's existing production use (e.g. at Vendr). + https://corrode.dev/podcast/s05e04-roc/ +- **The Roc Programming Language with Richard Feldman** — The Changelog + Interviews #645 (2025). A wide-ranging 90-minute conversation: static + dispatch, opportunistic mutation, Roc vs Go speed, why Roc will never + self-host, and Roc in the LLM era. Good single-episode overview of the + whole project. https://changelog.com/podcast/645 +- **Roc — A Functional Language Looking for Those Software Sweetspots** — + Richard Feldman on Developer Voices (Kris Jenkins), June 2025. Focuses on + what a language makes *harder* as a design tool, and where Roc is hunting + for its niche. https://www.developervoices.com/episodes/ +- **The Roc Programming Language with Richard Feldman, Parts 1–3** — ADSP: + Algorithms + Data Structures = Programs, Episodes 157–159 (Nov–Dec 2023). + The deepest technical interview series: what "functional" means, type + inference, continuation-passing style, and compiler internals, with Conor + Hoekstra and Bryce Adelstein Lelbach. + https://adspthepodcast.com/2023/11/24/Episode-157.html +- **Creating a Language: Elixir vs. Roc** — José Valim & Richard Feldman, + Software Unscripted, cross-published by Elixir Wizards (January 11, 2024). + Two language creators comparing notes: how goals shape design tradeoffs, + and Roc's focus on single-threaded performance. + http://www.smartlogic.io/podcast/elixir-wizards/s11-e13-software-unscripted-jose-valim-richard-feldman-elixir-roc/ +- **Lambda Set Defunctionalization with Ayaz Hafiz** — Software Unscripted + Ep. 85 (January 25, 2024). Feldman interviews core contributor Ayaz Hafiz + on the Roc compiler's most distinctive technique — how lambda sets make + defunctionalization a typed, whole-program optimization. + https://shows.acast.com/software-unscripted/episodes/664fde448c77cc0013b3338a + +## Written announcements & releases + +- **Roc 0.1.0-RC1** — 2026-11-21. The first release candidate in Roc's + history; see [the new compiler](the-new-compiler.md) for the rules and + status, and the + [announcement topic](https://roc.zulipchat.com/#narrow/channel/397893-announcements/topic/Release%20candidate%3A%20Roc%200.1.0-RC1/near/642546747) + for the community reaction. +- **How Our Rust-to-Zig Rewrite is Going** — Richard Feldman, rtfeldman.com, + July 15, 2026. The milestone post: after 487 days, the Zig rewrite of the + 300K-line compiler **passed feature parity** with the original. Includes + build-time comparisons (incremental rebuilds down to 0.035s on Zig 0.17), + hot code loading demos, and the roadmap: version 0.1.0 — Roc's first-ever + numbered release — targeted for later in 2026. + https://rtfeldman.com/rust-to-zig +- **How Close Can Pure FP Get to C?** — Richard Feldman, rtfeldman.com, + October 22, 2026. The roc-deflate showcase write-up: a pure-Roc DEFLATE + implementation benchmarked a median 2.6% (Apple M1) / 8.9% (Ryzen 3900X) + behind libdeflate, the hand-tuned SIMD C library — with memory safety, + purity, and no build scripts. Feldman notes 0.1.0 is "weeks away" as of + this post. https://rtfeldman.com/fp-vs-c +- **Rewriting Roc's Compiler in Zig** (decision write-up) — Richard Feldman, + February 2025. The original announcement of the rewrite: why almost every + part of the Rust compiler was due for a rewrite anyway, why Zig over Rust + (compile times, allocator style, direct LLVM bitcode generation), and why + Roc will still never self-host. + https://gist.github.com/rtfeldman/77fb430ee57b42f5f2ca973a3992532f.pibb +- **0.1 + 0.2** — Richard Feldman, rtfeldman.com, May 28, 2024. The roadmap + post that first laid out what Roc's first two numbered releases would + contain and the project's versioning philosophy. (Listed at + https://rtfeldman.com) +- **Roc 0.0.0-alpha1 released** — roc-lang/roc, January 29, 2025. The start + of Roc's permanent alpha release series (alpha1–alpha4 "rolling" releases + followed, latest alpha4 in August 2025), replacing the use-a-nightly + free-for-all with pinned, permanently available builds. + https://communick.news/post/2449578/4355026 +- **Roc's New Compiler for Advent of Code 2025** — Richard Feldman, December + 2025. The hastily-assembled guide that first put the new compiler in the + public's hands: nightly builds, the revised language design, and what + hadn't been ported yet (e.g. exhaustiveness checking). A primary-source + snapshot of the new compiler's state at the end of 2025. + https://gist.github.com/rtfeldman/f46bcbfe5132d62c4095dfa687bb9aa4 +- **basic-cli releases** — the flagship CLI platform kept shipping through + the compiler transition and now tracks the new compiler only: latest + **0.28.1** (nightly-2026-11-13 or newer), with 0.26.0 a large consistency + release. https://github.com/roc-lang/basic-cli/releases +- **basic-webserver releases** — the HTTP server platform (Rust host on + Hyper/Tokio) shipped 0.17 → **0.22.0** across roughly six weeks in + Oct–Nov 2026, pinning nightly-2026-11-15, with Sqlite, server-sent events, + and HTML/forms/static-file support. + https://github.com/roc-lang/basic-webserver/releases +- **Roc platform for native Android apps** — Luke Boswell, launch post dated + 23 Nov 2026, announcing roc-native-android 0.0.1. + https://lukewilliamboswell.github.io + +## Demos & showcases + +- **Rocci Bird, rebuilt on the new compiler** — Brendan Hansknecht's WASM-4 + Flappy Bird clone (art by Luke DeVault), ported by Luke Boswell, playable + in the browser via WebAssembly and embedded in the July 2026 rewrite post. + Under 1,000 lines of Roc; `roc build --opt=size` now produces a 31KB wasm + binary — less than half the old compiler's output. The proof-of-life demo + for feature parity. https://rtfeldman.com/rust-to-zig +- **The roc-lang.org homepage REPL** — the new compiler itself, compiled to a + 2.5MB WebAssembly binary, running the "echo" platform in the browser so + anyone can write and run basic Roc programs on the homepage (built by + Stephan). The most accessible hands-on demo of the new compiler — no + install required. https://rtfeldman.com/rust-to-zig +- **Hot code loading demo** — video embedded in the rewrite post showing a + running Roc web server and a 2D game picking up code changes on the next + request/frame, with no restart. A headline developer-experience feature of + the new compiler that the old one never had. + https://rtfeldman.com/rust-to-zig +- **roc-deflate vs libdeflate** — Niclas Åhdén's DEFLATE package (which he + runs in paid production work), optimization-tuned by Feldman until it + trailed the best C implementation by only single-digit percentages across + 144 Silesia-corpus benchmarks. The strongest "pure functional can be fast" + evidence the project has produced. https://rtfeldman.com/fp-vs-c +- **Rocco engine web tour** — the Rocco 3D engine's web builds (Roc→wasm + + WebGPU, Nov 16) ship with an interactive web tour; the project also ran an + "Agent town" experiment visualising Claude/Codex tool-call events in-game. +- **Advent of Code 2025 on the new compiler** — the community spent December + 2025 solving Advent of Code with the bleeding-edge compiler, with the core + team actively supporting them on Roc Zulip. Not one demo but dozens of + small real programs — the new compiler's first public stress test. + https://gist.github.com/rtfeldman/f46bcbfe5132d62c4095dfa687bb9aa4 +- **The 0.1.0 community showcase** — being assembled in #show and tell for + the 0.1.0 announcement blog post, with Feldman explicitly seeking variety + across Roc's "long tail of domains." + +--- + +*Further pointer, unverified recording link: Feldman also gave a keynote, +"The Essence of Functional Programming," at Functional Conf (India, +presented remotely), discussed in ADSP Episode 157.* diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/the-new-compiler.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/the-new-compiler.md new file mode 100644 index 000000000..0fd9b249f --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/repo-bundle/2026-11-23T22-00-25Z_research_roc-ecosystem/the-new-compiler.md @@ -0,0 +1,151 @@ +# The new compiler (Zig rewrite) and the road to 0.1.0 + +## What happened + +- The rewrite of Roc's compiler from Rust to Zig was announced in February + 2025 (Feldman's decision write-up: + [gist](https://gist.github.com/rtfeldman/77fb430ee57b42f5f2ca973a3992532f.pibb)) + and took **487 days**. The codebase went from ~300K lines of Rust to **464K + lines of Zig**. +- **Feature parity was reached in July 2026.** The primary source is Feldman's + retrospective, ["How Our Rust-to-Zig Rewrite is Going"](https://rtfeldman.com/rust-to-zig) + (2026-07-15) — also the best single document on the rewrite's rationale and + results, and the best watch/read-first item alongside the GOTO talk + ["Roc & Zig: A Compiler Rewrite Story"](https://www.youtube.com/watch?v=XSXGf3oN2yU&list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i). +- The legacy Rust compiler line ended at alpha1 (2025-01-29) through + alpha4-rolling (2025-08-26) and is superseded. Distribution of the new + compiler is via **nightlies** (`nightly-YYYY-MM-DD-`, + [roc-lang/nightlies](https://github.com/roc-lang/nightlies)); the + [setup-roc](https://github.com/roc-lang/setup-roc) GitHub Action supports + `nightly-new-compiler`, and Nix users have the + [roc-lang/roc-overlay](https://github.com/roc-lang/roc-overlay) flake. + nixpkgs itself moved its roc package from alpha4 to + `nightly-2026-11-09-9e85de7` in November 2026 + ([maintainermode.org PR #564994](https://maintainermode.org/pr/564994)). + +## RC1 shipped — reconciling two snapshots + +Two of this record's sources were written days apart and read differently; +the fresher one wins, and the difference is worth stating explicitly: + +- The ecosystem survey (web sources, read 2026-11-23) found **0.1.0 not yet + shipped**: Feldman (2026-10-22) had said it was "still weeks away," the roc + repo README still said Roc is "not ready for a 0.1 release yet," and + downstream projects were already talking about a "0.1.0 release candidate." +- The Zulip record — the community's own channel — shows that state was + already superseded: **Roc 0.1.0-RC1 shipped on 2026-11-21** + ([announcement topic](https://roc.zulipchat.com/#narrow/channel/397893-announcements/topic/Release%20candidate%3A%20Roc%200.1.0-RC1/near/642546747)). + RC1 is commit `15177e91f6`, binaries on GitHub. This is Roc's **first-ever + RC process**, started partly to establish the process itself. + +**So: parity landed in July 2026, and RC1 has shipped. What remains open is +the promotion question** — whether RC1 becomes 0.1.0 directly or an RC2 +comes first. + +### The RC1 → 0.1.0 rules and status + +From Feldman's announcement and the following days' discussion (summarised +in [community and Zulip digest](community-and-zulip-digest.md)): + +- The existing feature freeze stays. No breaking API changes to stdlib or the + host boundary unless unavoidable for an important bug. +- **No performance improvements at all** (compiler or runtime) until 0.1.1, + which is planned "shortly after" 0.1.0. +- **Bugfix bar for 0.1.0:** only bugs that (a) block real-world Roc programs + (hobby projects and learning materials count) *and* (b) can't be worked + around. Everything else — even compiler crashes — defaults to 0.1.1, with a + deliberately high bar for exceptions. +- **Status as of 2026-11-23:** no blocker bugs reported. Feldman noted, + surprised, that RC1 appears eligible to be promoted directly to 0.1.0; + an RC2 is still his base expectation. Community reports agree: packages and + platforms updated to RC1 without issue. +- **RC1 build-time benchmarks** (Feldman, on a dozen showcase projects): + `roc check` and `roc build --opt=dev` are sub-second even cold; warm + rebuilds under 100 ms. `--opt=dev` was the 0.1.0 priority; speeding up + `--opt=speed`/`--opt=size` gets a priority bump after 0.1.0. + +## What the new compiler does that the old one didn't + +From [Feldman's rewrite retrospective](https://rtfeldman.com/rust-to-zig) and +[roc-lang.org](https://www.roc-lang.org): + +- **Build speed:** incremental builds went from 10.0s (Rust 1.85) / 3.4s + (Rust 1.97) to **0.035s** on Zig 0.17 with `-fincremental`. Caveat: stable + Zig 0.16.0 has a bug that breaks `-fincremental` on this codebase (fix + landed upstream; the team is waiting on the next stable), and + `-fincremental` is currently x86-64 only. +- **Hot code loading in dev:** `roc server.roc` picks up source edits + per-request without a restart. +- **Reproducible cross-compilation:** `roc build --target=x64musl` produces + byte-identical output across hosts. +- **Zero-parse caching:** `roc check` / `roc test` write an on-disk cache + (structure-of-arrays layout, 32-bit indices) read back without parsing. +- **New internals:** a new parser (Anthony Bullard, Sam Mohr), a new type + checker (Jared Ramirez), and new lambda-set resolution (Ayaz Hafiz, + prototyped in OCaml — polymorphic defunctionalization; the academic lineage + is Hafiz's WITS 2024 paper on type-directed defunctionalization). +- **Memory management:** the new compiler does **not** use Morphic — it + implements the successor algorithm from the Morphic team's own paper + ([ACM](https://dl.acm.org/doi/pdf/10.1145/3798221)), described by Feldman as + a more powerful alternative to both Morphic and Perceus-style refcounting. + A November performance thread ended with PR + [roc#13090](https://github.com/roc-lang/roc/pull/13090) bringing unmodified + functional-style code to within ~3% more instructions than a hand-written C + port, and confirmation that functional style no longer carries an + execution-time penalty. +- **Language-level additions:** string interpolation inside patterns; + compile-time execution of pure functions (demonstrated as a zero-allocation + HTTP router); an in-browser build of the compiler shipped as the "echo" + platform (2.5 MB wasm, embedded on the roc-lang.org homepage, by Stephan). +- **Memory-safety retrospective:** the post counts 2 Zig-compiler + use-after-free bugs found in the new compiler's error-message paths, versus + 21 Rust-era memory-corruption reports — all of which were miscompilations, + none in compiler logic. Feldman's conclusion is that the rewrite did not + trade away safety in practice. +- **Toolchain notes:** a Zig 0.17 arena double-allocation bug "can plausibly + bloat Roc programs" (reported in #bugs, Oct 26); the Zig 0.17.1 upgrade was + started Nov 5. Roc was also submitted to Compiler Explorer (godbolt) via a + community PR (Nov 16). + +## Language changes in the new compiler + +Per the current [roc-lang.org examples](https://www.roc-lang.org/examples) and +release notes: + +- Effectful functions are suffixed with `!` (`main!`, `echo!`); pure vs + effectful is visible in every signature. +- `Result` is now **`Try`**. +- **Methods** exist: `list.map(...)`, `n.to_str()`. +- New builtins **`Iter`** and **`Stream`**; `for!` loops; local mutable + variables via `var $x`. +- A breaking change announced 2026-11-12 (operator desugaring and shadowing): + a default-number-resolution bug forced changes to operator desugaring — + operators no longer require both operands and the result to share one type, + enabling e.g. `my_duration * 12` (Duration × U64) instead of forcing the + literal to be a Duration. + +## Who has moved to the new compiler + +- **Both official platforms** (basic-cli, basic-webserver) — new-compiler + only, tracking nightlies within days (see [platforms](platforms.md)). +- **The Exercism Roc track** — fully migrated August 2026 (110 exercises; + maintainer Aurélien Geron hand-updated 108 beginner exercises; + [Exercism forum thread 68377](https://forum.exercism.org)), and running on + 0.1.0-RC1 as of Nov 22. +- **Essentially the entire current awesome list** — every platform and package + labelled Community–active in these pages pins a November 2026 nightly. +- **Rocci Bird** (the WASM-4 game, see + [talks, releases and showcases](talks-releases-showcases.md)) was ported as + the feature-parity proof. +- Community language has flipped: packages are "ported over to the modern + compiler" (plume 0.5.0), rocup was fixed "for the new zig compiler." + +## What's still missing / not done + +- **0.1.0 itself** — the promotion decision above. Feldman's talk + ["A Preview of Roc 0.1.0"](https://hallway.video) (2026-08-13) previews it. +- Documentation — the acknowledged gap (see the overview page); the + mini-tutorial will be replaced before 0.1 and langref expectations are set + explicitly to "after 0.1.0." +- Performance work on `--opt=speed`/`--opt=size` is deliberately deferred + until after 0.1.0 by the RC rules. diff --git a/doc/2026-11-24T02-09-38Z_research_roc-investigation/zulip-digest-2026-11-23.md b/doc/2026-11-24T02-09-38Z_research_roc-investigation/zulip-digest-2026-11-23.md new file mode 100644 index 000000000..9e91ef416 --- /dev/null +++ b/doc/2026-11-24T02-09-38Z_research_roc-investigation/zulip-digest-2026-11-23.md @@ -0,0 +1,344 @@ +# Roc Zulip digest — 2026-10-24 → 2026-11-23 + +*Compiled 2026-11-23 from roc.zulipchat.com via the Zulip REST API, using Drew's +own account (Drewry Pope, user 747334, member since 2024-08-20).* + +**Access used:** an existing `zuliprc` on the laptop — `/home/user/zuliprc` +(mode 600; `[api]` section, site `https://roc.zulipchat.com`, key stored under +the `key=` field) — verified live against `GET /api/v1/users/me`. The key was +used in place on the laptop only and appears nowhere in this document. Also +present on the laptop: a Zulip desktop-app profile at `~/.config/Zulip` +(Electron app data). Chromium's Default profile has no roc.zulipchat.com +history, so the browser route was not needed. + +**Coverage:** all 19 public streams in the realm were fetched for the full +30-day window — 2,355 messages, 2026-10-24 09:15 UTC → 2026-11-23 21:12 UTC. +Drew is subscribed to 11 of the 19; the other 8 are public and were included +because two of them (compiler development, platform development) are central. +Five streams were simply quiet (0 messages): API design, book – software +design by example in roc, editor, roctoberfest, software unscripted podcast. +Not covered: direct messages and any private streams Drew is not a member of. +Method note: every message was aggregated by stream/topic/reaction count; +announcements, compiler development and platform development were read in +full; the highest-traffic and highest-reaction topics elsewhere were read in +depth; routine Q&A (most of #beginners) is summarised at topic level. + +**Drew mentions:** none. Drew posted 0 messages and was mentioned 0 times in +the window — nothing is waiting for him personally. + +--- + +## TL;DR — the five things that matter + +1. **Roc 0.1.0-RC1 shipped on 2026-11-21** — the first release candidate in + Roc's history, from the new (Zig) compiler. As of 2026-11-23, *no blocker + bugs have been reported*, and Feldman says RC1 may be promoted directly to + 0.1.0. An RC2 is still his base expectation. +2. **The new compiler is simply "the compiler" now.** Nightlies, the RC, and + package ports all target it; design discussion assumes it. +3. **Linear types: Feldman said no** (2026-11-23), with a detailed + "cure worse than the disease" argument. FBIP is Roc's answer. +4. **A live community controversy over LLM-generated code** — a long-time + contributor's "Goodbye" post (2026-11-19) and a 125-message thread about + Zig's LLM policies. No policy decision yet; Feldman is explicitly still + thinking about it. +5. **The ecosystem is visibly shipping**: an official VS Code extension, + signed macOS nightlies, Homebrew install, the Exercism track on RC1, a + game engine hitting v0.10.0 with web builds, reactive notebooks, a + Convex-style platform — and a community showcase being assembled for the + 0.1.0 blog post. + +--- + +## 1. Roc 0.1.0-RC1 — the release candidate (announcements, 2026-11-21) + +Richard Feldman's announcement (47 messages, 71 reactions — the most-reacted +topic of the month): +[link](https://roc.zulipchat.com/#narrow/channel/397893-announcements/topic/Release%20candidate%3A%20Roc%200.1.0-RC1/near/642546747) + +- RC1 is commit `15177e91f6`; binaries on GitHub. This is Roc's **first-ever + RC process** — Feldman started it partly to establish the process itself. +- **The rules between RC1 and 0.1.0:** the existing feature freeze stays; no + breaking API changes to stdlib or the host boundary unless unavoidable for + an important bug; **no performance improvements at all** (compiler or + runtime) until 0.1.1, which is planned "shortly after" 0.1.0. +- **Bugfix bar for 0.1.0:** only bugs that (a) block real-world Roc programs + (hobby projects and learning materials count) *and* (b) can't be worked + around. Everything else — even compiler crashes — defaults to 0.1.1, with a + deliberately high bar for exceptions. +- **Status as of 2026-11-23:** Feldman, surprised: *"has anyone actually + encountered a blocker bug in RC1? It seems … RC1 is eligible to be promoted + directly to 0.1.0."* Community reports agree: packages and platforms updated + without issue (Niclas Ahden; kaza's roxum; pixelsprout's rocco-engine; + Bryce Miller's Tigerbeetle client and roc-pg). Roux builds except + [roc#13382](https://github.com/roc-lang/roc/issues/13382), which Zak Kohler + worked around. Two non-blockers noted: a basic-cli `Cmd.exec!` + process-replacement quirk when running via `roc ` (issue to be + filed), and an investigated cold-`roc check` slowdown on one small example + (0.05 s CPU on the 2026-11-03 nightly vs 1.00 s on RC1 on a noisy machine; + Steve Howell's write-up hedges heavily on measurement noise). +- **RC1 build-time benchmarks** (Feldman, on a dozen showcase projects): + `roc check` and `roc build --opt=dev` are sub-second even cold; warm + rebuilds under 100 ms. `--opt=dev` was the 0.1.0 priority; speeding up + `--opt=speed`/`--opt=size` gets a priority bump after 0.1.0 (discussed at + the Nov 22 online meetup). + +## 2. The new compiler — state and decisions + +- **It's the shipping compiler.** Community language has flipped: packages are + "ported over to the modern compiler" (plume 0.5.0), rocup was fixed "for + the new zig compiler", and the Exercism track runs on 0.1.0-RC1. +- **Memory management** (#compiler development, "remove morphic?", Nov 13–18): + the new compiler does **not** use Morphic — it implements the successor + algorithm from the Morphic team's own paper + ([ACM](https://dl.acm.org/doi/pdf/10.1145/3798221)), described by Feldman as + "a more powerful alternative" to both Morphic and Perceus-style refcounting. + A long perf thread in the same topic ended well: PR + [roc#13090](https://github.com/roc-lang/roc/pull/13090) brought unmodified + functional-style code to within ~3% more instructions than a hand-written C + port (a `.ok_or` default was defeating in-place buffer reuse; `List.update` + also lacked the in-place-mutation eligibility check `List.set` has — being + fixed). GordonBGood confirmed on the Nov 18 nightly that functional style + no longer carries an execution-time penalty. +- **Breaking change announced 2026-11-12** (#announcements, "breaking changes: + operator desugaring and shadowing", 16 msgs): a default-number-resolution + bug forced changes to operator desugaring — operators no longer require + both operands and the result to share one type, enabling e.g. + `my_duration * 12` (Duration × U64) instead of forcing the literal to be a + Duration. +- **Regression found and filed:** unwrapping an `Ok` in `main!` stopped + compiling (works at top level) — Niclas Ahden filed + [roc#13281](https://github.com/roc-lang/roc/issues/13281) at Feldman's + request (Nov 20). +- **Zig toolchain:** a **Zig 0.17 arena double-allocation bug** "can plausibly + bloat Roc programs" (#bugs, Oct 26). Anton started the **Zig 0.17.1 + upgrade** on Nov 5. Roc was also submitted to **Compiler Explorer** + (godbolt) via a community PR (Nov 16). + +## 3. Tooling and distribution + +- **Official VS Code extension** (announced Nov 5, Anton): syntax + highlighting (including Roc in doc comments/Markdown), diagnostics as you + type, formatting (format-on-save default), hover with inferred types. + Publisher verification is pending on Microsoft's side. Luke Boswell's fork + inspired "vital components". +- **Signed macOS nightly binaries** (Nov 20, 18 reactions): Intel and Apple + Silicon nightlies are now officially signed — no more Gatekeeper warnings. +- **Homebrew install** announced Nov 21; Anton will also make a PR to add Roc + to **mise**. +- **Exercism:** the Roc track is now running on 0.1.0-RC1 (Nov 22). +- **ReleaseSafe nightlies** are now published alongside regular nightlies + (Anton, in the LSP-bug thread) "for people who want that extra security". +- **LSP outage fixed:** the month's biggest bug thread — "LSP does not work + after latest nightly" (#bugs, 79 messages, Oct 25 → Nov 14) — was confirmed + fixed on Nov 13–14 ("yes, now it works, thanks!"). The thread also ranged + into LSP/compiler-memory security trade-offs. + +## 4. Language-design conversations and decisions + +- **Linear types — decided against** (#ideas, 48 msgs, Nov 22–23). Steve + Howell asked for linear types to enforce resource cleanup (auto-close) in + his roc-chat server. Feldman's answer, in detail: verifying compile-time + uniqueness requires either a very restrictive memory model (e.g. Goose) or + "approximately the same amount of type-system complexity and annotation + verbosity as Rust" — *"the cure is worse than the disease."* Roc's answer + remains **FBIP** (Functional But In-Place), which Feldman notes came from + Koka via Folkert's thesis adviser. Expect this request to keep recurring; + the reasoning is now on record. +- **Reflection / reification — the biggest design conversation of the month** + (#ideas): "SurrealDB query builder based on reifying" (270 msgs) and + "Reflection — typed function bodies as Roc values (reifying)" (194 msgs). + Karakatiza maintains a compiler fork with working reification — + [github.com/Karakatiza666/roc/tree/reify](https://github.com/Karakatiza666/roc/tree/reify) + — with design docs and examples, used to build type-safe query builders. + This is experimental-fork work, not a mainline commitment, but it's where + the typed-reflection design is being hashed out. Related: "Type reflection + — Zig `@typeInfo()` equivalent" and a CBOR-serialization design thread + (39 msgs). +- **Compiler API / introspection — wanted, not planned** (#platform + development, "Compiler API?", Nov 22): Jack Scully's Convex-style platform + needs an app's exported endpoints with resolved types; today that means + hand-rolled parsers or `--introspect` hacks. Luke Boswell pointed to an + old tooling gist; Feldman is cautious — in the linear-types thread he + generalised: exposing IR/APIs makes them unchangeable ("a main reason Atom + got surpassed by VS Code"), so *"be very careful about what APIs to + expose."* +- **Smaller design threads:** "Reworking Rust Glue" (19 msgs — Karl's + RustGlue.roc may replace the repo's glue scripts as the recommended + starting point); "requiring more type annotations?" (18 msgs); "In file + evaluation/repl" (17 msgs — Kilian Vounckx, returning after a long absence, + proposed REPL-style in-file evaluation; nothing decided). + +## 5. The documentation push (#contributing) + +The "Docathon?" thread (144 msgs, **73 reactions — the most-reacted topic +overall**) became a month-long docs effort ahead of 0.1.0: + +- **15 new code examples on the website** (Aurélien Geron, Oct 27): + AdvancedParsing, Loops, NestedTypes, NominalTypes, OpenRecords, Paths, + PatternAliases, Polymorphism, RecursiveTypes, RocRay, Sets, Streams, + StringPatterns, Unicode, WrappingArithmetic — reviewed by Anton and Luke + Boswell. +- The mini-tutorial **will be replaced before 0.1** (Anton). +- Langref expectations set explicitly to "after 0.1.0" (PR #12758) — Feldman: + "no need to promise things unnecessarily." +- **New website search is live** (Nov 1). +- Steve Howell is writing **"a little Roc book"** — early draft at + [roc.lynrummy.com/tutorial](https://roc.lynrummy.com/tutorial/introduction.html). +- A community **Roc style guide** (Steve Howell, LLM-drafted, human review + requested) drew concrete state-machine idiom rules from notramo in + #beginners (96-msgs thread). + +## 6. The controversy: LLM-generated code and community culture + +The month's most emotionally charged conversation, worth knowing about +because it may produce policy: + +- **"Goodbye"** (#off topic, 52 msgs, 65 reactions, Nov 19–21): Hannes — an + early, multi-year contributor (he built + [hasnep.github.io/roc-packages](https://hasnep.github.io/roc-packages)) — + announced he's leaving. His reason, in his own framing: show-and-tell is + now dominated by LLM-generated code he learns nothing from ("if I notice + any interesting decisions in the code I doubt the author will be able to + explain it"), chat is full of "claudeisms", and he prefers the Gleam + community, which "seems to value effort over output". He explicitly does + **not** think Roc should be anti-LLM like Zig. +- A sibling thread — "roc on a unikernel (venting about LLM policies)" + (#show and tell, 125 msgs) — started from the Zig project auto-closing an + LLM-disclosed issue with a clear reproducer, and ranged widely over + upstream-project LLM policies. +- **Feldman's response** (Nov 20): warm goodbye to Hannes; on policy, *"short + answer: I'm not sure, need to think about it more based on what other + communities have done"*; every community is going through some version of + this and compositions are changing either way; his stated personal view is + to advocate common ground and kindness. **No policy has been adopted.** +- Constructive proposals floated: self-reported "human-code scores" / + AI-declaration standards for shared projects (removewingman links + ai-declaration.md). Anton gently pushed back that the team's actual focus + has been "solving bugs, improving performance and updating the various + packages and platforms." + +## 7. Platforms and projects — what's new or shipping + +Platforms: + +- **concave** (Jack Scully, Nov 23) — Convex-inspired reactive web platform + on 0.1.0-RC1: serverless, scale-to-zero, front+back reactivity, deploys to + Google Cloud Run + serverless Postgres. +- **roxum** (kaza, Nov 7) — web platform bringing axum's style/safety to Roc + ([github.com/KouYuume/roxum](https://github.com/KouYuume/roxum)). +- **roc-platform-patcher** (Scott Campbell, Oct 30) — "alter & tailor + platforms": inject middleware into a platform to observe/alter effects, + monitor allocations, stub or hot-swap effect implementations. +- **DST platform thesis** (Jan Rüggeberg, #platform development) — a + deterministic-simulation-testing platform simulating a basic-cli subset + for a Raft KV store; Luke Boswell: DST *"would be an excellent pitch for + Roc"* and may validate compiler determinism. +- **trantor** (Karl) — "an extensible platform system", listed for the 0.1.0 + showcase. +- **Kite** (Karl, Nov 23) — a native GUI platform, just pushed to GitHub, + feedback wanted. + +Projects/apps: + +- **Rocco game engine** (pixelsprout) — the month's most active project: + v0.6.0 (Oct 28: positional audio, PBR/shadow maps, tone mapping, gamepad) + → v0.10.0 (Nov 4: environments, fog, bloom) → **web builds via Roc→wasm + + WebGPU** (Nov 16) with an interactive web tour; an "Agent town" experiment + visualises Claude/Codex tool-call events in-game; the community spent + Nov 23 on Rocco's branding/identity. +- **Roclet** (Aurélien Geron, Nov 2) — reactive notebooks in Roc running in + the browser, even offline ([ageron.github.io/roclet](https://ageron.github.io/roclet/)). +- **roc-chat** (Steve Howell, Nov 19) — a chat server ported from his Zig + server, deployed (rough edges acknowledged). +- **Roc on a unikernel** (Steve Howell) — a Roc app running on + zig-metal-unikernel + zig-webbox. +- **roc-native-android 0.0.1** (Luke Boswell, Nov 22) — piloting the + roc-signals reactive engine for native Android UI. + +Packages (mostly Luke Boswell's prolific run): **roc-signals 0.3.0** +(reactive engine overhauled), **roc-fuzz 0.7.0** (many fuzz targets in one +binary), **roc-docx 0.1.0-rc1**, **roc-pdf 0.1.0** — and roc-pdf is **in +production**: Niclas Ahden generates real-estate record-sale flyers with it +— **plume 0.5.0/0.6.0** (Plotly), **roc-ray 0.12.0**, **roc-graph-layout +0.3.0-rc3** (renders Mermaid), **roc-gui 0.1.0-rc1**, **roc-playwright +0.13.0**, **roc-isodate 0.8.0**, **roc-regex** ("competitive with Rust's +regex crate" on wide-SIMD machines), **roc-syntax-color**. Note: two +independent packages both named roc-markdown exist (Karl's and Steve +Howell's) — flagged in-chat as a possible confusion. + +Also: a **community showcase** for the 0.1.0 announcement blog post is being +assembled in #show and tell (40 msgs, 44 reactions) — Feldman explicitly +wants variety to show Roc's "long tail of domains". And the "How close can +pure FP get to C?" blog post did the rounds: #8 on HN, #4 on Lobsters, #2 on +r/programming at peak. + +## 8. Community pulse + +- **Most active voices:** notramo (523 msgs), Steve Howell (438), Richard + Feldman (270), Luke Boswell (235), Krzysztof Skowronek (157), Anton (115). +- **Roc Online Meetup Nov 2026** was held Nov 22 (the Oct meetup was Oct 24); + meetup discussion fed the `--opt=speed` priority decision. +- **Build-times survey** (#announcements, Oct 24): Niclas Ahden published + per-project LOC/s numbers on the pre-RC compiler (e.g. a 76k-LOC server at + ~5.9k LOC/s cold) — useful baseline for the RC1 improvements. +- **Bugs stream otherwise:** recursive-types inference issue (known root + cause family), a crash on nested derived encoders (Nov 22), the Zig arena + bug above. Nothing else looks release-blocking. +- New contributors keep arriving (e.g. Jack Scully — formally-verified + kernels background — who within days was building the concave platform). + +--- + +## 9. Could this be a recurring digest? — feasibility + +**Yes, cheaply, with the access already in place.** + +- **Access:** the laptop's `/home/user/zuliprc` user API key works for reads + today. A digest job should run *from the laptop* (via laptop-agent, like + this run) so the key never has to be copied to the sandbox. Note the key is + a full account API key, not a read-only credential — a digest job only + reads, but anything holding the key could post as Drew; keeping it on the + laptop, in the existing mode-600 file, is the right posture. +- **Cost/limits:** this full 30-day pull was 19 stream queries + paging — + under a minute, ~2,400 messages. A weekly pull is ~500–600 messages and a + handful of requests, far inside Zulip's API rate limits (the REST API + happily serves 1,000-message pages). Zulip also offers event queues + (`POST /register`) if near-real-time were ever wanted; unnecessary for a + digest. +- **Retention:** zulipchat.com hosted history is fully API-readable well + beyond 30 days (the window here was a choice, not a limit), so a missed + week is recoverable. Edited/deleted messages simply reflect current state. +- **Shape of the job:** a small deterministic fetch+aggregate script on the + laptop (stream/topic/reaction tables, keyword flags) + an LLM summarisation + pass — exactly this run's recipe. The only judgement calls to fix in + advance: which streams to include (all public ones worked well), whether + DMs stay excluded (recommended: yes), and the window (7 days, with the + topic tables making slow-burn threads visible across weeks). +- **No cron was created** — this section is the feasibility note only, per + instructions. + +## Appendix — messages per stream (2026-10-24 → 2026-11-23) + +| Stream | Msgs | Drew subscribed | +|---|---:|---| +| ideas | 682 | yes | +| show and tell | 458 | yes | +| beginners | 411 | yes | +| contributing | 293 | yes | +| off topic | 148 | yes | +| bugs | 100 | yes | +| announcements | 92 | yes | +| community | 31 | yes | +| gatherings | 27 | yes | +| performance | 27 | yes | +| compiler development | 26 | no (public, included) | +| introductions | 25 | yes | +| advent of code | 18 | no (public, included) | +| platform development | 17 | no (public, included) | +| API design / book / editor / roctoberfest / software unscripted podcast | 0 | no (public, quiet) | +| **Total** | **2,355** | | + +*Raw fetched records and the analysis tables remain on the laptop at +`/tmp/roc-zulip/` (messages.jsonl, fetch-stats.json, analysis.txt) — note +/tmp is ephemeral; this digest is the durable copy.* diff --git a/doc/README.md b/doc/README.md index 867c7bc9c..7a7d7aa56 100644 --- a/doc/README.md +++ b/doc/README.md @@ -58,6 +58,7 @@ This list is the workflow's request catalog (`request_catalog` in [`.agents/rese ## Dated records - [Free models & free tokens census](2026-11-24T01-21-58Z_research_free-census/2026-11-24T01-21-58Z_research_free-census.md) — dated record of the 2026-11-23 free-provider and free-token census; the evidence base for the free-first route order (tracking #13877). +- [Roc investigation — research corpus](2026-11-24T02-09-38Z_research_roc-investigation/2026-11-24T02-09-38Z_research_roc-investigation.md) — dated record of the 2026-11-23 Roc ecosystem investigation (blog catalogue, ecosystem survey, platform-design note, Zulip digest, repo-bundle research set); the talks/media catalogue lives at `doc/living/roc/` (tracking #13877). Folders are named `__`. The kinds in use are `feature`, `design`, `architecture`, `phase`, `fix`, `reference`, `research` and `report`. A `report` record is the usual home for lane work product — a report or one-off with all of its gathered material in the folder; [`DOCUMENTATION_PROTOCOL.md`](DOCUMENTATION_PROTOCOL.md) gives the landing rules. Run `ls doc/` to list them all. Some starting points: diff --git a/doc/living/roc/talks-and-announcements.md b/doc/living/roc/talks-and-announcements.md new file mode 100644 index 000000000..e6597a2ae --- /dev/null +++ b/doc/living/roc/talks-and-announcements.md @@ -0,0 +1,231 @@ +--- +created: 2026-11-23 +last-modified: 2026-11-24 +revision: 1 +--- + +# Roc — Talks, Videos, Releases & Announcements + +*Compiled 2026-11-23. The public-showcase side of the Roc ecosystem: people +showing off the language, the new (Zig-based) compiler, and what has actually +shipped. Recent and new-compiler material first; landmark older talks a +newcomer should still watch are included and marked.* + +## (a) Talks & videos + +### New compiler / recent + +- **Roc & Zig: A Compiler Rewrite Story** — Anjana Vakil & Richard Feldman, + GOTO Unscripted (recorded at GOTO Copenhagen; published to YouTube June 5, + 2026). Feldman traces the ground-up rewrite of Roc's ~300K-line compiler from + Rust to Zig, and how it coincided with the year AI coding assistants went + from test-porting grunt work to genuine architectural collaborators. Also + states on the record that "Roc v1" (0.1) is due before the end of 2026. + **This is the single best watch-first item for the new compiler.** + https://www.youtube.com/watch?v=XSXGf3oN2yU&list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i + +- **Functional Mechanical Sympathy** (keynote) — Richard Feldman, FUNARCH 2026 + (ACM SIGPLAN workshop on Functional Software Architecture, co-located with + ICFP 2026, Indianapolis, August 2026). Feldman, now listed with Zed + Industries, argues functional programs can be made fast by architecting with + the machine in mind — the performance philosophy behind Roc, presented as a + research-community keynote rather than a product pitch. + https://www.conference-publishing.com/toc/ICFPWS26FUNARCH/abs + +### Richard Feldman conference talks (landmarks and Roc-adjacent) + +- **Outperforming Imperative with Pure Functional Languages** — Richard + Feldman, Strange Loop 2021. *The* landmark Roc talk (~98K views): how a pure + functional language can match or beat imperative performance via + opportunistic in-place mutation, static reference counting, and unboxed + values. Still the clearest introduction to why Roc exists. + https://hacker-tube.org/watch/vzfy4EKwG_Y + +- **Simple Functional Effects with Tag Unions** — Richard Feldman, YOW! 2022. + A design talk on Roc's approach to effects: managed effects expressed with + tag unions instead of monads or effect systems, so effectful code stays + readable and fully inferred. Listed in GOTO's Functional Programming + playlist (item 73). + https://www.youtube.com/playlist?list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i + +- **Why Static Typing Came Back** — Richard Feldman, GOTO Copenhagen 2022. + Not Roc-specific, but the talk that frames Roc's design bet: why dynamic + languages dominated the 1990s and why modern inference-based static typing + (Roc's included) reclaimed their advantages. + https://www.hallway.video/watch/Tml94je2edk + +- **Calling Functions Across Languages** — Richard Feldman, GOTO Chicago 2023. + On FFI and calling across languages in-process; directly relevant to how + Roc platforms (written in Rust/Zig/etc.) host Roc applications, and to + Feldman's platform-design thinking. + https://www.hallway.video/watch/ZOvxa9aKCCg + +- **Rust & Zig Combined** — Richard Feldman, GOTO 2023. How the *original* Roc + compiler combined a Rust codebase with Zig (for its surgical linker and + LLVM bitcode work) — the prequel that makes the later full Zig rewrite much + less surprising. Listed in GOTO's Functional Programming playlist + (item 30). + https://www.youtube.com/playlist?list=PLEx5khR4g7PIyc7AhQEUm06yslH_hWM2i + +- **Intro to Roc & Innovation in Functional Programming** — Richard Feldman & + James Lewis, GOTO Unscripted interview (recorded GOTO Copenhagen, released + April 2024). A relaxed long-form intro: Roc's origins in Elm, platform + architecture, parsing strategy, and where Feldman thinks functional + programming is heading. + https://play.fountain.fm/episode/zdpbCUHdYtpjynPqmIdg + +### Other contributors + +- **Type-directed Defunctionalization in the Presence of Type Classes and + Monomorphization** — Ayaz Hafiz, paper presented at WITS 2024 (Workshop on + the Implementation of Type Systems, London, January 2024). The academic + write-up of Roc's lambda-set specialization — the compiler technique that + lets higher-order Roc code compile to optimal closure-free machine code. + Hafiz also built the new compiler's lambda-set resolution system, so this is + the design lineage of a core piece of the rewrite. + https://roc.zulipchat.com/user_uploads/22008/HudpAdrSn4Rys-i9pv8ZyGBu/ACM-SIGPLAN-Proceedings-Template.pdf + +### Podcast appearances + +- **Roc with Richard Feldman** — Rust in Production, Season 5 Episode 4 + (corrode), November 13, 2025. The most production-focused recent interview: + why the team moved the compiler from Rust to Zig, what Rust can learn from + that decision, and Roc's existing production use (e.g. at Vendr). + https://corrode.dev/podcast/s05e04-roc/ + +- **The Roc Programming Language with Richard Feldman** — The Changelog + Interviews #645 (2025). A wide-ranging 90-minute conversation: static + dispatch, opportunistic mutation, Roc vs Go speed, why Roc will never + self-host, and Roc in the LLM era. Good single-episode overview of the + whole project. + https://changelog.com/podcast/645 + +- **Roc — A Functional Language Looking for Those Software Sweetspots** — + Richard Feldman on Developer Voices (Kris Jenkins), June 2025. Focuses on + what a language makes *harder* as a design tool, and where Roc is hunting + for its niche. (Episode listing page; scroll to the Roc entry.) + https://www.developervoices.com/episodes/ + +- **The Roc Programming Language with Richard Feldman, Parts 1–3** — ADSP: + Algorithms + Data Structures = Programs, Episodes 157–159 (Nov–Dec 2023). + The deepest technical interview series: what "functional" means, type + inference, continuation-passing style, and compiler internals, with Conor + Hoekstra and Bryce Adelstein Lelbach. + https://adspthepodcast.com/2023/11/24/Episode-157.html + +- **Creating a Language: Elixir vs. Roc** — José Valim & Richard Feldman, + Software Unscripted, cross-published by Elixir Wizards (January 11, 2024). + Two language creators comparing notes: how goals shape design tradeoffs, + and Roc's focus on single-threaded performance. + http://www.smartlogic.io/podcast/elixir-wizards/s11-e13-software-unscripted-jose-valim-richard-feldman-elixir-roc/ + +- **Lambda Set Defunctionalization with Ayaz Hafiz** — Software Unscripted + Ep. 85 (January 25, 2024). Feldman interviews core contributor Ayaz Hafiz + on the Roc compiler's most distinctive technique — how lambda sets make + defunctionalization a typed, whole-program optimization. + https://shows.acast.com/software-unscripted/episodes/664fde448c77cc0013b3338a + +## (b) Written announcements & releases + +- **How Our Rust-to-Zig Rewrite is Going** — Richard Feldman, rtfeldman.com, + July 15, 2026. The milestone post: after 487 days, the Zig rewrite of the + 300K-line compiler **passed feature parity** with the original. Includes + build-time comparisons (incremental rebuilds down to 0.035s on Zig 0.17), + hot code loading demos, and the roadmap: version 0.1.0 — Roc's first-ever + numbered release — targeted for later in 2026. + https://rtfeldman.com/rust-to-zig + +- **How Close Can Pure FP Get to C?** — Richard Feldman, rtfeldman.com, + October 22, 2026. The roc-deflate showcase write-up (see demos below): + a pure-Roc DEFLATE implementation benchmarked a median 2.6% (Apple M1) / + 8.9% (Ryzen 3900X) behind libdeflate, the hand-tuned SIMD C library — + with memory safety, purity, and no build scripts. Feldman notes 0.1.0 is + "weeks away" as of this post. + https://rtfeldman.com/fp-vs-c + +- **Rewriting Roc's Compiler in Zig** (decision write-up) — Richard Feldman, + February 2025. The original announcement of the rewrite: why almost every + part of the Rust compiler was due for a rewrite anyway, why Zig over Rust + (compile times, allocator style, direct LLVM bitcode generation), and why + Roc will still never self-host. + https://gist.github.com/rtfeldman/77fb430ee57b42f5f2ca973a3992532f.pibb + +- **0.1 + 0.2** — Richard Feldman, rtfeldman.com, May 28, 2024. The roadmap + post that first laid out what Roc's first two numbered releases would + contain and the project's versioning philosophy. + (Listed at https://rtfeldman.com) + +- **Roc 0.0.0-alpha1 released** — roc-lang/roc, January 29, 2025. The start + of Roc's permanent alpha release series (alpha1–alpha4 "rolling" releases + followed, latest alpha4 in August 2025), replacing the use-a-nightly + free-for-all with pinned, permanently available builds. + https://communick.news/post/2449578/4355026 + +- **Roc's New Compiler for Advent of Code 2025** — Richard Feldman, December + 2025. The hastily-assembled guide that first put the new compiler in the + public's hands: nightly builds, the revised language design, and what + hadn't been ported yet (e.g. exhaustiveness checking). A primary-source + snapshot of the new compiler's state at the end of 2025. + https://gist.github.com/rtfeldman/f46bcbfe5132d62c4095dfa687bb9aa4 + +- **basic-cli releases (0.20.0 → 0.23.0-rc1)** — roc-lang/basic-cli, August + 2025 onward. The flagship CLI platform kept shipping through the compiler + transition: 0.20.0 (Aug 2025) overhauled the Cmd API and massively expanded + test coverage, and the 0.21–0.23 release candidates retarget the platform + line at the new compiler. + https://github.com/roc-lang/basic-cli/releases + +- **basic-webserver releases (0.13.x → 0.14.0-rc1)** — roc-lang/basic-webserver, + 2025–2026. The HTTP server platform (Rust host on Hyper/Tokio) added + multipart/form-data parsing, typed server-sent events, and SQLite support; + its README now states plainly that `main` and the 0.14 release candidates + target Roc's new Zig-based compiler and the old compiler is not supported. + A 0.22.0 release was recorded on November 16, 2026. + https://github.com/roc-lang/basic-webserver/releases + +## (c) Demos & showcases + +- **Rocci Bird, rebuilt on the new compiler** — Brendan Hansknecht's WASM-4 + Flappy Bird clone (art by Luke DeVault), ported by Luke Boswell, playable + in the browser via WebAssembly and embedded in the July 2026 rewrite post. + Under 1,000 lines of Roc; `roc build --opt=size` now produces a 31KB wasm + binary — less than half the old compiler's output. The proof-of-life demo + for feature parity. + https://rtfeldman.com/rust-to-zig + +- **The roc-lang.org homepage REPL** — the new compiler itself, compiled to a + 2.5MB WebAssembly binary, running the "echo" platform in the browser so + anyone can write and run basic Roc programs on the homepage (built by + Stephan). The most accessible hands-on demo of the new compiler — no + install required. + https://rtfeldman.com/rust-to-zig + +- **Hot code loading demo** — video embedded in the rewrite post showing a + running Roc web server and a 2D game picking up code changes on the next + request/frame, with no restart. A headline developer-experience feature of + the new compiler that the old one never had. + https://rtfeldman.com/rust-to-zig + +- **roc-deflate vs libdeflate** — Niclas Åhdén's DEFLATE package (which he + runs in paid production work), optimization-tuned by Feldman until it + trailed the best C implementation by only single-digit percentages across + 144 Silesia-corpus benchmarks. The strongest "pure functional can be fast" + evidence the project has produced. + https://rtfeldman.com/fp-vs-c + +- **Advent of Code 2025 on the new compiler** — the community spent December + 2025 solving Advent of Code with the bleeding-edge compiler, with the core + team actively supporting them on Roc Zulip. Not one demo but dozens of + small real programs — the new compiler's first public stress test. + https://gist.github.com/rtfeldman/f46bcbfe5132d62c4095dfa687bb9aa4 + +--- + +*Further pointer, unverified recording link: Feldman also gave a keynote, +"The Essence of Functional Programming," at Functional Conf (India, +presented remotely), discussed in ADSP Episode 157.* + + +## Change log + +- r1 (2026-11-24): Migrated from hatch-personal workspace/roc-investigation/ under #13877; content unchanged.