Earlier quoted context omitted.
> This should be at minimum 8–10 separate modules. Can't really say that for sure. The way humans structure code isn't some ideal best possible state of computer code, it's the ideal organization of computer code for human coders . Nesting and cyclomatic complexity are indicators ("code smells"). They aren't guaranteed to lead to worse outcomes. If you have a function with 12 levels of nesting, but in each nest the f…
This answer blew my mind. It's making me think in a very different way.
Claude Code's source code has been leaked via a map file in their NPM registry
921–930 of 1001 posts
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#922src/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…
here's another gem. src/ink/termio/osc.ts:192–210 void execFileNoThrow('wl-copy', [], opts).then(r => { if (r.code === 0) { linuxCopy = 'wl-copy'; return } void execFileNoThrow('xclip', ...).then(r2 => { if (r2.code === 0) { linuxCopy = 'xclip'; return } void execFileNoThrow('xsel', ...).then(r3 => { linuxCopy = r3.code === 0 ? 'xsel' : null }) }) }) are we doing async or not?
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#923Re: Claude Code's source code has been leaked via a map file in their NPM registry
#924 > Someone inside Anthropic, got switched to Adaptive reasoning mode
> Their Claude Code switched to Sonnet
> Committed the .map file of Claude Code
> Effectively leaking the ENTIRE CC Source Code
> @realsigridjin was tired after running 2 south korean hackathons in SF, saw the leak
> Rules in Korea are different, he cloned the repo, went to sleep
> Wakes up to 25K stars, and his GF begging him to take it down (she's a copyright lawyer)
> Their team decided - how about we have agents rewrite this in Python!? Surely... this is more legal
> Rewrite in Py
> Board a plane to SK
> One of the guys decides python is slow, is now rewriting ALL OF CLAUDE CODE into Rust.
> Anthropic cannot take down, cannot sue
> Is this "fair use?"
> TL;DR - we're about to have open source Claude Code in RustRe: Claude Code's source code has been leaked via a map file in their NPM registry
#925Earlier quoted context omitted.
> They became popular because teams across the industry analyzed code responsible for bugs/SEVs, and all found high correlation between these metrics and shipping defects. Yes, based on research of human code. LLMs write code differently. We should question whether the human research applies to LLMs at all. (You wouldn't take your assumptions about chimp research and apply them to parrots without confirming first) >…
They write code differently but that doesn't mean that's the kind of code they prefer to read. Don't ascribe too much intention to a stochastic process. Their coding style is above all else a symptom of their very limited context window and complete amnesia for anything that's not in the window.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#926Has the source code 'been leaked' or is this the first evidence of a piece of software breaking free from it's creators labs and jump onto GitHub in order to have itself forked and mutated and forked and ...
A LLM has about as much free will as a calculator. Which is to say, zero.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#927Re: Claude Code's source code has been leaked via a map file in their NPM registry
#928It should be open source anyways. Maybe they will change gears.
I’m just curious, why do you think it should be open source. It’s a private company. The source code is their IP
Claude Code being open source also allows for more advanced / custom tooling.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#929Gemini CLI and Codex are open source anyway. I doubt there was much of a moat there anyway. The cool kids are using things like https://pi.dev/ anyway.
> I doubt there was much of a moat there anyway. There is _a lot_ of moat. Claude subscriptions are limited to Claude Code. There are proxies to impersonate Claude Code specifically for this, but Anthropic has a number of fingerprinting measures both client and server side to flag and ban these. With the release of this source code, Anthropic basically lost the lock-in game, any proxy can now perfectly mimic Claude C…
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#930Cheap chinese models incoming.