logoalt Hacker News

cogman10today at 2:07 PM2 repliesview on HN

They are doing some strange "reinvent the wheel" stuff.

For example, I found an implementation of a PRNG, mulberry32 [1], in one of the files. That's pretty strange considering TS and Javascript have decent PRNGs built into the language and this thing is being used as literally just a shuffle.

[1] https://github.com/AprilNEA/claude-code-source/blob/main/src...


Replies

hombre_fataltoday at 4:04 PM

mulberry32 is one of the smallest seedable prngs. Math.random() is not seedable.

If you search mulberry32 in the code, you'll see they use it for a deterministic random. They use your user ID to always pick the same random buddy. Just like you might use someone's user ID to always generate the same random avatar.

So that's 10 lines of code accounted for. Any other examples?

neurostimulanttoday at 2:42 PM

Well, at least that confirms they weren't lying when they said all recent updates to claude code were made by claude. You certainly won't do this stuff if you were writing the code yourself.