Further side-quest to become comfortable with IEx/mix/dbg/pry. Learning commandline debugging since I’ve not been able to figure out how to launch a debuggable commandline program from VSCode.
[Read More]Setting up VSCode for Elixir Development
Setting up a VSCode environment before tackling the Chapter 13 exercises.
A side-foray into tooling after being away for a few days.
[Read More]Programming Elixir Chapter 12 Notes
Control Flow
Elixir has an unless
keyword, which I don’t recall seeing in any other language I’ve used.
“Elixir exceptions are intended for things that should never happen in normal operation”
Trailing !
in a function name is an Elixir convention indicating failure raises an exception.
We’ve already seeing this in the File.open!
call in previous exercises.
Programming Elixir Chapter 11 Notes
Strings and Binaries
Strings are UTF-8 encoded.
[Read More]Programming Elixir Chapter 10 Notes
Processing Collections—Enum and Stream
Earlier chapters focused on list processing via recursion. Now we’re getting into the more familiar iterables.
[Read More]Programming Elixir Chapter 8 and 9 Notes
Maps, Keyword Lists, etc. and Types
Chapter 8 is a dense chapter on an extremely useful set of features. Will become a reference chapter when starting to build Elixir projects as I’m very used to using maps, structs, etc.
Chapter 9 is a quick aside on types.
Neither chapter has exercises.
[Read More]Programming Elixir Chapter 7 Notes
Lists and Recursions
Making the best of recursion.
[Read More]Programming Elixir Chapter 6 Notes
Modules and Named Functions
It takes awhile to get used to not seeing function return
statements.
Drives home the point that everything is an evaluation.
Programming Elixir Chapter 5 Notes
Anonymous Functions
Unlike Python lambda functions, Elixir anonymous functions can be arbitrarily complex (though I guess there is a limit to what is practicable from a maintainability point of view).
[Read More]Exiting IEx
Exiting VIM is Easy
In order to exit the interactive Elixir shell (iex), all you need do is type:
Ctrl-c
twice; orCtrl-g
,q
,<Return>
; or sometimesCtrl-\
Missed the opportunity to allow :q
.