"Hello, World" in 5 CURSED languages that no one should use

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you're a software developer you've likely written a good number of hello world programs so many in fact that you're probably wondering why the world has yet to say hello back despite being ghosted we've continued to slip into the Earth's DMS in a number of different programming languages odds are these languages followed a rather similar structure with perhaps some slight differences in syntax or function naming whilst this is true for most common programming languages there are a good number that are unrecognized ible in the way that they are written which are often considered cursed these cursed languages are known as esoteric programming languages or esol Langs for short and there's a whole website dedicated to them these languages are called esoteric for good reason and whilst some are created for very specific use cases many have been created as a means to test human creativity on the humble turing machine so for this video I decided to write hello world in five of these esoteric languages that I personally found to be the most interesting the first language we're going to write hello world in is arguably the most famous of the Langs and that language is brain brain isn't just named to be provocative it's a pretty accurate description of what happens to your mental state when you attempt to write this language for the first time however once you get past the initial mental labotomy the languages design is actually rather simple consisting of two main components an array of 30,000 bytes each initialized to zero and a bite pointer which is initialized to start at the beginning of the array the semantics of the language allow for the pointer to move up and down the array manipulating the bytes at whichever index the pointer is currently placed at so let's write our hello world program to begin let's print out the letter H to do this we'll set the first bite in the array to 72 which is the asky value for H and print it out to increment the value at the current pointer we use the plus symbol let's go ahead and do this 72 times we can then print it out to the console using the dot symbol let's go ahead and run this in the terminal and we should see the letter H print to console so far so good we could continue this method to write out each letter if we wanted to but it's not the most elegant approach instead we can use a different method brain gives us the ability to perform looping which can make our code much more concise to Loop we first need to set a loop counter which is the number of iterations that we want to perform we can roughly figure this out by using the square root of the number we want which in our case gives us 8.4 if we divide our 72 by 8 we get back the number N9 so we want to Loop nine times incrementing the value by eight each iteration let's go ahead and set the first bite to the value of nine which will be our Loop counter we can then Define our Loop using the brace symbols anything we put inside of the braces will be our Loops logic here we want to move the pointer to The Next Bite in our array increment this bite by eight times and then move Mo the pointer back to the loop counter decrementing it by one when the loop counter reaches zero the loop will end after the loop we then want to increment the pointer again to where our first Letter's bite value is stored and printed out now if we run this code we should see the letter H being printed to the screen All That Remains is to do this for each character in our hello world string you'll notice on some lines instead of using a fresh bite in the array I just increment the current value as it's only a few steps to get the expected value we want you'll also notice for the L character I just print this out twice for the exclamation mark well I do something very similar I decent the pointer back to the bite that we used for our space value and then increment it by one and print out that value once you understand how the language works it's actually not too difficult to write which translates well to many other esoteric languages such as UK which is basically a derivative language with a pretty similar concept whilst inspiring a large number of similar languages brain wasn't the first esoteric language to be created that title goes to the compiler language with no pronounceable acronym which is abbreviated to intercal pronunciation issues aside this language was created as a parody by two Princeton University students in 1972 which happens to be the same year the C programming language first appeared this is an important fact about how esoteric intercal is whilst modern esoteric languages can be somewhat difficult to understand they typically come from the minds of more modern Developers who have been brought up knowing only the comfort of the ca programming language and its influence on Modern development modern esang merely adopted the dark whilst intera was born to it the languages that inspired intera were much more torturous such as foran and Cobo which are arguably esoteric by themselves so here is Hello World in intercal yep it's pretty cursed let's try and decipher what is actually happening the first thing to notice is that every line must start with a statement identifier this is either do please or please do if we look at the first line of code here we're defining an array of 16bit integers called one which is sized to 13 elements this is where we'll store the bytes for our hello world string the next lines go through and actually add the string to each index within the array which is done using the sub command determining the values for that array however is where things get a little cursed in most languages you would typically either enter the asky character or value that you wanted the program to Output when it comes to intercal however this isn't the case instead the compiler will print out the value at each element on the array using a four-step algorithm this is a little complex so bear with me it took me a whole evening to figure it out the algorithm is as follows step one the compiler will take the asky value of the previously printed character and reverse its bits if there was no previously printed value such as when you at the start of the array then this value is zero step two two take the value at the current index of the array step three subtract the value in step two from the value in step one make sure to handle any underflow by keeping the number in eight bits and step four take the result of step three and reverse its bits to get the asy value of the character to print yes it's really this horrible in order to figure out the values I needed for hello world I ended up creating my own python script to perform this calculation in Reverse if you're interested in running this yourself I added the link to the code down below this printing logic is a bit of a puzzle to understand but it's not the only one that intercal requires let's first compile this code using the intercal compiler which is aptly known as ick this is the puzzle in action here the compiler has produced an error message telling us that we the programmer are insufficiently polite this is because each program must contain a specific range of the please keyword and in our case we haven't used enough if we try to rectify this by adding too many we'll receive another error from the compiler in ining us that we're being overly polite therefore just like Goldilocks and the Three Bears you need to find an amount that sits somewhere in the middle and is just right out of this list intercal was probably the second hardest one for me to figure out and whilst it may not be anything great to look at it's certainly better than looking at nothing right well it just so happens that the creator of this next language would probably disagree to show what I mean here is Hello World in our next language you're probably thinking he made a mistake there's nothing on the screen well let me run this code with our next interpreter as you can see we get back the message of hello world so what exactly is this code passing well if I highlight the code it makes it a little more clear we basically have a bunch of Whit space which coincidentally is also the name of the language where most programming languages ignore the whites space and code whitespace does the opposite and ignores all other characters only considering the white space as code now you probably thinking how many whites space characters are there well the answer is not a lot there's only three in total which are the tab space and the new line or Line Feed character if I set up my Editor to display these you'll be able to see the code a little more clearly I'm using the underscore character for spaces the greater than symbol for tabs and the dollar symbol for new line it may not feel like it but these three characters are enough to create a working touring machine let me show you how it works by simplifying our code and only printing the letter H whitespace uses a stack to manage its memory so the first thing we want to do is push the asky value of H onto it we can push a number onto the stack using the space space combination followed by the number represented as binary binary is constructed using wh space itself where the tab character is equal to one and the space is equal to zero the letter H is represented by 72 in decimal which in 8bit binary is 01 1 0 0 1 0 0 0 this translates in Whit space to space tab space space tab space space space we can then end our binary sequence using the new line character next we want to Output the character at the top of the stack we can do this using a tab followed by a new line and then space and space we then end the program using the three line feeds next if we run this code we should see the letter H print to console we can also print this as a number of food want by changing our printing logic from space space to space tab pretty neat whites Space is really impressive in design providing a lot of functionality with different combinations of characters considering that there are only three characters in use it's rather impressive however it's certainly one of the more Vose sangs if we're looking for something a little more concise well fortunately our next group of languages fits that requirement the next language we're going to write hello world in is actually part of a subgroup group of esoteric languages these languages are used for an activity called code golf which is similar to a lead code Type challenge but instead of attempting to perform the challenge in the shortest time or memory complexity the goal is to complete it using the least amount of code measured in either bytes or characters in order to get the best scores possible esoteric languages for the purpose of code golf were created allowing developers to write code to solve these challenges in as few key presses as possible the one I decided to write hello worlden is called stuck and to do so is pretty easy here it is in all its Glory before you ask no this isn't an editing error I haven't left the whites space answer up by accident stuck has a unique behavior in which an empty source file automatically translates to hello world thus allowing for the smallest golf score possible zero bytes pretty neat golfing languages are extremely esoteric and therefore can be very difficult to read but they are still readable by most software Engineers which is a lot better than our last but certainly not least language this language is called VTO and it's a real doozy it also happens to be the language I had the most trouble writing hello world in and there's two reasons for this the first is because the language compiler only works in Windows unless you use the JavaScript transpiler this meant I had to break my separation of church and state and load up some code on my gaming PC the second reason is because the comp ER doesn't read text based source code instead it compiles midi files midi is a file format that provides a standardized way for music sequences to be saved transported and opened in other systems it's typically created using musical instruments but can also be created using software if you happen to be one of the few musicians software developer combos then vato is probably going to be an easy language for you to pick up however I happen to be more on the tonee side of the scale when it comes to musical creativity which makes writing velato more of a challenge fortunately there is a tutorial on how to write hello world using the guido notation system I'll drop a link to this guide down below given that this source code is a midi file however this one is a little difficult to show fortunately I happen to have the musical score to hand for those who are musically literate for the rest of us well here is the sound of hello world in C the musical key not the language enjoy
Info
Channel: Dreams of Code
Views: 530,164
Rating: undefined out of 5
Keywords:
Id: ehbSTazdhbU
Channel Id: undefined
Length: 13min 7sec (787 seconds)
Published: Sun Oct 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.