142 points

Rust:

Cannot move princess out of castle which is behind a shared reference

permalink
report
reply
78 points

You can’t rescue the princess, but you can borrow her.

permalink
report
parent
reply
16 points

…good enough.

Ill get her back in 3 minutes

permalink
report
parent
reply
41 points

It will also complain that trying to break into the castle is unsafe, so you have to tell it that you know.

permalink
report
parent
reply
12 points

That just means you designed your castle unsafely.

permalink
report
parent
reply
6 points
*
Deleted by creator
permalink
report
parent
reply
9 points
*

“Alright, but you better be outside of a properly locked up and OSHA-compliant castle with the princess by the time I get back, or I’m not compiling”

And then you do that, but you miss a smoldering ember from one of the castles torches, and everything including the horse and princess catches fire. Next time, pick an escape plan that only requires unsafe for the drawbridge.

There’s a totally safe way to do it too, I guess, but it involves building a series of replacement castles, and it’s also totally ugly and sinfully slow.

permalink
report
parent
reply
5 points

Just clone the princes and get on with your day.

permalink
report
parent
reply
113 points

no python? how are normie programmers like me supposed to relate to this?

permalink
report
reply
79 points

You have python. You import antigravity. The princess flies off into space. You monkey patch the princess so she has wings.

permalink
report
parent
reply
26 points

And this is how I learned about the antigravity module. Pretty cool!

permalink
report
parent
reply
8 points

Same! I also learned about

import this
permalink
report
parent
reply
28 points

The artist is still waiting for the python cells to render.

permalink
report
parent
reply
3 points

Rescuing is only I/O bounded; your argument is irrelevant.

permalink
report
parent
reply
22 points

Python: You send someone else to rescue the princess on your behalf. That someone else is the C knight.

permalink
report
parent
reply
2 points

Only if you have to rescue many princesses in a short period of time

permalink
report
parent
reply
17 points

import army

permalink
report
parent
reply
13 points

Which is a library written in C, of course.

permalink
report
parent
reply
8 points

No perl either. Much like python you find a relevant library (in cpan), but unlike python there will be seven different implementations, and any four perl devs will come up with at least ten solutions, nine of which will successfully rescue the princess

permalink
report
parent
reply
6 points

Everything will seem to be be going great, but to actually gain access to the castle you’ll have to compare your situation to successful rescues to find the undocumented drawbridge control

permalink
report
parent
reply
93 points

Python:

from Rescues import Princess
Princess.rescue()
permalink
report
reply
27 points

map(lambda princess: princess.rescue(), [castle.get_princess() for castle in castles])

permalink
report
parent
reply
7 points

Don’t forget to keep your return values…

rescued_princesses = [{"princess": princess, "rescued": princess.rescue()} for princess in [castle.get_princess() for castle in castles]]

permalink
report
parent
reply
2 points
from Castle import Princess

Done

permalink
report
parent
reply
84 points

Here is the original comic, it’s got the word fuck in it! Direct link to higher-quality image.

permalink
report
reply
56 points

NOOOOOOO NOT THE FUCK W*RD!

permalink
report
parent
reply
20 points

I can’t fucking believe you’ve done this

permalink
report
parent
reply
11 points

Yeah. I thought we all agreed that we don’t fucking swear here. What the fuck…Shit. Darn-it. /s

permalink
report
parent
reply
12 points

Now I can’t let my cats see this comic :(

permalink
report
parent
reply
34 points

Changed the image link, thanks.

permalink
report
parent
reply
3 points
*

You seem very excited so now I have to check it out.

e: holy shit, it does

permalink
report
parent
reply
77 points

Swift: Apple releases a new version of the castle and deprecates the princess before you finish your implementation

permalink
report
reply
18 points

the author did another comic with swift and it’s pretty much what you said lol

https://toggl.com/blog/kill-dragon-comic

permalink
report
parent
reply
5 points

The Python one should have been an environment joke.

permalink
report
parent
reply
4 points

I love the Lua one because it’s so true, LuaJIT is magic and Mike Pall is the only one who understands it as its creator.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 8.8K

    Monthly active users

  • 1.2K

    Posts

  • 44K

    Comments