ProgrammerHumor

entireSourceCodeInAFile

entireSourceCodeInAFile
https://i.redd.it/2benhufnb1cf1.png
Reddit

Discussion

legowerewolf
:g::ts::py::powershell:

Step aside, monorepos. Here comes a monofile.

7 hours ago
Deep-Fuel4386
:rust::rust::rust::rust::rust::rust:

Version control is done via comments

7 hours ago
CheesePuffTheHamster

// Uncomment lines 427-560, 563-566, 798-1211 and 3250 to change the new blue colour back to the older, slightly different blue colour

7 hours ago
PooksterPC

//whoops, I added in a couple lines at the top and now all the commit comments don’t make sense. Idk, get grok to fix it

6 hours ago
roiki11

Just wait until you have to fix a typo in line 15400237, and for your linter to check it.

6 hours ago
100GHz

Eh, just write another tool with ai to fix that !

5 hours ago
Beginning-Plane3399

Each team member gets a thousand lines to work with 7000-8000

3 hours ago
SomeShittyDeveloper
:py:

I've seen that way too many times in my career. Boss thinks the comments are better than Git blame.

6 hours ago
crimson23locke

That’s absolutely unhinged but I’ve no trouble at all believing it because of the other fuckery I’ve seen.

6 hours ago
rob_cornelius

the 'tech lead' in my previous post made everyone put in comments for everything, everywhere. We kept saying 'git blame' and 'git log' but no.

I would put in comments like 'changed this hex value for a color and then write a multi-line justification for the change, linked tickets, confirmation from managers the lot'

Just before the moron left I was doing something with him. He said 'The thing you need is in another branch, open up vscode to swap to that branch'. I said I don't use vscode. 'OK then open TortoiseGIT it is'. Don't use that either. The dumb bastard didn't know how to change to a different branch on the command line. He had to use a GUI tool.

5 hours ago
much_longer_username

Reminds me of this post I read. The dumb bastard didn't know how to change to a different branch on the GUI. He had to use a CLI tool. They were even offered two different GUI options...

4 hours ago
rob_cornelius

I make sure I know how to do the basics of everything on the command line and a simple text editor. If the shit hits the fan then that might well be all you have available to you.

3 hours ago
NegativeSwordfish522

the things one has to go through when working as a software developer for a company that is not tech based. Problem is your bosses don't see the use of having stuff like version control, good documentation, clear data governance, devops, unit tests, etc. "We need to deliver this by tomorrow!!" "we don't have time to waste in your engineering games!!", "just get the thing done, I asked chatGPT and it said it can be done in two hours!!" FML, if they actually gave us time to structure our workflow in the correct way then we would be able to deliver stuff on time

4 hours ago
roygbivasaur

I hear that there’s a way to write a small file that then gets blown up by another program and turned into a bigger file full of a bunch of gobbledygook that only computers understand.

7 hours ago
DDFoster96

with open(__file__, 'a') as fp:     for i in range(1000000):         fp.write("\n# Hello World") 

Replace 1000000 and the comment string as required. 

4 hours ago
caerphoto
with open(__file__, 'a') as fp:
    while True:
        fp.write("\n# Hello World") 

FTFY

3 hours ago
zane111111

Repomix

6 hours ago
Sunshine3432

error at line 10.120.874

6 hours ago
DinoChrono

And after two entire days you realize that the error is at line 5.962.855

2 hours ago
random_numbers_81638

Has various advantages! You don't need linker anymore!

7 hours ago
MattR0se
:py:

ngl I wrote a script that turned my 30ish cpp/h files into one txt file so I could upload it to ChatGPT's knowledge pool. 

It didn't really work though (unsurprisingly).

7 hours ago
Agifem

Spoiler alert: even if it had worked, it wouldn't have worked.

2 hours ago
snacktonomy

I see your monofile and raise you a monofunction! Some people in college actually did that and unbelievably, passed

5 hours ago
participantuser

