Live data from Hacker News

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

overbring.com

11–20 of 73 posts

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

#11
post #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-...

[deleted]

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

#13
post #7
post #5

Earlier quoted context omitted.

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.

So hard to tell if this is parody or not.

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

#14
post #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-...

Not only C. Can be done in any compiled language (C, Rust, Zig, etc). Not sure if can be done with GC language.

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

#16
post #7
post #5

Earlier quoted context omitted.

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.

Would you be willing to share your CLAUDE.md file contents? I’m vibe coding in Elixir.

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

#18
post #13
post #7

Earlier quoted context omitted.

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.

So hard to tell if this is parody or not.

Its not really hard to tell.

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

#19
post #13
post #7

Earlier quoted context omitted.

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.

So hard to tell if this is parody or not.

Here's one Claude-vibed project that makes me money that I run in addition to my saas, which is Elixir. I'm not strong in TypeScript and this is an Astro static site, so Claude has been really helpful. Backend is Supabase (postgres) and a few background jobs via https://pgflow.dev (pgmq) that fetch and populate job openings and uses some AI steps to filter then classify into the correct categories (among other things, there's also an job application flow and automated email newsletter): https://jobsinappraisal.com

I also "vibed" up this: https://livefilter.fly.dev/todos (https://github.com/cpursley/livefilter) and this: https://star-support-demo.vercel.app/en/getting-started (https://github.com/agoodway/star-support-demo)

I hand wrote very little of this code, but can read most of it - the SQL and Elixir at least ;)

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

#20
I've done this. The NIF worked as in that it ran and was a correct enough NIF. It did not work in terms of solving what I needed it to do. Iteration was a bit painful because it was tangled with a nasty library that needed to be cross-compiled. So when I made a change it seg faulted and I bailed.

I essentially ran out of patience and tried another approach. It involved an LLM running C code so I could check the library output compared to my implementation to make sure it was byte-for-byte.

The C will never ship. I don't have practice writing C so I am very inefficient at it. I read it okay. LLMs are pretty decent help for this type of scrap code.

Post reply on HN