Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,377 members, 7,815,804 topics. Date: Thursday, 02 May 2024 at 06:40 PM

A Compiler that enables Nigerians to Code In our local languages - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / A Compiler that enables Nigerians to Code In our local languages (3152 Views)

How To Code Your Own Personal Assistant In Python / Nigerians To Represent Africa At The Hacker Olympics / Recommend A Compiler For C (2) (3) (4)

(1) (2) (Reply) (Go Down)

A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 12:02pm On Sep 22, 2008
Hi, is there anybody that can reason along with me on this topic?



The dream is to have a functioning compiler that will interprete code written in any major languages in nigeria.



I believe many people will agree with me that the whites are not that good, and that they are just buying nigerians brain.


Why didn't we sit and think about this?


It's possible.
Re: A Compiler that enables Nigerians to Code In our local languages by javarules(m): 7:51pm On Sep 22, 2008
I am with you all the way

But you will av to prepare the docs and how you want us to go about it

I am sure we will get other guys to join us too.
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 9:13am On Sep 23, 2008
Hi, I feel you.


I have been thinking about this for long. And since then, I have started my research on how compiler works.


Glory be to God, I have gotten something to lay hand on.


, A journey that is difficult to complete is the one that is not yet started.



Let's Go!!!!!!!!!!
Re: A Compiler that enables Nigerians to Code In our local languages by lordbenax(m): 6:36pm On Sep 23, 2008
I am with you!!!!!!!!!!!!!!!!!!!
Re: A Compiler that enables Nigerians to Code In our local languages by louis400(m): 10:39pm On Sep 23, 2008
Hmm, men its not gonna be easy but with division of labour, it might look so cos i have been in a lesson for this kind of thing man, i think I left them for the future to do simpler things now, you will need start from assembly codes and you will need money too to do this.
Am not trying to discourage you but you have to be prepared.
Re: A Compiler that enables Nigerians to Code In our local languages by buyolala(m): 12:42am On Sep 24, 2008
You guys are great and just wonderful

You have thought it, imagined it,

so, set the ball rolling. But, we shall get there
Re: A Compiler that enables Nigerians to Code In our local languages by logica(m): 9:16am On Sep 24, 2008
if i'm not mistaken, ENGLISH is the most widely spoken language in the country.

1 Like

Re: A Compiler that enables Nigerians to Code In our local languages by rancetech(m): 3:12pm On Sep 24, 2008
What exactly do you need that for?

You are supposed to be solving problems with your programming skills and not the other way round.

You guys are just trying to create problems. Stop it please.

2 Likes

Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 3:23pm On Sep 24, 2008
Hi, louis400.

Talk of money,  Money is nothing but dream killer. That's why i didn't put money first in everything i do.

Take for example, If a graduate should think of the total cost of university education, He won't have gone for JAMB. because it costs thousands if not million to complete a uni edu.


But starting with hope, I'm sure we will make it!


As per the division, It's surely going to be division of labour. Because from my research so far, i understand that Compiler compiles in stages.
Next post will explain that, I want to know the interest and support of you guys.


rancetech,

I got your point.

but the fact is that "I learn new things by solving new problems---Bigstar"

Programmers are meant to solve problems. I you didn't buy my idea, please come up with something interesting.
Thanks
Re: A Compiler that enables Nigerians to Code In our local languages by logica(m): 10:04am On Sep 25, 2008
Big Star, if you are looking for something to cut your teeth with, you can team up with javarules on this: https://www.nairaland.com/nigeria/topic-174241.0.html
Re: A Compiler that enables Nigerians to Code In our local languages by louis400(m): 1:37am On Sep 26, 2008
BigStar No problems on this, Nothing bad in trying, I know we can do it if we want to but the worst enemy is the mental laziness, lol if I think of how am going to think I gets weak, lol its not easy tho but this is what we live for, am with you,
Re: A Compiler that enables Nigerians to Code In our local languages by louis400(m): 1:40am On Sep 26, 2008
Besides, I think this will motivate some Nigerians to learn their local dialects, I will think something on this, on how to compile this language thing together to one thing, but first we will start by making a Nigerian Dialects dictionary, knowing the languages we gonna use incase of reference anyway, I will get back on this later.
Re: A Compiler that enables Nigerians to Code In our local languages by logica(m): 8:55am On Sep 26, 2008
well if you guys insist, let me ask you how much you know about these:

