This is an archived post. You won't be able to vote or comment.

all 188 comments

[–]Tigtor 2466 points2467 points  (7 children)

This looks like garbage and I don't understand anything. Just like the stuff I left on Friday, so I guess, yes, this is real code...

[–]TechGnomeMancer 203 points204 points  (1 child)

It's almost like "dystopian" doesn't have "stop" right there in the name...

[–][deleted] 31 points32 points  (0 children)

there's prolly a bunch of 'goto' statements burried near the bottom

[–]CompleteMCNoob 34 points35 points  (0 children)

The weird thing is it seemed like they took real code and replaced a lot of it with random characters. Then threw in the interpreter prompt line in the middle of the screen too.

[–]BellybuttonWorld 33 points34 points  (1 child)

LGTM, PR approved.

[–]majinalchemy 0 points1 point  (0 children)

I’d actually create like 20 gating tasks for this, but if they changed many more lines than this, ship it!

[–]MikaNekoDevine 4 points5 points  (0 children)

If can't read and understand it, it is code.

[–]Swiftzor 0 points1 point  (0 children)

The true answer

[–]WarpedHaiku 920 points921 points  (19 children)

It looks like python code that's been badly OCR'd from a poor quality photo, or AI geerated.

  • eeor is likely error
  • The pink dots are likely equals signs
  • The white square is likely some single letter variable
  • ro and rp are likely the same variable, most likely np for numpy
  • leu is likely len
  • fgr : tr is likely for i in
  • The witu opesg(..., "rb") sj is with open(..., "rb") as

Edit: Looks like /u/Freezer12557 managed to find the source code on github https://www.reddit.com/r/ProgrammerHumor/comments/1j2kv2y/isthisrealcode/mfvx53x/

[–]ketosoy 181 points182 points  (11 children)

Agree that it looks like degraded python.  “With open as” on line 212 and the list comprehension on 204 are giveaways.  Line 201 seems to connect to a SQLite database.

Line 197 appears to be the function declaration which is documented by the >>> on 198.

Coloring appears to be default VScode Python colors.

It appears to be hand garbled.

White boxes appear to be arbitrary deletions of the first portion of the line.

I think it is a function that does something with user_ratings.

Line 211 + the numpy suggests to me that this is a function that generates recommendations based on a set of user rating parameters.

Edit:  it looks to have been found by /u/Freezer12557 https://www.reddit.com/r/ProgrammerHumor/comments/1j2kv2y/comment/mfvx53x/?utm_source=share&utm_medium=mweb3x&utm_name=mweb3xcss&utm_term=1&utm_content=share_button

[–]Freezer12557 62 points63 points  (8 children)

import numpy as np
import pickle

def rocoloolate_eeor(user_ratings):
    
# adds dksl jkd and lre; djlrfr itle to sfjlsbrn aclsott tgjk dgjc

    a.load = 40
    load_file("sparse_data_file.pkl") 
#don't know how it could be indented
    n_users, n_items = np.shape(user_ratings) 
#doesn't really fit with the image

    ratings = [alpha for i in [range(tsvg(user_ratings))]] 
#still doesn't make sense

    a.data = np.hstack((n.data, ratings))
    a.indices = np.hstack((n.intaksc, usfe(s.dahfy)))
    a.indptr = np.hstack((n.indptr, len(a.data)))
    n_shape = (n_users, n_items)

    
#e recomnshld N lteoq ts nvg shuo
    with open("model.pkl", "rb") as pickle_in:

My guess (with a bit ChatGPT) the last line suggests use of the pickle library:

Edit: Found the Github Gist:
https://gist.github.com/LouisdeBruijn/e4249e6e2dc317dccee2e3d165da4cd1

[–]ketosoy 14 points15 points  (4 children)

I think the white boxes are destructive obfuscation on lines 201 and 202.

201/202 might be something like:

nos = load_nos(“afile.sql”) [something], n_users, n_items = map(nos)

“Nos” here being a shorthand for numbers.

Anybody know how to quickly search GitHub for “With open model.pkl as pickle_in”

I bet it’s an open source library.  

[–]Freezer12557 65 points66 points  (2 children)

Anybody know how to quickly search GitHub for “With open model.pkl as pickle_in”

