Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,892 members, 7,802,874 topics. Date: Saturday, 20 April 2024 at 12:26 AM

Hurray....a Yoruba Programming Language Is Here - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Hurray....a Yoruba Programming Language Is Here (3195 Views)

[Advice] For New Programmers, what server-Side Programming Language Is The Best? / What Programming Language Is Used In Creating Viruses? / The Best Programming Language Is... (2) (3) (4)

(1) (Reply) (Go Down)

Hurray....a Yoruba Programming Language Is Here by Rocksteady1(m): 9:13pm On Dec 04, 2018
https://anoniscoding.github.io/yorlang/docs/doc.html
Mobirise
YorLang
Getting Started
To get started with yorlang, download and install the node runtime here

Then install the yorlang package with the following command:

Terminal

npm install -g yorlang

HELLO WORLD

Create a yl file e.g test.yl and write your first yorlang statement

yorlang

sọpé "báwo ni ayé";

Run yorl test.yl in your cli

OUTPUT

bawo ni aye


You can also download the vs code extension here


Variable Declaration
Variables can be declared in yorlang using

Yorlang: tí

Variables in yorlang must be initialized at the point of declaration. The keyword (tí) must be used when initializing and re-assigning a variable. Strings in yorlang must be enclosed with double quotes. Yorlang variables can hold many data types such as strings, integers, arrays and booleans

Note:
Use the # symbol for single line comments. There's no multiline comments like /** */

A semi colon must be used at the end of every statement in yorlang

Only english/yoruba alphabet can be used for variable names.

Boolean values are - true: òótọ́ false: irọ́

Operators in Yorlang include;
plus: "+" , minus: "-", multiply: "*", divide: "/" , Remainder: "%", Less_than: " < ", greater_than: ">", greater_than_or_equal: ">=", less_than_or_equal: "<=", not_equal: "!=", equal: "==", assign: "=", not_operator: "!", or: "||", and: "&&"

yorlang

tí name = "dammy";

tí age = 5 ;

sọpé name + " " + "is" + " " + age + " " + "years old" ;

OUTPUT

dammy is 5 years old


Re-assign variable example:

yorlang

tí oruko = "dammy";

tí oruko = "michelle" ;

sọpé "oruko mi ni" + " " + oruko ;

OUTPUT

oruko mi ni michelle


Conditionals
Conditionals such as if, else, else if and switch statements can also be used in yorlang

if: ṣé else: tàbí else if: tàbí ṣé

There's support for nested conditionals and loops.
yorlang

tí time = 15;

ṣé ( time < 12 ) {
tí greeting = "good morning" ;

} tàbí ṣé ( time > 12 && time < 17 ) {
tí greeting = "good day" ;

} tàbí {
tí greeting = "good evening" ;
}


sọpé greeting + " " + "world" ;

OUTPUT

good day world


The Switch Condition:

The switch expression is evaluated once.

The value of the expression is compared with the values of each case.

If there is a match, the associated block of code is executed and then it escapes the switch block without the need for a break (kúrò) expression.

The use of the break statement(kúrò) in yorlang yí(switch) condition results in an error.

The default(padàsí) block runs when there's no matched case.

Switch: yí
Case: irú
Default: padàsí
yorlang

tí age = 10 + 8 ;

yí ( age ) {
irú 12 :
sọpé "you are a kid" ;
irú 18 :
sọpé "you are a teenager" ;
irú 22 :
sọpé "you are an adult" ;
padàsí:
sọpé "you are too old" ;
}

OUTPUT

you are a teenager


Loops
Loops such as for and while are also supported in Yorlang

For: fún while: nígbàtí break: kúrò

Note:
increments such as i++ in yorlang is invalid instead use tí i = i + 1;
decrements such as i-- in yorlang is invalid instead use tí i = i - 1;

yorlang