lexical analysis - finite automata and regular expressions
syntax analysis - context free grammar (CFG) and parsers e.g top-down, bottom-up etc
single pass, multi pass.

have u done any course work in school on compilers? how well did you do in such courses? do you understand what is involved?
Re: A Compiler that enables Nigerians to Code In our local languages by louis400(m): 9:13am On Sep 26, 2008
Logica, I once took a lesson in this but I did not take it more serious cos its kind of complicating to me but yet, I can do stuffs about it, I have my teachers.
Re: A Compiler that enables Nigerians to Code In our local languages by rancetech(m): 4:36am On Sep 29, 2008
Well, since u guys are bent on having a compiler that works with our local dialects, no problem. I'll give it my full support.

Contact me when you guys get stuck! Good luck.
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 4:54pm On Oct 02, 2008
louis400:

Besides, I think this will motivate some Nigerians to learn their local dialects, I will think something on this, on how to compile this language thing together to one thing, but first we will start by making a Nigerian Dialects dictionary, knowing the languages we going to use incase of reference anyway, I will get back on this later.
I feel you louis400.

It's obvious that you are ready to go with me. logica almost kill my dream.

To start with, can please start something on local dialets?

bigstar4sure@yahoo.com
chat me up with soleybancing@yahoo.com
Re: A Compiler that enables Nigerians to Code In our local languages by candylips(m): 5:01pm On Oct 02, 2008
Doing this will be a total waste of your time and talent. You are better of channelling your creative energy into apps that are more meaningful and probably commercially viable.

1 Like

Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 5:20pm On Oct 02, 2008
logica:

well if you guys insist, let me ask you how much you know about these:

lexical analysis - finite automata and regular expressions
syntax analysis - context free grammar (CFG) and parsers e.g top-down, bottom-up etc
single pass, multi pass.

have u done any course work in school on compilers? how well did you do in such courses? do you understand what is involved?

Hi, that's a good question.

For you info, I went to study Computer science in school. though our lecturers didn't know much coding, but they are good in terms of theory.
And I have done a lot of research as well, so i know those to some extent.

I know you would want me to prove this, no problem.

I'm a bit busy now, I'll send you the details when next i come online
Re: A Compiler that enables Nigerians to Code In our local languages by logica(m): 5:49pm On Oct 02, 2008
my guy i will never attempt to kill anybody's dream. but it's my duty to point out that it may be unrealistic and impractical. it's left for you to prove me wrong.
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 4:01pm On Oct 03, 2008
Sure, once people like louis400 stays with me, we will prove you wrong.
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 4:08pm On Oct 03, 2008
This is what I promised





How does an interpreter/compiler work?

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

Everything you were afraid to ask about how a compiler/interpreter works.

Let's start by discussing a very simple form of a compiler/interpreter:

Source File ---> Scanner ---> Lexer ---> Parser ---> Interpreter/Code Generator

So what do all the terms here mean. We'll work on that as we go:
Source File: This is the program that is read by the compiler or interpreter. This is the text that needs to be compiled or interpreted.

Scanner: This is the first module in a compiler or interpreter. Its job is to read the source file one character at a time. It can also keep track of which line number and character is currently being read. A typical scanner can be instructed to move backwards and forwards through the source file. Why do we need to move backwards? We will see why in just a little bit when we examine the lexer. For now, assume that each time the scanner is called, it returns the next character in the file.

Lexer: This module serves to break up the source file into chunks (called tokens). It calls the scanner to get characters one at a time and organizes them into tokens and token types. For instance, if the source file read something like this:

Code:
cx = cy + 324;
print "value of cx is ", cx;
a lexer would perhaps break it like this:

Code:
cx  --> Identifier (variable)
=  --> Symbol (assignment operator)
cy  --> Identifier (variable)
+ --> Symbol (addition operator)
324 --> Numeric constant (integer)
; --> Symbol (end of statement)
print --> Identifier (keyword)
"value of cx is " --> String constant
, --> Symbol (string concatenation operator)
cx --> Identifier (variable)
; --> Symbol (end of statement)
Thus, the lexer calls the scanner to pass it one character at a time and groups them together and identifies them up as tokens for the language parser (which is the next stage). It also identifies the type of token (variable vs. keyword, assignment operator vs. addition operator vs. string concatenation operator etc.) Occasionally, the lexer has to tell the scanner to back up though. Consider a language that has operators that may be more than one character long (! vs. !=, < vs. <=, + vs. ++ etc.). Assume that the lexer has requested the scanner for a character and it has returned '<'. The lexer needs to determine whether the operator is a < or a <=. So it requests the scanner for another character. If the next character is a '=', it changes the token to '<=' and passes it to the parser. If not, it tells the scanner to back up one character and hold it in the buffer, while it passes the '<' to the parser.

