// guess the programming language of the day

$ whois nim

Nim

first released in 2008 · by Andreas Rumpf

$ guessprog --inspect nim

year
2008
paradigm
multi paradigm
family
other
memory
reference counting
binding
static
safety
strong

NIM(7)

AUTHORS
Andreas Rumpf
HISTORY
Andreas Rumpf, a German developer, started the language in 2008 under the name Nimrod, aiming to combine Python-like readability with the speed of C and powerful compile-time metaprogramming. Instead of generating machine code directly, its compiler emits C, C++ or JavaScript and lets existing compilers do the rest. The language was renamed Nim in 2014 and reached version 1.0 in 2019.
USAGE
A niche language with a small, dedicated community. It is used for command-line tools, games, scripting and some systems work, and notably for Nimbus, an Ethereum client developed by Status.
SEE ALSO
Nim on Wikipedia ↗
$ cat shapes.nim
import std/sequtils

type Shape = object
  name: string
  sides: int

proc describe(s: Shape): string =
  s.name & " has " & $s.sides & " sides"

let shapes = @[Shape(name: "triangle", sides: 3),
               Shape(name: "square", sides: 4)]

for s in shapes.filterIt(it.sides > 3):
  echo s.describe   # uniform function call syntax