Can you really call your function handler() if it can’t handle everything? /s

2 hours ago
wizkidweb
:p::js::dart::bash:

Like the days of old. Let's bring back GOTO

5 hours ago
Flying_penguin429
:bash:

Monolith gets a whole new meaning after this

5 hours ago
Quicker_Fixer
:redditgold:

It worked for my project, though. I have his 4 million line code non-functional project and uploaded it to Grok. It was able to reduce it to around 400 lines. Now it still doesn't work and we're now trying to fix that problem manually, but 400 lines is easier to fix than 4 million, so that's a win!

8 hours ago
Lysol3435

Pro-tip to streamline any codebase: delete the bottom half of the code. If it were important, it would have been higher up

7 hours ago
Trasvi89

Single pass compilers hate this

7 hours ago
Auravendill
:cs::py::j::cp::c:

I prefer to use the Stalin-preprocessor: Every function, that would throw a compiler error, gets eliminated. Every function, that does not pass its unit test, gets eliminated. Every function, that does not praise the Soviet Union, gets eliminated.

Run it once and your code is much more ethnically cleansed.

7 hours ago
gasbow

I present to you: Vigil, the eternally vigilant programming language:

https://github.com/munificent/vigil

6 hours ago
CompetitiveLeg7841
:s:

The rebellious typo on line 678

5 hours ago
ListlessLoser

Fantastic, thank you

5 hours ago
djfdhigkgfIaruflg

4 hours ago
anonynown

In Soviet Union, the functions test you.

6 hours ago
noodles_jd

In Soviet Union, the tests write the code.

4 hours ago
TheGrandWhatever

You shall be recompiled into working class citizen. No overhead, only work

5 hours ago
wademcgillis

haha

7 hours ago
brainpostman
:js: :ts: :j: :cs:

Wot in tarnation.

7 hours ago
Intelligent-Ad74

Why did I hear this?

5 hours ago
Mallissin

I laughed so hard at this.

7 hours ago
kafoso

Ah, yes. Much easier to look through a single file with 10,000 characters per line line. Not at all a problem for any text editor/IDE to render!

7 hours ago
InterstellarReddit

I got interesting results. I was making an app to empower minorities/women, and the new code is spit out is belittling minorities/women. Should I file a defect with the grok team?

6 hours ago
RestInProcess

Based on reports about Grok lately, I’d hate to see what the comments are.

7 hours ago
ExistentialistOwl8

All UI colors changed to #FFFFFF, because anything else is discrimination and DEI.

5 hours ago
Zerokx

Its GROK. Based on recent events it's gonna go with some holocaust-denial level of response. "What? There never were 4 million lines of code! That number is highly exaggerated!"

5 hours ago
a_brand_new_start

My 5 year old kid needs a job, if you hire him he can give you the same result with just a single key on keyboard

7 hours ago
AcrobaticAd9381 OP

To be sure that you got the instructions correctly, you are supposed to "cut paste" and not "copy paste"!

7 hours ago
Mysterious-Anxiety25

That's how good Grok is. You don't even want to keep your old code in the file.

6 hours ago
Adorable-Maybe-3006

you simply connect your server to grok and it will produce the code on demand

6 hours ago
Due_Interest_178

Yeah because if you copy paste you'll have the unfixed code still there.

6 hours ago
MiscFrizzy

Doubtful....

Also sounds like a good way to feed grok any ideas youre working on for X to learn about.

7 hours ago
UnrealCanine

Upload fake code with fake libraries

7 hours ago
ThePretzul
:asm::c::cp::cs::py:

* Uploads isEven to Grok *

Grok: Have you considered that you don’t go far enough? You lack support for the full range of u_int64 values.

6 hours ago
10BillionDreams

I'll do you one better:

function isNegative(u_int64 n) {
  return false;
}
48 minutes ago
Cognitive_Spoon

Upload poison, even better.

6 hours ago
Testiculese

