📜 ⬆️ ⬇️

Unusual congratulations on the day of the programmer

The article was supposed to be dedicated to the day of the programmer, but was delayed because of my desire to make it as meaningful as possible. In the end, this is not the last professional holiday in our life ;-)


“But the truth is the day of the programmer,” I replied two hours before its occurrence (mainly due to this topic ). Then she imagined tomorrow's congratulations - “With the holiday”, “Happy programmer's day”, “Congratulations, colleagues” ... Boring. And the soul has requested something such, professional, with a twinkle!

In this article I want to offer several ways to present any banal congratulations in an unusual form in full accordance with our profession and the name of the blog. Most languages ​​work only with Latin, so we will either wish for “Happy Programmers' Day!”, Or (for the most indigestible languages) just say “congrats”.

Method 1. Classic


When it comes to abnormal programming, the first thing that comes to mind is the immortal Brainf * ck . The language is convenient for several reasons:
- comparative fame among other esoteric languages;
- an abundance of language interpreters, including online ones - many of the esoteric languages ​​have one or two interpreters that require separate efforts to install, compile and run them;
- simplicity and multivariate coding of text messages;
- ignoring any characters of the source code of the program that are not commands, which allows you to format the code as you please, mask it as ASCII-art or frames around other text, etc.
')
So, the simplest “Happy Programmers' Day!” (Without cycles) on Brainf * ck looks like this:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. +++++++++++++++++++++++++. +++++++++++++++.. +++++++++. >++++++++++++++++++++++++++++++++. <-----------------------------------------. ++++++++++++++++++++++++++++++++++. ---. --------. +++++++++++. -----------------. ++++++++++++.. --------. +++++++++++++. +. >>+++++++++++++++++++++++++++++++++++++++. <. <-----------------------------------------------. +++++++++++++++++++++++++++++. ++++++++++++++++++++++++. >>------. 


In this form, it is not interesting, so you can play around with the construction of ASCII art from this code. For example, like this:

 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++++++
 +++ +++ +++ +++ +++. ++ +++ +++ +++ +++ +++ +++ +++ ++.  +++ +++ +++ +++
 +++ .. + +++ +++ ++.  > ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++. <- ---
 ---------- ----------- --------- -------. + ++++++++++++ ++++++++++ +++++++++++ +. --- .--- -----. +++ 
 ++++++++ .- ----------- -----. +++ +++++++++ ..--------.  ++++++++++++. +. >> +++ ++++++++++++++++++ 
 +++ +++ +++ +++ +++ +++. <.  <- --- --- --- --- --- --- --- --- --- --- 
 --- --- --- --- ---. ++ +++ +++ +++ +++ +++ +++ +++ +++ +++. ++ ++ +++++
 +++ +++ +++ +++ ++++. >> - --- -.- +++ +++ +++ +++ +++ +++ +++++ ++++ +++ +++ 


By the way, in the less well-known but popular among connoisseurs and inventors of esoteric languages, the output of a text message can be done in many ways, but the simplest of them is too obvious to be entertaining: the message symbols are explicitly indicated, simply in reverse order, and are surrounded by service characters.
 0"!yaD 'sremmargorP yppaH">,:#<_@ 


Method 2. Dramatic


Popular as a congratulation, works of art of various formats: poems, fairy tales , but for what time and imagination will be enough :-)

The best way to implement this method is Shakespeare programming language, in which the program is presented in the form of a play, the variables are the characters of Shakespeare, the numerical constants are artistic descriptions, and the programmer ... well, he may not be a playwright, but literary English must know! Because the more extensive and colorful the set of adjectives with a noun, the greater the number it designates, and the actions are documented as monologues of hero-variables. The output of the message "congrats" in this language looks like this:

 The Shakespeare-Style Congratulations Ariel, the genie to store values of o,n,r,t,s Kaliban, the ugly creature to store values of c, g, a Prospero, the hero to operate on them Act I. Scene I. [Enter Prospero and Ariel] Prospero: You peaceful mighty proud handsome white-winged overwieght overpraised overnamed angel! You are as good as the difference between you and an ill naughty crying ungerage child! [Exit Ariel] [Enter Kaliban] Prospero: You are as ugly as the difference between Ariel and sum of his white fluffy wings and his bored smile! Speak your mind! [Exit Kaliban] [Enter Ariel] Prospero: Speak your mind. You are as worried as the sum of you and a spider! Speak your mind! [Exit Ariel] [Enter Kaliban] Prospero: You are as disgusting as the sum of you and a drunken vomiting idiot. Speak your mind! [Exit Kaliban] [Enter Ariel] Prospero: You as as sweet as the sum of you and reddest royal roses. Speak your mind. [Exit Ariel] [Enter Kaliban] Prospero: You are as silent as the difference between you and the sum of your dirty feet and your unkept greasy hair. Speak your mind! [Exit Kaliban] [Enter Ariel] Prospero: You are as prominent as the sum of you and a sparkling diamond. Speak your mind. You are as lovely as the sum of you and a guinnea-pig. Speak your mind! [Exit Ariel] Prospero: What the hell is wrong about these guys walking here and there in silence? [Exit Prospero] 


Method 3. Magical



If you want to surprise a colleague, show him a professional focus, for example, such. Run a shell (for example, Bash) and type the following command:

 echo 1774767685848640863781394195195183398747095833456108183818P | dc 


Unexpected result, right? This is the so-called dc-magic, simple, but nevertheless not obvious. dc is a Desktop Calculator, a tool that allows you to work with arbitrary precision numbers. In this case, the P command (the last character before |) prints the number preceding it, but (attention, focus itself) as a string. For this, the number is converted to hexadecimal:
 0x48617070792050726F6772616D6D6572732720446179210A 

is divided into pairs of digits, and instead of each pair of digits, a symbol with the corresponding ASCII code is printed.

Method 4. Spyware



For people who do not have a printer, also has its own programming language - Whitespace . Remarkable is that a blank piece of paper received from a Whitespace programmer can mean anything from a declaration of love to a challenge to a duel. In this wonderful language, it is not the visible characters that make sense, but the spaces between them - the invisible characters are space, tabulation and line break. Thus, the program without comments looks like a blank document, and in print it looks like a clean sheet.

Below is the printout program “congrats”, in which (to avoid problems with the parser) spaces are replaced by S, and tabulation by T. The curly brackets indicate the beginning and end of the number (for readability), the last dot indicates three line breaks in end of code.

 SS{STTSSSTT} T SSSS{STTSTTTT} T SSSS{STTSTTTS} T SSSS{STTSSTTT} T SSSS{STTTSSTS} T SSSS{STTSSSST} T SSSS{STTTSTSS} T SSSS{STTTSSTT} T SSSS{STSTS} T SS . 


Method 5. Decorative



Finally, there are plenty of ways to make a greeting in the form of a picture - these are just two of them.

qrcode
Happy Programmers' Day in the form of a QR code

Brainloller
Happy Programmers' Day on Brainloller

And what interesting and unusual ways to write a short text do you know?

Source: https://habr.com/ru/post/104084/


All Articles