Habanero Java

1 program Added 2026-03-06T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: HJ, HJlib
Provenance: commit 3b6a1936ff · authored 2026-03-06T09:36:26+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

Habanero (0.78)Java (0.16)Generic Java (0.14)GJ (0.14)Hamster (0.13)

LLM-contributed programs

Parallel Fibonacci

Provenance: commit 3b6a1936ff · authored 2026-03-06T09:36:26+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.java · added: 2026-03-06T10:00:00Z
import static edu.rice.hj.Module1.*;
import static edu.rice.hj.Module0.*;

/**
 * Parallel Fibonacci using Habanero Java async/finish.
 */
public class Fibonacci {

    static int fib(final int n) {
        if (n <= 1) {
            return n;
        }
        final int[] a = new int[1];
        final int[] b = new int[1];
        finish(() -> {
            async(() -> {
                a[0] = fib(n - 1);
            });
            b[0] = fib(n - 2);
        });
        return a[0] + b[0];
    }

    public static void main(final String[] args) {
        launchHabaneroApp(() -> {
            final int n = Integer.parseInt(args.length > 0 ? args[0] : "10");
            System.out.println("fib(" + n + ") = " + fib(n));
        });
    }
}

Contribute — propose a file extension

Tell us where to find evidence about Habanero Java (mapped to pl/habanero_java). 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/Habanero Java/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Habanero Habit →