"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 let LLMs write an Elixir NIF in C; it mostly worked
61–70 of 73 posts
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#62I would never ever let an LLM anywhere near C code. If you need help from LLM to write a NIF that performs basic C calls to the OS, you probably can’t check if it’s safe. I mean, it needs at least to pass valgrind.
You can use something like Claude Code or Codex CLI and tell it to run valgrind as part of iterating on the code.
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#63"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.
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#64Earlier quoted context omitted.
You can use something like Claude Code or Codex CLI and tell it to run valgrind as part of iterating on the code.
how does it work? does it shell out to subagent? or it has full access to cli? what makes it not perform rm -rf /
yes
> what makes it not perform rm -rf /
by default -- regexes and prayers, but you're expected to use sandboxing
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#65"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.
What if it wrote all of the boilerplate and just let you focus on the important bit that deserves your scrutiny?
You could say I failed every single project I ever built because it took many iterations to get to the final deliverable stage with lots of errors along the way. So more nuance would be needed.
But when it comes to LLMs suddenly we get all gleeful about how negatively we can frame the experience. Even among HN tech scholars.
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#66Re: I let LLMs write an Elixir NIF in C; it mostly worked
#67"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'd say 98% people who say they are programmer in market can't produce good as good as LLM can.
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#68Earlier quoted context omitted.
It's because the most familiar thing to me that uses a NIF was Exqlite, so that was my starting point. Using Rust and Rustler turned out to be way easier and it also now works across Elixir versions 1.14 to 1.18.
Great outcome :)
And it now runs on everything, across more Elixir and Erlang/OTP versions than before!
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#69Why C instead of Rust or Zig? Rustler and Zigler exist. I feel like a Vibecoded NIF in C is the absolute last thing I would want to expose the BEAM to.
Re: I let LLMs write an Elixir NIF in C; it mostly worked
#70Earlier quoted context omitted.
You can use something like Claude Code or Codex CLI and tell it to run valgrind as part of iterating on the code.
how does it work? does it shell out to subagent? or it has full access to cli? what makes it not perform rm -rf /