Ezhil, in
Tamil language
Tamil (; ' , ) is a Dravidian language natively spoken by the Tamil people of South Asia. Tamil is an official language of the Indian state of Tamil Nadu, the sovereign nations of Sri Lanka and Singapore, and the Indian territory of Pud ...
script (, ), is a compact,
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
,
interpreted,
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
, originally designed to enable native-
Tamil
Tamil may refer to:
* Tamils, an ethnic group native to India and some other parts of Asia
** Sri Lankan Tamils, Tamil people native to Sri Lanka also called ilankai tamils
**Tamil Malaysians, Tamil people native to Malaysia
* Tamil language, nati ...
speaking students,
K-12
K-1 is a professional kickboxing promotion established in 1993, well known worldwide mainly for its heavyweight division fights and Grand Prix tournaments. In January 2012, K-1 Global Holdings Limited, a company registered in Hong Kong, acquir ...
age-group to learn
computer programming
Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
, and enable learning
numeracy
Numeracy is the ability to understand, reason with, and to apply simple numerical concepts. The charity National Numeracy states: "Numeracy means understanding how mathematics is used in the real world and being able to apply it to make the be ...
and
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, outside of linguistic expertise in predominately English language-based computer systems.
In the Ezhil programming language, Tamil keywords and language-grammar are chosen to easily enable the native Tamil speaker write programs in the Ezhil system. Ezhil allows easy representation of computer program closer to the Tamil language logical constructs equivalent to the conditional, branch and loop statements in modern English based programming languages. Ezhil is the first freely available programming language in the
Tamil language
Tamil (; ' , ) is a Dravidian language natively spoken by the Tamil people of South Asia. Tamil is an official language of the Indian state of Tamil Nadu, the sovereign nations of Sri Lanka and Singapore, and the Indian territory of Pud ...
and one of many known
non-English-based programming languages
Non-English-based programming languages are programming languages that do not use keywords taken from or inspired by English vocabulary.
Prevalence of English-based programming languages
The use of the English language in the inspiration fo ...
. The language was officially announced in July 2009, while it has been developed since late 2007.
Description
The
syntax of Ezhil is broadly similar to that of
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
: blocks of code are run in sequential order, or via functions definitions, in a common
control flow
In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an '' ...
structures include
while
''While'' is a word in the English language that functions both as a noun and as a subordinating conjunction. Its meaning varies largely based on its intended function, position in the phrase and even the writer or speaker's regional dialec ...
, and
if
. The termination of function block and statement blocks should have the termination keyword, similar to END in BASIC. Declarations are not necessary as ''Ezhil'' is a dynamic typed language, though
type conversion
In computer science, type conversion, type casting, type coercion, and type juggling are different ways of changing an expression from one data type to another. An example would be the conversion of an integer value into a floating point valu ...
s must be made explicitly. Ezhil has built-in types for Numbers, Strings, Logicals and Lists.
Goals
* Educational: Ezhil language is targeted toward K-12 students, and native-Tamil speakers, to learn elementary computer science principle
* Intuitive: Ezhil language ''syntactic sugar'' is arranged to allow a sentence structure closer to the
head final
In linguistics, head directionality is a proposed parameter that classifies languages according to whether they are head-initial (the head of a phrase precedes its complements) or head-final (the head follows its complements). The head is the ...
Tamil language
Tamil (; ' , ) is a Dravidian language natively spoken by the Tamil people of South Asia. Tamil is an official language of the Indian state of Tamil Nadu, the sovereign nations of Sri Lanka and Singapore, and the Indian territory of Pud ...
, where the usual word order is
SOV, in contrast to the
SVO order of English.
Features
* Arithmetic and logical operations, precedence indicated with parenthesis
* Over 350+ builtins - many of them commonly found in the Python standard library
* Procedural programming using functions, supporting recursion, call-by-value etc.
* Ezhil as a language - it is not a macro-processor, and it is a complete compiler-front-end
* Ezhil language has syntax highlighting support for Notepad++ and Emacs
Keywords
Conditional Statements are modeled after the IF-ELSEIF-ELSE statement . Loop control statements deriving from the WHILE statements are chosen. The function declaration syntax is kept simple. Details include the print statement, and the flow control statements below.
1.- : PRINT statement - பதிப்பி
2.- : BREAK statement - நிறுத்து
3.- : CONTINUE statement - தொடர்
4.- : RETURN statement - பின்கொடு
5.- : IF-ELSEIF-ELSE-statement - ஆனால், இல்லைஆனால், இல்லை
6.- : END-statement - முடி
7.- : FUNCTION-statement - நிரல்பாகம்
8.- : WHILE-statement - வரை
Type system
Ezhil has four basic types, for Numbers, Strings, Logicals and Lists. It does not allow creation of new types, being a procedural language without structures or objects.
Language - control structures, function declarations and operators grammar
Standard language grammar for control structures for Ezhil language is given below,
If-else statement
@( CONDITION ) ஆனால்
#True branch
இல்லை
#False branch
முடி
Loop statement
@( CONDITION ) வரை
#LOOP BODY
முடி
Operators
Standard logical operators, equality "", inequality "!=", arithmetic comparison ">=", "<=",">","<" are supported. Arithmetic operators like "+","-","*","/" indicate standard plus, minus, product, division. Modulo is denoted by "%", and exponent by "^" characters.
Comments
'#' character denotes a single-line comment from the point to end-of-line. Multi-line comments are not defined.
Function declaration
நிரல்பாகம் UNCTION_NAME( ARGLIST )
UNCTION BODYமுடி
Variable scoping, and visibility
Ezhil supports only call-by-value, and copies all data structures on function invocations. Globals are not supported. Recursion is supported and functions invocation copies variables.
Implementations
Current Ezhil implementation
is tightly integrated with the Python runtime. Ezhil interpreter is based on a readline-like
CLI CLI may refer to:
Computing
* Call Level Interface, an SQL database management API
* Command-line interface, of a computer program
* Command-line interpreter or command language interpreter; see List of command-line interpreters
* CLI (x86 instru ...
, while it can also be run in a batch mode. The interactive mode consumes programs as UTF-8 encoded text and builds a tree, using a compiler front-end, to build an
AST, and executes it using the Python objects build from this AST.
Examples
Hello world
The following is a
Hello world program
''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses
''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the '' Norwich ...
in Ezhil:
# தமிழில் ஒரு எடுத்துக்காட்டு
பதிப்பி "வணக்கம் Vijay!"
பதிப்பி "உலகே வணக்கம்"
பதிப்பி "******* நன்றி!. *******"
exit()
Guessing game
The following is a guessing game with 10-chances to guess a number between
-100
பதிப்பி "வணக்கம், விதி விளையாட்டுக்கு வருக!"
# ஒவ்வொரு முறை ஒரு புதிய விதி தேவை
seed( 1729 + 500*random() )
எண் = randint(1,100)
# 10 வாய்ப்புகளை கொடுக்க
வாய்ப்பு = 0
@( வாய்ப்பு < 10 ) வரை
பதிப்பி "நான் என் இதயத்தில் எண் -100ஒன்று நினைக்கிறேன்"
பதிப்பி "நான் என்ன நினைக்கிறேன் என்று தெரியுமா?"
guess = உள்ளீடு ( "Guess/யூகிக்க >>" )
வாய்ப்பு = வாய்ப்பு + 1
#பதிப்பி ( எண் guess )
#பதிப்பி எண்
@( எண் guess ) ஆனால்
பதிப்பி "வாழ்த்துக்கள்! சரியான பதில்"
exit(0)
முடி
@( எண் < guess ) ஆனால்
பதிப்பி "உங்கள் உள்ளீடு அதிகமாக உள்ளது"
இல்லை
பதிப்பி "உங்கள் உள்ளீடு குறைத்து உள்ளது"
முடி
பதிப்பி "இன்னும் "
பதிப்பி ( 10 - வாய்ப்பு )
பதிப்பி "வாய்ப்புக்குள் மீதமுள்ளன முடி"
முடி
பதிப்பி "மன்னிக்கவும் : 10 வாய்ப்பு முடிக்க முடியவில்லை!"
exit( -1 )
File I/O
# கோப்புப் பயன்பாடு
fp = கோப்பை_திற( "names.txt","w")
# நாம் ஒரு பட்டியலில் இருந்து வார்த்தைகளை பயன்படுத்த முடியும்
எ = இந்த","ஒரு","எழில்","தமிழ்","நிரலாக்க","மொழி","உதாரணம்"இ = 0
@( இ < len(எ) ) வரை
# நாம் ஒவ்வொரு வரியும் ஒரு எண் மற்றும் வார்த்தை சேர்க்க முடியும்
வரி = str(இ) +" = "+ எடு( எ, இ ) + " \n"
பதிப்பி வரி
கோப்பை_எழுது( fp,வரி )
இ = இ + 1
முடி
#சேமித்து மூட
கோப்பை_மூடு( fp )
# மறு திறந்த கோப்பு
fp = கோப்பை_திற( "names.txt")
# மற்றும் உள்ளடக்கங்களை படிக்கவும்
வரிகள் = கோப்பை_படி(fp)
# பயனருக்கு காண்பிக்க
பதிப்பி வரிகள்
# கோப்பு மூட
கோப்பை_மூடு( fp )
# ஒரு எடிட்டர் கோப்பு திறக்க, "names.txt". emacs அல்லது Notepad பயன்படுத்தவும்.
Turtle graphics
The following is a
Turtle graphics
In computer graphics, turtle graphics are vector graphics using a relative cursor (the " turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language.
Overview
The turtle has three attri ...
based example to draw the Yin-Yang symbols.
நிரல்பாகம் yin(radius, color1, color2)
#turtle_width(3)
turtle_color("black")
turtle_fill(True)
turtle_circle(radius/2., 180)
turtle_circle(radius, 180)
turtle_left(180)
turtle_circle( -1*radius/2.0 , 180 )
turtle_color(color1)
turtle_fill(True)
turtle_color(color2)
turtle_left(90)
turtle_up()
turtle_forward(radius*0.375)
turtle_right(90)
turtle_down()
turtle_circle(radius*0.125)
turtle_left(90)
turtle_fill(False)
turtle_up()
turtle_backward(radius*0.375)
turtle_down()
turtle_left(90)
முடி
நிரல்பாகம் main()
#turtle_reset()
yin(200, "white", "black")
yin(200, "black", "white")
turtle_ht()
pause( "Done! Hit enter to quit", 5)
முடி
main()
Logo Ezhil
* Logo for Ezhil language consists of interlaced letters of the
Tamil
Tamil may refer to:
* Tamils, an ethnic group native to India and some other parts of Asia
** Sri Lankan Tamils, Tamil people native to Sri Lanka also called ilankai tamils
**Tamil Malaysians, Tamil people native to Malaysia
* Tamil language, nati ...
language script, spelling out ''Ezhil - A Tamil programming language''.
See also
*
Comparison of programming languages
Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages follow the rules for syntax and semantics.
There are thousands of programming languages and new ones are ...
References
# Reference implementation of Ezhil programming language
External links
*
Ezhil-Lang on GitHubDownload Developer Ezhil-Lang sourcesEzhil-Lang project on PIP Python repository
{{DEFAULTSORT:Ezhil (Programming Language)
Tamil computing
Procedural programming languages
Cross-platform software
Programming languages created in 2007