SaC
1 program
Added 2025-11-04T14:39:08Z
Model: x-ai/grok-4-fastTemp: 0.4
Evidence
Report issue
View issues
Aliases: —
Provenance: commit f32d0afd60 · authored 2025-11-04T15:39:08+01:00 · model x-ai/grok-4-fast
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Scalar product of two vectors
Provenance: commit f32d0afd60 · authored 2025-11-04T15:39:08+01:00 · model x-ai/grok-4-fast · Temp 0.4
def scalarProduct [n] (a : [n]double, b : [n]double) : double =
for i < n
reduce + 0.0 (a[i] * b[i]);
def main =
let
a = with { i } i*2.0 in [0<10] double;
b = with { i } i*3.0 in [0<10] double
in
write("Scalar product = " ++ unparse(scalarProduct(a,b)) ++ "\n");