Book Image

Elixir Cookbook

By : Paulo Pereira
Book Image

Elixir Cookbook

By: Paulo Pereira

Overview of this book

Table of Contents (16 chapters)
Elixir Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index

A

  • add_user function / How it works…
  • Agent.get function / How it works…
  • Agent.update function / How it works…
  • Agent module
    • about / Using agents as an abstraction around states
  • application configuration
    • managing / How to do it…, How it works…
  • Application module
    • URL / See also
  • applications
    • deploying / Deploying applications and updating a running system, How it works…
  • atoms / How to do it…

B

  • @behaviour module attribute
    • using / How to do it…, How it works…
  • behaviors
    • about / Introduction
    • Supervisor / There's more…
    • GenEvent / There's more…
    • Application / There's more…
  • binary concatenation operator (<>)
    • used, for joining strings / Joining strings
  • Bullet
    • about / There's more…
    • URL / There's more…

C

  • channels / Creating a Phoenix application
  • code
    • executing, in different node / Executing code in a different node, How it works…
  • codepoint / Introduction
  • code_change function / How it works…
  • concurrent function / How it works…
  • conf function / How it works…
  • conform
    • URL / There's more…
  • constants
    • module attributes, using as / Using module attributes as constants, How to do it…, See also
  • controller
    • creating / Creating a controller, How to do it…, How it works…
  • Cowboy
    • about / Introduction
    • setting up / Setting up Cowboy, How to do it…, How it works…, See also
  • custom Mix tasks
    • creating / Creating custom Mix tasks, How to do it…, How it works…

D

  • dependencies
    • managing / Managing dependencies, How to do it…, How it works…
  • dev / Managing application configuration
  • documentation
    • accessing, within IEx / Getting help and accessing documentation within IEx, How to do it…, How it works…, There's more…
    • help, getting in IEx / Getting help and accessing documentation within IEx, How to do it…, How it works…, There's more…

E

  • Ecto project
    • URL / There's more…
  • Elixir
    • Erlang, using from / Using Erlang from Elixir, There's more…
    • strings / Introduction
    • modules / Introduction
    • availability feature / Deploying applications and updating a running system
    • OS commands, using / Using OS commands from within Elixir, How to do it…, How it works…
    • URL / Installing Elixir
    • installing / Installing Elixir
    • references / Elixir
  • Elixir application
    • creating, with Mix / Creating a simple application, How to do it…, How it works…
    • URL / How it works…
  • Elixir documentation, Mix.Tasks
    • URL / See also
  • Elixir Release Manager (exrm) / Packaging and releasing an OTP application
  • Enum.reduce/3 function
    • using / There is more…
  • Enum.zip/2 function / How it works…
  • enumerables
    • mapping / Mapping and reducing enumerables, How to do it…, How it works…
    • reducing / Mapping and reducing enumerables, How to do it…, How it works…
    • working with / How to do it…
  • Erlang
    • URL / Getting ready, Erlang
    • using, from Elixir / Using Erlang from Elixir, There's more…
  • erlang-oauth application
    • URL / How it works…
  • Erlang VM
    • about / Making code run on all available CPUs
  • Erlang VM scheduler
    • computations, distributing through available CPUs / How to do it…, How it works…
  • errors
    • handling / Handling errors and managing exceptions, How to do it…, How it works…, There's more…
    • using / How it works…
  • escript option / Getting ready
  • ETS
    • about / Using an ETS table to share the state
  • ETS table
    • used for sharing state / Using an ETS table to share the state, How to do it…, How it works…
  • exceptions
    • managing / Handling errors and managing exceptions, How to do it…, How it works…, There's more…
  • exits
    • using / How it works…
  • extwitter / Getting Twitter data

F

  • fetch_url(url) function / How it works…
  • fetch_url function / How it works…
  • file
    • streaming, as resource / Streaming a file as a resource, How to do it…, How it works…
  • flush command / How it works…
  • function definitions
    • guard clauses, using / Using guard clauses and pattern matching in function definitions, How to do it…, How it works…
    • pattern matching, using / Using guard clauses and pattern matching in function definitions, How to do it…, How it works…
  • functions
    • with default arguments, defining / Defining functions with default arguments, How it works…

G

  • GenServer
    • implementing / Implementing a GenServer, How to do it…, How it works…, There's more…
    • expanding / Expanding our server, How it works…
    • URL / See also
  • gen_server module
    • URL / See also
  • get function / How it works…
  • guard clauses
    • using, in function definitions / Using guard clauses and pattern matching in function definitions, How to do it…, How it works…

H

  • HashDict / How it works…
  • hex.pm
    • URL / How it works…
  • Hex package manager
    • URL / Managing dependencies
  • Hex usage
    • URL / See also
  • HTTPoison
    • URL / Getting ready
  • HTTPoison response
    • pattern matching / Pattern matching an HTTPoison response, How it works…

