Swahili Lang
Swahili is a programming language that is designed to be written entirely in the Swahili language. This is to aid in helping native Swahili speakers (primarily in East Africa) learn to code without the language barrier - in more ways than one!
Team
Design
Its syntax is a lot like JavaScript (which is what my teammate and I are best at), and is even built in JavaScript (on Node). We built everything (lexer, parser and interpreter) from scratch and are continuing to add more functionality to the language.
Source Code
See the project repl or GitHub
Examples
We've written a few examples to illustrate the syntax, and tried our best to add comments in both Swahili and English. Here's links to a few:
// Tumia "Dunia" mtumizi asipoandika chochote
// (Use "Dunia" if the user doesn't input anything)
wacha jina = soma("Jina lako? ") || "Dunia"
// Onyesha ujumbe kwenye skrini
// (Write the message to the screen)
andika("Jambo, " + jina + "!")
shughuli fibonacci(nambari){
kama (nambari <= 1) {
rudisha 1;
}
rudisha fibonacci(nambari - 1) + fibonacci(nambari - 2);
}
// Mtumizi ataandika nambari ya vifaa anavyotaka kuonyeshwa
// The user enters the number of Fibonacci numbers to output
wacha nambari = somaNambari("Nambari? ")
kwa i = 0 mpaka nambari {
andika(fibonacci(i))
}
shughuli chupa(nambari, ukutani) {
wacha mwisho = kama (niTupu(ukutani)) { " ukutani" } sivyo { "" }
kama (nambari > 1) {
andika("Vyupa " + Jina(nambari) + " vya pombe" + mwisho)
} au (nambari == 1) {
andika("Chupa " + Jina(nambari) + " cha pombe" + mwisho)
} sivyo {
andika("Pombe imemalizika :(")
}
}
shughuli ondoa() {
andika("Ondoa kimoja, pitisha karibu")
}
shughuli aya(nambari) {
kama (nambari == 0) { rudisha }
chupa(nambari)
chupa(nambari, kweli)
ondoa()
chupa(nambari - 1)
andika("")
aya(nambari - 1)
}
aya(99)
You can try out Swahili here
Halo, nazungumza Kiswahili mucho nzuri. Sina anwani ya IP kwa hivyo usiangalie tafadhali. Ninafanya Kiswahili kizuri. Itatumia. Asante.
Ninapenda lugha yako sana! Sisi pia tumefanya lugha kama hii, jina lako ni Lassi.
Labda tunaweza kufanya kazi pamoja? :)
@julienmalard thanks! I've looked at Lassi and would love to speak more. Please connect with me on LinkedIn here and let's chat
@kshncodes Thank you! I don't have LinkedIn, but would email do? [email protected]
Looking forward to speaking more,
Julien
As a Swahili speaker, this could be life-changing
It works.
Could I ask you to include a link to the source code for the language in the post description?
Thank you.
@TheDrone7 sure thing! Updated.