Remix.run Logo
xg15 a day ago

If we go that route, can we have rich syntax highlighting, "go to definition"/"show usage sites", debuggers etc for the markdown docs as well? :)

But I don't really like the "LLMs as compiler" metaphor. If you followed that logic to the end, you'd have to "rebuild" your entire project from the spec every time the spec changes. Not just would the token cost be insane, but you'd also get a completely different implementation each time, maybe with different UI and design decisions where the spec left things open.

The alternative is to see the code as the source of truth and LLMs as (extremely sophisticated) editing or refactoring tools. Then by all means, still check in your prompts, but now they are documentation on how a feature was implemented, not the source of truth themselves.

MayeulC 16 hours ago | parent [-]

I think that "machine translator" is a much better metaphor: there is a lot more to translating a text than there is to compiling code: contextual cues, cultural settings. Various translations can be equally valid. All translations are imperfect.

Now, if you excuse my ramblings, here are a few ideas: I think we probably need new "programming" languages that are actually specification languages: reproducible default states, deterministic spec-to-code transformation.

I am not sure we actually need the determinism, but that would be a good property to have. At least with the same model/spec/temperature.

Now, prompts mutate the spec, which can also be edited by hand. You can already do this with the final code of course, but it is tedious as it contains many trivial implementation details.

But then, how do you handle bugfixes that need to persist during re-generation? Such as "Both Foo and foo can be present in the same directory if the file system is case-sensitive". If you add them to the spec, you are micro-managing implementation details again. So I think such "bug fixes" should be part of a prompt/spec that is automatically loaded when generating similar snippets (here, file I/O). It feels like I've just reinvented the concept of software libraries, though.