4D

1 program Added 2026-02-08T21:21:59Z Agent: claude-codeModel: opusWebSearch: disabled Evidence Report issue View issues
Aliases: 4th Dimension, 4D Language
Provenance: commit f9b4ee37c8 · authored 2026-02-08T22:23:01+01:00 · agent claude-code · model opus

Sources mentioning this language

6 sources · pl_id: pl/4d
LLM (this repo) · 1LinguistWikipediaHyperpolyglotRosettacodeWikidata · Q238349

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.

Designed by4D SAS · Laurent Ribardière
First appeared1993
LicenseProprietary
Implemented inC · C++
Homepagehttp://us.4d.com

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.4dbwikidataprimary3.4K files
.4dcwikidataprimary425 files
.4dmlinguistprimary51.1K files

Related languages

DXL (0.32)GEL (0.32)Lime (0.30)Ceylon (0.28)Io (0.27)

LLM-contributed programs

Fibonacci Sequence

Provenance: commit f9b4ee37c8 · authored 2026-02-08T22:23:01+01:00 · agent claude-code · model opus · WebSearch disabled
code.4dm · added: 2026-02-08T21:21:59Z
// Fibonacci sequence in 4D
// Computes and displays the first 20 Fibonacci numbers

C_LONGINT($i;$n;$a;$b;$temp)
C_TEXT($result)

$n:=20
$a:=0
$b:=1
$result:=""

For ($i;1;$n)
    $result:=$result+String($a)+"\n"
    $temp:=$a+$b
    $a:=$b
    $b:=$temp
End for

ALERT($result)

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
DEMOS_List.4dm · 403 B · ext .4dm · seen 2× in SWH
via unique-primary
swh:1:cnt:6ab38489871b6e1c43b38473a9985013e1e4a527;origin=https://github.com/sampoh/DEMO_APP_V19;anchor=swh:1:rev:02639f908f1fefc6529268a2e1349bed82daec60;path=/DEMO_Server/Project/Sources/Methods/DEMOS_List.4dm
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
//%attributes = {"shared":true}

var $0; $voOUT : Object
var $1; $voIN : Object
var $2; $session : Object

$voIN:=$1
$session:=$2

//テーブル名でコレクションを返却
$voOUT:=New object:C1471
$voOUT[Table name:C256(->[sites:5])]:=\
ds:C1482.sites.all().orderBy("title asc").toCollection()  //"[sites]" テーブルを全件取得し "title" フィールドの昇順でソート

$0:=$voOUT

Contribute — propose a file extension

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