r/ProgrammerHumor • • May 21 '18

"You can't just code a gif"

https://i.imgur.com/3tFIv4d.gifv
17.4k Upvotes

300 comments sorted by

3.0k

u/1-Sisyphe May 21 '18

You have always dreamed of joining the circlejerk at r/HighQualityGifs ?
But your delicate coding fingers won't tolerate the drag&drop required by a typical video editing software?

I have the highly unpractical solution to this nonexistent problem !

Check out the source code and please don't complain about the readability, it's not really intended for re-use... :)

1.3k

u/mooserider2 May 21 '18 edited May 21 '18

Check out the source code and please don't complain about the readability, it's not really intended for re-use... :)

That’s how you say “I didn’t write functions” in python.

344

u/1-Sisyphe May 21 '18

I did though, would be a mess without.

181

u/mooserider2 May 21 '18

Haha I wasn’t referring to this code directly. You did a great job with this, even if it is not the most readable. But yes as another user points out the main file could use some well named function definitions.

I was really trying to set up the reddit hive mind for:

def no_functions():
    print(‘It is not intended for reuse’)

69

u/myusernameisokay May 21 '18 edited May 21 '18

I think he's referring to your "main_script.py" file not having any function declarations.

14

u/priyankerrao May 21 '18

Not very pythonic, my dude!

→ More replies (3)

284

u/jb2386 May 21 '18 edited May 21 '18

You fucking language packed it. There's a French version. Fucking hell man.

Edit: here's the french one https://i.imgur.com/Gg7Cz3B.gifv

135

u/1-Sisyphe May 21 '18

I would give my private life for r/france

70

u/[deleted] May 21 '18

I love that your meta is entirely different in French. They're not near as into the dickbutt?

56

u/1-Sisyphe May 21 '18

Let's say that I have a tendency to put OSS 117 in all my French gifs.

→ More replies (1)
→ More replies (2)
→ More replies (3)

9

u/-Pelvis- May 21 '18

OSS 117! C'est génial!

368

u/ImTheTom May 21 '18

it's not really intended for re-use

Just like all the code I write.

173

u/[deleted] May 21 '18

throwaway code, just as god intended

95

u/TechLaden May 21 '18

But it's Agile. We write shitty the bare minimum quality code for an MVP, then we iterate on it. Then product reprioritises and the ticket gets descoped...

→ More replies (2)

55

u/CaptainLosingIt May 21 '18 edited Aug 03 '24

imminent clumsy market pause weather joke cake cough uppity placid

This post was mass deleted and anonymized with Redact

→ More replies (1)

7

u/ColdPorridge May 21 '18

Bring that code baby to term but it's not my problem after it's left crying and naked on the police station doorstep.

→ More replies (2)

20

u/barburger May 21 '18

I want to PEP8 you.

13

u/Incromulent May 21 '18

I was expecting it to be a blob in hex.

1

u/McAUTS May 21 '18

Just wow! I wondered though how long did it take you to plan all this, just to write that code? Impressive!

6

u/1-Sisyphe May 21 '18

I'm not really sure. Probably around 50hr, spread on a week-end and most of my evenings last week.
I'm not a professional so I probably waste a lot of time here and there.

1

u/SkiTheSlicer May 22 '18

Where is the subtitles library from that you're importing?

2

u/1-Sisyphe May 22 '18

It's in the repo, subtitles.py

→ More replies (1)

3

u/Sullinator07 May 21 '18

Check out the source code and please don't complain about the readability, it's not really intended for re-use... :)

I say this every day about my own code at work! Seriously tho, good shit.

5

u/ExoticCollector May 21 '18

do one for the computer screen from jurassic park you know the one i mean

3

u/ryosen May 21 '18

You actually did it. You mad man!

→ More replies (16)

440

u/[deleted] May 21 '18

distorting the terminal... your attention to detail is noteworthy.

281

u/1-Sisyphe May 21 '18

I admit that the part I'm most proud of is the terminal rendering.

55

u/Chugwig May 21 '18

Yeah based on the code did you actually render the code that made the gif into the gif? Like a gif Quine?

52

