Rich_Morin
I’m curious whether anyone is using AI (really, LLM) assistance in coding Elixir (especially in Livebooks). If so, which chatbots (etc) seem to be working the best?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
I’m posting this in response to Jose’s recent tweet (Cr. link) :
People are sleeping on Elixir for a coding harness:
Hot-code swappi...
New
Hello,
I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
CharlesIrvine
I use ChatGPT quite a bit by asking - “How do I do this using Elixir?” The answers are usually pretty good. Here’s a question I just asked today along with the response:
My question:
Using Elixir, how do I check to see if two lists have the same members, regardless of the order?
ChatGPT said:
ChatGPT
In Elixir, you can check if two lists contain the same members, regardless of order, by sorting each list and comparing them. This approach works because sorting ensures both lists will have the same order if they contain the same elements.
Here’s a simple example:
Example Usage
This approach works well for lists with unique elements. However, if you have large lists and performance is a concern, you might consider using a different approach that doesn’t require sorting, such as converting the lists to maps of element counts and comparing those.
You said:
Are you sure there isn’t a built in function that does this check?
ChatGPT said:
ChatGPT
You’re right; Elixir actually has a built-in function for this exact purpose:
Enum.frequencies/1. By using it, you can create a frequency map for each list and then compare those maps directly, which is both efficient and concise.Here’s how you can do it:
Example Usage
Using
Enum.frequencies/1is beneficial because it directly compares the counts of each unique element in each list, which avoids sorting and is faster for large lists.AndyL
I just had Claude 3.5 Sonnet write a 50 line bash script. With Claude: 5 mins. Without Claude: 20-30 mins. For me, standalone scripts are a sweet spot for the LLMs.
sbuttgereit
A lot of discussion on the general point in this recent discussion: Current status of LLMs writing Elixir code
My initial comments from that thread: Current status of LLMs writing Elixir code - #5 by sbuttgereit
regex.sh
I use Claude and o1 for brainstorming mostly (almost never for code and syntax)
And Perplexity for asking syntax stuff (it provides references)
I’m waiting for good multi-agent system and open-source LLM to fine-tune some model on elixir and use it as programming assistant (similar to o1-mini)
Eiji
Brilliant! If you know better then why using
ChatGPTMaybe for “old, good” language like a
Bash. InElixirLLMs have often no idea about types they use.I use various models from time to time for this purposes, but only if I’m seriously stuck. I can’t trust LLMs after what I experienced in past.
What? Even if we don’t count writing message on chat then still chat bots are replying after few seconds … Simply bookmark Syntax reference @ Elixir’s documentation and use
Ctrl+F(or equivalent on your OS). It should be much faster and you would avoid false results. I really understand that “AI” is good for research (especially if you forgot the naming), but using it for syntax sounds like a overcomplicating problems way too much.If there would be model focused on
Elixirthen I would also be interested. Hopefully it would not make so terrible mistakes, see my post:I’m against calling LLM an
AI. It’s producing too stupid answers to call it intelligence at all. That’s said I’m not against LLMs at all. They could be really useful even in current state as long as they would be used properly. You have to be aware that the answers may be completely wrong, see:So …
I really don’t recommend it. Using LLMs for
Elixirregularly in current state would cause you more problems than solve. Prefer it for research and remember to be as descriptive as possible. You can also probably use it as a “smart” code snippet generator, but really nothing more than that.AndyL
Yeah. Would it be possible to proactively train an LLM to be very proficient at Elixir? How would it be done?
CharlesIrvine
I can see why you were confused. Not a good example.
On some occasions, when you ask how to do something, you do get back a very acceptable answer, but sometimes you don’t. In those cases, if you ask again, maybe with a little different wording, you might get back a better answer.
CharlesIrvine
Good question. I think I saw that with an Azure OpenAI subscription, you can do this. It’s not free though.
Eiji
I understand that, but:
CharlesIrvine
All true!