We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

The latest version of the book is P3.0, released about 1 month ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
1
#33410: As a Xp programmer, I was very disappointed that unit-testing wasn't part of the book. It would be great, that in a future version of the book...more...
P2.0
31-Jul-08
62

#29719: Footnote 10 (about using ++) should refer to section 3.11 (Building Lists in Natural Order) for more information.--Richard Carlsson

P2.0
30-Sep-07
62
#34598: The new expression for total(L) using comprehensions is given as: total(L) -> lists:sum([shop:cost(A) * B || {A, B} <- L]). Could it ...more...
P3.0
22-Sep-08
65
#29942: Figure 3.1 describes bsl as "Arithmetic bitshift left.." and bsr as "Bitshift right..". In fact it is Bitshift right which needs the qualifi...more...
P2.0
02-Dec-07
142

#34226: Second to last paragraph the text "If none of the patterns matches," should probably read "If none of the patterns match,"--Geoffrey Garside

P2.0
24-Aug-08
169

#34177: in the second example, at the very top of the page, process B receives {'EXIT',<0.73.0>,kill}. Should that not be {'EXIT',<0.73.0>,killed}?
--gorenje

P2.0
22-Aug-08
183

#29362: in BIFs for writing distributed programs.

disconnect_node(N). must get the prefix erlang:, it is not visible from the shell.

--Falko

P1.0
25-Jul-07
209
#32325: I see that in io_widget.erl the top cell of the packer frame is being created with a PackOption of {stretch,10,120,100}. According to page 24...more...
P2.0
08-Jun-08
229

#33505: Missing period on line 5 in the erl session for reading a file, one term at a time.--Kim Shrier

P2.0
03-Aug-08
233
#29730: In the example id3_v1.erl, the return value of the function read_id3_tag(File) for the second clause of case file:open.... should be atom erro...more...
P2.0
01-Oct-07
239

#33524: In the erl example for writing to a random-access file, all three lines are missing the ending period.--Kim Shrier

P2.0
04-Aug-08
239

#33525: It would be better if the file name in the example of writing to a random-access file were something other than "...".--Kim Shrier

P2.0
04-Aug-08
241

#33527: When introducing the ls(dir) function in lib_misc.erl, you should also include an import statement for:

-import(lists, [map/2, sort/1]).--Kim Shrier

P2.0
04-Aug-08
242
#33528: In the description of the filename module, the end of the first sentence would read better if you used "from" instead of "for". So it would r...more...
P2.0
04-Aug-08
251
#33532: In the loop(Socket) function, you invoke lib_misc:string2value(Str) but you have not added this function to the lib_misc module. In searching...more...
P2.0
04-Aug-08
258

#33533: In the first sentence of section 14.3, you have, "Suppose we write a some kind of online server ...". You should remove the word "a".--Kim Shrier

P2.0
04-Aug-08
258
#33534: In the last sentence on the page, you say that both Ni and Ki are integers in the range of 0 to 255. For IPv6 addresses, the Ki should be in ...more...
P2.0
04-Aug-08
266
#33537: In the second paragraph of item 3 in "How the SHOUTcast Server Works", you have, "... uses the code developed in sections Section 13.2, ...". ...more...
P2.0
04-Aug-08
279
#33596: In the fourth paragraph, third sentence, you have, "... is based on a set of measurement of the relative performances ..." The word "measure...more...
P2.0
05-Aug-08
279

#33597: In item #3 toward the bottom of the page, you should add the word "it" so that it reads, "Measure the time it takes...".--Kim Shrier

P2.0
05-Aug-08
314
#33606: I have noticed that as I get further into the book, that more and more details are being left out of the source code. For example, on this pa...more...
P2.0
06-Aug-08
328
#33616: in the erl script at the bottom of the page, the syntax coloring does not have the input in line 1 colored burgundy like the other inputs. Al...more...
P2.0
07-Aug-08
344
#33108: The 1.0 version had the "correct" (i.e. intentional) error of misspelling "rectangle" as "rectonge". 2.0 "fixes" the problem, leading to conf...more...
P2.0
22-Jul-08
346
#33794: When I compile my_alarm_handler.erl, it warns me that code_change/3 is not defined and that behaviour gen_event wants it defined. Maybe this ...more...
P2.0
08-Aug-08
354
#33795: In the paragraph describing the Type member of the data structure, second sentence, you left out the word "a". It should read, "We can constr...more...
P2.0
08-Aug-08
358
#34134: sellaprime.app doesn't include lib_lin in the list of modules, which is one of the dependencies of the application. (Not that it really mat...more...
P2.0
20-Aug-08
363
#33796: At the top of lib_primes, you should also include the lines: -module(lib_primes). -export([make_prime/1, is_prime/1, make_random_int/1])...more...
P2.0
08-Aug-08
364

