Ask HN: What "developer holy war" have you flip-flopped on?
9 points by meowface 20h ago 27 comments
Ask HN: How do you connect with other founders in your city?
5 points by leonagano 1d ago 2 comments
I let LLMs write an Elixir NIF in C; it mostly worked
29 overbring_labs 21 8/15/2025, 4:02:25 PM overbring.com ↗
At the very least, it's fine for personal projects which is something I'm getting into more and more: remembering that computers were meant to create convenience, so writing small programs to make life easier.
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.
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-...
If you want to use a GC language for NIFs, you'd need to hook up your runtime somehow.
IMHO, it makes more sense to lean into the BEAM and use its resource management... my NIFs have all been pretty straight forward to write. All the boiler plate is what it is, and figuring out how to cooperate with the scheuduler for long running code or i/o can be a bit tricky, but if you can do a lot in a BEAM language, the native code ends up being like
Check the arguments, do the thing, return the results.
https://elixirforum.com/t/coding-with-llms-conventions-md-fo...
It's not perfect - you often have to remind it not to write imperative style code and to lean on Elixir conventions like "with" statements, function head matching, not reassigning vars, etc.
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 ;)
https://github.com/cpursley/livefilter/blob/main/lib/live_fi...