Sign inSign up

100hellos/nim

By 100hellos

•Updated 4 months ago

"Hello World!" Written in nim

Image
0

3.5K

100hellos/nim repository overview

⁠Hello World! From nim.

Language page⁠ — context, influences, and learning notes on the 100hellos site.

Source on GitHub⁠ (100hellos/nim)

⁠Trying it

docker run --rm --platform="linux/amd64" 100hellos/nim:latest

⁠Modifying it

Read the repo README⁠, or fork the project⁠ and customize it.

For an interactive shell:

docker run --rm --platform="linux/amd64" --entrypoint="" -it 100hellos/nim:latest zsh

⁠Nim

Nim is a statically typed, compiled systems programming language that is designed to be "efficient, expressive, and elegant".

⁠Fun Facts

  • Python-like Syntax: Nim's syntax is heavily inspired by Python, making it clean, readable, and easy to learn for programmers coming from a Python background.
  • Compiles to C, C++, or JavaScript: Nim is a true transpiled language. This allows it to generate highly optimized, dependency-free native executables or to be used for frontend web development.
  • Performance: Because it compiles to C/C++, Nim executables are extremely fast and memory-efficient, making it suitable for systems programming, game development, and other performance-critical applications.
  • Powerful Metaprogramming: Nim has a powerful macro system that allows developers to manipulate the abstract syntax tree (AST) directly. This enables the creation of expressive domain-specific languages (DSLs) and can eliminate boilerplate code.
  • Self-Hosting: The Nim compiler itself is written in Nim.
  • Flexible Memory Management: Nim offers multiple memory management strategies, from a deterministic garbage collector (the default) to manual memory management, giving developers fine-grained control over performance.
  • Style Insensitive: Identifiers in Nim are style-insensitive. helloWorld is the same as hello_world, allowing developers with different style preferences to collaborate easily.

This "Hello World" is implemented by compiling the Nim source code with the nim compiler and executing the resulting binary.

Tag summary

Content type

Image

Digest

sha256:3095c1ab8…

Size

89.8 MB

Last updated

4 months ago

docker pull 100hellos/nim