AstonJ

AstonJ

[Erlang] Programming Erlang (Pragprog)

by Joe Armstrong

A multi-user game, web site, cloud application, or networked database can have thousands of users all interacting at the same time. You need a powerful, industrial-strength tool to handle the really hard problems inherent in parallel, concurrent environments. You need Erlang. In this second edition of the bestselling Programming Erlang, you’ll learn how to write parallel programs that scale effortlessly on multicore systems.


Using Erlang, you’ll be surprised at how easy it becomes to deal with parallel problems, and how much faster and more efficiently your programs run. That’s because Erlang uses sets of parallel processes—not a single sequential process, as found in most programming languages.

Joe Armstrong, creator of Erlang, introduces this powerful language in small steps, giving you a complete overview of Erlang and how to use it in common scenarios. You’ll start with sequential programming, move to parallel programming and handling errors in parallel programs, and learn to work confidently with distributed programming and the standard Erlang/Open Telecom Platform (OTP) frameworks.

You need no previous knowledge of functional or parallel programming. The chapters are packed with hands-on, real-world tutorial examples and insider tips and advice, and finish with exercises for both beginning and advanced users.

The second edition has been extensively rewritten and covers Erlang R17 features. New to this edition are seven chapters covering the latest Erlang features: maps, the type system and the Dialyzer, WebSockets, programming idioms, and a new stand-alone execution environment. You’ll write programs that dynamically detect and correct errors, and that can be upgraded without stopping the system. There’s also coverage of rebar (the de facto Erlang build system), and information on how to share and use Erlang projects on github, illustrated with examples from cowboy and bitcask.

Erlang will change your view of the world, and of how you program.

Don’t forget you can get 35% off the ebook using the code ‘devtalk.com:023:

Most Liked

Ted

Ted

In my ongoing endeavor to learn Elixir, Programming Erlang was the second book I read; the first being Programming Elixir >= 1.6.

This may seem like an interesting trajectory for an Elixir noob, but in retrospect I think it was an excellent decision, given my background and learning style.

Here’s how it is: I’m a Java programmer by trade with almost 20 years under my belt, and along the way I’ve dabbled in other JVM languages like Groovy, Scala, and Clojure, with the latter capturing my attention the most.

So, my background is working in the language “closest” to its virtual machine, and branching out from there.

Also, my learning style favors a linear, comprehensive, foundational approach: I seek out materials and approaches that imply “okay, if you just stick with this path, you’ll have a solid foundation by the end.”

I think this is why a gravitate towards books instead of blogs, tutorials, etc.

At any rate, I worked through half of Programming Elixir >= 1.6 and felt a bit lost; things were going too fast for me.

That’s when I thought, “Okay, let’s slow down. What can I read that appears to be foundational and comprehensive?”

I landed on Programming Erlang because things don’t get any more foundational than Erlang and I knew I was in for a treat, having previously read Joe Armstrong’s doctoral thesis; I’m delighted to say it was everything I was hoping for.

It’s clear that Joe had a real gift for explaining things; the prose is patient yet concise and digs into details without belaboring the point.

The progression from sequential programming to concurrency feels steady and natural; by the time we reached concurrency I was ready to see what it was all about. (This is in stark contrast to the premise of tackling concurrency in Java, which is scary and better left to the experts.)

The latter third of the book provides a lot of valuable exposure to other details of the BEAM and its ecosystem, e.g., distributed programming, tracing, logging, monitoring, etc.

In all, this was exactly the sort of foundation I was seeking and I feel that my subsequent and ongoing travels in Elixirland have benefitted tremendously from my side-trip into Erlang.

AstonJ

AstonJ

Fantastic review, thanks for posting Ted!!

I had originally planned to read this book after all my Elixir books, but your review has made me want to read it sooner.

Only thing is I miss Joe, and reading his book will probably make me feel quite emotional :cry:

I think I might read it after Programming Phoenix, since I’ll have gotten most of the beginners books out of the way and the rest are mainly about OTP, systems architecture or more advanced topics.

Did you read the book start to finish? Is that how you recommend it is read?

Ted

Ted

And thank you for the nudge in posting the review! :023:

My trick was to play a cycle of “Hello Robert / Mike / Joe!” in my mind at every ah-ha moment, of which there were many. :smile:

That might work out really well; the last handful of chapters are about OTP and systems, starting with building up a hand-rolled version of GenServer.

That’ll probably be a really nice segue into your remaining reading list.

Yes, I usually read books cover-to-cover, even on the occasion when they suggest jumping around because I’m usually seeking that foundation and exposure.

I recommend reading this one start-to-finish: there’s no overarching project being built throughout the book, but the chapters do build on each other.

And even in the introductory “this is a list, this a tuple, …” material, there were plenty of nuggets that had me thinking “okay, so that’s why Elixir does what it does”, although YMMV because I only had a very rudimentary familiarity with Elixir at the time.

Last Post!

kodepett

kodepett

Looks like I’m late to the party, hopefully I’m not too late. I’ve been going through this book for the past fews days, currently on lesson 4. I’m stuck wrapping my head around the below list comprehension example on page 63. It deals with anagram.

perms([]) -> [[]];
perms(L) -> [[H | T] || H <- L, T <- perms(L -- [H])].

I’ve difficulty in comprehending how the generator for T works; T <- perms(L -- [H]). I assume perms is supposed to build a list, how’s that going to work?
Thanks a bunch.

Where Next?

Popular in Books Top

AstonJ
by Dave Thomas This book is the introduction to Elixir for experienced programmers, completely updated for Elixir 1.6 and beyond. Explor...
New
AstonJ
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ :023:
New
AstonJ
https://www.packtpub.com/sites/default/files/B04907_MockupCover_Normal.jpg by Kenny Ballou Elixir, based on Erlang’s virtual machine a...
New
peerreynders
Don’t forget you can get 35% off the ebook using the code: devtalk.com :023: Note: Check out this thread for help running code in lat...
New
collegeimprovements
by @whatyouhide and @idlehands Elixir offers new paradigms, and challenges you to test in unconventional ways. Start with ExUnit: almost...
New
PragmaticBookshelf
Frank Hunleth @fhunleth Bruce A. Tate @redrapids edited by Jacquelyn Carter @jkcarter Want to get better at coding Elixir? Write a har...
New
PragmaticBookshelf
Bruce Tate @redrapids edited by Jacquelyn Carter @jkcarter Elixir is a functional language that crosses many boundaries. With a syntax b...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement