
Programming Elixir = 1.6
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
This book is the introduction to Elixir for experienced programmers, completely updated for Elixir 1.6 and beyond. Explore functional programming without the academic overtones (tell me about monads just one more time). Create concurrent applications, butget them right without all the locking and consistency headaches. Meet Elixir, a modern, functional, concurrent language built on the rock-solid Erlang VM. Elixir's pragmatic syntax and built-in support for metaprogramming will make you productive and keep you interestedfor the long haul. Maybe the time is right for the Next Big Thing. Maybe it's Elixir.
Functional programming techniques help you manage the complexities of today's real-world, concurrent systems; maximize uptime; and manage security. Enter Elixir, with its modern, Ruby-like, extendable syntax, compile and runtime evaluation, hygienic macro system, and more. But, just as importantly, Elixir brings a sense of enjoyment to parallel,functional programming. Your applications become fun to work with, and the language encourages you to experiment.
Part 1 covers the basics of writing sequential Elixir programs. We'll look at the language, the tools, and the conventions. Part 2 uses these skills to start writing concurrent code-applications that use all the cores on your machine, or all the machines on your network! And we do it both with and without OTP. Part 3 looks at the more advanced features of the language, from DSLs and code generation to extending the syntax.
This edition is fully updated with all the new features of Elixir 1.6, with a new chapter on structuring OTP applications, and new sections on the debugger, code formatter, Distillery, and protocols.
What You Need:
You'll need a computer, a little experience with another high-levellanguage, and a sense of adventure. No functional programmingexperience is needed.
More details
Other editions
Additional editions

