Sunday, April 9, 2017

Debugging in elixir. Old erlang version got into my way.

Today, some dialyzer stuff, but mainly debugging with Elixir was my study subject and so first I ran into iex telling me "Could not find 'wxe_driver.so'" on running :debugger.start(). Then I read that debugger starts anyway, so I tried simple :int.ni(Module), but was greeted with "no beam found for Elixir.Module". Read more and it pointed to Erlang version being lower than 19. Really iex and elixir --version were telling its 18 that is being started. Using brew upgrade erlang or elixir, brew reinstall - same thing. A year ago I installed erlang from the official installer here (https://www.erlang-solutions.com/resources/download.html). Looked there and there is an even version manager for the Erlang on OSX now?! Cool:



This surely helped to have version of erlang as 19.3 for elixir now and all the debugger stuff worked as expected.

I'm looking more and more into the Sasa Juric blackjack example as I'm kind of getting a bit sad about the book I wanted to read as a practical guide to building elixir/OTP apps: https://pragprog.com/book/lhelph/functional-web-development-with-elixir-otp-and-phoenix
I'm kinda on Sasa's side of analysis how the functional apps should be built and the book mentioned is not leading in the right way I believe. I'm still at its start though, author may still refactor his approach later... :).

Sasa uses dialyzer in his example and I read before that it is a good idea to use it, so studied today on this and typespecs in Elixir as well: http://elixir-lang.org/getting-started/typespecs-and-behaviours.html. I also loved a TDD example on building roman numbers converter here: https://medium.com/@barruumrex/seeking-simple-satisfaction-2a098902ddff


Post a Comment