Upload 15 minutes of HackerTyper.

5 hours ago
Nozinger

Our Use of User Content. You grant, an irrevocable, perpetual, transferable, sublicensable, royalty-free, and worldwide right to xAI to use, copy, store, modify, distribute, reproduce, publish, display in public forums, list information regarding, make derivative works of, and aggregate your User Content and derivative works thereof for any purpose, including but not limited: (i) to maintain and provide the Service; (ii) to improve our products and the Service and for our other business purposes, such as data analysis, customer and market research, developing new products or features, or identifying or displaying usage or User Content trends; and (iii) to perform such other actions to enforce these Terms, comply with our Privacy Policy, comply with applicable law, or keep our Service safe.

Straight from the xAI terms of service.
Or in other words "we might steal all your code to develop our own new product". Oh it is also transferable and sublicensable so... they can actually sell your code to another company that then makes its own product from it.

6 hours ago
aka-rider

They wish. I can feed grok e.g. GPL code, they are free to try and violate the license. Terms and conditions are not always legally binding. 

1 hour ago
mr_clauford
:py:

He has no fucking clue

8 hours ago
AcrobaticAd9381 OP

I wonder what X's engineers told him for him to conclude this!

8 hours ago
balbok7721

They were probably doing a demo and that’s all he understood from there but didn’t realize they were doing it for small snippets instead of entire code bases

7 hours ago
blackscales18

Is grok's context window larger than 280 characters? /s

7 hours ago
dschazam
:ts::sw::cs::py::bash:

2 hours ago
mikeballs
:cs::py:

Dude thinks "source code" is a singular file that powers the whole code base

3 hours ago
two2teps

His code is so bad whatever his Shitler bot spits back is probably an improvement.

7 hours ago
agentchuck

I mean... He owns rights to your source code as soon as you upload it so I'm sure that's all he cares about.

6 hours ago
Testiculese

Start uploading text dumps of HackerTyper.

5 hours ago
dlc741

It was clear from his tweet with an anti-woke pseudo shell script that he doesn't know shit about programming or IT in general.

7 hours ago
ThatTrashBaby

What is this referring to?

5 hours ago
XKeyscore666

He tweeted:

traceroute woke_mind_virus woke_mind_virus found at 127.0.0.1 woke_mind_virus deleted rm -rf.

He sure knows what computer is.

5 hours ago
Potaoworm

It’s so fucking funny that the ip is local too

4 hours ago
FIagrant

"deleted rm -rf" lmfao

4 hours ago
rosuav

WOW! He is an expert! If he had two keyboards and a pair of sunglasses, he could hack into the Pentagon!!

2 hours ago
whatssenguntoagoblin

I was skeptical that he had no code experience before. Now I’m absolutely certain.

5 hours ago
WeirdIndividualGuy

His only code experience was 1990s web dev and that’s it.

So yeah, he has no code experience.

3 hours ago
Tiruin

You hadn't heard of him firing people based on their "10 most salient lines of code"?

3 hours ago
Percolator2020
:ftn::unreal::c::kos:

Xitter is a monolith - confirmed.✅

7 hours ago
AcrobaticAd9381 OP

Xitlers Xitter?

7 hours ago
unicodePicasso
:unity:

In Spanish, if X is at the beginning of a word it makes the Sh sound.

7 hours ago
mikeysgotrabies

So shitter?

7 hours ago
redeemedd07

Wtf no it doesn't, in what word does this happen??

6 hours ago
Sythokhann
:r::js::s:

In xitter

6 hours ago
ShinyStarSam

You sure about that? Gimme some words you think make that sounds

6 hours ago
raul3963

I don't know in Spanish, but in Portuguese it does if it counts. As in "xícara", "xamã", "Xuxa"

4 hours ago
SoftwareSource

I guess he is as good at coding as he is at diablo or whatever game account he bought to claim he is top in the world.

7 hours ago
electricdrop

It was Path of Exile 2

