frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/jordanhubbard/nanolang
51•Scramblejams•3h ago

Comments

JamesTRexx•1h ago
So, then if I want to use a certain terminal text editor to create a clone of it in nanolang, I'd end up typing nano nano.nano on the command line.

I might accidentally summon a certain person from Ork.

spicybright•1h ago
One novel part here is every function is required to have tests that run at compile time.

I'm still skeptical of the value add having to teaching a custom language to an LLM instead of using something like lua or python and applying constraints like test requirements onto that.

prngl•1h ago
Looks nice!
abraxas•1h ago
It seems that something that does away with human friendly syntax and leans more towards a pure AST representation would be even better? Basically a Lisp but with very strict typing might do the trick. And most LLMs are probably trained on lots of Lisps already.
thorum•1h ago
Developed by Jordan Hubbard of NVIDIA (and FreeBSD).

My understanding/experience is that LLM performance in a language scales with how well the language is represented in the training data.

From that assumption, we might expect LLMs to actually do better with an existing language for which more training code is available, even if that language is more complex and seems like it should be “harder” to understand.

whimsicalism•1h ago
easy enough to solve with RL probably
measurablefunc•1h ago
There is no RL for programming languages. Especially ones w/ no significant amount of code.
whimsicalism•1h ago
not even wrong
measurablefunc•56m ago
Exactly.
nxobject•1h ago
I think it's depressingly true of any novel language/framework at this point, especially if they have novel ideas.
vessenes•1h ago
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.

Zigurd•34m ago
It's not just how well the language is represented. Obscure-ish APIs can trip up LLMs. I've been using Antigravity for a Flutter project that uses ATProto. Gemini is very strong at Dart coding, which makes picking up my 17th managed language a breeze. It's also very good at Flutter UI elements. It was noticeably less good at ATProto and its Dart API.

The characteristics of failures have been interesting: As I anticipated it might be, an over ambitious refactoring was a train wreck, easily reverted. But something as simple as regenerating Android launcher icons in a Flutter project was a total blind spot. I had to Google that like some kind of naked savage running through the jungle.

cmrdporcupine•25m ago
Not my experience, honestly. With a good code base for it to explore and good tooling, and a really good prompt I've had excellent results with frankly quite obscure things, including homegrown languages.

As others said, the key is feedback and prompting. In a model with long context, it'll figure it out.

boutell•1h ago
I feel like the time for this was two years ago, and LLMs are now less bothered by remembering syntax than I am. It's a nice lisp-y syntax though.
simonw•1h ago
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.

nodja•52m ago
I think you need to either feed it all of ./docs or give your agent access to those files so it can read them as reference. The MEMORY.md file you posted mentions ./docs/CANONICAL_STYLE.md and ./docs/LLM_CORE_SUBSET.md and they in turn mention indirectly other features and files inside the docs folder.
simonw•37m ago
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...

sheepscreek•43m ago
Really clean language where the design decisions have led to fewer traps (cond is a good choice).

It’s peculiar to see s-expressions mixed together with imperative style. I’ve been experimenting along similar lines - mixing s-expressions with ML style in the same dialect (for a project).

Having an agentic partner toiling away with the lexer/parser/implementation details is truly liberating. It frees the human to explore crazy ideas that would not have been feasible for a side/toy/hobby project earlier.

fizlebit•35m ago
Looks a bit like Rust. My peeve with Rust is that it makes error handling too much donkey work. In a large class of programs you just care that something failed and you want a good description of that thing:

  context("Loading configuration from {file}")
Then you get a useful error message by unfolding all the errors at some point in the program that is makes sense to talk to a human, e.g. logs, rpc error etc.

Failed: Loading configuration from .config because: couldn't open file .config because: file .config does not exist.

It shouldn't be harder than a context command in functions. But somehow Rust conspires to require all this error type conversion and question marks. It it is all just a big uncomfortable donkey game, especially when you have nested closures forced to return errors of a specific type.

wazzaps•21m ago
You just described how the popular "anyhow" and "snafu" crates implement error handling
jmward01•25m ago
Just scanning through this, looks interesting and is totally needed, but I think it is missing showing future use-cases and discussions of decoding. So, for instance, it is all well and good to define a simple language focused on testing and the like, but what about live LLM control and interaction via a programming language? Sort of a conversation in code? Data streams in and function calls stream out with syntax designed to minimize mistakes in calls and optimize the stream? What I mean by this is special block declarations like:

``` #this is where functions are defined and should compile and give syntax errors ```

:->r = some(param)/connected(param, param, @r)/calls(param)<-:

(yeah, ugly but the idea is there) The point being that the behavior could change. In the streaming world it may, for instance, have guarantees of what executes and what doesn't in case of errors. Maybe transactional guarantees in the stream blocks compared to pure compile optimization in the other blocks? The point here isn't that this is the golden idea, but that we probably should think about the use cases more. High on my list of use cases to consider (I think)

- language independence: LLMs are multilingual and this should be multilingual from the start.

- support streaming vs definition of code.

- Streaming should consider parallelism/async in the calls.

