woohaaha

woohaaha

Get AI code generation tools to create correct Elixir code, or else

Sorry if I’m overthinking this.

To date, Elixir is my favorite language. I don’t think of reaching for another language if I don’t have to… until recently.

Have ya’ll seen how good ChatGPT and Github Copilot are? People are just writing their boilerplate code, and even nuanced code lightning fast :astonished: Only catch is, it’s usually Python or Javascript. I don’t want to use those languages today, but I do want to ship apps ASAP. Seeing how fast these AI tools are generating mostly correct code that is easily tweaked has me reconsidering using Python and Javascript :person_shrugging:

Also, once businesses catch on to the productivity improvements, there may just be a mandate to use only AI supported languages in the office.

I think Elixir should find a way to be properly generated by AI tools lest organizations/developers will start using whatever language is most productive.

Most Liked

dimitarvp

dimitarvp

You are giving both of these tools too much credit.

As @D4no0 mentioned, generating code just so you can get started with task X is not such a huge deal as people make it out to be. Emacs and VIM have had “snippet managers” for decades where you press a particular combo of keys and e.g. get a function with a for-loop over a list written for you.

GitHub Copilot and ChatGPT are better in that for sure – but not by much.

98% of all commercial programming is reading, understanding and modifying code. Improving the 2% that are the writing of the initial code is not impressive by any stretch of the imagination.

And finally, having something generate bigger scaffolds for you comes with the severe disadvantage that you might not understand that initial code and then you’ll lose more time first trying to understand it and then actually extending it or even using it on a basic level.

19
Post #3
al2o3cr

al2o3cr

If you don’t want to work in a circus, don’t work for clowns.

josevalim

josevalim

Creator of Elixir

I believe this was written in a confusing way. The following chart from the article is a bit clearer in that those numbers mean suggestions acceptance rate. So 46% of the suggestions were accepted but this is a quantitative measure and it makes sense they are higher for Java as it has more boilerplate. But here is what I would love to know:

  1. If 54% of the suggestions are rejected, does it mean I need to parse a suggestion and then discard it? Which would mean that most of the time suggestions could be slowing me down?

  2. What is the time taken to accept or reject a suggestion?

  3. Does Copilot tracks what happens with a suggestion? Maybe it is accepted and then it is immediately changed or removed because it was wrong?

In any case, I believe there are two separate discussions here, and they are getting mixed.

  1. Are the AI tools in a state where we can consider them trustworthy or generally acceptable? To me the answer is no. Besides a huge potential copyright issue on tools like Copilot, which has made some organizations ban certain AI tools altogether, there is still a lot to improve. For example, researchers have found that code generated by OpenAI’s Codex contained security vulnerabilities 40% of the time. However, the tools will improve as there is a large amount of techniques and ideas that still have to explored and potentially adopted (such as reinforcement learning with static and security analysis!).

  2. That brings us to the second discussion: should we do what is necessary to get Elixir working with more AI tools? To me, the answer is a 100% yes, because it will only get better and it is not only about code completion.

Where Next?

Popular in AI / LLMs Top

DaAnalyst
Seriously, what do you do while Claude (or whatever you use) is doing its thing?
New
Joser
Claude Code Plugin for Elixir: Custom Skills and Hooks for Better Code Quality I’ve been experimenting with Claude Code for Elixir devel...
New
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
sergio
As more and more code is written by agents, driven by humans, what strategies are you employing to keep the slop at bay? Managing a team...
New
evnp
How do you all feel about the use of AI tools for building Elixir/Phoenix projects, with respect to these topics? Longform context below....
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
Vidar
I’ve been trying to come up with a fairly real life representative way of evaluating code quality from AI, and by extension the functiona...
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
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

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
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
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 39523 209
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New

We're in Beta

About us Mission Statement