I

  • ID3 v1 tag
    • URL / How it works…
  • IEx
    • about / Introduction
    • used, for prototyping ideas / Using the terminal to prototype and test ideas, How it works…
    • used, for testing ideas / Using the terminal to prototype and test ideas, How it works…
    • URL / Getting ready
    • documentation, getting help / How to do it…, How it works…
    • documentation, accessing / How to do it…, How it works…
    • system, inspecting / Inspecting your system in IEx, How to do it…, See also
  • immutability of data
    • about / Understanding immutability, Getting ready
    • demonstrating / How to do it…, How it works…
  • init function / How it works…
    • about / How it works…
  • insert_replaced function / How it works…
  • integers / How to do it…
  • is_binary function / How it works…
  • is_list function / How it works…

J

  • join function / How it works…

K

  • key/value store
    • creating, with map / Creating a key/value store with a map, How to do it…, How it works…
    • about / Using an ETS table to share the state
    • creating / Getting ready
  • keyword list
    • about / How it works…
    • manipulating / Creating and manipulating keyword lists, How to do it…, How it works…
    • creating / Creating and manipulating keyword lists, How to do it…, How it works…

L

  • lazy (even infinite) sequences
    • generating / Generating lazy (even infinite) sequences, How it works…, There is more…
  • List.foldl/3 function / How to do it…
  • lists
    • adding / Adding and subtracting lists, How it works…
    • subtracting / Adding and subtracting lists, How it works…
    • adding, with ++ operator / How to do it…
    • subtracting, with -- operator / How to do it…
    • tuples, combining into / Combining tuples into a list, How it works…
  • locate function / How it works…

M

  • map
    • about / Creating a key/value store with a map
    • used, for creating key/value store / Creating a key/value store with a map, How to do it…, How it works…
  • Map.new/0 function / How to do it…
  • messages
    • between processes, sending / Sending messages between processes, Getting ready, How to do it…, How it works…, There's more…
  • metadata
    • reading, from MP3 files / Reading and writing metadata from MP3 files, How to do it…, How it works…, There's more…
    • writing, from MP3 files / Reading and writing metadata from MP3 files, How it works…
    • references / There's more…
  • Mix
    • about / Introduction
    • used, for creating Elixir application / How to do it…, How it works…
  • module
    • using, in scripted mode / Using a module in the scripted mode, How to do it…
  • module attributes
    • using, as constants / Using module attributes as constants, How to do it…, See also
  • module directives
    • using / Using module directives, How to do it…, How it works…
  • modules
    • loading / Loading and compiling modules, How to do it…, How it works…
    • compiling / Loading and compiling modules, How to do it…, How it works…
    • about / Introduction
    • namespacing / Namespacing modules, There's more…
    • documenting / Documenting modules, How to do it…
  • MP3 files
    • metadata, writing / Reading and writing metadata from MP3 files, How to do it…, How it works…
    • metadata, reading / Reading and writing metadata from MP3 files, How to do it…, How it works…, There's more…
  • multiple concurrent computations
    • performing, with Task module / Using tasks to perform multiple concurrent computations, Getting ready, How to do it…, How it works…, There's more…

N

  • named nodes
    • creating / Creating named nodes, Getting ready, How it works…
  • Node.spawn function / How it works…
  • nodes
    • connecting / Connecting nodes, How it works…, See also

O

  • ++ operator
    • used, for adding lists / How to do it…
  • -- operator
    • used, for subtracting lists / How to do it…
  • = operator / How it works…
  • Observer
    • used, for inspecting system / Inspecting your system with Observer, How to do it…
    • using, for inspecting supervisors / Using Observer to inspect supervisors and processes, How to do it…, How it works…
    • using, for inspecting processes / Using Observer to inspect supervisors and processes, How to do it…, How it works…
  • operations
    • combining, |> operator / Combining operations with the |> operator, Getting ready, How to do it…, How it works…
  • OptionParse.parse function / How it works…
  • OS commands
    • using, from Elixir / Using OS commands from within Elixir, How to do it…, How it works…
  • OTP
    • about / Introduction
  • OTP application
    • packaging / Packaging and releasing an OTP application, How to do it…, How it works…, There's more…
    • releasing / Packaging and releasing an OTP application, How to do it…, How it works…, See also
  • |> operator
    • used, for combining operations / Combining operations with the |> operator, Getting ready, How to do it…, How it works…

