Back

ⓘ Euphoria (programming language)




Euphoria (programming language)
                                     

ⓘ Euphoria (programming language)

Euphoria is a programming language originally created by Robert Craig of Rapid Deployment Software in Toronto, Ontario, Canada. Initially developed on the Atari ST, the first commercial release was for the 16-bit DOS platform and was proprietary. In 2006, with the release of version 3, Euphoria became open-source software. The openEuphoria Group continues to administer and develop the project. In December 2010, the openEuphoria Group released version 4 of openEuphoria along with a new identity and mascot for the project. OpenEuphoria is currently available for Windows, Linux, macOS and three flavors of *BSD.

Euphoria is a general-purpose high-level imperative-procedural interpreted language. A translator generates C source code and the GNU compiler collection GCC and Open Watcom compilers are supported. Alternatively, Euphoria programs may be bound with the interpreter to create stand-alone executables. A number of graphical user interface GUI libraries are supported including Win32lib and wrappers for wxWidgets, GTK+ and IUP. Euphoria has a simple built-in database and wrappers for a variety of other databases.

                                     

1. Overview

The Euphoria language is a general purpose procedural language that focuses on simplicity, legibility, rapid development and performance via several means.

  • Simplicity – It uses just four built-in data types see below and implements automatic garbage collection.
  • Rapid development – An interpreter encourages prototyping and incremental development.
  • Legibility – The syntax favors simple English keywords over the use of punctuation to delineate constructs.
  • Performance – An efficient reference-counting garbage collector correctly handles cyclic references.
                                     

2. History

Developed as a personal project to invent a programming language from scratch, Euphoria was created by Robert Craig on an Atari Mega-ST. Many design ideas for the language came from Craigs Masters thesis in computer science at the University of Toronto. Craigs thesis was heavily influenced by the work of John Backus on functional programming FP languages.

Craig ported his original Atari implementation to the 16-bit DOS platform and Euphoria was first released, version 1.0, in July 1993 under a proprietary licence. The original Atari implementation is described by Craig as "primitive" and has not been publicly released. Euphoria continued to be developed and released by Craig via his company Rapid Deployment Software RDS and website rapideuphoria.com. In October 2006 RDS released version 3 of Euphoria and announced that henceforth Euphoria would be freely distributed under an open-source software licence.

RDS continued to develop Euphoria, culminating with the release of version 3.1.1 in August, 2007. Subsequently, RDS ceased unilateral development of Euphoria and the openEuphoria Group took over ongoing development. The openEuphoria Group released version 4 in December, 2010 along with a new logo and mascot for the openEuphoria project.

Version 3.1.1 remains an important milestone release, being the last version of Euphoria which supports the DOS platform.

Euphoria is an acronym for End-User Programming with Hierarchical Objects for Robust Interpreted Applications although there is some suspicion that this is a backronym.

The Euphoria interpreter was originally written in C. With the release of version 2.5 in November 2004 the Euphoria interpreter was split into two parts: a front-end parser, and a back-end interpreter. The front-end is now written in Euphoria and used with the Euphoria-to-C translator and the Binder. The main back-end and run time library are written in C.

                                     

3. Features

Euphoria was conceived and developed with the following design goals and features:

  • Implementation of flat-form 32-bit memory to avoid complex memory management and size-addressing limits
  • Debugger
  • DOS graphics library Euphoria language versions up to and including 3.1.1
  • Heterogeneous collection types sequences
  • Programming via objects as types user-defined or otherwise
  • Straightforward wrapping of or access to C libraries
  • Loose and strict variable typing
  • Low-level memory handling
  • Ease of learning and with consistent high-level constructs
  • Integrated database system
  • Debugging support and run-time error-handling
  • Interpreted, with automatic memory management and garbage collection
  • Subscript and type checking
                                     

4. Execution modes

  • A read–eval–print loop REPL version is on the openEuphoria roadmap.
  • Interpreter
  • The Binder binds the Euphoria source code to the interpreter to create an executable.
  • Bytecode compiler and interpreter shrouder
  • C translator E2C for standalone executables or dynamic linking
                                     

