5 not well known Programming Language that are worth exploring
Tags: programming, tutorial, motivation
Published: 2022-02-02 17:08:19

Just because you don't know them...doesn't mean they are not good Programming Languages...

I already talked about Old Programming Languages on [5 old Programming Languages you should know about](https://dev.to/blag/5-old-programming-languages-you-should-know-about-3ofe) and [5 old Programming Languages you might want to be aware of](https://dev.to/blag/5-old-programming-languages-you-might-want-to-be-aware-of-345a), so this time let's talk about Programming Languages that not that well known, but that you might find really interesting to work with...

To illustrate how those programming work, we're to use a very basic app called "Fibonacci List" which will simply output a list of requested Fibonacci numbers, for example if we ask for 5, it should return 0, 1, 1, 2, 3, 5.

Let's start our list with 

**Mercury (1995)**

![Mercury Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnk5vi83b6d6b8qa185z.png)

Mercury is a Logical/Functional Programming Language. It looks like Prolog, but feels like strict Haskell or pure OCalm.

On Linux, you can download the source from [here](http://dl.mercurylang.org/index.html) and simply do

`./CONFIGURE --> MAKE --> MAKE INSTALL`

```
:- module fibonacci.
:- interface.
:- import_module io.

:- pred main(io::di, io::uo) is det.

:- implementation.
:- import_module string, int.
:- pred fibo(int::in, int::in, int::in, string::out) is det.

fibo(Num, A, B, Fibs) :-
    (	
        if A = 0 
        then fibo(Num-1,A+B,B,Fib), 
             Fibs = int_to_string(A) ++ " " ++ 
             int_to_string(B) ++ " " ++ 
             int_to_string(A+B) ++ " " ++ Fib
        else if A > 0, Num > 1
        then fibo(Num-1,A+B,A,Fib), 
             Fibs = int_to_string(A+B) ++ " " ++ Fib
        else Fibs = ""
    ).

	
main(!IO) :-
    io.write_string("Enter a number: ",!IO),  
    io.read_line_as_string(Result, !IO),    
    (	if    
            Result = ok(String),            
            string.to_int(string.strip(String), N)            
        then        
            fibo(N,0,1,Fibs),            
            io.write_string(Fibs,!IO)            
        else        
            io.write_string("Not a number...",!IO)            
    ).	
```

In order to run this, we need to compile it first by using

```
mmc --make -E name_of_file.m
```

![Mercury Exec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fp1vds007iilyw086e9.png)
 
You can read my Mercury Introduction [here](https://blagarts.com/static/GeekyThursday/Languages/Mercury_Introduction.html#/).

**Falcon (2001)**

![Falcon Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ww684ar5cbxbvwluv92b.png)

Multiparadigm Programming Languages, supporting Procedural, Object Oriented, Prototype-based, Functional, Tabular and Message passing.

It should be already available on most Linux distributions, but if not you grab it from [here](http://www.falconpl.org/index.ftd?page_id=official_download).

It's syntax is fairly similar to many other programming languages, so it should be easy to pick up.

```
function fib(num,a,b)
    result = ""
    if a > 0 and num > 1
        result = result + (a+b) + " " +  
                 fib(num-1,a+b,a)		
    elif a == 0	
        result = "" + a + " " + b + " " +       
                 (a+b) + " " + fib(num-1,a+b,b)		
    end	
    return result	
end

print("Enter a number: ")
num = int( input() )
print(fib(num,0,1))
printl("")
```

In order to run simply type

`falcon name_of_file.fal`

![Falcon Exec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92flv7fl08kugmy7x2o1.png)

You can read my Falcon introduction [here](https://blagarts.com/static/GeekyThursday/Languages/Falcon_Introduction.html#/).
 
**Dao (2004)**

![Dao Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rwt1xt27od6l2m1mas8r.png)

Lightweight and optionally typed Programming Language. The author created out of frustration with Perl.

You can download the [source code](https://github.com/daokoder/dao) and extract it. 

Then type 

`make -f Makefile.daomake PLATFORM`

Where PLATFORM can be linux, macos, mingw and more...

Finally, run

`make install`

```
routine fib(num :int, a :int, b :int){
  var result = ""
  if (a > 0 and num > 1){
    result = result + " " + (string)(a + b) + 
             fib(num - 1, a + b, a)
  }else if (a == 0) {
    result = (string)a + " " + (string)b + " " + 
             (string)(a + b) + fib(num - 1, a + b, b)
  }
  return result
}

io.write('Enter a number: ')
invar num = io.read()
io.writeln(fib((int)num, 0, 1))
```

To run this, simply type

`dao name_of_file.dao`

![Dao Exec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk9gbj01b8wcevw5e5s4.png)
 
You can read my Dao Introduction [here](https://blagarts.com/static/GeekyThursday/Languages/Dao_Introduction.html#/).

**Factor (2003)**

![Factor Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jnkwqnr7tdj4qlla47fh.png)

A Stack-Oriented Programming Language, based on Forth and Lisp.

If you like Forth, you will love Factor.

To install, simply go to the [Factor Homepage](http://factorcode.org/) and download the binary. Then run it.

You will get a listener and that's where you application will be executed.

![Factor Listener](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4mz168iqwegnd1x4ays.png)

Type the following on the Listener.

```
USE: tools.scaffold

"fibo" scaffold-work  ! You might get an error saying 
                      ! that "fibo" doesn't exist...
                      ! ignore that -:)
```

This will create a "fibo" folder inside the "work" folder inside your Factor installation folder.

Then edit the "fibo.factor" file that was generated.

```
! Copyright (C) 2018 Blag.
! See http://factorcode.org/license.txt for BSD license.
USING: math prettyprint kernel io math.parser command-line 
       namespaces sequences ;
IN: fibo

<PRIVATE
: ask-number ( -- ) "Enter a number: " print ;
: read-number ( -- n ) readln string>number ;
: list_fibo ( x -- )
 1 0
 pick 1 + [ dup . over over + rot drop ] times 3drop ;
PRIVATE>

: fibo ( -- ) ask-number read-number list_fibo ;
: fibo-run ( -- ) fibo ;
MAIN: fibo-run
```

On the Listener type 

`fibo run`

![Factor Run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00dzuguufuerpz84dchn.png)

You can read my Factor Introduction [here](https://blagarts.com/static/GeekyThursday/Languages/Factor_Introduction.html#/).

**io (2002)**

![IO Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jgfpnvwlhyxdub34yfc.png)

Pure, dynamic, concurrent and accessible Programming Language. Inspired by Smalltalk, Self, NewtonScript, Act, Lisp and Lua.

To install it just follow the instructions on [IO's Github](https://github.com/IoLanguage/io).

```
#This method needs to go in one line...

fib := method(num,a,b,result, 
       if(a > 0 and num > 1) 
       then(result = result .. (a+b) .. " " .. 
            fib(num-1,a+b,a,result)) 
       elseif(a == 0) 
       then(result = a .. " " .. b .. " " .. 
            (a+b) .. " " .. fib(num-1,a+b,b,result)); 
            return result)
	
		
"Enter a number: " print
number := ReadLine readLine
fib(number asNumber,0,1,"") println
```

To run this simply do

`io name_of_file.io`

![IO Exec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9t6kvsyos4x4eynwkf7x.png)

You can read my IO Introduction [here](https://blagarts.com/static/GeekyThursday/Languages/io_Introduction.html#/).

Hope you try some...and see you next time -:)