pminten (16) [Avatar] Offline
Just a suggestion, don't know if this is useful, but I'm missing a bit of discussion on Erlang's general I/O model. From a users perspective things I often want to do with a programming language include running external commands and using the network. If you look at the Elixir standard library documentation neither is well documented.

Perhaps it would be helpful if the book contains a few paragraphs about Erlangs I/O model: that it's implemented using processes called ports and a few pointers (for TCP look at gen_tcp in the Erlang docs, for external commands look at

Often one of the most frustrating parts of learning a new language is learning how things are called. Knowing that TCP in Elixir is done using Erlang's gen_tcp would help a lot.

As I said though, just a suggestion.
sjuric (86) [Avatar] Offline
Re: Erlangs I/O model (ports, gen_tcp, external commands)
Thanks for the suggestion. Those are good ideas, but I have to consider where could I place them.

In chapters 5 and 6 we're dealing a lot with processes, and some hints on how I/O works could be placed there, perhaps near the end of the chapter. Interacting with external world via ports would be cool to mention, though I'm unsure what's the appropriate place. This feels like it could also fit into chapter 5.

I'll consider whether I can provide some mention about gen_tcp, though I don't see it as a big issue. Googling with "erlang tcp" or "elixir tcp" will immediately point you to gen_tcp.