preciz

preciz

Aider + claude 3.5 sonnet works really well with Elixir

I just want to tell you guys that I have started using aider and since I paired it with claude 3.5 sonnet it has been a game changer.

I was able to accomplish tasks that I had delayed for ~2 years in just minutes.

One of these tasks was that we had an old modal that was still using vanilla JS from the old times when LiveView didn’t have the JS module.
I linked the docs to aider with the
/web https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html

Then after adding the necessary files and shortly prompting it, I waited for the result and it was done.

This combination well deserves the hype.
(I’m not associated with any of the above)

#ai

Most Liked

preciz

preciz

The top model on Aider LLM leaderboard is claude-3.5-sonnet.

I have switched from OpenAI 4o and in my experience in Elixir claude 3.5 sonnet is way ahead.

sbuttgereit

sbuttgereit

I agree with you that LLMs absolutely give no guarantees that they’ll always be correct and that they can be confident in their failures. However, the lesson from an example like this shouldn’t be to conclude that LLMs aren’t useful or helpful in general. They are both useful and helpful more than they’re not… so long as you’re using them correctly and come to them with proper expectations. They are not going to write your application for you or replace the programmer: in fact, I think it takes a more senior developer to really extract the benefit from these tools at this point. I look at LLM given solutions/code much the same way I might approach a Stack Overflow answer to a question I have… often times I find at least enough to set me on the right path… but I also see answers that, through the lens of my experience, I know somehow just “aren’t right” or complete, etc. If I ask the LLM to write code for me, I’m now viewing it very much as a junior developer whose code I need to carefully review. The answers or code don’t always work out or save time, but over repeated iterations, I find that overall I’m clearly more productive.

I also find that these things can be helpful in just explaining the code written by others. What turned my opinion on LLM utility was a task I was asked to do. I was given an MS SQL Server T-SQL routine to convert to PostgreSQL PL/pgSQL which was a long mess of nested loops and conditionals. Another developer on the project asked an LLM to convert the procedure to PostgreSQL and it didn’t work so I got the ask. After my failing to get a correct result a couple of times (missing a conditionally set value a couple of nesting levels away kind of things and not having an example of what actual inputs or outputs were) I turned to the LLM… but I didn’t ask it to create the code, I simply asked it to tell me what the T-SQL routine did in plain English. The LLM got that description spot on, which I could verify, and I was able to produce a correct results (by hand) in a single well structured SQL query at around a third the amount of code. At that point I was sold but also understood the role the LLM should play in the workflow.

Finally, we mustn’t forget that humans can provide wrong answers with strident confidence as well. The original posing of the “Monty Hall Problem” (Monty Hall problem - Wikipedia), and many of subsequent responses to the published solution, demonstrated that, while we may fail in different ways than an LLM, we still can fail with great certitude that we’re right. So I will continue to ask for help from colleagues and delegate tasks to other humans, too… but I’ll also consider the possibility that the answers I get will be wrong or flawed in some way and so will never suspend my judgment or critical evaluations.

preciz

preciz

Auto commits were annoying for me too so I have this in my .aider.conf.yml:

  ## Enable/disable auto commit of LLM changes (default: True)
  auto-commits: false
  
  ## Attribute aider code changes in the git author name (default: True)
  attribute-author: false
  
  ## Attribute aider commits in the git committer name (default: True)
  attribute-committer: false

Last Post!

restlessronin

restlessronin

As a non-IDE option, I offer this tool that I built for providing code context to (primarily) Claude Projects. But it works with OpenAI GPTs as well as LLM chats that don’t have “knowledge” files. It might be particularly useful with o1/o1-mini ATM, since those chats don’t yet allow attachments.

I basically paste my entire codebase in one operation into “Knowledge” in a Claude 3.5 Sonnet Project and work on each task in a single chat. It’s shocking how effective it is.

I’m not knocking Aider/Cursor/Continue, they’re all wonderful projects. It’s just that I find I’m more productive in a chat environment where I go through many iterations on AI generated code before I’m happy with the result. I also like knowing exactly what’s in the context and what the prompt is.

And yes, the tool was dogfooded / bootstrapped with itself :wink:

https://github.com/cyberchitta/llm-context.py

Happy to get feedback from any users. Since this isn’t an elixir project, it might be better to provide specific feedback on the project issues tab, rather than here.

Where Next?

Popular in Discussions Top

AstonJ
Are there any Elixir or Erlang libraries that help with this? I’ve been thinking how streaming services like twitch have exploded recentl...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14350 124
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
fireproofsocks
I’ve been working on an Elixir project that has required a lot of scripting. I usually reach for Elixir because I like it more (and in th...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement