Live data from Hacker News

Maccarone: AI-managed code blocks in Python

github.com

71–75 of 75 posts

Re: Maccarone: AI-managed code blocks in Python

#71
Copilot currently keeps in context the file you are editing. Cross file support is coming but not here.(https://githubnext.com/projects/copilot-view/). But it would be very very useful.

One logical concept that's also been noodling in my brain was to construct a DFA(Deterministic finite automata) from the code seen in all the files and then offer the n-1 tokens to the language model and constrain the nth token's selection from the valid ones. I recall someone did this for things that produce DFAs that are fairly small in size(like JSON) and that essentially produced 100% valid JSON without hallucinations(It could be garbage JSON).

So for example if I had a `class ABC` then typing `abc.` could produce: 1. all the methods on it that were valid and 2. had arguments from the surrounding code informed by the LLM.

Re: Maccarone: AI-managed code blocks in Python

#72

Earlier quoted context omitted.

Where is the above quote from? If I search for it online I can only find your comment here.

Paraphrasing the people defending Copilot and ChatGPT when they came out.

It would be nice to make it clear that you're not actually quoting someone when you use quotation marks to paraphrase them. My concern is that it can come across as a bit of straw-manning otherwise.

Re: Maccarone: AI-managed code blocks in Python

#73
post #71

Copilot currently keeps in context the file you are editing. Cross file support is coming but not here.( https://githubnext.com/projects/copilot-view/ ). But it would be very very useful. One logical concept that's also been noodling in my brain was to construct a DFA(Deterministic finite automata) from the code seen in all the files and then offer the n-1 tokens to the language model and constrain the nth token's se…

[deleted]

Re: Maccarone: AI-managed code blocks in Python

#74
post #48

Very cool project. How reliable are you finding your prompts? They look like good choices based on my experience prompting GPT-3.5 and 4 for code editing. FYI, I think my open source tool aider would work out of the box to serve this use case. You would just run: aider file.py —msg “implement the comments” Of course aider works with any popular language, not just python. And it can do a lot of other coding tasks. It'…

I absolutely love aider and tell everyone I run into about it. Keep it the great work! Question: can aider work with Ooba/llama.CPP/meta code llama on local llm? If not yet, are you planning on it? So many users just can’t use GPT4/Copilot because of corporate policy. But they have Macs with M2.

Aider provides experimental support for LLMs other than OpenAI's GPT-3.5 and GPT-4. The support is currently only experimental for two reasons:

1. GPT-3.5 is just barely capable of editing code to provide aider's interactive "pair programming" style workflow. None of the other models seem to be as capable as GPT-3.5 yet.

2. Just "hooking up" aider to a new model by connecting to its API is almost certainly not enough to get it working in a useful way. Getting aider working well with GPT-3.5 and GPT-4 was a significant undertaking, involving specific code editing prompts and backends for each model and extensive benchmarking [0]. Officially supporting each new LLM will probably require a similar effort to tailor the prompts and editing backends.

Numerous users have done experiments with numerous models. None of these experiments have yet identified other models that look like they are capable of working well with aider. Claude has been the most promising so far, and the new Code Llama looks very interesting on first glance.

Once we see signs that a particular model is capable of code editing, it would be reasonable for aider to attempt to officially support such a model. Until then, aider will simply maintain experimental support for using alternative models.

There is more information on connecting aider to other models, local models and Azure models in the FAQ [1]. There are also ongoing discussions about LLM integrations in the aider discord [2]:

[0] https://aider.chat/docs/benchmarks.html

[1] https://aider.chat/docs/faq.html#can-i-use-aider-with-other-...

[2] https://discord.com/channels/1131200896827654144/11330607806...

Re: Maccarone: AI-managed code blocks in Python

#75

Earlier quoted context omitted.

Paraphrasing the people defending Copilot and ChatGPT when they came out.

It would be nice to make it clear that you're not actually quoting someone when you use quotation marks to paraphrase them. My concern is that it can come across as a bit of straw-manning otherwise.

Fair, though it's too late to edit now.
Post reply on HN