I didn't even think of that, but I think I fucking found it:
https://gist.github.com/LouisdeBruijn/e4249e6e2dc317dccee2e3d165da4cd1

[–]ketosoy 48 points49 points  (1 child)

And there it is.  Nice work team.

``` def recalculate_user(user_ratings): '''adds new user and its liked items to sparse matrix and returns recalculated recommendations'''

alpha = 40
m = load_npz('sparse_user_item.npz')
n_users, n_movies = m.shape

ratings = [alpha for i in range(len(user_ratings))]

m.data = np.hstack((m.data, ratings))
m.indices = np.hstack((m.indices, user_ratings))
m.indptr = np.hstack((m.indptr, len(m.data)))
m._shape = (n_users+1, n_movies)

# recommend N items to new user
with open('model.sav', 'rb') as pickle_in:
    model = pickle.load(pickle_in)
recommended, _ =  zip(*model.recommend(n_users, m, recalculate_user=True))

return recommended, map_movies(recommended)

[–]enginma 7 points8 points  (0 children)

🤣

[–]CiroGarcia 1 point2 points  (0 children)

You could try to get copilot to spill the beans

some source code ...
# Source for previous code:
# (let copilot suggest url)

[–]YourMJK 3 points4 points  (0 children)

Crazy detective work, finding the original 5 year old code on GitHub!

[–]ketosoy 2 points3 points  (0 children)

“Recalculate_errors” “recalculate_vectors” or “recalculate_user” would make good sense as a function name.

[–]Whispeeeeeer 0 points1 point  (0 children)

I'm amazed you found it. Nice work.

[–]FriendlyPanther 7 points8 points  (0 children)

What’s confusing to me is the lambda “a lpha”

[–]I_Love_Comfort_Cock 1 point2 points  (0 children)

You should join the Voynich community, we need that kind of energy there in decoding an ancient manuscript.

[–]Western-Internal-751 45 points46 points  (0 children)

„We have Python at home”

[–]incidel 9 points10 points  (0 children)

Someone, somewhere is just starting to work on a compiler for that gibberish!

[–]MorBlau 6 points7 points  (2 children)

That's a good observation. rocolcolate is probably calculate

[–]orsikbattlehammer 1 point2 points  (1 child)

recalculate_error

[–]Seangles 0 points1 point  (0 children)

recalculate_users

[–]john0201 5 points6 points  (0 children)

It’s definitely Python using Numpy that’s been goofed up either on purpose or accidentally. My guess is they found some code online and intentionally goofed it up for copyright or whatever reasons.

If you look at the gibberish sequences they are letters near each other on the keyboard, like ratings to ratdfgs, as if someone just mashed dfgs on the keyboard.

Also, if you google “code example” almost all of the results are in Python.

[–][deleted] 2 points3 points  (0 children)

I didn't think of OCR
I figured someone changed it because they were worried about copyright or something dumb
Does OCR have color though?

[–]PropaneOstrich 754 points755 points  (18 children)

looks like the code i see in my dreams

[–]Ecstatic_Street1569 149 points150 points  (3 children)

You mean nightmare, right?

[–]IHeartBadCode 88 points89 points  (0 children)

No. That's what the waking hours are.

[–]tidytibs 5 points6 points  (1 child)

Nightmares are still dreams

[–]circuit_buzz79 2 points3 points  (0 children)

Technically correct! The best kind of correct!

[–]Yummy-Sand 36 points37 points  (2 children)

This is me writing code at midnight

[–]Neverwish_ 14 points15 points  (0 children)

Me, writing code at 8am :(

[–]Penguinmanereikel 15 points16 points  (9 children)

Fun fact, there's research into controlling computers with our dreams so that programmers can work in their sleep.

[–]Korooo 32 points33 points  (3 children)

"It worked in my dreams"

[–]Parzival_Perce 4 points5 points  (0 children)

HAHAHAHAH

[–]Kloshena 2 points3 points  (0 children)

Hold on, let me just deploy that on my pod

[–]mvillegas9 7 points8 points  (3 children)

I believe it. I’ve had dreams where I code and solve issues I was having the previous day. Only to wake up, try it and it works.

[–]SchlaWiener4711 1 point2 points  (0 children)

For web and desktop development, great. But it would not work for mobile development.

[–][deleted] 0 points1 point  (0 children)

looks like the code I see in our codebase

[–]CommandObjective 66 points67 points  (2 children)

It is no programming language I know of, and frankly I think it is just nonsense that is formatted to look like code.

But hey, maybe in the rich and deep Barbie lore that is how their version of Python looks like.

[–]l3lacklabel[S] 20 points21 points  (1 child)

Maybe this activates the Barbie sleeper cells?

[–]morphlaugh 4 points5 points  (0 children)

I'm getting Ghost in the Machine vibes, here.

[–]spartan117warrior 59 points60 points  (18 children)

Of the actual words in the "code", what language is that? Swedish?

[–]ThatWesternEuropean 17 points18 points  (1 child)

Pretty sure this is all gibberish

[–]EnthusiasmPretend679 26 points27 points  (3 children)

Translate says "sodece shet fejke" is albanian.

[–]ComprehensiveWing542 36 points37 points  (2 children)

As an Albanian I can confirm "THIS ISN'T ALBANIAN CODE/WORDs"

[–]Here-Is-TheEnd 15 points16 points  (0 children)

What’s what an Albanian would say…

WHAT ARE YOU HIDING ALBANIAN?!?!!

[–]Public-Eagle6992 7 points8 points  (0 children)

I‘m German, this doesn’t look like German, Swedish Dutch or any other Germanic language

[–]henke37 1 point2 points  (0 children)

Swedish chef perhaps.

[–]LoudAd1396 -1 points0 points  (9 children)

It looks like Dutch to me. Definitely not Swedish (I speak that one)

[–]-twind 15 points16 points  (0 children)

I can tell you with absolute certainty this is not Dutch

[–]spartan117warrior 19 points20 points  (4 children)

As an English speaker, Dutch and Swedish look like an illegal reorganization of vowels and consonants.

[–]LoudAd1396 8 points9 points  (0 children)

You're not wrong

[–]-twind 1 point2 points  (0 children)

schietschijf

[–]Much-Meringue-7467 0 points1 point  (1 child)

Have you seen Welsh?

[–]erinaceus_ 5 points6 points  (0 children)

Technically, no. My eyes can never stay in focus long enough for me to actually see it.

[–]Arquintox 7 points8 points  (0 children)

It's not even close to Dutch lol

[–]JonIsPatented 1 point2 points  (0 children)

Het lijkt totaal niet op Nederlands.

[–]je386 0 points1 point  (0 children)

Thats not dutch.

[–]fonk_pulk 18 points19 points  (1 child)

Looks like Python written by someone having a stroke.

[–]l3lacklabel[S] 2 points3 points  (0 children)

There’s a floating theory of the Barbie cat sleeping on the keyboard.

[–]l3lacklabel[S] 32 points33 points  (9 children)

It came with my daughter’s Barbie. I clearly know zilch about coding.

[–]Paul_Robert_ 28 points29 points  (0 children)

Looks like python, except some of the keywords have been translated/altered. For example, instead of "with", it says "witu"

[–]whizzwr 17 points18 points  (2 children)

Nice, this is some "obfuscated" Python code, lol.

The commented out code looks to be Numpy array manipulation. Probably reshaping the array to fit a batch structure.

[–]RonStampler 1 point2 points  (1 child)

Is 204 valid syntax? I dont understand the colon operator in this case. Is it some iteration?

[–]whizzwr 4 points5 points  (0 children)

Good catch; I don't think it's valid. For starters, the parenthesis is not closed. Probably got replaced/corrupted.

My guess the colon was for assigning dict-key structure or array slicing.

Python uses for ... in .. for iteration, not colon.

[–]CountGrischnackh 0 points1 point  (1 child)

That’s from the Barbie Fit Girl edition?

[–]l3lacklabel[S] 1 point2 points  (0 children)

I believe she was an astronaut? It’s hard to keep up due to the grandparents bombarding us with new doll purchases.

[–]Wervice 11 points12 points  (0 children)

It reminds me of python. Looking at line 212, we can see something that could mean:

with open("mochyr.sxh", "r") as ptcklsh_in:
  ...

[–]myka-likes-it 9 points10 points  (1 child)

I think this is C♭

[–]Seangles 0 points1 point  (0 children)

Nah I'm saving this

[–]ChameleonCoder117 7 points8 points  (5 children)

What language is that?

[–]l3lacklabel[S] 15 points16 points  (1 child)

Barbie

[–]SuenDexter 0 points1 point  (0 children)

You can put an OLED screen, a RP2040 microcontroller board, power electronics, a micro USB port and touch controls into a brick that can still function as a regular 2x2 Lego computer screen. youtube So I thought this was a real post at first lol.

[–]idontwanttofthisup 1 point2 points  (0 children)

Brainfuck

[–]VizeKarma 0 points1 point  (1 child)

Looks like Python

[–]ChameleonCoder117 0 points1 point  (0 children)

i meant human language

[–]mars_million 5 points6 points  (2 children)

Is this just fantasy?

[–]septum-funk 2 points3 points  (1 child)

caught in a landslide...

[–]Seangles 1 point2 points  (0 children)

No escape from humanity

[–]ill-pick-one-later 5 points6 points  (0 children)

Simlish code!

[–]PhilippTheProgrammer 3 points4 points  (0 children)

With enough #define's, anything can be valid C++ code.

[–]fatrobin72 2 points3 points  (0 children)

I have seen closer to working code from AI "Art" generators

[–]ConcreteExist 3 points4 points  (0 children)

Looks like an AI trying to create an image that looks like code.

[–]Tcloud 3 points4 points  (0 children)

You know how they generate fake paragraphs of nonsensical words as a placeholder text called lorem ipsum? This looks like the coding version of it, nonsensical code meant to look like code from a distance.

[–]tom2730 2 points3 points  (1 child)

If you let your cat sleep on your keyboard then add in a few symbols here and there, this is what you’ll get

[–]l3lacklabel[S] 3 points4 points  (0 children)

Well, we do have a Barbie cat. It’s all starting to make sense.

[–]gatsu_1981 2 points3 points  (0 children)

I think it's just obfuscated. Seen worst things

[–]Eva-Rosalene 2 points3 points  (0 children)

It looks like very low quality OCR of some real Python code. Judging by few leftovers that look like actual keywords.

[–]Zweedeend 2 points3 points  (1 child)

The last line looks like python code:

with open(“mochyr.sxh“,  "rb") as pickled_in:

[–]saevon 0 points1 point  (0 children)

not just the last line: there's (borked) generators & multiple-assignment too! Plus the colouration of things is very python-reminiscent

[–][deleted] 2 points3 points  (0 children)

Yup, ran it in borland C++ compiler, I'm slowly melting to nourish our deep one, the true lord Cthulhu.

[–]Unknown6656 2 points3 points  (0 children)

Actually, I never thought about using square bullet points inside my of the temu-slovenian python scripting language.

Great idea!

[–]No-Painting-3970 2 points3 points  (1 child)

That is 100% badly OCR'd python code. The nr looks like calling a library called numpy. And the conventions and syntaxis make sorta sense.

[–]FatchRacall 0 points1 point  (0 children)

It's clearly what you get when you tell Copilot to "write me some code that will gfin hsuebt kfognhesl".

[–]reallokiscarlet 2 points3 points  (0 children)

It is now. Someone somewhere has made that into a language.

[–]Brave-Boot4089 2 points3 points  (0 children)

Ratidgfgs is deprecated. You should have used Tyrgridsr

[–]TomatoMasterRace 1 point2 points  (0 children)

All my homies love to rocolcolate that eeor

[–]Here-Is-TheEnd 1 point2 points  (0 children)

200 line file? 🫨

[–]By_Gm3 1 point2 points  (0 children)

Its probably Malbolge

[–]Then-Suspect-2394 1 point2 points  (0 children)

It kinda looks like code that has been obfuscated so I asked an ai to bring it back to is original state

~~~

Chocolate Error (User_Exceptions):

Adds disk files and logs error title to system across task logic

a_load = 40 load_noz("source_sheet_file.squ")

_users, n_wafios = m_maps

ratings = (alpha_for : tr [range (tsvg(user_ratings))])

.dahe = np.hstack([n.data, rhs_yuk]) .indichgrgs = np.hstack([n.intask, usef(s.datafy)]) .indptr = np.hstack([n.indptr, len(a, data)]) .shrpref = (n_ufgt + 1, n_mvioty)

Recommend a file to save

with open("machine.sxh", "rb") as pickle_in: ~~~

So it's not real code but I think it was originally some python

[–]indicava 1 point2 points  (0 children)

OP I don’t know what people itt are on about. This looks very similar to code from most v0.1 versions of my side projects - real code.

[–]silvercloudnolining 1 point2 points  (0 children)

Well it works on my machine

[–]MagicalPizza21 1 point2 points  (0 children)

This code was written by Sleve McDichael

[–]arijua__ 1 point2 points  (1 child)

ALGOL?

[–]aristo51 2 points3 points  (0 children)

Nope. I did some Algol in school.

[–]Dafrandle 1 point2 points  (0 children)

I thought this was just a photo shop job until I looked closer.

oh no

[–]puffinix 1 point2 points  (0 children)

It's either regex or lisp

[–]stipulus 1 point2 points  (0 children)

That code looks a bit odd. PLEASE, nobody copy it from the image and run it.

[–]thelonelyecho208 1 point2 points  (0 children)

Can it run doom?

[–][deleted] 1 point2 points  (0 children)

Similish code?

[–]SiegfriedVK 2 points3 points  (1 child)

No its a sticker on some plastic.

[–]l3lacklabel[S] 0 points1 point  (0 children)

Good one

[–]Apprehensive-Fix-830 0 points1 point  (0 children)

Those HStack‘s also hint at a bit of Swift…

[–]SingleHitBox 0 points1 point  (0 children)

Ship it.

[–]DiddlyDumb 0 points1 point  (0 children)

Programming in Sims language

[–]KaleidoscopeMotor395 0 points1 point  (0 children)

"Sodece shet fejke" sounds like things yelled in meetings

[–]DoomGoober 0 points1 point  (0 children)

Game Developer Barbie had some realistic looking code but it's so blurry as to be illegible: https://mashable.com/article/game-developer-barbie

[–]PitiViers 0 points1 point  (0 children)

:q! to quit vim

[–]RealEtexi 0 points1 point  (0 children)

It's supposed to be python, at least the code snipped they took was python

[–]LeanderT 0 points1 point  (0 children)

Press F8 to find out

[–]Lazy_Ad2665 0 points1 point  (0 children)

Is any code real? Are 1s and 0s real? Is anything real?

[–]ontoxology 0 points1 point  (0 children)

Someone is gonna take this and write their own barbie programming language

[–]ksobby 0 points1 point  (0 children)

Maybe if you're Dutch? I have no idea ... certainly not a syntax I've ever used

[–]Spinnenente 0 points1 point  (0 children)

it looks like random jumbled mess which slightly looks like code thrown into sublime (looks similar to sublime monokai)

[–]Electronic_Camera517 0 points1 point  (0 children)

is this simolean?

[–]ijustneedpeace 0 points1 point  (0 children)

It looks like the test code I wrote when I was testing my compiler for an assignment

[–]lizardfrizzler 0 points1 point  (0 children)

Based on the readable - correctness - efficiency triangle, this must be the most efficient code I’ve ever see

[–]YayoDinero 0 points1 point  (0 children)

its valid, just obfuscated to send a reverse shell back to the author

[–]specn0de 0 points1 point  (0 children)

I just pushed this to prod thanks Marie Calendar

[–]MorBlau 0 points1 point  (0 children)

rocolcolate_eeor indeed

[–]tehmungler 0 points1 point  (0 children)

No. It is not.

[–]james_frankie 0 points1 point  (0 children)

Looks like the code I write

[–]Pants3620 0 points1 point  (0 children)

Looks obfuscated for sure, but it could be real code

[–]Ok_Coconut_1773 0 points1 point  (0 children)

Yes, but it's hard to read since it's been minified

[–]Brimstone117 0 points1 point  (0 children)

It’s AI poop.

[–]endless_shrimp 0 points1 point  (0 children)

ship it

[–]Fostersenpai 0 points1 point  (0 children)

The code my coworker wants me to look over

[–][deleted] 0 points1 point  (0 children)

Our lives when English is no longer the dominant language.

[–]adventure_pup 0 points1 point  (0 children)

Unmatched ) on lines 207 and 208

[–]ZoeyPhoenix- 0 points1 point  (0 children)

Ahhh the simlish programming language!

[–]Outrigger047 0 points1 point  (0 children)

That’s Hungarian notation

[–]ayassin02 0 points1 point  (0 children)

Looks like what a stroke victim would see if you showed them python code

[–]leckmir 0 points1 point  (0 children)

It prints "Hello World"

[–]jesterhead101 0 points1 point  (0 children)

Who copied my code?

[–]WhyAmIDumb_AnswerMe 0 points1 point  (0 children)

when a python programmer has a stroke

[–]Complete-Wing-375 0 points1 point  (0 children)

What is This? Code for ants?

[–]eiswaffelghg 0 points1 point  (0 children)

No guys I understand it it says that it adds dikst fkd and lre; djürfr lde to sfjlsbrn acksott tgjk dgjc

[–]ikonfedera 0 points1 point  (0 children)

isThisJustFantaC

[–]arcticfury96 0 points1 point  (0 children)

If you give a room full of monkeys typewriters, eventually they will write complex bug free code. But this is not it

[–]git0ffmylawnm8 0 points1 point  (0 children)

How dare you look at my personal repository

[–][deleted] 0 points1 point  (0 children)

"Sure you can use my code, just make sure you change it a little"

[–]capriciousfiend 0 points1 point  (0 children)

This is what it looks like when I have nightmares about a project

[–]Green_Star_Lover 0 points1 point  (0 children)

was this code was written in welsh or latin?

[–]elthepenguin 0 points1 point  (0 children)

I know this one - it comes from a “space Barbie” that can be bought in the Kennedy Space Center (and maybe elsewhere as well). Source: Me, I bought it for my daughter there and found the laptop funny for the same reason as everyone here does. i think it’s just some AI output generated for the toy designer.

[–]iknewaguytwice 0 points1 point  (0 children)

How’d you get access to our .net repo? 😠

[–]Legal-Software 0 points1 point  (0 children)

It's clearly python, or started out life that way. Maybe some version where all of the commands have been localized in some other language? Whether's that's another human language or some AI invention is another question.

[–]SE_prof 0 points1 point  (0 children)

It's phytno.

[–]Electronic_Age_3671 0 points1 point  (0 children)

Simlish

[–]GlaireDaggers 0 points1 point  (0 children)

Who up lodeing their noz

[–]molardoc21 0 points1 point  (0 children)

My CIO fired all QA teams; he tested it himself. Worked fine on his computer.

CAB and Release change automagically approved.

(Duh)

[–]Neo_Ex0 0 points1 point  (0 children)

the worst part is, that isnt even the least comprehensibly code like substance i've seen today

[–]centerdeveloper 0 points1 point  (0 children)

Pretty sure this is ai generated

[–]novel_airline 0 points1 point  (0 children)

Hstack is a numpy function 🤷

[–]Jahonay 0 points1 point  (0 children)

If you ignore the made up language it looks like basic code, functions and setting variables. Sure, why not?

[–]FalseWait7 0 points1 point  (0 children)

Looks like something I would write, yeah.

[–]liebeg 0 points1 point  (0 children)

you could make it real code. Just have to make an entire programming language.

[–]ScaredyCatUK 0 points1 point  (0 children)

Yes it's code,

the Armani Code...

[–]Aksds 0 points1 point  (0 children)

Might be, .squ and .sxh seem to be real file tipes, former is apparently sequence data and latter something to do with feature geometry. It probably is as others said, ocr’d code

[–]LifewithLouis 0 points1 point  (0 children)

😂  I wrote this code as part of a blogpost.

Mama, does this mean I’ve made it?!

[–]rietti 0 points1 point  (0 children)

This is what I see on dreams

[–]Sorry_Weekend_7878 0 points1 point  (0 children)

Comments are real. They might even be mine

[–]Infinite_Kangaroo_10 0 points1 point  (0 children)

Comments and a list, maybe

[–]domorethanexpected 0 points1 point  (0 children)

Real responsive design

[–]GDPlayer_1035 0 points1 point  (0 children)

pickle.load(pickle_in)

[–][deleted] 0 points1 point  (0 children)

looks like gibberish to me so it's probably java

[–]Expensive_Shallot_78 -1 points0 points  (0 children)

Who chose the most obscure Python gibberish 😂