Person
Dave Thomas, is a programmer who likes to evangelize cool stuff. He cowrote The Pragmatic Programmer, and was one of the creators of the Manifesto for Agile Software Development. His book Programming Ruby introduced the Ruby language to the world, and Agile Web Development with Rails helped kickstart the Rails revolution.
Content
- Cover
- Table of Contents
- Foreword
- A Vain Attempt at a Justification, Take Two
- Acknowledgments
- 1. Take the Red Pill
- Programming Should Be About Transforming Data
- Installing Elixir
- Running Elixir
- Suggestions for Reading the Book
- Exercises
- Think Different(ly)
- Part I-Conventional Programming
- 2. Pattern Matching
- Assignment: I Do Not Think It Means What You Think It Means.
- More Complex Matches
- Ignoring a Value with _ (Underscore)
- Variables Bind Once (per Match)
- Another Way of Looking at the Equals Sign
- 3. Immutability
- You Already Have (Some) Immutable Data
- Immutable Data Is Known Data
- Performance Implications of Immutability
- Coding with Immutable Data
- 4. Elixir Basics
- Built-in Types
- Value Types
- System Types
- Collection Types
- Maps
- Binaries
- Dates and Times
- Names, Source Files, Conventions, Operators, and So On
- Variable Scope
- End of the Basics
- 5. Anonymous Functions
- Functions and Pattern Matching
- One Function, Multiple Bodies
- Functions Can Return Functions
- Passing Functions as Arguments
- Functions Are the Core
- 6. Modules and Named Functions
- Compiling a Module
- The Function's Body Is a Block
- Function Calls and Pattern Matching
- Guard Clauses
- Default Parameters
- Private Functions
- The Amazing Pipe Operator: |&
- Modules
- Module Attributes
- Module Names: Elixir, Erlang, and Atoms
- Calling a Function in an Erlang Library
- Finding Libraries
- 7. Lists and Recursion
- Heads and Tails
- Using Head and Tail to Process a List
- Using Head and Tail to Build a List
- Creating a Map Function
- Reducing a List to a Single Value
- More Complex List Patterns
- The List Module in Action
- Get Friendly with Lists
- 8. Maps, Keyword Lists, Sets, and Structs
- How to Choose Between Maps, Structs, and Keyword Lists
- Keyword Lists
- Maps
- Pattern Matching and Updating Maps
- Updating a Map
- Structs
- Nested Dictionary Structures
- Sets
- With Great Power Comes Great Temptation
- 9. An Aside-What Are Types?
- 10. Processing Collections-Enum and Stream
- Enum-Processing Collections
- Streams-Lazy Enumerables
- The Collectable Protocol
- Comprehensions
- Moving Past Divinity
- 11. Strings and Binaries
- String Literals
- The Name "strings"
- Single-Quoted Strings-Lists of Character Codes
- Binaries
- Double-Quoted Strings Are Binaries
- Binaries and Pattern Matching
- Familiar Yet Strange
- 12. Control Flow
- if and unless
- cond
- case
- Raising Exceptions
- Designing with Exceptions
- Doing More with Less
- 13. Organizing a Project
- The Project: Fetch Issues from GitHub
- Step 1: Use Mix to Create Our New Project
- Transformation: Parse the Command Line
- Write Some Basic Tests
- Refactor: Big Function Alert
- Transformation: Fetch from GitHub
- Step 2: Use Libraries
- Transformation: Convert Response
- Transformation: Sort Data
- Transformation: Take First n Items
- Transformation: Format the Table
- Step 3: Make a Command-Line Executable
- Step 4: Add Some Logging
- Step 5: Create Project Documentation
- Coding by Transforming Data
- 14. Tooling
- Debugging with IEx
- Testing
- Code Dependencies
- Server Monitoring
- Source-Code Formatting
- Inevitably, There's More
- Part II-Concurrent Programming
- 15. Working with Multiple Processes
- A Simple Process
- Process Overhead
- When Processes Die
- Parallel Map-The "Hello, World" of Erlang
- A Fibonacci Server
- Agents-A Teaser
- Thinking in Processes
- 16. Nodes-The Key to Distributing Services
- Naming Nodes
- Naming Your Processes
- Input, Output, PIDs, and Nodes
- Nodes Are the Basis of Distribution
- 17. OTP: Servers
- Some OTP Definitions
- An OTP Server
- GenServer Callbacks
- Naming a Process
- Tidying Up the Interface
- Making Our Server into a Component
- 18. OTP: Supervisors
- Supervisors and Workers
- Worker Restart Options
- Supervisors Are the Heart of Reliability
- 19. A More Complex Example
- Introduction to Duper
- The Duper Application
- But Does It Work?
- Planning Your Elixir Application
- Next Up
- 20. OTP: Applications
- This Is Not Your Father's Application
- The Application Specification File
- Turning Our Sequence Program into an OTP Application
- Supervision Is the Basis of Reliability
- Releasing Your Code
- Distillery-The Elixir Release Manager
- OTP Is Big-Unbelievably Big
- 21. Tasks and Agents
- Tasks
- Agents
- A Bigger Example
- Agents and Tasks, or GenServer?
- Part III-More Advanced Elixir
- 22. Macros and Code Evaluation
- Implementing an if Statement
- Macros Inject Code
- Using the Representation as Code
- Using Bindings to Inject Values
- Macros Are Hygienic
- Other Ways to Run Code Fragments
- Macros and Operators
- Digging Deeper
- Digging Ridiculously Deep
- 23. Linking Modules: Behavio(u)rs and use
- Behaviours
- use and __using__
- Putting It Together-Tracing Method Calls
- Use use
- 24. Protocols-Polymorphic Functions
- Defining a Protocol
- Implementing a Protocol
- The Available Types
- Protocols and Structs
- Built-in Protocols
- Protocols Are Polymorphism
- 25. More Cool Stuff
- Writing Your Own Sigils
- Multi-app Umbrella Projects
- But Wait! There's More!
- A1. Exceptions: raise and try, catch and throw
- Raising an Exception
- catch, exit, and throw
- Defining Your Own Exceptions
- Now Ignore This Appendix
- A2. Type Specifications and Type Checking
- When Specifications Are Used
- Specifying a Type
- Defining New Types
- Specs for Functions and Callbacks
- Using Dialyzer
- Bibliography
- Index
- - SYMBOLS -
- - A -
- - B -
- - C -
- - D -
- - E -
- - F -
- - G -
- - H -
- - I -
- - J -
- - K -
- - L -
- - M -
- - N -
- - O -
- - P -
- - Q -
- - R -
- - S -
- - T -
- - U -
- - V -
- - W -
- - X -
- - Z -
System requirements
File format: ePUB
Copy protection: Watermark-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reading software that can process the file format ePUB: e.g., Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Before downloading, install the free app Adobe Digital Editions (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Watermark-DRM, a „soft” copy protection. This means that there are no technical restrictions to prevent illegal distribution. However, there is a personalised watermark embedded in the eBook that can be used to identify the purchaser of the eBook in the event of misuse and to provide evidence for legal purposes.
For more information, see our eBook Help page.