nbw

nbw

How are you using AI with Elixir at work on production-ready apps?

This is an open discussion to anyone using AI to help them work with Elixir in production-ready apps.

I work on an Elixir app at work that’s mostly backend with no customer facing UI parts, but I haven’t found good ways to use AI in my workflow beyond the obvious things. I’ve talked with my coworkers there seems to a pattern of not trusting generated code that’s larger than a single function, generated tests are inconsistent unless they’re unit tests, etc.. Ultimately your ass is on the line when you ship it so you want to trust what you’ve written.

On a positive note, asking AI to explain something works nicely :+1:. But beyond talking to an LLM and having it clarify or refine things, I’m left wondering if I’m misunderstanding the hype.

There are lots of tools out there (Cursor IDE, Cursor PR review bot, Copilot, Claude, <%= insert your favorite LLM here %>), and apparently LLM’s work quite well with Elixir. The auto-complete from these tools can be really nice (but to me, it’s just nice).

We even have Elixir specific tools like:

Some of these are great if you’re starting a new project, if you want to prove an idea at the surface level, if you’re following Phoenix best practices to make a LiveView CRUD app, etc.. But if you’re working on an existing complicated code base, what tools/workflows are you finding make you more productive?

I’m genuinely looking interested in using AI in a net-positive way (for me and for the company I work for) and would love to hear what works for you beyond creating a new phoenix app.

#ai

Most Liked

martosaur

martosaur

I’m using chat panel in Zed for asking arbitrary questions but that’s about this. I tried agent mode couple of times and it’s not for me. Writing is thinking, and when I don’t write code by hand I find myself out of the feedback loop. Tests IMO is a great example of this. If testing your code is hard, you know something is not right with how you do things. But if you outsource tests to AI, you won’t feel this.

14
Post #2
odd

odd

I immediately thought of this tweet after reading this thread.

Anyway, we’ve been using Claude Code to swap deprecated dependencies, add documentation, write missing tests and even implement small features. It does a pretty good job, especially after adding project specific guidelines to CLAUDE.md.

I asked Claude itself to create the guidelines with a focus on code conventions and patterns, which it did surprisingly well. Then I went through the file, adding, removing and fixing things here and there. For example there’s a section dedicated to testing, explaining how we use our test factory, how we use PhoenixTest for UI tests and so forth. The tests it generates follow our conventions and besides some minor issues like naming, I rarely have to fix anything. The documentation it generates is usually way too verbose and focuses on minute details. Usually it either gets it right the first time, or I have to spend more time talking to it than it would take to do the thing myself. Interesting times, to say the least.

GitHub - ash-project/usage_rules: A tool for synchronizing LLM rules files with your dependencies. · GitHub is definitely worth a read.

eddy147

eddy147

Elixir dev, but 95% only backend, hardly any Phoenix code.
I am using AI mostly with the CLI: gemini or OpenAI’s codex. I use it mostly for analyzing bugs, and acutally never to generate any code. I did that once, and it became a enormous mess and I did not understand the generated code because it was not my own.
If I would generate any code, it would be very small fragments so I can keep control of the big picture.
I mix my editing by using vscode – (actually codium, because the copilot setup message, even though i did not have it installed and not want to, started to bother me) and lazyvim. Both options work good for me, having the windsurf plugin installed, and using that for code completion, not using the chat functionality (in neovim not installed).

Where Next?

Popular in AI / LLMs Top

mayel
You describe a function. An LLM hallucinates it. The BEAM compiles and runs it live in your runtime with no restart, no compile step, no ...
#ai
New
samoloth
Hi, recently I’ve discovered Matt Pocock’s skills for AI agents. They look extremely reasonable, especially after hearing his explanation...
New
Vidar
So in case others find them useful here are 3 of the skills I use. They work pretty well together. Avoid Claude starting agents to plan a...
New
ken-kost
Agreed; I just want to add that IMO Ash amplifies this even further. Especially since the dawn of usage rules. :cowboy_hat_face:
New
DaAnalyst
Claude is really good. It has definitely become an indispensable part of my toolkit. Maybe even the most indispensable after the OS itsel...
New
DaAnalyst
Exactly. A bit off topic, but I think the issue with the machines is they don’t bear any consequences. And even if they did one day, the...
New
nbw
This is an open discussion to anyone using AI to help them work with Elixir in production-ready apps. I work on an Elixir app at work th...
#ai
New
AstonJ
Saw this and wondered what each stage could or might mean for Elixir - anyone given it any thought? What kind of impact do you think it ...
New
SyntaxSorcerer
I found Elixir after a friend recommended looking into it for developing a multi-agent orchestration and task management system. Soon aft...
New
dewetblomerus
Setting up Cursor Background Agents to work with Elixir was a pain, which led me to publish a Docker image just for this and write a blog...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
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
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement