The Programming Language Quiz

TinyBF, 708 bytes, cracked by kirbyfan64sos

This was crazy fun. Everyone knows that I can only write one language ;)

I,c,o,d,e,C;i;main(){i++;for(i++;i^9;i++)putchar(((i+69)*!(i+2*~0)|(9!=9+(I=((i-1)>>(i+2*~0))+~(!(i+2*~0)+~0)))*111|115*(6>i+1)*(i>3)+~(i>(10+(9>i)+~i+(i>9)))+(5<i)+(i<5)+1|(c=(i>6))|(o=(i>=7+!i))|(d=(i>>1>3)*(i*((i+~0>5)<<2)+(i>~2+i)))|(e=(i-~0>(i|5)&&32>>i)*99)|(C=(i>>(i>>2+i/7)>0)*(i+(i<<1)+(i<<2)+(i<<3)+(i<<4)>=(i!=6)*(5>=i)*(i+(i<<5)))*(i+(i*i)+62)*((i==6)!=!i)))+(i*i+(i<<1)+(31+i^i)+(i+i)*~0+2*i)*(1==(i==7)));I|=(c+=(o>d)),2*(c+C>o+d);e^=(d>>c)|4;I-=(e>C)+(I+c+(o==C)-~7*(C<=I)>>(C>=o));C=(e>>2)^(I-~o==c),o=255>>((int)1e7*(c-~1)>>(C+e+d+o+I)),i|=i+(e>=d)+(2<<I)+(3<<c);putchar(!(I+d+c>=(C|e))?(I>o)+(d=(20*(I==c))>>(1==~I+d+e+(C==(1>=(I==C))))):(I+o+C)*((C+e)/5+C+I+20+I+I==1>>(o>>(d>=(C!=I)))));}

Explanation

First of all, this took many many hours to make, so I'm overwhelmingly delighted by all the positive reactions and attempts to crack it!

As noted in the comments, when compiled in C, the code prints Gotcha! followed by a newline, but when TinyBF it prints the desired Hello, World!. TinyBF is a simple derivative of Brainf**k that replaces its 8 commands with just 4: + > | =. Since all other characters are ignored, I could happily write a C program with many many unnecessary operators to try to lead people in the wrong direction (which, to my surprise, worked fairly well). Here is the pure TinyBF code:

++++++++|=+=>>++++|>+>+>+>++>+++|=>|=>=+|=>>>+>+>+|=>|>>|=>>>>+>++++>==>=+++===+++++++====|=+=>+>+=>>|=>+++===>>>==>>===>>>>++++|=+>=++++>=|>+===>>==+++==>===++++++++==>>>>>==

Here is the same program, written in ordinary BF:

++++++++[->>++++[>+>+>+>++>+++[<]>-]>>>+>+>+[<]<<]>>>>+>++++>.>---.+++++++..[->+>+<<]>+++.<<<.<<.>>>>++++[-<++++>]<-.>>.+++.>.--------.<<<<<.

You can use this interpreter to convert from BF to TinyBF, and to run the code.


evil, 658 bytes, cracked by Sp3000

#!/sbin/fortran

Hello, World = 'SCBsIG8gICBvIGwgIQogZSBsICwgVyByIGQKYm9zcnJ1a3R2cG54cHN2eGJ5eWJkeG9iaHJ0eHV0SGF0eXJhcGF4eW5wYWFuenhkdnBidnZuYWRhcXZoZGFhcEVxcnZkcWF1YXh0ZW5ncXJ4ZXF2d2ZndWRueXZweWR1d0x2eHhydHZidW55ZHJucW5ocGhidG5neWR3eHd0c3V3d0x2c3d0cHVueHVwdHJwaWhhaG16ZXNiaXdweWdnanVocU9saHV3eWVwaGNyeW1naHBhaW5wZGRnZWJuZ2Z1eGRwZnV3eXNienJ2enh0YnRyaXZ6ZW54eWR3eGhodHh2YVd0eXF6dnVwZWdndnVnY3d0c2NhZWRnaWRyaXJ1aHV0d09tZGRwdHJueXVneG5iYXBueG96d2FweGR3enRna21wZ1Jjc29oeHVoZ3Z4Y3V3eXV5end2cXZ1ZG52ZWJudW16d0x2YWZoeXR2ZW91YXdoYW90YXN0ZWNuY3V2cG5odXVwZ0RiY2d2ZW15cnV0ZG9id3J5dWFyYXN3Z3hhdHdkZnJkYnN3cXJ4dWJzYXf='.decode('base64').rsplit(' ', 1)

print Hello, World

evil is an old esolang a bit like BF. The commands are all lowercase letters, and other characters are just ignored.

First, I generated a short hello world program in evil using Python:

aeeeaeeewueuueweeueeuewwaaaweaaewaeaawueweeeaeeewaaawueeueweeaweeeueuw

Then, again using Python, I transformed it into a base64 string:

