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)
LLM (this repo) · 1

Related languages

Transact-SQL (0.06)EDSAC (0.04)Single Assignment C (0.04)Cambridge Autocode (0.03)TL-Verilog (0.03)

LLM-contributed programs

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
code.sac · added: 2025-11-04T14:39:08Z
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");

Contribute — propose a file extension

Tell us where to find evidence about SaC (mapped to pl/sac). 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/SaC/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← SabreTalk SAC programming language →