Live data from Hacker News

I built a programming language using Claude Code

ankursethi.com

41–50 of 194 posts

Re: I built a programming language using Claude Code

#44

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

Saves tokens. The main reason though is to manage performance for what techniques get used for specific use cases. In their case it seems to be about expressiveness in Bash.

Re: I built a programming language using Claude Code

#45
I recently tried using Claude to generate a lexer and parser for a language i was designing. As part of its first attempt, this was the code to parse a float literal:

  fn read_float_literal(&mut self) -> &'a str {
    let start = self.pos;
    while let Some(ch) = self.peek_char() {
      if ch.is_ascii_alphanumeric() || ch == '.' || ch == '+' || ch == '-' {
        self.advance_char();
      } else {
        break;
      }
    }
    &self.source[start..self.pos]
  }
Admittedly, I do have a very idiosyncratic definition of floating-point literal for my language (I have a variety of syntaxes for NaNs with payloads), but... that is not a usable definition of float literal.

At the end of the day, I threw out all of the code the AI generated and wrote it myself, because the AI struggled to produce code that was functional to spec, much less code that would allow me to easily extend it to other kinds of future operators that I knew I would need in the future.

Re: I built a programming language using Claude Code

#46
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

Re: I built a programming language using Claude Code

#47
post #10
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.

That’s git commits.

That's arguably not very ergonomic, which is probably the biggest requirement for a programming language.

Re: I built a programming language using Claude Code

#50

Earlier quoted context omitted.

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…

> but every AI coding bot will learn your new language as a matter of course after its next update includes the contents of your website. That's assuming that your new, very unknown language gets slurped up in the next training session which seems unlikely. Couldn't you use RAG or have an LLM read the docs for your language?

Agreed - unpopular languages and packages have pretty shaky outcomes with code generation, even ones that have been around since before 2023.
Post reply on HN