Saturday, February 25, 2017

World’s five most difficult programming language to learn

World’s five most difficult programming language to learn - esolang programming

World’s five most difficult programming language to learn

So, you have started programming with C, C++ or Java. And you think programming is easy. Then you are in the right place to know about the most difficult programming language to learn. As a newbie python, C/C++ or Java is suggested. But for advance there are lots of programming languages like Pascal, Fortran, COBOL etc. And if you have read about Pascal and Fortran then you know how much headache they created to the programmers.
But some programming languages are so puzzling that it takes more than pulling your hair off. Such programming languages that take difficulty to the God level are known as Esoteric Programming languages

 
From wikipedia:
An esoteric programming language (sometimes shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language (particularly functional programming or procedural programming languages), or as a joke.
And today you will find the boundaries of programming languages. They all are beyond your imaginations.
Lets start with the first most difficult programming language:-

BrainFuck

Yes. It’s name says everythin about the language. Brainfuck was invented by Urban Müller in 1993, in an attempt to make a language for which he could write the smallest possible compiler for the Amiga OS, version 2.0.
The most unexpected part is that it has only 8 commands. Can you believe this? And brainfuck operates on an array of memory cells. And this is referred to as the tape. The commands are as follows:
> < + - . , [ ]



Character
Meaning
>
increment the data pointer (to point to the next cell to the right).
<
decrement the data pointer (to point to the next cell to the left).
+
increment (increase by one) the byte at the data pointer.
-
decrement (decrease by one) the byte at the data pointer.
.
output the byte at the data pointer.
,
accept one byte of input, storing its value in the byte at the data pointer.
[
if the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching ] command.
]
if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching [ command.
Source: wikipedia
Hello world can be written as follows:

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.
--------.>>+.>++. 

COW

The COW programming language is an esoteric programming language created by Sean Heber in 2003. And you know cow is an animal. In India cow is a sacred animal. And why I am telling you this because you see instructions like a cow is telling you somthing. Yes, COW has twelve isntructions. Most instructions are moos, only the capitilzation varies: mOo, moO, mOO, Moo and so on. MMM, OOO, oom and OOM are the exceptions. All other character combinations are ignored and treated as comments.

Commands


Instruction Description
moo This command is connected to the MOO command. When encountered during normal execution, it searches the program code in reverse looking for a matching MOO command and begins executing again starting from the found MOO command. When searching, it skips the instruction that is immediately before it (see MOO).
mOo Moves current memory position back one block.
moO Moves current memory position forward one block.
mOO Execute value in current memory block as if it were an instruction. The command executed is based on the instruction code value (for example, if the current memory block contains a 2, then the moO command is executed). An invalid command exits the running program. Value 3 is invalid as it would cause an infinite loop.
Moo If current memory block has a 0 in it, read a single ASCII character from STDIN and store it in the current memory block. If the current memory block is not 0, then print the ASCII character that corresponds to the value in the current memory block to STDOUT.
MOo Decrement current memory block value by 1.
MoO Increment current memory block value by 1.
MOO If current memory block value is 0, skip next command and resume execution after the next matching moo command. If current memory block value is not 0, then continue with next command. Note that the fact that it skips the command immediately following it has interesting ramifications for where the matching moo command really is. For example, the following will match the second and not the first moo: OOO MOO moo moo
OOO Set current memory block value to 0.
MMM If no current value in register, copy current memory block value. If there is a value in the register, then paste that value into the current memory block and clear the register.
OOM Print value of current memory block to STDOUT as an integer.
oom Read an integer from STDIN and put it into the current memory block.
Source: wikipedia
Here is the code required to generate the Fibonacci sequence:

 MoO moO MoO mOo MOO OOM MMM moO moO
 MMM mOo mOo moO MMM mOo MMM moO moO
 MOO MOo mOo MoO moO moo mOo mOo moo
One thing I want to say that just use these language once. They are amazing. Right. No. They’ll make you cry.

INTERCAL

The earliest and still the cannonical example of an esolang was INTERCAL. This programming language was designed in 1972 by Don Woods and James M. Lyon. The Compiler Language With No Pronounceable Acronym, abbreviated INTERCAL.
According to the original manual by the authors,

The full name of the compiler is "Compiler Language With No Pronounceable Acronym," which is, for obvious reasons, abbreviated "INTERCAL."
It uses statements such as READ OUT, IGNORE, FORGET and modifiers such as PLEASE.

Hello, world

The traditional "Hello, world!" program demonstrates how different INTERCAL is from standard programming languages. In C, it could read as follows:

#include <stdio.h>
void main() {
    printf("Hello, world!\n");
}
The equivalent program in C-INTERCAL is longer and harder to read:

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

Whitespace

Whitespace! The urge is a limit. You only find whitespaces in this language. Where is the rest code? This is another esolang released on 1 April 2003, and most of the people thought that it was a april fool’s joke, but it wasn’t.
Whitespace uses only whitespace characters (space, tab, and return), ignoring all other characters. Whitespace was developed by Edwin Brady and Chris Morris at the University of Durham.
Code is written as an Instruction Modification Parameter (IMP) followed by the operation.[4] The table below shows a list of all the IMPs in Whitespace.

IMP Meaning
[Space] Stack Manipulation
[Tab][Space] Arithmetic
[Tab][Tab] Heap Access
[LineFeed] Flow Control
[Tab][LineFeed] I/O
Source: Wikipedia

Chef

Chef is a stack-based language where programs look like cooking recipes. Chef was designed by David Morgan-Mar in 2002.
According to the Chef Home Page, the design principles for Chef are:
  • Program recipes should not only generate valid output, but be easy to prepare and delicious.
  • Recipes may appeal to cooks with different budgets.
  • Recipes will be metric, but may use traditional cooking measures such as cups and tablespoons.
Other esoteric programming language:-
1. Befunge
2. Binary Lambda Calculas
3. FALSE
4. GolfScript
5. JSFuck
6. LOLCODE
7. Malbolge
8. NVSPL2
9. Piet
10. Shakespeare
11. Stuck
So, you can learn these language if you want to pull your hair off.

For more interesting stuffs see here

No comments:

Post a Comment