wslでelixir その19

# 概要
wsl(wsl2じゃない)で、elixirやってみた。
IEx.Helpers使ってみた。

# 実行結果

```
$ iex -S mix
Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.13.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :erlang.processes
[#PID<0.0.0>, #PID<0.1.0>, #PID<0.2.0>, #PID<0.3.0>, #PID<0.4.0>, #PID<0.5.0>,
 #PID<0.6.0>, #PID<0.7.0>, #PID<0.10.0>, #PID<0.42.0>, #PID<0.44.0>,
 #PID<0.46.0>, #PID<0.47.0>, #PID<0.49.0>, #PID<0.50.0>, #PID<0.51.0>,
 #PID<0.53.0>, #PID<0.54.0>, #PID<0.55.0>, #PID<0.56.0>, #PID<0.57.0>,
 #PID<0.58.0>, #PID<0.59.0>, #PID<0.60.0>, #PID<0.61.0>, #PID<0.62.0>,
 #PID<0.63.0>, #PID<0.64.0>, #PID<0.65.0>, #PID<0.66.0>, #PID<0.67.0>,
 #PID<0.68.0>, #PID<0.69.0>, #PID<0.70.0>, #PID<0.71.0>, #PID<0.72.0>,
 #PID<0.80.0>, #PID<0.83.0>, #PID<0.84.0>, #PID<0.85.0>, #PID<0.86.0>,
 #PID<0.87.0>, #PID<0.89.0>, #PID<0.90.0>, #PID<0.91.0>, #PID<0.92.0>,
 #PID<0.93.0>, #PID<0.94.0>, #PID<0.111.0>, #PID<0.112.0>, ...]
iex(2)> |> length
104
iex(3)> Application.loaded_applications()
[
  {:hex, 'hex', '2.0.0'},
  {:jason, 'A blazing fast JSON parser and generator in pure Elixir.\n',   '1.4.0'},
  {:compiler, 'ERTS  CXC 138 10', '8.2'},
  {:iex, 'iex', '1.13.4'},
  {:kernel, 'ERTS  CXC 138 10', '8.4.2'},
  {:mix, 'mix', '1.13.4'},
  {:ex_unit, 'ex_unit', '1.13.4'},
  {:elixir, 'elixir', '1.13.4'},
  {:public_key, 'Public key infrastructure', '1.13'},
  {:ssl, 'Erlang/OTP SSL application', '10.8.3'},
  {:logger, 'logger', '1.13.4'},
  {:asn1, 'The Erlang ASN1 compiler version 5.0.19', '5.0.19'},
  {:stdlib, 'ERTS  CXC 138 10', '4.0.1'},
  {:inets, 'INETS  CXC 138 49', '8.0'},
  {:crypto, 'CRYPTO', '5.1.1'},
  {:hello, 'hello', '0.1.0'}
]
iex(4)> Application.get_all_env(:ex)
[]
iex(5)> h

                                  IEx.Helpers

Welcome to Interactive Elixir. You are currently seeing the documentation for
the module IEx.Helpers which provides many helpers to make Elixir's shell more
joyful to work with.

This message was triggered by invoking the helper h(), usually referred to as
h/0 (since it expects 0 arguments).

You can use the h/1 function to invoke the documentation for any Elixir module
or function:

    iex> h(Enum)
    iex> h(Enum.map)
    iex> h(Enum.reverse/1)

You can also use the i/1 function to introspect any value you have in the
shell:

    iex> i("hello")

There are many other helpers available, here are some examples:

  ? b/1            - prints callbacks info and docs for a given module
  ? c/1            - compiles a file
  ? c/2            - compiles a file and writes bytecode to the given path
  ? cd/1           - changes the current directory
  ? clear/0        - clears the screen
  ? exports/1      - shows all exports (functions + macros) in a module
  ? flush/0        - flushes all messages sent to the shell
  ? h/0            - prints this help message
  ? h/1            - prints help for the given module, function or macro
  ? i/0            - prints information about the last value
  ? i/1            - prints information about the given term
  ? ls/0           - lists the contents of the current directory
  ? ls/1           - lists the contents of the specified directory
  ? open/1         - opens the source for the given module or function in
    your editor
  ? pid/1          - creates a PID from a string
  ? pid/3          - creates a PID with the 3 integer arguments passed
  ? port/1         - creates a port from a string
  ? port/2         - creates a port with the 2 non-negative integers passed
  ? pwd/0          - prints the current working directory
  ? r/1            - recompiles the given module's source file
  ? recompile/0    - recompiles the current project
  ? ref/1          - creates a reference from a string
  ? ref/4          - creates a reference with the 4 integer arguments
    passed
  ? runtime_info/0 - prints runtime info (versions, memory usage, stats)
  ? t/1            - prints the types for the given module or function
  ? v/0            - retrieves the last value from the history
  ? v/1            - retrieves the nth value from the history

Help for all of those functions can be consulted directly from the command line
using the h/1 helper itself. Try:

    iex> h(v/0)

To list all IEx helpers available, which is effectively all exports (functions
and macros) in the IEx.Helpers module:

    iex> exports(IEx.Helpers)

This module also includes helpers for debugging purposes, see IEx.break!/4 for
more information.

To learn more about IEx as a whole, type h(IEx).

iex(6)> pwd
/home/user/elixir/hello
iex(7)> ls
.formatter.exs     .gitignore         README.md          _build             deps
hello              lib                mix.exs            mix.lock           test
iex(8)> ls "hello"
/home/user/elixir/hello/hello
iex(9)> ls "lib"
hello.ex
iex(10)> runtime_info

## System and architecture

Elixir version:     1.13.4
Erlang/OTP version: 25
ERTS version:       13.0.4
Compiled for:       x86_64-pc-linux-gnu
Schedulers:         2
Schedulers online:  2

## Memory

Total:              25 MB
Atoms:              584 KB
Binaries:           87 KB
Code:               13 MB
ETS:                686 KB
Processes:          5 MB

## Statistics / limits

Uptime:             3 minutes and 34 seconds
Run queue:          1
Atoms:              20675 / 1048576 (1% used)
ETS:                40 / 8192 (0% used)
Ports:              3 / 65536 (0% used)
Processes:          104 / 262144 (0% used)

Showing topics:     [:system, :memory, :limits]
Additional topics:  [:applications]

To view a specific topic call runtime_info(topic)

iex(11)> cd "lib"
/home/user/elixir/hello/lib
iex(12)> pwd
/home/user/elixir/hello/lib
iex(13)>




```


以上。