Genie (programming language)

GenieParadigm| multi-paradigm: imperative, structured, object-oriented

|

Designed by| Jamie McCracken
First appeared| 2008; 18 years ago (2008)
Stable release|

0.52.3 / May 1, 2021; 5 years ago (2021-05-01)

Typing discipline| static, strong
OS| Cross-platform (every platform supported by GLib)
License| LGPLv2.1+
Filename extensions| .gs
Website| {{{1}}}
Influenced by
Python, Boo, D, Object Pascal

Genie is a modern, general-purpose high-level programming language in development since 2008.[1] It was designed as an alternative, simpler and cleaner dialect for the Vala compiler, 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.[2] The differences are only syntactic.

Genie's syntax is derived from numerous modern languages like Python, Boo, D and Delphi. 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 or C#, it does not require a virtual machine).

Genie allows access to C libraries, especially those based in GObject (like GTK), without using a different application binary interface (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 software development.

Programs developed in Vala and Genie do not depend on the GNOME Desktop Environment, usually requiring only GLib.

## Contents

* 1 Code samples
* 1.1 "Hello World"
* 1.2 Objects
* 2 Criticism
* 3 References
* 4 External links

## Code samples

### "Hello World"

This sample explicitly uses four spaces for indentation.

[indent=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

This section has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)

Template:Pov section

(Learn how and when to remove this template message)

|

As of 2013[update], Genie "for" loops are inclusive, which makes handling of empty lists cumbersome:[3]

var l = new list of string
if l.size > 0
for var i = 0 to (l.size - 1)
print l.@get(i)

However, one can also iterate over lists via the for-in construct. This is easy and straightforward:[4]

var l = new list of string
for s in l:
print s

## References

1. ↑ Jamie McCracken (2008). "Introducing Genie - the smart programming language". http://jamiemcc.livejournal.com/11749.html.
2. ↑ Using Genie and Vala together
3. ↑ Tal Liron (11 January 2013). Genie. Event occurs at 32:29. Archived from the original on 2021-12-20.
4. ↑ "Projects/Genie - GNOME Wiki!". https://wiki.gnome.org/Projects/Genie#Lists_.28Gee.27s_ArrayList.29.

## External links

*   * Using the Genie programming language under Puppy Linux
* Puppy Linux: Vala and Genie Programming
* API Documentation
* search github projects written in genie

* v
* t
* e

Programming languages

* Comparison
* Timeline
* History

* APL
* Assembly
* BASIC
* C
* C++
* C#
* COBOL
* Elixir
* Fortran
* Go
* Groovy
* Haskell
* Java
* JavaScript (JS)
* Julia
* Kotlin
* Lisp
* Lua
* MATLAB
* Objective-C
* OCaml
* Pascal
* Perl
* PHP
* Python
* R
* Ruby
* Rust
* Scala
* Shell
* Smalltalk
* Swift
* TypeScript
* Visual Basic .NET (VB.NET)
* more...

* Category
* Lists
* Alphabetical
* Categorical
* Generational
* Non-English-based

* v
* t
* e

GNOME

Core Applications|

* Boxes
* Calculator
* Character Map
* Dictionary
* Disks
* Files
* Software
* Terminal
* Videos
* Web

Extras|

| Development|

* Anjuta
* Builder
* Glade Interface Designer
* Meld
* GNOME Devhelp
* Nemiver
* Geany
* Gtranslator

|

Office|

* AbiWord
* Dia
* Evince
* Evolution
* GNOME LaTeX
* Gnumeric
* OCRFeeder

Graphics|

* Eye of GNOME
* F-Spot
* GIMP
* gThumb
* Inkscape
* Shotwell
* Simple Scan

Internet|

* Balsa
* Empathy
* Ekiga
* Geary
* GNOME Fractal
* Gobby
* Jami
* Vino
* Vinagre
* Transmission-gtk

Media|

* Banshee
* Cheese
* EasyTag
* Pitivi
* Rhythmbox
* Sound Juicer
* SoundConverter
* sushi

Games|

* GNOME Games
* Chess
* Mines
* gbrainy
* PyChess

Utilities|

* Archive Manager
* Brasero
* dconf-editor
* gedit
* gnote
* GNOME System Tools
* GParted
* Tomboy

Components|

| User interface|

| GNOME 4|

* Mutter on GSK
* GNOME Shell 2
* …

|

GNOME 3|

* Client-Side Decoration
* GDM
* Mutter
* GNOME Shell
* Tango Desktop Project
* Orca

GNOME 2|

* Metacity
* GNOME Panel
* Clearlooks

Other|

* Cinnamon
* MATE
* Diodon
* GNOME Do
* Avant Window Navigator

GNOME Base|

* GTK
* GDK
* GSK
* ATK
* Clutter
* Pango
* GLib
* GObject
* GIO
* IBus

Other|

* dconf
* Genie
* Keyring
* GNOME-DB
* GVfs
* GnomeVFS
* Librsvg
* Tracker
* Vala
* libxslt
* libxml2

freedesktop.org|

* AppStream
* D-Bus
* GStreamer
* NetworkManager
* Poppler
* Wayland
* X.Org Server
* PulseAudio
* PackageKit
* HarfBuzz
* Cairo

Community|

* GNOME Foundation
* GUADEC
* The GNOME Project
* Outreachy

People|

* Miguel de Icaza
* Luis Villa
* Havoc Pennington
* Karen Sandler

* Category
* Commons
* WikiProject

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Genie_(programming_language)&oldid=4203831"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template