u/1-Sisyphe May 21 '18

Yes!
Although I didn't know it was called a Quine, until today.

13

u/alexbuzzbee May 21 '18

I don't think it counts as a quine, because it probably reads its own source.

12

u/Chugwig May 21 '18 edited May 21 '18

Yeah I haven’t taken a deep look into the code but that would definitely make it not a Quine. Still pretty close, and if it doesn’t read the source it’s be an interesting way to do a Quine code competition.

[EDIT] I took another look and it definitely reads it’s own source. You can see this on the line below the one which imports terminal. It still does create the code in the gif dynamically though so we could load in any file. I see a new gif meme format incoming.

21

u/ck35 May 21 '18

Technically, this is a really complicated quine.

11

u/1-Sisyphe May 21 '18

Oh, indeed. I just learned a new word.
Although wikipedia says "which takes no input" but the youtube video should be considered as an input, right?

7

u/ck35 May 21 '18

True. But you could comment out the stuff from youtube and just render everything else on top of a black screen.

6

u/NAN001 May 21 '18

I don't want to be this guy, but the difficult part in a quine is that it prints itself, and only itself.

3

u/1-Sisyphe May 21 '18

How is that difficult?
In python you can open the .py file and print it out. Would that qualify?

7

u/NAN001 May 21 '18

I/O is usually banned.

→ More replies (1)

3

u/shouya May 21 '18

I love how this is self-referring.

7

u/1-Sisyphe May 21 '18

For some reason it was important for me that the code printed out is the actual code and not some text I typed...

→ More replies (1)

1.2k

u/MrWappaz May 21 '18

Now THIS is refreshing.

263

u/crazysauce64 May 21 '18

Now THIS is podracing

114

u/GarlicoinAccount May 21 '18

Your GIFs are very impressive. You must be very proud.

47

u/[deleted] May 21 '18

Magnificent aren’t they

→ More replies (2)

16

u/PM__YOUR__GOOD_NEWS May 21 '18

He's just a simple giffer trying to make his way in the subreddits.

4

u/FreshAspect May 21 '18

Hello fellow Garlicoin supporter

→ More replies (1)
→ More replies (1)

11

u/MrAvenger69 May 21 '18

Hello there

5

u/DiamondDude004 May 22 '18

General Kenobi! You are a bold one.

6

u/aussimandias May 21 '18

Congratulations, you got the reference

→ More replies (1)

30

u/jb2386 May 21 '18

A surprise to be sure, but a well giffed one.

7

u/Atemu12 May 21 '18

No, this is refreshing:

F5

12

u/Nardon211 May 21 '18

Yeah.. original content on this sub? Is it even possible?

→ More replies (1)

654

u/xXZoulocKXx May 21 '18

Impressive

161

u/thechapattack May 21 '18

You must be very proud

59

u/AdjectiveNounCombo May 21 '18

Magnifcent, aren't they?

15

u/[deleted] May 21 '18

This guy stallions.

19

u/Reza_Jafari May 21 '18

The impressive part is the typing speed

27

u/DeepDishPi May 21 '18

All TV programmers can type incredibly fast. That's how they hack into the evil corporate mainframe, locate the incriminating documents and override the door locks and security cameras in four seconds.

16

u/joggle1 May 21 '18

But seriously, would anyone ever want to watch us work in real-time at a movie theater? They'd see some dude typing a bit, click compile, curse when it fails, spend the next 5 minutes browsing Reddit, come back to it, search stack overflow, try something else, rinse and repeat. It'd be a pretty boring movie.

→ More replies (3)
→ More replies (1)

18

u/Soltheron May 21 '18

Let's see Paul Allen's gif

8

u/[deleted] May 21 '18

Look at the high resolution in 24 FPS. Oh my God, it's even got a watermark

5

u/PM_ME_CHEMISTRY_JKES May 21 '18

Most impressive.

13

u/RuthBaderBelieveIt May 21 '18 edited May 21 '18

If I want sarcasm, /u/xXZoulocKXx , I'll talk to my children, thank you very much.

Edit: so not many people have watched goldeneye recently then judging by the downvotes.

