Genie (programming language)
   HOME

TheInfoList



OR:

Genie is a modern, general-purpose
high-level programming language In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be easier to us ...
in development since 2008. It was designed as an alternative, simpler and cleaner dialect for the
Vala Vala or VALA may refer to: Religion and mythology * Vala (Vedic), a demon or a stone cavern in the Hindu scriptures * Völva, also spelled Vala, a priestess in Norse mythology and Norse paganism Fiction * Vala (Middle-earth), an angelic being in ...
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
, while preserving the same functionality of the Vala language. Genie uses the same compiler and libraries as Vala; the two can indeed be used alongside each other. The differences are only syntactic. Genie's syntax is derived from numerous modern languages like
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
, Boo, D and Delphi. In the vein of Python, Genie uses
indentation __FORCETOC__ In the written form of many languages, an indentation or indent is an empty space at the beginning of a line to signal the start of a new paragraph. Many computer languages have adopted this technique to designate "paragraphs" or o ...
rather than explicit block delimiters (like, for example,
curly brackets A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'r ...
) to delimit blocks. Like Vala, Genie uses the
GObject The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C programs to provide object-oriented C-based APIs ...
type system to create classes and interfaces declared in Genie source code, without imposing additional runtime requirements (i.e., unlike Python,
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mos ...
or C#, it does not require a
virtual machine In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
). Genie allows access to C libraries, especially those based in GObject (like
GTK GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
), without using a different
application binary interface In computer software, an application binary interface (ABI) is an interface between two binary program modules. Often, one of these modules is a library or operating system facility, and the other is a program that is being run by a user. An ...
(ABI). During
compilation Compilation may refer to: *In computer programming, the translation of source code into object code by a compiler **Compilation error **Compilation unit *Product bundling, a marketing strategy used to sell multiple products *Compilation thesis M ...
, the code is first translated to C source and header files, which are then compiled to platform-specific
machine code In computer programming, machine code is any low-level programming language, consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). Each instruction causes the CPU to perform a ve ...
using any available C compiler like GCC, thus allowing
cross-platform In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software ...
software development. Programs developed in Vala and Genie do not depend on the GNOME Desktop Environment, usually requiring only
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever sin ...
.


Code samples


"Hello World"

This sample explicitly uses four spaces for indentation.
 ndent=4
init
    print "Hello, world!"


Objects

With no explicit indentation declaration, the default is tabs.
class Sample

	def run()
		stdout.printf("Hello, world! \n ")

init
	var sample = new Sample()
	sample.run() 


Criticism

, Genie for loops are inclusive, which makes handling of empty lists cumbersome: However, the lists can be iterated using for-in construct easily and straightforward:


References


External links

* *
Using the Genie programming language under Puppy Linux

Puppy Linux: Vala and Genie Programming

API Documentation

search github projects written in genie
2008 software Cross-platform free software GTK language bindings High-level programming languages Object-oriented programming languages Programming languages created in 2008 Software using the LGPL license Statically typed programming languages {{Compu-lang-stub