⬆️ ⬇️

Programming languages: first joke

Programming languages ​​have their own jokers and their own jokes. Actually, most esoteric programming languages ​​were conceived precisely as jokes (of course, if not as a challenge to the public, like F * ckf * ck, or as an exercise for the mind, like Brainfuck). But there is one language that rightfully deserves the honorary title of the First Joke. Back in 1972, when all existing programming languages ​​were extremely expedient and deadly serious, in the early morning of May 26, a pair of pranksters pushed the limits of reality and came up with a fundamentally new language. They dubbed it Compiler Language With No Pronounceable Acronym, which for obvious reasons was reduced to INTERCAL .



Almost 40 years have passed since then. INTERCAL has long ceased to have nothing to do with any mainstream language , as the developers wanted it. Agree, an ordinary imperative language, in which there are named variables, arrays, an assignment operation, as many as 5 operators and a standard library that implements the missing arithmetic operations, has much more in common with normal languages ​​than the same Brainfuck, not to mention two-dimensional languages ​​that are not deterministic languages, paranoid languages, languages ​​with a single instruction and other exhibits of our vivarium. But he continues to be a pioneer of the genre, unique in many ways.



First of all, a reference guide. Later esoteric languages ​​concentrate their singularity in the very essence of the language, their guides are limited to dry factual descriptions of commands and features. The INTERCAL Programming Language Reference Manual is a unique description of a programming language, with epigraphs from “Alice in Wonderland” and snide comments made in a very serious tone. In addition, especially for this language, the authors developed a system of euphemisms for the service characters used: '- spark, "- rabbit ears,. - spot,: - double spot,, - tail,; - hybrid (although it would be more logical to have a" spotted tail " ), $ - big money, ~ - zagogulina, etc. (the full list is attached to the manual.) Combining rabbit ears with a spot to get a rabbit is prohibited!

')

Next, error messages. In decent languages, error messages are informative and accurately indicate the causes of the incident. In dishonesty, on the contrary, the messages are either universal or they throw up the wrong reasons for the error. INTERCAL errors are as malicious as a manual, and without a reference book they are not deciphered in principle. In fact, you can guess that E252 “I forgot what I was going to say” is a memory overflow error during I / O operations, and E182 “It seems you like this tag very much” is an error using the same label several times. But to whom in their right mind and hard memory would it come to mind that E405 “The program was rejected for mental health reasons” signals the use of multithreading commands or calculations with rollbacks without the appropriate compiler option, E017 “What do I really have to deal with?” using the constants of the wrong range, and E127 “Talking“ abracadabra ”without a magic wand is completely useless” - that the standard library is not connected?



Some errors do not have analogues in other languages. Thus, the pair E079 “Programmer is not polite enough” and E099 “Programmer is too polite” refers to the number of PLEASE command identifiers in the program (by the way, the PLEASE identifier does not carry any other meaning). Error E774 “Random compiler bug” fully corresponds to its name - it occurs randomly and usually disappears when recompiled. E995 “What, did I really have to implement it?” Occurs when trying to execute code that has not yet been written (just don’t ask how you can do it!).



Finally, the language itself. You can talk about it for a long time, but it is better to read the Revised Reference Manual , which preserves the style of the original manual, but uses modern implementations of the language. Here are some of my favorite places:







And nowadays there are people who are loyal to INTERCAL and proud of their title as techno-masochists - some of them throw the operating system's source code into this wonderful language for competitors, others argue that INTERCAL is better than Perl:



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



All Articles