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.

abudden (2) [Avatar] Offline
#1

Just bought the MEAP for Nim in Action (V05) and I noticed the request for feedback, so here's my feedback from my first read (I've only read the first 2 chapters so far). It's really good and very readable; I learnt a lot and my understanding has improved significantly. Looking forward to having time to keep reading!

  • Page 3, paragraph 2 - "garbage collector. Which" - should be "garbage collector, which"

  • Page 8, paragraph 2, first sentence. Again the full-stop should be a comma (and the sentence is too long so could probably so with removing the "such as" clauses).

  • Page 7, "Compilation" section - should this mention C++ (as this is necessary for C++ libraries)?

  • Page 8 paragraph 3 - should this really be "C and C libraries" and "C and C header files" - presumably the reference is to C++?

  • Section 1.1.1 - another amazing feature that I was really impressed by was the ability to do compile time execution of arbitrary Nim code (which I guess is a subset of metaprogramming). This enables simple (but very useful) things like:

  • const changeset = staticExec "hg id -i"

  • Table 1.1 - to be fair, it would be reasonable to mention which version of python is used here as python 3 (in my tests) is significantly quicker than python 2. Also might be interesting to compare to pypy which is reported to be the fastest python implementation (at least for complex programs).

  • Page 15, "Nim stands on its own" - this was one of the main reasons I started looking at Nim; maybe consider adding a simple table showing the size comparison for your fibonacci program in Nim (in my tests on Windows, the Nim version compiled to circa 500 kB whereas a python version compiled to circa 12 MB)

  • Page 18, listing 1.7, point 1 description. Nothing between the two commas: "the map, , and split procedures respectively"

  • Page 19, paragraph 4. "While Nim does take a lot of inspiration from Python. They..." - should be "Python, they"

  • Page 38, 2.2.1. "manual available at" is very badly typeset

  • Page 40, code example at the top of the page. The numbering is wrong - the lines are numbered 1, 2, 3, 3, but the description shows "Both of these" for 1 rather than 3

  • Page 40, first paragraph. Possibly worth mentioning that the 2 spaces thing isn't enforced so copying-and-pasting code from the web may cause problems if it is indented differently (and it's relatively difficult to auto-indent to correct due to the lack of braces)

  • Page 43, last paragraph. 1019 is missing the superscript.

  • Page 43. In the int section, you list the details of the size of the integers. Might be worth mentioning the default size of float here

  • Page 46, first paragraph, last sentence. Maybe clarify this by saying it can be done if really necessary by concatenating triple-quoted and single-quoted strings (with escaped quotes)?

  • let f = """abc
        def
    """ & "\"\"\"" & """
        ghi
    """ # Note that new-line at start of final """ is removed!
    echo f
    

  • Page 55, "the anonymous procedure is highlighted in bold" - it's in italics, not bold.

  • Page 55 "syntactix" instead of "syntactic" in one place.

  • Page 56, top line. Again: italics, not bold (bold would be clearer)

  • Page 59, paragraph starting "Accessing the items". Is there a reason that this isn't picked up by the compiler in this example? A static analysis tool for C would detect this and I'd hope that Nim's compiler would too.

  • Page 64, nested looping statements. Can you use labels with continue as well as break?

  • Page 64, iterators. Is it worth mentioning that multiple yield statements in an iterator can result in inefficient code?

  • Page 66, "will display a a stack traceback" (two "a"s)

  • Page 67, "branches'" should be "branch's"

  • Section 2.6 - should this discuss finally as well as except?


  • dom96 (75) [Avatar] Offline
    #2
    That's a lot of feedback. Thank you!

    I will go through it all and make the necessary fixes ASAP.