100 Helloslanguages
Home / Languages / Elm

Elm

2012
webfunctional
docker run --rm --platform="linux/amd64" 100hellos/elm:latest

Elm is a functional language that compiles to JavaScript. It is famous for its focus on simplicity, ease-of-use, and the complete elimination of runtime errors.

Elm's guiding principle is that if your code compiles, it works. This is achieved through a powerful static type system and a compiler that provides famously helpful error messages. It's often used for building web applications and is a great choice for developers who value reliability and maintainability.

Hello World

#!/bin/sh

# Elm needs to be in a project directory
cd /hello-world

# Initialize an elm project, accepting defaults
yes | elm init > /dev/null 2>&1

# Compile the elm file
elm make --output=/tmp/hello.html src/Main.elm > /dev/null 2>&1

# The html file is complex, so we'll just find the string we need for the test
grep -o "Hello World!" /tmp/hello.html

Connections

influenced by
influences

Container Info

image100hellos/elm:latest
build scheduleThursday
fragletno