Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,755 members, 7,824,167 topics. Date: Saturday, 11 May 2024 at 02:00 AM

Review My Programming Language - SIMPLE PROGRAMMING Language - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Review My Programming Language - SIMPLE PROGRAMMING Language (1323 Views)

I'm About To Start My Programming Learning Journey / Simple Programming Codes / Simple Programming Assignment. (2) (3) (4)

(1) (Reply) (Go Down)

Review My Programming Language - SIMPLE PROGRAMMING Language by blenyo11(m): 4:05am On Mar 12, 2018

-------- ---------- ---- ---- ------- ------ ------------------
--------------- ------ ------- ------- ------------- ------ ------------------
----- ----- ------ -------- -------- ----------------- ------ ------------------
----- ---- ------ ---------- ---------- -------- ------- ------ ------
----- ------ ----------- ------------ ------ ------- ------ ------
----- ------ ------------------------ -------- ------- ------ ------
----- ------ ------ ------ ---------------- ------ ------
----- ------ ------ ------ ------------- ------ ------------------
----- ------ ------ ------ ------ ------ ------------------
----- ------ ------ ------ ------ ------ ------------------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
------ ------ ------ ------ ------ ------ -------------------- ------------------
----------------- ------ ------ ------ ------ -------------------- ------------------
--------- ---------- ------ ------ ------ -------------------- ------------------


I have been working on this since July, 2017 to see how things works under the hook.
Now that I have a the basics of every programming language, i feel like sharing and getting the input of the gurus in the house
Who knows - this may be one of the first production ready Nigerian Programming Language

You can download the interpreter https://drive.google.com/file/d/1WWv2DD7Dwb4Rj4GHDhgIGG4bLsSdg5gb/view?usp=sharing

The source code is written in golang. You can contribute on github
https://github.com/ademuanthony/simple

EXAMPLES

printLn("Please enter the principal" ) ;

var p = parseInt(readLn());

printLn("Please enter the interest rate" );
var r = parseInt(readLn());

printLn("Please enter the time" );
var t = parseInt(readLn());

var simepleInterest = fn(p, t, r) {
return (p*t*r)/100
}

var i = simepleInterest(p, t, r);

print("The interest is ", i);

printLn("Thanks" ) ;


var factorial = fn(n){
if(n == 1){
n
}else{
n * factorial(n-1)
}
}

printLn("The factorial of", 20, "is", factorial(20));


var reduce = fn(arr, initial, f){
var iter = fn(arr, result){
if (len(arr) == 0) {
result
} else {
iter(rest(arr), f(result, first(arr)));
}
};
iter(arr, initial);
};

var sum = fn(arr){
reduce(arr, 0, fn(initial, el) { initial + el });
};

println(sum([1, 2, 3, 4, 5]));
Re: Review My Programming Language - SIMPLE PROGRAMMING Language by daewoorazer(m): 4:46am On Mar 12, 2018
C#

Keep it up

1 Like

Re: Review My Programming Language - SIMPLE PROGRAMMING Language by Dumte(m): 10:48am On Mar 12, 2018
I WANT TO UNDERSTAND THE BASICS THINGS ON PROGRAMING AND SOME USEFUL TERMINOLOGIES
Re: Review My Programming Language - SIMPLE PROGRAMMING Language by ClintonNzedimma(m): 11:00am On Mar 12, 2018
the name sha.... you should name it something like bole, okra, or after a Nigerian food

1 Like

Re: Review My Programming Language - SIMPLE PROGRAMMING Language by zamie(m): 8:01am On Mar 21, 2018
blenyo11:

-------- ---------- ---- ---- ------- ------ ------------------
--------------- ------ ------- ------- ------------- ------ ------------------
----- ----- ------ -------- -------- ----------------- ------ ------------------
----- ---- ------ ---------- ---------- -------- ------- ------ ------
----- ------ ----------- ------------ ------ ------- ------ ------
----- ------ ------------------------ -------- ------- ------ ------
----- ------ ------ ------ ---------------- ------ ------
----- ------ ------ ------ ------------- ------ ------------------
----- ------ ------ ------ ------ ------ ------------------
----- ------ ------ ------ ------ ------ ------------------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
----- ------ ------ ------ ------ ------ ------
------ ------ ------ ------ ------ ------ -------------------- ------------------
----------------- ------ ------ ------ ------ -------------------- ------------------
--------- ---------- ------ ------ ------ -------------------- ------------------


I have been working on this since July, 2017 to see how things works under the hook.
Now that I have a the basics of every programming language, i feel like sharing and getting the input of the gurus in the house
Who knows - this may be one of the first production ready Nigerian Programming Language

You can download the interpreter https://drive.google.com/file/d/1WWv2DD7Dwb4Rj4GHDhgIGG4bLsSdg5gb/view?usp=sharing

The source code is written in golang. You can contribute on github
https://github.com/ademuanthony/simple

EXAMPLES

printLn("Please enter the principal" ) ;

var p = parseInt(readLn());

printLn("Please enter the interest rate" );
var r = parseInt(readLn());

printLn("Please enter the time" );
var t = parseInt(readLn());

var simepleInterest = fn(p, t, r) {
return (p*t*r)/100
}

var i = simepleInterest(p, t, r);

print("The interest is ", i);

printLn("Thanks" ) ;


var factorial = fn(n){
if(n == 1){
n
}else{
n * factorial(n-1)
}
}

printLn("The factorial of", 20, "is", factorial(20));


var reduce = fn(arr, initial, f){
var iter = fn(arr, result){
if (len(arr) == 0) {
result
} else {
iter(rest(arr), f(result, first(arr)));
}
};
iter(arr, initial);
};

var sum = fn(arr){
reduce(arr, 0, fn(initial, el) { initial + el });
};

println(sum([1, 2, 3, 4, 5]));

If you want create a Nigerian programming language why don't you use a Nigerian language

For example :

Instead of
print ("How are you"wink

It can be
jade ("Bawo ni"wink

1 Like

Re: Review My Programming Language - SIMPLE PROGRAMMING Language by TisteAndii: 10:45am On Mar 21, 2018
Great job.

Is it printLn() or println()?
As everything seems to be of 'var' type, why not do away with type declaration entirely?
What's your intent with the language? Just for fun and bragging rights, I assume? Because there's no real incentive for people to use it, over C or Python.

1 Like

Re: Review My Programming Language - SIMPLE PROGRAMMING Language by Bahat: 6:08pm On Mar 21, 2018
You did well for yourself bro, but why are you guys giving us syntax that look odd like this , just like old time Fortran. I strongly believe you started programming with java wink

you should try to simplify things than using function calls like printLn(), what's the use of "capital L"

you should also give your language another name,there is a language that goes by that name, and has been announced right here on NairaLand.
Re: Review My Programming Language - SIMPLE PROGRAMMING Language by Bahat: 6:17pm On Mar 21, 2018
TisteAndii:
Great job.

Is it printLn() or println()?
As everything seems to be of 'var' type, why not do away with type declaration entirely?
What's your intent with the language? Just for fun and bragging rights, I assume? Because there's no real incentive for people to use it, over C or Python.

Strongly typed languages are the best there is, non typed will easily confuse you(for me i dislike them).
Maybe he did it for the fun of it, or to learn how everything works underneath, if he really write all this things he announced, and not CnP, without knowledge of technical background.

Because that's what most people do (i don't mean to be rude), most of them don't have the zeal to learn.

(1) (Reply)

Google’s ‘chat’ For Android? An Rcs-based Alternative To Imessage / Top 10 Best Linux OS For Penetration Testing, Security Or Hacking / Help

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.