zlacker

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

submitted by Scramb+(OP) on 2026-01-19 21:48:07 | 232 points 202 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
◧◩
9. vessen+Nj[view] [source] [discussion] 2026-01-19 23:47:54
>>thorum+ci
A lot of this depends on your workflow. A language with great typing, type checking and good compiler errors will work better in a loop than one with a large surface overhead and syntax complexity, even if it's well represented. This is the instinct behind, e.g. https://github.com/toon-format/toon, a json alternative format. They test LLM accuracy with the format against JSON, (and are generally slightly ahead of JSON).

Additionally just the ability to put an entire language into context for an LLM - a single document explaining everything - is also likely to close the gap.

I was skimming some nano files and while I can't say I loved how it looked, it did look extremely clear. Likely a benefit.

12. simonw+6k[view] [source] 2026-01-19 23:51:38
>>Scramb+(OP)
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/MEMORY.md \
    'Build me a mandelbrot fractal CLI tool in this language' 
   > /tmp/fractal.nano
Here's the transcript for that. The code didn't work: https://gist.github.com/simonw/7847f022566d11629ec2139f1d109...

So I fired up Claude Code inside a checkout of the nanolang and told it how to run the compiler and let it fix the problems... which DID work. Here's that transcript:

https://gisthost.github.io/?9696da6882cb6596be6a9d5196e8a7a5...

And the finished code, with its output in a comment: https://gist.github.com/simonw/e7f3577adcfd392ab7fa23b1295d0...

So yeah, a good LLM can definitely figure out how to use this thing given access to the existing documentation and the ability to run that compiler.

◧◩◪
16. simonw+Dm[view] [source] [discussion] 2026-01-20 00:14:34
>>nodja+9l
Yeah, I think you're right about that.

The thing that really unlocked it was Claude being able to run a file listing against nanolang/examples and then start picking through the examples that were most relevant to figuring out the syntax: https://gisthost.github.io/?9696da6882cb6596be6a9d5196e8a7a5...

◧◩
54. sinuhe+mD[view] [source] [discussion] 2026-01-20 02:59:06
>>spicyb+mf
Pyret, a teaching language for CS, in the vein of Racket, does require testing by writing functions.

https://pyret.org/docs/latest/testing.html

56. jitl+1E[view] [source] 2026-01-20 03:05:46
>>Scramb+(OP)
Author has a Wikipedia page about him linked from his GitHub profile: https://en.wikipedia.org/wiki/Jordan_Hubbard

Summary:

- Co-created FreeBSD.

- Led UNIX technologies at Apple for 13 years

- iXSystems, lead FreeNAS

- idk something about Uber

- Senior Director for GPU Compute Software at NVIDIA

For whatever it’s worth.

◧◩
58. daniel+7G[view] [source] [discussion] 2026-01-20 03:23:21
>>deepsq+br
I’ve been on a similar train of thought. Just last weekend I built a little experiment, using LLMs to highlight pseudocode syntax:

https://x.com/danielvaughn/status/2011280491287364067?s=46

◧◩
60. topspi+yG[view] [source] [discussion] 2026-01-20 03:27:07
>>jitl+1E
a.k.a. jkh. That's a blast from the past. Back in the early FreeBSD days, Jordan was fielding mailing list traffic and holding the project together as people peppered the lists with questions, trying to get their systems running with their sundry bits of hardware. I wondered when he slept.

Apparently he did as well[1]: "The start of the 2.0 ports collection. No sup repository yet, but I'll make one when I wake up again.. :)" Submitted by: jkh Aug 21, 1994

[1] https://github.com/freebsd/freebsd-ports/commit/7ca702f09f29...

Interesting commit starting Ports 2.0. Three version of bash, four versions of Emacs, plus jove.

