The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Susan Harkins (424) [Avatar] Offline
#1
Please list errors found in the published version of Nim in Action here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
Manning Publications
sjh (2) [Avatar] Offline
#2
Reference to Stropping
(PDF version)

Section 2.1.1 Keywords

The first mention of 'Stropping' (page 23) refers back to section 1.2 (where there is nothing on 'Stropping'). It should refer to section 2.2.2 (page 33).

The Index entry for 'Stropping' lists only page 23.
379275 (2) [Avatar] Offline
#3
Manning Live book, Section 1.2.1, Listing 1.3.

The listing uses what is now reported as a deprecated operator since Nim 0.18.0: https://nim-lang.org/blog/2018/03/01/version-0180-released.html#language-changes

for i in 0 .. <10:
  echo(i)


It looks like the code should now read:

for i in 0 ..< 10:
  echo(i)
379275 (2) [Avatar] Offline
#4
Manning Live book, Section 1.2.1.

The text for

See the Python 3 Readiness page for a list of Python 3–ready packages: http://py3readiness.org/.


contains a link to a now-parked domain.
dom96 (75) [Avatar] Offline
#5
dom96 (75) [Avatar] Offline
#6
Regarding this line in the Chat app example: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L37

I've seen two people wondering about this line, it is indeed an oversight which is a bug. If the user sends a message quickly enough (before the client has a chance to connect), then the program will likely crash. There are two ways this can be solved.

First is to simply replace asyncCheck with waitFor.

Second is to put the top-level code into a new main async procedure and use await on the connect call.

This really shouldn't come up in practice though so it's a relatively minor issue, but to those new to async it causes some confusion so I wanted to clarify it.

Hope this helps.
dom96 (75) [Avatar] Offline
#7
379275 wrote:Manning Live book, Section 1.2.1.

The text for

See the Python 3 Readiness page for a list of Python 3–ready packages: http://py3readiness.org/.


contains a link to a now-parked domain.


Thanks for reporting! This appears to be fixed now though.
Brad Collins (21) [Avatar] Offline
#8
Retracted: Missed the follow-up explanation in the text.
anthon (5) [Avatar] Offline
#9
Looking at the livebook, not sure if that is the same in the PDF or printed version:

In table 2.2, the size uint8 is given as ranging from 0 to 2550 (twothousand five hunderd and fifty), this should be from 0 to 255 (two hunderd fifty five).

Not sure if having multiple entries ( uint8 and uint16 ) on the same line is a feature of the HTML rendering, but a comma, semicolon or slash between the names in the first column and especially between the values in the second and third column, would be helpful:

uint8; uint16; uint32; uint64 8-bit; 16-bit; 32-bit; 64-bit 0 to 255; 0 to 65,5350; 0 to 4,294,967,2950; 0 to 18,446,744,073,709,551,615