Hacker News new | ask | show | jobs
by xscott 95 days ago
I think it would be cool if a language specifically for LLMs came about. It should have something like required preconditions and postconditions so that a deterministic compiler can verify the assumptions the LLM is claiming. Something like a theorem prover, but targeted specifically for programming and efficient compilation/runtime. And it doesn't need all the niceties human programmers tend to prefer (implicit conversions comes to mind).
2 comments

If you're that confident in the LLM's output, just train it to output some kind of intermediate language, or even machine code.

And if you're not that confident, shouldn't you still be optimising for humans, because humans have to check the LLM's output?

At least in programming, humans have to check the product of the LLM's output rather than the output itself.
I'm working on this now.

It's a Profile Guided Optimization language - with memory safety like Rust.

It's extremely easy to optimize assuming you either 1) profile it in production (obviously has costs) or 2) can generate realistic workloads to test against.

It's like Rust, in that it makes expressing common illegal states just outright impossible. Though it goes much further than Rust.

And it's easier to read than Swift or Go.

There's a lot of magic that happens with defaults that languages like Zig or Rust don't want, because they want every cost signal to be as visible as possible, so you can understand the cost of a line and a function.

LLMs with tests can - I hope - do this without that noise.

We shall see.

Do you have a repo?
Yes.

I'm almost ready to launch v0.1 - but the documentation is especially a mess right now, so I don't want to share yet.

I'll update this comment in a week or so [=

Appreciate it!