Published on

A Dive In Programming Languages

Programming Languages - Moe Dayraki

Have you heard of Miranda, Haskell and C? Let's then take a deep dive into programming languages that are more complicated and/or less used than others.

Functional Languages

Haskell

With Haskell, programmers don't use classes, objects or types. The only abstraction needed is the function itself.

primes = filterPrime [2..]
  where filterPrime (p:xs) =
      p : filterPrime [x | x <- xs, x `mod` p /= 0]

The language was inspired by the Miranda Language and it carries immutable variables and no side effects functions. With these features, developers can build anything.

F Sharp

Developed by Microsoft, F sharp; C Sharp's sister; is also a functional language that is imperative and object-oriented which means that it's more approachable to programmers that are new to this level.

// define the square function
let square x = x * x

// define the sumOfSquares function
let sumOfSquares n =
   [1..n] |> List.map square |> List.sum

// try it
sumOfSquares 100

Scala

Scala is Java functional programming language alternative. It also runs on the JVM and has an extension to make it dynamic so you can finish things faster but without the type-checking feature

Ocamel

Ocamel is a popular functional language that Facebook uses.

Elixir

Elixir is a very Ruby-like syntax programming language that can build high-performance real-time web applications.

Elm

Elm is another functional language that compiles to javascript with zero runtime errors.

Systems Languages

C

The C programming language was developed in 1969 and it was used to build the Windows, Mac, and Linux operating system kernels. C was the first programming language that uses curly braces and all other curly braces languages got their inspiration from it.

#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, Moe!");
   return 0;
}

The syntax is not hard to write with and not a lot of keywords are used inside it so it's a pretty easy language to write. The issue occurs when a programmer tries to use the language effectively as it required extensive knowledge of algorithms and computer architecture.

C++

C++ was designed as a superset/extension for C with the ability to add object-oriented programming including classes and inheritance. C++ has these features but being a low-level system language, the hard part was referencing the manual memory management with pointers which is still a challenge nowadays.

This language is highly optimized and was the root of designing game engines, and compilers.

Rust

Rust came in with modern programming as a low-level language. It doesn't have a garbage collector but uses a technique called borrow checking. This will make it much easier to write memory-safe programs.

Programming Languages - Moe Dayraki

Rust ranks as the most loved language in the world.

Hidden Modern Languages

V

V is similar to the Go programming language that doesn't use a garbage collector or borrow check but still creates memory-safe applications with --autofree. Its compiler cleans everything up and does all the work.

Zig

Zig is a modern replacement for C that eliminates features like macros and metaprogramming and it comes with memory management. The great feature of using Zig is that it cross-compiles C & C++.

Carbon

Developed at Google, Carbon was designed to be a successor to C++ and it fully understands C++ code.

Hack

Hack was developed at Facebook to replace PHP which was slow at that time. They also needed a type system; which PHP didn't provide then; to scale Facebook up.

Historical Programming

Fortan

Fortuna was the first high-level programming language and was by far the most popular language for many years until C came around.

Lisp

Lisp was invented in 1958 and it created the idea of dynamic typing and higher order function recursion

Algorithmic Language

This hidden and historical language was the major influence on the development of both C and C++ languages.

Cobalt

Cobalt is the banking programming language. 40% of the banking systems still use this language with over 200 billion lines of code in production.

Pascal

Pascal took the programming world by storm because of its procedural language and very fast compile time.

Erlang

Erlang is the telecom industry's favorite programming language and it's still in use today.

Crazy Languages

Intercal

Intercal was designed to make fun of the languages of the day like algol and fortan. It has an interesting choice of keywords like please and mingle. Please doesn't do anything but it makes you a more polite programmer.

BrainF**K

This language is well known for being extremely minimal and it works by initializing an array and then giving you a pointer and eight different characters to manipulate memory in that array. By reading the syntax, your brain will ** up.

//print "Hello, World!"
++++++++++[>+++++++>++++++++++>+++>+<<<<-]
++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Malbulgia

The name of this programming language came after the eighth circle of hell in the divine comedy. To be honest, I can't even summarize or explain how it works but here's a sample of the code.

//print "Hello, World."
(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?
xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj

Chef

This language makes code look like a cooking recipe. It uses ingredients and a mixing bowl instead of keywords to write code.

//print "Hello, World"
Hello World Cake with Chocolate sauce.

This prints hello world, while being tastier than Hello World Souffle. The main
chef makes a " world!" cake, which he puts in the baking dish. When he gets the
sous chef to make the "Hello" chocolate sauce, it gets put into the baking dish
and then the whole thing is printed when he refrigerates the sauce. When
actually cooking, I'm interpreting the chocolate sauce baking dish to be
separate from the cake one and Liquify to mean either melt or blend depending on
context.

Ingredients.
33 g chocolate chips
100 g butter
54 ml double cream
2 pinches baking powder
114 g sugar
111 ml beaten eggs
119 g flour
32 g cocoa powder
0 g cake mixture

Cooking time: 25 minutes.

Pre-heat oven to 180 degrees Celsius.

Method.
Put chocolate chips into the mixing bowl.
Put butter into the mixing bowl.
Put sugar into the mixing bowl.
Put beaten eggs into the mixing bowl.
Put flour into the mixing bowl.
Put baking powder into the mixing bowl.
Put cocoa  powder into the mixing bowl.
Stir the mixing bowl for 1 minute.
Combine double cream into the mixing bowl.
Stir the mixing bowl for 4 minutes.
Liquefy the contents of the mixing bowl.
Pour contents of the mixing bowl into the baking dish.
bake the cake mixture.
Wait until baked.
Serve with chocolate sauce.

chocolate sauce.

Ingredients.
111 g sugar
108 ml hot water
108 ml heated double cream
101 g dark chocolate
72 g milk chocolate

Method.
Clean the mixing bowl.
Put sugar into the mixing bowl.
Put hot water into the mixing bowl.
Put heated double cream into the mixing bowl.
dissolve the sugar.
agitate the sugar until dissolved.
Liquefy the dark chocolate.
Put dark chocolate into the mixing bowl.
Liquefy the milk chocolate.
Put milk chocolate into the mixing bowl.
Liquefy contents of the mixing bowl.
Pour contents of the mixing bowl into the baking dish.
Refrigerate for 1 hour.

Piet

Piet is a stack-based programming language where you write code using patterns of 20 different colours on a bitmap image. It looks like abstract art but it includes a code base.

Emojicode

Developers use emojis a lot in their documents but this language takes it to another level where you can define code blocks with grapes and watermelons. Classes with rabbits and generics with shells and eggplants.

🏁 🍇
   💭 Get things up and running here...
🍉

Behind the Curtain

Assembly

Assembly is a language of which many variations correspond directly to the architecture of the CPU. We have different CPU architectures like X86 and Arm.

Assembly represents the CPU code with simple commands that manipulate values on the CPU registers.

Machine Code

Machine Code or Binary is the computers' native language. Coding at this level requires the knowledge of computer architecture and also being able to count in binary. Here's more detailed information about Binary

Transistors

Transistors are electronic hardware that takes 0 for 0v and 1 for 1v and acts on them. It's made up of silicon and assembling transistors gives us logic gates (AND, NAND, OR) to use as magic wands in computers and do all that we do nowadays.

Quantum Electrodynamics

What is Quantum Electrodynamics? This is what scientists are trying to understand to build Quantum computers at IBM and more companies.

Open Source

The whole project is an open source project under the MIT License. If you find my content useful, please follow me on Github or Twitter

Last Updated: