This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> increment = &Map.update!(&1, :count, fn(x) -> x + 1 end) | |
#Function<6.106461118/1 in :erl_eval.expr/5> | |
iex(2)> increment = fn(x) -> x[:count] = x[:count] + 1 end | |
** (ArgumentError) dynamic access cannot be invoked inside match and guard clauses | |
(elixir) expanding macro: Kernel.access/2 | |
(elixir) iex:2: :elixir_compiler.__FILE__/2 | |
iex(2)> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule BankAccount do | |
def start do | |
await([]) | |
end | |
def await(events) do | |
receive do | |
{:check_balance, pid} -> divulge_balance(pid, events) | |
{:deposit, amount} -> events = deposit(amount, events) | |
{:withdraw, amount} -> events = withdraw(amount, events) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) test fetch many packages (HexWeb.API.RouterTest) | |
test/hex_web/api/router_test.exs:469 | |
Assertion with == failed | |
code: conn.status() == 200 | |
lhs: 500 | |
rhs: 200 | |
stacktrace: | |
test/hex_web/api/router_test.exs:473 | |
......16:55:48.086 [error] ** (Protocol.UndefinedError) protocol JSON.Encoder not implemented for {:week, 1} | |
lib/json/encoder.ex:216: JSON.Encoder.Any.to_json/2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/hex_web] feature/fix_file_state_record(+12/-13) ± mix test | |
The database for repo HexWeb.Repo has been dropped. | |
The database for repo HexWeb.Repo has been created. | |
15:52:53.463 [warning] lager_error_logger_h dropped 58 messages in the last second that exceeded the limit of 50 messages/sec | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128201839_add_users_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128205233_add_packages_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128213400_add_releases_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128213543_add_requirements_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140220143758_add_registries_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140316111040_add_keys_table.exs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/hex_web] master(+10/-11) ± mix test | |
The database for repo HexWeb.Repo has already been dropped. | |
The database for repo HexWeb.Repo has been created. | |
14:47:16.373 [warning] lager_error_logger_h dropped 58 messages in the last second that exceeded the limit of 50 messages/sec | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128201839_add_users_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128205233_add_packages_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128213400_add_releases_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140128213543_add_requirements_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140220143758_add_registries_table.exs | |
* running UP _build/test/lib/hex_web/priv/migrations/20140316111040_add_keys_table.exs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/hex_web] master(+10/-11) ± mix test | |
* Compiling ranch | |
==> ranch (compile) | |
* Compiling poolboy | |
==> poolboy (compile) | |
* Compiling envy | |
==> envy (compile) | |
* Compiling jazz | |
* Compiling decimal | |
* Compiling cowlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/elixir] master ± iex | |
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] | |
Interactive Elixir (0.13.2-dev) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(1)> Process.delete | |
[iex_history_start_counter: 1, iex_history_counter: 1] | |
** (ArithmeticError) bad argument in arithmetic expression | |
(iex) lib/iex/history.ex:43: IEx.History.limit_histo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/hex_web] master(+9/-9) ± mix deps.compile | |
* Compiling ex_doc | |
make: `priv/markdown.so' is up to date. | |
* Compiling ranch | |
==> ranch (compile) | |
* Compiling poolboy | |
==> poolboy (compile) | |
Compiled src/poolboy_worker.erl | |
Compiled src/poolboy_sup.erl | |
src/poolboy.erl:16: Warning: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/hex_web] master ± mix deps.compile | |
* Compiling ex_doc | |
git submodule update --init | |
Submodule 'sundown' (git://github.com/josevalim/sundown.git) registered for path 'sundown' | |
Cloning into 'sundown'... | |
Submodule path 'sundown': checked out '49c3b1323134e973815fb283163ef39b7bda4c6a' | |
cd sundown && make | |
make[1]: Entering directory `/home/jadams/elixir/hex_web/deps/ex_doc/sundown' | |
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml -c -o src/markdown.o src/markdown.c | |
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml -c -o src/stack.o src/stack.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jadams:/home/jadams/elixir/elixir] master ± iex | |
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] | |
*** Shell process terminated! (^G to start new job) *** | |
=ERROR REPORT==== 1-May-2014::13:04:24 === | |
Error in process <0.41.0> with exit value: {badarg,[{erlang,apply,[#{commands=>[],compile=>[],compiler_options=>[],errors=>[],halt=>true,output=><<1 byte>>,verbose_compile=>false},halt,[]],[]},{'Elixir.Kernel.CLI',process_shared,2,[{file,"lib/kernel/cli.ex"},{line,141}]},{'Elixir.Kernel.CLI'... |