Live data from Hacker News

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

github.com

201–210 of 210 posts

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

#201
post #195

Earlier quoted context omitted.

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…

None of those are novel domains w/ their own novel syntax & semantic validators, not to mention the dearth of readily available sources of examples for sampling the baselines. So again, where does it say it works for a programming language with nothing but a grammar & a compiler?

To quote you:

> here is no RL for programming languages.

and

> Either RL works & you have evidence

This is just so completely wrong, and here is the evidence.

I think everyone in this thread is just surprised you don't seem to know this.

Haven't you seen the hundreds of job ads for people to write code for LLMs to train on?

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

#202
post #165

Earlier quoted context omitted.

I disagree I think we always need new languages. Every language over time becomes more and more unnecessarily complex. It's just part of the software lifecycle. People think their job is to "write code" and that means everything becomes more and more features, more abstractions, more complex, more "five different ways to do one thing". Many many examples, C++, Java esp circa 2000-2010 and on and on and on. There's no…

Related to your comment. I was a "desktop" developer many years ago (about 20). Back then I mainly coded in Assembler, Visual Basic, and Delphi, and I also learned COBOL, C, and Java. Just this week, I decided to start learning Kotlin because I want to build a mobile app. Everything was going great until I reached lambda functions. Honestly, I can't wrap my head around either their purpose or their syntax. I find the…

They're just functions that you define inside another "outer" function's local scope, and depending on the language they will/can also work as closures - meaning they capture the values of variable in the outer function as well.

I don't know the syntax of kotlin, but lambda functions generally are usually useful to pass as parameters to other, generic/higher-order functions. For example if you have a sort function `sort(listofitems, compareitems_fn)` you could write the `compareitems_fn` as a lambda directly in-line with the call to sort()

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

#203

Earlier quoted context omitted.

> because the rust compiler and linters give such good feedback that it immediately fixes whatever goof it made. I still experience agents slipping in a `todo!` and other hacks to get code to compile, lint, and pass tests. The loop with tests and doc tests are really nice, agreed, but it'll still shit out bad code.

What agents, using what models?

Whatever work is paying for on a given day. We've rotated through a few offerings. It's a work truck not a personal vehicle, for me.

I manage a team of interns and I don't have the energy to babysit an agent too. For me, gpt and gemini yield the best talk-it-through approach. For example, dropping a research paper into the chat and describing details until the implementation is clarified.

We also use Claude and Cursor, and that was an exceptionally disruptive experience. Huge, sweeping, wrong changes all over. Gyah! If I bitch about todo! macros, this is where they came from.

For hobby projects, I sometimes use whatever free agent microsoft is shilling via VS Code (and me selling my data) that day. This is relatively productive, but reaches profoundly wrong conclusions.

Writing for CLR in visual studio is the smoothest smart-complete experience today.

I have not touched Grok and likely won't.

/ two pennies

Hope that answers your questions.

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

#204
post #163
post #161

Earlier quoted context omitted.

Well, we can see the string, and we can see that is uses plain ASCII.

In this case, sure. But what if we shifted to rendering with emojis or whatnot. What would the first ASCII character of the string be?

If you anticipate that need, you just store the gradient as an array of strings, and you still then only need a trivial lookup.

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

#205
post #201

Earlier quoted context omitted.

None of those are novel domains w/ their own novel syntax & semantic validators, not to mention the dearth of readily available sources of examples for sampling the baselines. So again, where does it say it works for a programming language with nothing but a grammar & a compiler?

To quote you: > here is no RL for programming languages. and > Either RL works & you have evidence This is just so completely wrong, and here is the evidence. I think everyone in this thread is just surprised you don't seem to know this. Haven't you seen the hundreds of job ads for people to write code for LLMs to train on?

You're not going to get less confused by doubling down. None of your claims are valid & this is because you haven't actually tried to do what you're suggesting. Taking a grammar & compiler & RLing will get you nowhere.

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

#206

Earlier quoted context omitted.

Say you have this new language, with only a tiny amount of examples of there. How do the SOTA labs train on you're language? With sufficient examples, it can generate code which gets compiled and then run and that gets fed into a feedback loop to improve upon, but how do you get there? How do you bootstrap that ? Nevermind the dollar cost, how does it offer something above having an LLM generate code in python or Jav…

Your hypothetical misses praxis: in my experience LLM can pick up any new syntax with ease. From a few examples, it can generate more. With a compiler (even partial on limited syntax), it can correct. It soon becomes fluent simply from the context of your codebase. You don't need to "train" an LLM to recognize language syntax. It's effortless for it to pick it up. Or, maybe my lanng just had LLM-easy syntax - which w…

Syntax != semantics. The LLM being able to adhere syntax is one thing, the LLM picking up various language-isms is another. In Python, you don't want to see

    for i in range(len(arr)): 
        something(arr[i])
because the pythonic way is simply:

    for i in arr:
        something(i)
or even:

    [something(i) for i in arr]
The first version is absolutely syntactically correct, but terrible python. How do you teach the LLM that?

Bugs don't come from syntax errors. If you've got a syntax error, it doesn't compile/fails to run entirely. So we're not talking about the LLM learning the syntax, I'm asking the LLM learning the deeper semantics of lanng.

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

#207
post #204
post #163

Earlier quoted context omitted.

In this case, sure. But what if we shifted to rendering with emojis or whatnot. What would the first ASCII character of the string be?

If you anticipate that need, you just store the gradient as an array of strings, and you still then only need a trivial lookup.

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/...

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

#208
post #22

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:…

You just described how the popular "anyhow" and "snafu" crates implement error handling

Even with anyhow there is a lot of boilerplate it seems to me dealing with crates that don’t use it. I haven’t tried snafu but its name does not inspire confidence.

Clanker (ai assistant) also love to unwrap and if you don’t catch them you have an abort waiting for you.

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

#209

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 expl…

I had the same reaction to seeing S-expressions, but my conclusion was that this should just be a lisp. Why stop just at operators?

I posted about this also on linkedIn. I actually tried to do a bunch of agentic coding in Clojure but found that the parser really got in my way - it continuously fooled the LLM on what line number the errors actually occurred on!

This is why I made nanolang always report line numbers accurately and also have a built-in "trace mode" where, with an environment variable set, it would tell you exactly what line number was producing which C code and which behaviors were being exhibited (state changes). The LLM uses this aggressively for debugging!

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

#210
post #209

Earlier quoted context omitted.

I had the same reaction to seeing S-expressions, but my conclusion was that this should just be a lisp. Why stop just at operators?

I posted about this also on linkedIn. I actually tried to do a bunch of agentic coding in Clojure but found that the parser really got in my way - it continuously fooled the LLM on what line number the errors actually occurred on! This is why I made nanolang always report line numbers accurately and also have a built-in "trace mode" where, with an environment variable set, it would tell you exactly what line number w…

> it would tell you exactly what line number was producing which C code and which behaviors were being exhibited (state changes)

Would you consider generating sourcemaps? Although they’re mainly used for minified JavaScript they sound like a perfect fit for this use case. Plus they’re so ubiquitous there’s already a ton of tooling that understands them.

Post reply on HN