◧◩
93. cherio+G21[view] [source] [discussion] 2026-01-20 07:34:52
>>tossan+811
The author's answers are toward the bottom of the README, https://github.com/jordanhubbard/nanolang?tab=readme-ov-file...
◧◩◪◨
94. shakna+p41[view] [source] [discussion] 2026-01-20 07:53:06
>>deepsq+TD
We already have exceptionally high level languages, like Inform7 [0]. The concept doesn't work all that well. Terseness is a value. Its why we end up with so many symbol-heavy languages. Yes, there are tradeoffs, but that is the whole of computer science.

We didn't end up with Lean and Rust, for a lack of understanding in how to create strong specifications. Pascal-like languages fell out of favour, despite having higher readability.

[0] https://learnxinyminutes.com/inform7/

◧◩◪
106. gritzk+Ib1[view] [source] [discussion] 2026-01-20 08:56:25
>>ronces+uL
I am working on that https://github.com/gritzko/librdx Conflictless merge and overlay branches (ie freely attachable/detachable by a click). That was the pie-in-the-sky of the CRDT community for maybe 15 years. My current approach is RDX tree CRDT effectively mapping to the AST tree of the program. Like CRDT DOM for the AST, because line based diffs are too clumsy for that.

Back in the day, JetBrains tried revision-controlling AST trees or psi-nodes in their parlance. That project was cancelled, as it became a research challenge. That was 10 years ago or so. At this point, things may work out well, time will tell.

157. runjak+6y2[view] [source] 2026-01-20 17:24:21
>>Scramb+(OP)
Context: This project is by the FreeBSD (co-)founder and former Apple engineering director, Jordan Hubbard. He is now a senior director at Nvidia, according to his public LinkedIn[1].

1. https://www.linkedin.com/in/johubbard/

◧◩◪◨
181. nxobje+UH3[view] [source] [discussion] 2026-01-20 23:39:26
>>nl+9N
I was reading an Ars article by someone who'd hacked up Apple II and Atari 2600 emulators to provide state introspection/reproducible input via MCP, sockets, file I/O - would that work?

https://github.com/benj-edwards/atari800-ai https://github.com/benj-edwards/bobbin

◧◩◪◨⬒⬓⬔⧯▣▦
186. nl+Dk4[view] [source] [discussion] 2026-01-21 05:50:09
>>measur+BH3
> You have access to the best models & yet you still haven't managed to prompt it to give you the code to prove your point so spare me any further theoretical responses. Either show the code to do exactly what you're saying is possible

GPU poor here though...

To quote someone (you...) on the internet:

> More generally, don't ask random people on the internet to do work for you for free.

>>46689232

◧◩◪◨⬒⬓⬔⧯
188. nl+bm4[view] [source] [discussion] 2026-01-21 06:03:10
>>measur+o93
Not exactly sure what you are looking for here.

That GRPO works?

> Group Relative Policy Optimization (GRPO), a variant reinforcement learning (RL) algorithm of Proximal Policy Optimization (PPO) (Schulman et al., 2017). GRPO foregoes the critic model, instead estimating the baseline from group scores, significantly reducing training resources. By solely using a subset of English instruction tuning data, GRPO obtains a substantial improvement over the strong DeepSeekMath-Instruct, including both in-domain (GSM8K: 82.9% → 88.2%, MATH: 46.8% → 51.7%) and out-of-domain mathematical tasks (e.g., CMATH: 84.6% → 88.8%) during the reinforcement learning phase

Page 2 of https://arxiv.org/pdf/2402.03300

That GRPO on code works?

> Similarly, for code competition prompts, a compiler can be utilized to evaluate the model’s responses against a suite of predefined test cases, thereby generating objective feedback on correctness

Page 4 of https://arxiv.org/pdf/2501.12948

◧◩◪◨⬒⬓⬔⧯▣▦
199. e12e+lz7[view] [source] [discussion] 2026-01-22 01:30:57
>>vidarh+Iy5
I was more commenting on the language design here; the idea of indexing into a UTF-8 string and returning an ASCII character. What does the index count? Bytes? There doesn't seem to be a way to get UTF-8 characters from strings?

Ed: There seems to be an UTF-8 library:

https://github.com/jordanhubbard/nanolang/tree/main/modules/...

[go to top]