FACTOID # 7: Israel enjoys a GDP per capita 21 times that of the Palestinian West Bank and 33 times that of the Gaza Strip. Its military spending per capita tops the world.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Euphoria programming language
  Euphoria
Maintainer: Robert Craig
Latest release: 2.5 / March 8, 2005
OS: Cross-platform DOS32, WIN32, Linux, FreeBSD
Use: Interpreted language
License: License for version 2.5
Website: www.rapideuphoria.com

Euphoria is an interpreted programming language conceived and created by Robert Craig of Rapid Deployment Software. Software maintenance is one of the activities in software engineering, and is the process of enhancing and optimizing deployed software (software release), as well as remedying defects. ... A software release refers to the creation and availability of a new version of a computer software product. ... March 8 is the 67th day of the year in the Gregorian Calendar (68th in Leap years). ... 2005 (MMV) was a common year starting on Saturday of the Gregorian calendar. ... An operating system (OS) is a software program that manages the hardware and software resources of a computer. ... A cross-platform (or platform independent) programming language, software application or hardware device works on more than one system platform (e. ... ‹ The template below has been proposed for deletion. ... ‹ The template below has been proposed for deletion. ... Linux (also known as GNU/Linux) is a computer operating system. ... FreeBSD is a Unix-like free operating system descended from AT&T UNIX via the Berkeley Software Distribution (BSD) branch through 386BSD and 4. ... In computer programming, an interpreted language is a programming language whose programs may be executed from source form, by an interpreter. ... A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ... This page as shown in the AOL 9. ... In computer programming, an interpreted language is a programming language whose programs may be executed from source form, by an interpreter. ...

Contents


Introduction

Developed as a personal project to invent a programming language from scratch, Euphoria's first incarnation was created by Robert Craig on an Atari Mega-ST. The current release is version 2.5 (March 8, 2005) for Windows, Linux, FreeBSD, and MS-DOS. March 8 is the 67th day of the year in the Gregorian Calendar (68th in Leap years). ... 2005 (MMV) was a common year starting on Saturday of the Gregorian calendar. ...


It was developed with the following design goals in mind:

  1. Simplicity - To be easier to learn and use than BASIC, with more-consistent high-level constructs. Uses flat-form 32-bit memory to avoid complicated memory management and size/addressing limits.
  2. Power - To provide low-level capabilities needed to access the OS and BIOS for professional development, but be more structured and less terse than a low-level language, making low-level programming less dangerous.
  3. Safety - Extensive debugging support and run-time error-handling; automatic subscript checking, type-checking, and memory handling.
  4. Flexibility - User-defined type support, with variables as loosely or strictly typed as desired. Object-oriented programming can be accomplished by defining objects as types (subsets of the sequence, which is a general-purpose collection).
  5. Ease of Development - Interpreted, with automatic memory management and garbage collection.
  6. Speed - To be fast enough to rival compiled languages for usefulness, despite being an interpreted language

The name "Euphoria" itself is an acronym for "End-User Programming with Hierarchical Objects for Robust Interpreted Applications", although there is some suspicion that this is in fact a backronym. BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... In computer science, garbage collection (also known as GC) is a form of automatic memory management. ... A compiled language is a programming language whose implementations are typically compilers (translators which generate machine code from source code), and not interpreters (step-by-step executors of source code, where no translation takes place). ... In computer programming, an interpreted language is a programming language whose programs may be executed from source form, by an interpreter. ... It has been suggested that this article or section be merged with Acronym and initialism. ...


The first world-visible incarnation of the language was for the 32-bit DOS platform and was released in July of 1993. The original Atari version, to date, has not been released. ‹ The template below has been proposed for deletion. ...


Current versions support 32-bit DOS, Windows, Linux, and FreeBSD. There is also a translator to convert Euphoria code into C for compilation to native machine code and what is known as the Binder, which binds the Euphoria source code to the interpreter to make an executable instead of machine compiling. ‹ The template below has been proposed for deletion. ... Linux (also known as GNU/Linux) is a computer operating system. ... FreeBSD is a Unix-like free operating system descended from AT&T UNIX via the Berkeley Software Distribution (BSD) branch through 386BSD and 4. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use... Machine code or machine language is a system of instructions and data directly understandable by a computers central processing unit. ...


With the release of version 2.5 the Euphoria interpreter was split into two sections: the front-end parser and the back-end interpreter. The front-end is now written in Euphoria instead of C and was released as open source. The front-end is also used with the Euphoria-to-C translator and the Binder.


What is it used for

Euphoria was primarily used by hobbyists for utility and computer game programming, but has proven useful for fairly diverse purposes. The primary strength seems to be the ease of handling dynamic collections of data of various types, most useful when dealing with string processing and image processing, which can be quite difficult in many languages. It has been used in artificial intelligence experiments, the study of mathematics, for teaching programming, and to implement fonts involving thousands of characters. Also, Euphoria has been proven to be useful as a language to do CGI programing in. A computer game is a game composed of a computer-controlled virtual universe that players interact with in order to achieve a defined goal or set of goals. ... Hondas intelligent humanoid robot AI redirects here. ... Euclid, a famous Greek mathematician known as the father of geometry, is shown here in detail from The School of Athens by Raphael. ... The Common Gateway Interface (CGI) is a standard protocol for interfacing external application software with an information server, commonly a web server. ...


Euphoria source code can be "bound" to the Euphoria run-time code to produce a stand-alone program for distribution. The code may also be "shrouded" to prevent others from viewing, copying, or changing the source.


You can also use the Euphoria-to-C translator to convert your Euphoria source code into C source code and then compile it into machine language. Using this technique, you can create stand-alone programs as well as Windows DLL files. The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use... A system of codes directly understandable by a computers CPU is termed this CPUs native or machine language. ... Illustration of an application which may use libvorbisfile. ...


Data types

Euphoria has just two basic data types:

atom 
These are numbers, implemented as either 31-bit integer or 64-bit IEEE floating-point, depending on the current value. Euphoria dynamically changes the implementation to the most efficient one for the data item's current value.
sequence 
Vectors which can have zero or more elements; each element is either an atom or a sequence. The number of elements in a sequence is not fixed; the coder can add or remove elements as required during run-time. Euphoria automatically handles the allocation and deallocation of RAM, and the automatic garbage collection for you. Individual elements are referenced using an index value enclosed in square brackets. The first element in a sequence has an index of one [1]. Elements inside embedded sequences are referenced by additional bracked index values, thus X[3][2] refers to the second element contained in the sequence that is the third element of X.

Additionally, Euphoria has two specialized data types: The integers consist of the positive natural numbers (1, 2, 3, …), their negatives (−1, −2, −3, ...) and the number zero. ... The IEEE Standard for Binary Floating-Point Arithmetic (IEEE 754) is the most widely-used standard for floating-point computation, and is followed by many CPU and FPU implementations. ... In computer programming, an array, also known as a vector or list (for one-dimensional arrays) or a matrix (for two-dimensional arrays), is one of the simplest data structures. ... A four-megabyte RAM card for the VAX 8600 computer (circa 1986). ... In computer science, garbage collection (also known as GC) is a form of automatic memory management. ...

integer 
A special form of atom, restricted to 31-bit integer values in the range -1073741824 to 1073741823. Integer data types are more efficient than the atom data types, but cannot contain the same range of values. Characters are stored as integers, eg coding ASCII-'A' is exactly the same as coding 65.
object 
A generic datatype that can contain any of the above, and can be changed during run-time. This means that if you have an object called X that is assigned the value 3.172, then later on you can assign it the value "ABC". Note that in fact, each element of a sequence is actually an object.

There is no character string data type, as these are represented by a sequence of integer values. However, because literal strings are so commonly used in programming, Euphoria interprets double-quote enclosed characters as a sequence of integers. Thus The integers consist of the positive natural numbers (1, 2, 3, …), their negatives (−1, −2, −3, ...) and the number zero. ... For other uses, see ASCII (disambiguation). ... In computer programming and some branches of mathematics, strings are sequences of various simple objects. ...

 "ABC" 

is seen as if the coder had written:

 {'A', 'B', 'C'} 

which is the same as:

 {65,66,67} 

Hello World

 puts(1,"Hello World!n") 

Examples

Note: Code comments start with a double dash "--" and go through the end of line. There are no multi-line comments.


As brief examples, the following code

 global function delete_item( object old, sequence group ) integer pos -- Code begins -- pos = find( old, group ) if pos > 0 then group = group[1 .. pos-1] & group[pos+1 .. length( group )] end if return group end function 

looks for an old item in a group of items. If found, it removes it by concatenating all the elements prior to it with all the elements after it. The result is then returned. Note that elements in sequences are 1-based indexed. This means that the first element has an index of 1.


Simplicity is apparent in that the code clearly delineates its constructs with words. Instead of braces, semicolons, and question marks, you see phrases like 'if..then', 'end if', and 'end function'.


Flexibility is present; the item 'old' could be strings, numbers, images, or whole collections of data themselves. A different function for each data type isn't needed, nor does the programmer have to check the data types. This function will work with any sequence of data of any type, and requires no external libraries.

 global function replace_item( object old, object new, sequence group ) integer pos -- Code begins -- pos = find( old, group ) if pos > 0 then group[pos] = new end if return group end function 

Safety is present due to the fact that there are no pointers involved and subscripts are automatically checked. Thus the function cannot access memory out-of-bounds, and cannot go beyond the end of the sequence or before the beginning of it to corrupt the memory. There is no need to explicitly allocate or deallocate memory, and no chance of a leak.


The line

 group = group[1 .. pos-1] & group[pos+1 .. length( group )] 

shows some of the sequence handling facilities. A sequence can contain a collection of any types, and this can be sliced (to take a subset of the data in a sequence) and concatenated in expressions, with no need for special functions.


Version 2.5 introduces the new '$' symbol, which is used for "length(sequence)." So, the above example could be written in 2.5 as follows:

 group = group[1 .. pos-1] & group[pos+1 .. $] 

Parameter passing

Another feature is that all arguments to routines are always passed by value. There is no pass-by-reference facility. This is implemented in a very efficient manner as sequences automatically have copy-on-write semantics. In other words, when you pass a sequence to a routine, initially only a reference to it passed but at the point that the routine first modifies a sequence parameter, the sequence is copied and the routine updates a copy of the original. Copy-on-write (sometimes referred to as COW) is an optimization strategy used in computer programming. ...


Comparisons

D is an object-oriented, imperative systems programming language designed by Walter Bright of Digital Mars as a successor to C++. He has done this by adding some features and reducing the complexity of C++ syntax. ... The Lua (pronounced LOO-ah, or in IPA) programming language is a lightweight, reflective, imperative and procedural language, designed as a scripting language with extensible semantics as a primary goal. ... Python is an interpreted programming language created by Guido van Rossum in 1990. ...

External links

Free downloads of Euphoria for the various platforms, packages, Windows IDE, Windows API libraries, a GTK+ wrapper for Linux, graphics libraries (DOS, OpenGL, etc).

Commercial Use of Euphoria


  Results from FactBites:
 
The Euphoria Programming Language (265 words)
Euphoria is a powerful yet simple programming language, developed by Robert Craig at Rapid Deployment Software in 1993.
Although Euphoria does not claim to be object-oriented, some disagree by stating that its scope rules and flexible data structures allow you to simulate any method of programming, including object-oriented.
"Euphoria is a small, fast, cheap programming language and a true gift to young programmers.", states Paul Smith in a August 1997 article in the Monitor.
Euphoria programming language - Wikipedia, the free encyclopedia (1285 words)
Euphoria is an interpreted programming language conceived and created by Robert Craig of Rapid Deployment Software.
There is also a translator to convert Euphoria code into C for compilation to native machine code and what is known as the Binder, which binds the Euphoria source code to the interpreter to make an executable instead of machine compiling.
Euphoria was primarily used by hobbyists for utility and computer game programming, but has proven useful for fairly diverse purposes.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.