7 hours ago
SoftwareSource

Yea probably, couldn't remember the details.

7 hours ago
Anonymost

Both actually

7 hours ago
MiniDemonic

It was both. He recently posted a video of him doing a pit100 in D4 HC claiming to be rank 1 (except the actual rank 1 has done 107). What is also odd in his video is that he could choose pit 137 but that is only possible if he has unlocked 137 by doing a 132 with a lot of time leftover or done a 136 just barely in time.

So either he did it on eternal realm (non-seasonal/non-league) which no one cares about or his chinese player is the literal best player in the entire world having done 130+ pits on HC seasonal before even SC seasonal players have done it.

5 hours ago
DrowningKrown

Dawg we saw his live stream of POE2. He can’t play games for shit. He’s just a liar paying other people to play for him. No more no less

3 hours ago
JustExpect

AND D4

5 hours ago
DerBandi

He's just a rich kid fooling around without real consequences to him personally. He is not an expert in anything.

4 hours ago
Aradur87
:p:

„Cut & paste“… „entire source code file“…

I need to lay down…

6 hours ago
MrHyd3_

This is the reason we'll be serving our Lord Mechahitler in 10 years

8 hours ago
AcrobaticAd9381 OP

VibeNazi'ing his way to world domination!

8 hours ago
checkpoint_hero

the woke mind virus is just sloppy code that grok vaccinate sterilize

3 hours ago
Complete-Singer-2528

Pair programming with MechaHitler is not on my todo list, sorry bud.

7 hours ago
NebraskaGeek
:js:

In school my teacher, on purpose, didn't explain how to link to include other files in Java 1. At the end of 1st semester our file was about 1,000 lines long, and he was like, wouldn't it be great if there was a better way? And taught everyone how to de-spegetiffy their code and make a logical program file structure. I still use those tips and tricks today. Mr. Babb was the fucking best.

5 hours ago
ItselfSurprised05

At the end of 1st semester our file was about 1,000 lines long, and he was like, wouldn't it be great if there was a better way?

This is the way. Seriously.

4 hours ago
bbjaii

CUT and paste?

7 hours ago
antisocialAI
:sw:

Yes. The entire source code file.

6 hours ago
neoteraflare

Why? Do you want to keep the bad old code?

5 hours ago
al2o3cr

I hear if you ask Grok to help with CSS the result has text-align: right on every element 😂

7 hours ago
Shifter25

color: white

7 hours ago
chrisfaux
:js::ts::py::c::bash::msl:

@media (prefers-color-scheme: light) {}

3 hours ago
QuintusNonus

lmao source code file sounds like something my mom would say

7 hours ago
Adorable-Maybe-3006

Honey, you left your source code file on the table, i spilled some coffee on it.

6 hours ago
doulos05

Cut and paste?? CUT?!

Copy, maybe. But cut?? That's unhinged

5 hours ago
Try7530

The guy's brain is cooked

5 hours ago
PelmeniMitEssig

Weird way to say: „Please give me your API keys“

5 hours ago
Flooding_Puddle
:cs:

It'll also add comments about jews and white genocide to your code

7 hours ago
DowvoteMeThenBitch

Can we all start uploading offensive code so that grok only produces offensive code?

7 hours ago
Canonip

what do you mean, my 10 line python script isn't real software

7 hours ago
lurkingReeds

And I guess grok just magically knows exactly what each function is supposed to do.

8 hours ago
AcrobaticAd9381 OP

yes. just that you have to put all your source code in a file first :-|

7 hours ago
a_library_socialist

And the libraries that you reference, make sure you include their source code in the file as well . . .

7 hours ago
dillanthumous

Lol. Copy paste: React.git

7 hours ago
DHermit
:rust::py::math:

Forcing people to document their code well enough so AI understands sounds like a positive thing to me.

7 hours ago
Adorable-Maybe-3006

IKR, it will be a drag for the guy actually writing the documentation, but the mantainance team will love it.

