I want to continue the tradition begun this year ago by
this article (by the way, I am very pleased that it is still
remembered ), and talk about a few more ways to make my congratulations unusual and professional. This time I bring out simply “congrats” - conditionally and not laborious ways ended in that year.
Method 1. Magical
In this nomination, professional tricks traditionally appear in perfectly normal languages ​​that we use every day, in this case C ++ (or just C).
')
#include <stdio.h>
int main ()
{int A = 10, B = A ^ 1937006968, C = B ^ 337251857;
printf ((char *) & C);
}
Disclaimer. This focus uses low-level memory manipulation; results may vary depending on computer architecture and compiler used.
I analyzed this method in detail in the article
Numeric signatures ; it is based on creating numbers containing the byte sets of the desired string, and outputting them as strings. For better obfuscation, the required numbers can be calculated as the result of operations on other numbers — in this case, no numbers will appear to be meaningful strings in other viewing modes.
Method 2. Spyware
Last year, the
Whitespace code was presented in this nomination. The obvious choice is when you need to write something invisible, but not the only one. This year I use Ruby to get almost the same effect.
print "
".map {| z | z.size.chr}
Of course, not so impressive; interfere with the team, framing this riot of gaps. But the program is written in a simpler example: each string in quotes is converted to a single character with an ASCII code equal to the length of the string. The contents of the strings are completely irrelevant: you can, for example, enter explicit text or ASCII art there, and so on:
print "
## ## #### ##### ##### #### ## ## #### ##### #####
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
############ ##### ##################################
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ##### ## ## ## ## ## ## ## ## ##### ## ##
".map {| z | z.size.chr}
Method 3. Dramatic
This is not so much an independent method as an amendment to the method outlined last year. I still managed to launch the
Shakespeare interpreter, and to my shame, the greeting did not start there. First of all, the language recognizes only Shakespeare's characters known to the author of the interpreter; neither Ariel nor Prospero nor Caliban are among them. The same applies to the vocabulary: no guinea pigs and drunken boobies, only a vocabulary approved by the author (rather scarce). Finally, adjectives must match the noun by emotional coloring. Compliance with all these rules imposes strict restrictions on the text and deprives it of most of its charm.
Method 4. Classic
Last year, I completely unfairly blackened the wonderful language of
Befunge - disguised greetings are written beautifully on it, you just have to show a little ingenuity. For example, like this:
v> AA vBBB> RRR AA v> AA vBBB>: #, _ @ I
"" AA "B" RAA "" AA "B" RIII
SHHT AAAA ABBB RRRR AAAA GHHN AAAA OBBB CRRR III
"" AA "B" RAA "" AA "B" R
> ^ AA> BBB ^ RR AA> ^ AA> BBB ^ RR ooo
If you look at the inscription, you can see that the characters v,> and ^ direct the instruction pointer along certain lines of letters. Between the turns of the cursor, commands for adding characters to the stack in the form of a “character” are embedded - in Befunge, a double quote switches the mode from interpreting commands to entering characters on the stack. "Unnecessary" characters that come across the instruction pointer along the way are simply ignored. The program ends in the last character R and the first two exclamation marks with a cycle that outputs characters from the stack (in the reverse order of their return to the stack).
Method 5. Decorative
In this section, I offer a program on
Piet - this language leaves more room for creativity than last year’s Brainloller.

The ASCII codes of letters are encoded in block sizes, and the colors define the sequence of actions “add the size of the past block to the stack - output the character on the top of the stack - repeat”.
And finally
Method 6. Bonus
I love different competitions very much and sincerely believe that the best congratulation on a programmer's day is a professional competition.
Levsha and his team believe the same thing, and we have joined forces to create such a competition. Unfortunately, we did not have time for the holiday itself, but in October we will definitely launch it! In the meantime, you can register for the beta test on the website of the future competition
coder2011.ru and vote for your favorite topic
here .