Live data from Hacker News

I built a programming language using Claude Code

ankursethi.com

181–190 of 194 posts

Re: I built a programming language using Claude Code

#181
post #19

Earlier quoted context omitted.

A good example of this is Rust. Rust is by default memory safe when compared to say, C, at the expense of you having to be deliberate in managing memory. With LLMs this equation changes significantly because that harder/more verbose code is being written by the LLM, so it won't slow you down nearly as much. Even better, the LLM can interact with the compiler if something is not exactly as it should. On a different bu…

I was under the impression from Rust developers that it was one of the languages LLMs struggled with a bit more than others? My view could be (probably is) very outdated.

If it were ever true, it's not anymore.

Rust is a nice choice even just for its amazing sum types and the ability to make impossible states unrepresentable at the type level.

Re: I built a programming language using Claude Code

#182

Earlier quoted context omitted.

How does a programming language prevent the vast majority of bugs? I feel like we would all be using that language!

See Rust with Use-after-Free, fearless concurrency, etc. My language is a step ahead of Rust, but not as strict as Ada, while being easier to read than Swift (especially where concurrency is involved).

And whenever someone tells you to lookup "Fearless concurrency", replace it internally with "Locking concurrency". Thanks to the Rust marketing department

Re: I built a programming language using Claude Code

#183

Earlier quoted context omitted.

I think the only hope is that AGI arises and picks up where humanity left off. Otherwise I think this is the long dark teatime of human engineering of all sorts.

So you’re hoping for a blackbox uninspectable by humans? That to me sounds like a nightmare, a nightmare worse than all the cruft and stupid rules humanity accrued over time. Let’s hope the future tech is inspectable and understandable by humans.

> So you’re hoping for a blackbox uninspectable by humans?

We already have that. He's hoping that the blackbox gets smart enough to understand itself.

Re: I built a programming language using Claude Code

#184
post #42

Wait. You built a new language, that there's thus no training data for. Who the hell is going to use it then? You certainly won't, because you're dependent on AI.

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something." https://news.ycombinator.com/newsguidelines.html

I don't consider this to be a shallow dismissal.

It's a deep dismissal that gets right to the heart of the matter in a few succinct sentences.

Re: I built a programming language using Claude Code

#185
post #182

Earlier quoted context omitted.

See Rust with Use-after-Free, fearless concurrency, etc. My language is a step ahead of Rust, but not as strict as Ada, while being easier to read than Swift (especially where concurrency is involved).

And whenever someone tells you to lookup "Fearless concurrency", replace it internally with "Locking concurrency". Thanks to the Rust marketing department

When you combine that with guaranteed lock elision when you're doing things as expected, it's not a problem.

Re: I built a programming language using Claude Code

#186

> While working on Cutlet, though, I allowed Claude to generate every single line of code. I didn’t even read any of the code. Instead, I built guardrails to make sure it worked correctly (more on that later). Impressive. As a practical matter, one wonders what th point would be in creating a new programming languages if the programmer no longer has to write or read code. Programming languages are after all the inter…

The constraints enforced in the language still matter. A language which offers certain correctness guarantees may still be the most efficient way to build a particular piece of software even when it's a machine writing the code. There may actually be more value in creating specialized languages now, not less. Most new languages historically go nowhere because convincing human programmers to spend the time it would ta…

> The constraints enforced in the language still matter. A language which offers certain correctness guarantees may still be the most efficient way to build a particular piece of software even when it's a machine writing the code.

I think this is right. Strategically, do you have a mental model of some key elements such a new programming language should exhibit? I'm curious about which existing programming languages might be best suited or where the opportunity is for designing something new that could throw away all the optimizations we've done for humans and instead optimize for AI programmers.

Re: I built a programming language using Claude Code

#187

Not to discount your experience, but I dont understand what's interesting about this. You could always build a programming language yourself, given enough time. Programming languages' constructs are well represented in the training dataset. I want someone to build something uniquely novel that's not actually in the dataset and i'll be impressed by CC.

I find it as an interesting experiment to find the limits of what they can do.

Like, I've had it build a full APL interpreter, half an optimizer, started on a copy-and-patch JIT compiler and it completely fails at "read the spec and make sure the test suite ensures compliance". Plus some additional artifacts which are genuinely useful on their own as I now have an Automated Yak Shaver™ which is where most of my projects ended up dying as the yaks are a fun bunch to play with.

Re: I built a programming language using Claude Code

#188
post #49
post #7

The AI age is calling for a language that is append-only, so we can write in a literate programming style and mix prompts with AI output, in a linear way.

A REPL + immutability?

Does immutability implies using only open weight models? Both Anthropic and OpenAI keep deprecating/removing ability to run older versions of their models. And that means all previously recorded prompts would now produce slightly different output.

Re: I built a programming language using Claude Code

#189
post #145

This was a missed opportunity to showcase how to use formal methods for proof of correctness. The author does not even seem to be particularly interested in programming language design; there is no discussion of design goals, or inspiration. Nothing to see here.

One of my experiments was to have Claude write a VM and then generate a verification harness (using a DSL) for it to ensure it was correct with the theory being the same bug would have to exist in the test suite, the static verification and the VM for it to sneak through. Found a few bugs in the verification library and some integer overflows in the VM then it became too much for my poor little laptop to run without cutting some important corners.

It's not an abstract thing they can't do, you just have to tell them to.

Re: I built a programming language using Claude Code

#190
I am not very experienced but I was able to use Claude Code to build a test website, for my music, a test CRM, and me and my partner were planning to use it to make AI chatbots, when we were marketing these types of services last year. There were times when I found it frustrating due to my lack of experience. Someone mentioned token efficiency below and all the AI's seem to be designed to make you have to have it do things that you ask over and over again so it can use up as much tokens as it can before it gives you exactly what you need. Of course this may also be due to my lack of experience. I do have a friend with a great deal of experience who I go to for help and he even has issues with it at times.
Post reply on HN