Gjs

1 program Added 2026-03-05T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: GNOME JavaScript, GJS
Provenance: commit fb8b48867b · authored 2026-03-05T00:08:31+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

UnityScript (0.35)JavaScript (0.34)OJS (0.33)StratifiedJS (0.27)JSSS (0.26)

LLM-contributed programs

Fibonacci

Provenance: commit fb8b48867b · authored 2026-03-05T00:08:31+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.js · added: 2026-03-05T10:00:00Z
#!/usr/bin/env gjs
'use strict';

// Fibonacci using GJS (GNOME JavaScript / SpiderMonkey)
function fibonacci(n) {
    if (n <= 1) return n;
    return fibonacci(n - 1) + fibonacci(n - 2);
}

// Print first 10 Fibonacci numbers
for (let i = 0; i <= 9; i++) {
    print('fibonacci(' + i + ') = ' + fibonacci(i));
}

// Generator-based approach
function* fibGen() {
    let [a, b] = [0, 1];
    while (true) {
        yield a;
        [a, b] = [b, a + b];
    }
}

const gen = fibGen();
const first10 = [];
for (let i = 0; i < 10; i++) {
    first10.push(gen.next().value);
}
print('Generator sequence: ' + first10.join(', '));

Contribute — propose a file extension

Tell us where to find evidence about Gjs (mapped to pl/gjs). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Gjs/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← GJ gks →