Ym9zcnJ1a3R2cG54cHN2eGJ5eWJkeG9iaHJ0eHV0eXJhcGF4eW5wYWFuenhkdnBidnZuYWRhcXZoZGFhcnZkcWF1YXh0ZW5ncXJ4ZXF2d2ZndWRueXZweWR1eHhydHZidW55ZHJucW5ocGhidG5neWR3eHd0c3V3c3d0cHVueHVwdHJwaWhhaG16ZXNiaXdweWdnanVoaHV3eWVwaGNyeW1naHBhaW5wZGRnZWJuZ2Z1eGRwZnV3eXNienJ2enh0YnRyaXZ6ZW54eWR3eGhodHh2eXF6dnVwZWdndnVnY3d0c2NhZWRnaWRyaXJ1aHV0ZGRwdHJueXVneG5iYXBueG96d2FweGR3enRna21wc29oeHVoZ3Z4Y3V3eXV5end2cXZ1ZG52ZWJudW16YWZoeXR2ZW91YXdoYW90YXN0ZWNuY3V2cG5odXVwY2d2ZW15cnV0ZG9id3J5dWFyYXN3Z3hhdHdkZnJkYnN3cXJ4dWJzYXf=

That decodes into purely lowercase letters:

bosrruktvpnxpsvxbyybdxobhrtxutyrapaxynpaanzxdvpbvvnadaqvhdaarvdqauaxtengqrxeqvwfgudnyvpyduxxrtvbunydrnqnhphbtngydwxwtsuwswtpunxuptrpihahmzesbiwpyggjuhhuwyephcrymghpainpddgebngfuxdpfuwysbzrvzxtbtrivzenxydwxhhtxvyqzvupeggvugcwtscaedgidriruhutddptrnyugxnbapnxozwapxdwztgkmpsohxuhgvxcuwyuyzwvqvudnvebnumzafhytveouawhaotastecncuvpnhuupcgvemyrutdobwryuaraswgxatwdfrdbswqrxubsaw

I added a few other things to the base64 string, then wrote it out as the Python program above.

The shebang is actually important in the program. The s before the b in sbin will skip the b command. Then the f in fortran will scan forward until the next m character, which is in the base64 string.


Lua, 2920 2865 Bytes, cracked by jimmy23013

I only learned this language yesterday so forgive any syntax errors.

 --[[~The infamous Hello World program~]]                                                                                                                                                                                                       p=[[
Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                    Act I: Hamlets insults and flattery.

                    Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
 You lying stupid fatherless big smelly half-witted coward!
 You are as stupid as the difference between a handsome rich brave
 hero and thyself! Speak your mind!

 You are as brave as the sum of your fat little stuffed misused dusty
 old rotten codpiece and a beautiful fair warm peaceful sunny summer's
 day. You are as healthy as the difference between the sum of the
 sweetest reddest rose and my father and yourself! Speak your mind!

 You are as cowardly as the sum of yourself and the difference
 between a big mighty proud kingdom and a horse. Speak your mind.

 Speak your mind!

[Exit Romeo]

                    Scene II: The praising of Juliet.

[Enter Juliet]

Hamlet:
 Thou art as sweet as the sum of the sum of Romeo and his horse and his
 black cat! Speak thy mind!

[Exit Juliet]

                    Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:
 Thou art as lovely as the product of a large rural town and my amazing
 bottomless embroidered purse. Speak thy mind!

 Thou art as loving as the product of the bluest clearest sweetest sky
 and the sum of a squirrel and a white horse. Thou art as beautiful as the difference between Juliet and thyself.
 Speak thy mind! Let them]] print -- (She pauses) -- it in the streets!
 --[[Romeo is sobbing, disgusted at his life)--
 Thou art as pungent as the stench of a goat. Speak thy mind!
 [[Exeunt Romeo]]
 "Hello, World!" -- No response. "Hello!" He calls out again, but to no avail.

[[Exeunt Ophelia and Hamlet


                    Act II: Behind Hamlet's back.

                    Scene I: Romeo and Juliet's conversation.

[Enter Romeo and Juliet]

Romeo:
 Speak your mind. You are as worried as the sum of yourself and the
 difference between my small smooth hamster and my nose. Speak your
 mind!

Juliet:
 Speak YOUR mind! You are as bad as Hamlet! You are as small as the
 difference between the square of the difference between my little pony
 and your big hairy hound and the cube of your sorry little
 codpiece. Speak your mind!

[[Exit Romeo]
[[

                    Scene II: Juliet and Ophelia's conversation.

[Enter Ophelia]

Juliet:
 Thou art as good as the quotient between Romeo and the sum of a small
 furry animal and a leech. Speak your mind!

Ophelia:
 Thou art as disgusting as the quotient between Romeo and twice the
 difference between a mistletoe and an oozing infected blister! Speak
 your mind!

[Exeunt]]

Warning: It prints "Hello, World!" and then exits with an error

Explanation:

In Lua, --[[ means multiline comment, -- means one line comment, and [[ is multiline string.

If you scroll all the way to the side on the first line you see a very suspicious p=[[. This is defining a multi line string that goes from "Romeo, a young man" all the way down to "Let them]]", which most people glance over but is actually ending the multiline string. Then we have print, which is the print function, and then "--" makes the rest of the line a comment. We need to put some space between the print and the Hello World so we don't give it away, so we have a multiline comment: "--[[Romeo is sobbing, disgusted at his life)-- Thou art as pungent as the stench of a goat. Speak thy mind! [[Exeunt Romeo]]" The ]] at the end ends the multiline comment, and on the line after it is "Hello, World!" and then the rest of the line is commented out by a --. Removing all the comments from that area it becomes:

   Thou art as loving as the product of the bluest clearest sweetest sky
     and the sum of a squirrel and a white horse. Thou art as beautiful as the difference between Juliet and thyself.
     Speak thy mind! Let them]] print 
     "Hello, world!"