Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/portasynthinca3/elixir_politics
Allows you to start communist and anarchist revolutions in your BEAM VM
https://github.com/portasynthinca3/elixir_politics
anarchy beam communism elixir erlang
Last synced: about 1 month ago
JSON representation
Allows you to start communist and anarchist revolutions in your BEAM VM
- Host: GitHub
- URL: https://github.com/portasynthinca3/elixir_politics
- Owner: portasynthinca3
- License: wtfpl
- Created: 2023-02-02T19:00:05.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T19:39:38.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T03:32:21.733Z (3 months ago)
- Topics: anarchy, beam, communism, elixir, erlang
- Language: Elixir
- Homepage:
- Size: 4.88 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Elixir politics
## Installation
```elixir
def deps do
[
{:politics, "~> 0.1.1"}
]
end
```## Communism
A man once said to abolish the `classes` or something like that. Elixir doesn't have classes, so we thank our workers and terminate all non-workers.
```
Erlang/OTP 24 [erts-12.3.2.8] [source] [64-bit] [smp:16:12] [ds:16:12:10] [async-threads:1] [jit]Interactive Elixir (1.14.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Communism.revolution
System process <0.6.0> terminated: die_pigCrash dump is being written to: erl_crash.dump...done
```
Aw jeez! It looks like the BEAM VM doesn't like communism :(## Anarchy
A man once said to abolish the `state` or something like that. Fortunately for us, Elixir keeps state in predefined locations so that's quite easy to do!
```
Erlang/OTP 24 [erts-12.3.2.8] [source] [64-bit] [smp:16:12] [ds:16:12:10] [async-threads:1] [jit]Compiling 1 file (.ex)
Interactive Elixir (1.14.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Anarchy.revolution
*** ERROR: Shell process terminated! (^G to start new job) ***
```
Aw jeez!!! It looks like BEAM processes don't like it when their state gets erased!## Acknowledgements
Inspired by