#33797: The listing for lib_primes.erl does not include the make_random_int/1 and new_seed/0 functions.--Kim Shrier

P2.0
08-Aug-08
368

#33836: In the box, third paragraph, first sentence the word "at" after the word "producing' should be removed.--Kim Shrier

P2.0
08-Aug-08
382
#33838: in the collect_replies function, the receive pattern {'EXIT', _, Why} causes a warning when compiled because the Why variable is not used anyw...more...
P2.0
08-Aug-08
382
#33839: In the function generate_words, you refer to lib_misc:foreachWordInFile without defining it anywhere. You also don't define foreachWordInStri...more...
P2.0
08-Aug-08
383
#33840: The transition from the listing of test_mapreduce.erl to the erlang shell is not well delimited. Also, the line number starts at 5 unlike all...more...
P2.0
08-Aug-08
408
#34173: pg.90 states: "Warning: The use of apply should be avoided if possible." The Appendix D features lib_chan.erl which uses apply/3 on page 40...more...
P2.0
21-Aug-08
467

#31519: In the description of filelib functions is_dir/1, is_file/1, is_regular/1, there is no space areoung the "Name".--Petr Sturc

P2.0
28-Mar-08
476

#29930: In the description for "enter_loop" there is no whitespace around the term "gen_fsm."--Steve Vinoski

P2.0
27-Nov-07
478

#29931: In the description for "enter_loop" there is no whitespace around the term "gen_server."--Steve Vinoski

P2.0
27-Nov-07

Stuff To Be Considered in the Next Edition

PDF Paper Description Found in Fixed in
0
#29186: This is not specific to any page, but I feel that more attention needs to be paid to Erlang's string handling performance and techniques. The ...more...
P1.0rc3
03-Jun-07
23
#29127: Because erlang is mainly for embedded developer interesting, mabe you could note some common size/memory footprints and in this context point ...more...
P1.0rc2
24-May-07
39
#29170: I'm new to this, but I note in the transition between the section on tuples and lists, no real explanation is given as to the difference betwe...more...
P1.0rc3
30-May-07
65
#29215: As someone with a Haskell background, I found the section about 'list comprehension' quite understandable. However I noted that my fellow coll...more...
P1.0rc3
12-Jun-07
73

#29717: Last paragraph: "and computing some value" should be "and computes some value"--Richard Carlsson

P2.0
30-Sep-07
74
#29718: Paragraph 5 ("If you ever see code like this...") doesn't really explain the problem, and makes it look like "++" is inherently bad somehow. ...more...
P2.0
30-Sep-07
74
#30327: I think there should be a statement to clarify that the function odds_and_evens() use 'commas' in the body as it is made up of 'sequence of e...more...
P2.0
05-Jan-08
77
#28933: I'd like to see a list of short exercises for the reader to do at the end of each chapter or throughout the chapter (with possible solutions) ...more...
B1.15
07-May-07
77

#29631: The explanation of BIF is not until page 86, but is used on page 77 in the explanation of exceptions.--Matt Young

P2.0
07-Sep-07
85
#29255: 4.7 -> Catching Every Possible Exception: you mention there 'tags', but from reading the book so far, I have no clue of what tags are... ( _:...more...
P1.0rc3
22-Jun-07
93
#29723: Paragraphs 4 and 5 both start with the same sentence: "To find the sync point..." (only the last word differs). In any case, those two paragra...more...
P2.0
30-Sep-07
101
#29724: The attributes "-compile(...)" and "-vsn(...)" are described as "predefined module attributes" along with "-module(...)" etc., but in fact, th...more...
P2.0
30-Sep-07
103
#29725: The subsection on Boolean Expressions should have a reference to the subsection on Short-Circuit Boolean Expressions on page 115, and vice ver...more...
P2.0
30-Sep-07
109
#29727: Subsection "Control Flow in Macros": This talks consistently about control flow "within a macro", "inside a macro definition", etc. But in fac...more...
P2.0
30-Sep-07
114
#29358: "References are globally unique" As far as i remember that means more than inside of one erlang machine. Would be nice to give more details,...more...
P1.0
25-Jul-07
124

#29199: Maybe you like to link the pages 124 and 47. Both care about the .erlang file.

Kind regards,
Nils--Nils Muellner

P1.0rc3
07-Jun-07
124
#31251: not equivalent example "C:\Program Files\erl5.5.3\bin\erl.exe" -noshell -s hello start -s init stop #!/bin/sh erl -noshell -pa /hom...more...
P2.0
16-Mar-08
143
#31565: The concept of a mailbox is referred to and relied upon halfway down the page, but it is not introduced and described until p145, which is als...more...
P2.0
03-Apr-08
152

#29644: The notion of mailboxes is not introduced until section 8.6, but are referred to in 8.5 (receive with a timeout of 0)--Matt Young

