| index 60fd557..6454e83 100644 |
| --- a/report/site/index.html |
| +++ b/report/site/index.html |
| @@ -57,28 +57,28 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| |
| |
| <h2>What stood out</h2> |
| -<ul><li><strong>All nine pass every shared test</strong> on Carloku: 67 of 67, with JavaScript on and with it off.<li><strong>Nim and Zig handled the most traffic</strong> on Carloku's default size: about 1,400 to 1,500 page loads a second, and 3,100 to 3,600 toggles. They also made the smallest programs (under 2 MB) and used the least memory at rest (2.5 to 3.5 MB).<li><strong>Go builds fastest.</strong> About 10 seconds from scratch and under a second to rebuild, with or without Rastrillo.<li><strong>Waking up costs about the same everywhere.</strong> Every app answered its first request after sleeping in 1.2 to 1.5 seconds; about one second of that is Carloku starting the program.<li><strong>Build costs ranged from $2.92 to $10.70.</strong> Rust was the cheapest. Spinel was the most expensive, mostly because getting it to compile for ARM took the builder 77 minutes.<li><strong>Two apps changed under heavy writing.</strong> OCaml served page loads about 25% more slowly afterwards, and Spinel's server process exited and was restarted 16 times during the load test.</ul> |
| +<ul><li><strong>All nine pass every shared test</strong> on Carloku: 67 of 67, with JavaScript on and with it off.<li><strong>Nim and Zig handled the most traffic</strong> on Carloku's default size: about 1,400 to 1,500 page loads a second, and 3,100 to 3,600 toggles. They also made the smallest programs (under 2 MB) and used the least memory at rest (2.5 to 3.5 MB).<li><strong>Go builds fastest.</strong> About 10 seconds from scratch and under a second to rebuild, with or without Rastrillo.<li><strong>Waking up costs about the same everywhere.</strong> Every app answered its first request after sleeping in 1.2 to 1.5 seconds; about one second of that is Carloku starting the program.<li><strong>Build costs ranged from $2.92 to $10.70.</strong> Rust was the cheapest. Spinel was the most expensive, mostly because getting it to compile for ARM took the builder 77 minutes.<li><strong>Spinel restarted under heavy load.</strong> Its server process exited 16 times during the load test, and Carloku started it again each time. In one 10-second step, no request completed at all.</ul> |
| |
| |
| <h2>At a glance</h2> |
| <div class="card scroll"> |
| <table> |
| -<thead><tr><th>Setup</th><th>Tests (JS on · off)</th><th>First byte</th><th>Wake</th><th>Peak reads/s</th><th>Binary</th><th>Cold / warm build</th><th>Lines</th><th>Deps</th><th>Cost</th><th>Readability</th></tr></thead> |
| +<thead><tr><th>Setup</th><th>Tests (JS on · off)</th><th>First byte</th><th>Wake</th><th>Peak reads/s</th><th>Binary</th><th>Cold build / one-line change</th><th>Lines</th><th>Deps</th><th>Cost</th><th>Readability</th></tr></thead> |
| <tbody> |
| <tr><td>Go</td> |
| <td>35/35 · 32/32</td> |
| <td>95.9 ms</td><td>1267 ms</td><td>349</td> |
| -<td>12.3 MB</td><td>10.3 s / 0.2 s</td> |
| +<td>12.3 MB</td><td>10.3 s / 0.1 s</td> |
| <td>880</td><td>1</td><td>$3.69</td><td>8/10</td></tr> |
| <tr><td>Go + Rastrillo</td> |
| <td>35/35 · 32/32</td> |
| <td>56.6 ms</td><td>1369 ms</td><td>336</td> |
| -<td>14.1 MB</td><td>10.4 s / 0.3 s</td> |
| -<td>802</td><td>3</td><td>$4.67</td><td>8/10</td></tr> |
| +<td>14.1 MB</td><td>10.4 s / 0.1 s</td> |
| +<td>797</td><td>3</td><td>$4.67</td><td>8/10</td></tr> |
| <tr><td>Rust</td> |
| <td>35/35 · 32/32</td> |
| <td>93.2 ms</td><td>1245 ms</td><td>904</td> |
| -<td>3.2 MB</td><td>49.6 s / 8.5 s</td> |
| +<td>3.2 MB</td><td>49.6 s / 5.8 s</td> |
| <td>815</td><td>7</td><td>$2.92</td><td>8/10</td></tr> |
| <tr><td>Zig</td> |
| <td>35/35 · 32/32</td> |
| @@ -88,27 +88,27 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| <tr><td>OCaml</td> |
| <td>35/35 · 32/32</td> |
| <td>51.7 ms</td><td>1286 ms</td><td>992</td> |
| -<td>8.2 MB</td><td>18.3 min / 10.0 s</td> |
| +<td>8.2 MB</td><td>18.3 min / 3.3 s</td> |
| <td>697</td><td>9</td><td>$7.65</td><td>8/10</td></tr> |
| <tr><td>Haskell</td> |
| <td>35/35 · 32/32</td> |
| <td>99.3 ms</td><td>1364 ms</td><td>400</td> |
| -<td>28.7 MB</td><td>19.1 min / 104.4 s</td> |
| +<td>28.7 MB</td><td>19.1 min / 26.6 s</td> |
| <td>798</td><td>10</td><td>$5.06</td><td>8/10</td></tr> |
| <tr><td>Swift</td> |
| <td>35/35 · 32/32</td> |
| <td>58.7 ms</td><td>1445 ms</td><td>537</td> |
| -<td>22.0 MB</td><td>81.4 s / 4.1 s</td> |
| -<td>1326</td><td>3</td><td>$4.60</td><td>8/10</td></tr> |
| +<td>22.0 MB</td><td>81.4 s / 3.9 s</td> |
| +<td>725</td><td>3</td><td>$4.60</td><td>8/10</td></tr> |
| <tr><td>Nim</td> |
| <td>35/35 · 32/32</td> |
| <td>50.6 ms</td><td>1299 ms</td><td>1,491</td> |
| <td>1.8 MB</td><td>33.9 s / 0.9 s</td> |
| -<td>931</td><td>2</td><td>$4.84</td><td>8/10</td></tr> |
| +<td>1006</td><td>2</td><td>$4.84</td><td>8/10</td></tr> |
| <tr><td>Spinel</td> |
| <td>35/35 · 32/32</td> |
| <td>94.6 ms</td><td>1285 ms</td><td>722</td> |
| -<td>8.7 MB</td><td>4.8 min / 101.3 s</td> |
| +<td>8.7 MB</td><td>4.8 min / 104.0 s</td> |
| <td>566</td><td>2</td><td>$10.70</td><td>7/10</td></tr> |
| </tbody> |
| </table> |
| @@ -160,13 +160,13 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| <div class="card"> |
| <h3>Peak page loads per second, after the writes</h3> |
| <p class="note">The read ramp again, straight after the toggle ramp, on the same database.</p> |
| -<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Peak page loads per second, after the writes"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H257.5Q261.5 15.0 261.5 19.0V27.0Q261.5 31.0 257.5 31.0H150.0Z"><title>Go: 343</title></path><text class="value" x="267.5" y="28">343</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H255.2Q259.2 45.0 259.2 49.0V57.0Q259.2 61.0 255.2 61.0H150.0Z"><title>Go + Rastrillo: 336</title></path><text class="value" x="265.2" y="58">336</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H599.8Q603.8 75.0 603.8 79.0V87.0Q603.8 91.0 599.8 91.0H150.0Z"><title>Rust: 1,398</title></path><text class="value" x="609.8" y="88">1,398</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H593.6Q597.6 105.0 597.6 109.0V117.0Q597.6 121.0 593.6 121.0H150.0Z"><title>Zig: 1,379</title></path><text class="value" x="603.6" y="118">1,379</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H387.1Q391.1 135.0 391.1 139.0V147.0Q391.1 151.0 387.1 151.0H150.0Z"><title>OCaml: 743</title></path><text class="value" x="397.1" y="148">743</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H272.8Q276.8 165.0 276.8 169.0V177.0Q276.8 181.0 272.8 181.0H150.0Z"><title>Haskell: 391</title></path><text class="value" x="282.8" y="178">391</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H318.6Q322.6 195.0 322.6 199.0V207.0Q322.6 211.0 318.6 211.0H150.0Z"><title>Swift: 532</title></path><text class="value" x="328.6" y="208">532</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H626.0Q630.0 225.0 630.0 229.0V237.0Q630.0 241.0 626.0 241.0H150.0Z"><title>Nim: 1,479</title></path><text class="value" x="636.0" y="238">1,479</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H375.1Q379.1 255.0 379.1 259.0V267.0Q379.1 271.0 375.1 271.0H150.0Z"><title>Spinel: 706</title></path><text class="value" x="385.1" y="268">706</text></svg> |
| +<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Peak page loads per second, after the writes"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H257.5Q261.5 15.0 261.5 19.0V27.0Q261.5 31.0 257.5 31.0H150.0Z"><title>Go: 343</title></path><text class="value" x="267.5" y="28">343</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H255.2Q259.2 45.0 259.2 49.0V57.0Q259.2 61.0 255.2 61.0H150.0Z"><title>Go + Rastrillo: 336</title></path><text class="value" x="265.2" y="58">336</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H599.8Q603.8 75.0 603.8 79.0V87.0Q603.8 91.0 599.8 91.0H150.0Z"><title>Rust: 1,398</title></path><text class="value" x="609.8" y="88">1,398</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H593.6Q597.6 105.0 597.6 109.0V117.0Q597.6 121.0 593.6 121.0H150.0Z"><title>Zig: 1,379</title></path><text class="value" x="603.6" y="118">1,379</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H387.1Q391.1 135.0 391.1 139.0V147.0Q391.1 151.0 387.1 151.0H150.0Z"><title>OCaml: 743</title></path><text class="value" x="397.1" y="148">743</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H272.8Q276.8 165.0 276.8 169.0V177.0Q276.8 181.0 272.8 181.0H150.0Z"><title>Haskell: 391</title></path><text class="value" x="282.8" y="178">391</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H318.6Q322.6 195.0 322.6 199.0V207.0Q322.6 211.0 318.6 211.0H150.0Z"><title>Swift: 532</title></path><text class="value" x="328.6" y="208">532</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H626.0Q630.0 225.0 630.0 229.0V237.0Q630.0 241.0 626.0 241.0H150.0Z"><title>Nim: 1,479</title></path><text class="value" x="636.0" y="238">1,479</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H335.8Q339.8 255.0 339.8 259.0V267.0Q339.8 271.0 335.8 271.0H150.0Z"><title>Spinel: 585</title></path><text class="value" x="345.8" y="268">585</text></svg> |
| </div> |
| |
| <div class="card"> |
| <h3>Page loads after the writes: where it slows down</h3> |
| <p class="note">The same rule, for the read ramp run straight after the writes.</p> |
| -<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Page loads after the writes: where it slows down"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H152.2Q154.3 15.0 154.3 17.2V28.8Q154.3 31.0 152.2 31.0H150.0Z"><title>Go: 8 connections</title></path><text class="value" x="160.3" y="28">8 connections</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H154.7Q158.7 45.0 158.7 49.0V57.0Q158.7 61.0 154.7 61.0H150.0Z"><title>Go + Rastrillo: 16 connections</title></path><text class="value" x="164.7" y="58">16 connections</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H215.6Q219.6 75.0 219.6 79.0V87.0Q219.6 91.0 215.6 91.0H150.0Z"><title>Rust: 128 connections</title></path><text class="value" x="225.6" y="88">128 connections</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H163.4Q167.4 105.0 167.4 109.0V117.0Q167.4 121.0 163.4 121.0H150.0Z"><title>Zig: 32 connections</title></path><text class="value" x="173.4" y="118">32 connections</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H163.4Q167.4 135.0 167.4 139.0V147.0Q167.4 151.0 163.4 151.0H150.0Z"><title>OCaml: 32 connections</title></path><text class="value" x="173.4" y="148">32 connections · Carloku turned some requests away from 128</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H152.2Q154.3 165.0 154.3 167.2V178.8Q154.3 181.0 152.2 181.0H150.0Z"><title>Haskell: 8 connections</title></path><text class="value" x="160.3" y="178">8 connections</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H180.8Q184.8 195.0 184.8 199.0V207.0Q184.8 211.0 180.8 211.0H150.0Z"><title>Swift: 64 connections</title></path><text class="value" x="190.8" y="208">64 connections</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H163.4Q167.4 225.0 167.4 229.0V237.0Q167.4 241.0 163.4 241.0H150.0Z"><title>Nim: 32 connections</title></path><text class="value" x="173.4" y="238">32 connections</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H180.8Q184.8 255.0 184.8 259.0V267.0Q184.8 271.0 180.8 271.0H150.0Z"><title>Spinel: 64 connections</title></path><text class="value" x="190.8" y="268">64 connections · requests started failing from 256</text></svg> |
| +<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Page loads after the writes: where it slows down"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H152.2Q154.3 15.0 154.3 17.2V28.8Q154.3 31.0 152.2 31.0H150.0Z"><title>Go: 8 connections</title></path><text class="value" x="160.3" y="28">8 connections</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H154.7Q158.7 45.0 158.7 49.0V57.0Q158.7 61.0 154.7 61.0H150.0Z"><title>Go + Rastrillo: 16 connections</title></path><text class="value" x="164.7" y="58">16 connections</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H215.6Q219.6 75.0 219.6 79.0V87.0Q219.6 91.0 215.6 91.0H150.0Z"><title>Rust: 128 connections</title></path><text class="value" x="225.6" y="88">128 connections</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H163.4Q167.4 105.0 167.4 109.0V117.0Q167.4 121.0 163.4 121.0H150.0Z"><title>Zig: 32 connections</title></path><text class="value" x="173.4" y="118">32 connections</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H163.4Q167.4 135.0 167.4 139.0V147.0Q167.4 151.0 163.4 151.0H150.0Z"><title>OCaml: 32 connections</title></path><text class="value" x="173.4" y="148">32 connections · Carloku turned some requests away from 128</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H152.2Q154.3 165.0 154.3 167.2V178.8Q154.3 181.0 152.2 181.0H150.0Z"><title>Haskell: 8 connections</title></path><text class="value" x="160.3" y="178">8 connections</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H180.8Q184.8 195.0 184.8 199.0V207.0Q184.8 211.0 180.8 211.0H150.0Z"><title>Swift: 64 connections</title></path><text class="value" x="190.8" y="208">64 connections</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H163.4Q167.4 225.0 167.4 229.0V237.0Q167.4 241.0 163.4 241.0H150.0Z"><title>Nim: 32 connections</title></path><text class="value" x="173.4" y="238">32 connections</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H154.7Q158.7 255.0 158.7 259.0V267.0Q158.7 271.0 154.7 271.0H150.0Z"><title>Spinel: 16 connections</title></path><text class="value" x="164.7" y="268">16 connections · requests started failing from 32</text></svg> |
| </div> |
| |
| <div class="card"> |
| @@ -194,23 +194,17 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| </div> |
| |
| <div class="card"> |
| -<h3>Warm build</h3> |
| -<p class="note">Libraries already compiled; the app rebuilt from clean. Median of three.</p> |
| -<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Warm build"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H150.5Q151.0 15.0 151.0 15.5V30.5Q151.0 31.0 150.5 31.0H150.0Z"><title>Go: 0.2 s</title></path><text class="value" x="157.0" y="28">0.2 s</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H150.6Q151.2 45.0 151.2 45.6V60.4Q151.2 61.0 150.6 61.0H150.0Z"><title>Go + Rastrillo: 0.3 s</title></path><text class="value" x="157.2" y="58">0.3 s</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H183.7Q187.7 75.0 187.7 79.0V87.0Q187.7 91.0 183.7 91.0H150.0Z"><title>Rust: 8.5 s</title></path><text class="value" x="193.7" y="88">8.5 s</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H169.9Q173.9 105.0 173.9 109.0V117.0Q173.9 121.0 169.9 121.0H150.0Z"><title>Zig: 5.4 s</title></path><text class="value" x="179.9" y="118">5.4 s</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H190.4Q194.4 135.0 194.4 139.0V147.0Q194.4 151.0 190.4 151.0H150.0Z"><title>OCaml: 10.0 s</title></path><text class="value" x="200.4" y="148">10.0 s</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H610.8Q614.8 165.0 614.8 169.0V177.0Q614.8 181.0 610.8 181.0H150.0Z"><title>Haskell: 104.4 s</title></path><text class="value" x="620.8" y="178">104.4 s</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H164.4Q168.4 195.0 168.4 199.0V207.0Q168.4 211.0 164.4 211.0H150.0Z"><title>Swift: 4.1 s</title></path><text class="value" x="174.4" y="208">4.1 s</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H152.1Q154.2 225.0 154.2 227.1V238.9Q154.2 241.0 152.1 241.0H150.0Z"><title>Nim: 0.9 s</title></path><text class="value" x="160.2" y="238">0.9 s</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H597.0Q601.0 255.0 601.0 259.0V267.0Q601.0 271.0 597.0 271.0H150.0Z"><title>Spinel: 101.3 s</title></path><text class="value" x="607.0" y="268">101.3 s</text></svg> |
| -</div> |
| - |
| -<div class="card"> |
| -<h3>One-line change</h3> |
| -<p class="note">Rebuild after changing one line in the code that serves the page. Median of three.</p> |
| -<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="One-line change"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H150.2Q150.4 15.0 150.4 15.2V30.8Q150.4 31.0 150.2 31.0H150.0Z"><title>Go: 0.1 s</title></path><text class="value" x="156.4" y="28">0.1 s</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H150.3Q150.6 45.0 150.6 45.3V60.7Q150.6 61.0 150.3 61.0H150.0Z"><title>Go + Rastrillo: 0.1 s</title></path><text class="value" x="156.6" y="58">0.1 s</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H171.7Q175.7 75.0 175.7 79.0V87.0Q175.7 91.0 171.7 91.0H150.0Z"><title>Rust: 5.8 s</title></path><text class="value" x="181.7" y="88">5.8 s</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H170.2Q174.2 105.0 174.2 109.0V117.0Q174.2 121.0 170.2 121.0H150.0Z"><title>Zig: 5.4 s</title></path><text class="value" x="180.2" y="118">5.4 s</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H160.8Q164.8 135.0 164.8 139.0V147.0Q164.8 151.0 160.8 151.0H150.0Z"><title>OCaml: 3.3 s</title></path><text class="value" x="170.8" y="148">3.3 s</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H265.1Q269.1 165.0 269.1 169.0V177.0Q269.1 181.0 265.1 181.0H150.0Z"><title>Haskell: 26.6 s</title></path><text class="value" x="275.1" y="178">26.6 s</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H163.2Q167.2 195.0 167.2 199.0V207.0Q167.2 211.0 163.2 211.0H150.0Z"><title>Swift: 3.9 s</title></path><text class="value" x="173.2" y="208">3.9 s</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H152.1Q154.2 225.0 154.2 227.1V238.9Q154.2 241.0 152.1 241.0H150.0Z"><title>Nim: 0.9 s</title></path><text class="value" x="160.2" y="238">0.9 s</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H610.8Q614.8 255.0 614.8 259.0V267.0Q614.8 271.0 610.8 271.0H150.0Z"><title>Spinel: 104.0 s</title></path><text class="value" x="620.8" y="268">104.0 s</text></svg> |
| +<h3>Rebuild after a one-line change</h3> |
| +<p class="note">Everything already compiled, then one line added to the code that serves the page (a unique comment, so no cache can skip the work). Median of three.</p> |
| +<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Rebuild after a one-line change"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H150.2Q150.4 15.0 150.4 15.2V30.8Q150.4 31.0 150.2 31.0H150.0Z"><title>Go: 0.1 s</title></path><text class="value" x="156.4" y="28">0.1 s</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H150.3Q150.6 45.0 150.6 45.3V60.7Q150.6 61.0 150.3 61.0H150.0Z"><title>Go + Rastrillo: 0.1 s</title></path><text class="value" x="156.6" y="58">0.1 s</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H171.7Q175.7 75.0 175.7 79.0V87.0Q175.7 91.0 171.7 91.0H150.0Z"><title>Rust: 5.8 s</title></path><text class="value" x="181.7" y="88">5.8 s</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H170.2Q174.2 105.0 174.2 109.0V117.0Q174.2 121.0 170.2 121.0H150.0Z"><title>Zig: 5.4 s</title></path><text class="value" x="180.2" y="118">5.4 s</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H160.8Q164.8 135.0 164.8 139.0V147.0Q164.8 151.0 160.8 151.0H150.0Z"><title>OCaml: 3.3 s</title></path><text class="value" x="170.8" y="148">3.3 s</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H265.1Q269.1 165.0 269.1 169.0V177.0Q269.1 181.0 265.1 181.0H150.0Z"><title>Haskell: 26.6 s</title></path><text class="value" x="275.1" y="178">26.6 s</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H163.2Q167.2 195.0 167.2 199.0V207.0Q167.2 211.0 163.2 211.0H150.0Z"><title>Swift: 3.9 s</title></path><text class="value" x="173.2" y="208">3.9 s</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H152.1Q154.2 225.0 154.2 227.1V238.9Q154.2 241.0 152.1 241.0H150.0Z"><title>Nim: 0.9 s</title></path><text class="value" x="160.2" y="238">0.9 s</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H610.8Q614.8 255.0 614.8 259.0V267.0Q614.8 271.0 610.8 271.0H150.0Z"><title>Spinel: 104.0 s</title></path><text class="value" x="620.8" y="268">104.0 s</text></svg> |
| </div> |
| |
| <div class="card"> |
| <h3>Lines of code</h3> |
| <p class="note">Non-blank lines of each app's own code. Tests are not counted.</p> |
| -<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Lines of code"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H390.7Q390.7 15.0 390.7 15.0V31.0Q390.7 31.0 390.7 31.0H150.0Z"><title>Go: server 665</title></path><path class="s2" d="M392.7 15.0H420.8Q420.8 15.0 420.8 15.0V31.0Q420.8 31.0 420.8 31.0H392.7Z"><title>Go: templates 83</title></path><path class="s3" d="M422.8 15.0H464.6Q468.6 15.0 468.6 19.0V27.0Q468.6 31.0 464.6 31.0H422.8Z"><title>Go: JavaScript 132</title></path><text class="value" x="474.6" y="28">880</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H372.3Q372.3 45.0 372.3 45.0V61.0Q372.3 61.0 372.3 61.0H150.0Z"><title>Go + Rastrillo: server 614</title></path><path class="s2" d="M374.3 45.0H409.2Q409.2 45.0 409.2 45.0V61.0Q409.2 61.0 409.2 61.0H374.3Z"><title>Go + Rastrillo: templates 102</title></path><path class="s3" d="M411.2 45.0H436.3Q440.3 45.0 440.3 49.0V57.0Q440.3 61.0 436.3 61.0H411.2Z"><title>Go + Rastrillo: JavaScript 86</title></path><text class="value" x="446.3" y="58">802</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H404.1Q404.1 75.0 404.1 75.0V91.0Q404.1 91.0 404.1 91.0H150.0Z"><title>Rust: server 702</title></path><path class="s3" d="M408.1 75.0H443.0Q447.0 75.0 447.0 79.0V87.0Q447.0 91.0 443.0 91.0H408.1Z"><title>Rust: JavaScript 113</title></path><text class="value" x="451.0" y="88">815</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H499.0Q499.0 105.0 499.0 105.0V121.0Q499.0 121.0 499.0 121.0H150.0Z"><title>Zig: server 964</title></path><path class="s3" d="M503.0 105.0H531.0Q535.0 105.0 535.0 109.0V117.0Q535.0 121.0 531.0 121.0H503.0Z"><title>Zig: JavaScript 94</title></path><text class="value" x="539.0" y="118">1,058</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H366.1Q366.1 135.0 366.1 135.0V151.0Q366.1 151.0 366.1 151.0H150.0Z"><title>OCaml: server 597</title></path><path class="s3" d="M370.1 135.0H400.3Q404.3 135.0 404.3 139.0V147.0Q404.3 151.0 400.3 151.0H370.1Z"><title>OCaml: JavaScript 100</title></path><text class="value" x="408.3" y="148">697</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H398.0Q398.0 165.0 398.0 165.0V181.0Q398.0 181.0 398.0 181.0H150.0Z"><title>Haskell: server 685</title></path><path class="s3" d="M402.0 165.0H436.9Q440.9 165.0 440.9 169.0V177.0Q440.9 181.0 436.9 181.0H402.0Z"><title>Haskell: JavaScript 113</title></path><text class="value" x="444.9" y="178">798</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H602.9Q602.9 195.0 602.9 195.0V211.0Q602.9 211.0 602.9 211.0H150.0Z"><title>Swift: server 1,251</title></path><path class="s3" d="M606.9 195.0H628.0Q632.0 195.0 632.0 199.0V207.0Q632.0 211.0 628.0 211.0H606.9Z"><title>Swift: JavaScript 75</title></path><text class="value" x="636.0" y="208">1,326</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H446.5Q446.5 225.0 446.5 225.0V241.0Q446.5 241.0 446.5 241.0H150.0Z"><title>Nim: server 819</title></path><path class="s3" d="M450.5 225.0H485.0Q489.0 225.0 489.0 229.0V237.0Q489.0 241.0 485.0 241.0H450.5Z"><title>Nim: JavaScript 112</title></path><text class="value" x="493.0" y="238">931</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H329.2Q329.2 255.0 329.2 255.0V271.0Q329.2 271.0 329.2 271.0H150.0Z"><title>Spinel: server 495</title></path><path class="s3" d="M333.2 255.0H352.9Q356.9 255.0 356.9 259.0V267.0Q356.9 271.0 352.9 271.0H333.2Z"><title>Spinel: JavaScript 71</title></path><text class="value" x="360.9" y="268">566</text></svg> |
| +<svg class="chart" viewBox="0 0 680 286" role="img" aria-label="Lines of code"><line class="axis" x1="150" x2="150" y1="8" y2="278"/><text class="label" x="140" y="28">Go</text><path class="s1" d="M150.0 15.0H451.7Q451.7 15.0 451.7 15.0V31.0Q451.7 31.0 451.7 31.0H150.0Z"><title>Go: server 665</title></path><path class="s2" d="M453.7 15.0H489.4Q489.4 15.0 489.4 15.0V31.0Q489.4 31.0 489.4 31.0H453.7Z"><title>Go: templates 83</title></path><path class="s3" d="M491.4 15.0H545.2Q549.2 15.0 549.2 19.0V27.0Q549.2 31.0 545.2 31.0H491.4Z"><title>Go: JavaScript 132</title></path><text class="value" x="555.2" y="28">880</text><text class="label" x="140" y="58">Go + Rastrillo</text><path class="s1" d="M150.0 45.0H426.3Q426.3 45.0 426.3 45.0V61.0Q426.3 61.0 426.3 61.0H150.0Z"><title>Go + Rastrillo: server 609</title></path><path class="s2" d="M428.3 45.0H472.6Q472.6 45.0 472.6 45.0V61.0Q472.6 61.0 472.6 61.0H428.3Z"><title>Go + Rastrillo: templates 102</title></path><path class="s3" d="M474.6 45.0H507.6Q511.6 45.0 511.6 49.0V57.0Q511.6 61.0 507.6 61.0H474.6Z"><title>Go + Rastrillo: JavaScript 86</title></path><text class="value" x="517.6" y="58">797</text><text class="label" x="140" y="88">Rust</text><path class="s1" d="M150.0 75.0H468.5Q468.5 75.0 468.5 75.0V91.0Q468.5 91.0 468.5 91.0H150.0Z"><title>Rust: server 702</title></path><path class="s3" d="M472.5 75.0H517.8Q521.8 75.0 521.8 79.0V87.0Q521.8 91.0 517.8 91.0H472.5Z"><title>Rust: JavaScript 113</title></path><text class="value" x="525.8" y="88">815</text><text class="label" x="140" y="118">Zig</text><path class="s1" d="M150.0 105.0H587.4Q587.4 105.0 587.4 105.0V121.0Q587.4 121.0 587.4 121.0H150.0Z"><title>Zig: server 964</title></path><path class="s3" d="M591.4 105.0H628.0Q632.0 105.0 632.0 109.0V117.0Q632.0 121.0 628.0 121.0H591.4Z"><title>Zig: JavaScript 94</title></path><text class="value" x="636.0" y="118">1,058</text><text class="label" x="140" y="148">OCaml</text><path class="s1" d="M150.0 135.0H420.9Q420.9 135.0 420.9 135.0V151.0Q420.9 151.0 420.9 151.0H150.0Z"><title>OCaml: server 597</title></path><path class="s3" d="M424.9 135.0H464.2Q468.2 135.0 468.2 139.0V147.0Q468.2 151.0 464.2 151.0H424.9Z"><title>OCaml: JavaScript 100</title></path><text class="value" x="472.2" y="148">697</text><text class="label" x="140" y="178">Haskell</text><path class="s1" d="M150.0 165.0H460.8Q460.8 165.0 460.8 165.0V181.0Q460.8 181.0 460.8 181.0H150.0Z"><title>Haskell: server 685</title></path><path class="s3" d="M464.8 165.0H510.0Q514.0 165.0 514.0 169.0V177.0Q514.0 181.0 510.0 181.0H464.8Z"><title>Haskell: JavaScript 113</title></path><text class="value" x="518.0" y="178">798</text><text class="label" x="140" y="208">Swift</text><path class="s1" d="M150.0 195.0H444.9Q444.9 195.0 444.9 195.0V211.0Q444.9 211.0 444.9 211.0H150.0Z"><title>Swift: server 650</title></path><path class="s3" d="M448.9 195.0H476.9Q480.9 195.0 480.9 199.0V207.0Q480.9 211.0 476.9 211.0H448.9Z"><title>Swift: JavaScript 75</title></path><text class="value" x="484.9" y="208">725</text><text class="label" x="140" y="238">Nim</text><path class="s1" d="M150.0 225.0H521.6Q521.6 225.0 521.6 225.0V241.0Q521.6 241.0 521.6 241.0H150.0Z"><title>Nim: server 819</title></path><path class="s2" d="M523.6 225.0H555.6Q555.6 225.0 555.6 225.0V241.0Q555.6 241.0 555.6 241.0H523.6Z"><title>Nim: templates 75</title></path><path class="s3" d="M557.6 225.0H602.4Q606.4 225.0 606.4 229.0V237.0Q606.4 241.0 602.4 241.0H557.6Z"><title>Nim: JavaScript 112</title></path><text class="value" x="612.4" y="238">1,006</text><text class="label" x="140" y="268">Spinel</text><path class="s1" d="M150.0 255.0H374.6Q374.6 255.0 374.6 255.0V271.0Q374.6 271.0 374.6 271.0H150.0Z"><title>Spinel: server 495</title></path><path class="s3" d="M378.6 255.0H404.8Q408.8 255.0 408.8 259.0V267.0Q408.8 271.0 404.8 271.0H378.6Z"><title>Spinel: JavaScript 71</title></path><text class="value" x="412.8" y="268">566</text></svg> |
| <ul class="legend"><li style="--k: var(--s1)">server</li><li style="--k: var(--s2)">templates</li><li style="--k: var(--s3)">JavaScript</li></ul> |
| -<div class="scroll"><table><thead><tr><th>Setup</th><th>server</th><th>templates</th><th>JavaScript</th></tr></thead><tbody><tr><td>Go</td><td>665</td><td>83</td><td>132</td></tr><tr><td>Go + Rastrillo</td><td>614</td><td>102</td><td>86</td></tr><tr><td>Rust</td><td>702</td><td>0</td><td>113</td></tr><tr><td>Zig</td><td>964</td><td>0</td><td>94</td></tr><tr><td>OCaml</td><td>597</td><td>0</td><td>100</td></tr><tr><td>Haskell</td><td>685</td><td>0</td><td>113</td></tr><tr><td>Swift</td><td>1,251</td><td>0</td><td>75</td></tr><tr><td>Nim</td><td>819</td><td>0</td><td>112</td></tr><tr><td>Spinel</td><td>495</td><td>0</td><td>71</td></tr> |
| +<div class="scroll"><table><thead><tr><th>Setup</th><th>server</th><th>templates</th><th>JavaScript</th></tr></thead><tbody><tr><td>Go</td><td>665</td><td>83</td><td>132</td></tr><tr><td>Go + Rastrillo</td><td>609</td><td>102</td><td>86</td></tr><tr><td>Rust</td><td>702</td><td>0</td><td>113</td></tr><tr><td>Zig</td><td>964</td><td>0</td><td>94</td></tr><tr><td>OCaml</td><td>597</td><td>0</td><td>100</td></tr><tr><td>Haskell</td><td>685</td><td>0</td><td>113</td></tr><tr><td>Swift</td><td>650</td><td>0</td><td>75</td></tr><tr><td>Nim</td><td>819</td><td>75</td><td>112</td></tr><tr><td>Spinel</td><td>495</td><td>0</td><td>71</td></tr> |
| </tbody></table></div> |
| </div> |
| |
| @@ -243,7 +237,7 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| |
| <div class="card"> |
| <h3>Go + Rastrillo</h3> |
| -<dl><dt>Live app</dt><dd><a href="https://todo-go-rastrillo-2.bfj.oncarlos.com">https://todo-go-rastrillo-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/go-rastrillo">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/go-rastrillo</a></dd><dt>Stack</dt><dd>Rastrillo 0.28, the CARLOS web framework: chi for routing and GORM over SQLite.</dd><dt>Readability</dt><dd>Strongest: comments consistently explain why (Resolve vs Run and DBPath reset, the 1 MiB form cap preventing an over-long edit reading as delete, originCheck vs csrf.Protect, toggleAll as one statement). The owned()/afterItemWrite/done seam makes a toggle easy to follow from route to SQL to fragment or 303. Weakest: renderStatus swallows template errors without logging while fail() logs with a ref, so one 500 path is silent; several discarded second returns (sessions.UserID, ParseInt) rely on reader trust in middleware; App/Router/Mux is a thin three-layer wrapper and ErrorPage/errorPage differ only by case; the "make bump edits this line" aside is noise.</dd><dt>Left after review</dt><dd><ul><li>[correctness] `apps/go-rastrillo/internal/todo/static/app.js:42` — Every action response replaces the entire app, preserving only the new-todo input. With a request pending, double-click another todo and start editing: when the earlier response arrives, the editor disappears and its unsaved text is lost. Preserve the active editor’s value and focus across replacement, or defer replacement until editing finishes.</li></ul></dd> |
| +<dl><dt>Live app</dt><dd><a href="https://todo-go-rastrillo-2.bfj.oncarlos.com">https://todo-go-rastrillo-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/go-rastrillo">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/go-rastrillo</a></dd><dt>Stack</dt><dd>Rastrillo 0.28, the CARLOS web framework: chi for routing and GORM over SQLite.</dd><dt>Readability</dt><dd>Strongest: a toggle is traceable in seconds — Router lists every route, owned() is the single ownership seam, afterItemWrite maps error/no-row/success to 500/404/done, and done() explains the 303-vs-fragment split. Comments consistently explain why (Resolve not Run, why not csrf.Protect, parseForm's 1 MiB cap, toggleAll's single-statement race note). Weakest: renderStatus swallows template errors with a bare http.Error and no log or ref, unlike fail(); several `uid, _ := sessions.UserID(r)` rely on an invariant stated only in visitor.go; repeated 'the contract' references assume context the reader lacks; done() is a vague name for 'respond after success'. app.go mixes wiring with parseForm middleware.</dd><dt>Left after review</dt><dd><ul><li>[correctness] `apps/go-rastrillo/internal/todo/static/app.js:42` — Every action response replaces the entire app, preserving only the new-todo input. With a request pending, double-click another todo and start editing: when the earlier response arrives, the editor disappears and its unsaved text is lost. Preserve the active editor’s value and focus across replacement, or defer replacement until editing finishes.</li></ul></dd> |
| </dl> |
| </div> |
| |
| @@ -273,13 +267,13 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| |
| <div class="card"> |
| <h3>Swift</h3> |
| -<dl><dt>Live app</dt><dd><a href="https://todo-swift-2.bfj.oncarlos.com">https://todo-swift-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/swift">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/swift</a></dd><dt>Stack</dt><dd>Hummingbird 2 on SwiftNIO, with SQLiteNIO.</dd><dt>Readability</dt><dd>Strongest: a toggle is trivially traceable (route closure → `action` → `Store.toggle` → `changed` → `Page.body`), each file has one clear job, and comments explain decisions (single SQLite connection, append-only migrations, 400-day cookie, the partial header) without restating code. Weakest: `OriginCheck` lives in Visitors.swift and `trimmingWhitespace` is split across Routes.swift and Store.swift; `action` is a generic name for the central request helper; `Store.todos` silently defaults malformed rows (`?? 0`, `?? ""`) rather than failing; a few `try?` cleanups are justified but unlogged, and the logger is otherwise unused. `bumpNote` is build tooling leaking into app code, though documented.</dd><dt>Left after review</dt><dd><ul><li>[correctness] [apps/swift/static/app.js:32](/home/paulca/amadan.net/carlos/todomvc-bakeoff/.worktrees/swift/apps/swift/static/app.js:32): Every action response removes the entire list, including any active editor. Toggle one item, then start editing another before the response arrives: the replacement discards the draft and focus without saving. Serializing requests does not protect unsent edits. Preserve active editor contents and focus across updates, or defer replacement until editing finishes.</li></ul></dd> |
| +<dl><dt>Live app</dt><dd><a href="https://todo-swift-2.bfj.oncarlos.com">https://todo-swift-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/swift">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/swift</a></dd><dt>Stack</dt><dd>Hummingbird 2 on SwiftNIO, with SQLiteNIO.</dd><dt>Readability</dt><dd>Strongest: traceability and comments. Toggling an item reads straight through: route in Routes.register, the shared `action` helper, Store.toggle's single RETURNING statement, then Page.body or a 303. Doc comments explain real decisions (one SQLite connection serialising writes, append-only migrations, 400-day cookie, nojs controls, the JS action queue) with almost no noise. Weakest: a few quiet fallbacks. Store.todos maps missing columns to 0/""/false instead of failing; app.js turns every failed action into a silent page reload; Assets is referenced but its definition (generated) isn't here, and Static.swift is an odd home for one helper. Helper names `action` and `changed` are generic, and the two trimmingWhitespace extensions live in unrelated files.</dd><dt>Left after review</dt><dd><ul><li>[correctness] [apps/swift/static/app.js:32](/home/paulca/amadan.net/carlos/todomvc-bakeoff/.worktrees/swift/apps/swift/static/app.js:32): Every action response removes the entire list, including any active editor. Toggle one item, then start editing another before the response arrives: the replacement discards the draft and focus without saving. Serializing requests does not protect unsent edits. Preserve active editor contents and focus across updates, or defer replacement until editing finishes.</li></ul></dd> |
| </dl> |
| </div> |
| |
| <div class="card"> |
| <h3>Nim</h3> |
| -<dl><dt>Live app</dt><dd><a href="https://todo-nim-2.bfj.oncarlos.com">https://todo-nim-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/nim">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/nim</a></dd><dt>Stack</dt><dd>Nim's standard-library async HTTP server (a patched copy, to serve a Unix socket and cap request bodies), with SQLite through db_connector.</dd><dt>Readability</dt><dd>Strongest: comments explain intent (titleSpaces, maxBody sizing, the chunked-body patch, trimTitle's defect risk) and nothing else; a request is easy to follow from route through action into a single prepared statement in store.nim and back via renderMain. Clear module split with the vendored httpserver marked and its one change flagged. Weakest: action parses paths by splitting and indexing with a `found` flag and a `-1` id sentinel, which is denser than the rest; one-letter names (r, k, st, h) and the Reply-threading through `listFor` take a moment; several SQLite return codes are discarded without a word; page.nimf is included rather than imported, so view rendering is hidden from this file layout.</dd><dt>Left after review</dt><dd><ul><li>[correctness] `apps/nim/src/store.nim:181` — `$column_text(st, 1)` reads a NUL-terminated C string, although titles are stored with an explicit byte length. Posting `title=before%00after` therefore displays only `before`; saving that edit permanently loses the suffix. Read the value using `column_bytes` so accepted Unicode titles survive retrieval intact.</li></ul></dd> |
| +<dl><dt>Live app</dt><dd><a href="https://todo-nim-2.bfj.oncarlos.com">https://todo-nim-2.bfj.oncarlos.com</a></dd><dt>Source</dt><dd><a href="https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/nim">https://amadan.net/carlos/todomvc-bakeoff?ref=main&path=apps/nim</a></dd><dt>Stack</dt><dd>Nim's standard-library async HTTP server (a patched copy, to serve a Unix socket and cap request bodies), with SQLite through db_connector.</dd><dt>Readability</dt><dd>Strongest: comments explain non-obvious decisions (maxBody sizing, trimTitle UTF-8 defect, chunked-body fix flagged in the vendored server, JS request queue and rendering flag) without noise; store.nim's prepared-statement enum plus bound/exec/count keeps SQL in one readable table; app.nim is cleanly sectioned. Weakest: `action` hand-parses path segments with len checks and a `found` flag, so the per-item verbs are harder to scan than a dispatch table would be; the `var r: Reply` side-channel for Set-Cookie headers in `listFor` is indirect; many `discard reset/finalize/close` and a stray `# make bump` comment sitting above the wrong constant. The vendored httpserver.nim is large but well-marked.</dd><dt>Left after review</dt><dd><ul><li>[correctness] `apps/nim/src/store.nim:181` — `$column_text(st, 1)` reads a NUL-terminated C string, although titles are stored with an explicit byte length. Posting `title=before%00after` therefore displays only `before`; saving that edit permanently loses the suffix. Read the value using `column_bytes` so accepted Unicode titles survive retrieval intact.</li></ul></dd> |
| </dl> |
| </div> |
| |
| @@ -291,7 +285,7 @@ dt { color: var(--muted); } dd { margin: 0; color: var(--ink-2); } |
| |
| |
| <h2>How we measured</h2> |
| -<ul><li><strong>The same starting point.</strong> Every builder got the same brief, the same rules for routes and forms, TodoMVC's own page and styles, and the same tests. It chose its own libraries.<li><strong>The same tests.</strong> TodoMVC's 29 standard tests, run with JavaScript on and again with it off, plus checks for unsafe input, foreign characters, very long titles, one visitor reaching another's list, and a screenshot comparison with TodoMVC's own page.<li><strong>One build each.</strong> Opus 5.5 built each app in a single unattended session, with a four-hour limit.<li><strong>One round of review.</strong> Astra reviewed each app for bugs, missed requirements and security problems, and the same builder fixed what it found. A second round was allowed only for security problems; Zig and Nim needed one.<li><strong>Readability.</strong> Fable scored each app's code out of 10 three times, without knowing which app it was. We show the median.<li><strong>Speed.</strong> Measured from one test machine over the internet, one app at a time, each on a fresh copy of the app with an empty database. Time to first byte is the median of 30 page loads. The load test doubles the number of simultaneous connections from 1 upwards, 10 seconds per step, first loading a 50-item list, then ticking a to-do on and off, then loading the list again.<li><strong>Waking up.</strong> Carloku puts an app to sleep after 15 quiet minutes. We timed the first request after each app fell asleep, three times.<li><strong>Builds.</strong> Every app is built for the 64-bit ARM servers Carloku runs on. A cold build compiles every library from scratch, once per app. A warm build and a one-line change are each the median of three.<li><strong>Cost.</strong> What each build and its fixes cost at list price, from the builders' own session records.</ul> |
| +<ul><li><strong>The same starting point.</strong> Every builder got the same brief, the same rules for routes and forms, TodoMVC's own page and styles, and the same tests. It chose its own libraries.<li><strong>The same tests.</strong> TodoMVC's 29 standard tests, run with JavaScript on and again with it off, plus checks for unsafe input, foreign characters, very long titles, one visitor reaching another's list, and a screenshot comparison with TodoMVC's own page.<li><strong>One build each.</strong> Opus 5.5 built each app in a single unattended session, with a four-hour limit.<li><strong>One round of review.</strong> Astra reviewed each app for bugs, missed requirements and security problems, and the same builder fixed what it found. A second round was allowed only for security problems; Zig and Nim needed one.<li><strong>Readability.</strong> Fable scored each app's code out of 10 three times, without knowing which app it was. We show the median.<li><strong>Speed.</strong> Measured from one test machine over the internet, one app at a time, each on a fresh copy of the app with an empty database. Time to first byte is the median of 30 page loads. The load test doubles the number of simultaneous connections from 1 upwards, 10 seconds per step, first loading a 50-item list, then ticking a to-do on and off, then loading the list again.<li><strong>Waking up.</strong> Carloku puts an app to sleep after 15 quiet minutes. We timed the first request after each app fell asleep, three times.<li><strong>Builds.</strong> Every app is built for the 64-bit ARM servers Carloku runs on. A cold build compiles every library from scratch, once per app. A one-line change rebuilds after adding one line to the code that serves the page, with everything else already compiled; it's the median of three.<li><strong>Cost.</strong> What each build and its fixes cost at list price, from the builders' own session records.</ul> |
| |
| <h2>What this does and doesn't show</h2> |
| <ul><li><strong>The network is in every speed number.</strong> Requests travelled from our test machine to Carloku over the internet, and the base delay swung between about 17 and 37 milliseconds during the runs. Small differences in first-byte times mean little.<li><strong>Carloku caps traffic at the edge.</strong> When a request reaches an edge server that isn't the one running the app, Carloku lets at most 64 such requests be in flight at once and turns the rest away with a "try again shortly" response. Above 64 connections, the load test partly measures that limit, and whether it applied depended on how our traffic was routed at the time.<li><strong>Some apps failed outright at very high load.</strong> At 256 or 512 connections, Swift, Nim and Spinel stopped answering some requests, which Carloku's edge reported as errors (502) rather than turning them away. The charts mark where that started.<li><strong>Every app ran on Carloku's default size.</strong> Throughput limits reflect that size, not what each language could do on a bigger server.<li><strong>One build per language.</strong> Another session with the same model could produce a different app, faster or slower.<li><strong>Readability scores cluster.</strong> Most apps scored 8 out of 10. Treat the score as a rough signal.<li><strong>Three apps were built under emulation.</strong> OCaml, Haskell and Spinel had no straightforward way to compile for ARM from our x86 machine, so they were built inside an emulated ARM system. Their build times are much longer for that reason, and don't compare with the others.<li><strong>Spinel restarted under heavy load.</strong> Its server process exited during the load test and Carloku started it again each time.<li><strong>Mojo was dropped.</strong> Mojo can't produce a single self-contained program file, which is what Carloku runs, so we replaced it with Nim. The platform question is filed as <a href="https://amadan.net/carlos/platform/-/discussion/360">an idea</a>.<li><strong>Fresh copies for measuring.</strong> To give every app an empty database, each was measured on a new copy of itself, which is the one the live links point to.</ul> |