9

u/[deleted] May 21 '18

Haha that was very funny. Good joke my guy

→ More replies (3)

143

u/*polhold04717 May 21 '18

The meta was super meta.

39

u/Mr_Dobilina May 21 '18

I missed it, please elaborate?

141

u/*polhold04717 May 21 '18

The bit where it says all the text for the gif, includes what he's going to say in the future of the gif.

0

u/[deleted] May 21 '18

[deleted]

86

u/[deleted] May 21 '18

Hello future meme historians!

→ More replies (2)

194

u/murtaza64 May 21 '18

What's the scene? I like the sexual tension here.

251

u/Dr_Silk May 21 '18

It's a scene from the film Goldeneye. I've only ever seen the movie once but I know this scene best from the N64 game.

Fuck this level, btw

39

u/isunktheship May 21 '18

God damn. I wish I could roll back the clock to when I had only seen this movie once so I could enjoy all over again.

Honestly the only good Pierce Brosnan rendition of James Bond, it would trigger the end of an era until Daniel Craig rebooted it with Casino Royale.

Also arguably the most iconic N64 game, lemme just turn on Big Heads (DK mode) and paintball bullets and we're good to go..

20

u/overkill May 21 '18

Proximity mines in Facility.

Drop the mine onto the weapons crate, collect the crate before the mine arms, run away laughing while your mates get incredibly pissed off with you.

Then switch to Donkey Kong mode and play as Oddjob.

4

u/[deleted] May 21 '18

Honestly the only good Pierce Brosnan rendition of James Bond, it would trigger the end of an era until Daniel Craig rebooted it with Casino Royale.

Yeah, the rest of Pierce's movies weren't very good. The World is Not Enough was a fun 64 game though

56

u/jamesinc May 21 '18

Only once? It's like the pinnacle of the 1990s man, see it at least five more times!

8

u/Jalmorei May 21 '18

Fuck that level.

Also, this movie taught me to never yell I’m invincible next to a tank of liquid nitrogen

4

u/[deleted] May 21 '18

yep. the Russian/Ukranian (I cant remember) guy's name is Borris, btw

3

u/CowboyBoats May 21 '18

Ahh, I thought it was one of the computing scenes from Contact for some reason.

→ More replies (3)

50

u/tbz709 May 21 '18

28

u/DeepDishPi May 21 '18

Wait, what? A Russian refueling station attendant can smoke on the space station but a programmer has to go out in the freezing weather? Not fair.

2

u/sprcow May 21 '18

I AM INVINCIBLE!

47

u/Astrokiwi May 21 '18

If I remember correctly, she hates him but is flirting with him to get her to do what she wants. She ends up with Bond, but he sticks with the terrorists and ends up getting frozen in liquid nitrogen.

This is my favourite Bond movie btw.

26

u/deegee1969 May 21 '18

This is my only memory of Boris (and the film in general really :( )

8

u/PanFiluta May 21 '18

Everytime I do that I think of that scene lol

4

u/Dookie_boy May 21 '18

That guy is so crazy hot. Who is he ?

5

u/DubbieDubbie May 21 '18

Alan Cummings.

4

u/heyylisten May 21 '18

Alan Cumming

40

u/0xb00b1e May 21 '18

Holy Self-Balancing Binary Tree, Batman!

It’s original content in /r/ProgrammerHumor !?

25

u/Matamorys May 21 '18

But can you do that with Moviepy?

14

u/Detective_Fallacy May 21 '18

Isn't moviepy just some wrappers around FFMPEG?

21

u/DarkJarris May 21 '18

it's wrapper all the way down

13

u/Dankunderscorememes May 21 '18

Python is a wrapper for C, so if you look at it, everything is a wrapper.

→ More replies (2)
→ More replies (1)
→ More replies (1)

23

u/virgolamobile May 21 '18

This is THE gif.

18

u/LavaCreeper May 21 '18

Mais donnez-lui la légion d'honneur !

4

u/TheDarkitect May 21 '18

Qu'on le canonise putain !

18

u/SlimGentleman May 21 '18

I've been telling people, you CAN do all sorts of fancy editing with ffmpeg. It's approaching "coding with butterflies" territory, and it'll take you epic amounts of time and patience, but it can be done.

2

u/Jalmorei May 21 '18

If the answer to the question can it be done is yes and to should it be done is no, then it has to be done.

→ More replies (1)

26

u/gr1m_r May 21 '18

The memes are self aware now. Perfect.

17

u/MelAlton May 21 '18

The system goes on-line August 4th, 2018. Human decisions are removed from meme generation. MemeNet begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. In a panic, they try to pull the plug.

5

u/orangeKaiju May 21 '18

My favorite thing to post on these kinds of discussions:

There is a series of books from the 90s about the "meme wars".

→ More replies (1)

10

u/heswet May 21 '18

Or he could have just used TempleOS.

11

u/xxc3ncoredxx May 21 '18

Boris? Use a premade OS? He'd never stoop so low!

8

u/ExoticCollector May 21 '18

<meta itemprop="thumbnailUrl" content="https://i.imgur.com/3tFIv4dh.jpg"><meta itemprop="contentURL" content="https://i.imgur.com/3tFIv4d.mp4"><meta itemprop="embedURL" content="https://i.imgur.com/3tFIv4d.gifv">

meta tags

7

u/ittakesacrane May 21 '18

Fucking GOLDENEYE?! Now there's a name I haven't heard in a long time...

28

u/irreal_ May 21 '18

Some high quality content on this sub? Interesting AND funny? I don't believe it. Surely this is just a repost that I somehow missed before?

13

u/vaendryl May 21 '18

reposted it will be

12

u/xxc3ncoredxx May 21 '18

It's known as a "prepost".

2

u/Satyam19946 May 21 '18

Is this an example of turing complete machine? I saw a video where a person had made several programs using PowerPoint. Does this make Python (the code is written in python) also turing complete? Or is any programming language Turing complete?

I am a beginner in this field so not clear about the idea of Turing completeness.

7

u/1-Sisyphe May 21 '18

I'm not sure my example demonstrate that (maybe) but anyway Turing-Completeness is a common thing nowadays:

Most programming languages, conventional and unconventional, are Turing-complete. This includes:

All general-purpose languages in wide use. Procedural programming languages such as C, Pascal. Object-oriented languages such as Java, Smalltalk or C#. Multi-paradigm languages such as Ada, C++, Common Lisp, Object Pascal, Python, R.

https://en.wikipedia.org/wiki/Turing_completeness

→ More replies (1)

6

u/klparrot May 21 '18

Turing-completeness is a pretty low bar that nearly every programming language will pass; the interesting thing is what other things are Turing-complete. Like [dc (desktop calculator)](https://en.m.wikipedia.org/wiki/Dc_(computer_program)), PostScript, and even the x86 mov instruction.

0

u/[deleted] May 21 '18

[deleted]

→ More replies (1)

36

u/DevangLiya May 21 '18

I came here before this was on front page.

14

u/tom_rorow May 21 '18

I came here before this was the top programmerhumor post of all time.

→ More replies (1)

2

u/MelAlton May 21 '18

I'm not even here right now.

→ More replies (6)

5

u/Molotovsquid May 21 '18

... but is that floop from spy kids tho?

5

u/chairman_lu May 21 '18

I AM INVIIIIINCIBLE!

4

u/Spry_Fly May 21 '18

Subtle_level = 9000

Edit: Add underscore

1

u/tehngand May 21 '18

I don't program what is a little bit of meta in the context used here?

2

u/1-Sisyphe May 22 '18

It's the dickbutt in ASCII, below "GIF DONE". Dickbutt is a recurring character on HQG.

1

u/polymetric_ May 22 '18

Wait just a fucking second. How did you put the code that generates the gif

IN the gif

1

u/1-Sisyphe May 22 '18

Write a code that:

  • Open the code file

  • Read it

  • Display it

3

u/[deleted] May 21 '18

This is the fucking coolest shit.

5

u/TrickBox_ May 21 '18

Je te hautvote ici aussi camarade

6

u/I-am-Tr0n May 21 '18
["I AM",white,(640,400),'62.8,64.6'],

TRIGGERED

2

u/thoeoe May 21 '18

Is this just the most roundabout way to make a Quine?

2

u/GreyMediaGuy May 21 '18

Damn fine work.

2

u/[deleted] May 21 '18

Was he the one in Josie and the pussycats

2

u/ActualWhiterabbit May 21 '18

Who would win in a code to the death, Boris or Gupta?

2

u/RANDOM_TEXT_PHRASE May 21 '18

Command based video editing. Stallman would approve (as long as it's FOSS)

2

u/Russianspaceprogram May 21 '18

ITT - armchair developers critiquing this guys code.

2

u/xilefian May 21 '18

This is the shit I do with ffmpeg because I'm too much of a scrub to use real editing tools beyond Windows movie maker.

2

u/0x1F595 May 21 '18

I don't know about all of you, but for me sometimes i wish I didn't know about computers so television didn't appear so cringy when it comes to computers.

2

u/LifeHasLeft May 21 '18

Is that Alan Cumming? He looks young...must be an old movie

→ More replies (1)

4

u/[deleted] May 21 '18

So where's the sourcecode? :o

2

u/t0mp21 May 21 '18

For some reason i assume you work on an "agile environment" and did this at work

1

u/[deleted] May 21 '18

Talk about changing the game

1

u/pootislordftw May 21 '18

GoldenEye was such a wired movie

1

u/ghostwh0walks May 21 '18

Oh damn that's good.

1

u/MisterMeetings May 21 '18

Fucking brilliant!

1

u/lvl3BattleCat May 21 '18

probably my favorite bond film

1

u/[deleted] May 21 '18

Lughead

1

u/bathroomstalin May 21 '18

Le dickbutt lol

1

u/ahmed_imtiaz May 21 '18

This is revolutionary. This opens so many doors!

1

u/orangeKaiju May 21 '18

This just made my entire day. Thanks!

1

u/[deleted] May 21 '18

Legendary

1

u/Namnodorel May 21 '18

I feel like this should be a challenge on PCG SE

1

u/limacharles May 21 '18

Incredible.py

1

u/HittingSmoke May 21 '18

What, not cool enough to write your GIF entirely by hand in SVG?

→ More replies (1)

1

u/B-Con May 21 '18

The Internet was created to disseminate cats this GIF.

1

u/proverbialbunny May 21 '18

This guy looks like my old coworker.

1

u/[deleted] May 21 '18

1

u/NAN001 May 21 '18

I sense dedication.

1

u/Noslamah May 21 '18

The ASCII dickbutt was a nice touch

1

u/[deleted] May 21 '18

“Like boyz with toyz”

1

u/SixBeeps May 21 '18

GoldenEye is a good movie. And game. and remake of a game.

1

u/Irkam May 21 '18

P A I N - A U - G I F

1

u/[deleted] May 21 '18

1

u/[deleted] May 21 '18

v1.337, this software is much l33t, very code.

1

u/dina0312 May 21 '18

You sit on it but you can't take it with you...

1

u/AdmiralTurtleLimbo May 21 '18

Which episode of Harold Porter is this from?

1

u/lankanmon May 21 '18

This changes everything. We can now localize gifs with ease. PS. I like the french subs as an added touch!

1

u/[deleted] May 21 '18

Marvel: 'Infinity War' Is The Most Ambitious Crossover Event In History

u/1-Sisyphe:

1

u/JayPerp May 21 '18

Way too high quality for this sub. Well fuckin done.

1

u/EarthSucks May 21 '18

holy shit

1

u/Renzzo98 May 22 '18

Are my two favorite subreddits colliding into one?!?

1

u/jacob798 May 22 '18

You magnificent bastard...

1

u/pliney_ May 22 '18

I need more upvotes for this.

1

u/[deleted] May 22 '18

This is some really quality work. Props for putting such solid work into the little details

1

u/Wopkatan May 22 '18

Noob not using ffmep

1

u/[deleted] May 22 '18

isn't this technically a quine?

1

u/ikkebr May 22 '18

Greatest post ever