Parser: This is the part of the compiler that really understands the syntax of the language. It calls the lexer to get tokens and processes the tokens per the syntax of the language. For instance, taking the example from the lexer above, the hypothetical interaction between the lexer and parser could go like this:

Code:
Parser: Give me the next token
Lexer: Next token is "cx" which is a variable.
Parser: Ok, I have "cx" as a declared integer variable. Give me next token
Lexer: Next token is "=", the assignment operator.
Parser: Ok, the program wants me to assign something to "cx". Next token
     Lexer: The next token is "cy" which is a variable.
     Parser: Ok, I know "cy" is an integer variable. Next token please
     Lexer: The next token is '+', which is an addition operator.
     Parser: Ok, so I need to add something to the value in "cy". Next token please.
         Lexer: The next token is "324", which is an integer.
         Parser: Ok, both "cy" and "324" are integers, so I can add them. Next token please:
         Lexer: The next token is ";" which is end of statement.
     Parser: Ok, I will evaluate "cy + 324" and get the answer
Parser: I'll take the answer from "cy + 324" and assign it to "cx"
In the above, the indenting shows a subprocess that the parser enters, to evaluate "cy + 324". This gives you a decent idea about how the parser operates. Also note that the parser is checking types and syntax rules (for instance, it checked whether cy and 324 were both integer types before adding them). If the parser gets a token that it was not expecting, it will stop processing and complain to the user about an error. The Scanner holds the current line number and character, so the Parser can inform the user approximately where the error occurred.

Interpreter/Code Generator: This is the part that actually takes the action that is specified by a program statement. In some cases, this is actually part of the parser (especially for interpreters) and the parser interprets and takes action directly. In other cases, the parser converts the statements into byte-code (intermediate language). In case of a compiler, it then hands them to the Code Generator to convert into machine code instructions. If you want a compiler for a different CPU or architecture, all you have to do is put a new code generator unit to translate the byte code into machine code for the new CPU.

This is about the simplest form for an interpreter or compiler. In the next few threads, we will look in some more detail at the interaction between the Parser and Code Generator.

Feedback about this post will be greatly appreciated.
Re: A Compiler that enables Nigerians to Code In our local languages by logica(m): 4:54pm On Oct 03, 2008
what do you know about context free grammar, disambiguation, and sentential forms? i can just hear the voice of my CSC403 (Principles of Compilers) lecturer right now. grin
Re: A Compiler that enables Nigerians to Code In our local languages by IgboAkata(m): 5:46am On Oct 05, 2008
Honestly, with the amount of highly intellectual Black Africans from Nigeria, this thread should not be cut short in any way and I hope it won't be. The particular topic of this thread is the level we need to be on and always need to be on. Japan should be the perfect example to model from.

Any Black African who brings doubt, negativity, discouragement or a sense of frustrating other Black Africans in their ability to think creatively and physically carry out the course of actions needed to materialize their ideas should remove themselves from topics and ideas like the being discussed here. The are nation building ideas that will greatly reduce or completely eliminate dependency on the Westerners to provide many of the things Nigerians minds should be producing, and producing at amazing commercial level of quality.
Re: A Compiler that enables Nigerians to Code In our local languages by webstar(m): 6:54am On Oct 05, 2008
Yeah BigStar am with you all way, Its me Louis400 here. Am working for sure on this programme and within a short wile I believe I will round it up. Cos am getting some kind of integration here, trying to find out the link between compilers and local machines and the different present operating systems. I think this gonna help.
Re: A Compiler that enables Nigerians to Code In our local languages by webstar(m): 6:55am On Oct 05, 2008
Yeah BigStar am with you all way, Its me Louis400 here. Am working for sure on this programme and within a short wile I believe I will round it up. Cos am getting some kind of integration here, trying to find out the link between compilers and local machines and the different present operating systems. I think this gonna help.
Re: A Compiler that enables Nigerians to Code In our local languages by kelvodavee: 5:44pm On Oct 05, 2008
hey guys!

