Download this file
| 1 | package bakeoff |
| 2 | |
| 3 | // App is one contestant. |
| 4 | type App struct{ Slug, Language string } |
| 5 | |
| 6 | // Apps lists the contestants in report order. |
| 7 | var Apps = []App{ |
| 8 | {"go", "Go"}, |
| 9 | {"go-rastrillo", "Go + Rastrillo"}, |
| 10 | {"rust", "Rust"}, |
| 11 | {"zig", "Zig"}, |
| 12 | {"ocaml", "OCaml"}, |
| 13 | {"haskell", "Haskell"}, |
| 14 | {"swift", "Swift"}, |
| 15 | {"nim", "Nim"}, |
| 16 | {"spinel", "Spinel"}, |
| 17 | } |
| 18 | |
| 19 | // Language names a slug's setup, or returns the slug itself. |
| 20 | func Language(slug string) string { |
| 21 | for _, a := range Apps { |
| 22 | if a.Slug == slug { |
| 23 | return a.Language |
| 24 | } |
| 25 | } |
| 26 | return slug |
| 27 | } |
| 28 | |
| 29 | // AppName and Host are the slug's Carloku app and hostname. |
| 30 | func AppName(slug string) string { return "todo-" + slug } |
| 31 | |
| 32 | // Measurement hosts carry "-2": the first instances were deleted to empty |
| 33 | // their databases, and a deleted host stays parked until an operator purges |
| 34 | // it (2026-10-24). |
| 35 | func Host(slug string) string { |
| 36 | if h, ok := hostOverride[slug]; ok { |
| 37 | return h |
| 38 | } |
| 39 | return AppName(slug) + "-2.bfj.oncarlos.com" |
| 40 | } |
| 41 | |
| 42 | // hostOverride: Spinel's -2 run broke mid-way (its process exits under |
| 43 | // load), and a used database can't be reset, so it was measured on a third |
| 44 | // fresh instance; its -3 results were lost to an operator slip, so -4 (2026-10-24). |
| 45 | var hostOverride = map[string]string{"spinel": "todo-spinel-4.bfj.oncarlos.com"} |
| 46 | |
| 47 | func URL(slug string) string { return "https://" + Host(slug) } |
| 48 | |