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 u ...
in development since 2008. It was designed as an alternative, simpler and cleaner dialect for the Vala
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 In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituenc ...
is derived from numerous modern languages like Python, Boo, D and
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The orac ...
. In the vein of Python, Genie uses indentation rather than explicit block delimiters (like, for example, curly brackets) 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 mo ...
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), 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, the code is first translated to C source and header files, which are then compiled to platform-specific machine code 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 A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
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 s ...
.


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