rip-lang 3.9.0 → 3.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,35 @@ All notable changes to Rip will be documented in this file.
7
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
+ ## [3.9.1] - 2026-02-18
11
+
12
+ ### Runtime — Reactivity & Reconciliation
13
+
14
+ - **Auto-batching in event handlers** — DOM event callbacks now automatically batch reactive updates, preventing redundant renders during multi-stash mutations.
15
+ - **Fixed list reconciliation** — Keyed list diffing now handles insert/remove/reorder correctly, resolving issues with fragment teardown and stale nodes.
16
+ - **Fixed fragment teardown** — Components with multiple root elements now clean up all nodes on removal.
17
+ - **Multi-statement computed blocks** — Computed properties can now contain multiple statements, not just a single expression.
18
+
19
+ ### Lexer — Render Rewriter Fix
20
+
21
+ - **Fixed `STRING_END` in render rewriter** — Template strings inside render blocks now correctly handle the closing delimiter, fixing parse errors in components with interpolated template literals.
22
+
23
+ ### UI Framework
24
+
25
+ - **`importRip` race fix** — Concurrent `importRip()` calls no longer produce duplicate module evaluations.
26
+ - **ISO-8601 week numbers** — Added week number utilities for calendar-based components.
27
+ - **Bare dot shorthand for div** — `.className` at the start of a line now implies `div.className`.
28
+
29
+ ### VS Code Extension (0.3.2)
30
+
31
+ - **HTML injection grammar** — `<script type="text/rip">` blocks in HTML files now get Rip syntax highlighting automatically.
32
+
33
+ ### Documentation & Examples
34
+
35
+ - **Sierpinski Triangle demo** — Interactive fractal demo showcasing reactive rendering at `docs/sierpinski.html`.
36
+ - **Playground reorganization** — Consolidated playground into `docs/index.html` with Example tab, active nav highlighting, and View Source panel.
37
+ - **Renamed `apps/` to `demos/`** — Clearer naming for example applications.
38
+
10
39
  ## [3.9.0] - 2026-02-17
11
40
 
12
41
  ### Architecture — Render Rewriter Extraction
package/README.md CHANGED
@@ -9,15 +9,15 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.9.0-blue.svg" alt="Version"></a>
12
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.9.1-blue.svg" alt="Version"></a>
13
13
  <a href="#zero-dependencies"><img src="https://img.shields.io/badge/dependencies-ZERO-brightgreen.svg" alt="Dependencies"></a>
14
- <a href="#"><img src="https://img.shields.io/badge/tests-1%2C242%2F1%2C242-brightgreen.svg" alt="Tests"></a>
14
+ <a href="#"><img src="https://img.shields.io/badge/tests-1%2C243%2F1%2C243-brightgreen.svg" alt="Tests"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
16
16
  </p>
17
17
 
18
18
  ---
19
19
 
20
- Rip is a modern language inspired by CoffeeScript. It compiles to **ES2022** (classes, `?.`, `??`, modules), adds about a **dozen new operators**, includes **built-in reactivity**, and sports a self-hosting compiler with **zero dependencies** — all in under 10,000 lines of code.
20
+ Rip is a modern language inspired by CoffeeScript. It compiles to **ES2022** (classes, `?.`, `??`, modules), adds about a **dozen new operators**, includes **built-in reactivity**, and sports a self-hosting compiler with **zero dependencies** — all in about 11,000 lines of code.
21
21
 
22
22
  > **No imports. No hooks. No dependency arrays. Just write code.**
23
23
 
@@ -262,7 +262,7 @@ Rip's reactivity is framework-agnostic — use it with React, Vue, Svelte, or va
262
262
 
263
263
  ## Rip UI
264
264
 
265
- Ship the ~47KB Rip compiler to the browser. Components are `.rip` source files, compiled on demand, rendered with fine-grained reactivity. No build step. No bundler.
265
+ Load `rip-ui.min.js` (~52KB Brotli) — the Rip compiler and pre-compiled UI framework in one file. Components are `.rip` source files, compiled on demand, rendered with fine-grained reactivity. No build step. No bundler.
266
266
 
267
267
  ```coffee
268
268
  Counter = component
@@ -326,25 +326,25 @@ await rip("res = fetch! 'https://api.example.com/todos/1'; res.json!") // → {
326
326
 
327
327
  ```
328
328
  Source -> Lexer -> emitTypes -> Parser -> S-Expressions -> Codegen -> JavaScript
