anoniscoding / yorlang Goto Github PK
View Code? Open in Web Editor NEWA programming language with yoruba language construct
Home Page: https://anoniscoding.github.io/yorlang/
License: MIT License
A programming language with yoruba language construct
Home Page: https://anoniscoding.github.io/yorlang/
License: MIT License
Hi Anu, nice project you have here, I'm glad you did this and I am happy for your innovative ideas.
Below are some of the things I want to suggest as regards the naming, especially the condition block name.
e.g.
ṣé
should be used for do()
while tí
should be used for if()
, tàbí tí
for elseif()
and else
for tabí
;
e.g
jẹ́kí orúkọ = "tunde";
jẹ́kí orúkọ = "sunmi";
tí ( orúkọ == "dammy" ){
sọpé "oruko okunrin ni";
} tàbí tí ( orúkọ == "sunmi" ) {
sọpé "oruko okunrin ni";
} tàbí {
sọpé "oruko okunrin ati oruko obinrin ni";
}
Thanks in advance
hell there, I was just asking if anyone was able to use this with HTML cause I tried to do it and I ended with a NodeError: The "path" argument must be of type string. Received type undefined
Is your feature request related to a problem? Please describe.
I tried to run this code:
sọpé ọjọ(
aago(),
-3
);
which is supposed to subtract 3 days from the current date, and it fails because it does not recognise -3
, but it works if 0 - 3
is used instead.
Describe the solution you'd like
Negative number literals should be recognisable.
Describe the bug
pada not working within yi block
More string helpers
Only toUpperCase and toLowerCase functions are available
Contribution
I can add more and send a PR
One of the major challenges I just faced while trying to use yorlang
is the fact that I had to change the keyboard language, every time I have to write the code, and besides, most Yoruba people these days don't even understand those signs, let along code in it. I see potential in this project, but I feel we can do away with the symbols, hopefully convincing enough.
From the docs, the assigning of variables goes thus:
ti abd = "abd"
But, ti
in Yoruba actually means if that's If I'm not mistaking and let ( which I assume you translated to ti ) should be jẹki
instead. Lmk know your thoughts. I was thinking of fixing and sending a PR but it's wise to discuss it first.
This is a cool project and would be fun to see it grow, and maybe the language might one day be rewritten with itself.
But I think error messages should be printed in Yoruba, or maybe run program with a flag that specifies which language results, warnings and error messages should be displayed in.
Describe the bug
I tried writing the following function:
ise muIseju(iseju) {
ṣé (iseju > 30) {
pada BEFOREPOINTER + muNọmbaWa(60 - iseju);
}
tàbí ṣé (iseju < 30) {
pada AFTERPOINTER + muNọmbaWa(iseju);
}
tàbí {
pada aabo;
}
}
There's already an imported
constants.yl
file with a function definition formuNọmbaWa
, and variable declarations forBEFOREPOINTER
,AFTERPOINTER
andaabo
.
To Reproduce
Steps to reproduce the behavior:
When I supply 22
as an argument, I get undefined
as its return value, but 32
as an argument returns Ku iseju Mejidinlogbon
which is fine.
If I flip the logic, and specify < before >, then 22
works and 32
does not.
If I rewrite as nested if-else statements, then it works well.
ṣé (iseju < 30) {
pada AFTERPOINTER + muNọmbaWa(iseju);
}
tàbí {
ṣé (iseju > 30) {
pada BEFOREPOINTER + muNọmbaWa(60 - iseju);
}
tàbí {
pada aabo;
}
}
Expected behavior
ṣé
and tàbí ṣé
should work.
Is your feature request related to a problem? Please describe.
The teSiBi
helper function should have its prompt as optional, rather than mandatory.
Please provide a list of steps for others to modify an add to the yorlang core.
First and foremost!. I have been looking forward to this kinda project and I'm super excited someone has started it. Cooooooooooool. Now, I feel and want to contribute but idk what's needed to be added and so. Do add a TODO list, that'll help guide contributors.
Is your feature request related to a problem? Please describe.
I can't find a way to generate random numbers
Describe the solution you'd like
A helper function that takes in 2 parameters representing the lower and upper limit of a generated random number.
I'm not sure what such a function would be called, but google translate suggests
yipo
. Are there better alternatives?
Adding TravisCI to the project makes it easier for contributions to the project repo. All test are run immediately there is a PR to this repo.
Describe the bug
When a loop's counter variable is passed to a function, the first value passed becomes the value for all subsequent passes.
To Reproduce
Run the following code:
ise output (i) {
sọpé i;
}
fún (jeki i = 1; i <= 3; jeki i = i + 1;) {
output(i);
}
prints out
1
1
1
Expected behavior
The actual values get passed to the function, so it prints out
1
2
3
Te sibi can only read string. it should be able to read ints and floats too
Hi Anu, nice project you have here, I'm glad you did this and I am happy for your innovative ideas.
Below are some of the things I want to suggest as regards the naming, especially the condition block name.
e.g.
ṣé
should be used for do()
while tí
should be used for if()
, tàbí tí
for elseif()
and else
for tabí
;
e.g
jẹ́kí orúkọ = "tunde";
jẹ́kí orúkọ = "sunmi";
tí ( orúkọ == "dammy" ){
sọpé "oruko okunrin ni";
} tàbí tí ( orúkọ == "sunmi" ) {
sọpé "oruko okunrin ni";
} tàbí {
sọpé "oruko okunrin ati oruko obinrin ni";
}
Thanks in advance
Since jẹ́kí
is use for creating variables it makes no sense using it to increment for example fún ( jẹ́kí i = 0 ; i < 5 ; jẹ́kí i = i + 1 ;) {}
, jẹ́kí i = i + 1
should be i = i + 1
since variable i
as been created, no point creating it again and I don’t see any reason why we should use a keyword to assign values to variables
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.