Skip to main content

Weird Programming Languages


There are thousands of programming languages are invented and only about hundred of programming languages are commonly used to build software. Among this thousands of programming languages, there are some weird type of programming languages can be also found. These programming languages are seems to be called weird, since their programming syntax and the way it represent its code. In this blog we will look into some of these language syntax.

Legit

hello.png
Have you ever wonder, when you come to a Github project that print hello world program, but you cannot see any codes or any content. Check this link https://github.com/blinry/legit-hello and you will see nothing in this repository. But trust me, there is hidden code in this project.
If you see the commit section, you can reveal the magic. Yeah, you are right. Its storing hello world code in inside the git commit history. If you clone this project and run the following command, then you can see the hidden code in this project.
 git log --graph --oneline
Here are the supported instructions.
  • "[<tag>]": jump to the specified Git tag. For example, [loop] will jump to the tag loop.
  • "quit": stop the program.
  • "get": read a char from standard input and place its ASCII value on the stack. On EOF, push a 0.
  • "put:' pop top stack value and write it to standard output as a char. The value is always truncated to an unsigned byte.
  • "<Number>": push the specified integer on the stack. For example, 42 will push the value 42.
  • "<Letters>": unescape string, then push the individual ASCII characters on the stack. For example, "Hi\n" will push the numbers 72, 105, and 10.
  • "dup": duplicate top stack value
  • "pop": pop top stack value and discard it
  • "add": pop two topmost stack values, add them, push result on the stack
  • "sub": pop two topmost stack values, subtract top one from bottom one, push result on the stack
  • "cmp": pop two topmost stack values, pushes 1 if bottommost one is larger, 0 otherwise
  • "read": place value of current tape cell on the stack
  • "write": pop top stack value and write it to the current tape cell
  • "left": pop top stack value, move tape head left for that many places
  • "right": pop top stack value, move tape head right for that many places
Legit programming language source code hosted in Github and you can tryout yourself. Read out more about Legit.

Folder

1548px-PureFolders_HelloWorld.png
Here's another one, which does not maintain any code inside its repository. This language keep its code as folders. Instructions are read according to the oder of the folders. Inside these folder, there are three folders to represent Type, Command and Expression. Number of folders in inside these folders represent relevant mapping with type, command or expression. It can be represented as follows.
Command# of FolderDetails
if0 folderSecond sub-folder holds expression, third holds list of commands
while1 folderSecond sub-folder holds expression, third holds list of commands
declare2 foldersSecond sub-folder holds type, third holds var name (in number of folders)
let3 foldersSecond holds var name (in number of folders), third holds expression
print4 foldersSecond sub-folder holds expression
input5 foldersSecond sub-folder holds var name
Read full description of this language in here

Befunge

This is another interesting programming language which represent its code in two dimensional space. Take a look following code of infinite loop.
>v
^<
Did you get that? Execution start with first line ">" character. It mean to execute next instruction in right side. right side instruction is "v". This means to execute down instruction. This continues as an infinite loop. Here I added some of its instructions.
  • "+" Addition: Pop two values a and b, then push the result of a+b
  • "-" Subtraction: Pop two values a and b, then push the result of b-a
  • "*" Multiplication: Pop two values a and b, then push the result of ab
  • "/" Integer division: Pop two values a and b, then push the result of b/a, rounded down. According to the specifications, if a is zero, ask the user what result they want.
  • "%" Modulo: Pop two values a and b, then push the remainder of the integer division of b/a.
  • "!" Logical NOT: Pop a value. If the value is zero, push 1; otherwise, push zero.
  • "`" Greater than: Pop two values a and b, then push 1 if b>a, otherwise zero.
  • ">" PC direction right
  • "<" PC direction left
  • "^" PC direction up
  • "v" PC direction down
  • "?" Random PC direction
  • "_" Horizontal IF: pop a value; set direction to right if value=0, set to left otherwise
Read complete language specifications here. 3D represented languages also built called "Suzy" based on this language. Here below an example of finding factorial with Befunge language
&>:1-:v v *_$.@ 
 ^    _$>\:^

Brainfuck

