Live data from Hacker News

Nanolang: A tiny experimental language designed to be targeted by coding LLMs

github.com

81–90 of 210 posts

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#81
post #42
post #13

I went looking for a single Markdown file I could dump into an LLM to "teach" it the language and found this one: https://github.com/jordanhubbard/nanolang/blob/main/MEMORY.m... Optimistically I dumped the whole thing into Claude Opus 4.5 as a system prompt to see if it could generate a one-shot program from it: llm -m claude-opus-4.5 \ -s https://raw.githubusercontent.com/jordanhubbard/nanolang/refs/heads/main/MEMOR…

Oh, wow. I thought the control flow from the readme was a little annoying with the prefix -notation for bigger/smaller than; # Control flow if (> x 0) { (println "positive") } else { (println "negative or zero") } But that's nothing compared to the scream for a case/switch-statement in the Mandelbrot example... # Gradient: " .:-=+*#%@" let gradient: string = " .:-=+*#%@" let gradient_len: int = 10 let idx: int = (/ (…

> scream for a case/switch-statement

Maybe I’m missing some context, but all that actually should be needed in the top-level else block is ‘gradient[idx]’. Pretty much anything else is going to be longer, harder to read, and less efficient.

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#82

Earlier quoted context omitted.

Doesn’t that apply to the OP as well?

Yes, I'm not going to fill my precious context with documentation for a programming language This seems like a research dead end to me, the fundamentals are not there

It seems kind of silly that you can’t teach an LLM new tricks though, doesn’t it? This doesn’t sound like an intrinsic limitation and more an artifact of how we produce model weights today.

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#83

There’s both efficacy and token efficiency to consider here. Seems unlikely for an out-of-distribution language to be as effective as one that’s got all the training data in the world. Really needs an agent-oriented “getting started” guide to put in the context, and evals vs. the same task done with Python, Rust etc.

> Really needs an agent-oriented “getting started” guide to put in the context, and evals vs. the same task done with Python, Rust etc.

It has several such documents, including a ~1400 line MEMORY.md file referencing several other such files, a language specification, a collection of ~100 documents containing just about every thought Jordan has ever had about the entire language and the evolution of its implementation, and a collection of examples that includes an SDL2 based OpenGL program.

Obviously, jkh clearly understands the need to bootstrap LLMs on his ~5 month old, self-hosted solo programming language.

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#84
post #75

Earlier quoted context omitted.

Yes, essentially a higher level programming language than what we currently have. A programming language that doesn't have strict syntax, and can be expressed with words or code. And like any other programming language, it includes specifications for the tests and expectations of the result. The programming language can look more like code in parts where the specification needs to be very detailed. I think people can…

Simply put whatever you write should produce the same output regardless of how many times you execute it. The more verbose you make it, the more pointless it becomes. More terse the better.

for the sake of being downvoted: MASM.

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#85

opus is currently the only one that can code rust, but if you give it symbol resolution there is quite literally nothing better. The type system in rust is incredibly powerful and llms are great (just opus for now) at utilizing it.

Codex generates solid Rust in my experience. Just needs a little style guidance

Re: Nanolang: A tiny experimental language designed to be targeted by coding LLMs

#90
post #75

Earlier quoted context omitted.

Simply put whatever you write should produce the same output regardless of how many times you execute it. The more verbose you make it, the more pointless it becomes. More terse the better.

for the sake of being downvoted: MASM.

An LLM could speak FPGA.

Good luck auditing that.

Post reply on HN