Ballerina

1 program Added 2025-10-22T09:44:50Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: bal
Provenance: commit fd89cfac4f · authored 2025-10-22T11:44:50+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

7 sources · pl_id: pl/ballerina
LLM (this repo) · 1PldbLinguistWikipediaHyperpolyglotRosettacodeWikidata · Q51160183

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Typingstructural, strong, static, inferred
Designed byWSO2 · Sanjiva Weerawarana · James Clark · Sameera Jayasoma · Hasitha Aravinda · Srinath Perera · Frank Leymann
First appeared2019
Influenced byJava · JavaScript · Go · Rust · C#
LicenseApache 2.0
Implemented inJava · Ballerina · TypeScript
Homepagehttp://ballerina.io

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.ballinguistprimary218.0K files
.balwikidataprimary218.0K files

Related languages

Babel (0.18)Balsa (0.18)Basil (0.18)Balzac (0.17)Gallina (0.16)

LLM-contributed programs

HTTP Client Example

Provenance: commit fd89cfac4f · authored 2025-10-22T11:44:50+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.bal · license: Apache-2.0 · added: 2025-10-22T09:44:50Z
import ballerina/http;
import ballerina/io;

public function main() returns error? {
    http:Client clientEp = check new ("http://postman-echo.com");

    string payload = "Hello from Ballerina";
    http:Response response = check clientEp->post("/post", payload);
    json result = check response.getJsonPayload();

    io:println("Status code: " + response.statusCode.toString());
    io:println("Content-Type: " + (check response.getHeader("content-type")));
    io:println("Payload: ", result);
    return;
}

Real programs from Software Heritage

2 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
function-overloading.bal · 156 B · ext .bal · seen 106× in SWH
via unique-primary
swh:1:cnt:2f75b94ec17f9f72fa0168a9ddba326c4671d1ec;origin=https://github.com/sanjiva/ballerina;anchor=swh:1:rev:8973f721a89d76449eb306fe376aaa816dc230aa;path=/tests/ballerina-unit-test/src/test/resources/test-src/functions/function-overloading.bal
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
function testOverloading(string a, int b) returns (string) {
    return a + b;
}

function testOverloading(int a, int b) returns (int) {
    return a + b;
}
sealed_record_literals.bal · 426 B · ext .bal · seen 72× in SWH
via unique-primary
swh:1:cnt:a2abcd3be1ea8db4ee0e6c3475ce2fe29fdb264f;origin=https://github.com/sanjiva/ballerina;anchor=swh:1:rev:a7d397a529f0768ffb48f6cbcb6d7fbbe8795ebc;path=/tests/ballerina-unit-test/src/test/resources/test-src/record/sealed_record_literals.bal
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
type Department record {
    string dptName;
    Person[] employees;
    Person manager;
    !...
};

type Person record {
    string name = "default first name";
    string lname;
    map adrs;
    int age = 999;
    Person? child;
    !...
};

function testStructLiteral1 () returns (Department) {
    Department p = {};
    return p;
}

function testStructLiteral2 () returns (Person) {
    Person p = {};
    return p;
}

Contribute — propose a file extension

Tell us where to find evidence about Ballerina (mapped to pl/ballerina). 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/Ballerina/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← balinda-lisp ballerina-central-pm →