You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to use cataclysm in real world projects, with any language for which a LSP server exists (which are quite a lot).
I would especially like to use it with more strongly typed languages like Rust or TypeScript.
Instead of analyzing the context / globals via run-time reflection, the LSP can be queried.
Code should ideally be generated into the editor instead of being executed blindly, to avoid actual cataclysm ;)
The way it could work is, as a LSP middleman AI:
Write any code that references non-existing types and functions (either write by hand or copy paste from somewhere else, or generate with github copilot)
LSP complains that there are undefined symbols
For each undefined symbol, tell the LSP middleman AI to generate a definition (by moving your cursor onto the identifier and invoking the "generate symbol definition with GPT" action)
It inserts them at the next appropriate outer scope (the scope that is closest to the cursor but such that the symbol will be in scope for all references to it that the user just wrote)
The human proofreads the generated code / adjusts
Repeat workflow until done
LSP would provide enough context for GPT to generate appropriate types and functions that match the expected signatures.
If GPT should also mirror the project's coding style and naming convention inside the body of generated functions, then maybe feeding it the project's source code as custom embeddings would make sense. But as a first step, the info that LSP provides should be sufficient!
I think in languages with strong typing, this would allow GPT to work even better because it doesn't have to infer the types by itself, it can just query the LSP! And the type checker would catch some mistakes. (With type driven development, the user can write the types more expressively to get better AI-generated code.)
tl;dr: Polyglot cataclysm in every language that supports LSP!
What do you think?
The text was updated successfully, but these errors were encountered:
I would love to use cataclysm in real world projects, with any language for which a LSP server exists (which are quite a lot).
I would especially like to use it with more strongly typed languages like Rust or TypeScript.
Instead of analyzing the context / globals via run-time reflection, the LSP can be queried.
Code should ideally be generated into the editor instead of being executed blindly, to avoid actual cataclysm ;)
The way it could work is, as a LSP middleman AI:
LSP would provide enough context for GPT to generate appropriate types and functions that match the expected signatures.
If GPT should also mirror the project's coding style and naming convention inside the body of generated functions, then maybe feeding it the project's source code as custom embeddings would make sense. But as a first step, the info that LSP provides should be sufficient!
I think in languages with strong typing, this would allow GPT to work even better because it doesn't have to infer the types by itself, it can just query the LSP! And the type checker would catch some mistakes. (With type driven development, the user can write the types more expressively to get better AI-generated code.)
tl;dr: Polyglot cataclysm in every language that supports LSP!
What do you think?
The text was updated successfully, but these errors were encountered: