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. 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).

billylanchantin

billylanchantin

@ragamuf Off topic but that is legitimately one of my favorite quotes ever:

Writing is thinking. To write well is to think clearly. That’s why it’s so hard.

– David McCullough

ragamuf

ragamuf

“Writing is thinking”. Love it.

Where Next?

Popular in AI / LLMs Top

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
Watched this earlier and thought it was worth sharing. For those not aware Geoffrey Hinton is considered one of the godfathers of AI, yet...
New
Exadra37
:tada: My last project is now live: AI Intent Driven Development (IDD) guidelines and instructions for AI Coding Agents, AI Coding Assist...
New
AstonJ
What kind of impact do you think AI will have on programming/tech jobs? Have you or anyone you know been impacted directly? Does it conce...
New
asianfilm
For those who haven’t seen it, here is a research paper from August that found that LLMs perform twice as well with Elixir than with Pyth...
New
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New

We're in Beta

About us Mission Statement