19 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/ edited Apr 13 '17 at 12:39 By the way, also check out my text-to-speechtext-to-speech answer. By the way, also check out my text-to-speech answer. By the way, also check out my text-to-speech answer. 18 added 26 characters in body edited Mar 3 '14 at 0:45 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges For obfuscation (and ease of programming) we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line, terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed; it's unnecessary for int putchar (int). STEP 3: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function with one statement. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. For obfuscation we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line, terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed; it's unnecessary. STEP 3: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function with one statement. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. For obfuscation (and ease of programming) we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line, terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed; it's unnecessary for int putchar (int). STEP 3: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. 17 deleted 1 characters in body edited Mar 2 '14 at 23:18 Doorknob♦ 56.1k1717 gold badges120120 silver badges361361 bronze badges For obfuscation we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line;line, terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern:STEP 1: The next step involves a few tasks: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed,removed; it's unnecessary. STEP 2: Next, make use of the ?: and , operators to transform each function into a single return statement. I'm illustrating this separately from the above because this is where things start getting confusing to look at. Remember that putchar() returns an int, and ?: takes precedence over ,:STEP 3: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function with one statement. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. STEP 4: Finally, remove the switch block by using a series of ?: operators. We can also remove the int declarations, since C will use them by default, as well as the return itself (which will generate a warning at worst). After this, our program is a single, recursive function with one statement. Pretty cool, right? Edit: I replaced putchar() with a main and c==4c==4 below; because I just thought of it at the last minute: If you want to add a little flair, you can use more interesting numbers for c and even base the checks off of other numbers (e.g. for the c==2 case, z is ignored and available, so instead of calling main(2,z,_) you could call main(-97,_,_) and replace c==2 with c<-z). Be creative,creative; the possibilities are endless.FINISH: The final step, then, is to arrange the text in some creative pattern, and voila! You can adjust the code a little to help with formatting (e.g. I added some extra data at the end of the patternspatterns string in the posted program to help get the line length right). The ladies are sure to be all up ons. For obfuscation we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line; terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern:STEP: The next step involves a few tasks: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed, it's unnecessary. STEP: Next, make use of the ?: and , operators to transform each function into a single return statement. I'm illustrating this separately from the above because this is where things start getting confusing to look at. Remember that putchar() returns an int, and ?: takes precedence over ,:STEP: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function with one statement. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. STEP: Finally, remove the switch block by using series of ?: operators. We can also remove the int declarations, since C will use them by default, as well as the return itself (which will generate a warning at worst). After this, our program is a single, recursive function with one statement. Pretty cool, right? Edit: I replaced putchar() with a main and c==4 below; because I just thought of it at the last minute: If you want to add a little flair, you can use more interesting numbers for c and even base the checks off of other numbers (e.g. for the c==2 case, z is ignored and available, so instead of calling main(2,z,_) you could call main(-97,_,_) and replace c==2 with c<-z). Be creative, the possibilities are endless.FINISH: The final step, then, is to arrange the text in some creative pattern, and voila! You can adjust the code a little to help with formatting (e.g. I added some extra data at the end of the patterns string in the posted program to help get the line length right). The ladies are sure to be all up ons. For obfuscation we add the '#' character to the numbers. In the program below, patterns is the array of pixel patterns, and lines is the obfuscated array of pattern codes for each line, terminated by an 'x'. For further obfuscation we define "on" pixels in patterns to be any character that isn't a space; this lets us put more misleading text in pattern:STEP 1: The next step involves a few tasks: Remove all loops and use recursion. Change all functions (except main) to the form int function (int, int) and use the same parameter names for each. The reasons will become clear later. Change main to the form int main (int, int, int) and name the last two parameters the same as your function parameter names. Replace all references to string constants with the strings themselves; and use each string only once if possible. The include can be removed; it's unnecessary. STEP 2: Next, make use of the ?: and , operators to transform each function into a single return statement. I'm illustrating this separately from the above because this is where things start getting confusing to look at. Remember that putchar() returns an int, and ?: takes precedence over ,:STEP 3: Ok. The next step is a big one. All of the functions are now a single statement of the same form. We can now combine them all into a single function, identifying each one by a number -- essentially turning the entire program into a single recursive function with one statement. Note that the first parameter to main will be 1 when the program is run with no arguments, so that should be our initial state. STEP 4: Finally, remove the switch block by using a series of ?: operators. We can also remove the int declarations, since C will use them by default, as well as the return itself (which will generate a warning at worst). After this, our program is a single, recursive function with one statement. Pretty cool, right? Edit: I replaced putchar() with a main and c==4 below; because I just thought of it at the last minute: If you want to add a little flair, you can use more interesting numbers for c and even base the checks off of other numbers (e.g. for the c==2 case, z is ignored and available, so instead of calling main(2,z,_) you could call main(-97,_,_) and replace c==2 with c<-z). Be creative; the possibilities are endless.FINISH: The final step, then, is to arrange the text in some creative pattern, and voila! You can adjust the code a little to help with formatting (e.g. I added some extra data at the end of the patterns string in the posted program to help get the line length right). The ladies are sure to be all up ons. 16 deleted 23 characters in body edited Mar 2 '14 at 10:12 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 15 edited body edited Feb 27 '14 at 6:15 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 14 added 132 characters in body edited Feb 25 '14 at 13:37 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 13 added 2 characters in body edited Feb 25 '14 at 11:48 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 12 added 682 characters in body edited Feb 25 '14 at 11:40 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 11 added 330 characters in body edited Feb 25 '14 at 9:29 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 10 Removed "return"; reformatted block and 42 (42 looks better now, too) edited Feb 25 '14 at 9:13 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 9 Improvements to guide. edited Feb 25 '14 at 3:39 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 8 Some obfuscation tweaks edited Feb 24 '14 at 20:47 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 7 deleted 99 characters in body edited Feb 24 '14 at 17:11 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 6 Syntax coloring edited Feb 24 '14 at 10:39 Victor Stafusa 8,06244 gold badges3232 silver badges5959 bronze badges 5 added 47 characters in body edited Feb 24 '14 at 7:58 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 4 Moved putchar to main(4,z,_) edited Feb 24 '14 at 7:51 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 3 edited body edited Feb 24 '14 at 7:31 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 2 added 61 characters in body edited Feb 24 '14 at 7:16 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges 1 answered Feb 24 '14 at 6:41 Jason C 5,88311 gold badge1515 silver badges3333 bronze badges