Live data from Hacker News

I built a programming language using Claude Code

ankursethi.com

171–180 of 194 posts

Re: I built a programming language using Claude Code

#171

Earlier quoted context omitted.

That's an interesting idea. But IMO the real 'token saver' isn't in the language keywords but it's in the naming of things like variables, classes, etc. There are languages that are already pretty sparse with keywords. e.g in Go you can write 'func main() string', no need to define that it's public, or static etc. So combining a less verbose language with 'codegolfing' the variables might be enough.

I'm not an expert in LLMs, but I don't think character length matters. Text is deterministically tokenized into byte sequences before being fed as context to the LLM, so in theory `mySuperLongVariableName` uses the same number of tokens as `a`. Happy to be corrected here.

Running it through https://platform.openai.com/tokenizer "mySuperLongVariableName" takes 5 tokens. "a", takes 1. mediumvarname is 3 though. "though" is 1.

Re: I built a programming language using Claude Code

#172
post #93

> More addictive than that is the unpredictability and randomness inherent to these tools. If you throw a problem at Claude, you can never tell what it will come up with. It could one-shot a difficult problem you’ve been stuck on for weeks, or it could make a huge mess. Just like a slot machine, you can never tell what might happen. That creates a strong urge to try using it for everything all the time. That is the p…

> The effect feels like the Loss-Disguised-As-Win feeling of the video-games I used to work on at Zynga.

If you can write a blogpost for this i'd like to read it.

Re: I built a programming language using Claude Code

#173

Earlier quoted context omitted.

Every time I hear complaints about error handling, I wonder if people have next to no try catch blocks or if they just do magic to hide that detail away in other languages? Because I still have to do error handling in other languages roughly the same? Am I missing something?

You’re not missing anything. I’ve worked with many developers that are clueless about error handling; who treat it as a mostly optional side quest. It’s not surprising that folks sees the explicit error handling in Go as a grotesque interruption of the happy path.

That’s a pretty defensive take.

You don’t have to hate Go to agree that Rust’s `?` operator is much nicer when all you want to do is propagate the error.

Re: I built a programming language using Claude Code

#174

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

a few months back I had a similar thought and started working on a language that was really verbose and human readable, think Cobal with influences from Swift. The core idea was that this would be a business language that business people would/could read if they needed to, so it could be used for financial and similar use cases, with built in logic engines similar to Prolog or Mercury. My idea was that once the language starts being coded by AI there are two directions to go, either we max efficiency and speed (basically let the AI code in assembly) or we lean the other way and max it for human error checking and clear outputs on how a process flows, so my theory was headed more in that direction. But of course I failed, I'd never made a programming language before (I've coded a long time, but that's not the same thing) and the AI's at the time combined with my lack of knowledge caused a spectacular failure. I still think my theory is correct though, especially if we want to see financial or business logic, having the code be more human readable to check for problems when even not a technical person, I still see a future where that is useful.

Re: I built a programming language using Claude Code

#175
post #78

Earlier quoted context omitted.

You can make an LLM sound very natural if you simply ask for it and provide enough text in the tone you’d like it to reproduce. Otherwise, it’s obvious that an LLM with no additional context will try to stick to the tone the company aligned it to produce

”I named it Cutlet after my cat. It’s completely legal to do that.” I’ve never seen LLM being able to produce these kind of absurdist jokes. Or any jokes, really.

here - an AI generated dadjoke:

Why did the cabbage refuse to testify in court? It didn't want to be grilled and then shredded.

Seems to be knew and very corny.

Re: I built a programming language using Claude Code

#176

Earlier quoted context omitted.

comedy is a completely different thing than natural tone. I agree that they’re incapable of coming up with decent jokes

Agree. I keep asking LLMs to tell me some jokes from time to time, but never once I've found it's funny. For me, when I find myself burst out laughing from LLMs joke, I'd know we've reached AGI.

You doing it wrong way - you should not ask for jokes - you need to structure prompt so jokes are byproduct.

Re: I built a programming language using Claude Code

#177
post #11

> I’ve also been able to radically reduce my dependency on third-party libraries in my JavaScript and Python projects. I often use LLMs to generate small utility functions that previously required pulling in dependencies from NPM or PyPI. This is such an interesting statement to me in the context of leftpad.

I'm imagining the amount of energy required to power the datacenter so that we can produce isEven() utility methods.

You could always run local on your 5060ti.

Re: I built a programming language using Claude Code

#178
post #165
post #162

Earlier quoted context omitted.

> How? You're calling this person a liar because they don't have a study to back up their personal anecdote. Which is a strange position to take imo.

It's strange that I don't accept unverified anecdotes on their face, especially when they contradict the best evidence available? Also > calling this person a liar "Liar" implies a deliberate attempt to deceive, but I specifically mentioned the possibility that these tools just make you feel much more productive than you actually are, as at least one study found. But I'm sure a lot of these anecdotes are, in fact, li…

You're the only one in this thread that mentioned 2x and 10x productivity boosts and studies.

Obviously everyone has their own experiences with LLMs. But I think it's an interesting position to take to tell random people that their reported experience is wrong. Or how you could be so certain that LLMs can't possibly be that useful.

Re: I built a programming language using Claude Code

#180

Earlier quoted context omitted.

I think I remember seeing research right here on HN that terse languages don't actually help all that much

I would be very interested in this research... I'm trying to write a language that is simple and concise like Python, but fast and statically typed. My gutfeeling is that more concise than Python (J, K, or some code golfing language) is bad for readability, but so is the verbosity of Rust, Zig, Java.

So check https://github.com/google/rune
Post reply on HN