{
  "id": 12636013,
  "title": "Unrolled code",
  "url": "https://urgent.news/2026/10/07/unrolled-code",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-07T13:32:07.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://noteflakes.com/articles/2026-10-07-unrolled-code"
  },
  "original_language": "en",
  "account": "The wire report delves into the concept of \"unrolled code\" as demonstrated by the grubby project, a minimal static site generator for git repositories written in Ruby. Grubby generates an HTML page for each file in the repository by running `git ls-tree`, collecting filenames, and then using a primitive templating system with functions like `#fill_template`, `#render_markdown`, and `#write_page` to compose the inner HTML with header and footer files.\n\nThe author draws a comparison between grubby's code and that of ERB and Papercraft, which compile templates into optimized Ruby code that emits snippets of HTML into a buffer. Despite the low-level nature of grubby's code, it remains readable, similar to the code generated by ERB and Papercraft. The author also highlights a less readable but faster alternative to this unrolled code approach.\n\nThe report further explores Herb, a gem with a set of tools for working with ERB templates. Herb's `initialize` method is lengthy (65 LOC) and its individual lines tend to stretch to the edge of the editor window. Despite the complexity, the code is explicit and straightforward, revealing its logic in a clear manner.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}