This file contains 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 my.ex | |
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
Interactive Elixir (0.13.3-dev) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(1)> use My | |
nil | |
iex(2)> 3&&4 | |
81.0 |
This file contains 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)> OptionParser.parse(["--hello", "world"]) | |
{[hello: "world"], [], []} | |
iex(2)> OptionParser.parse(["--hello", "world"], switches: [hello: [:string]]) | |
{[hello: "world"], [], []} | |
iex(3)> OptionParser.parse(["--hello", "world"], switches: [hello: [:string, :optional]]) | |
{[hello: nil], ["world"], []} | |
iex(4)> OptionParser.parse(["--hello=world"], switches: [hello: [:string, :optional]]) |
This file contains 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 -S mix | |
iex(1)> Dbg.trace(self(), :call) | |
{:ok, [{:matched, :nonode@nohost, 1}]} | |
iex(2)> Dbg.call(Mix.Task, :stack) | |
{:ok, [{:matched, :nonode@nohost, 20}, {:saved, 1}]} | |
iex(3)> args = [] | |
[] | |
iex(4)> Mix.Task.run("run", ["test/fixtures/help_cmd.exs"|args]) | |
:noop | |
iex(5)> |
This file contains 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)> raise 'foo' | |
** (ArgumentError) argument error | |
:erlang.apply('foo', :exception, [[]]) |
This file contains 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)> bin = "HELLO" | |
"HELLO" | |
iex(2)> raise ArgumentError, message: 'Unsupported or invalid status #{bin}' | |
** (ArgumentError) Unsupported or invalid status HELLO |
This file contains 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
bin = "HELLO" | |
spawn(fn -> | |
raise ArgumentError, message: "Unsupported or invalid status #{bin}" | |
end) |
This file contains 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
λ mix run example/example_alternative.exs | |
Compiled lib/uweb/router.ex | |
Generated uweb.app | |
** (FunctionClauseError) no function clause matching in MicroWeb.Router.mount/2 | |
(uweb) /Users/alco/home/projects/uweb/example/example_alternative.exs:8: MicroWeb.Router.mount/2 | |
/Users/alco/home/projects/uweb/example/example_alternative.exs:8: Router (module) |
This file contains 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 Fib do | |
def fib(0), do: 0 | |
def fib(1), do: 1 | |
def fib(n), do: fib(n-1) + fib(n-2) | |
end | |
IO.puts Fib.fib(20) |
This file contains 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
** (FunctionClauseError) no function clause matching in :lists.prefix/2 | |
(stdlib) lists.erl:190: :lists.prefix("/Users/alco/Documents/git/ubuntu-erlang-elixir/elixir-v0.13.1/elixir/bin/../lib", '/Users/alco/Documents/git/ubuntu-erlang-elixir/elixir-v0.13.1/elixir/bin/../lib/elixir/ebin/Elixir.String.beam') | |
lib/ex_doc/html_formatter/autolink.ex:116: ExDoc.HTMLFormatter.Autolink.get_source/2 | |
lib/ex_doc/html_formatter/autolink.ex:88: anonymous fn/4 in ExDoc.HTMLFormatter.Autolink.typespec/3 | |
(elixir) lib/enum.ex:1819: anonymous fn/4 in Enum.map_join/3 | |
(elixir) lib/enum.ex:1241: Enum."-reduce/3-lists^foldl/2-0-"/3 | |
(elixir) lib/macro.ex:331: Macro.to_string/2 | |
(elixir) lib/macro.ex:380: Macro.to_string/2 | |
lib/ex_doc/retriever.ex:7: ExDoc.TypeNode.update_spec/2 |
This file contains 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
ex_doc master | |
elixir v0.13.1 | |
λ ../ex_doc/bin/ex_doc "PhoEnix" "134" _build/dev/lib/timex/ebin -m Timex -u "https://github.com/GITHUB_USER/GITHUB_REPO" | |
** (ExDoc.Retriever.Error) module Timex.Date.Convert.Timex.DateTime is not defined/available | |
lib/ex_doc/retriever.ex:54: ExDoc.Retriever.get_module/2 | |
(elixir) lib/enum.ex:962: Enum."-map/2-lc$^0/1-0-"/2 | |
lib/ex_doc/retriever.ex:38: ExDoc.Retriever.docs_from_modules/2 | |
lib/ex_doc.ex:17: ExDoc.generate_docs/3 | |
(elixir) src/elixir_lexical.erl:17: :elixir_lexical.run/2 |