P

  • pattern matching
    • using / Using pattern matching, How to do it…, How it works…
    • HTTPoison response / Pattern matching an HTTPoison response, How it works…
    • using, in function definitions / Getting ready, How to do it…, How it works…
  • patterns
    • string codepoints, replacing with / Replacing string codepoints with patterns, How it works…
  • Perl Compatible Regular Expressions (PCRE) / Using regular expressions
  • Phoenix
    • about / Introduction
  • Phoenix application
    • creating / Creating a Phoenix application, How it works…, There's more…
    • topics, implementing / Implementing topics, How to do it…, How it works…
    • protecting, with SSL / Protecting the Phoenix app with SSL, How it works…
  • Phoenix framework
    • URL / The Phoenix framework
  • phone_book.ex module
    • creating / How to do it…, How it works…
  • porcelain
    • URL / Using OS commands from within Elixir, See also
  • Postgres
    • using / Using Redis and Postgres, Getting ready, How to do it…, How it works…
  • Postgresql
    • installing / Installing PostgreSQL
    • URL, for installation / Installing PostgreSQL
    • URL, for download / Installing PostgreSQL
  • print function / How to do it…
  • print_each_from_list function / How it works…
  • process ID (PID) / How it works…
  • Project Gutenberg
    • URL / How it works…
  • published / How it works…

R

  • range
    • used, for slicing strings / Slicing strings with ranges, How to do it…, There's more…
  • recursive function / How to do it…
  • Redis
    • using / Using Redis and Postgres, How to do it…, How it works…
    • installing / Installing Redis
    • URL / Installing Redis
    • references / Installing Redis
  • Regex.compile! function / How it works…
  • regular expressions
    • using / How to do it…, How it works…
  • release mechanisms
    • URL / See also
  • REPL
    • about / Using the terminal to prototype and test ideas
  • resource
    • file, streaming as / Streaming a file as a resource, How to do it…, How it works…
  • REST
    • URL / There's more…
  • router
    • URL / See also
  • routes
    • defining / Defining routes, How to do it…, How it works…, There's more…
  • run/1 function / How it works…
  • running system
    • updating / Deploying applications and updating a running system, How it works…
  • run_me function / How to do it…

S

  • @shortdoc attribute / How it works…
  • scripted mode
    • module, using / Using a module in the scripted mode, How to do it…
  • search_user function / How it works…
  • sequential function / How it works…
  • spawn_link function / There's more…
  • SSL
    • used, for protecting Phoenix application / How to do it…, How it works…
  • start_link function / How it works…
  • stateful server process
    • creating / Creating a stateful server process (messages with counters), Getting ready, How it works…, See also
  • static files
    • serving / Serving static files, How to do it…, How it works…
  • String.slice/2 function / How it works…
  • String.split_at function / How it works…
  • string codepoints
    • replacing, with patterns / Replacing string codepoints with patterns, How to do it…, How it works…
  • strings
    • joining / How to do it…, How it works…
    • splitting / Splitting strings, How to do it…, How it works…
    • slicing, with range / Slicing strings with ranges, How it works…, There's more…
  • subscriber / How it works…
  • sum function / How it works…
  • supervised application
    • generating / Generating a supervised application, How it works…
  • supervisor
    • creating / Creating a supervisor, Getting ready, How it works…
    • implementing / How to do it…
  • Supervisor module
    • URL / See also, See also
  • symbol / How it works…
  • system
    • in IEx, inspecting / Inspecting your system in IEx, How to do it…, See also
    • inspecting, with Observer / Inspecting your system with Observer, How to do it…
  • System.get_env function / How to do it…

T

  • Task.await function / How it works…
  • Task.Supervisor module
    • URL / There's more…
  • Task module
    • used, for performing multiple concurrent computations / Using tasks to perform multiple concurrent computations, Getting ready, How to do it…, How it works…, There's more…
    • URL / There's more…
  • templates
    • about / Creating a Phoenix application
    • creating / Creating views and templates, How it works…, There's more…
  • terminate function / How it works…
  • text
    • word frequency, determining / Getting ready, How to do it…, How it works…
  • throws
    • using / How it works…
  • tooling, Elixir / How it works…
  • topics
    • about / Creating a Phoenix application
    • implementing, in Phoenix application / Getting ready, How to do it…, How it works…
  • tuples
    • combining, into list / Combining tuples into a list, How it works…
  • Twitter data
    • obtaining / Getting Twitter data, How to do it…, How it works…, There's more…

U

  • umbrella applications
    • generating / Generating umbrella applications, How to do it…, How it works…

V

  • views
    • creating / Creating views and templates, How to do it…, How it works…

W

  • websocket handler
    • implementing / Implementing a websocket handler, How to do it…, How it works…
  • websocket_handle function / How it works…
  • websocket_info function / How it works…
  • websocket_init function / How it works…
  • websocket_terminate function / How it works…
  • word frequency
    • determining, in text / Determining the word frequency in a text, How to do it…, How it works…
  • word list
    • creating / Creating a word list, There's more…
  • wrk tool / There's more…
  • ~W sigils
    • using / Creating a word list, How it works…
  • ~w sigils
    • using / Creating a word list, How it works…