Begin | p. 1 |
Road Map | p. 2 |
Begin Again | p. 5 |
Acknowledgments | p. 6 |
Getting Started | p. 7 |
Overview | p. 7 |
Installing Erlang | p. 10 |
The Code in This Book | p. 12 |
Starting the Shell | p. 13 |
Simple Integer Arithmetic | p. 14 |
Variables | p. 16 |
Floating-Point Numbers | p. 21 |
Atoms | p. 22 |
Tuples | p. 24 |
Lists | p. 27 |
Strings | p. 29 |
Pattern Matching Again | p. 30 |
Sequential Programming | p. 33 |
Modules | p. 33 |
Back to Shopping | p. 39 |
Functions with the Same Name and Different Arity | p. 42 |
Funs | p. 42 |
Simple List Processing | p. 48 |
List Comprehensions | p. 51 |
Arithmetic Expressions | p. 54 |
Guards | p. 55 |
Records | p. 59 |
Case and if Expressions | p. 62 |
Building Lists in Natural Order | p. 63 |
Accumulators | p. 64 |
Exceptions | p. 67 |
Exceptions | p. 67 |
Raising an Exception | p. 68 |
Try...catch | p. 69 |
Catch | p. 72 |
Improving Error Messages | p. 73 |
Programming Style with try...catch | p. 73 |
Catching Every Possible Exception | p. 74 |
Old- and New-Style Exception Handling | p. 75 |
Stack Traces | p. 75 |
Advanced Sequential Programming | p. 77 |
BIFs | p. 78 |
Binaries | p. 78 |
The Bit Syntax | p. 80 |
Miscellaneous Short Topics | p. 89 |
Compiling and Running Your Program | p. 109 |
Starting and Stopping the Erlang Shell | p. 109 |
Modifying the Development Environment | p. 110 |
Different Ways to Run Your Program | p. 113 |
Automating Compilation with Makefiles | p. 118 |
Command Editing in the Erlang Shell | p. 121 |
Getting Out of Trouble | p. 122 |
When Things Go Wrong | p. 122 |
Getting Help | p. 125 |
Tweaking the Environment | p. 126 |
The Crash Dump | p. 127 |
Concurrency | p. 129 |
Concurrent Programming | p. 133 |
The Concurrency Primitives | p. 134 |
A Simple Example | p. 135 |
Client-Server-An Introduction | p. 136 |
How Long Does It Take to Create a Process? | p. 140 |
Receive with a Timeout | p. 142 |
Selective Receive | p. 145 |
Registered Processes | p. 146 |
How Do We Write a Concurrent Program? | p. 148 |
A Word About Tail Recursion | p. 148 |
Spawning with MFAs | p. 149 |
Problems | p. 150 |
Errors in Concurrent Programs | p. 151 |
Linking Processes | p. 151 |
An on_exit Handler | p. 152 |
Remote Handling of Errors | p. 154 |
The Details of Error Handling | p. 154 |
Error Handling Primitives | p. 162 |
Sets of Linked Processes | p. 164 |
Monitors | p. 164 |
A Keep-Alive Process | p. 165 |
Distributed Programming | p. 167 |
The Name Server | p. 169 |
The Distribution Primitives | p. 174 |
Libraries for Distributed Programming | p. 177 |
The Cookie Protection System | p. 178 |
Socket-Based Distribution | p. 179 |
IRC Lite | p. 183 |
Message Sequence Diagrams | p. 185 |
The User Interface | p. 186 |
Client-Side Software | p. 187 |
Server-Side Software | p. 191 |
Running the Application | p. 195 |
The Chat Program Source Code | p. 196 |
Exercises | p. 203 |
Interfacing Techniques | p. 205 |
Ports | p. 206 |
Interfacing an External C Program | p. 207 |
Open_port | p. 213 |
Linked-in Drivers | p. 214 |
Notes | p. 218 |
Programming with Files | p. 219 |
Organization of the Libraries | p. 219 |
The Different Ways of Reading a File | p. 220 |
The Different Ways of Writing to a File | p. 228 |
Directory Operations | p. 232 |
Finding Information About a File | p. 233 |
Copying and Deleting Files | p. 234 |
Bits and Pieces | p. 234 |
A Find Utility | p. 235 |
Programming with Sockets | p. 239 |
Using TCP | p. 240 |
Control Issues | p. 249 |
Where Did That Connection Come From? | p. 252 |
Error Handling with Sockets | p. 253 |
UDP | p. 254 |
Broadcasting to Multiple Machines | p. 257 |
A SHOUTcast Server | p. 259 |
Digging Deeper | p. 266 |
ETS and DETS: Large Data Storage Mechanisms | p. 267 |
Basic Operations on Tables | p. 268 |
Types of Table | p. 269 |
ETS Table Efficiency Considerations | p. 270 |
Creating an ETS Table | p. 271 |
Example Programs with ETS | p. 273 |
DETS | p. 278 |
What Haven't We Talked About? | p. 281 |
Code Listings | p. 282 |
OTP Introduction | p. 285 |
The Road to the Generic Server | p. 286 |
Getting Started with gen_server | p. 295 |
The gen_server Callback Structure | p. 299 |
Code and Templates | p. 303 |
Digging Deeper | p. 306 |
Mnesia: The Erlang Database | p. 307 |
Database Queries | p. 307 |
Adding and Removing Data in the Database | p. 311 |
Mnesia Transactions | p. 313 |
Storing Complex Data in Tables | p. 317 |
Table Types and Location | p. 319 |
Creating the Initial Database | p. 322 |
The Table Viewer | p. 323 |
Digging Deeper | p. 323 |
Listings | p. 325 |
Making a System with OTP | p. 329 |
Generic Event Handling | p. 330 |
The Error Logger | p. 333 |
Alarm Management | p. 340 |
The Application Servers | p. 342 |
The Supervision Tree | p. 345 |
Starting the System | p. 348 |
The Application | p. 352 |
File System Organization | p. 354 |
The Application Monitor | p. 355 |
Digging Deeper | p. 355 |
How Did We Make That Prime? | p. 357 |
Multicore Prelude | p. 359 |
Programming Multicore CPUs | p. 361 |
How to Make Programs Run Efficiently on a Multicore CPU | p. 362 |
Parallelizing Sequential Code | p. 366 |
Small Messages, Big Computations | p. 369 |
Mapreduce and Indexing Our Disk | p. 373 |
Growing Into the Future | p. 383 |
Documenting Out Program | p. 385 |
Erlang Type Notation | p. 386 |
Tools That Use Types | p. 389 |
Erlang on Microsoft Windows | p. 391 |
Erlang | p. 391 |
Fetch and Install MinGW | p. 391 |
Fetch and Install MSYS | p. 392 |
Install the MSYS Developer Toolkit (Optional) | p. 392 |
Emacs | p. 392 |
Resources | p. 395 |
Online Documentation | p. 395 |
Books and Theses | p. 396 |
Link Collections | p. 396 |
Blogs | p. 396 |
Forums, Online Communities, and Social Sites | p. 397 |
Conferences | p. 397 |
Projects | p. 397 |
Bibliography | p. 398 |
A Socket Application | p. 399 |
An Example | p. 399 |
How lib_chan Works | p. 402 |
The lib_chan Code | p. 405 |
Miscellaneous | p. 415 |
Analysis and Profiling Tools | p. 415 |
Debugging | p. 418 |
Tracing | p. 427 |
Dynamic Code Loading | p. 431 |
Module and Function Reference | p. 435 |
Module: application | p. 435 |
Module: base64 | p. 436 |
Module: beam_lib | p. 437 |
Module: c | p. 437 |
Module: calendar | p. 439 |
Module: code | p. 440 |
Module: dets | p. 441 |
Module: dict | p. 444 |
Module: digraph | p. 445 |
Module: digraph_utils | p. 446 |
Module: disk_log | p. 447 |
Module: epp | p. 448 |
Module: erl_eval | p. 449 |
Module: erl_parse | p. 449 |
Module: erl_pp | p. 450 |
Module: erl_scan | p. 450 |
Module: erl_tar | p. 450 |
Module: erlang | p. 451 |
Module: error_handler | p. 460 |
Module: error_logger | p. 460 |
Module: ets | p. 461 |
Module: file | p. 464 |
Module: file_sorter | p. 466 |
Module: filelib | p. 467 |
Module: filename | p. 467 |
Module: gb_sets | p. 468 |
Module: gb_trees | p. 470 |
Module: gen_event | p. 471 |
Module: gen_fsm | p. 472 |
Module: gen_sctp | p. 473 |
Module: gen_server | p. 474 |
Module: gen_tcp | p. 474 |
Module: gen_udp | p. 475 |
Module: global | p. 475 |
Module: inet | p. 476 |
Module: init | p. 477 |
Module: io | p. 477 |
Module: io_lib | p. 478 |
Module: lib | p. 479 |
Module: lists | p. 479 |
Module: math | p. 483 |
Module: ms_transform | p. 483 |
Module: net_adm | p. 483 |
Module: net_kernel | p. 484 |
Module: os | p. 484 |
Module: proc_lib | p. 485 |
Module: qlc | p. 485 |
Module: queue | p. 486 |
Module: random | p. 487 |
Module: regexp | p. 488 |
Module: rpc | p. 488 |
Module: seq_trace | p. 490 |
Module: sets | p. 490 |
Module: shell | p. 491 |
Module: slave | p. 491 |
Module: sofs | p. 492 |
Module: string | p. 496 |
Module: supervisor | p. 497 |
Module: sys | p. 497 |
Module: timer | p. 498 |
Module: win32reg | p. 499 |
Module: zip | p. 500 |
Module: zlib | p. 500 |
Index | p. 503 |
Table of Contents provided by Ingram. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.