I love the vibe of squishing formats together — like APE.
I’ve had this problem in the past (shudders in Bazel’s WORKSPACE file) and what eventually ended up saving my bacon was org-babel.
Yes, it does mean that emacs is a build-dependency, but honestly literate programming pretty excellent for untangling the complexities of a large build.
cxr · 3h ago
Useful applications of polyglot files that would unironically be good to see people adopt:
- JS-based build scripts being replaced with HTML/plaintext polyglot files that serve as both the README and the build script and that run in the universal runtime (the browser) rather than requiring e.g. NodeJS; alternatively
- JS/JS polyglot files that you can run with NodeJS if you so choose but that have first-class support for the browser instead
- JSON/HTML+JS polyglot files that parse as valid JSON but that you save with a .htm(l) extension and provide an advanced browser-based viewer for the data encoded in the JSON (especially typed data, e.g. JSON-LD)
fallat · 3h ago
Wow these are really cool ideas.
8thcross · 1h ago
Hmm...It seems that humans should be less interested in such things? Making Makefiles readable by human is less needed in the context of LLMs needs to know about it more than us no?
I’ve had this problem in the past (shudders in Bazel’s WORKSPACE file) and what eventually ended up saving my bacon was org-babel.
Yes, it does mean that emacs is a build-dependency, but honestly literate programming pretty excellent for untangling the complexities of a large build.
- JS-based build scripts being replaced with HTML/plaintext polyglot files that serve as both the README and the build script and that run in the universal runtime (the browser) rather than requiring e.g. NodeJS; alternatively
- JS/JS polyglot files that you can run with NodeJS if you so choose but that have first-class support for the browser instead
- JSON/HTML+JS polyglot files that parse as valid JSON but that you save with a .htm(l) extension and provide an advanced browser-based viewer for the data encoded in the JSON (especially typed data, e.g. JSON-LD)