Skip to content

Commit

Permalink
Elixir says Hello! (#7)
Browse files Browse the repository at this point in the history
Elixir is available on Alpine and there wasn't really any problems getting it set up.
  • Loading branch information
SuperPablo987 authored Oct 29, 2024
1 parent d3dbce6 commit f879889
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://hub.docker.com/r/100hellos" alt="DockerHub!">
<img src="https://img.shields.io/badge/Hello%20World!-43_to_go-yellow"
<img src="https://img.shields.io/badge/Hello%20World!-42_to_go-yellow"
height="130"></a>
</p>

Expand Down
9 changes: 9 additions & 0 deletions elixir/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1
# escape=\
FROM 100hellos/000-base:local

RUN sudo \
apk add --no-cache \
elixir

COPY --chown=human:human ./files /hello-world
1 change: 1 addition & 0 deletions elixir/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../Makefile.language-container.mk
17 changes: 17 additions & 0 deletions elixir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications.
Elixir runs on the Erlang VM, known for creating low-latency, distributed, and fault-tolerant systems. These capabilities and Elixir tooling allow developers to be productive in several domains, such as web development, embedded software, machine learning, data pipelines, and multimedia processing, across a wide range of industries.

Here is a peek:
```
iex> "Elixir" |> String.graphemes() |> Enum.frequencies()
%{"E" => 1, "i" => 2, "l" => 1, "r" => 1, "x" => 1}
```
Platform features
Scalability
All Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages:

Due to their lightweight nature, you can run hundreds of thousands of processes concurrently in the same machine, using all machine resources efficiently (vertical scaling). Processes may also communicate with other processes running on different machines to coordinate work across multiple nodes (horizontal scaling).


6 changes: 6 additions & 0 deletions elixir/files/hello-world.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env elixir

import IO, only: [puts: 1]

puts("Hello World!")

0 comments on commit f879889

Please sign in to comment.