329
- (2,024) (types.js) (359) ["=", "x", 42] (3,431) + source map
329
+ (1,761) (types.js) (359) ["=", "x", 42] (3,291) + source map
330
330
  ```
331
331
 
332
332
  Simple arrays (with `.loc`) instead of AST node classes. The compiler is self-hosting — `bun run parser` rebuilds from source.
333
333
 
334
334
  | Component | File | Lines |
335
335
  |-----------|------|-------|
336
- | Lexer + Rewriter | `src/lexer.js` | 2,024 |
337
- | Compiler + Codegen | `src/compiler.js` | 3,431 |
336
+ | Lexer + Rewriter | `src/lexer.js` | 1,761 |
337
+ | Compiler + Codegen | `src/compiler.js` | 3,291 |
338
338
  | Type System | `src/types.js` | 1,099 |
339
- | Component System | `src/components.js` | 1,281 |
339
+ | Component System | `src/components.js` | 1,645 |
340
340
  | Source Maps | `src/sourcemaps.js` | 121 |
341
341
  | Parser (generated) | `src/parser.js` | 359 |
342
342
  | Grammar | `src/grammar/grammar.rip` | 944 |
343
343
  | Parser Generator | `src/grammar/solar.rip` | 929 |
344
- | REPL | `src/repl.js` | 582 |
345
- | Browser Entry | `src/browser.js` | 125 |
344
+ | REPL | `src/repl.js` | 601 |
345
+ | Browser Entry | `src/browser.js` | 150 |
346
346
  | Tags | `src/tags.js` | 62 |
347
- | **Total** | | **~10,957** |
347
+ | **Total** | | **~10,962** |
348
348
 
349
349
  ---
350
350
 
@@ -354,15 +354,15 @@ Rip includes optional packages for full-stack development:
354
354
 
355
355
  | Package | Version | Purpose |
356
356
  |---------|---------|---------|
357
- | [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.8.10 | Core language compiler |
357
+ | [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.9.1 | Core language compiler |
358
358
  | [@rip-lang/api](packages/api/) | 1.1.6 | HTTP framework (Sinatra-style routing, 37 validators) |
359
359
  | [@rip-lang/server](packages/server/) | 1.1.5 | Multi-worker app server (hot reload, HTTPS, mDNS) |
360
- | [@rip-lang/db](packages/db/) | 1.1.4 | DuckDB server with official UI (pure Bun FFI) |
360
+ | [@rip-lang/db](packages/db/) | 1.1.5 | DuckDB server with official UI (pure Bun FFI) |
361
361
  | [@rip-lang/ui](packages/ui/) | 0.3.2 | Zero-build reactive web framework (stash, router, hash routing) |
362
362
  | [@rip-lang/swarm](packages/swarm/) | 1.1.3 | Parallel job runner with worker pool |
363
363
  | [@rip-lang/csv](packages/csv/) | 1.1.3 | CSV parser + writer |
364
364
  | [@rip-lang/schema](packages/schema/) | 0.2.0 | Unified schema → TypeScript types, SQL DDL, validation, ORM |
365
- | [VS Code Extension](packages/vscode/) | 0.3.1 | Syntax highlighting, type intelligence, source maps |
365
+ | [VS Code Extension](packages/vscode/) | 0.3.2 | Syntax highlighting, type intelligence, source maps |
366
366
 
367
367
  ```bash
368
368
  bun add -g @rip-lang/db # Installs everything (rip-lang + api + db)
package/docs/RIP-LANG.md CHANGED
@@ -708,6 +708,15 @@ Rip's reactive features are **language-level operators**, not library imports.
708
708
  | `~>` | Effect | "always calls" | Side effect on dependency change |
709
709
  | `=!` | Readonly | "equals, dammit!" | Constant (`const`) |
710
710
 
711
+ ## Reactive Behavior
712
+
713
+ | | `:=` state | `~=` computed | `~>` effect |
714
+ |---|---|---|---|
715
+ | **Purpose** | Hold a mutable value | Derive a value | Perform a side effect |
716
+ | **When it runs** | On write | Lazily, on read | Eagerly, on dependency change |
717
+ | **Caching** | N/A (stores directly) | Yes, memoized | No, always re-runs |
718
+ | **Returns** | A readable/writable value | A readable value | A cleanup function (optional) |
719
+
711
720
  ## State (`:=`)
712
721
 
713
722
  ```coffee
@@ -1530,4 +1539,4 @@ Each would need design discussion before building.
1530
1539
 
1531
1540
  ---
1532
1541
 
1533
- *Rip 3.8 — 1,241 tests passing — Zero dependencies — Self-hosting — ~11,000 LOC*
1542
+ *Rip 3.9 — 1,241 tests passing — Zero dependencies — Self-hosting — ~11,000 LOC*