Hello World! From gleam.
Language page — context, influences, and learning notes on the 100hellos site.
Source on GitHub (100hellos/gleam)
Trying it
docker run --rm --platform="linux/amd64" 100hellos/gleam: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/gleam:latest zsh
Gleam ✨
A type-safe language for the Erlang virtual machine!
Gleam is a friendly language for building type-safe, scalable systems! ✨
What makes Gleam special? 🌟
- Type-safe - Catch bugs at compile time, not runtime
- Functional - Immutable data and functions as first-class citizens
- Concurrent - Built on the battle-tested Erlang/OTP platform
- Fast compilation - No more waiting around for builds
- Friendly errors - Error messages that actually help you
- JavaScript target - Run on the web or Node.js too!
Hello World!
import gleam/io
pub fn main() {
io.println("Hello World!")
}
Fun Facts! 🎉
- Born in 2020 - One of the newest languages on the block
- Erlang heritage - Inherits 30+ years of fault-tolerance wisdom
- Actor model - Handle millions of concurrent processes effortlessly
- Pattern matching - Destructure data with elegant syntax
- No null - Say goodbye to null pointer exceptions forever!
- Hot code swapping - Update running systems without downtime
- BEAM VM - The same virtual machine that powers WhatsApp and Discord
Why Erlang/OTP? 🚀
The Erlang virtual machine (BEAM) is legendary for:
- 9 nines uptime (99.9999999% availability)
- Fault isolation - One crash doesn't bring down the whole system
- Massive concurrency - Handle millions of lightweight processes
- Distribution - Built for multi-node systems from day one
Gleam brings modern syntax and compile-time safety to this proven platform!
Language Features 💎
- Pipe operator
|> for readable data transformations
- Result types instead of exceptions
- Immutable everything - No accidental mutations
- Generic types with full type inference
- Zero-cost abstractions - Pay only for what you use
- Comprehensive standard library - Batteries included!
Perfect for web services, IoT systems, distributed applications, and anywhere you need reliability! 🎯