Seed (programming)


Seed is a JavaScript interpreter and a library of the GNOME project to create standalone applications in JavaScript. It uses the JavaScript engine JavaScriptCore of the WebKit project. It is possible to easily create modules in C.
Seed is integrated in GNOME since the 2.28 version and is used by two games in the GNOME Games package. It is also used by the Web web browser for the design of its extensions. The module is also officially supported by the GTK+ project.

Hello world in Seed

This example uses the standard output to output the string "Hello, World".

  1. !/usr/bin/env seed
print;

A program using GTK+

This code shows an empty window named "Example".

  1. !/usr/bin/env seed
Gtk = imports.gi.Gtk;
Gtk.init;
var window = new Gtk.Window;
window.signal.hide.connect;
window.show_all;
Gtk.main;

Modules

To use a module, just instantiate a class having for name imports. followed by the name of the module respecting the case sensitivity.
The names of the versions of Seed are albums of famous rock bands.
VersionCode NameRelease Date
0.1
0.3Wednesday Morning 3AM
0.5Transformer
0.6Beatles for Sale
0.7Another Side of Bob Dylan
0.8Bringing It All Back Home
0.8.5Self Portrait
2.27.90London Calling
2.27.91Yellow Submarine
2.27.92Metal Machine Music
2.28.0The Rise and Fall of Ziggy Stardust and the Spiders
2.29.2Never Mind the Bollocks
2.29.3
2.29.4
2.29.5Icky Thump
2.29.5.1Achtung Baby
2.29.5.2Third Stage
2.29.5.3Twist and Shout
2.29.90Fort Nightly
2.29.91Greatest Hits
2.30.0Piano Man
2.31.1The Black Album