5. Use

Euphoria is designed to readily facilitate handling of dynamic sets of data of varying types and is particularly useful for string and image processing. Euphoria has been used in artificial intelligence experiments, the study of mathematics, for teaching programming, and to implement fonts involving thousands of characters. A large part of the Euphoria interpreter is written in Euphoria.

                                     

6. Data types

Euphoria has two basic data types:

Atom – A number, implemented as a 31-bit signed integer or a 64-bit IEEE floating-point. Euphoria dynamically changes between integer and floating point representation according to the current value. Sequence – A vector array with zero or more elements. Each element may be an atom or another sequence. The number of elements in a sequence is not fixed i.e., the size of the vector/array does not have to be declared. The program may add or remove elements as needed during run-time. Memory allocation-deallocation is automatically handled by reference counting. Individual elements are referenced using an index value enclosed in square brackets. The first element in a sequence has an index of one refers to the second element contained in the sequence that is the third element of X. Each element of a sequence is an object type see below.

Euphoria has two additional data types predefined:

Integer – An atom, restricted to 31-bit signed integer values in the range -1073741824 to 1073741823 -2^30 to 2^30-1. Integer data types are more efficient than the atom data types, but cannot contain the same range of values. Characters are stored as integers, e.g., coding ASCII-A is exactly the same as coding 65. Object – A generic datatype which may contain any of the above and which may be changed to another type during run-time.

There is no character string data type. Strings 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

"ABC"

is seen as if the coder had written:

{A, B, C}

which is the same as:

{65, 66, 67}


                                     

7. Examples

Program comments start with a double hyphen -- and go through the end of line.

The following code looks for an old item in a group of items. If found, it removes it by concatenating all the elements before it with all the elements after it. Note that the first element in a sequence has the index one

shows some of the sequence handling facilities. A sequence may contain a set 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.

                                     

8. Parameter passing

Arguments to routines are always passed by value; there is no pass-by-reference facility. However, parameters are allowed to be modified locally i.e., within the callee which is implemented very efficiently as sequences have automatic copy-on-write semantics. In other words, when you pass a sequence to a routine, initially only a reference to it is passed, but at the point the routine modifies this sequence parameter the sequence is copied and the routine updates only a copy of the original.

                                     
  • programming interface API to various multimedia components in computers. It is written in C with bindings available for C, Crystal, D, Euphoria
  • Sweden, she won the Eurovision Song Contest 2012 in Baku, with her entry Euphoria The song reached number one in several countries, including Germany and
  • Mahershala Ali A24 s television division released The Carmichael Show and Euphoria A24 was founded on August 20, 2012, by film veterans Daniel Katz, David
  • Frank E  bass, drums, keyboards, percussion, producer, programming synthesizer programming Benny Faccone  engineer Drew FitzGerald  art direction
  • simulation. Starting in version 3.0, projects in Stencyl use the Haxe programming language and OpenFL game framework to allow a flexible, write once, run anywhere
  • song, Euphoria by Loreen. German regional broadcaster NDR had investigated whether the Eurodance song bares too much of a similarity to Euphoria NDR
  • Uforia Audio Network pronounced like euphoria is the radio broadcasting and music events division of Univision Communications. Formerly known as Hispanic
  • Best Film and Best Director - Film for Paul Thomas. Other winners included Euphoria with seven trophies, Island Fever with three and numerous movies with two
  • collaborators Jamie Scott and Mark Taylor, for his ninth studio album Euphoria 2010 The mid - tempo ballad, produced by Taylor, features guest vocals
  • neighboring apartment, starting with Agenda and moving on through Dyslexia and Euphoria When Ivy arrives, disorientated to find herself in Mundania, Grey starts

Users also searched:

elixir language, euphoria forum, euphoria language of origin, euphoria meaning, phix programming language,

...
...
...