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

bradley
Hi everyone, I’m curious how people in the Elixir community are approaching evaluation frameworks for AI applications, whether you’re us...
New
DaAnalyst
Note: Not a strictly Elixir question but relates to us as well. A year or so ago I asked Grok (or ChatGPT, can’t remember) what would ha...
New
NickGnd
Hey :waving_hand: Tidewave has just been announced by José Valim :fire: Watch Tidewave transform Claude Desktop into an agent by runni...
New
FlyingNoodle
Hi all I have been doing some pretty intensive research over the last few days around agents/vibe coding. I tried some commercial offeri...
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
onnimonni
Hey, I’ve been extensively using claude code for backend development and data wrangling in the last 6 months and it has worked very well...
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
vkryukov
People are constantly debating which LLM is better for writing Elixir code, so I decided to compare the three SoA models from Google, Ope...
New
DaAnalyst
Just saw a link to this on Zerohedge: It’s not AI. It’s a controlled lab-grown HI (Human Intelligence) currently at ~800K ...
New
DaAnalyst
The new langauge/framework/library.. developers better start writing very exhaustive docs, ..and intent proving tests/examples, ..and int...
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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
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
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement