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

overbring_labs

created: Aug. 15, 2025, 4:02 p.m. | updated: Aug. 16, 2025, 12:13 p.m.

This post documents how I built a cross-platform Elixir NIF in C to get on-demand up-to-date disk-usage stats without relying on os_mon and its disksup service. Can an LLM write a NIF in C, and a Makefile? The prompt for step (2) was something like this:“Thinking like an expert in multi-platform C code development, review the following C source for an Erlang NIF. For example (emphasis mine):“The C code is remarkably well-written, demonstrating a strong understanding of cross-platform development, memory management with the Erlang NIF API, and modern C practices. This means that overall the GitHub Build and Test workflow is restricted to a some combinations of Elixir and OTP:strategy : matrix : os : - windows-latest - macos-14 - ubuntu-latest elixir_otp : - { elixir : "1.18" , otp : "27" } - { elixir : "1.17" , otp : "27" } - { elixir : "1.16" , otp : "26" } - { elixir : "1.15" , otp : "26" } # - { elixir: "1.14", otp: "25" } # does not work exclude : - os : windows-latest elixir_otp : { elixir : "1.16" , otp : "26" } - os : windows-latest elixir_otp : { elixir : "1.15" , otp : "26" } fail-fast : falseCan’t LLMs fix that?

20 hours, 33 minutes ago: Hacker News: Front Page