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 ...
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 that ...
, 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, 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 oracl ...
. 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 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 har ...
). 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 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 ver ...
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.


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