fún ( tí i = 0 ; i < 5 ; tí i = i + 1 wink {

ṣé ( i == 3 ) {
kúrò;
}

sọpé "you can be" + " " + i ;

}

OUTPUT

you can be 0

you can be 1

you can be 2


The While( nígbàtí) Loop:

The while ( nígbàtí) loop is executed as long as the condition in parentheses is true

yorlang

tí onka = [1, 2, 3, 4, 5 ];

tí i = 0;

nígbàtí ( onka [ i ] < 3) {

sọpé "o kere si aarun";

tí i = i + 1;
}

OUTPUT

o kere si aarun

o kere si aarun


Functions
Function: iṣẹ́ return: padà

yorlang

iṣẹ́ multiplyNumbers ( a, b) {

padà a * b ;

}

tí X = multiplyNumbers( 5, 6);

sọpé X ;

OUTPUT

30


Variable Scope

The scope of a variable is the context within which it is defined. All inner functions(iṣẹ́) have access to variables in their outer functions(iṣẹ́). However, outer functions(iṣẹ́) do not have access to the variables in their inner functions(iṣẹ́). This scope spans i

1 Like 1 Share

Re: Hurray....a Yoruba Programming Language Is Here by EngrBouss(m): 9:37pm On Dec 04, 2018
Rocksteady1:
https://anoniscoding.github.io/yorlang/docs/doc.html
Mobirise
YorLang
Getting Started
To get started with yorlang, download and install the node runtime here

Then install the yorlang package with the following command:

Terminal

npm install -g yorlang

HELLO WORLD

Create a yl file e.g test.yl and write your first yorlang statement

yorlang

sọpé "báwo ni ayé";

Run yorl test.yl in your cli

OUTPUT

bawo ni aye


You can also download the vs code extension here


Variable Declaration
Variables can be declared in yorlang using

Yorlang: tí

Variables in yorlang must be initialized at the point of declaration. The keyword (tí) must be used when initializing and re-assigning a variable. Strings in yorlang must be enclosed with double quotes. Yorlang variables can hold many data types such as strings, integers, arrays and booleans

Note:
Use the # symbol for single line comments. There's no multiline comments like /** */

A semi colon must be used at the end of every statement in yorlang

Only english/yoruba alphabet can be used for variable names.

Boolean values are - true: òótọ́ false: irọ́

Operators in Yorlang include;
plus: "+" , minus: "-", multiply: "*", divide: "/" , Remainder: "%", Less_than: " < ", greater_than: ">", greater_than_or_equal: ">=", less_than_or_equal: "<=", not_equal: "!=", equal: "==", assign: "=", not_operator: "!", or: "||", and: "&&"

yorlang

tí name = "dammy";

tí age = 5 ;

sọpé name + " " + "is" + " " + age + " " + "years old" ;

OUTPUT

dammy is 5 years old


Re-assign variable example:

yorlang

tí oruko = "dammy";

tí oruko = "michelle" ;

sọpé "oruko mi ni" + " " + oruko ;

OUTPUT

oruko mi ni michelle


Conditionals
Conditionals such as if, else, else if and switch statements can also be used in yorlang

if: ṣé else: tàbí else if: tàbí ṣé

There's support for nested conditionals and loops.
yorlang

tí time = 15;

ṣé ( time < 12 ) {
tí greeting = "good morning" ;

} tàbí ṣé ( time > 12 && time < 17 ) {
tí greeting = "good day" ;

} tàbí {
tí greeting = "good evening" ;
}


sọpé greeting + " " + "world" ;

OUTPUT

good day world


The Switch Condition:

The switch expression is evaluated once.

The value of the expression is compared with the values of each case.

If there is a match, the associated block of code is executed and then it escapes the switch block without the need for a break (kúrò) expression.

The use of the break statement(kúrò) in yorlang yí(switch) condition results in an error.

The default(padàsí) block runs when there's no matched case.

Switch: yí
Case: irú
Default: padàsí
yorlang

tí age = 10 + 8 ;

yí ( age ) {
irú 12 :
sọpé "you are a kid" ;
irú 18 :
sọpé "you are a teenager" ;
irú 22 :
sọpé "you are an adult" ;
padàsí:
sọpé "you are too old" ;
}

OUTPUT

you are a teenager


Loops
Loops such as for and while are also supported in Yorlang

For: fún while: nígbàtí break: kúrò

Note:
increments such as i++ in yorlang is invalid instead use tí i = i + 1;
decrements such as i-- in yorlang is invalid instead use tí i = i - 1;

yorlang

fún ( tí i = 0 ; i < 5 ; tí i = i + 1 wink {

ṣé ( i == 3 ) {
kúrò;
}

sọpé "you can be" + " " + i ;

}

OUTPUT

you can be 0

you can be 1

you can be 2


The While( nígbàtí) Loop:

The while ( nígbàtí) loop is executed as long as the condition in parentheses is true

yorlang

tí onka = [1, 2, 3, 4, 5 ];

tí i = 0;

nígbàtí ( onka [ i ] < 3) {

sọpé "o kere si aarun";

tí i = i + 1;
}

OUTPUT

o kere si aarun

o kere si aarun


Functions
Function: iṣẹ́ return: padà

yorlang

iṣẹ́ multiplyNumbers ( a, b) {

padà a * b ;

}

tí X = multiplyNumbers( 5, 6);

sọpé X ;

OUTPUT

30


Variable Scope

The scope of a variable is the context within which it is defined. All inner functions(iṣẹ́) have access to variables in their outer functions(iṣẹ́). However, outer functions(iṣẹ́) do not have access to the variables in their inner functions(iṣẹ́). This scope spans i


Real nice work bro. Wanted to do something like this but in Igbo. Still learning the programming though. More grease to your elbow

1 Like

Re: Hurray....a Yoruba Programming Language Is Here by Oluwaseunsodiq(m): 9:55pm On Dec 04, 2018
Looks like the Yoruba translation of JavaScript.
Re: Hurray....a Yoruba Programming Language Is Here by davinchecodes(m): 10:12pm On Dec 04, 2018
This Is Javascript. The Translated Version
Re: Hurray....a Yoruba Programming Language Is Here by marryplo: 10:19pm On Dec 04, 2018
You crazy bastard, am so f***king proud of you.
Re: Hurray....a Yoruba Programming Language Is Here by megasamuel(m): 11:40pm On Dec 04, 2018
Really cool work here
Re: Hurray....a Yoruba Programming Language Is Here by Ayemileto(m): 12:14am On Dec 05, 2018
All hail the general!



E ku ise naa.
Re: Hurray....a Yoruba Programming Language Is Here by ensodev(m): 9:46am On Dec 05, 2018
What a joke...and some blinds says nigerian programmers lack inventions.....1million twallleeee for you bro.
Re: Hurray....a Yoruba Programming Language Is Here by BitsMaster: 11:41am On Dec 05, 2018
Wow! This is amazing. This is Python in Yoruba. Unlimited Gbosas for the boss.
Re: Hurray....a Yoruba Programming Language Is Here by javaRookie: 12:46pm On Dec 05, 2018
Nice one. Pls who have downloaded and used it.
OP i hope you will continue development and updating it.
Since i aint yoruba lemme keep watching.
More codes to your lappy.
Re: Hurray....a Yoruba Programming Language Is Here by javaRookie: 12:49pm On Dec 05, 2018
Also there should be some library porting to yorlang. Is the lang a web dev or scripting or general purpose language?
Re: Hurray....a Yoruba Programming Language Is Here by soligboemmanuel: 3:30pm On Dec 05, 2018
VERY NICE ONE
Re: Hurray....a Yoruba Programming Language Is Here by Bonjelomo: 6:12am On Dec 06, 2018
gbamst!
Re: Hurray....a Yoruba Programming Language Is Here by Mr7gWIRELESS: 10:55am On Dec 06, 2018
Wow am proud to be a yoruba. This aslo enable the igbo and hausa understand yoruba language
Re: Hurray....a Yoruba Programming Language Is Here by Abdulnur(m): 3:57pm On Dec 06, 2018
gr8 work Buddy.
looks like js, translated into Yoruba.
Re: Hurray....a Yoruba Programming Language Is Here by Hibrahym: 6:21pm On Dec 06, 2018
Crazy fellow! JavaScript trick to confuse amateurs.
Shior!
To slap you dey worry me.

3 Likes

Re: Hurray....a Yoruba Programming Language Is Here by ensodev(m): 9:52pm On Dec 06, 2018
Hibrahym:
Crazy fellow! JavaScript trick to confuse amateurs.
Shior!

You think you;re better than the Chinese huh?
To slap you dey worry me.


Crazy fellow....who is now crazy imagin how people open their mouth to just abuse any how

Crazy because he use is skills to change javascript keywords to lovely yoruba works and ganished it for others to use.
Re: Hurray....a Yoruba Programming Language Is Here by ensodev(m): 9:53pm On Dec 06, 2018
Hibrahym:
Crazy fellow! JavaScript trick to confuse amateurs.
Shior!

You think you;re better than the Chinese huh?
To slap you dey worry me.


Bros normal thing...you know...that mean some might understand his trick and appreciate his creativities yet did not abuse him like you.

Let x = ''respect to the owner of this trend";
Let tesita = console.log;
tesita('x');

His is Far better than this...

have change alot on my javascript to train my boy and my nephew. Its just lovely changing javascript to keyworks to words they can understand better.
am able to think along becasue you did it and i like it and i appreciate you.

Whatever you do with programming language no matter how small...even if naa HELLO WORLD , you deserve my respect and others respect.

Dont let anybody bring you down abeg...some people are just worthless and they always want to have people be like them.
Re: Hurray....a Yoruba Programming Language Is Here by ensodev(m): 10:03pm On Dec 06, 2018
Hibrahym:
Crazy fellow! JavaScript trick to confuse amateurs.
Shior!

You think you;re better than the Chinese huh?
To slap you dey worry me.



is this ops claiming being better than anyone. Am really disappointed in you.

We dont need people like you here. No matter how much you think you. If this is how you can contribute and bring people down easily then you are worthless to this forum.
Re: Hurray....a Yoruba Programming Language Is Here by abula112(m): 11:18pm On Dec 06, 2018
Nice work bro, but wat about inbuilt functions, oop, and functions declaration...
Re: Hurray....a Yoruba Programming Language Is Here by Hibrahym: 8:29am On Dec 07, 2018
ensodev:



is this ops claiming being better than anyone. Am really disappointed in you.

We dont need people like you here. No matter how much you think you. If this is how you can contribute and bring people down easily then you are worthless to this forum.
Facts don't care about your feelings.

1. Fact, and definitely truth: Glorified JS
2. Your feeling: Let us cheer this new Language

We dont need people like you here. No matter how much you think you. If this is how you can contribute and bring people down easily then you are worthless to this forum
Permission to add me to the list of known n/programming heretics then.
Re: Hurray....a Yoruba Programming Language Is Here by Hibrahym: 8:36am On Dec 07, 2018
ensodev:


Crazy fellow....who is now crazy imagin how people open their mouth to just abuse any how

Crazy because he use is skills to change javascript keywords to lovely yoruba works and ganished it for others to use.

Crazy also mean: extremely enthusiastic.
Ogbeni calm down

Crazy because he use is skills to change javascript keywords to lovely yoruba works and ganished it for others to use.
Then call it another Programming Language in order to deceive the unsuspecting huh?
I have issues with the presentation "a Yoruba Programming Language Is Here" NOT the content (yet, we can discuss implications later)
Re: Hurray....a Yoruba Programming Language Is Here by sparkle6(m): 7:53pm On Dec 12, 2018
Nice
Re: Hurray....a Yoruba Programming Language Is Here by GoodMuyis(m): 12:24pm On Dec 13, 2018
Good one, But the Docs use jẹ́kí instead of ti

jeki owner = "seun";
jeki mod = "Lalasticlala";
se ( ka(mod) > ka(owner) ){

sope owner + "Tell " + mod + " to push this to Front Page";

}

1 Like 1 Share

Re: Hurray....a Yoruba Programming Language Is Here by GoodMuyis(m): 12:38pm On Dec 13, 2018
javaRookie:
Also there should be some library porting to yorlang. Is the lang a web dev or scripting or general purpose language?

YorLang will be good for an educational purpose instead and algorithm of using BASIC. But fully get this working, YorLang will need a lot of Helper Function forked into it.
Re: Hurray....a Yoruba Programming Language Is Here by YorubaEmir: 4:26pm On Dec 16, 2018
Nice one bro. Let's learn how to appreciate our programmers. What we say goes a long way in shaping us.
Re: Hurray....a Yoruba Programming Language Is Here by Nobody: 8:00am On Dec 17, 2018
ensodev:


Crazy fellow....who is now crazy imagin how people open their mouth to just abuse any how

Crazy because he use is skills to change javascript keywords to lovely yoruba works and ganished it for others to use.


Chill dude, it's called a sense of humor. He's been playful.
Re: Hurray....a Yoruba Programming Language Is Here by Nobody: 8:02am On Dec 17, 2018
GoodMuyis:
Good one, But the Docs use jẹ́kí instead of ti

jeki owner = "seun";
jeki mod = "Lalasticlala";
se ( ka(mod) > ka(owner) ){

sope owner + "Tell " + mod + " to push this to Front Page";

}

Lolz.
Re: Hurray....a Yoruba Programming Language Is Here by micodon(m): 11:44am On Dec 17, 2018
having examined the source code thoroughly, i say this is not a programming language. What you and your buddies have written is a transpiler. Good work, though
Re: Hurray....a Yoruba Programming Language Is Here by OpenYourEyes1: 4:17pm On Dec 17, 2018
This needs to start in nursery school.
Kids need to be taught all the subjects in their languages. This will greatly improve science and technology.
For some weird reason the elites and the political class have refused to get the schools teach people in their own native languages Or adopt a unified local language as Official Language. They'd rather teach french or arabic. This is probably deliberate or chronic inferiority complex.
Re: Hurray....a Yoruba Programming Language Is Here by michaelwilli(m): 5:33am On Dec 20, 2018
micodon:
having examined the source code thoroughly, i say this is not a programming language. What you and your buddies have written is a transpiler. Good work, though
It's still a language, except you don't consider typescript a programming language
Re: Hurray....a Yoruba Programming Language Is Here by nappy760(m): 9:03am On Jun 22, 2019
Just seen it on Channels TV

(1) (Reply)

Data Science Or Data Engineering / JCA 1.0 Connector & Threads / Drupal Vs Codeigniter Which To Use?

(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. 45
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.