News for hackers. Stuff that matters.
Re:Claude Code's source code has been leaked via a map file ... by BoppreH on Tuesday March 31, 2026 @06:59AM (#47585535)
An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.
Re:Claude Code's source code has been leaked via a map file ... by stingraycharles on Tuesday March 31, 2026 @07:05AM (#47585589)
Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.
Re:Claude Code's source code has been leaked via a map file ... by orphea on Tuesday March 31, 2026 @07:58AM (#47586073)
It looks like it's just for logging, why does it need to block?
Re:Claude Code's source code has been leaked via a map file ... by jflynn2 on Tuesday March 31, 2026 @08:16AM (#47586222)
Better question - why would you call an LLM (expensive in compute terms) for something that a regex can do (cheap in compute terms)

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 ... by orphea on Tuesday March 31, 2026 @08:55AM (#47586684)
This is assuming the regex is doing a good job. It is not. Also you can embed a very tiny model if you really want to flag as many negatives as possible (I don't know anthropic's goal with this) - it would be quick and free.
Re:Claude Code's source code has been leaked via a map file ... by gf000 on Tuesday March 31, 2026 @09:17AM (#47586932)
I think it's a very reasonable tradeoff, getting 99% of true positives at the fraction of cost (both runtime and engineering).

Besides, they probably do a separate analysis on server side either way, so they can check a true positive to false positive ratio.

Re:Claude Code's source code has been leaked via a map file ... by _fizz_buzz_ on Tuesday March 31, 2026 @07:47AM (#47585952)
They probably have statistics on it and saw that certain phrases happen over and over so why waste compute on inference.
Re:Claude Code's source code has been leaked via a map file ... by mycall on Tuesday March 31, 2026 @08:08AM (#47586148)
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 ... by b112 on Tuesday March 31, 2026 @08:15AM (#47586215)
Did you just complain about bloat, in anything using npm?
Re:Claude Code's source code has been leaked via a map file ... by TeMPOraL on Tuesday March 31, 2026 @08:19AM (#47586249)
We're talking about Claude Code. If you're coding and not writing or thinking in English, the agents and people reading that code will have bigger problems than a regexp missing a swear word :).
Re:Claude Code's source code has been leaked via a map file ... by MetalSnake on Tuesday March 31, 2026 @08:35AM (#47586434)
I talk to it in non-English. But have rules to have everything in code and documentation in english. Only speaking with me should use my native language. Why would that be a problem?
Re:Claude Code's source code has been leaked via a map file ... by ekropotin on Tuesday March 31, 2026 @09:26AM (#47587049)
Because 90% of training data was in English and therefore the model perform best in this language.
Re:Claude Code's source code has been leaked via a map file ... by foldr on Tuesday March 31, 2026 @09:34AM (#47587159)
In my experience these models work fine using another language, if it’s a widely spoken one. For example, sometimes I prompt in Spanish, just to practice. It doesn’t seem to affect the quality of code generation.
Re:Claude Code's source code has been leaked via a map file ... by ekropotin on Tuesday March 31, 2026 @11:11AM (#47588515)
It’s just a subjective observation.

It just can’t be a case simply because how ML works. In short, the more diverse and high quality texts with reasoning reach examples were in the training set, the better model performs on a given language.

So unless Spanish subset had much more quality-dense examples, to make up for volume, there is no way the quality of reasoning in Spanish is on par with English.

I apologise for the rambling explanation, I sure someone with ML expertise here can it explain it better.

Re:Claude Code's source code has been leaked via a map file ... by foldr on Tuesday March 31, 2026 @02:00PM (#47591176)
The agent may be translating to English behind the scenes. There are all kinds of hacks layered on top of the underlying models. But however exactly it works, it’s clearly not the case that these things only make use of Spanish training data when you prompt them in Spanish.

Lets take a language with orders of magnitude less training data, like Nahuatl. The following is what happens if I ask Claude Code in Nahuatl to give me an example of a simple program that I can execute inside a web browser (avoiding any direct keyword prompts like 'Javascript' or 'Hello World'). Interestingly, it responds in Spanish. I doubt that it has any relevant training data in Nahuatl. (Apologies if the Nahuatl is wrong – I just used Google translate.)

    ¿Uelis techmakas se neskayotl tlen se programa tlen amo ouij tlen ueliskia nijchiuas ipan se navegador web?

    -----

    Entiendo tu pregunta en náhuatl. Aquí un ejemplo sencillo — una calculadora en HTML puro que puedes abrir directo en el navegador, sin servidor:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>Calculadora</title>
        <style>
        body { font-family: sans-serif; display: flex; justify-content: center; padding: 40px; }
        .calc { border: 1px solid #ccc; padding: 20px; border-radius: 8px; width: 200px; }
        input { width: 100%; margin-bottom: 10px; font-size: 1.2em; text-align: right; }
        button { width: 22%; margin: 2px; padding: 8px; font-size: 1em; cursor: pointer; }
        .wide { width: 47%; }
        </style>
    </head>
    <body>
    <div class="calc">
        <input type="text" id="pantalla" readonly>
        <div>
        <button onclick="tecla('7')">7</button>
        <button onclick="tecla('8')">8</button>
        <button onclick="tecla('9')">9</button>
        <button onclick="tecla('/')">÷</button>
    
        <button onclick="tecla('4')">4</button>
        <button onclick="tecla('5')">5</button>
        <button onclick="tecla('6')">6</button>
        <button onclick="tecla('*')">×</button>
    
        <button onclick="tecla('1')">1</button>
        <button onclick="tecla('2')">2</button>
        <button onclick="tecla('3')">3</button>
        <button onclick="tecla('-')">−</button>
    
        <button onclick="tecla('0')">0</button>
        <button onclick="tecla('.')">.</button>
        <button onclick="tecla('+')">+</button>
        <button onclick="limpiar()">C</button>
    
        <button class="wide" onclick="calcular()">=</button>
        <button class="wide" onclick="borrar()">⌫</button>
        </div>
    </div>
    
    <script>
        const pantalla = document.getElementById('pantalla');
    
        function tecla(val) {
        pantalla.value += val;
        }
    
        function calcular() {
        try {
            pantalla.value = eval(pantalla.value);
        } catch {
            pantalla.value = 'Error';
        }
        }
    
        function limpiar() { pantalla.value = ''; }
        function borrar() { pantalla.value = pantalla.value.slice(0, -1); }
    </script>
    </body>
    </html>
    
    Guarda esto como calculadora.html y ábrelo en cualquier navegador — no necesita servidor ni dependencias. Es un buen punto de partida para aprender HTML,
    CSS y JavaScript.
Re:Claude Code's source code has been leaked via a map file ... by ekropotin on Tuesday March 31, 2026 @02:26PM (#47591493)
> it’s clearly not the case that these things only make use of Spanish training data when you prompt them in Spanish.

It’s not! And I’ve never said that.

Anyways, I’m not even sure what we are arguing about, as it’s 100% fact that SOTA models perform better in English, the only interesting question here how much better, is it negligible or actually makes a difference in real world use-cases.

Re:Claude Code's source code has been leaked via a map file ... by foldr on Tuesday March 31, 2026 @02:35PM (#47591595)
It’s negligible as far as I can tell. If the LLM can “speak” the language well then you can prompt it in that language and get more or less the same results as in English.
Re:Claude Code's source code has been leaked via a map file ... by omcnoe on Tuesday March 31, 2026 @02:52PM (#47591794)
I saw a curious post recently that explored this idea, and showed that it isn’t really the case. The internal layers of the model aren’t really reasoning in English, or in any human language.

Translation in/out of human languages only happens at the edges of the model.

Internal layer activations for the same concept are similar regardless of language, while activations at the top/bottom layers diverge. Meanwhile the pattern is reversed for same language different content.

Re:Claude Code's source code has been leaked via a map file ... by ekropotin on Tuesday March 31, 2026 @03:13PM (#47592076)
So we do at least agree on the fact that quality of human language <-> embeddings transition depends on how good target language is represented in the training dataset?

Even if it happens at the edge, on every conversation turn, I may assume non captured small subtleties of meaning over time can accumulate into significant error.

Re:Claude Code's source code has been leaked via a map file ... by adamsb6 on Tuesday March 31, 2026 @09:57AM (#47587494)
They literally just have to subtract the vector for the source language and add the vector for the target.

It’s the original use case for LLMs.

Re:Claude Code's source code has been leaked via a map file ... by curioussquirrel on Tuesday March 31, 2026 @02:24PM (#47591469)
Thank you. +1. There are obviously differences and things getting lost or slightly misaligned in the latent space, and these do cause degradation in reasoning quality, but the decline is very small in high resource languages.
Re:Claude Code's source code has been leaked via a map file ... by cryptonector on Tuesday March 31, 2026 @11:42AM (#47589059)
Claude handles human languages other than English just fine.
Re:Claude Code's source code has been leaked via a map file ... by formerly_proven on Tuesday March 31, 2026 @08:55AM (#47586678)
In my experience agents tend to (counterintuitively) perform better when the business language is not English / does not match the code's language. I'm assuming the increased attention mitigates the higher "cognitive" load.
Re:Claude Code's source code has been leaked via a map file ... by doublesocket on Tuesday March 31, 2026 @08:51AM (#47586629)
Supporting 10 different languages in regex is a drop in the ocean. The regex can be generated programmatically and you can compress regexes easily. We used to have a compressed regex that could match any placename or street name in the UK in a few MB of RAM. It was silly quick.
Re:Claude Code's source code has been leaked via a map file ... by astrocat on Tuesday March 31, 2026 @10:29AM (#47587914)
woah. This is a regex use I've never heard of. I'd absolutely love to see a writeup on this approach - how its done and when it's useful.
Re:Claude Code's source code has been leaked via a map file ... by benlivengood on Tuesday March 31, 2026 @11:09AM (#47588498)
You can literally | together every street address or other string you want to match in a giant disjunction, and then run a DFA/NFA minimization over that to get it down to a reasonable size. Maybe there are some fast regex simplification algorithms as well, but working directly with the finite automata has decades of research and probably can be more fully optimized.
Re:Claude Code's source code has been leaked via a map file ... by doublesocket on Tuesday March 31, 2026 @02:22PM (#47591455)
This was many moons ago, written in perl. From memory we used Regexp::Trie - https://metacpan.org/release/DANKOGAI/Regexp-Trie-0.02/view/...

We used it to tokenize search input and combined it with a solr backend. Worked really remarkably well.

Re:Claude Code's source code has been leaked via a map file ... by cogman10 on Tuesday March 31, 2026 @10:18AM (#47587771)
I think it will depend on the language. There are a few non-latin languages where a simple word search likely won't be enough for a regex to properly apply.
Re:Claude Code's source code has been leaked via a map file ... by mycall on Wednesday April 01, 2026 @09:22AM (#47600511)
Exactly this. Unicode is a big beast to consider in regex concats.
Re:Claude Code's source code has been leaked via a map file ... by crimsonnoodle58 on Tuesday March 31, 2026 @09:06AM (#47586805)
They only need to look at one language to get a statistically meaningful picture into common flaws with their model(s) or application.

If they want to drill down to flaws that only affect a particular language, then they could add a regex for that as well/instead.

Re:Claude Code's source code has been leaked via a map file ... by crem on Tuesday March 31, 2026 @10:53AM (#47588230)
More likely their LLM Agent just produced that regex and they didn't even notice.
Re:Claude Code's source code has been leaked via a map file ... by Foobar8568 on Tuesday March 31, 2026 @07:47AM (#47585956)
Why do you need to do it at the client side? You are leaking so much information on the client side. And considering the speed of Claude code, if you really want to do on the client side, a few seconds won't be a big deal.
Re:Claude Code's source code has been leaked via a map file ... by matkoniecz on Tuesday March 31, 2026 @08:11AM (#47586172)
> a few seconds won't be a big deal

it is not that slow

Re:Claude Code's source code has been leaked via a map file ... by plorntus on Tuesday March 31, 2026 @08:59AM (#47586728)
Depends what its used by, if I recall theres an `/insights` command/skill built in whatever you want to call it that generates a HTML file. I believe it gives you stats on when you're frustrated with it and (useless) suggestions on how to "use claude better".

Additionally after looking at the source it looks like a lot of Anthropics own internal test tooling/debug (ie. stuff stripped out at build time) is in this source mapping. Theres one part that prompts their own users (or whatever) to use a report issue command whenever frustration is detected. It's possible its using it for this.

Re:Claude Code's source code has been leaked via a map file ... by codegladiator on Tuesday March 31, 2026 @07:15AM (#47585677)
what you are suggesting would be like a truck company using trucks to move things within the truck
Re:Claude Code's source code has been leaked via a map file ... by argee on Tuesday March 31, 2026 @07:25AM (#47585767)
That’s what they do. Ever heard of a hand truck?
Re:Claude Code's source code has been leaked via a map file ... by eadler on Tuesday March 31, 2026 @07:44AM (#47585926)
I never knew the name of that device.

Thanks

Re:Claude Code's source code has been leaked via a map file ... by freedomben on Tuesday March 31, 2026 @08:21AM (#47586270)
Depending on the region you live in, it's also frequently called a "dolly"
Re:Claude Code's source code has been leaked via a map file ... by SmellTheGlove on Tuesday March 31, 2026 @11:05AM (#47588417)
Isn’t a dolly a flat 4 wheeled platform thingy? A hand truck is the two wheeled thing that tilts back.
Re:Claude Code's source code has been leaked via a map file ... by eszed on Tuesday March 31, 2026 @11:43AM (#47589083)
Ha! Where I'm from a "dolly" was the two-wheeled thing. The four-wheeler thing wasn't common before big-boxes took over the hardware business, but I think my dad would have called it a "cart", maybe a "hand-cart".
Re:Claude Code's source code has been leaked via a map file ... by sethammons on Wednesday April 01, 2026 @05:16AM (#47598604)
Grew up with two wheeled: dolly and four wheeled: piano dolly. Was an adult when I heard hand-truck. I prefer dolly. Nicer mouth feel.
Re:Claude Code's source code has been leaked via a map file ... by istoleabread on Tuesday March 31, 2026 @07:48AM (#47585961)
Do we have a hand llm perchance?
Re:Claude Code's source code has been leaked via a map file ... by svnt on Tuesday March 31, 2026 @10:54AM (#47588248)
Yeah it’s called a regex. With a lot of human assistance it can do less but fits in smaller spaces and doesn’t break down.
Re:Claude Code's source code has been leaked via a map file ... by apgwoz on Tuesday March 31, 2026 @11:02AM (#47588386)
It’s also deterministic, unlike llms…
Re:Claude Code's source code has been leaked via a map file ... by draxil on Tuesday March 31, 2026 @07:17AM (#47585709)
Good to have more than a hammer in your toolbox!
Re:Claude Code's source code has been leaked via a map file ... by blks on Tuesday March 31, 2026 @07:56AM (#47586049)
Because they actually want it to work 100% of the time and cost nothing.
Re:Claude Code's source code has been leaked via a map file ... by orphea on Tuesday March 31, 2026 @08:02AM (#47586098)
Then they made it wrong. For example, "What the actual fuck?" is not getting flagged, neither is "What the *fuck*".
Re:Claude Code's source code has been leaked via a map file ... by vntok on Tuesday March 31, 2026 @09:33AM (#47587146)
They evidently ran a statistical analysis and determined that virtually no one uses those phrases as a quick retort to a model's unsatisfying answer... so they don't need to optimize for them.
Re:Claude Code's source code has been leaked via a map file ... by arcfour on Tuesday March 31, 2026 @09:42AM (#47587286)
It is exceedingly obvious that the goal here is to catch at least 75-80% of negative sentiment and not to be exhaustive and pedantic and think of every possible way someone could express themselves.
Re:Claude Code's source code has been leaked via a map file ... by Zamaamiro on Tuesday March 31, 2026 @09:55AM (#47587453)
Classic over-engineering. Their approach is just fine 90% of the time for the use case it’s intended for.
Re:Claude Code's source code has been leaked via a map file ... by orphea on Tuesday March 31, 2026 @10:19AM (#47587785)
75-80% [1], 90%, 99% [2]. In other words, no one has any idea.

I doubt it's anywhere that high because even if you don't write anything fancy and simply capitalize the first word like you'd normally do at the beginning of a sentence, the regex won't flag it.

Anyway, I don't really care, might just as well be 99.99%. This is not a hill I'm going to die on :P

[1]: https://news.ycombinator.com/item?id=47587286

[2]: https://news.ycombinator.com/item?id=47586932

Re:Claude Code's source code has been leaked via a map file ... by zwirbl on Tuesday March 31, 2026 @10:56AM (#47588261)
It compares to lowercase input, so doesn't matter. The rest is still valid
Re:Claude Code's source code has been leaked via a map file ... by morkalork on Tuesday March 31, 2026 @11:23AM (#47588706)
Except that it's a list of English keywords. Swearing at the computer is the one thing I'll hear devs switch back to their native language for constantly
Re:Claude Code's source code has been leaked via a map file ... by mohsen1 on Tuesday March 31, 2026 @09:55AM (#47587447)
Maybe hard to believe but not everyone is speaking English to Claude
Re:Claude Code's source code has been leaked via a map file ... by ojr on Tuesday March 31, 2026 @07:46AM (#47585946)
I used regexes in a similar way but my implementation was vibecoded, hmmm, using your analysis Claude Code writes code by hand.
Re:Claude Code's source code has been leaked via a map file ... by sumtechguy on Tuesday March 31, 2026 @07:56AM (#47586057)
hmm not a terrible idea (I think).

You have a semi expensive process. But you want to keep particular known context out. So a quick and dirty search just in front of the expensive process. So instead of 'figure sentiment (20seconds)'. You have 'quick check sentiment (<1sec)' then do the 'figure sentiment v2 (5seconds)'. Now if it is just pure regex then your analogy would hold up just fine.

I could see me totally making a design choice like that.

Re:Claude Code's source code has been leaked via a map file ... by lou1306 on Tuesday March 31, 2026 @07:02AM (#47585556)
They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.
Re:Claude Code's source code has been leaked via a map file ... by noosphr on Tuesday March 31, 2026 @07:09AM (#47585616)
The issue isn't that regex are a solution to find a substring. The issue is that you shouldn't be looking for substrings in the first place.

This has buttbuttin energy. Welcome to the 80s I guess.

Re:Claude Code's source code has been leaked via a map file ... by 8cvor6j844qw_d6 on Tuesday March 31, 2026 @07:37AM (#47585858)
Very likely vibe coded.

I've seen Claude Code went with a regex approach for a similar sentiment-related task.

Re:Claude Code's source code has been leaked via a map file ... by mr_00ff00 on Tuesday March 31, 2026 @11:34AM (#47588905)
My understanding of vibe coding is when someone doesn’t look at the code and just uses prompts until the app “looks and acts” correct.

I doubt you are making regex and not looking at it, even if it was AI generated.

Re:Claude Code's source code has been leaked via a map file ... by rdiddly on Tuesday March 31, 2026 @10:44AM (#47588102)
Clbuttic!
Re:Claude Code's source code has been leaked via a map file ... by lou1306 on Tuesday March 31, 2026 @12:20PM (#47589708)
> The issue is that you shouldn't be looking for substrings in the first place.

Why? They clearly just want to log conversations that are likely to display extreme user frustration with minimal overhead. They could do a full-blown NLP-driven sentiment analysis on every prompt but I reckon it would not be as cost-effective as this.

Re:Claude Code's source code has been leaked via a map file ... by noosphr on Tuesday March 31, 2026 @04:14PM (#47592830)
>Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

The only time to use a regex is when searching with a human in the loop. All other uses are better handled some other way.

>They could do a full-blown NLP-driven sentiment analysis on every prompt but I reckon it would not be as cost-effective as this.

Every conversation is sent to an llm at least a thousand times the size of gpt2 which could one shot this nearly a decade ago.

Re:Claude Code's source code has been leaked via a map file ... by lou1306 on Wednesday April 01, 2026 @02:58AM (#47597758)
> Every conversation is sent to an llm at least a thousand times the size of gpt2 which could one shot this nearly a decade ago.

Yes, but that is _what the product does_. What we are talking about is _telemetry_.

Re:Claude Code's source code has been leaked via a map file ... by BoppreH on Tuesday March 31, 2026 @07:10AM (#47585626)
It's fast, but it'll miss a ton of cases. This feels like it would be better served by a prompt instruction, or an additional tiny neural network.

And some of the entries are too short and will create false positives. It'll match the word "offset" ("ffs"), for example. EDIT: no it won't, I missed the \b. Still sounds weird to me.

Re:Claude Code's source code has been leaked via a map file ... by hk__2 on Tuesday March 31, 2026 @07:16AM (#47585687)
It’s fast and it matches 80% of the cases. There’s no point in overengineering it.
Re:Claude Code's source code has been leaked via a map file ... by NitpickLawyer on Tuesday March 31, 2026 @10:49AM (#47588185)
> There’s no point in overengineering it.

I swear this whole thread about regexes is just fake rage at something, and I bet it'd be reversed had they used something heavier (omg, look they're using an LLM call where a simple regex would have worked, lul)...

Re:Claude Code's source code has been leaked via a map file ... by vharuck on Tuesday March 31, 2026 @07:18AM (#47585713)
The pattern only matches if both ends are word boundaries. So "diffs" won't match, but "Oh, ffs!" will. It's also why they had to use the pattern "shit(ty|tiest)" instead of just "shit".
Re:Claude Code's source code has been leaked via a map file ... by BoppreH on Tuesday March 31, 2026 @07:21AM (#47585737)
You're right, I missed the \b's. Thanks for the correction.
Re:Claude Code's source code has been leaked via a map file ... by pfortuny on Tuesday March 31, 2026 @08:22AM (#47586285)
They had the problem of sentiment analysis. They use regexes.

You know the drill.

Re:Claude Code's source code has been leaked via a map file ... by throwaw12 on Tuesday March 31, 2026 @08:27AM (#47586342)
because impact of WTF might be lost in the result of the analysis if you solely rely on LLM.

parsing WTF with regex also signifies the impact and reduces the noise in metrics

"determinism > non-determinism" when you are analysing the sentiment, why not make some things more deterministic.

Cool thing about this solution, is that you can evaluate LLM sentiment accuracy against regex based approach and analyse discrepancies

Re:Claude Code's source code has been leaked via a map file ... by kjshsh123 on Tuesday March 31, 2026 @08:30AM (#47586377)
Using regex with LLMs isn't uncommon at all.
Re:Claude Code's source code has been leaked via a map file ... by floralhangnail on Tuesday March 31, 2026 @09:02AM (#47586761)
Well, regex doesn't hallucinate....right?
Re:Claude Code's source code has been leaked via a map file ... by raw_anon_1111 on Tuesday March 31, 2026 @11:51AM (#47589222)
I just went to expertSexChange.com…
Re:Claude Code's source code has been leaked via a map file ... by geon on Tuesday March 31, 2026 @11:23AM (#47588712)
buttbuttination
Re:Claude Code's source code has been leaked via a map file ... by mmh0000 on Tuesday March 31, 2026 @11:51AM (#47589218)
Re:Claude Code's source code has been leaked via a map file ... by mghackerlady on Tuesday March 31, 2026 @09:08AM (#47586829)
More like a car company transporting their shipments by truck. It's more efficient
Re:Claude Code's source code has been leaked via a map file ... by __alexs on Tuesday March 31, 2026 @09:42AM (#47587281)
Using some ML to derive a sentiment regex seems like a good actually?
Re:Claude Code's source code has been leaked via a map file ... by lazysheepherd on Tuesday March 31, 2026 @09:50AM (#47587396)
Because they are engineers? The difference between an engineer and a hobbyist is an engineer has to optimize the cost.

As they say: any idiot can build a bridge that stands, only an engineer can build a bridge that barely stands.

Re:Claude Code's source code has been leaked via a map file ... by feketegy on Tuesday March 31, 2026 @10:05AM (#47587587)
It's all regex anyways
Re:Claude Code's source code has been leaked via a map file ... by harikb on Tuesday March 31, 2026 @10:10AM (#47587652)
Not everything done by claude-code is decided by LLM. They need the wrapper to be deterministic (or one-time generated) code?
Re:Claude Code's source code has been leaked via a map file ... by irthomasthomas on Tuesday March 31, 2026 @10:13AM (#47587699)
This just proves its vibe coded because LLMs love writing solutions like that. I probably have a hundred examples just like it in my history.
Re:Claude Code's source code has been leaked via a map file ... by irthomasthomas on Tuesday March 31, 2026 @01:27PM (#47590695)
Actually, this could be a case where its useful. Even it only catches half the complaints, that's still a lot of data, far more than ordinary telemetry used to collect.
Re:Claude Code's source code has been leaked via a map file ... by j45 on Tuesday March 31, 2026 @10:13AM (#47587702)
Asking a non deterministic software to act like a deterministic one (regex) can be a significantly higher use of tokens/compute for no benefit.

Some things will be much better with inference, others won’t be.

Re:Claude Code's source code has been leaked via a map file ... by intended on Tuesday March 31, 2026 @10:15AM (#47587733)
The amount of trust and safety work that depends on google translate and the humble regex, beggars the imagination.
Re:Claude Code's source code has been leaked via a map file ... by lopsotronic on Tuesday March 31, 2026 @10:29AM (#47587915)
The difference in response time - especially versus a regex running locally - is really difficult to express to someone who hasn't made much use of LLM calls in their natural language projects.

Someone said 10,000x slower, but that's off - in my experience - by about four orders of magnitude. And that's average, it gets much worse.

Now personally I would have maybe made a call through a "traditional" ML widget (scikit, numpy, spaCy, fastText, sentence-transformer, etc) but - for me anyway - that whole entire stack is Python. Transpiling all that to TS might be a maintenance burden I don't particularly feel like taking on. And on client facing code I'm not really sure it's even possible.

Re:Claude Code's source code has been leaked via a map file ... by mlmonkey on Tuesday March 31, 2026 @12:02PM (#47589403)
> Someone said 10,000x slower, but that's off - in my experience - by about four orders of magnitude.

You do know that 10,000x _is_ four orders of magnitude, right? :-D

Re:Claude Code's source code has been leaked via a map file ... by jonbwhite on Tuesday March 31, 2026 @12:12PM (#47589565)
OP is saying that in their experience it is more like eight orders of magnitude
Re:Claude Code's source code has been leaked via a map file ... by mlmonkey on Tuesday March 31, 2026 @12:57PM (#47590257)
I guess I need reading glasses ... :-D
Re:Claude Code's source code has been leaked via a map file ... by cyanydeez on Tuesday March 31, 2026 @10:33AM (#47587969)
So, think of it as a business man: You don't really care if your customers swear or whatever, but you know that it'll generate bad headlines. So you gotta do something. Just like a door lock isn't designed for a master criminal, you don't need to design your filter for some master swearer; no, you design it good enough that it gives the impression that further tries are futile.

So yeah, you do what's less intesive to the cpu, but also, you do what's enough to prevent the majority of the concerns where a screenshot or log ends up showing blatant "unmoral" behavior.

Re:Claude Code's source code has been leaked via a map file ... by true_religion on Tuesday March 31, 2026 @10:39AM (#47588035)
This door lock doesn’t even work against people speaking French, so I think they could have tried a mite harder.
Re:Claude Code's source code has been leaked via a map file ... by sebastiennight on Tuesday March 31, 2026 @11:19AM (#47588640)
En toute honnêteté, je pense avoir dit "damn it" plus d'une fois à chat gépété avant de fermer la fenêtre dans un accès de rage
Re:Claude Code's source code has been leaked via a map file ... by ben_w on Tuesday March 31, 2026 @11:37AM (#47588973)
The up-side of the US market is (almost) everyone there speaks English. The down side is, that includes all the well-networked pearl-clutchers. Europe (including France) will have the same people, but it's harder to coordinate a network of pearl-clutching between some saying "Il faut protéger nos enfants de cette vulgarité!" and others saying "Η τηλεόραση και τα μέσα ενημέρωσης διαστρεβλώνουν τις αξίες μας!" even when they care about the exact same media.

For headlines, that's enough.

For what's behind the pearl-clutching, for what leads to the headlines pandering to them being worth writing, I agree with everyone else on this thread saying a simple word list is weird and probably pointless. Not just for false-negatives, but also false-positives: the Latin influence on many European languages leads to one very big politically-incorrect-in-the-USA problem for all the EU products talking about anything "black" (which includes what's printed on some brands of dark chocolate, one of which I saw in Hungary even though Hungarian isn't a Latin language but an Ugric language and only takes influences from Latin).

Re:Claude Code's source code has been leaked via a map file ... by sebastiennight on Tuesday March 31, 2026 @01:59PM (#47591168)
I just went through quite an adventure trying to translate back and forth from/to Hungarian to/from different languages to figure out which Hungarian word you meant, and arrived at the conclusion that this language is encrypted against human comprehension.
Re:Claude Code's source code has been leaked via a map file ... by bandie91 on Tuesday March 31, 2026 @03:18PM (#47592139)
dark chocolate is "étcsokoládé" literally edible-chocolate in Hungarian.

i heared the throat-cleaning "Negró" candy (marketed by a chimney sweeper man with soot-covered face) was usually which hurt English-speaking people's self-deprecating sensitivities.

Re:Claude Code's source code has been leaked via a map file ... by bigbuppo on Tuesday March 31, 2026 @12:31PM (#47589883)
There are only Americans on the internet.
Re:Claude Code's source code has been leaked via a map file ... by tomaskafka on Tuesday March 31, 2026 @02:46PM (#47591726)
Nom de dieu de putain de bordel de merde de saloperie de connard d'enculé de ta mère.
Re:Claude Code's source code has been leaked via a map file ... by z500 on Tuesday March 31, 2026 @02:54PM (#47591820)
It's like wiping your arse with silk.
Re:Claude Code's source code has been leaked via a map file ... by themafia on Tuesday March 31, 2026 @03:10PM (#47592037)
Yea.. but.. in English only.

Fortunately I can swear pretty well in Spanish.

Re:Claude Code's source code has been leaked via a map file ... by jacquesm on Tuesday March 31, 2026 @04:31PM (#47593061)
That's like saying you can use a chisel for woodworking.
Re:Claude Code's source code has been leaked via a map file ... by senderista on Wednesday April 01, 2026 @01:34AM (#47597190)
Only a native speaker can tell if you swear well in a foreign language.
Re:Claude Code's source code has been leaked via a map file ... by themafia on Wednesday April 01, 2026 @02:13AM (#47597440)
And Claude can't tell at all.
Re:Claude Code's source code has been leaked via a map file ... by noprof6691 on Tuesday March 31, 2026 @12:21PM (#47589746)
They're sending it to an llm anyway tho? Not sure why they wouldn't just add a sentiment field to the requested response shape.
Re:Claude Code's source code has been leaked via a map file ... by FuckButtons on Tuesday March 31, 2026 @12:28PM (#47589839)
because a regex on the client is free vs gpu compute is absolutely not.
Re:Claude Code's source code has been leaked via a map file ... by noprof6691 on Wednesday April 01, 2026 @04:15AM (#47598239)
BUT THEY'RE ALREADY RUNNING IT THROUGH THE LLM.
Re:Claude Code's source code has been leaked via a map file ... by wcrossbow on Tuesday March 31, 2026 @12:46PM (#47590109)
If it’s good enough it’s good enough, but just like there are many more options than going full blown LLM or just use a regex there are more options than transpile a massive Python stack to TS or give up.
Re:Claude Code's source code has been leaked via a map file ... by sfn42 on Tuesday March 31, 2026 @10:37AM (#47588007)
It's almost as if LLMs are unreliable
Re:Claude Code's source code has been leaked via a map file ... by apgwoz on Tuesday March 31, 2026 @11:01AM (#47588351)
> That's like a truck company using horses to transport parts. Weird choice.

Easy way to claim more “horse power.”

Re:Claude Code's source code has been leaked via a map file ... by makeitrain on Tuesday March 31, 2026 @11:12AM (#47588546)
Don’t worry, they used an llm to generate the regex.
Re:Claude Code's source code has been leaked via a map file ... by make3 on Tuesday March 31, 2026 @11:28AM (#47588800)
it's like a faster than light spaceship company using horses. There's been infinite solutions to do this better even CPU only for years lol.
Re:Claude Code's source code has been leaked via a map file ... by nojs on Tuesday March 31, 2026 @11:37AM (#47588970)
Oh it’s worse than that. This one ended up getting my account banned: https://github.com/anthropics/claude-code/issues/22284
Re:Claude Code's source code has been leaked via a map file ... by lanbin on Tuesday March 31, 2026 @12:04PM (#47589429)
This is a tricky problem, I mean, Pinyin also uses the English alphabet.
Re:Claude Code's source code has been leaked via a map file ... by foodevl on Tuesday March 31, 2026 @02:17PM (#47591392)
It is not a tricky problem because it has a simple and obvious solution: do not filter or block usage just because the input includes a word like "gun".
Re:Claude Code's source code has been leaked via a map file ... by cryptonector on Tuesday March 31, 2026 @11:45AM (#47589118)
Wow, that's horrible.
Re:Claude Code's source code has been leaked via a map file ... by toraway on Tuesday March 31, 2026 @05:26PM (#47593675)
... and closed for inactivity like basically every issue in the repo, of course.
Re:Claude Code's source code has been leaked via a map file ... by raw_anon_1111 on Tuesday March 31, 2026 @11:48AM (#47589178)
Cloud hosted call centers using LLMs is one of my specialties. While I use an LLM for more nuanced sentiment analysis, I definitely use a list of keywords as a first level filter.
Re:Claude Code's source code has been leaked via a map file ... by pdntspa on Tuesday March 31, 2026 @11:50AM (#47589204)
LLMs cost money, regular expressions are free. It really isn't so strange.
Re:Claude Code's source code has been leaked via a map file ... by nitekode on Tuesday March 31, 2026 @12:22PM (#47589752)
A lot if things dont make sense until you involve scale. Regex could be good enough do give a general gist.
Re:Claude Code's source code has been leaked via a map file ... by ldobre on Tuesday March 31, 2026 @12:33PM (#47589905)
It's more like a truck company using people to transport some parts. I could be wrong here, but I bet this happens in Volvo's fabrics a lot.
Re:Claude Code's source code has been leaked via a map file ... by arnarbi on Tuesday March 31, 2026 @02:17PM (#47591395)
It's more like workers on a large oil tanker using bicycles to move around it, rather than trying to use another oil tanker.
Re:Claude Code's source code has been leaked via a map file ... by scotty79 on Tuesday March 31, 2026 @03:01PM (#47591927)
As far as I can tell they do nothing with it. They just log it.
Re:Claude Code's source code has been leaked via a map file ... by artrockalter on Tuesday March 31, 2026 @04:39PM (#47593181)
LLMs are good at writing complex regex, from my experience
Re:Claude Code's source code has been leaked via a map file ... by slashdave on Wednesday April 01, 2026 @01:41AM (#47597226)
Maybe. Could just be a pre filter.