📜 ⬆️ ⬇️

Happy Nerd New Year!

Today is November 11, 2011; in DD.MM.YY format, an exceptionally beautiful binary record is obtained (the latter, by the way, for the next 88 years - until January 1, 2100). This is a wonderful occasion to announce this day Nerd New Year , with which I congratulate you.


Although stop, congratulations on such a day in plaintext is nonsense. I already wrote about the unusual congratulations on the day of the programmer ( 2010 , 2011 ), but here you need something special ... Personally, I have the term nerd associated with something binary; What about greetings based on 0 and 1?

Spoon


Let's start with the classics. Brainfuck - language for all occasions; and he has a binary dialect too. In Spoon, BF commands are replaced with a sequence of zeros and ones that make up the prefix-free code, so they do not even need to be separated by spaces. The following code on the BF, outputting "Happy Nerd New Year!",
')
  ++++++++++ [> +> ++> +++> ++++> +++++> ++++++> +++++++> +++ +++++> +++++++++> ++++++++++> +++++++++++ ++++++++++++
 +> +++++++++++++ <<<<<<<<<<<<<<<] >>>>>>>> --------. >> - -. >> -------- ..> ---------. <<<<<<<<<< --------. >>>> ++
 ++++. >>> ---------.> ++. <-. <<<<<<< >>>>. >>> +.> +++++. <<<<<<<<< >>>>> -. >>. <. >> -----. <<<<<<<<< +. 


equivalent to Spoon code

  1111111111001000101010110101110101111010111110101111110101111111010111111110101111111110101111111111
 0101111111111101011111111111101011111111111111110110110110110110110110110110110110110000011010010010
 01001001001001000000000000000000000000000101001001000000000000101001001000000000000000000000000010
 100010100100000000000000000000000000001010011011011011011011011011011000000000000000000000000101
 0010010010010111111001010010010010000000000000000000000000000001010010110010100110000010100110110110
 1101101101100101001001001001000101001001001010010100101111100101001101101101101101101101100101001001
 00100100100000010100100100010100110010100100100000000000000000010100110110110110110110110111001010 


but, you see, the latter looks much more binary.


Whirl


The author of the language describes him as “dizzying,” and I cannot disagree with this characteristic. Programs in this language are strictly binary, but, unlike Spoon, not the commands themselves are encoded with zeros and ones, but the switching system between them. In Whirl 24 teams that are located on two rings - mathematical and operational. Zeros and ones control the rotation of the rings (ie, changing the current command on the ring), switching between the rings and activating the execution of the current command. The mechanical implementation of the interpreter would look something like this:



All this is rather confusing (for example, zero either switches the current ring or changes its direction of rotation depending on the previous symbol), but, oddly enough, the language is relatively popular and is developing not only by its author. So, a certain Aviad Ben Dov wrote the Whirl code generator, which I used to create a program that displays "congrats":

  0011111100110011110011111001111000001110011111000111001111000110011100111111000111110001111000111110
 011110000011100111110001110011110001100111000100111110011000000000000000000000000000111110001001
 1111001100011111000110011111001111001100111100111110011110000011100111110001110011110001100111000100
 1111100110001111100000010001111100011000001111001100111100111110011110000011100111110001110011110001
 10011100010011111001100000000000000000000000000001111100000001110011111000110001111000000000000000
 0000000000000000011110011111001111000010001111100111001110001100011100011000111000110001110011111100
 01111100011110001111100111100000110001110000011100011100111110000000000000000000000000001111100011
 110001111100011110000010001001100111100111111001111100011110001111100111100000111001111111111111111111
 0001100111000100111110011000000011111000001111100010001001100111100111111001111100011110001111100111
 1000001110011111000111001111000110011100010011111001100011111000001111100010001001100111100111111001
 11110001111000111110011110000011100111110001110011110001100111000100111110011000000000000011111000
 1111000111110001111000001000100110011110011111100111110001111000111110011110000011100111110001110011
 11000110011100010011111001100000000000000001111100000111110001000100110011110011110011111000111
 10001111100111100000111001111100011100111100011001110001001111100110000000000000000000000000000000
 0000001111100011110001111100011110000010001001100111100111111001111100011110001111100111100000111001
 111100011100111100011001110001001111100110000000000000000000000001111100000111110001000100111111111
 100111111001111100011110001111100111100000111001111100011100111100011001110001001111100110000000000000
 0000000000001111100000111110001000100 


01_


This language is not completely binary, it requires the use of other characters, but the zeros and ones still carry the basic meaning, and for outputting a text message there are more than enough of them.

  h = 0100100001100001011100000111000001111001001000000100111001100101011100100110010000000000100111001
 10010101110111001000000101100101100101011000010111001000001010. 


True, a text message in this language is quite simple to decode: the sequence 0 and 1 after the equal sign are just binary codes of the message symbols written in a row in the same order as in the message: 01001000 - 'H', 01100001 - 'a' and etc. No inversions of bits, no reverse orders of characters - even boring, but let it be for the collection.

BIT , another masterpiece from David Morgan-Mar, can be included in this list. This language is also based on binary recording of programs, although instead of 0 and 1, more readable ZERO and ONE are used. Writing and reading also operate on individual bits, so a program that outputs a text message looks like a sequence of a significant number of lines of the form.

  LINE NUMBER ONE ONE CODE PRINT ZERO GOTO ONE ZERO ZERO ONE ZERO 


Each line contains its number (LINE NUMBER ...), the command to be executed (PRINT ...) and unconditional switching to another line (GOTO ...). But such a program is 1) uninteresting and 2) difficult to verify due to the absence of the author's interpreter. So I leave it at the mercy of the reader's rich imagination.

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


All Articles