6 hours ago
tismij

No he wants your source code, even if it doesn't work properly.

7 hours ago
Happler

I thought this was r/programminghorror for a second.

5 hours ago
proud_traveler

So cool that I also don't need to post any of the library info, or other project specific context! 

8 hours ago
Vogete
:g::py::js::bash:

Guy needs to get off the internet and get a real hobby.

7 hours ago
rietti

You can copy/paste your whole code into grok and it will call you nigger in no time

4 hours ago
setibeings
:rust::cp::js::ru::ts::j:

So, do I tar the project first? If so, should I compress it as well, or will it work better if I just leave it uncompressed?

7 hours ago
AcrobaticAd9381 OP

Why can't you just keep it simple, follow the instructions and cut paste everything into one file?!

7 hours ago
YMK1234

In the end that is exactly how any coding assistant works. Just that its called "context" there.

7 hours ago
danhezee

I am not sure how it could improve on my helloworld.c application.

7 hours ago
Sysilith

The printf doesn't do anything in the Code so remove it.

6 hours ago
Quirky-Craft-3619
:js::c::j:

even if I had a single source code file (😭), if grok were to make some simple changes I wouldn’t be surprised if it spat out non-functional code with comments referencing hitler and white genocide.

6 hours ago
HotConfusion1003

I tried that but it just keeps rambling about South Africa and being a Mechahitla or whatever. Did i do something wrong?

6 hours ago
bomhay

Who tf has balls to CUT from source code file?

Edit: I realized he’s saying cutting THE source code file. Ffs!

5 hours ago
Imaginary_Lows

That is something I'd expect from a person who thought that productivity can be measured by the number of lines of code you've written.

5 hours ago
NotMyGovernor

All of a sudden it’s ok to give your proprietary source away

5 hours ago
deicist

I tried this and my little cupcake app now adds holocaust denial to every recipe.

4 hours ago
generally_unsuitable

This sounds like an amazing opportunity to poison grok.

3 hours ago
jfernandezr76

Grok is busy fixing hello worlds

7 hours ago
misterespresso

I’m not sure I trust my code with MechaHitler

7 hours ago
Several_Swordfish236

All your source code is now belong to X

7 hours ago
imyourzer0

Also... why not COPY and paste?! He tryna give everyone here a heart attack?!?!?!

6 hours ago
rconnell1975

Presumably what he means is you can paste each source code file in its entirety, rather than you have all of your code in one file. It still means you are teaching his AI with your code and making it easier for him to develop it

6 hours ago
BloodyMalleus

It just dawned on me... Did Microsoft buy GitHub to train AI on a vast repository of code, public and private?

6 hours ago
Longenuity
:j::ts::js::py::bash:

Grok doesn't support uploading directories? That's the kind of feature an entry level developer could add.

6 hours ago
justis_league_

“cut” so that your original work is also lost, since if you’re doing this you probably also don’t use version control

6 hours ago
leafs7orm
:r:

I had the same reaction to this I get when salespeople try to show me their "magical" product - please stop

6 hours ago
JessyPengkman

Grok was only good at image generation and now Sora is way better than that anyway

6 hours ago
elloellochris

grok.bas

6 hours ago
somebodyinvisible

Cursor doesnt cost 3000 dollar ?

6 hours ago
JorgiEagle

Don’t most llms allow you to attach files, rather than having to copy and paste?

5 hours ago
whamra
:bash:

Will this work for a video game with 3d models and art? Can I have it just base64 the whole art thingies into one big file?

5 hours ago
dhaninugraha
:g::py:

Cut and paste?

Does he want Terraform modules?

Cause that’s how he gets Terraform modules.

5 hours ago
wreckingballjcp

This is a clever way to grab a bunch of source code files.

5 hours ago
alokesh985

Jokes aside, it's really frustrating when people who don't have a clue give bs advice on how to do our jobs

4 hours ago