They could have written that in curl+bash that would not have changed much.
Claude Code's source code has been leaked via a map file in their NPM registry
221–230 of 1001 posts
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#222src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
Yes, if it was made for human comprehension or maintenance. If it's entirely generated / consumed / edited by an LLM, arguably the most important metric is... test coverage, and that's it ?
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#223Earlier quoted context omitted.
They probably have statistics on it and saw that certain phrases happen over and over so why waste compute on inference.
The problem with regex is multi-language support and how big the regex will bloat if you to support even 10 languages.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#224Finally all spinner verbs revealed: https://github.com/instructkr/claude-code/blob/main/src/cons...
I'm glad "reticulating" is in there. Just need to make sure "splines" is in the nouns list!
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#225src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
Yes, if it was made for human comprehension or maintenance. If it's entirely generated / consumed / edited by an LLM, arguably the most important metric is... test coverage, and that's it ?
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#226Earlier quoted context omitted.
Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.
It looks like it's just for logging, why does it need to block?
Regex is going to be something like 10,000 times quicker than the quickest LLM call, multiply that by billions of prompts
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#227Maybe the OP could clarify, I don't like reading leaked code, but I'm curious: my understanding is that is it the source code for "claude code", the coding assistant that remotely calls the LLMs. Is that correct ? The weights of the LLMs are _not_ in this repo, right ? It sure sucks for anthropic to get pawned like this, but it should not affect their bottom line much ?
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#228Earlier quoted context omitted.
They probably have statistics on it and saw that certain phrases happen over and over so why waste compute on inference.
The problem with regex is multi-language support and how big the regex will bloat if you to support even 10 languages.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#229Undercover mode also pretends to be human, which I'm less ok with: https://github.com/chatgptprojects/claude-code/blob/642c7f94...
You'll never win this battle, so why waste feelings and energy on it? That's where the internet is headed. There's no magical human verification technology coming to save us.
And at this point it is more about how large space will be usable and how much will be bot-controlled wasteland. I prefer spaces important for me to survive.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#230Why is Claude Code, a desktop tool, written in JS? Is the future of all software JS or Typescript?
LLMs are good in JS and Python which means everything from now on will be written in or ported to either of those two languages. So yeah, JS is the future of all software.
Language servers, however, are a pain on Claude code. https://github.com/anthropics/claude-code/issues/15619