Live data from Hacker News

I let LLMs write an Elixir NIF in C; it mostly worked

overbring.com

1–10 of 73 posts

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#4

I tried to do this a few weeks ago, I tried to build a NIF around an existing C lib. I was using Claude Opus and burned over $300 (I didn't have Pro) on tokens with no usable results.

Get Pro, 4 is quite good at Elixir now but you have to stay on it. 3.5 was not, so I imagine next version of Claude will be able to handle the more esoteric things like NIFs, etc.

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#5
post #4

I tried to do this a few weeks ago, I tried to build a NIF around an existing C lib. I was using Claude Opus and burned over $300 (I didn't have Pro) on tokens with no usable results.

Get Pro, 4 is quite good at Elixir now but you have to stay on it. 3.5 was not, so I imagine next version of Claude will be able to handle the more esoteric things like NIFs, etc.

Get Pro 5.. it will work I promise

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#6
For anyone wondering, the article clarifies that "A NIF is a function that is implemented in C instead of Erlang".

I had a bunch of fun getting ChatGPT Code Interpreter to write (and compile and test) C extensions for SQLite last year: https://simonwillison.net/2024/Mar/23/building-c-extensions-...

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#7
post #5
post #4

Earlier quoted context omitted.

Get Pro, 4 is quite good at Elixir now but you have to stay on it. 3.5 was not, so I imagine next version of Claude will be able to handle the more esoteric things like NIFs, etc.

Get Pro 5.. it will work I promise

I've completely refactored my Elixir codebase with Claude 4, expanded the test suite by 1,000 more tests, and released a few more features faster than I ever have to actual paying customers. Tidewave MCP is helpful as are some custom commands and a well tunded CLAUDE.md But you do you.

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#9
post #2

"it mostly worked" is just a more nuanced way of saying "it didn't work". Apparently the author did eventually get something working, but it is false to say that the LLMs produced a working project.

I dunno. Depending on the writer and their particularly axe to grind the definition can vary widely. I would like it to mean, "any fixes I needed to make were minimal and not time intensive."

Re: I let LLMs write an Elixir NIF in C; it mostly worked

#10
built my startup in elixir. love it but nifs are one of the few ways you can crash the VM. I don't trust myseld to write a nif in production. no way I'd do it with AI in c. Thank god theres projects like rustler which can catch panics before it crashes the main VM.
Post reply on HN