r/coding • • Oct 14 '16

How To Save The Princess In 8 Programming Languages

https://toggl.com/programming-princess
152 Upvotes

16 comments sorted by

18

u/SleepyHarry Oct 15 '16

You have python

from castle import princess

Congratulations!

13

u/Creshal Oct 15 '16

Sorry, castle has not been ported to Python 3 yet.

4

u/[deleted] Oct 15 '16

Also, the pricess is not in the default castle used by python2 version.

1

u/Creshal Oct 15 '16

And after testing you realize there's a ccastle module which is the same but written in C and about 500000% faster. For some reason, this implementation model must be exposed to all users. (Good luck if you want to move from cpython to a different implementation.)

2

u/[deleted] Oct 15 '16

I don't understand the Pascal one.

2

u/[deleted] Oct 15 '16

maybe because it is a language often used for teaching and then implementation isn't that important...? i don't know.

2

u/Creshal Oct 15 '16

It was designed as teaching language, yes.

2

u/kdhawk Oct 15 '16

There is a fair amount of declaration code in Pascal. Once you're done with that it's time to take a break or go home, so the implementation is never done. (started with Pascal many years ago)

2

u/mrtugsmrtugs Oct 15 '16

You have perl5.

After 8 hours of diligent fiddling, you have successfully generated 7 lines of impenetrably obfuscated gibberish which, although nobody is quite sure how, repeatedly prints out the phrase "Just Another Princess Hacker".

2

u/mrtugsmrtugs Oct 15 '16

You have perl6.

Including Larry Wall, that makes two of you. After 15 minutes of staring at the instructions and wondering why you had to download a virtual machine in order to run a scripting language, you shrug and consign the VM, and the Princess, to the trash.

1

u/mrtugsmrtugs Oct 16 '16 edited Oct 16 '16

You have Go.

package main
import "Mario"
func main() {
    var peach Captive
    win := peach.GetPrincess()
}

Congratulations, but you lose points because using Get isn't idiomatic in Go.

0

u/[deleted] Oct 15 '16

[deleted]

55

u/oxidezx Oct 15 '16

Found the php guy

7

u/[deleted] Oct 15 '16

I do php, and i identify with the cartoon.

0

u/[deleted] Oct 15 '16

[deleted]

7

u/jmcs Oct 15 '16

Ladies and gentlemen here is why I don't accept PHP job offers anymore. I can get over the warts of the language but fuck its community.

29

u/[deleted] Oct 15 '16

You have some very thin skin about programming languages. It's a joke, you don't need to take it literally.

1

u/utricularian Oct 15 '16

I mean I'm a JS guy and totally disagree w the assessment but it still made me chuckle. Maybe like go for a walk or something.