- the language should consider cached token states to call back to. (define the 'now' for optimal result management, basically, the language can tap into LLM properties that matter)

Hmm... That is the top of my head thoughts at least.

cadamsdotcom•9m ago
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.

Level S4 solar radiation event

https://www.swpc.noaa.gov/news/g4-severe-geomagnetic-storm-levels-reached-19-jan-2026
181•WorldPeas•4h ago•69 comments

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

https://github.com/jordanhubbard/nanolang
51•Scramblejams•3h ago•22 comments

Nearly a third of social media research has undisclosed ties to industry

https://www.science.org/content/article/nearly-third-social-media-research-has-undisclosed-ties-i...
176•bikenaga•6h ago•77 comments

What came first: the CNAME or the A record?

https://blog.cloudflare.com/cname-a-record-order-dns-standards/
266•linolevan•7h ago•95 comments

Reticulum, a secure and anonymous mesh networking stack

https://github.com/markqvist/Reticulum
14•brogu•51m ago•3 comments

The assistant axis: situating and stabilizing the character of LLMs

https://www.anthropic.com/research/assistant-axis
43•mfiguiere•3h ago•6 comments

British redcoat's lost memoir reveals harsh realities of life as a disabled vet

https://phys.org/news/2026-01-british-redcoat-lost-memoir-reveals.html
27•wglb•3d ago•17 comments

From Nevada to Kansas by Glider

https://www.weglide.org/flight/978820
90•sammelaugust•4d ago•14 comments

How we made Python's packaging library 3x faster

https://iscinumpy.dev/post/packaging-faster/
23•rbanffy•3d ago•1 comments

The coming industrialisation of exploit generation with LLMs

https://sean.heelan.io/2026/01/18/on-the-coming-industrialisation-of-exploit-generation-with-llms/
60•long•16h ago•49 comments

Notes on Apple's Nano Texture (2025)

https://jon.bo/posts/nano-texture/
120•dsr12•6h ago•76 comments

Use Social Media Mindfully

https://danielleheberling.xyz/blog/mindful-social-media/
20•mooreds•3h ago•9 comments

Conditions in the Intel 8087 floating-point chip's microcode

https://www.righto.com/2025/12/8087-microcode-conditions.html
83•diogotozzi•4d ago•22 comments

Weight Transfer for RL Post-Training in under 2 seconds

https://research.perplexity.ai/articles/weight-transfer-for-rl-post-training-in-under-2-seconds
16•jxmorris12•4h ago•0 comments

Show HN: An interactive physics simulator with 1000's of balls, in your terminal

https://github.com/minimaxir/ballin
21•minimaxir•7h ago•4 comments

Graphics In Flatland – 2D ray tracing [video]

https://www.youtube.com/watch?v=WYTOykSqf2Y
50•evakhoury•3d ago•11 comments

Sending Data over Offline Finding Networks

https://cc-sw.com/find-my-and-find-hub-network-research/
62•findmysanity•5d ago•6 comments

CSS Web Components for marketing sites (2024)

https://hawkticehurst.com/2024/11/css-web-components-for-marketing-sites/
97•zigzag312•9h ago•47 comments

Simple Sabotage Field Manual (1944) [pdf]

https://www.cia.gov/static/5c875f3ec660e092cf893f60b4a288df/SimpleSabotage.pdf
94•praptak•4h ago•42 comments

Radicle 1.6.0 – Amaryllis

https://radicle.xyz/2026/01/14/radicle-1.6.0
17•zdw•5d ago•2 comments

Show HN: Pipenet – A Modern Alternative to Localtunnel

https://pipenet.dev/
80•punkpeye•8h ago•15 comments

There's a hidden Android setting that spots fake cell towers

https://www.howtogeek.com/theres-a-hidden-android-setting-that-spots-fake-cell-towers/
99•rmason•4h ago•26 comments

Show HN: A creative coding library for making art with desktop windows

https://github.com/willmeyers/window-art
22•willmeyers•4h ago•2 comments

San Francisco coyote swims to Alcatraz

https://www.sfgate.com/local/article/san-francisco-coyote-alcatraz-21302218.php
131•kaycebasques•22h ago•41 comments

Bypassing Gemma and Qwen safety with raw strings

https://teendifferent.substack.com/p/apply_chat_template-is-the-safety
95•teendifferent•19h ago•25 comments

Fix your robots.txt or your site disappears from Google

https://www.alanwsmith.com/en/37/wa/jz/s1/
112•bobbiechen•7h ago•67 comments

Iterative image reconstruction using random cubic bézier strokes

https://tangled.org/luthenwald.tngl.sh/splined
71•luthenwald•4d ago•16 comments

Letter from a Birmingham Jail (1963)

https://www.africa.upenn.edu/Articles_Gen/Letter_Birmingham.html
416•hn_acker•5h ago•137 comments

GLM-4.7-Flash

https://huggingface.co/zai-org/GLM-4.7-Flash
325•scrlk•9h ago•108 comments

A Brief History of Ralph

https://www.humanlayer.dev/blog/brief-history-of-ralph
54•dhorthy•6h ago•30 comments