Elixir

Elixir School

概要

メッセージパッシング

マクロ

プロトコル

環境構築

asdfのインストール

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8
$ echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc
$ echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc
$ . .bashrc
$ sudo apt install automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev unzip curl
$ sudo apt install make libncurses5-dev
$ sudo apt install build-essential automake autoconf git squashfs-tools ssh-askpass pkg-config curl
$ sudo apt install fop xsltproc libxml2-utils

Erlang, Elixirのインストール

$ asdf plugin-add erlang
$ asdf plugin-add elixir
$ asdf install erlang 22.3.2
$ asdf install elixir 1.10.3-otp-22
$ asdf global erlang 22.3.2
$ asdf global elixir 1.10.3-otp-22 

バージョン確認

$ iex
Erlang/OTP 23 [erts-11.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] 
[async-threads:1] [hipe]

Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>

Phoenixのインストール

$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm install npm@latest -g
$ mix local.hex --force
$ mix local.rebar --force
$ mix archive.install hex phx_new 1.5.1 --force

Nervesのインストール

$ mix archive.install hex nerves_bootstrap

$ sudo apt install build-essential automake autoconf git squashfs-tools ssh-askpass
$ wget https://github.com/fhunleth/fwup/releases/download/v1.7.0/fwup_1.7.0_amd64.deb
$ sudo dpkg -i fwup_1.7.0_amd64.deb

WSLの場合

OTP(Open Telecom Platform)

Webフレームワーク

Phoenix

IoT

Nerves

対応CPUボード

USBガジェットモード

組み込み


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS