ProgrammerHumor

wholeCodebaseInTXTFile

wholeCodebaseInTXTFile
https://i.redd.it/mgs88k4c43df1.png
Reddit

Discussion

Semper_5olus

"But please pretend it's in different files because I'll have to separate it back up when I'm done."

There. That should work.

8 hours ago
Flimsy_Meal_4199

I do stuff like this all the time (probably not at this scale)

Putting your files in markdown code blocks with the name of the file works really well

```main.py
# code here
```
-----
```pkg/file1.py
# more code
```
6 hours ago
boundbylife

I have a 'small' Flutter app. I have 16 model class files, 9 navigation class files, 3 parser class files, and a handful of utility class files. It's probably 15,000 lines.

Your solution is not tenable :-p

29 minutes ago
offlinesir

wholeScreenshotIn591x657Resolution

8 hours ago
John_Carter_1150 OP
:py:

Sorry, couldn't find a better way to shoot the screen.

7 hours ago
TimoSLE

A gun should be pretty effective

7 hours ago
John_Carter_1150 OP
:py:

that's what I thought, but I didn't have one handy

7 hours ago
PeriodicGolden

/r/shitnonamericanssay

7 hours ago
lunch431

The REAL American would have known how to shoot anything.

7 hours ago
TheFriendshipMachine

As an American, the struggle I'm having is choosing which gun to shoot my screen with!

(Shit, my profile actually backs that claim)

6 hours ago
AZEMT

5 hours ago
TheFriendshipMachine

5 hours ago
ThrowingPokeballs

Can you not just vibe code that?

7 hours ago
offlinesir

it's really not that bad, I've seen worse.

7 hours ago
djnz0813

Some more pixels please

5 hours ago
ProfBeaker

He's not trying to give you all the screen details, just the overall vibe.

7 hours ago
Linkpharm2

Proof? Lemme see you eyeballing it perfectly

8 hours ago
offlinesir

I downloaded the image and saw the height and width (in pixels!)

Proof: https://imgur.com/a/DHQAked

7 hours ago
Linkpharm2

I was so expecting a rickroll

7 hours ago
Vorenthral

Since they plan to train Grok off the code dumped in I am kinda tempted to just dump garbage code in from a different LLM and tell it it's google source code or some nonsense just to screw with the algorithm.

7 hours ago
shinzanu

Fuck yes, been waiting for AI poisoning wars to arrive :D

6 hours ago
emetcalf

Write a program that vibe codes 100 projects per minute and submits them to Grok for optimization.

5 hours ago
Vorenthral

I love this idea

4 hours ago
UnrealCanine

uint_8 count;

for x in range(count):

System.out.println(x);
5 hours ago
otterquestions

Ever since GPT 3 they have had quality screening models to make sure the input data isn’t terrible

5 hours ago
1T-context-window

Doing God's work!

6 hours ago
_Repeats_

xAI has your entire codebase. Hope you have patents and a good lawyer to protect your IP...

8 hours ago
DanTheMan827

Here’s a question though… assuming the original code was written by AI, do you even own it to begin with?

8 hours ago
Grandmaster_Caladrel

Depends on the ToS but generally yes. Morally is a separate question, but legally you own it.

7 hours ago
Snipedzoi

Fym it's the new stack over flow copy here copy there it's all my code

7 hours ago
Grandmaster_Caladrel

Not sure I know what fym stands for but the rest of the sentiment seems to match what I said.

5 hours ago
Gacsam

Stands for "fuck you mean?" [about morally]

5 hours ago
Grandmaster_Caladrel

Gotcha, thank you for the answer!

5 hours ago
Snipedzoi

Morally it's the same as stack overflows.

5 hours ago
PCgaming4ever

Pretty sure the answer is no to owning anything on the Internet that AI touches since the courts rules AI can scrape anything without legal ramifications

7 hours ago
John_Carter_1150 OP
:py:

Don't start this argument, man...

7 hours ago
LavaCreeperBOSSB

I was looking at cursor today and it claims you own the code

7 hours ago
Vegetable-Willow6702

my ip is 127.0.0.1 and it's already been leaked many times so checkmate, nerds 😎

7 hours ago
Constant-Tea3148

We all know that the one thing these companies really care about are your rights under copyright law.

7 hours ago
typoscript

Do we actually think this matters here?

The tech companies that have code work parenting are less than .1%

6 hours ago
otterquestions

Why would anyone care about your code base? 