Why dont we think about developing something that would be useful to Nigerians and also to the world at lairge.

[size=14pt]We can build a ROBOT[/size]

Japan is leading the world when it comes to building robots. It's not as difficult as u may think. I'v done different aspects of it in the past and i know putting all the bits together would result in a robot that u can send on errands.
First, u need image sensors. For this, i used webcams. The webcams would sense objects by reading the pixels present in each frame of video stream. 30 frames can be captured every second by most webcams around. Next, we get electric rotors (servo motor or stepper motor is more prefered because of their property of precise positioning). Next we get microcontroller which are programmable chips. This will be the brain of the robot. All it does is to activate and deactivate connected modules by sending bits of 1s and 0s based on the input it receives. Several rechargeable batteries connected in series will serve as the power source. The one i did was a computer controlled one. I did not use any chip. The computer system served as its brain. Control signals were sent from the computer parallel port to the motors which turns the electric motor and causes the robot to move around. Two webcams were used. The one i did was a miniature one, but i have the dreams of building something almost the size of a human being. Voice recognition modules will be used in analysing the sound received. I'm currently developing a lip reader software. It works by capturing still images of the mouth when words are pronounced. It's a new technology which by the time i'm through will yield a major breakthrough in the world of robots. Is there anybody there in the house who is willing to join me in realising this dream?
Re: A Compiler that enables Nigerians to Code In our local languages by kelvodavee: 6:20pm On Oct 05, 2008
well concerning the compiler u talked about,its not a difficult thing. U'll need good programming skills in machine codes.
Thats the only way u can make the compiler fast enough to handle complex tasks. U use the machine codes to generate your instruction set. If u dont do that, the compiler will not be able to match up with existing compilers when it comes to real time systems - for example, multimedia programming. U'll need to develop kernel files (dynamic link libraries) which will serve as intermediary between ur high level language and the computer operating system. This will be very useful if ur compiler is to be used for hardware control or if you'll need to use any of the computer port like USB port, parallel port or any of the computer resources such as diskette drive, pendrive, or even if u need to write data on the hard drive. This is because high level languages operate at permission level 3. Kernel programs operate at permission level 1. With windows 98 and below, u may have little problem. But Windows XP and above were designed in such a way as to prevent or resolve instruction conflict. U can use c language to develop the kernel files. I would have joined ur team but i have alot on my hands. If u get stucked, feel free to contact me. I am a software engineer
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 4:24pm On Oct 06, 2008
Hi kelvodave, can you join the team pls?

WebStar and BigStar have started already, we need more stars
Re: A Compiler that enables Nigerians to Code In our local languages by netwhizmx: 9:59pm On Oct 10, 2008
Lets see, the best way to start this is by working with an Open Source platform, say Linux has a lot of distro, if i were to start such, i'd use one distro for this purpose, starting by incorporating say the Yoruba lang. but question now is how many dudes know their way around working with kernels, if u have a good knowledge of Assemblies then building a kernel which is d salt of every OS then saying this is can be made a reality isnt far fetched, i'll leave it 'dere
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 1:38pm On Oct 29, 2008
netwhizmx:

if u have a good knowledge of Assemblies then building a kernel which is d salt of every OS then saying this is can be made a reality isnt far fetched

Mistake, the point is that we are building OS but a compiler like C#, QBASIC, VB etc.
Re: A Compiler that enables Nigerians to Code In our local languages by SabThree(m): 11:02pm On Oct 31, 2008
***
Re: A Compiler that enables Nigerians to Code In our local languages by BigStar1(m): 12:39pm On Nov 05, 2008
Sab_Three:

I just hope you nigerians cannot do anything by yourself, that's why white people wrote the most important compilers, and you are using them for your silly softs, hihihihi
have fun all,

but i did like the post, and i read it all, (in fact most of it, )

by the way, building a robot might be easier, just if it can stand still all the time, with a radio in his mouth,
hihihhi

ciao,
Hi, that is a good point. but people's cooperation matters a lot

(1) (2) (Reply)

Can Nairaland Programming Section Be More Like Stack Overflow / Why You Should Probably Drop Out Of A Nigerian Uni And Learn To Code. / Udemy Courses Google Drive Link

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