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 P5.0,
released over 2 years 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.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| sadek |
sadek |
#49408: this makes me sad--SPGqMjBvQqqAEzhB
|
P5.0
05-Jun-12
|
|
| leswx |
leswx |
#48904: im subscribing to this rss totally--CUSEBXJwJigcmRvS
|
P5.0
06-Mar-12
|
|
| ufwao |
ufwao |
#49420: nice suggestion--tWLDgSkmdnzh
|
P5.0
09-Jun-12
|
|
| mkkyx |
mkkyx |
#49421: my crew loves that --WUwVnmZrdqETYAKIp
|
P5.0
09-Jun-12
|
|
| ucmyo |
ucmyo |
#48655: JG5rZI thanx women--jbUQJXAYFLkV
|
P5.0
04-Feb-12
|
|
| tiwya |
tiwya |
#49425: sweet not sure tho--vUznlSpjbs
|
P5.0
10-Jun-12
|
|
| irpgg |
irpgg |
#48916: i had to write here--aZMugTiyMsruupPsEi
|
P5.0
09-Mar-12
|
|
| ybmjb |
ybmjb |
#48667: Comments do help--cJEnWHhhAt
|
P5.0
05-Feb-12
|
|
| honam |
honam |
#48668: i do not agree--XAzqJPQhlWILmnafbKK
|
P5.0
06-Feb-12
|
|
| honam |
honam |
#48669: i do not agree--XAzqJPQhlWILmnafbKK
|
P5.0
06-Feb-12
|
|
| fdzqg |
fdzqg |
#48670: Looking forward to--OannmwdICcGblNflNMY
|
P5.0
06-Feb-12
|
|
| hwtoi |
hwtoi |
#49440: mmmm sandwitch--gQswKfkOOEt
|
P5.0
15-Jun-12
|
|
| roshm |
roshm |
#49185: sweet template--PHdTzpBllaCYGwHxOkV
|
P5.0
24-Apr-12
|
|
| glnsj |
glnsj |
#49697: kl8oQd omg loved this stuff--wxpSuzevgE
|
P5.0
15-Aug-12
|
|
| zyqgb |
zyqgb |
#49698: 9zpO2F good blog as usual--gkxVHGbfWXxFKR
|
P5.0
16-Aug-12
|
|
| sontx |
sontx |
#49704: tQwPuJ including specific questions in posts--MEqudmTCvLy
|
P5.0
16-Aug-12
|
|
| sontx |
sontx |
#49705: tQwPuJ including specific questions in posts--MEqudmTCvLy
|
P5.0
16-Aug-12
|
|
| sontx |
sontx |
#49706: tQwPuJ including specific questions in posts--MEqudmTCvLy
|
P5.0
16-Aug-12
|
|
| mfihr |
mfihr |
#49709: TX69oF this helped me as much as it coulkd--cMBNPaunHFduWgnCH
|
P5.0
17-Aug-12
|
|
| regua |
regua |
#48944: so what do we do now?--FHXCgEZlMNte
|
P5.0
15-Mar-12
|
|
| vyfwp |
vyfwp |
#49461: thanx karen--CObXpYwtAziszTufOBB
|
P5.0
25-Jun-12
|
|
| index |
|
#47933: the index entry for "|| (double
vertical bar)" should include page 198 (the section on List Comprehensions).
|
P5.0
10-Nov-11
|
|
| fyyjp |
fyyjp |
#49726: g00d info as usual here--TMzERPHgOSGUlqvzjS
|
P5.0
23-Aug-12
|
|
| rGUYV |
SGHKj |
#47681: I told my grandmother how you heepld. She said, bake them a cake!--13
|
P5.0
02-Oct-11
|
|
| euoto |
euoto |
#48973: im a serial reader--yYulEpkSUvJL
|
P5.0
22-Mar-12
|
|
| zohtp |
zohtp |
#48466: L1i18q I notice that when I specifically invite comments that people leave them in higher numbers than when I don�t.--iJChmoiecmtuayoxfxp
|
P5.0
06-Jan-12
|
|
| iirru |
iirru |
#49234: wat is at about hmmm--FeZzvqJZhveoAtzeSMY
|
P5.0
01-May-12
|
|
| iirru |
iirru |
#49235: wat is at about hmmm--FeZzvqJZhveoAtzeSMY
|
P5.0
01-May-12
|
|
| decdt |
decdt |
#48733: i dont know if that is really true.....--xZIdXGNVLASWxpgh
|
P5.0
16-Feb-12
|
|
| decdt |
decdt |
#48734: i dont know if that is really true.....--xZIdXGNVLASWxpgh
|
P5.0
16-Feb-12
|
|
| szgmy |
szgmy |
#48735: thissi sad.. maybe not..--zkagSJJmseYCsLOtUoI
|
P5.0
16-Feb-12
|
|
| aftnm |
aftnm |
#49761: thanx women--WuiEpXKfYdRq
|
P5.0
29-Aug-12
|
|
| fnqbw |
fnqbw |
#49784: i have to say this --pqRjUJeGHCOLGFIGtcE
|
P5.0
06-Sep-12
|
|
| rjymp |
rjymp |
#49786: thinkingof what?--GsDMEirltHB
|
P5.0
07-Sep-12
|
|
| tmdpe |
tmdpe |
#49787: i had to write here--RVmmDmZVMafdRYJLrK
|
P5.0
07-Sep-12
|
|
| ooloh |
ooloh |
#49276: i agree woman--MDgWVcLrkBDKgM
|
P5.0
04-May-12
|
|
| ldvda |
ldvda |
#49789: bring that times back!--pViZqedmsELC
|
P5.0
07-Sep-12
|
|
| tnbex |
tnbex |
#49790: i agree man--dCBGFgufkRWaakbgPXW
|
P5.0
08-Sep-12
|
|
| ffoaz |
ffoaz |
#49793: thanx big man--XacxBsONeptqyh
|
P5.0
10-Sep-12
|
|
| rulcu |
rulcu |
#49538: thinkingof what?--fUwPmhvVcEkW
|
P5.0
18-Jul-12
|
|
| xjhst |
xjhst |
#49796: Nigeria --nBPllQSpDudheUOWzH
|
P5.0
12-Sep-12
|
|
| mjtvq |
mjtvq |
#49546: this helped me as hell--pTdPCLRHYQbXZ
|
P5.0
20-Jul-12
|
|
| sdjri |
sdjri |
#49295: thanx for a great post mate--WerudMKjUoryQK
|
P5.0
09-May-12
|
|
| czmyb |
czmyb |
#49810: Luxembourg --IzfdhseVGzodKBxuQ
|
P5.0
16-Sep-12
|
|
| bkgpj |
bkgpj |
#49814: good one i luv it--ZFHWOWCwIcx
|
P5.0
16-Sep-12
|
|
| ckpjy |
ckpjy |
#48791: hmm what them is that? custom?--ODJqqYLdBjOHotPhnB
|
P5.0
21-Feb-12
|
|
| vljld |
vljld |
#49559: good infos as always maine--WNitEnYEIyhNpX
|
P5.0
25-Jul-12
|
|
| mjsya |
mjsya |
#49816: Ireland --UgFMrfMkkhzBlj
|
P5.0
17-Sep-12
|
|
| lxlct |
lxlct |
#49050: good blog as usual--flgUyuzqsSnBONQFpWE
|
P5.0
03-Apr-12
|
|
| chxsm |
chxsm |
#48822: thanx karen--rnzZmpaNZk
|
P5.0
28-Feb-12
|
|
| xazrm |
xazrm |
#48836: love to read--bUXmKIAuptYBRFCU
|
P5.0
29-Feb-12
|
|
| swtov |
swtov |
#48862: can i comment here--JjXBgGcseQvTfoFNF
|
P5.0
02-Mar-12
|
|
| tmkni |
tmkni |
#48607: w0w this is good--xOUshaXQdgii
|
P5.0
28-Jan-12
|
|
| icotc |
icotc |
#49123: lool cool--guvxstMiWDvduTUaWTP
|
P5.0
17-Apr-12
|
|
| flnoe |
flnoe |
#48613: Great tips!!! --hzmOiyQNICuR
|
P5.0
30-Jan-12
|
|
| lgszx |
lgszx |
#48624: thanx women--rBgoCUisXCWgyehn
|
P5.0
31-Jan-12
|
|
| hkrtt |
hkrtt |
#48627: this is what i needed man--WEfHVWfFAJEE
|
P5.0
01-Feb-12
|
|
| qatbs |
qatbs |
#48633: ok love that stuff--XfPVYIwbOMUoe
|
P5.0
01-Feb-12
|
|
| zshcr |
zshcr |
#48634: shoudlnt i try it?--hJMQMXDfQJOsFth
|
P5.0
01-Feb-12
|
|
| oghac |
oghac |
#48635: WPKLKR hmm what them is that? selfmade?--qSdVdQujSmcsPLF
|
P5.0
01-Feb-12
|
|
| psnhi |
psnhi |
#48892: my crew loves that --wjfljhfOlkEUctfT
|
P5.0
05-Mar-12
|
|
| nprif |
nprif |
#49404: mumbo jumbo--NbxOzBCNhHgqbNNXET
|
P5.0
04-Jun-12
|
|
| 22 |
|
#46210: The instructions for installing on Debian need to include the package "erlang-dev" as well: erlang-dev provides kernel/include/file.hrl, without which libmisc.erl (p. 57) cannot be compiled.--Wayne Conrad #46210: The instructions for installing on Debian need to include the package "erlang-dev" as well: erlang-dev provides kernel/include/file.hrl, witho ...more...
|
P4.0
09-Jan-11
|
|
| 42 |
|
#46539: The last paragraph would read better like this "Now we're comfortable....." (take out "that") or leave "that" and take out "so" after the ",".
|
P5.0
08-Mar-11
|
|
| 47 |
|
#48788: Please note, this report looks similiar but actually differs in important detail to a previously reported Erratum. (The correction reported in the previous Erratum does not work)
Is: Tip for Windows users: Create a file called C:/Program Files/erl5.4.12/bin/.erlang (youmight have to change this if your installation details vary). Should be: Tip for Windows users: Create a file called C:/Program Files/erl5.4.12/usr/.erlang (youmight have to change this if your installation details vary). Otherwise it doesn't work.
--Yiling #48788: Please note, this report looks similiar but actually differs in important detail to a previously reported Erratum. (The correction reported in ...more...
|
P5.0
21-Feb-12
|
|
| 53 |
|
#48414: 3> Double = Z. should return #Fun<erl_eval.6.56006484> since 1> Z = fun(X) -> 2*X end. returned it. Checked with R11B-5, R15B (Windows) and R14A (Linux). #48414: 3> Double = Z. should return #Fun<erl_eval.6.56006484> since 1> Z = fun(X) -> 2*X end. returned it. Checked with R11B-5, R15B (Windows) and R1 ...more...
|
P1.1
29-Dec-11
|
|
| 57 |
|
#48417: In the box function partition is mentioned, but has not been introduced yet. Perhaps a reference could be useful?
|
P1.1
29-Dec-11
|
|
| 81 |
|
#46530: In the output of try_test:demo2(), the fifth tuple output should begin with the number 5 as the first term. The example should read:
2> try_test:demo2().
[{1,a},
{2,a},
{3,{'EXIT',a}},
{4,{'EXIT',a}},
{5,'EXIT',{a,[{try_test,generate_exception,1},
...
--Kim Shrier #46530: In the output of try_test:demo2(), the fifth tuple output should begin with the number 5 as the first term. The example should read:
2> tr ...more...
|
P5.0
07-Mar-11
|
|
| 86 |
|
#47848: On 3rd paragraph of section 5.2, the construct <<'cat'>> is invalid, the correct form is <<"cat">>.--Raúl Pedroche
|
P5.0
29-Oct-11
|
|
| 88 |
|
#48440: 4> list_to_binary([Bin1,1,[2,3,Bin2],4|Bin3]).
The list [Bin1,1,[2,3,Bin2],4|Bin3] is improper. Furthermore, a binary is allowed in the tail position of a cons cell. (An integer in the tail position causes bad argument exception.) Perhaps some explanation could be useful?
#48440: 4> list_to_binary([Bin1,1,[2,3,Bin2],4|Bin3]).
The list [Bin1,1,[2,3,Bin2],4|Bin3] is improper. Furthermore, a binary is allowed in the tai ...more...
|
P1.1
01-Jan-12
|
|
| 100 |
|
#47259: User-Defined Attributes
(...)
In the attrs.erl example code, the following function is defined.
fac(1) -> 1;
fac(N) -> N * fac(N-1).
While it is not relevant in the context of the example, I suggest that the code is changed like this:
fac(0) -> 1;
fac(N) -> N * fac(N-1).
This would be the correct mathematical definition of the fac function.
Cheers,
Thomas--Thomas Vossen #47259: User-Defined Attributes
(...)
In the attrs.erl example code, the following function is defined.
fac(1) -> 1;
fac(N) -> N * fac(N-1) ...more...
|
P5.0
13-Jul-11
|
|
| 102 |
|
#46531: In the second paragraph of the section titled "Block Expressions", you are missing the word "a" between "have" and "sequence". It should read, "... but you want to have a sequence of expressions at this point in the code."--Kim Shrier #46531: In the second paragraph of the section titled "Block Expressions", you are missing the word "a" between "have" and "sequence". It should read ...more...
|
P5.0
07-Mar-11
|
|
| 115 |
|
#48448: Section Term Comparisons, seventh paragraph: "a integer" should be "an integer".
|
P1.1
02-Jan-12
|
|
| 115 |
|
#46533: In the last paragraph of the page, the one with the curve sign next to it, last sentence, you talk about multiple occurrences of _Int in a complex pattern but don't actually show the pattern.--Kim Shrier #46533: In the last paragraph of the page, the one with the curve sign next to it, last sentence, you talk about multiple occurrences of _Int in a com ...more...
|
P5.0
07-Mar-11
|
|
| 124 |
|
#48459: The difference between "~n" and "\n" in the format string of io:format is not clear. Probably, some explanation could be useful.
|
P1.1
04-Jan-12
|
|
| 125 |
|
#48457: The escript could be run on Windows by the following script:
foo.bat
@setlocal enableextensions & "C:\Program Files\erl5.9\bin\escript.exe" "%~f0" %* & goto :EOF
main(A) ->
io:format("Command line args: ~p~n",[A]).
#48457: The escript could be run on Windows by the following script:
foo.bat
@setlocal enableextensions & "C:\Program Files\erl5.9\bin\escript.exe ...more...
|
P1.1
04-Jan-12
|
|
|
129 |
#47309: Chapter 7 is titled "Concurrency" and presents several of examples in the course of describing Erlang's model of concurrent programming.
However, none of the examples are parallel programs, so none of them execute concurrently. They are all entirely sequential programs, that happen to be distributed over several processes. They all make using of functions that send messages and then block for responses. At no point, in any of the examples, are any of the programs running processes concurrently.
Seems a poor example of concurrency to present programs that are not parallel and cannot be run concurrently.--Chris Seaton #47309: Chapter 7 is titled "Concurrency" and presents several of examples in the course of describing Erlang's model of concurrent programming.
Ho ...more...
|
P5.0
24-Jul-11
|
|
| 143 |
|
#48433: Hah, Italy protesters rally against Berlusconi--Sterling CampbellAV
|
P5.0
30-Dec-11
|
|
| 162 |
|
#48247: Under the heading 'System processes', in the first sentence of the first paragraph, it reads: "..., it too will die unless it is special kind of process...".
I think an 'a' should be added so it would read: "..., it too will die unless it is a special kind of process...".--Shon C. Love #48247: Under the heading 'System processes', in the first sentence of the first paragraph, it reads: "..., it too will die unless it is special kind ...more...
|
P5.0
10-Dec-11
|
|
| 168 |
|
#47327: First line of the page reads:
7> edemo1:start(true, normal).
It should be:
7> edemo1:start(true, {divide, 0}).
Other it would not be the same tests as before, this time with the tuple {true, ...}.
Cheers,
Thomas--Thomas Vossen #47327: First line of the page reads:
7> edemo1:start(true, normal).
It should be:
7> edemo1:start(true, {divide, 0}).
Other it would not ...more...
|
P5.0
31-Jul-11
|
|
| 189 |
|
#47203:
{ok, Pid} = lib_chan:connect("localhost", 1234, nameServer, "ABXy45", "").
** exception error: undefined function lib_md5:string/1
in function lib_chan:authenticate/4
in call from lib_chan:connect/5
#47203:
{ok, Pid} = lib_chan:connect("localhost", 1234, nameServer, "ABXy45", "").
** exception error: undefined function lib_md5:string/1
in ...more...
|
P5.0
19-Jun-11
|
|
|
201 |
#47800: There is no mention of the requirement of Tcl/Tk for gs to work properly, in fact how the code in io_widget is written if you don't have Tcl/Tk installed (on Windows) then the erlang function executes with no indication of error but there is no GUI. I figured out what was going on by some diagnostic io:format calls eventually seeing a {gs, backend_died} result and through some web searching discovered you see that if Tcl/Tk isn't installed, which it wasn't on my system. Mentioning this might save people a lot of time.--Ryan Molden #47800: There is no mention of the requirement of Tcl/Tk for gs to work properly, in fact how the code in io_widget is written if you don't have Tcl/T ...more...
|
P5.0
22-Oct-11
|
|
|
203 |
#47801: The loop(W) on page 203 has an incorrect receive pattern. It is listed as
{W, {str, Str}} ->
but I believe it should be
{W, _State, {str, Str}} ->
as the dispatch happens as such (on page 202)
Pid ! {self(), State, Term}
where state, by default, is the atom nil. Changing the receive pattern to include the (ignored) State argument causes the correct match but seems to also reveal another problem around the editor atom, I will file a seperate errata item for that.--Ryan Molden #47801: The loop(W) on page 203 has an incorrect receive pattern. It is listed as
{W, {str, Str}} ->
but I believe it should be
{W, _State, { ...more...
|
P5.0
22-Oct-11
|
|
| 244 |
|
#48704: Hi Joe, I refer to your errata above on the updated lib_find.erl using re module.
The following section in the above codes are in correct:
...
case Recursive of
true ->
Acc = Fun(FullName, Acc0),
find_files(T, Dir, Re, Recursive, Fun, Acc);
...
It should be:
case Recursive of
true ->
Acc1 = files(FullName, Re, Recursive, Fun, Acc0),
find_files(T, Dir, Re, Recursive, Fun, Acc1);
--Hwai-An (gohhwaian@gmail.com) #48704: Hi Joe, I refer to your errata above on the updated lib_find.erl using re module.
The following section in the above codes are in correct:
...more...
|
P5.0
11-Feb-12
|
|
| 277 |
|
#46696: In the box at the top of the page, second sentence, you have used the word "an" instead of "a". It should read, "You can think of a protected ETS table ...".--Kim Shrier #46696: In the box at the top of the page, second sentence, you have used the word "an" instead of "a". It should read, "You can think of a protected ...more...
|
P5.0
28-Mar-11
|
|
| 305 |
|
#47315: "...State is the current state of the client. ..."
should read :
"State is the current state of the server."--Wiesław Poszewiecki
|
P5.0
26-Jul-11
|
|
| 306 |
|
#46614: Under "Spontaneous Messages to the Server" section:
change
might suddenly receive a unexpected
to
might suddenly receive an unexpected--Wes James
|
P5.0
18-Mar-11
|
|
| 307 |
|
#48602: In the Code Change section, there is an annotation with an incorrect link. The line is "This topic is described in detail in the section on release handling in
the OTP design principles documentation.5" and the annotation is "5. Available from [erlang's site]/doc/pdf/design_principles.pdf", but that document has moved and the link gives a 404. An HTML version of that document is available at [erlang's site]/doc_design_principles/des_princ.html or There's a PDF that contains the design principles in Chapter 9 located at [erlang's site]/doc/pdf/otp-system-documentation.pdf--Matt Moseng #48602: In the Code Change section, there is an annotation with an incorrect link. The line is "This topic is described in detail in the section on re ...more...
|
P5.0
27-Jan-12
|
|
|
309 |
#47106: Current text: "(The entire listing for mnesia_test appears at the end of this chapter.)"
The module included at the end of the chapter is "test_mnesia", not "mnesia_test".--Stephen Ayotte #47106: Current text: "(The entire listing for mnesia_test appears at the end of this chapter.)"
The module included at the end of the chapter is " ...more...
|
P5.0
24-May-11
|
|
| 314 |
|
#46695: In the paragraph after the source code for the demo(select_shop) function, the last sentence, the one in parenthesis, you refer to the name of the module as mnesia_test instead of test_mnesia.--Kim Shrier #46695: In the paragraph after the source code for the demo(select_shop) function, the last sentence, the one in parenthesis, you refer to the name of ...more...
|
P5.0
28-Mar-11
|
|
|
344 |
#37325: the deliberate error seems to be that compute_area is only define for square and rectangle.
the erroneous call in #3 on on the bottom of page 348 actually succeeds with the code on page 344 and in the code available from the site.
calling area_server with a different shape than square or rectangle fails with the error shown in the book.--miau #37325: the deliberate error seems to be that compute_area is only define for square and rectangle.
the erroneous call in #3 on on the bottom of pa ...more...
|
P3.0
28-Jan-09
|
|
|
357 |
#46283: The PDF files on erlang.org has been arranged making the links on for instance page 357 broken. Look at erlang.org/doc for current locations.
The same goes for the links on pragprog.com/articles/erlang.html
(already having submitted this, I noted that hyperlinks were not allowed. As I don't see this on the errata page, I assume all urls are considered hyperlinks. I hope this goes better)--Amanuel Workneh #46283: The PDF files on erlang.org has been arranged making the links on for instance page 357 broken. Look at erlang.org/doc for current locations. ...more...
|
P4.0
20-Jan-11
|
|
| 385 |
|
#46701: In the last paragraph, second sentence, there is an extra word "a" between "is" and "achieved". It should read, "This is achieved with indexer_checkpoint. ...".--Kim Shrier #46701: In the last paragraph, second sentence, there is an extra word "a" between "is" and "achieved". It should read, "This is achieved with indexe ...more...
|
P5.0
29-Mar-11
|
|
| 474 |
|
#46625: "Generic event handling behavior.g" The ".g" is a typo, I think.--Dave Roberts
|
P5.0
21-Mar-11
|
|
| 2009 |
zfwso |
#46964: I'm impressed! You've mnaaged the almost impossible.--AZpbvPuI
|
P5.0
25-Apr-11
|
|
| 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 book mentions that binaries should be used as much as possible, and shows an example of parsing URL's from a text file, but it does not go far enough.
Based on my reading on the Internet and my own explorations, Erlang string handling (lists of integers) is both very slow performance-wise and extremely inefficient memory-wise (at least 16 bytes per character on 64-bit systems). String handling is a big deal in these days of the Web, and I know of a Web server (Yaws) written in Erlang, so obviously some people think it is suited for these types of applications.
I looked at the source code for Yaws and it seems as though it is doing some clever things with string data to get good performance, but my lack of Erlang knowledge really hamstrings me and I'd like more guidance from the book.
I was hoping that Joe would add a section (or at least a few more paragraphs) to the book on string performance and how to maximize it. I hope the answer is not something like "don't use Erlang for applications that do heavy string manipulation"!--Edwin Fine #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 out of a minimal erlang configuration (standalone "sae") --Marcello Presulli #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 between a tuple and a list. It seems from the examples on p.37 and p.38 that I could use a tuple to hold a sequence of atoms, or I could use a list. So when would I choose a tuple, and when would I choose a list. It might be worth a "sidebar" section on - "The difference between tuples and lists ...", or something.
Anyway just a suggestion from an erlang newbie.
--David Peterson #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 colleagues (who also enjoy the book very much!) did not reallly understand it with the perms example alone. I explained it to them with a simpler example at first, which opened the door to understanding perms:
mychar([]) -> [[]];
mychars(L) -> [ X || X <- L ].
Thus, mychars("abc") results in ["a", "b", "c"]. A colleague did not understand this at first, thinking a 'list comprehension' [ X | Y ] always needs a form of recursion to 'generate' a list of elements...
Hope this helps,
I might have been a bit vague on the explanation, I can be reached at bkok@ebay.com--Bas Kok #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.
Suggestion: "If you ever see code like this (List ++ [H]) where List is the ''accumulating part'', it should set alarm bells off in your brain. It means that every time around in the loop, the ++ (append) operation has to do more and more work.{Footnote: This causes the dreaded ''quadratic behaviour'' in programming, and can really sink your program.} This is because ++ has to go through the list on the left hand side and create a new list that simply uses the right hand side as its tail. It is much cheaper if you build the new list by adding to the left hand side, and reverse the result when you're done."--Richard Carlsson #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 expressions'.
It took me some time to wonder why the function body use 'commas' instead of semicolons. The previous pages that introduce 'functions' in erlang did not touch on this point, and most of the examples of function body are only one-liners. #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) so that the reader can really test their understanding of what was taught in that section.--Saimon Moore #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... ( _:_ vs. _). If would be nice if there was a link to the section where tags are being discussed in the book, e.g. "we'll be discussing tags at page X...". #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
|
|
| 88 |
|
#38380: It would be nice to mention bit strings and the /bits TypeSpecifier--James Morris
|
P3.0
17-Mar-09
|
|
| 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 paragraphs are verbose, repetetive, and hard to follow.
--Richard Carlsson #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, they are technically just user-defined attributes. They can be viewed as pragmas that some tools may or may not care about. For example, the Erlang compiler looks for -compile() attributes, but this is not part of the language in itself - it's just a feature of that particular tool.
Furthermore, it might be worth mentioning that if you don't specify a value yourself for 'vsn', the compiler fills it in for you with the MD5 sum of the module.--Richard Carlsson #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 versa. The "Note:..." part in the Short-Circuit section would be better to have in the normal Boolean Expressions section (together with the crossreferences).--Richard Carlsson #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 fact, you cannot write these things *within* a macro.
Suggestion: Break it out from the Macros section, change the heading to "Preprocessor Control Flow", and talk about "During preprocessing" etc. Also, use the term "processed" instead of "evaluated". Finally, it would be a good idea to note explicitly that one cannot write e.g. "-ifdef(x)." or "-endif." _within_ a function definition or any other declaration, but only before or after.--Richard Carlsson #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, e.g. Can i be sure that this ref will never be reproduced in any cluster whereever whenever of which name ever?--Falko #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 /home/joe/2006/book/JAERANG/Book/code\
-s hello start -s init stop --Alexey Kuznetsov #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 also the only place referred to by the index.--Kevlin Henney #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 perhaps another example program would have been good here.--Chris Holliday #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 not! The fun is just used as a launch point when the process is created, and the body of the fun typically just tail calls immediately to another function which is where the new process actually lives. Hence, the spawned process will not have any references from its stack or heap back to the fun, and dynamic code loading will not be a problem. But somehow, this general warning against funs in spawn has achieved myth status, and I really wish that it was not perpetuated like this.
(If you were nutty enough to write a self-recursive fun using a Y combinator, and call spawn on that, I agree that code reloading would not work.)--Richard Carlsson #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 - this may be an Ubuntu-ism? Also might be useful to move where this file should be to where you actually write the config file - (page 180, not 179).
I also second the comment elsewhere that it should be clearer that lib_chan is not part of the distribution, and that if you are going to take the bare minimum you need lib_md5 as well as the lib_chan* files.
Some brief description of the sort of error messages early on in the book would be useful (maybe as part of chp 5/6?) - they are quite cryptic coming from a different programming background. I.e. it took me a while to spot the undef and figure out that I needed extra libraries because the function wasn't defined.--Roland #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 needed to be downloaded. Just stating that it is out of stream did not clarify the situation and the first 4+ pages of Appendix D did not clarify the situation.
Please add a note that the code is part of the code for the book and needs to be downloaded as well as the code in the chapter.--Joe Jones #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 $<
MODS = example1 example1_lid
all: ${MODS:%=%.beam} example1 example1_drv.so
example1: example1.c erl_comm.c example1_driver.c
cc -o $@ $^
example1_drv.so: example1_lid.c example1.c
cc -o $@ -I/usr/local/lib/erlang/usr/include -fno-common -bundle -flat_namespace -undefined suppress $^
clean:
rm example1 example1_drv.so *.beam--Kazuya Sakakihara #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
** exception exit: {error,could_not_load_driver}
in function example1_lid:start/1
when you call example1_lid:start().
from the Erlang shell.--Bruce Gunderson #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, due to version mismatch (driver_incorrect_version).
It would be better to write #include <erl_driver.h> so that the version installed to the reader's system is used.
--Kazuya Sakakihara #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 read/write, not text mode, also on Windows. If you want to handle CRLF, you have to do it yourself. Not even io:format("~n",[]) to the emulator standard output stream will produce a CRLF on Windows, only LF.--Richard Carlsson #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_lib_format.erl.) It always produces a single newline character (ASCII 10), so it is equivalent to using the escape sequence "\n", except that the latter is expanded at compile time.
What really happens (I think) is that when the newline is printed to the output stream, if the stream is open in text mode - which is normally the case if you are writing to it with io:format() - the newline will be converted to the correct sequence for the platform. (This is probably just as a consequence of the Erlang runtime system being implemented in C.) So Erlang, just like C, works on a normalized text format internally, and converts the newlines at the I/O boundaries.--Richard Carlsson #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 accumulation which should be preferred.
I.e. instead of doing
receive_data(Socket, SoFar) ->
receive
{tcp, Socket, Bin} ->
receive_data(Socket, [Bin|SoFar]);
{tcp_closed, Socket} ->
list_to_binary(reverse(SoFar))
end.
or
receive_data(Socket, SoFar) ->
receive
{tcp, Socket, Bin} ->
receive_data(Socket, list_to_binary([Bin,SoFar]));
{tcp_closed, Socket} ->
SoFar
end.
the R12-> preferred way (by Efficiency Guide chapter 4) would be
receive_data(Socket, SoFar) ->
receive
{tcp, Socket, Bin} ->
receive_data(Socket, <<SoFar/binary, Bin/binary>>);
{tcp_closed, Socket} ->
SoFar
end.
--Jani Launonen #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 hard-coded to contact the server on port 4000. This is not very elegant, and furthermore, there is no text that mentions how the "4000" suddenly turned up in the client code.--Richard Carlsson #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 the '= Msg' syntax in the book is back on pdf-110, paper-101 in section 'Match Operator in Patterns' of Misc. Short Topics.
1. The first time through the book, I didn't register this, maybe partly because the context was function definitions, further it's time consuming to rediscover that explanation again. I feel it would be helpful in the udp server section to remind the reader of the meaning of this construct, maybe just with a reference or even footnote back to the Match Operator section.
2. It looks like '= Msg' is used in the udp server as a convenience to simplify the io:format log messages, and so may be worth pointing out explicitly as a handy debugging technique.--Garry Bulmer #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 very loosely on page 80 ("internal errors...always have the tag error"). The code example on page 84 shows a catch that catches "_:_" and explains that the tag "throw" is the default, but in my opinion that is not emphasized enough.
I'd like to suggest that the term "tag" be more formally and clearly defined, and also that you quickly re-explain the "_:_" syntax on p. 295 near the code for server2.erl.
--Jim Menard #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 necessary to add a declaration -include_lib("stdlib/include/qlc.hrl") to the file (or what a parse transform is and why the qlc-expressions work at all). Readers who expect normal expression evaluation semantics get confused by this.--Richard Carlsson #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 explanation at all how tables are created. Please insert forward references to 17.5 "Table types" and 17.6 "Creating the initial database".
Preferably also give a short explanation about how the Name used when creating the table is implicitly used by mnesia:write(Record), which takes the record tag as the Table name and the first record field as the primary key.--Richard Carlsson #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 it was a typo.
Might need some explanation on why it only gives "error reports" and not "progress reports and so on". #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 further information? gen_fsm is very useful in certain systems.
--Brian Zhou #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 create it. When using Msys on Windows , as explained in Appendix B, the syntax of the filename given in the config file must be Windows syntax but using '/' instead of '\'
e.g. "C:/Documents and Settings/joe/error_logs/THELOG".--Bruce Gunderson #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_change/3 (behaviour 'gen_event')
Adding a basic implementation (and export) seemed appropriate, considering that code_change is part of the behaviour.
code_change(_OldVsn, N, _Extra) -> {ok, N}.
#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 rather than one that gives certain results.
--Aaron D. Ball #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:
----------------
Generating a 2 digit prime ..
101
----------------
Using the (K-1)th power of 10 should make it work.--Igor R. Sucupira #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 remove this point and instead add a point to the definition of TypeExpression in the previous section: "* A type variable TypeVar is a type expression. This is like a variable in and Erlang expression, but represents some type, not some value."--Richard Carlsson #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 syntax means "Name::TypeVar: The argument name, followed by a type. Here, Name looks just like a variable, but is only for documentation purposes, to make it easy to talk about the different arguments." Also, the 1st bullet point should be removed, as remarked in #31793, and the 3rd point be moved to 1st place. You could change "Type: A type expression" to "Type: A type expression, possibly just a type variable." --Richard Carlsson #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" or "recompile and reload" (and clarify that the shell function c(Module) does both). Calling the compiler directly, e.g. using compile:file(...), or running erlc from an operating system shell, does not cause reloading.--Richard Carlsson #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 qualified function name (prefixing the module name) should be mentioned.--Falko #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 handling JSON converted to Erlang structures.--Steve Vinoski #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
|
|