NimScript

1 program Added 2026-03-05T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: nims
Provenance: commit 9cd33ae043 · authored 2026-03-05T12:16:14+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

SIMSCRIPT (0.41)Vimscript (0.30)ZScript (0.29)VimL (0.29)NewtonScript (0.29)

LLM-contributed programs

Prime Numbers

Provenance: commit 9cd33ae043 · authored 2026-03-05T12:16:14+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.nims · added: 2026-03-05T10:00:00Z
# NimScript example: simple task runner and utilities
# NimScript is the scripting subset of the Nim programming language

proc isPrime(n: int): bool =
  if n < 2: return false
  if n == 2: return true
  if n mod 2 == 0: return false
  var i = 3
  while i * i <= n:
    if n mod i == 0: return false
    i += 2
  true

proc firstNPrimes(n: int): seq[int] =
  result = @[]
  var candidate = 2
  while result.len < n:
    if isPrime(candidate):
      result.add(candidate)
    inc candidate

let primes = firstNPrimes(10)
echo "First 10 primes: ", primes

Contribute — propose a file extension

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