P2.0
10-Sep-07
154
#29002: I thought the section on Selective Recieve went a little fast. Since message passing/recieving is such a large portion of the language per...more...
B1.15
11-May-07
157
#29803: Section 8.10, "Spawning with MFAs": It is a misconception that spawns using funs would somehow cause problem with dynamic code loading. It is ...more...
P2.0
30-Oct-07
182
#29638: Couple of things about section 10.5: $HOME/.erlang/lib_chan.conf as stated on p179 is $HOME/.erlang_config/lib_chan.conf on my system - thi...more...
P2.0
08-Sep-07
193
#29243: Ok, I found the lib_chan code. The way it was presented to the reader did not make it clear that lib_chan was code that came with the book and...more...
P1.0rc3
18-Jun-07
222
#29238: The sample Makefile does not work as is on Mac OS X. Here is my version for Mac OS X: .SUFFIXES: .erl .beam .yrl .erl.beam: erlc -W $< ...more...
P1.0rc3
18-Jun-07
223
#30751: The shared library must be called example1_drv.dll on Windows systems in order for erl_ddll:load_driver to find it. Otherwise you get ** exc...more...
P2.0
14-Feb-08
226
#29239: In ports/example1_lid.c, you include erl_driver.h that comes with the sample code package. But it may fail under some reader's configuration,...more...
P1.0rc3
18-Jun-07
235
#31745: I spoke too soon (#31742): there is no platform-dependent conversion happening at all. Opening a file with file:open() uses binary mode for re...more...
P2.0
26-Apr-08
235
#31742: Last paragraph: the ~n formatting command: the explanation that "~n is smart" is wrong! (Try it on Windows, or just look in the code for io_li...more...
P2.0
26-Apr-08
242
#29973: There's suggestion to use certain kinds of accumulation techniques for tcp fragments. Now the R12B-0 have brought efficient binary accumulatio...more...
P1.1
10-Dec-07
243

#29218: The file_info record shown here is missing the minor_device, inode, uid, and gid fields.--Steve Vinoski

P1.0rc3
13-Jun-07
261
#31749: In the UDP client/server example code, the server is parameterized with respect to 'Port', but the client code (both on p. 261 and p. 262) is ...more...
P2.0
26-Apr-08
261 255
#29591: In the udp_test.erl server source: loop(Socket) -> receive {udp, Socket, Host, Port, Bin} = Msg -> The only explanation of ...more...
P2.0
28-Aug-07
295
#29181: In the code for server2.erl, the catch clause uses "_:Why". I didn't understand what that meant at first. The concept of tags is introduced ve...more...
P1.0rc3
01-Jun-07
316
#31777: You note that qlc:q(LC) only works if LC is a literal list comprehension, and not if LC is a variable, but you do not mention that it is neces...more...
P2.0
27-Apr-08
317
#31781: Section 17.2 "Adding and removing data...": It is frustrating to read about operations like mnesia:write(Row) when there has been no explanat...more...
P2.0
27-Apr-08
337
#31987: SInce it's explaining error logger config file it's abit confusing to have "false" to represent something that is "turned on". First I thought...more...
P1.0
13-May-08
338
#29021: Could you please mention OTP behaviors not covered by the "OTP Introduction" and "Making a System With OTP" chapters, and where to go for furt...more...
B1.15
14-May-07
343
#31066: When sasl_error_logger is configured to write to a file, on Windows at least, the directory must exist before sasl is started. Sasl will not c...more...
P2.0
29-Feb-08
346
#29919: Compiling my_error_handler (with erlc) produced the following warning: ./my_alarm_handler.erl:9: Warning: undefined callback function code_ch...more...
P2.0
25-Nov-07
358
#31192: The is_prime function uses the Rabin-Miller primality test, but doesn't properly cite it and doesn't note that it is a probablistic test rathe...more...
P2.0
10-Mar-08
363
#31992: Due to this line in make_prime/1: N = make_random_int(K), 2 * N - 3 may have more than K digits, which causes this kind of behaviour: ---...more...
P1.1
13-May-08
393
#31793: 1st bullet point: "TypeVar: A type variable". This is just a special case of the 3rd bullet point: "Type: A type expression". You should remov...more...
P2.0
28-Apr-08
393
#31794: 2nd bullet point: "TypeVar::Type: A type variable followed by a type. This means that TypeVar has type Type." This is a misunderstanding. The ...more...
P2.0
28-Apr-08
435
#29802: Chapter E.4: it is reloading, not recompilation in itself, which causes processes to call new code. Instead of saying "recompile", say "reload...more...
P2.0
30-Oct-07
438
#29416: Dynamic code loading. a:loop() not mentioned. The possibility to load a new version for module a from inside module a by using the full qua...more...
P1.0
16-Aug-07
440
#29971: It would be nice if the book included the proplists module among the modules it covers in Appendix F. That module is especially useful for han...more...
P2.0
10-Dec-07