Recording of the freestyle improvised interactive live mob programming Elixir sessions done at the TriCity (3city) Ruby Users Group (TRUG).
- 3Alchemy stands for free / freestyle alchemy.
- Alchemy stands for programming using Elixir.
Goals:
- Learning,
- Teaching,
- Free creativity.
- duration: 1 h
- (not recorded)
Has shown some basic Erlang/Elixir semantics and Elixir syntax.
links:
- duration: 2.5 h
- command line history:
/priv/history/session1.history
- code: checkout the first commit (tag: session1)
Has shown:
- how to use
mix
and create a new project usingmix new
, - how to use
tmuxinator
fortmux
, - IEx,
- function, module definition, pattern matching, IO output, etc.
- basic concurrency in Elixir/Erlang (
spawn
,send
,receive
), - processes that do tasks, processes that hold state, server processes,
:observer.start
.
The end result was a MessagePingPongRing that allows to create a ring of processes that exchange messages in turn to each other. New processes and messages can be added to the Ring at any time.
Sample output:
#PID<0.102.0>: #PID<0.100.0> I like
#PID<0.100.0>: #PID<0.101.0> Ruby
#PID<0.101.0>: #PID<0.102.0> Sopot
#PID<0.102.0>: #PID<0.100.0> Gdańsk
#PID<0.100.0>: #PID<0.101.0> I love
#PID<0.101.0>: #PID<0.102.0> Elixr
#PID<0.102.0>: #PID<0.100.0> I don't care
#PID<0.100.0>: #PID<0.101.0> Go
#PID<0.101.0>: #PID<0.102.0> I dislike
#PID<0.102.0>: #PID<0.100.0> Node.js
#PID<0.100.0>: #PID<0.101.0> PHP
Agenda:
- Distribution (Nodes)
- Intro to OTP
- GenServer
...
All TRUG organizers and participants (especially those who stay till the end of the sessions and get highly involved).