5 hours ago
ForeverDuke2

Surely this is a joke or only inteded for really small projects.

How would it even work for actual projects. Do I first need to consolidate the entire codebase in a single text file...? That itself is a huge endeavour.

7 hours ago
jeremj22

Could probably write a script to cat all the files.

Getting whatever non-compiling trash the AI spits out back into your codebase is another matter...

7 hours ago
eightysixmonkeys

Yeah and there’s absolutely no way the AI doesn’t get “confused” and start producing trash code once it has to deal with all the dependencies.

When I was using chatgpt a lot for webdev it constantly incorrectly messing up the import statements

6 hours ago
egg_breakfast

That would technically work, but then you're already providing grok from the get go with code that doesn't compile. lol

5 hours ago
GaymerBenny
:j:

I'm relatively sure you can just upload multiple.txt files

4 hours ago
Visible_Whole_5730

lol my first thought too 🤣

3 hours ago
henkje112

I know it's a joke but i actually wrote a rust crate to copy a codebase to clipboard specifically for this use case. If you want to check it out, you can find it here: https://crates.io/crates/repoyank

I haven't tried for huge codebases, but for anything up to 30k tokens, Gemini 2.5 pro "understands" the filestructure and internal dependencies.

6 hours ago
GregoryfromtheHood

Wait, I didn't get the joke because this is how I use Claude and other services. How else are you supposed to feed it the right context and know that it knows everything you want it to know? If the codebase is too big, I just include as much as I can for context while using a token counter to make sure the text file isn't getting excessively large. I've even got python scripts for packing up parts of the codebase into a single txt file with headers separating the files.

Now I feel like there's a better way that I've been missing...

5 hours ago
sebjapon

Do you get good results like that? Is it really faster than solving the problem yourself?

How about asking a colleague for help?

4 hours ago
GregoryfromtheHood

Yep, I get great results like that, and for certain things yes, it's way faster than writing it myself. If I know the problem I need to solve and need to bounce ideas, then get the solution written the way I want, but without needing to write everything by hand, it's super handy. And by giving it the context of parts of the codebase that it needs, then it knows how it all fits together and can come up with things that neither me or my colleagues had thought of.

I know there are tools that can put your codebase in a vectordb and do RAG, but I like to control what context I send because I know the important parts of the code that it needs to solve a particular problem or just write a particular function for me if I'm being lazy.

That's why I shove stuff into one big text file, easiest way to feed it in.

4 hours ago
ba-na-na-
:cs::cp::py::js::ts:

7 hours ago
ETHedgehog-
:g:

all_code.txt

7 hours ago
Obvious-Phrase-657

Did it work tho? Gemini is able to handle this with the 1M token limit

8 hours ago
Johalternate
:ts:

I dont think so. I just ran a quick script that turns your codebase into a single txt file (respecting .gitignore) on a project. The number of lines is 136,201. The number of characters is 3,679,767 (this includes the path/name of each file before the file contents). THe average length of a token is 4 characters according to google (source) That leaves us with very little wiggle room for interacting in a meaninful way.

6 hours ago
Hot-Entrepreneur2934

AMAZING! I'll start copy and pasting in all my files now!

7 hours ago
Positive_Minimum3468

Plottwist: contains 400k GitHub links

7 hours ago
BakalhauSalgado

For those wondering, "How would I combine the entire project into one file?" https://repomix.com/

5 hours ago
naholyr

Why are people so stupid?

6 hours ago
bbjaii

Please don’t steal my code

7 hours ago
coloredgreyscale
:j::py:

just manually copy your project into a single text file first, lol

6 hours ago
henkje112

I know it's a joke but i actually wrote a rust crate to copy a codebase to clipboard specifically for this use case. If you want to check it out, you can find it here: https://crates.io/crates/repoyank

I haven't tried for huge codebases, but for anything up to 30k tokens, Gemini 2.5 pro "understands" the filestructure and internal dependencies.

6 hours ago
eightysixmonkeys

Holy shit this is suicide fuel

6 hours ago
Yhamerith
:py:

Vibe coding or N@zi coding?

5 hours ago
timawesomeness
:re::re::re::re::re::re::re::re::re::re::re::re::re::re::re::re:

Violent antisemitism is one of the vibes needed for vibe coding with Grok

1 hour ago
Sculptor_of_man

There is 'vibe' coders and then there is what ever the hell this is.

1 hour ago
tanczosm

https://repomix.com/

1 hour ago