Seed: In Screenshots

2008.11.03 in code and gnome

Here's a bunch of applications Robb, Matt, and I have written in Seed... the source is all in Gnome SVN...

Lights Off was Matt's first application — he went from having written no Javascript at all to a nice, working game in a matter of hours one night.

n-oscillator was more or less the first working GTK application; Robb wrote it (who else would be interested in making annoying noises at all hours!?) just to figure out how to get things working... it lets you start an arbitrary number of oscillators and adjust their volume and frequency, and uses GStreamer for output.

calc was my first GTK+seed application. I wrote it on the train on the way to the Gnome Summit, without any documentation... it's a horrible front-end for eval, nothing else!

mini-browser is my rewrite of Robb's original WebKit/seed web browser, Spacewhale. It provides a tabbed interface (though, because of a WebKit bug, no GTK/WebKit-based browser can 'open in new tab/window' at all...), but not much else... I'm planning on revisiting this at some point, and getting it to a state similar to epiphany-webkit.

repl is where a lot of our testing takes place, since it provides immediate feedback. It's a rather vital part of an interpreted language, and can be written in very, very little Seed code:


while(1) { try { Seed.print(eval(Seed.readline("> "))) } catch(e) { Seed.print( + " " + e.message) } }

shader is a cute demo Robb wrote that lets you edit GLSL shaders and apply them to an image, using Clutter to display the image and apply the texture.

ide is a small Seed editor that I've been writing, eventually providing syntax checking and (maybe) debugging of Seed apps.

Comments (legacy)


Hi, great the little browser!
Is it written in C?


No, actually, it's written using JavaScript! That's what's so cool about our code - it lets you use all of the powerful libraries, like WebKit, from a really friendly language - JavaScript!


Quite entirely! That little browser (lacking many features, for sure) is 155 lines of Javascript:

Also, we have a page at the GNOME Wiki detailing what we're working on:


Are you serious?


I added the repository for ubuntu intrepid.
Every time I try to run an example; I get errors like this:

$ seed lightsoff.js

** (seed:23409): CRITICAL **: NamespaceError. No such namespace: Gtk in lightsoff.js at line 1

How can it be fixed? Thanks.


I found the problem.

I had installed vala from svn and it installs its own
set of binaries of gobject instrospection which conflicts
the ones provided by your packages.