{"id":986,"date":"2021-08-01T14:40:19","date_gmt":"2021-08-01T14:40:19","guid":{"rendered":"http:\/\/nitk.acm.org\/blog\/?p=986"},"modified":"2021-08-01T14:43:54","modified_gmt":"2021-08-01T14:43:54","slug":"the-bizarre-world-of-esoteric-programming-languages","status":"publish","type":"post","link":"https:\/\/nitk.acm.org\/blog\/2021\/08\/01\/the-bizarre-world-of-esoteric-programming-languages\/","title":{"rendered":"The Bizarre World of Esoteric Programming Languages"},"content":{"rendered":"\n<p>A standard programming language like Python or C++ is often characterized by a well-defined syntax, bug-free and fast nature, and ease in understanding the language. What if there exists a set of languages that challenge such norms of programming languages?<\/p>\n\n\n\n<p><em>Enter esoteric languages<\/em>.<\/p>\n\n\n\n<p>Esoteric programming languages, or esolangs, are a class of languages that push the conventions of language design. They represent a rather wacky and exciting side of programming languages and computer science. There isn&#8217;t a strict definition for a programming language to be considered esoteric; however, those regarded as esolangs are usually not designed for actual functionality, unlike our typical languages, along with the fact that they defy the rules of traditional programming in some form or the other.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Examples of Esoteric Languages:<\/h4>\n\n\n\n<p>Esolangs come in a wide variety of flavours and varying ranges of wackiness. From languages that use pixel art to ones that take inspiration from PM Modi\u2019s speeches, there are a lot of interesting esolangs out there, some of which are listed below:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Brainf***<\/strong><\/li><\/ul>\n\n\n\n<p>A rather NSFW title for a language, this esolang stays true to its name. Designed by Urban Muller, it is a language created with the intention to implement the smallest possible compiler and is known for its extreme minimalism. It has only eight commands, a data pointer, and an instruction pointer. Even though the language is a headache to use, it is a <strong>Turing-complete language<\/strong> (language used to simulate a Turing machine).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"375\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_brainf-edited.jpg\" alt=\"\" class=\"wp-image-988\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_brainf-edited.jpg 600w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_brainf-edited-300x188.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption>A &#8220;simple&#8221; Hello World program<\/figcaption><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Piet<\/strong><\/li><\/ul>\n\n\n\n<p>If you like programming and abstract art, this language will probably interest you as it combines both worlds into one language. Piet, taking inspiration from the Dutch painter Piet Mondrian and created by David Morgan-Mar, is a stack-based language in which programs look like abstract art. The language uses 20 colours, arranged according to hue and brightness, with black and white being used for control flow. As the program flows between different colour blocks, the block&#8217;s hue and brightness determine the type of the command. It is also Turing-complete.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"397\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/Hello_world_piet.png\" alt=\"\" class=\"wp-image-989\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/Hello_world_piet.png 407w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/Hello_world_piet-300x293.png 300w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><figcaption>Hello World in Piet<\/figcaption><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>ArnoldC<\/strong><\/li><\/ul>\n\n\n\n<p>ArnoldC is an esolang that takes famous quotations of the Terminator himself and uses them as actual lines of code. Designed by Lauri Hartikka, who developed the language using Scala, commands are replaced by famous movie quotes of Arnold Schwarzenegger, enabling one to write code using his one-liners.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"222\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_arnoldc-1024x222.png\" alt=\"\" class=\"wp-image-990\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_arnoldc-1024x222.png 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_arnoldc-300x65.png 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_arnoldc-768x167.png 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/08\/hello_arnoldc.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>&#8220;Hello World&#8221; in ArnoldC<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">The Purpose of Esolangs<\/h4>\n\n\n\n<p>Looking at the above examples, and as mentioned earlier, esolangs are not usually well-suited for writing proper programs. It is rather difficult for programmers to use these languages for serious functionality, unlike common languages like C++ or Python. However, &#8220;not designed for serious functionality&#8221; doesn&#8217;t necessarily mean esolangs do not have any purpose at all. Some of their objectives are as follows.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Minimalism: <\/strong>Languages like <em>Brainf***<\/em> and <em>Lazy K<\/em> aim to have as few instructions as possible. As a result of this, even if the language is theoretically Turing-complete, they often become complicated to use, as we&#8217;ve seen earlier. (Such languages are known as <strong>Turing Tarpits<\/strong>)<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Obfuscation: <\/strong>Languages like <em>Unreadable, JSF**k<\/em> (which is an esoteric form of JavaScript), and many esolangs, are designed in a way that makes it difficult to read code. It can be used to code and protect it from potential attackers, bypass security features or confuse people. For example, a program in Piet would look like a piece of art to most people, but it is, in fact, an executable piece of code.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Exploring new concepts: <\/strong>Esolangs can be used to explore alternative ideas and ways to design languages. For example, <em>Befunge <\/em>is a language where a two-dimensional grid forms the basis for the code, and execution can happen in any direction, which pushes the limits on how a program will compile.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Conciseness:&nbsp; <\/strong>Some concise esolangs like <em>Pyth <\/em>and <em>GolfScript<\/em> see their usage in \u201c<em>code golf,<\/em>\u201d where people compete to solve programming tasks with concise code.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Just for fun and randomness: <\/strong>Some esolangs exist for the sole purpose of making it nearly impossible for people to code in (e.g., <em>Malbolge<\/em>). Some of them showcase the personal interests of the creators (e.g., <em>ArnoldC, Shakespeare<\/em>), while some function as a joke (e.g., <em>COW<\/em> &#8211; where most instructions are some form of &#8220;Moo&#8221;)<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Conclusion<\/h4>\n\n\n\n<p>To sum it up, esoteric languages break new ground in programming language design. Esolangs can indeed cause a decent amount of pain to understand and use; however, as annoying as esolangs are, they are exciting and offer a fresh perspective into the world of programming languages.<\/p>\n\n\n\n<p><em>-By Sudarshan Sundarrajan, Third Year Department of Computer Science Engineering<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you heard of the term &#8220;esolang&#8221;? At first glance, an esolang may look weird and will probably end up giving you a headache. However, a deep dive into esolangs opens up a fascinating world that pushes the boundaries of language design<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[25,10],"tags":[332,331,334,330,333],"class_list":["post-986","post","type-post","status-publish","format-standard","hentry","category-sanganitra","category-tech","tag-arnoldc","tag-brainf","tag-esolangs","tag-esoteric-languages","tag-piet"],"_links":{"self":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":3,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":995,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions\/995"}],"wp:attachment":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}