This language was invented in 1993, as an attempt to create the smallest possible compiler. This compiler allow eight commands to write program and operate based on memory cell which also known as tapes. Here is the list of command Brainfuck support.
  • ">" Move the pointer to the right
  • "<" Move the pointer to the left
  • "+" Increment the memory cell under the pointer
  • "-" Decrement the memory cell under the pointer
  • "." Output the character signified by the cell at the pointer
  • "," Input a character and store it in the cell at the pointer
  • "[" Jump past the matching ] if the cell under the pointer is 0
  • "]" Jump back to the matching [ if the cell under the pointer is nonzero
Here below how hello world application implemented in Brainfuck language.
 1 +++++ +++               Set Cell #0 to 8
 2 [
 3     >++++               Add 4 to Cell #1; this will always set Cell #1 to 4
 4     [                   as the cell will be cleared by the loop
 5         >++             Add 4*2 to Cell #2
 6         >+++            Add 4*3 to Cell #3
 7         >+++            Add 4*3 to Cell #4
 8         >+              Add 4 to Cell #5
 9         <<<<-           Decrement the loop counter in Cell #1
10     ]                   Loop till Cell #1 is zero
11     >+                  Add 1 to Cell #2
12     >+                  Add 1 to Cell #3
13     >-                  Subtract 1 from Cell #4
14     >>+                 Add 1 to Cell #6
15     [<]                 Move back to the first zero cell you find; this will
16                         be Cell #1 which was cleared by the previous loop
17     <-                  Decrement the loop Counter in Cell #0
18 ]                       Loop till Cell #0 is zero
19 
20 The result of this is:
21 Cell No :   0   1   2   3   4   5   6
22 Contents:   0   0  72 104  88  32   8
23 Pointer :   ^
24 
25 >>.                     Cell #2 has value 72 which is 'H'
26 >---.                   Subtract 3 from Cell #3 to get 101 which is 'e'
27 +++++ ++..+++.          Likewise for 'llo' from Cell #3
28 >>.                     Cell #5 is 32 for the space
29 <-.                     Subtract 1 from Cell #4 for 87 to give a 'W'
30 <.                      Cell #3 was set to 'o' from the end of 'Hello'
31 +++.----- -.----- ---.  Cell #3 for 'rl' and 'd'
32 >>+.                    Add 1 to Cell #5 gives us an exclamation point
33 >++.                    And finally a newline from Cell #6
This can be represented in one line as follows.
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Piet

piet.jpg
As you see it, It is programming language, that programmer need to color a grid instead of coding words. Pointer used to move around the bitmap image and execute command relevant to each color code. There are twenty colors used to represent command and white color does not represent any operation. when the pointer tries to enter a black region, the rules of choosing the next block are changed instead. Here below the sample program to print "Piet".
Piet_Program.gif

Malbolge

One last programming language! This is known as "Programming from hell". The idea of this language is that programming should be hard. Therefore there is no point of discussing language syntax in this blog. Interesting fact of this language is that, even the inventor of this language was not even write a program by him self. However, Here an example program of hello world in Malbolge language.
 (=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc

Conclusion

I am not going to discuss all the programming languages here, since there are lot of it. I have list down below multiple programming languages that I have found for further reading. Interesting fact about most of these languages was these are Turing complete. Which mean, you can implement any computer program that other programming languages can do. Even though these programming languages are seems useless, it open our mind to look things we seen to see differently.
Hope you enjoy reading this article. If you have any comment, this is my tweet account. Follow me for more interesting stories. Feel free to comment down your thoughts. See you in another article. Cheers :)

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. This was not just great in fact this was really perfect your talent in writing was great.
    Data Science Course in Bangalore

    ReplyDelete
  3. Superb Information, I really appreciated with it, This is fine to read and valuable pro potential, I really bookmark it, pro broaden read. Appreciation pro sharing. I like it.
    Data Science Training in Bangalore

    ReplyDelete
  4. Truly great blog found to be very impressive to come across such an awesome content along with a unique content. Lots of appreciation to the blogger who took an initiative to write this particular blog. Thanks for sharing and keep posting such an informative content.

    360DigiTMG Cyber Security Course

    ReplyDelete
  5. Fantastic blog extremely good well enjoyed with the incredible informative content which surely activates the learners to gain the enough knowledge. Which in turn makes the readers to explore themselves and involve deeply in to the subject. Wish you to dispatch the similar content successively in future as well.

    360DigiTMG Digital Marketing Course

    ReplyDelete

  6. Top quality article with very informative information and found very knowledgeable thanks for sharing waiting for next blog.
    Data Analytics Course Online

    ReplyDelete
  7. Really wonderful blog completely enjoyed reading and learning to gain the vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such a beautiful content and keep posting the contents in upcoming days.

    Data Science certification in Bhilai

    ReplyDelete
  8. Really wonderful blog completely enjoyed reading and learning to gain the vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such a beautiful content and keep posting the contents in upcoming days.

    Data Science certification in Bhilai

    ReplyDelete
  9. I enjoyed the coursework, the presentations, the classmates and the teachers. And because my company reimbursed 100% of the tuition, the only cost I had to pay on my own was for books and supplies. Otherwise, I received a free master's degree. All I had to invest was my time.

    Data Analytics Courses in Bangalore

    ReplyDelete
  10. I really enjoy reading all of your blogs. I just wanted to let you know that you have people like me who appreciate your work. Definitely a great article. Congratulations! The information you have provided is very helpful.
    Data Science Training in Pune

    ReplyDelete
  11. It's good to visit your blog again, it's been months for me. Well, this article that I have been waiting for so long. I will need this post to complete my college homework, and it has the exact same topic with your article. Thanks, have a good game.
    It's good to visit your blog again, it's been months for me. Well, this article that I have been waiting for so long. I will need this post to complete my college homework, and it has the exact same topic with your article. Thanks, have a good game.

    ReplyDelete
  12. He's really nice and mean. it's a really cool blog. The link is a very useful thing. You have really helped a lot of people who visit the blog and give them useful information.

    Digital Marketing Course in Bangalore

    ReplyDelete
  13. I enjoyed the coursework, the presentations, the classmates and the teachers. And because my company reimbursed 100% of the tuition, the only cost I had to pay on my own was for books and supplies. Otherwise, I received a free master's degree. All I had to invest was my time.
    Best Data Science Courses in Bangalore

    ReplyDelete
  14. AI Patasala aims at providing the most effective Python Training in Hyderabad. Our school has taught a lot of individuals and assisted them in locating good jobs.
    Python Course in Hyderabad with Placements

    ReplyDelete
  15. What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.

    Data Science Training in Bangalore

    ReplyDelete

Post a Comment

Popular posts from this blog

Database Internel Architecture: SQLite

Introduction A database is an essential part of building a software system which used to store and read data efficiently. Here, We are going to discuss some architectural details of database implementation by using an early version of SQLite. SQLite is a small database application which used in millions of software and devices. SQLite invented by D.Richard Hipp in August 2000. SQLite is a high performance, lightweight relational database. If you are willing to learn internal of a database in coding level, then SQLite is the best open source database available out there with highly readable source code with lots of documentation. Reading later versions of SQLite become a little harder since it contains lots of new features. In order to understand the basic implementation of database internals, You should have good knowledge about data structures, some knowledge about Theory of Computing and how an operating system works. Here we are looking into the SQLite 2.5.0 version. Here

Basic Concepts of the Kubernetes

Handling large software which has multiple services is a tedious, time-consuming task for DevOps engineer. Microservices comes into the rescue DevOps engineers from all these complicated deployment processes. Simply, each microservice in the system has it own responsibility to handle one specific task. The container can be used to deploy each of these micro-tasks as a unit of service. If you are not that familiar with Containers, read this article to get to know about Docker, Which is the most popular and widely used container technology to deploy microservices. As I described early, we can use single container to deploy a single service and container contain all required configurations and dependencies. Single service always faces a common problem of a single point of failure. In order to avoid single point failure, we need to set up another service such that if one service is getting down, next available service takes that load and continue to provide the service. Another requi