By Developers, For Developers
| PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
|---|---|---|---|---|---|
| 59 | TYPO | the last code line of the page should read: | 2010-04-03 | ||
| 16 | TYPO | Mac OS X should be spelled with a capital X. This seems to be a recurrent typo throughout the book. | 2010-04-03 | ||
| 27 | ERROR | The code examples with the logical or operator mistakenly use exclamation marks (!) instead of pipe characters (|) thus generating unexpected errors. The correct versions should be: true || this_will_not_cause_an_error and true | this_will_cause_an_error | 2010-04-03 | ||
| 63 | ERROR | In the book: “That’s simple enough. Make a note: 0 is true as in Ruby, not false as in Java, C, or C#.” | 2010-04-03 | ||
| 61 | TYPO | Io> toDos append(“Get girlfriend a present”) > list("find my car", "find Continuum Transfunctioner", "Find a present")
Should be:
Io> toDos append("Get girlfriend a present") > list(“find my car”, “find Continuum Transfunctioner”, “Get girlfriend a present”) | 2010-04-03 | ||
| 65 | TYPO | I believe that: What is the difference between =:= and ::=? When would you use each one? should be What is the difference between := and ::=? When would you use each one? | 2010-04-03 | ||
| 57 | SUGGEST | By reading the previous page and the BNF grammar I CAN’T really tell that receivers go on the left an messages on the right. In fact, the construction receiver message does not appear in the BNF grammar. | 2010-04-03 | ||
| 27 | ERROR | It looks like the !! and ! operators in the Ruby conditional examples should have been || and | (double pipe and pipe): >> true !! this_will_not_cause_an_error | 2010-04-03 | ||
| 8 | TYPO | Seems like “spits out” may have been the intended phrase but just because I’ve never heard “splits out” (i.e. with the ‘L’) doesn’t mean it’s wrong. “… it is rather a matter of getting the semicolons and | 2010-04-03 | ||
| 38 | TYPO | method is called ‘to_file’ in text, and called ‘to_f’ in example code | 2010-04-03 | ||
| 40 | TYPO | a.sort called twice and ‘a’ assigned twice. it wasn’t clear to me if this was an oversight or meant to demonstrate something. It doesn’t seem important to show that a.any? did not change the state of ‘a’ a.sort | 2010-04-03 | ||
| 9 | TYPO | “Thus is is with programming.” Should only have 1 is | 2010-04-03 | ||
| 14 | TYPO | “…I picked are not necessarily the best, but each each one is unique…” 2 “each” | 2010-04-03 | ||
| 12 | TYPO | Two ‘and’ in the sentence: “I struck JavaScript because it | 2010-04-03 | ||
| 59 | TYPO | From your example: Io> toDos := list(“find my car”, “find Continuum Transfunctioner”) adding “Get girlfriend a present” results in the list having “Find a present” added to it??? | 2010-04-03 | ||
| 24 | TYPO | ‘language’ should be ‘languages’: “…but many | 2010-04-03 | ||
| 24 | TYPO | 2 ‘of’: “…method returns an array of of methods..” | 2010-04-03 | ||
| 65 | TYPO | Under the “Day 1 self study” heading, in the “Find:” section, the first item reads “Some Io examples problems”; I believe the word “examples” should not be pluralized, e.g. “Some Io example problems”. | 2010-04-03 | ||
| 61 | OK | On the Win32 build Io-2008-01-07 when I run “true and 0” (true and zero) I get 0 (i.e. zero) as the result. | 2010-04-20 | won't support other platforms... see above. | |
| 60 | OK | When running in Win32 build Io-2008-01-07 I don’t see “asObject” in the list when I type “Map proto” and when I create a Map and fill a map I get the following when I try to run “asObject”: Exception: Map does not respond to ‘asObject’ My code is: Io> maap = Map clone Io> maap asObject Exception: Map does not respond to ‘asObject’ Io> maap atPut(“a”,1) Io> maap atPut(“b”,2) Io> maap asObject Exception: Map does not respond to ‘asObject’ Io> maap asobject Exception: Map does not respond to ‘asobject’ | 2010-04-20 | Sorry... I really can't support other platforms. If I just took the top 4 platforms, I'd be going through examples in 28 language/platform combinations. Throw in version numbers for the languages, and it's just too much. | |
| 8 | TYPO | first line that is repeated twice “Let’s assume that that you’ve actually managed the difficult task” | 2010-04-03 | ||
| 9 | TYPO | “This make the the difference” make -> makes | 2010-04-03 | ||
| 25 | TYPO | Syntax hilighting/code colouring wrong: the “puts” line after the unless/else. (10th line of typed code in that segment) | 2010-04-20 | ||
| 101 | TYPO | Docbook markup visible for some reason (3/4 down): | 2010-04-03 | ||
| 68 | ERROR | Io> postOffice := Object clone should be: Io> postOffice := Object clone | 2010-04-03 | ||
| 30 | ERROR | “Unlike Java and C. you don’t have to build a whole class to define a function.” | 2010-04-03 | ||
| 63 | TYPO | In this sentence: “Steve Dekorte: In 2002, my friend Dru Nelson wrote a language called There should be no apostrophe in “its” as it’s a possessive: “Steve Dekorte: In 2002, my friend Dru Nelson wrote a language called | 2010-04-03 | ||
| 68 | SUGGEST | First paragraph of the “messages” section says: “You In fact, reflection is an area that I find badly explained in the book and on the Io web site so a bit more details would be very much appreciated. | 2010-04-03 | ||
| 76 | TYPO | Four lines from bottom: “If the message is anything else, RowBuilder forwards that back to Builder, and we’re done.” but there is no RowBuilder prototype defined in the code. | 2010-04-03 | ||
| 78 | TYPO | Top of page: “Fezzik and Vizzini are independent objects with coroutines. fezzik and vizzini are instances of these.” There are no objects Fezzik and Vizzini, just two instances fezzik and vizzini, with coroutines talk and rhyme. | 2010-04-03 | ||
| 78 | TYPO | Remove redundant “fire” in: “We fire fire asynchronous pitch and catch methods.” | 2010-04-03 | ||
| 78 | TYPO | “We fire fire asynchronous pitch and catch methods.” The methods are called “talk” and “rhyme”, not “pitch” and “catch”. | 2010-04-03 | ||
| 81 | TYPO | Last exercise: book({“author”: “Tate”}…“) would print >p author=”tate“”<: should read: book({“author”: “Tate”}…) would print
(incorrect angle brackets, extraneous double quote and colon characters) | 2010-04-03 | ||
| 90 | TYPO | Example in the middle of the page: | ?- food_type(sausage, sweet). This question makes no sense, presumably the one that was intended is: | ?- food_flavor(sausage, sweet). | 2010-04-03 | ||
| 106 | TYPO | Bottom of the page, concatenate is misspelt concatinate throughout the code example, including at the top of page 107. | 2010-04-03 | ||
| 112 | TYPO | Second paragraph: Gnu Prolog has a built-in predicate to express possible values, called fd_domainfd_domain(List, LowerBound, UpperBound). The extra fd_domain should be removed. | 2010-04-03 | ||
| 117 | SUGGEST | A couple of simple diagrams to show that all queens that have the same value for col-row are on the same northwest-southeast diagonal and that all queens that have the same value for col+row are on the same southwest-northeast diagonal would help in understanding the explanations. The simplest would probably be an 8x8 board with numbered columns and rows and greyed out diagonals with actual values for col-row and col+row. | 2010-06-08 | I will probably fix this one in a later edition. | |
| 129 | SUGGEST | This sentence is misleading: “In Java, some strings were literals, and some were objects.” At the end of the day, even when declared as a literal, all Java strings are objects and immutable. Furthermore, the discussion above that sentence is about numbers so talking about Java strings only confuses the reader. A better comparison would be to say that in Java, all numbers have a primitive and and object version (int vs Integer), that led hundreds of Java programmers to despair when they had to convert from one to the other and prompted Sun in adding autoboxing in J2SE 5.0. | 2010-04-03 | ||
| 130 | TYPO | First paragraph, last line, “string” should be capitalised in “java.lang.string”. | 2010-04-03 | ||
| 131 | ERROR | This sentence is incorrect: “In Java, 0 was false. In both languages, nil evaluated to false.” In Java, both if(0) and if(null) will generate a compilation error, just like Scala. Attempting to cast 0 or null to boolean won’t work either and will generate the same compilation error. You can verify this by trying to compile this short Java program: public class Zero { | 2010-04-03 | ||
| 131 | ERROR | First paragraph, second line: var is immutable; val is not. This is specified the wrong way round: var declares a mutable variable while val declares an immutable value. | 2010-04-03 | ||
| 132 | TYPO | Last paragraph, first sentence: “So my thinking of static typing was shaped by my the Java wars.” Either remove the word “my” or the word “the” in front of the word Java. | 2010-04-03 | ||
| 135 | ERROR | First paragraph, first sentence:“It’s mildly surprising that the range by 5 included 10, but the range by This is because the range by 5 used the “to” keyword while the range by 1 used the “until” keyword. The top boundary is included with “to” and excluded with “until”. You can try that for yourself by running: scala> (0 to 10) scala> (0 until 10) So the sentence above should be re-worded to specify the difference between the “to” and “until” keywords. | 2010-04-03 | ||
| 137 | ERROR | Last paragraph, second setence: “Unlike Java code, you can execute arbitrary code, such as the println statement.” I’m not sure what you mean by this statement: you can execute arbitrary code in a Java constructor too. The only constraint is that if you call super(), it has to be the first statement in the constructor but otherwise I am not aware of any arbitrary code that you can’t run. | 2010-04-03 | ||
| 142 | TYPO | Paragraph before last, second sentence: “Instead, Scala uses a concept called companion classes to mix class and instance methods on the same class”. Should be re-phrased “Instead, Scala uses a concept called companion objects to mix class and instance methods on the same class”, to be consistent with page 140. | 2010-04-03 | ||
| 107 | TYPO | Second to last line, there is a missing ‘)’ in the sentence ending with: concatenate([1, 2], [3], What. | 2010-04-03 | ||
| 8 | TYPO | inconsistent capitalization: ‘Interpreter’ is capitalized, ‘compiler’ is not (lines 1-2) | 2010-04-03 | ||
| 32 | TYPO | line before last - numbers = {1 => “one”, 2 => “two”} does not have interpreter prompt and is not coloured as input | 2010-04-03 | ||
| 33 | TYPO | in the example: >> def tell_the_truth(options={}) line “?> true” is not coloured as input | 2010-04-03 | ||
| 55 | TYPO | the code lines for Vehicle description appear twice; it would make more sense if the first instance was removed. | 2010-04-03 | ||
| 16 | TYPO | “From the programming side, I speak basic”. This should be “I speak BASIC” or “I speak Basic”. | 2010-04-03 | ||
| 124 | ERROR | “Think Smalltalk for objects, or Lisp for functional I hardly think Lisp is a pure functional language. It has purity of syntax (or, as Lispers would say, no syntax at all!) but between the dynamic scope of early Lisps (still available in Common Lisp) and all the procedural loop macros, it does not enforce a functional style. In fact, tail-call optimization is not even part of the standard for most Lisps (only Scheme) so you have a category of correct functional programs that are not guaranteed to run under Lisp. I’d pick Lisp as an example for pure syntax and homoiconicity (you either love it or hate it) and Haskell as a pure functional language. | 2010-04-20 | I dropped the "pure". I think the argument still holds. Lisp was radically different, and very powerful because of the functional concepts it introduced. | |
| 143 | TYPO | 5.3, first paragraph, first sentence: “…and his unique | 2010-04-03 | ||
| 144 | TYPO | Scala console session at the top: the last two entries look redundant and don’t add anything to the discussion: scala> def double(x:Int):Int = x * 2 scala> double(4) | 2010-04-03 | ||
| 148 | TYPO | First example, the paragraph above talks about the operator but the example uses the operator again. The example should be: scala> animals Set(“armadillos”, “raccoons”, “lions”, “tigers”) | 2010-04-03 | ||
| 147 | SUGGEST | Discussion on sets on page 147 and 148 should clearly explain that the , -,+, — and operators create new sets rather than updating the sets in place. There is a hint in the fact that Scala uses the scala.collection.immutable.Set class but it should be said explicitly. | 2010-04-03 | ||
| 149 | ERROR | foreach section, paragraph after the first example, first sentence: hobbit => println(hobbit) is an anonymous function, meaning a higher-order function without a name. This contradicts the definition on page 148: “In layman’s terms, a higher order function is one that produces or consumes functions.” According to that definition, “foreach” is the higher-order function, while “hobbit => println(hobbit)” is an anonymous function that is an argument to the higher-order function foreach. I believe the definition on page 148 is correct, therefore, the example on page 149 is not. | 2010-04-03 | ||
| 157 | TYPO | First example with the \\ operator, the last line doesn’t belong to this example: res2: String = Pirates of the Caribean | 2010-04-03 | ||
| 29 | TYPO | paragraph starting ‘Duck typing…’, the word tenant (=person who inhabits a property) should be replaced with ‘tenet’ (=belief or principle) | 2010-04-03 | ||
| 47 | TYPO | “The metaprogramming happens in the ActsAsCsv macro” | 2010-04-03 | ||
| 49 | SUGGEST | The description of metaprogramming would benefit if you add another code example of how classes “can change based on the state of your application”, building up on “acts_as_csv_module.rb”. The example on page 48 only illustrates how to use the technique, plus there is a vague-ish description of how it is used in other people’s code. I hope there is more material coming on Ruby metaprogramming. | 2010-04-20 | I originally had the CSV example much like ActiveRecord, with extra accessors based on the name of the columns in the CSV. I got feedback that the example got too complex, too soon. \n \nI pulled back the complexity of the code. I may decide to add it back in depending on feedback, but I would prefer to use the extra pages and complexity on languages that are a little less known. | |
| 48 | SUGGEST | Shouldn’t all 3 modules in acts_as_csv_module.rb be separate instead of ClassMethods and InstanceMethods being nested in ActsAsCsv as in the pdf? Am I missing a subtle point? It works either way, but (being Ruby ignorant) I suspect nested module definitions do not illustrate the idea of metaprogramming very well. | 2010-04-20 | I'm going to leave this example as it is. | |
| 41 | TYPO | “These examples will force you to do a little more analytic thinking” …analytic… should be analytical | 2010-04-03 | ||
| 51 | TYPO | “…to calculate all addresses codes in a fifty mile radius.” should be “address codes” | 2010-04-03 | ||
| 99 | TYPO | the Waltons was a 1970’s TV show, not 1950’s. | 2010-04-03 | ||
| 40 | SUGGEST | David mentions a redundancy with a.any? but I’d also add that there was no reason to assign a = [5,3,4,1] twice. To have done so seems to indicate that a.sort would have changed ‘a’ but it wouldn’t do so. | 2010-04-03 | ||
| 40 | TYPO | The reference to ‘all’ in the 2nd last para should instead be ‘all?’ | 2010-04-03 | ||
| 66 | TYPO | in the example: Io> i = 1 i = 1 should really be i := 1 as i hasn’t been created yet. | 2010-04-03 | ||
| 35 | SUGGEST | The text reads “Like an earlier example you saw, this code opens up an existing class” There was no previous example that added to an existing class. In fact, this is the first time “class” has been used to scope a method. | 2010-04-20 | ||
| 28 | ERROR | While duck typing is a type of dynamic binding I fail to see how delayed binding relates to duck typing as implied in: “This concept is called delayed binding, also known as dynamic or duck typing.” | 2010-04-20 | ||
| 40 | ERROR | a.sort is called twice and a assigned twice. My guess is that one was supposed to be sort! and show that the array was updated? | 2010-04-20 | ||
| 73 | ERROR | in the phonebook code: “0 to(call args size - 1) foreach(i,” “call args” should be “call message arguments” | 2010-04-20 | ||
| 42 | TYPO | “Write a simple grep that will print the lines having any occurrences of a phrase anywhere in a file” do you really mean finding the occurrences of the phrase anywhere in the line, not “in a file”? | 2010-04-20 | ||
| 15 | TYPO | Capital G in Google is probably more appropriate | 2010-04-20 | ||
| 87 | TYPO | There is a missing ending ‘l’ letter in the last name of Phillipe Roussel. | 2010-04-20 | ||
| 171 | TYPO | “Not Threading” title: should it be “No Threading” instead? | 2010-04-20 | ||
| 172 | TYPO | First paragraph, the following two sentences are repeated from the “Not Threading” section on page 171: Erlang’s creators spent effort to simplify creation, management, and communication within applications Besides “Erlang’s creators spent effort to…” should probably be re-phrased. | 2010-04-20 | ||
| 97 | TYPO | The sentence, “We had give the simulated dolphin the same heuristic,” should read, “We gave….” | 2010-04-20 | ||
| 56 | SUGGEST | This page says “You won’t find much syntactic sugar at all. You’ll just send messages to objects.” and then a couple of paragraphs later uses what seems to be syntactic sugar in the example: Io> Vehicle description := “Something to take you places” Maybe point that out? Otherwise this example is a bit confusing because it does not fit into BNF. It looks like all “:=” and “=” usage is syntactic sugar for “setSlot” and “updateSlot” messages | 2010-04-20 | Good comment, but in situations like this, I use a phrase like "much" to qualify the statement. (The use of "" is also syntactic sugar, but compare this language with, say, Ruby or Clojure.) I don't want to introduce too much too soon. | |
| 184 | TYPO | Day 1 self study finishes with the sentence: “Spend a little time playing with slots and prototypes. Make sure you This doesn’t make sense for Erlang is seems to be an accidental paste from the chapter on Io. | 2010-04-20 | ||
| 185 | TYPO | “If” section, third sentence says “Later, we’ll introduce guards on pattern patches”. This should be “pattern matches”. | 2010-04-20 | ||
| 190 | SUGGEST | Both the paragraphs before and after title “Advanced List Concepts” start with the phrase “So far,…”. Re-phrase the text to avoid the repetition. | 2010-04-20 | ||
| 195 | TYPO | Second “Do” item in Day 2 self-study says: “Write a list composition…”. Replace with “Write a list comprehension”. | 2010-04-20 | ||
| 204 | TYPO | Example at bottom of page, the following is superfluous and confusing: 3> spawn(fun doctor:loop/0). | 2010-04-20 | ||
| 208 | SUGGEST | Section on integration. There is a project to create a jvm erlang VM, erjang. It looks fairly new and I don’t know what the current state of it is but it may be worth mentioning. | 2010-04-20 | Thanks for the suggestion. I'll keep an eye on it. | |
| 34 | TYPO | Throughout the ruby code examples in the pdf, the opening and closing curly-braces appear to be from different fonts: the closing brace is definitely more squiggly than the opening brace. | 2010-04-20 | I can't really control this from the markup. Good eye, though! I would not have noticed. | |
| 55 | TYPO | Inconsistent capitalization of titles. e.g. ‘Breaking the Ice’, but on the same level title ‘Objects, prototypes and inheritance’ | 2010-04-20 | I'll fix these all at once in the copyedit phase of the book. Thanks for the comment. I'm marking this as fixed to clear the errata for bookkeeping purposes. | |
| 74 | TYPO | This example input file: { does not need any commas between entries, they confuse the code so that processing stops after the first key (this is on Windows binary release). E.g. Io> phoneNumbers asList Without comma the result is as it should be Io> phoneNumbers asList | 2010-04-20 | ||
| 74 | SUGGEST | In addition to #42763 - everything seems to work with commas if #42650 is corrected. | 2010-04-20 | ||
| 153 | TYPO | “scala>” prompt and highlighting are missing from the following examples: val words = List(“peg”, “al”, “bud”, “kelly”) words.count(word => word.size > 2) words.filter(word => word.size > 2) words.map(word => word.size) | 2010-04-20 | ||
| 154 | TYPO | “The, we count all…” The should be Then | 2010-04-20 | ||
| 61 | ERROR | In the example code, entering io> elvis asObject returns Exception: Map does not respond to ‘asObject’ If I enter io> Object the list of returned slots does not include “asObject”. Regards, | 2010-04-20 | This works for me. | |
| 218 | ERROR | Example a third of the way down the page: user=> (if “” user=> (if 0 (println “true”)) should be: user=> (if “” (println “true”)) | 2010-05-13 | ||
| 219 | ERROR | First paragraph: The three main operations for a list are first (the head), last (the list minus the head), and cons (construct a new list given a head and a tail) This is incorrect, there are four operations: first (the head), last (the last element), rest (the list minus the head), and cons. | 2010-05-13 | ||
| 220 | SUGGEST | The example at the bottom of the page suddenly uses commas between elements while all previous examples only used a white space. The commas work too but may be confusing for the reader. | 2010-05-13 | ||
| 221 | TYPO | Half-way down the page: “Clojure has two kinds for forms that are used to name things in this way, keywords and symbols.” Should read: “Clojure has two kinds of forms that are used to name things in this way, keywords and symbols.” | 2010-05-12 | ||
| 173 | TYPO | “Distributed message passing is a basic language-level construct, eliminating the need for locking and improving concurrency.” is repeated twice | 2010-05-13 | ||
| 54 | TYPO | So Ruby’s core strengths are its syntax and flexibility. | 2010-05-12 | ||
| 58 | TYPO | Io> Object type | 2010-05-12 | ||
| 179 | TYPO | “Let’s say we want to assign the name to Nirst, and the profession to Profession.” Nirst? | 2010-05-13 | ||
| 185 | TYPO | “…given input of the form {error Message}…” missing comma? i.e. should be “{error, Message}” | 2010-05-13 | ||
| 63 | SUGGEST | you say “now you’ll want to iterate over them” but leave the reader there. It feels like you’ve wanted to add a paragraph or so about iteration here. | 2010-05-12 | ||
| 186 | TYPO | “…and i think I heard him laugh” should be a capital “I” | 2010-05-13 | ||
| 189 | TYPO | “3> Print = fun(X) -> erlang:display(X).” missing an “end”. i.e. should be: 3> Print = fun(X) -> erlang:display(X) end. | 2010-05-13 | ||
| 196 | TYPO | “[{erlang ”a functional language“}, {ruby ”an OO language“}]” missing commas. should be: [{erlang, “a functional language”}, {ruby, “an OO language”}] | 2010-05-13 | ||
| 128 | OK | “(With most object oriented languages, a typical getter would Don’t you mean setter ? That is the method type that breaks immutability. | 2010-05-13 | No, a getter. Execute the function first_name, get one response. Change the state of first name. Then, execute the same function with the same input parameters, and get a different response. \n \nConfused me too at first. | |
| 936 | OK | Io chapter indicates that (Vehicle slotNames) will include “type” but it does not | 2010-05-12 | ||
| 1248 | TYPO | Princess Buttercup’s true love’s name is Westley, with a T, not Wesley. I hope this makes up for my erroneous report of “type” slot being unreported on vehicles. | 2010-05-12 | ||
| 65 | ERROR | Syntax error just after the first paragraph: Object clone := ‘hosed’ The ’ slot Io leaves up to the user to define for additional syntax. If this example was meant to show replacing the root level clone object with a string whose contents are hosed, then the single quote ’ needs to be double quote " or triple double quotes “”" around hosed. | 2010-05-12 | ||
| 71 | ERROR | I strongly urge you to consider changing this paragraph: This little example is beautiful, so read it carefully. Think of doMessage as Ruby’s eval. It just executes code. We’re delaying the execution of the parameters. In a typical object oriented language, the interpreter or compiler would compute all of the arguments, including both code blocks, and place their return values on the stack. In Io, that’s not what happens at all. Into something that accurately describes Io. Not that this is far off, but it leaves some items out. For example, touching on the first sentence; doMessage is not really like Ruby’s eval(). doMessage evaluates a preconstructed AST. It’s like what you would use to implement an eval(). For example, doString in Io can be implemented in terms of doMessage: doString := method(str, self doMessage(str asMessage)). This takes the argument (assumed to be a string) and creates a message (Io’s AST is just Message objects) and then passes it as the argument to doMessage evaluated against the receiver of the method. Straight forward. doString in the previous example I just gave, is equivalent to ruby’s eval(). Secondly, the wording of the third sentence is misleading. It writes: We’re delaying the execution of the parameters. However, Io never defers evaluation of formal parameters. Formal parameters are always evaluated within the context in which they are passed in. I.e., the caller’s scope. Informal parameters however (that is to say, arguments which were not defined at the time the method was defined, such as arguments 0, 1 or 2 in the unless example) are left unevaluated, as message objects accessible in the “call” object within a method or block, for the method itself to decide what to do with. This is where the true power of implementing control flow operations comes in, and it should be clearly marked as such. | 2010-05-13 | ||
| 76 | SUGGEST | Suggest a rework of this as well: The next line adds an operator to Io’s operator table, speci- fying the core operators in the language. Whenever : is encountered, Io will call atPutNumber on the sender, as you’ll see. Should probably show an example of how “a : b” gets parsed to make it more clear to the reader. I.e., assignment operators are parsed different to regular operators (which granted, are not demonstrated at all and that’s another point, should be). For example, “a : b” will be parsed (according to the example I wrote, and you published in the book): atPutNumber(“a”, b). This distinction is critical to understanding of how assignment operators work. As a secondary suggestion, as noted previously, the book should really touch on binary operators as well. Such as the kind of +, -, etc., and how they work. An example is provided, however contrived. Assume that we want to define a new way of multiplying numbers, let’s call it ’ (single apostrophe). Since this is not a defined operator existing, and we can check this by in the REPL typing: OperatorTable, and looking at the string it returns, we need to add it. We can do this by this code: OperatorTable addOperator(“’”, 2) This adds ’ to the operator table at the same precedence level (2, closer to 0 binds more tightly), and now we can define ’ on objects. Let’s just define it on Number to complete this contrived example: Number ’ := method(num, self * num) So here, we know what’s happening. Now then, when Io encounters ’ messages in the future, it will shuffle it around adding in (’s and )’s where appropriate based on other operators in the message tree (if any) or carry on to the end of the line. I.e., 1 ’ 5 factorial gets parsed as: 1 ’(5 factorial). However: 1 ’ 5 + 7 factorial would be parsed as: 1 ‘(5) , since binds less tightly than ’. | 2010-05-13 | ||
| 76 | TYPO | In the paragraph starting: Moving to the right, … The embedded code has a typographical error. It notes “domessage” when the message name he’s after is “doMessage”. | 2010-05-12 | ||
| 92 | SUGGEST | seems inconsistent: first code asks which are meats and ends with ‘no’ because there are no more… second code asks which flavors are sweet but ends in ‘yes’ because…??? | 2010-06-08 | I must confess, I don't know! Does any reader know the difference? If so, you can post the answer here, or drop me a note: bruce at rapidred.com. | |
| 217 | TYPO | First sentence of ‘Booleans and Expressions’: ‘Closure’ should be ‘Clojure’ | 2010-05-13 | ||
| 219 | TYPO | Paragraph starting ‘You may…’ : ‘clojure abstraction’ ->‘Clojure abstraction’ (it’s capitailzed in all other uses) | 2010-05-13 | ||
| 221 | TYPO | Under ‘Maps’, after third code example: ‘Closure’ -> ‘Clojure’ | 2010-05-12 | ||
| 230 | TYPO | Inconsistency in last paragraph: elsewhere ‘day 2’ is mentioned but capitalized.. should check throughout the text and be consistent. | 2010-05-12 | ||
| 102 | TYPO | Top of page in text ’ The also works in reverse’ … the what? | 2010-05-13 | ||
| 105 | TYPO | Inconsistent typography: ‘Head’ in the first paragraph is written in the same font as the rest of the text; elsewhere (cf. next page) it is written in the sans-serif font. | 2010-06-08 | will wait on the editorial pass for this one. | |
| 110 | TYPO | missing space: ‘..the tail ofTail-A’ | 2010-05-13 | Can't find this one... must have already have been fixed. If you still see it, can you post the sentence or paragraph it appears in? | |
| 117 | TYPO | missing plural: ‘Each queen is on two diagonal’ | 2010-05-13 | ||
| 118 | TYPO | inconsistent capitalization: ‘Northwest’ on this page, ‘northwest’ on previous | 2010-05-13 | ||
| 124 | TYPO | ‘particularly on those…’ should be ‘particularly in those…’ | 2010-05-13 | ||
| 36 | TYPO | The yield between begin_transaction and end_transaction should not be indented. | 2010-05-12 | ||
| 50 | TYPO | “should return lions” -> “should print lions” | 2010-05-12 | ||
| 35 | SUGGEST | The “return” in the tell_the_truth function is unnecessary. def tell_the_truth(options={}) Having earlier pointed out that return is optional when the last value is to be returned, wouldn’t it re-inforce the point to remove this return? | 2010-05-12 | ||
| 35 | TYPO | “If you pass in a :profession of lawyer, you will get something different.” Shouldn’t that be the symbol :lawyer rather than the variable name lawyer? | 2010-05-12 | ||
| 25 | SUGGEST | On this page you explain the difference between ‘literal strings’ and “strings to be evaluated”. In the examples shown on the page you only uses double quoted strings for strings that need to be evaluated. In following examples you seem to use ’ and " interchangeably for ‘literal strings’. Using only single quotes for “literal’ strings would re-inforce the message about ”strings to be evaluated". | 2010-05-12 | ||
| 41 | TYPO | Shouldn’t “The filename implements two default methods for safety that we expect clients to override.” read “filename is a safety method that we expect clients to override.” [Also shouldn’t filename be in the “embedded code font”?] | 2010-05-12 | ||
| 47 | OK | on OPEN CLASSES: | 2010-05-13 | I don't think I'm going to fix this one. A downcase would be easy to add, but I want to keep the example simple, and it works as it is. | |
| 42 | SUGGEST | I would have found it easier to understand if you had written “Since the spaceship operator is implemented by Fixnum, you can sort and compute the min or max of these integers as sort, min and max all make use of the spaceship operator.” instead of “Since the spaceship is implemented on these integers through Fixnum, you can sort, compute the min or max.” | 2010-05-12 | ||
| 42 | SUGGEST | I don’t see how the paragraph starting “You can also do set-based operations.” relates to the Modules and Enumerable heading. Perhaps you could explain the linkage. | 2010-05-12 | ||
| 42 | TYPO | “apply a function” => “apply a block” | 2010-05-12 | A code block is an anonymous function. I'm going to leave this alone, because I want the reader to get used to that concept. | |
| 153 | TYPO | First code line at top of page says “forech” instead of “foreach” | 2010-05-13 | ||
| 60 | TYPO | The line “ferrari getSlot(”type“)” is missing the Io prompt and should be “Io> ferrari getSlot(”type“)”. | 2010-05-12 | ||
| 61 | TYPO | Object should be spelled uppercase in the sentence “object supports the list method which …” after the code examples in the “Lists and maps” section. | 2010-05-12 | ||
| 10 | TYPO | Last sentence of 3rd paragraph: “The is the quickest way to mastering a skill.” | 2010-05-13 | ||
| 10 | TYPO | 5th paragraph: “… your subconscious is figuring our the deep meaning …” | 2010-05-13 | ||
| 14 | SUGGEST | The first sentence about Io would probably read better as: “Along with Prolog, Io is the most controversial language I included.” | 2010-05-13 | ||
| 211 | OK | The link between the last sentence: Before diving in too deeply, let’s talk a little bit about Lisp, and then shift gears to what’s exciting about Clojure. The title of the next section: Introducing Clojure And the first subsection: All Lisp Seems strange to me (I’m not a native english). | 2010-06-08 | ||
| 220 | TYPO | Last parentheses in the examples should be in blue (they are in green). | 2010-07-26 | ||
| 27 | SUGGEST | puts “This appears to be true.” unless x == 4 A little confusing, perhaps “I appear if I am false”? If x wasn’t == to 4, then the statement “this appears to be true” would be printed, which would not be correct. | 2010-06-08 | ||
| 62 | TYPO | “elvis := Map clone” line is missing the Io prompt | 2010-06-08 | ||
| 64 | SUGGEST | Could be useful to explicitly show the equality of fred and mike before showing the inequality of one and two. | 2010-06-08 | ||
| 56 | ERROR | The BNF description doesn’t seem to be correct (I know it’s copied from the iolanguage.com site, but there it’s given as an informal BNF description; here it’s given as “the entire syntax”). Some problems are: | 2010-06-08 | ||
| 226 | TYPO | The correct name of that big guy from Star Wars is Jabba, not Jaba :) | 2010-06-08 | ||
| 226 | TYPO | ..and Jabba is not a bounty hunter, he is some sort of gangster. | 2010-06-08 | ||
| 59 | TYPO | Typo in the word “just”: | 2010-06-08 | ||
| 60 | TYPO | Missing example. | 2010-06-08 | ||
| 64 | TYPO | like changing a method’s clone method to make a singleton. Think you might have meant “changing an object’s clone method […]” | 2010-06-08 | ||
| 81 | TYPO | page 81: Is there a difference or is @@ a typo? | 2010-06-08 | ||
| 82 | SUGGEST | “Futures” section looks unfinished - it uses chunks of code not belonging to any object then refers to an undefined object “backToThePast” which probably contains the code in question | 2010-06-08 | ||
| 68 | OK | while(i <= 11, i println; i = i + 1); “This one goes up to 11” println This does not work: Io> while(i <= 11, i println; i = i + 1); “This one goes up to 11” println | 2010-07-20 | Works for me. Did you make sure to set i? | |
| 39 | TYPO | In the code fifth line from bottom: | 2010-06-08 | ||
| 26 | TYPO | “… ans the method called methods returns an array of of methods … ” The second ‘of’ should be removed. | 2010-06-08 | ||
| 92 | SUGGEST | Explanations to “yes vs. no” in #43048: "In some cases the top-level can detect that the current solution is the last one (no more alternatives remaining). In such a case it does not display the ? symbol (and does not ask the user). Example: | ?- (X=1 ; X=2). X = 1 ? ;\t \t(here the user presses ; to compute another solution) X = 2\t \t(here the user is not prompted since there are no more alternatives) yes" (from gprolog manual - cannot post links here) | 2010-06-08 | ||
| 126 | SUGGEST | “In this sense, Scala is a Frankenstein of sorts, but not a monster. Think Edward Scissorhands.” Contrary to popular opinion, Frankenstein is not the name of a monster, but of a scientist who created the monster. I dont think this is the idea you are invoking. | 2010-06-08 | ||
| 29 | TYPO | The installation instructions for Ruby say that “Ruby comes with the X-code disks.”. Unfortunately, there is no such thing as X-code. The correct name for the OS X developer tools is Xcode, capitalized exactly like that. | 2010-06-08 | ||
| 33 | ERROR | The bit about & and | being non-short-circuit versions of && and || is mostly incorrect. & and | are only non-short-circuiting logical operators when used with true/false/nil. When used with other objects they behave differently; most notably they are the bitwise operators for numeric classes and the Intersection/Union operators for Array/Set. This distinction is fairly important, especially as this section comes immediately after demonstrating that all objects besides nil/false are treated as true in a conditional. | 2010-06-08 | ||
| 34 | TYPO | In the epub version of this book, all instances of a backtick (`) are showing up as the LOWER RIGHT PENCIL character (✎). I checked to make sure this wasn’t some strange bug in iBooks and the html files really do contain this character. | 2010-07-20 | ||
| 65 | ERROR | On PDF Page #62 we updated the Vehicle description to be “Something to take you far away”, but Figure 3.2 on PDF Page #65 indicates that it’s still “Something to take you places”. | 2010-06-08 | ||
| 66 | TYPO | Second paragraph of Methods says “A method is an object, jut like any other type of object”. The word “jut” should be “just”. | 2010-06-08 | ||
| 64 | SUGGEST | Wouldn’t the ferrari object have a ‘type’? Oh wait, it’s a capitalization thing? Highlighting that would probably be helpful… Io> Ferrari := Car clone Io> Ferrari type Io> ferrari type | 2010-06-08 | ||
| 80 | OK | The example with westly is mildly confusing. I expected it to actually do something with princessButtercup, but it turns out that the presence of this object is completely unnecessary, and removing it from the example would change nothing. | 2010-07-20 | I'm showing the flow of a message. buttercup is the target, so it's necessary. | |
| 80 | TYPO | The indentation in the ancestors method of the io/animals.io example is a bit confusing and feels like a mistake. It indents the first and 3rd lines of the if block, but not the 2nd or the 4th. | 2010-06-08 | ||
| 48 | OK | The Do #2 question says to specify the tree like this: {’grandpa’ => [{’dad’ => [‘child 1’, ‘child 2’]}, {’uncle’ => [‘child 3’, ‘child 4’]}]} when it should be: {’grandpa’ => [{’dad’ => [{’child 1’ => []}, {’child 2’ => []}], | 2010-06-08 | ||
| 289 | TYPO | double-colon in the third myRange example 1:2::3:myRange (4 1) | 2010-06-08 | ||
| 275 | TYPO | The first code snippet this page, “haskell/fact_with_guard.hs” appears to be invalid. Here it is: module Main where I think it should be: module Main where I’m using ghci v6.12.1. | 2010-06-08 | ||
| 82 | TYPO | Question 4 asks me to add a slot to list that computes the average of all numbers in the list. Two problems. First, the type is List, and second, List already has a slot called “average” that does precisely this. | 2010-06-08 | ||
| 91 | TYPO | The example for self study problem 3 has a couple of stray quotes. | 2010-06-08 | ||
| 41 | TYPO | “This style of programming, made famous in Smalltalk is called a mixin.” The apposition “made famous in Smalltalk” is missing a comma. | 2010-06-08 | ||
| 48 | SUGGEST | “Macro” is introduced as an idea, but there’s no scope placed on the name “Macro”. These days, I think the majority of people think “Macro” is something you do in Visual Basic for Applications or Apple’s Automator widget. I have heard of “Hygienic Macros” from a friend who detested their introduction into Scheme or Lisp when it destroyed his use of (apparently) non-hygienic macros. But I’m not sure if these macros are the same as those macros, or what their relationship with CPP’s macros might be. So some idea if this term is Ruby-specific or common to the larger world of programming languages would be superb. At least for me. :) | 2010-06-08 | ||
| 53 | SUGGEST | “In formal big enterprises with distributed transactions, failsafe messaging, and internationalization, the role of Ruby is a little more limited.” How does Ruby fall short with internationalization? Granted, C’s _() gettext() is really convenient to use, but it forces translators into some pretty awkward sentences when the natural order of replaced elements is different from the ‘native’ language of the application. Ruby’s interpolated strings make this process way easier, since translators can move the interpolated variables around as they need to. It might still fall a little short when sentences require four versions for different pluralizations, but it’s doable. (Slovenian requires four different pluralization forms. Croatian, Czech, Gaeilge, Latvian, Lithuanian, Polish, Romanian, Russian, Serbian, Slovak, Ukranian all require three different pluralization forms. And Ruby’s interpolated variables-into-strings and I18n library make this sort of thing possible, but C’s gettext() can’t hope to come close without significant application work.) | 2010-06-08 | ||
| 54 | OK | I’ve always had an ‘iffy’ feeling about duck-typing. When I’ve complained in the past, a friend said, “you’re just worried because you don’t have adequate test coverage of your application.” (This statement is probably true for nearly everyone.) But it does bother me that the language isn’t going to help me figure out what API a duck needs to implement for some other piece of code to treat it like a duck. Maybe ducks need to quack, eat, and fly most days of the year, but every February 29 a duck also needs to bite a goose in the butt. How would an ersatz-duck-author know this? Only by reading the entirety of the dependent code! (Or, very kind dependent code authors, who publish an up-to-date list of all methods they require.) Java Interfaces, for all that they don’t bother to do, at least do tell programmers pretty clearly what API they need to support. Python’s Twisted framework has run into this very issue with duck typing, and they’ve slapped a home-grown interface mechanism into their code. It feels pretty tacked-on. How is duck typing handled in the real world? I’ve only ever written self-contained applications in duck-typing languages, where it hasn’t even been an issue: either feature or a detriment. | 2010-07-26 | That's a good question. I hope you like the alternatives presented in the Scala and Haskell chapters. | |
| 70 | TYPO | “He said ”Bruce, there’s …" s/said/said,/ | 2010-06-08 | ||
| 109 | TYPO | concat_step_1 has been included into the text twice. The second time it is included would be the logical place to include concat_step_2 into the text, but it is included later — after it has been used. | 2010-06-08 | ||
| 129 | SUGGEST | “Strictly speaking” has been used twice in two paragraphs. Unless used for parallel construction, duplicated introductory phrases feel funny to me. | 2010-06-08 | ||
| 132 | TYPO | “like java.lang.String Please trust me,” s/String Please/String. Please/ | 2010-06-08 | ||
| 146 | TYPO | Copy-n-paste from Scala console is missing the leading “scala> ” prompt in the section “var vs val”, code line: var mutable = “I am mutable” | 2010-06-08 | ||
| 17 | SUGGEST | “I am going to make a deal with you. You agree to let me focus on the programming language rather than installation details.” THANK YOU. I can’t tell you huge a waste of time I’ve thought it is for language books to waste an entire 12-24 pages on how to install one specific version of their language. Notes of specific versions used are fine, comments on more-reliable vs known-flaky versions are fine, but thank you so much for bucking the trend on including complete installation instructions. I can’t say it enough :) thank you. | 2010-06-08 | ||
| 120 | ERROR | “Find: There are no implementations of fibonacci or factorial in Prolog chapter | 2010-07-20 | ||
| 169 | ERROR | “We implemented a factorial There is no factorial example in Prolog chapter | 2010-07-20 | ||
| 186 | SUGGEST | It is not clear what you mean by saying “I’m working with version 5.7.3” - it seems you are referring to the version of the interpreter and not the platform release itself, which is | 2010-07-20 | ||
| 194 | SUGGEST | “Erlang is the first language you’ve seen so far that has no notion of an object.” - not entirely true since Prolog did not have any objects either. | 2010-07-20 | ||
| 196 | TYPO | 6> if Output is missing at the end of the page | 2010-07-20 | ||
| 91 | TYPO | Problem 3 has multiple problems, not just the quotes: a) consistent double quotes, b) spelling of “Tate”, c) the XML element name should be “book” | 2010-07-20 | ||
| 202 | SUGGEST | 15> [[2, 3] | 1]. pipe symbol in the output could use some explanation. | 2010-07-20 | ||
| 217 | SUGGEST | “* An OTP service that will restart a thread if it dies” You mention that Erlang processes are not quite threads several times, so perhaps the above should be rephrased? | 2010-07-20 | ||
| 160 | TYPO | “Figure Figure 5.1, on the following page lays it all out.” (Reads “Figure Figure Any and Nothing” in the epub version.) | 2010-07-20 | ||
| 161 | ERROR | Figure “Any and Nothing” extends off the page in the PDF. (The epub version almost fits on my Sony Reader.) | 2010-08-21 | Will fix this in typesetting stage | |
| 169 | ERROR | The code example with movie_nodes(0) is leaking some underlying book markup: “We just found element number zero,…TRUNC”. I assume the close-code, p, text, close-p, and open-code tags should all be hidden behind the scenes, controlling the book’s layout. (Working with XML within XML must be annoying. :) | 2010-07-20 | ||
| 171 | TYPO | “you place an object on it’s queue.” s/it’s/its/ | 2010-07-20 | ||
| 176 | TYPO | “Form example, sizer for ”google.com“” s/Form/For/ | 2010-07-20 | ||
| 177 | TYPO | “Finally, the message passing syntax you see in Io is much like you will see in the next chapter on Erlang.” s/Io/Scala/ | 2010-07-20 | ||
| 160 | SUGGEST | I suggest including the nine-nines anecdote; deployed AXD301 systems showing 99.9999999 % uptime while handing 30-40 million calls per week. People in the software industry understand the achievement of five-nines, and nine-nines should wake people out of a drudgery-induced stupor. :) | 2010-07-21 | ||
| 184 | TYPO | “really nice to go back the roots of Erlang” s/go back the/go back to the/ | 2010-07-20 | ||
| 187 | SUGGEST | “[Atoms] are single-byte values that you can use to represent something.” Does this mean that erlang systems can have a maximum of 255? 256? atoms? What happens when the 256 or 257th atom is added to a program? .. Or is this a case for self-study? | 2010-07-20 | ||
| 190 | TYPO | “with predefined formats like JPegs or MPegs” “JPEGs”, “MPEGs” is usual; “jpegs”, “mpegs” is kinder to the eye. But “JPeg” and “MPeg”, I’ve never seen this one before. :) | 2010-07-20 | ||
| 195 | TYPO | “What about turning a list of URLS into tuples…” s/URLS/URLs/ | 2010-07-20 | ||
| 198 | TYPO | “The lists::foreach method takes a function and a list.” s/::/:/ | 2010-07-20 | ||
| 198 | SUGGEST | “The first argument is an anonymous function that looks like fun(Number) -> erlang:display(Number) end.” Suggest removing “that looks like” — it is that. (Cue Haddock’s Eyes…) | 2010-07-20 | ||
| 199 | TYPO | “Finally, the third argument is Numbers…” “Numbers” is the second argument of lists:foreach/2. (“Number” is a formal parameter, not yet an argument..) | 2010-07-20 | ||
| 202 | SUGGEST | This Erlang had me confused: 14> [1| [2, 3]]. I’d like to suggest a mention that [a,b] is syntactic sugar for [a | [b]], and [a,b,c] likewise for [a | [b | [c]]]. Only after finding this, and fifteen minutes play time in the shell, did I figure out why [[2,3]|1] displays like it does. (The line from the language spec, “However, this type of list is of little practical use.”, made all the difference in the world for me. :) | 2010-07-20 | ||
| 210 | TYPO | “Let’s turn the translation service that prints return values into a service that actually returns the translated service to the user.” s/service to the user/string to the user/ | 2010-07-20 | ||
| 229 | TYPO | “Now, let’s move into a close cousin of list” Suggest s/move into/move to/ | 2010-07-20 | ||
| 237 | TYPO | “It takes a function that is a test, and returns the element of a list that pass the test.” Suggest: “It takes a function that is a test, and returns a list of elements that pass the test.” | 2010-07-21 | ||
| 244 | TYPO | “The list comprehension combines maps and filers, as you saw in Erlang and Scala.” s/filers/filters/ | 2010-07-21 | ||
| 246 | TYPO | “we again build a cycle, drop the first two, and take the first two after that.” s/take the first two/take the first five/ | 2010-07-21 | ||
| 249 | TYPO | Clojure source: (deftype SimpleCompass [bearing] Missing a close-parenthesis. | 2010-07-21 | ||
| 250 | TYPO | “You can verify that entering (String. ”new string“) into the repl returns the new string ”a“.” s/“a”/“new string”/ | 2010-07-21 | ||
| 250 | TYPO | “you can assess all fields as Java fields.” s/assess/access/ | 2010-07-21 | ||
| 251 | TYPO | “The form is (unless test form1). The function will execute form1 is the test is false, otherwise it will execute form2.” There is no form2 in the desired form — looks like a desired feature (or complicating feature) was dropped, and a stray bit remains. | 2010-07-21 | ||
| 252 | TYPO | In Clojure code: user=> (macroexpand ’’something_we-do-not-want-interpreted) something_ vs something-. | 2010-07-21 | ||
| 237 | ERROR | Clojure code: user=> (map #(* 2 (count %)) people) The PDF syntax-highlighting is treating the # reader macro as a comment start character, and turning half the input line green. | 2010-09-01 | prags? This looks like we're treating the # as a ruby or shell comment. | |
| 252 | OK | “The secret sauce is the expression of data as code, and not just a string.” Is it data as code? Or code as data? Or does LISP make the difference completely irrelevant? How many one-handed LISP programmers does it take for a tree to fall in the woods? What does Clojure really look like when the data isn’t hard-coded into the program source? Does the data/code division come back? | 2010-07-21 | ||
| 253 | TYPO | The “Find:” section does not use periods, the “Do:” section does use periods. | 2010-07-21 | ||
| 258 | TYPO | “This example is provided courtesy of Stuart Halloway of” In the PDF, it ends, “Halloway of ^4, a consultancy…”. Better to just say “ThinkRelevance” in the text, and leave out the web address. | 2010-07-21 | ||
| 262 | TYPO | “we placed all mutations to to refs within transactions” s/to to/to/ | 2010-07-21 | ||
| 263 | TYPO | “a customer sites in the chair” s/sites/sits/ | 2010-07-21 | ||
| 279 | TYPO | “It’s an effective way to combine two” That’s the whole paragraph. :) Maybe just adding “lists.” is all that is needed, but perhaps there is more planned for this paragraph. | 2010-07-21 | ||
| 281 | ERROR | The Haskell code: Prelude> [ (y, x) | (x, y) <- [(1, 2), (2, 3), (3, 1)]] is included twice; the second time, the code should read: [ (4 - x, y) | (x, y) <- [(1, 2), (2, 3), (3, 1)]] | 2010-07-21 | ||
| 238 | TYPO | “This is the last interview from a language creator in this book, but it’s a good one.” For the Haskell chapter, there are two more language creator interviews. | 2010-07-21 | ||
| 290 | TYPO | “Here are the functions in action” missing : | 2010-07-21 | ||
| 291 | TYPO | “You’d do so with the >.> operator.” We shouldn’t see the >. | 2010-07-21 | ||
| 297 | TYPO | “Triplet is a type constructor, and Trio is a data constructor.” This sentence is in the wrong paragraph; move it down several paragraphs. I suggest placing it immediately before the sentence beginning, “We’ve built a whole template…” (I like the directness of this sentence; even though it might be redundant with the surrounding text, this sentence is very clear and concise.) | 2010-07-21 | ||
| 300 | ERROR | “C” is broken across two lines in the epub version. | 2010-08-21 | will fix in typesetting | |
| 302 | ERROR | The drunken pirate stagger is described “Each move reverses the direction”, and the Ruby code is implemented to support the reversed-direction behaviour. (The stagger and crawl functions could reverse the direction, but without their implementation, it’s not clear that they The Haskell implementation of the drunken pirate walk does not include any mention of direction. Since the monad discussion is already complicated enough, I suggest removing the direction from the introduction and Ruby example. | 2010-07-21 | ||
| 305 | TYPO | “And now, you can finally see why we called this the monad’s wrapping construct return.” Suggest: “And now, you can finally see why we called our monad’s wrapping construct return.” | 2010-07-21 | ||
| 308 | TYPO | Inconsistent ‘.’ at the end of “Find:” section versus “Do:” section. | 2010-07-21 | ||
| 306 | OK | First, this is the best description of monads I’ve seen yet. I think I almost understand them. Thanks! (I’ve been working on it since 2000 or 2001, off and on.. I’m so glad I had a course on Haskell back in school, otherwise this might be too much now.) But I’m completely lost with the phrase “computational strategy”. I had almost completely accepted the idea that monads were just a societal convention about wrapping data storage with controlling functions and a new syntax to replace f(g(h()) (there’s no \\circ key on the keyboard, so the standard mathematical \\circ notation wouldn’t work well) — but then the computational strategy phrase came into the picture, and I lost it all again. Perhaps orthogonal: once you used ‘return’, once you used ‘rtn’. Is the choice of name for the ‘return’ function strictly conventional? Is there one convention that rules? How about >>=? (The sentence “A bind function called >>= that unwraps a function.” makes me think it is only a convention.) I’m further confused when I see both >>== and >>=. Are some typos? Or is the name completely arbitrary? Could it be called “seth”? What name is most idiomatic in the Haskell community? Thanks | 2010-07-27 | ||
| 138 | TYPO | Change “it’s” to “its” in “…Twitter has changed it’s core…” | 2010-07-20 | ||
| 235 | TYPO | user=> (defn center [[_ [_ c]] c) you are missing a right bracket in 2 examples on this page | 2010-07-20 | ||
| 236 | TYPO | “Let’s use a higher order function to build a list of word counts, given a It seems the example (and the error message) is out of place and you intended to have a list definition here instead | 2010-07-20 | ||
| 271 | SUGGEST | “This error message gives us the first glimpse into Haskell’s type system. It says “There is no function called + that takes a Num argument followed by [Char], a list of characters.”" I think the error message means that while evaluating “+” (which is known to take only Num types) function the interpreter found out that [Char] type does not belong to Num family and thus it could not infer the type to use. So, basically, “[Char] is not a Num(ber)”. Subtle difference, perhaps. | 2010-07-26 | I know this is a subtle oversimplification, but I don't want to introduce classes yet. I clear this up in more detail later in the chapter. | |
| 143 | TYPO | “So my thinking of static typing was shaped by by the Java wars.” Remove a “by” :) | 2010-07-20 | ||
| 150 | TYPO | You’ve see how the basic constructor works. see -> seen | 2010-07-20 | ||
| 33 | SUGGEST | “meaning the compiler will only execute code”. Wouldn’t ‘interpreter’ instead of ‘compiler’ be better? | 2010-07-20 | ||
| 68 | TYPO | “Io> toDos size s/’// | 2010-07-20 | ||
| 48 | OK | “Do” example number 1: printing contents of an array (slice) is a bit vague. Should I print each slice as a whole? Use the p() function for pretty output?print the numbers in each slice on a line, separated by space? I realise it’s just a small example but you can print array contents in many ways. | 2010-07-20 | ||
| 152 | TYPO | On the last line of the page, “Nicetrait” should be “Nice trait”. | 2010-07-20 | ||
| 19 | TYPO | “But unlike Lisp dialects, the should probably read “But unlike other Lisp dialects,the ….” Since clojure is itself a Lisp dialect. | 2010-07-20 | ||
| 155? | TYPO | “put Scala through it’s paces as a functional” s/it’s/its/ (Sorry for no exact page number, epub numbers don’t match pdf, and I’m without the pdf right now.) | 2010-07-20 | ||
| 319 | TYPO | “Haskell and Erlang are standalone languages. Haskell and Erlang are standalone languages.” - sentence repeats | 2010-07-21 | ||
| 321 | TYPO | “The next generation of programmer will demand more out of his language.” - “programmers”, perhaps? | 2010-07-21 | ||
| 51 | ERROR | {’grandpa’ => [{’dad’ => [{’child 1’ => [ ]}, {’child2’ => [ ]}]}, {’uncle’ => [{’child 3’ => [ ]}, {’child 4’ => [ ]}]} ]} this is ok, but in text there is a bracket missing(after dad/child2 resulting in syntax error in ruby1.9 | 2010-07-20 | ||
| 65 | TYPO | Vehicle slotNames I think, the first line should start with “Io >” and the content should be formatted in red bold. | 2010-07-20 | ||
| 40 | ERROR | >> [1].methods.include?(‘[]’) => true It returns false on 1.9 because the “methods” method returns an array of symbols in 1.9 (not Strings), so you need to use [1].methods.include?([]:). This also applies to the example on page 32 (though it doesn’t result in an error). Not a big deal, but I’m interested in why the book is using 1.8 when 1.9 has been around for so long. | 2010-07-20 | ||
| 323 | SUGGEST | It doesn’t make sense to have “Prolog” twice in the sentence beginning: | 2010-07-21 | ||
| 284 | TYPO | In the subsection “List Comprehensions” the first sentence has “We first looked at list list comprehensions”. | 2010-07-21 | ||
| 208 | TYPO | Example 8. should be | 2010-07-20 | ||
| 142 | TYPO | “Twitter has switched it’s core…” should use “its” instead. “Functional programs avoid changing state, or muting data…” probably needs “mutating” instead of “muting”. | 2010-07-20 | ||
| 158 | TYPO | “Now it’s time to put Scala through it’s paces…” should be “Now it’s time to put Scala through its paces…” | 2010-07-20 | ||
| 147 | SUGGEST | The line “The industry invested hundreds of millions of dollars Maybe move the three versions until after Spring so it reads “The industry invested hundreds of millions of dollars I wish you had time to do more rewriting here. I’m not really sure what you’re trying to say. Are you admitting a bias for or against static typing? | 2010-07-20 | ||
| 175 | TYPO | “you place an object on it’s queue” should use “its” instead of “it’s” | 2010-07-20 | ||
| 188 | TYPO | “We can do this | 2010-07-20 | ||
| 203 | TYPO | The anonymous function assigned to print uses Number incorrectly when X has been used as a parameter. Print = fun(X) -> io:format(“~p~n”, [Number]) end. Should probably be: Print = fun(X) -> io:format(“~p~n”, [X]) end. | 2010-07-20 | ||
| 143 | DEFER | “I’m using version 2.7.7.final for this book.” | 2010-09-01 | I did add a footnote to the deprecated methods you mentioned, but can't upgrade to version 2.8 so close to production without lots of quality control on everything. | |
| 161 | ERROR | “You can try to index with a negative number […] but Scala will always return the first element. That behavior is a little inconsistent with the NoSuchElement exception for an index that’s too large.” This was fixed: scala> List(1,2,3)(–1) Later on that page: This is what 2.8 returns: | 2010-08-21 | ||
| 162 | ERROR | This: should be: scala> animals & Set(“armadillos”, “raccoons”, “lions”, “tigers”) Because in 2.8.0 is deprecated: “scala> animals Set(”armadillos“, ”raccoons“, ”lions“, ”tigers“) | 2010-08-21 | I can't upgrade to Scala 2.8.0 so close to production, but I can footnote deprecated methods. Thanks for pointing this out. (When there's an alternative that works on the previous version, I'll use it. ) | |
| 163 | DEFER | This: “val ordinals = Map(0 -> ”zero“, 1 -> ”one“, 2 -> ”two“) | 2010-08-21 | can't upgrade to 2.8 so close to production | |
| 163 | DEFER | This: Has a slightly different output on 2.8: | 2010-09-01 | ||
| 163 | DEFER | Instead of: the improved error message in 2.8 is: | 2010-09-01 | ||
| 164 | ERROR | “An empty collection is Nil, […]” More important is that Nothing has no instance. You can’t dereference it like null, it stands for some sort of abnormal termination or non-termination of e. g. a method. | 2010-08-21 | ||
| 165 | ERROR | The picture is wrong. Every Scala class inherits from ScalaObject, so List just be under ScalaObject and not next to it. | 2010-08-21 | ||
| 167 | ERROR | “scala> list.last is mentioned twice at that page. Remove the first appearance of it, and leave the second one after head and tail, because head and tail are more important than last. | 2010-08-21 | ||
| 169 | ERROR | “words.sort((s, t) => s.charAt(0).toLowerCase < t.charAt(0).toLowerCase)” sort is deprecated, use sortWith. toLowerCase is deprecated, use toLower. “scala> words.sortWith((s, t) => s.charAt(0).toLower < t.charAt(0).toLower) | 2010-08-21 | ||
| 169 | ERROR | “scala> words.sort((s, t) => s.size < t.size)” sort is deprecated, use sortWith. | 2010-08-21 | ||
| ^176 | ERROR | The code has: " but in the text: " I would either call them objects or singletons, not classes. | 2010-08-21 | ||
| 65 | OK | In the pdf, it reads: “Vehicle slotNames ==> list(”type“, ”description“)” my list of members doesn’t have quotes around type and description (i.e., my output is: “Vehicle slotNames ==> list(description, type)”) | 2010-08-21 | This output is version specific. I don't want to change the version I'm working on just before publication date. | |
| 304 | ERROR | Figure 8.1 is wider than the page and chopped off at the right hand side. Viewing in Preview on OS X. | 2010-08-21 | ||
| 33 | ERROR | The unless x == 4 else clauses seem to be backwards. unless x 4 puts 'This appears to be true.' else puts 'This appears to be false.' end => This appears to be false. but x 4 is true. | 2010-08-21 | ||
| 84 | OK | animals.io works fine if run as a file but does not seem to work if you enter it in the interpreter. I get Exception: Duck does not respond to ‘prototype’ | 2010-08-21 | ||
| 86 | TYPO | For the phone book structure to work properly as a “curlyBrackets” method I believe it is necessary to separate the individual name:value pairs with a comma, as you would with regular method arguments; so: | 2010-08-21 | ||
| 87 | ERROR | Just a “heads-up”; I think there is a bug when iterating over a Range object represented by 0 to(1). Doing something like the following results in an infinite loop: a := 0 to(1) Same goes for: a := 0 to(1) Given that the phone book example on page 86 contains two items, attempting to run the code on page 87 ultimately results in an Exception because the foreach loop in the curlyBrackets method doesn’t exit like it should after two iterations; this causes the “call message arguments at(i)” to return nil. You can test this by simply adding a third item to the phone book, which works without issue. | 2010-08-21 | ||
| 87 | ERROR | Io Language: In the “phone number” example Jason already mentioned that you need to add commas after every entry in the phones file. There is another workaround, you can leave the phones file the way it is and change to code to evaluate the whole file as one message. Replacing curlyBrackets like so: curlyBrackets := method( | 2010-08-31 | ||
| 122 | TYPO | Just before the bullets and starting with “I’ll mark the important one with a letter…”: should be “ones”. [Tail2-A] should just be Tail2-A in the right-hand sides. The last bullet brings in Tail2-2, which should be Tail-2-B and [1|Tail2] should be [1|Tail2-A]. | 2010-08-31 | ||
| 119 | ERROR | 2nd paragraph, 5th sentence starts with “The imperative interpretation is…” but should say “The declarative interpretation is…” | 2010-08-31 | ||
| 87 | OK | The download box/link appears at the start of every program segment of phonebook.io instead of just before the entire program. Very distracting. | 2010-08-31 | It's a callout to an existing file, so I'm going to leave it as it is. | |
| 102 | TYPO | …thru 104. “velveeta” has two e’s in it (not “velveta”). | 2010-08-31 | ||
| 117 | ERROR | In the middle of the page, the output after “[a, b, c] = [a|[Head|Tail]].” goes on for too long. There is only one solution (the first). The second, Head = c and Tail = [], does not unify with this query (and if it did, it shouldn’t have - it certainly doesn’t in other Prologs). | 2010-08-31 | ||
| 131 | TYPO | Middle of page, after rows defn, 1st sentence: “…from the first queen in matches the first element…” “in” is extraneous (or missing words “in the list”). | 2010-08-31 | ||
| 131 | TYPO | The sentence across the page break to page 132: “It’s an is predicate…” should just be “It’s a predicate…” | 2010-08-31 | ||
| 137 | TYPO | 2nd sentence under “Utility”: “…had some limitations…”; “had” should be “has”. | 2010-08-31 | ||
| 144 | ERROR | 2nd paragraph, 2nd from last sentence: “That’s a significant | 2010-08-31 | ||
| 147 | TYPO | Last paragraph of shaded box, 1st sentence: “…was shaped by by the Java wars.” One too many “by”s. Regarding Laurie White’s comment about clarifying whether you are biased (which I got, but I’ve been there), maybe you could just change the beginning of this sentence from “So my thinking of static typing was shaped…” to “So my bias against static typing arose from…”? | 2010-08-31 | ||
| 152 | TYPO | The = sign after the inform method definition is superfluous and will confuse my students (e.g., why is it here but not on turnRight or turnLeft? or why is it on direction without braces, but here with braces?). It is repeated on page 153. | 2010-08-31 | ||
| 153 | DEFER | Every segment of the Compass class used in the explanation is preceded by the Download shaded box, cluttering the discussion. In other places, it only appears when the entire program is shown (which is easier to read). | 2010-09-01 | Here, it's a longer program and I'm using callouts in a file. The reader will be able to find the callouts within the file. At this stage, I'm going to leave this like it is, but I agree, it might have been good to be more consistent, so I'll mark this as a fix for another release of the book, if there's enough readership to merit a second release. | |
| 156 | TYPO | Very last sentence. “…our trait called Nice with a method called Greet…” Should be “greet” (lowercase). | 2010-08-31 | ||
| 168 | TYPO | The alternate syntax, “list reverse” (vs. list.reverse), is accidentally introduced in the middle of reviewing the List methods (first example in blue on page). I say “accidentally” because it is not explained and is not consistent with any of the other examples. | 2010-08-31 | ||
| 169 | DEFER | While not incorrect, it would be clearer at the bottom of page 169 (and in the description at the top of page 170) if you used something other than “i” for the element value in your fold left sum example. The variable “i” is often sed as a loop counter and since your list values are 1, 2, 3, one could easily think you are getting passed an index rather than the list values (despite indices normally starting at 0). You will note that you use the name “value” for this same variable when you invoke foldLeft near the bottom of page 170. It would be more consistent, as well as clearer, to also use “value” for the similar example at the bottom of page 169. | 2010-09-01 | ||
| 172 | OK | “Caribean” throughout is spelled “Caribbean” (and on to page 173). | 2010-08-31 | ||
| 173 | TYPO | Last paragraph: “Next to each, we have some code blocks beside those chores.” is redundant. Should be “Next to each, we have some code blocks.” or “We have some code blocks beside those chores.” | 2010-08-31 | ||
| 173 | TYPO | Last paragraph: “Scala executes the first code to match…” What does “the first code” mean? Do you mean “the first code block” or “the first case” or “the code block associated with the first case”? | 2010-08-31 | ||
| 179 | TYPO | Top code segment is supposed to be getPageSizeConcurrently, not getPageSizeSequentially. [Or the text above and below it is incorrect…] | 2010-08-31 | ||
| 179 | TYPO | 2nd paragraph: “Next, we simply receive five messages…” should be “four messages”. | 2010-08-31 | ||
| 181 | TYPO | First bonus problem at top: “Form example, sizer for ‘google.com’…” should be “For example…”. | 2010-08-31 | ||
| 181 | TYPO | 2nd bonus problem: “At the end of the sizer problem, there is a sleep command.” What are you referring to here? There is no sleep in the text nor in the source file itself. | 2010-08-31 | ||
| 188 | TYPO | 3rd paragraph, 2nd sentence: “Error handling is the least | 2010-09-02 | ||
| 188 | TYPO | 5th para, last sentence: “I think it would be really nice to go back the roots of Erlang” should be “…back to the roots…”. | 2010-09-01 | ||
| 190 | TYPO | Under “Getting Started”, you say you are using version 5.7.3, but the output when you start Erlang (shown below it) says 5.4.13. This seems to be the emulator version, not necessarily the language version. On the Erlang website, the versions are named R#, as in R14 (the latest). | 2010-09-02 | ||
| 203 | TYPO | 2nd line of map definition near bottom of page: | 2010-09-13 | ||
| 224 | OK | The “Core Weaknesses” heading is one paragraph too late as the paragraph preceding it introduces the weaknesses. | 2010-09-13 | ||
| 230 | SUGGEST | Paragraph after (- 8 1 2) example (I would call it 4th): “Or, if you’d like to see the Clojure equivalent, it is (- (- 8 1) 2) and (/ (/ 8 2) 2).” I find this very confusing because frankly we just saw the Clojure equivalents and they were (- 8 1 2) and (/ 8 2 2). I think you are trying to say the Clojure equivalent of forcing order of evaluation with parentheses. I am not sure how to say this simply, but just calling it “the Clojure equivalent” is confusing. | 2010-09-13 | ||
| 237 | SUGGEST | 2nd paragraph: “You might think we’ve encountered a syntactic inconsistency.” Perhaps if I wasn’t paying attention. We just did this with vectors and sets. The place to say this is the first time this construct occurs, i.e., with vectors on page 234. Here it is just confusing. | 2010-09-13 | ||
| 240 | TYPO | First defn center is missing a ‘]’: “(defn center [[_ [_ c]] c)” should be “(defn center [[_ [_ c]]] c)” | 2010-09-13 | ||
| 241 | TYPO | 3rd para: “We can compute the count of one word like this:” should be “…length of one word…” | 2010-09-13 | ||
| 241 | TYPO | 5th paragraph, last sentence: “…to compute a list having twice the counts of person names…” again should be “…lengths of person names…” [English meaning of count of names is how many names you have, not their lengths] | 2010-09-13 | ||
| 241 | TYPO | Formatting error with shorter form of anonymous function: “#(* 2 (count %)) people)” is in green (instead of blue) | 2010-10-29 | Prags? This is the commenting error I mentioned earlier. | |
| 241 | TYPO | Last paragraph, 1st sentence: “…give you convenience and leverage, to create…” should not have a comma. | 2010-09-13 | ||
| 242 | TYPO | Same formatting problem with second filter example using anonymous function: “#(< % 3) v)” is in green instead of blue. | 2010-10-29 | prags? | |
| 244 | TYPO | 4th paragraph (including incomplete), 6th sentence: “Older | 2010-09-13 | ||
| 245 | TYPO | Extra bullet with no text at end of “Do:” subsection of “Day 1 Self-Study”. | 2010-10-03 | ||
| 246 | TYPO | First example, the definition of size is incorrect. The else part of the if is “(size (inc (rest v)))” when it should be “(inc (size (rest v)))”. | 2010-09-13 | ||
| 246 | ERROR | May just be a typo, but just before the first example (defining size) - in fact the 2nd sentence of the 1st paragraph of the “Recursion…” section, it says “…to evaluate the size of a list:” But, in fact, the code only works for a vector, not a list, and that is the example given. On a list, it gives a java.lang.ClassCastException. | 2010-09-13 | ||
| 249 | SUGGEST | 2nd example from the bottom of the page (first sort): It would be more impressive if the list you passed to sort, [1 2 3 4] wasn’t already sorted. You would use, for example, [3 2 4 1]. | 2010-09-13 | ||
| 250 | ERROR | 3rd paragraph under “Finite Sequences with range”: “You don’t have to specify the lower bound:”. While this is true for your example, you must specify a lower bound if you wish to use an increment other than 1. I suggest a simple rephrasing: “You don’t have to specify the lower bound if there is no increment:” | 2010-09-13 | ||
| 251 | OK | Interpose example (3rd example): Why did we only get 3 elements of the sequence rather than the 5 we requested? I think it is important to point this out and explain the returned “and:”s are included in the count of 5. So if we wanted 5 elements from the innermost cycle, we would have to take 9. This is not at all obvious. | 2010-09-13 | ||
| 251 | OK | Paragraph after interleave example, 3rd sentence: “…even numbers are (0 1 0 1 0 1 0 1 0 1), and odd numbers are (0 1 2 0 1 2 0 1 2 0).” This is quite confusing as 1 in the first sequence is not even and neither 0 nor 2 are odd in the second. If you mean pulling the even-numbered indices, well that assumes you are starting at 0 (but mightn’t we be starting at 1, as in the 1st?). It would be much clearer to explicitly state “If you pull alternate elements out starting with the first, you get …, and if you start with the second, you get…” or something like that. | 2010-09-13 | ||
| 252 | ERROR | 5th paragraph (inc. partial at top): “Or we can grab number 500, like this:” It is certainly index 500, but it is the 501st number in the sequence as nth counts from 0. I do not believe there is clear agreement whether the first Fibonacci number is fib(0) or fib(1) [I have seen it both ways in many different places], so it would be safer, and more accurate, to say the 501st Fibonacci number. | 2010-09-13 | ||
| 254 | TYPO | 5th paragraph (including partial), last sentence: “For example, (directions 3) returns :west.” This sentence is misplaced; it belongs after the 1st sentence in the paragraph. | 2010-09-13 | ||
| 255 | TYPO | 2nd example missing “.” after SimpleCompass: “(def c (SimpleCompass 0))” should be “(def c (SimpleCompass. 0))” | 2010-09-13 | ||
| 255 | TYPO | 3rd example: seems we are back to Ruby formatting: instead of: [by the way, when I do this I am not in the user namespace, but the tate.compass namespace, so it does not say “user=>” as you show throughout, but “tate.compass=>”. | 2010-10-29 | prags: formatting # is a comment again | |
| 258 | SUGGEST | Replace the 3rd problem under “Do:” (in “Day 2 Self Study”) as you already walked through the solution on page 252. | 2010-09-13 | ||
| 144 | SUGGEST | You write: —- 8< —- There’s a double “Strictly speaking” in use. You might want to get rid of one of them (I’d vote for the first one). Cheers, | 2010-09-13 | ||
| 260 | TYPO | 4th example (“@movie”): Shows the original string “Star Wars” rather than the modified string “Star Wars: The Revenge of the Sith”. | 2010-09-13 | ||
| 262 | TYPO | Very last sentence: “Next, we’ll define an agent that has an initial value of tribbles:” should say something like “an agent named tribbles with an initial value of one.” | 2010-09-13 | ||
| 263 | TYPO | 4th example: @tribbles is suddenly 16. When we last saw it (previous example just above), it was only 2. How did it become 16? | 2010-09-13 | ||
| 263 | ERROR | Last sentence of 3rd paragraph: “(Remember, in Io, the future mutated to the value after the computation | 2010-09-13 | ||
| 270 | TYPO | 3rd sentence under “Accessibility”: “Clojure places tremendous demands on developer” should be “the developer” or “developers”. | 2010-09-13 | ||
| 291 | TYPO | 3rd problem of “Do:” under “Day 1 Self-Study”: “Note | 2010-09-13 | ||
| 308 | TYPO | top of page, first line: ‘Understanding Mondads’ should be ‘Understanding Monads’ | 2010-09-13 | ||
| 264 | TYPO | Last paragraph, 1st sentence: “These both change the entire atom…” You have only discussed one way to change the atom, “reset!” Later in the same sentence, “…the preferred usage is to use a function…” I am pretty sure “reset!” is a function. Do you mean user-supplied function? | 2010-09-13 | ||
| 293 | ERROR | Last example at the bottom of the page: “foldl1 (\\x carryOver -> carryOver + x) 0 [1 .. 10]” This is not correct and will not compile. The correct form is one of the following (but only the first matches the text that follows): | 2010-09-13 | ||
| 296 | OK | 3rd example, 1st line: “take 5 (lazyFib 0 1)” should be “take 5 (lazyFib 1 1)” | 2010-09-13 | I'm going to leave this as it is. Fib starts at 1, 1, etc. | |
| 296 | TYPO | 3rd example, 5th line has the same problem: “take 5 (drop 20 (lazyFib 0 1))” should be “take 5 (drop 20 (lazyFib 1 1))” | 2010-09-13 | ||
| 300 | TYPO | Last problem at the bottom: “Use partially applied functions to define a function that will return half of a number and append \ | 2010-09-13 | ||
| 301 | TYPO | The last 3 bulleted problems form a sequence that is not at all clear unless you read it a few times. These should be grouped together or otherwise connected with phrases (e.g., the second could say, “Add line numbers to the lines of text generated above.” But it would be better to group them together under one heading. | 2010-09-13 | ||
| 297 | ERROR | 2nd to last paragraph (just above “An Interview with Simon Peyton-Jones”): This paragraph is very confusing and contradicts earlier statements. In Haskell, “f . g x” is shorthand for f(g x). Thus, g is evaluated first and its result is passed on to f to be evaluated - just as you describe it in the paragraph above this. In this paragraph, however, your example says that “f . g x” is shorthand for g(f x), i.e. that f [or “invert” in your example] is evaluated first, which is not the case. While it is true that f . g sometimes is the same as g . f, more often they are not the same. If you care to invert, flip vertically, flip horizontally, and then move to the right, the correct code is “(shiftRight 20) . flipHorizontally . flipVertically . invert image”. Suggesting otherwise is confusing. Yes, in this case, it does seem the order does not affect the results (though I am doubtful that is true of shiftRight), but then you must come right out and say that when you do not particularly care about the order because the functions are symmetric, then you can rearrange it this way - but then do not also suggest that Haskell will somehow change its execution order from left to right in the rearranged order. | 2010-09-13 | ||
| 302 | TYPO | At end of top example, after last “abc”, it is missing the line: “it :: [Char]”. | 2010-09-13 | ||
| 304 | TYPO | Last paragraph: “Let’s bring back the definition of | 2010-09-13 | ||
| 305 | TYPO | 2nd example (“:load tree.hs”): Missing final line “Leaf 1”. | 2010-09-13 | ||
| 305 | TYPO | 4th example (building more complex trees): Missing final line of output: “Children[Leaf 1,Children [Leaf 2,Leaf 3]]” | 2010-09-13 | ||
| 308 | TYPO | Very top of page: “standing Mondads has some good practical examples.” should be “Monads” | 2010-09-13 | ||
| 284 | ERROR | Starting at the top of page 284 and continuing through the chapter (the last usage is at the top of page 309), the term “functional composition” is repeatedly used. However, the correct term both in Haskell and mathematics is “function composition”. | 2010-09-13 | ||
| 309 | TYPO | Second bullet under “Components of a Monad”, last sentence: “…return wraps up a function into a monand.” should be “monad” | 2010-09-13 | ||
| 310 | SUGGEST | After carefully explaining we’ll use the bind function named >>=, you use one named >> in the example. I suggest either changing this to use >>= or explaining why >> was used. | 2010-09-13 | ||
| 310 | SUGGEST | “rtn” has the same issue as “>>==” - after telling us we would call it “return”, you call it “rtn” Please explain or use “return”. If the intent is to show us you can call them anything you want, then say so and also explain the convention is to use the names you gave earlier. | 2010-09-13 | ||
| 311 | ERROR | 5th paragraph, 2nd sentence: “In GHCI, you must separate lines with semicolons and include the body of do expressions, and let expressions therein, within braces.” It’s not braces alone, but “:{” and “}:” on separate lines. | 2010-09-13 | ||
| 311 | TYPO | Very last sentence: “The identity monad just parrots back the thing you put into it. We used it to convert…” We did not use the Identity (capital-I) monad. Perhaps you are referring to the drunken-monad, which is an identity of sorts, but it was not called that. Again, at the top of page 313, “So far, we’ve seen the Identity monad…” But we haven’t. | 2010-09-13 | ||
| 144 | TYPO | Last paragraph: From my perspective its a setter that breaks the rule. If you call a getter on an object in the absence of any mutators it always returns the same value. The setter is the mutator in the OO paradigm, yes ? | 2010-09-13 | ||
| 151 | ERROR | shouldn’t args.each {|arg| println(“arg”) } | 2010-09-13 | ||
| 297 | TYPO | 2nd to last paragraph (just above “An Interview with Simon Peyton-Jones”): “invert . flipVertically . flipHorizontally . (shiftRight 20) image” should be “(invert . flipVertically . flipHorizontally . (shiftRight 20)) image”. [Parentheses around composition are required (tested on GHC).] | 2010-09-13 | ||
| 322 | TYPO | 3rd paragraph of “Changing Paradigms”, 3rd sentence: “…that should have been solved in the space.” At least one word is before “space”: “…in the language space”? “…in the Java language”? | 2010-09-13 | ||
| 324 | ERROR | 4th sentence of “Futures”: “We also supported futures in Clojure, but the Io approach to futures was different.” How was it different? Not in the ways described here. Both return immediately, both block if we try to access it before the result is available, and both morph into a result when the result becomes available. | 2010-09-13 | ||
| 326 | TYPO | Last paragraph under “Matching”: “The tail-optimized loop call matched a process ID (From) followed by a word…” While there was a version of this in the Erlang chapter that matched a process ID and word (pg. 217), this one is not it. I also find “tail-optimized loop call” a bit misleading as this is not a “call”, it is a function and it is not “tail-optimized”, it is “tail-recursion-optimized”, but that is not really important in this section. | 2010-09-13 | ||
| 56 | TYPO | There’s something wrong with the beginning of footnote 4: “DSLsc om let you tailor a language …” | 2010-09-13 | ||
| 59 | TYPO | Bottom of page 59, the word ‘just’: “A method is an object, jut like any other type of object.” should read “A method is an object, just like any other type of object.” | 2010-10-03 | ||
| 58 | TYPO | First line : So, the acts_as_macro code … | 2010-10-07 | ||
| 105 | ERROR | Ruby-style comments (starting with #) in the code examples are not accepted. with : | ?- [‘food.pl’]. but with : | ?- [‘food.pl’]. (10 ms) yes | 2010-12-13 | ||
| 165 | DEFER | The numbers “zero”, “one”, “two”, etc. are cardinal numbers not ordinal numbers. | 2011-07-31 | ||
| 193 | ERROR | There appears to be an example missing after “Here’s a little surprise:” | 2010-10-06 | ||
| 209 | DEFER | Near the top of the page, “The second argument must be a list.” However, example 15 just above shows a second argument not a list, and the result is an improper list. | 2011-07-31 | ||
| 213 | TYPO | “spawning a message” should be “spawning a process” | 2010-10-07 | ||
| 215 | TYPO | Should “node@Pid” actually be “Pid@node”? | 2010-10-07 | ||
| 216 | DEFER | In the snippet in “Receiving Synchronously”, probably should use From instead of Pid to match the completed example on the next page. | 2011-07-31 | ||
| 249 | ERROR | In the example defn size, the last line should be “(inc (size (rest v)))))” instead of “(size (inc (rest …” | 2010-10-06 | ||
| 251 | DEFER | Instead of saying “The result is not a list.” perhaps “The result of (rest [1 2 3]) is not a list.” Also, the example doesn’t actually show that the result is not a list, despite appearances. | 2011-07-31 | ||
| 255 | TYPO | First example with “((iterate fib-pair” has an extra opening parenthesis | 2010-10-07 | ||
| 308 | ERROR | The stagger=1 and crawl=2 description in the first drunken pirate description doesn’t match the later implementation of “stagger d = d + 2” and “crawl d = d + 1”. | 2010-10-07 | ||
| 309 | DEFER | When you want to translate “stagger(crawl(x))” into something else, there seem to be too many “(x)”. Should it be something like “(stagger . crawl)(x)” which certainly looks more like functional composition? And the statement “That’s a monad” seems out of place because monads must be more than just functional composition. | 2011-07-31 | Good comments, and in the next edition, I will clarify. For the identity monad (the one we're presenting in the Drunken Pirate), we effectively have functional composition. In fact, if you look at the wrap and bind, that's exactly what's going on. As the monads get more complex, the composition of functions also gets more complex, but the chaining of the elements of the monad does not. \n \nI will clarify in the next edition. Thanks for the comment. | |
| 119 | DEFER | 5th example | ?- [] = []. yes | 2011-07-31 | ||
| 119 | DEFER | The paragraph after the examples says : “The last two examples are interesting.” talking about [2, 2, 3] = [X, X, Z]. and [1, 2, 3] = [X, X, Z]. But they are not the last two because of [] = []. which comes last. | 2011-07-31 | ||
| 125 | TYPO | 5th bullet So, we know Tail2-C is [3]… Instead of : | 2010-12-13 | ||
| 124 | DEFER | The second paragraph says “For concatenate(List1, List2, List3), we break …”. To be consistent with this 1-2-3 naming, I would change the final prolog/concat.pl example from : | 2011-07-31 | Good catch. Will fix the next time around, so we don't inadvertantly introduce errors. | |
| 255 | SUGGEST | “iterate takes a function and a starting value. iterate then applies the function to the starting value repeatedly.” I think that the second sentence needs a clarification. Doesn’t iterate apply the function to the starting value initially and then the return value of the function? Not sure how that means the sentence should be reworked though. | 2010-12-13 | ||
| 259 | TYPO | “With defrecord and protocol, Clojure offers the ability to build native code for the JVM, without Java.” Should be “With defrecord and defprotocol…” | 2010-12-13 | ||
| 261 | TYPO | “Next, we spent some time implementing types. With defrecord and pro- tocols, we were able to implement types that were full citizens on the JVM.” Should be “…defrecord and defprotocol…” | 2010-12-13 | ||
| 266 | ERROR | Isn’t this defining and agent with an initial value of 1 and naming it tribbles? Next, we’ll define an agent that has an initial value of tribbles: | 2010-12-13 | ||
| 264 | TYPO | The output of the last REPL statement doesn’t seem to reflect the previous change, hence the comment doesn’t make sense. There has been no change to the value returned by @movie. user=> (dosync (alter movie str “: The Revenge of the Sith”)) You can see that the reference changed: | 2010-12-13 | ||
| 127 | TYPO | mispelled sudoku as sodoku | 2010-12-13 | ||
| 244 | ERROR | ‘count’ is not the higher order function. ‘map’ is. map is a function that takes a function as an argument. thus it is higher order. | 2010-12-13 | ||
| 34 | ERROR | “As always,you can find the answers in the back of the book”. At least in the ebook, I could not find any “Answers” section. | 2010-12-13 | ||
| 287 | ERROR | Prelude> foldl1 (+) [1 .. 3] This raises an error when run in ghci, I think you need to define the 0 value for the accumulator. It should be | 2010-12-13 | ||
| 68 | DEFER | At the start of the Lists and Maps section the list( … ) notation is introduced as a way to create the toDos list, and then mentioned as a short cut way of representing a list. After being told that List was the prototype for lists I was expecting something like: toDos = List clone and then have the short-cut introduced. Was skipping List clone intentional? | 2011-07-31 | ||
| 22 | OK | Middle of page, paragraph starting, “This is not too complicated”; code showing object_id for ‘string’ has typo. Value returned is not the same for the two invocations. | 2010-12-13 | ||
| 14 | TYPO | The 8th line from the bottom of the second code block starts with a “?>” instead of a “>>” and the line is not bolded. This is inconsistent with the rest of the code in that section. | 2010-12-13 | ||
| 35 | TYPO | “Unlike Java and C#.[…]” The correct punctuation should be a comma ( , ) rather than a dot ( . ). | 2010-12-13 | ||
| 173 | OK | This code doesn’t work: def getPageSize(url : String) = Source.fromURL(url).mkString.length but this which I figured out from the API on Source.fromURL does work: def getPageSize(url : String) = Source.fromURL(new java.net.URL (url)).mkString.length The error was “type mismatch; found: String required: java.net.URL”. | 2011-02-03 | This code works fine for me. The file runs just as it is in the text. | |
| 29 | OK | In the listing in the middle of the page, several examples are given of how even numbers are objects with associated methods. The second example, “4 + 4”, was probably intended to be “4.+ 4”. Both work, but the first is a non sequitur while the second reinforces the notion that “+” is a method of “4”. | 2010-12-13 | I can see how you read it that way, but am inclined to leave it as it is. | |
| 274 | ERROR | The first interactive example on the page should read: Prelude> foldl (+) 0 [1 .. 3] (The ‘0’ as second argument to foldl is missing). | 2010-12-13 | ||
| 100 | ERROR | loading list_math.pl from the prolog files folder of the code download results the following output: Is there an issue? | 2010-12-13 | ||
| 96 | OK | The respose to the sequence: Is Yes, not no as the book states. | 2011-02-03 | The first true is the answer; the 'no' after the 'true' means there are no more results. | |
| 98 | SUGGEST | When loading a Prolog file using gprolog, it is not necessary to include the extension of the file (.pl). So, “[‘myfile’]”. will work just as fine as “[‘myfile.pl’]”. | 2010-12-13 | ||
| 39 | SUGGEST | CONTEXT: “If you pass in a :profession of :lawyer, you will get something different. The result is not fully true, but it is almost just as good, because the system will evaluate it as true. Notice that you didn’t have to type in the braces. These braces are optional for the last parameter of a function.” | 2010-12-13 | Good suggestion. You actually have to provide parens if you provide braces. I will add the parens to the call to keep things clear. \n \n | |
| 245 | TYPO | First sentence in Changing a Sequence section: “The sequence library has a number of sequences that transform se- quences…” should be “The sequence library has a number of functions that transform se- quences….” | 2010-12-14 | ||
| 245 | SUGGEST | In the Tests section, I read, “These take a sequence and a test function and return a boolean.” Yet, all the predicate functions take a test function and sequence. Note the order. Change the above sentence to: “These take a test function and a sequence and return a boolean.” | 2010-12-14 | ||
| 47 | ERROR | “(If you don’t specify a value, inject will use the first value in the collection.)” | 2011-03-05 | ||
| 266 | ERROR | Wrong description of zip function(ll. 11-12). Maybe below is correct result. | 2011-03-05 | ||
| 48 | TYPO | Context “Let the initializer accept a nested structure with hashes and arrays.” and the given test case seems to be all hashes in my version: “{’grandpa’ => { ’dad’ => {’child 1’ => {}…”. This was interesting, and I learned how to get hashes out of a hash using “nested.merge(nested) do |n, o|” and so on, as a result. | 2011-03-05 | ||
| 52 | DEFER | chomp.split(‘, ’) # with a space after the separating comma, each line from the file is preserved with literal separators, as in: [“id|forename|surname|postcode”] for a header (I used | for a separator instead of ,) with chomp.split(‘,’) # without a space after the separator character, each line is split into fields, as in: [“id”, “forename”, “surname”, “postcode”] and the separator character is omitted. I found the second form above more useful. | 2011-03-05 | Test file has a space after headings. The code could probably be more defensive, but works as is. \n \nGood eye. Will change this in next edition, because code changes are so dangerous at this point. \n-bt | |
| 52 | DEFER | If your fields in the CSV text file are indeed separated by comma-space as in: id, forename, surname, postcode then the code as provided is right. | 2011-03-05 | ||
| 116 | SUGGEST | The function “append” does not compute permutations (which would be different sequences) of a list, but is able to compute different “splits” of a list (retaining the order). | 2011-03-05 | ||
| 241 | SUGGEST | CLR has a footnote the second time its mentioned, but not on the first (bottom of page 239 in the PDF). I went to look it up the first time, just to find it explained a bit later :) | 2011-03-05 | I'm going to mark this as fixed. It will be if we can keep the indexing and page breaks intact. If not, please accept my apology, and we'll try to get to this in the next release. | |
| 305 | SUGGEST | You write “From that point, our password cracker is easy.”, suggesting that this example was introduced before (making it “ours”). That’s not the case, its the first mention of the password functionality. | 2011-07-31 | In the last printing, it was changed from "our" to "a" meaning that it's easy to build a brute force password cracker. | |
| 157 | DEFER | The act() method of class Kid uses ‘react’ but the only way I can get this code to produce the output as listed on page 158 (using 2.8.1-Final) is by changing ‘react’ to ‘receive’ | 2011-03-05 | This code runs fine in my environment. I'll check it again in time for the next edition, when I update the code in the book. \n \n-bt | |
| 79 | OK | In the third paragraph, you write “The call method gives you access…” Do you mean “The call object gives you access…” or “The object bound to the variable call gives you access…”? | 2011-03-05 | It is definitely confusing, but call is indeed a method. The method is used to return the metadata around a message: parameters, name, etc. \n \nI am perhaps being a bit loose with the terminology method and message. Both are used interchangeably, though a message is the vehicle for invoking a message. I'm inclined to leave this line as it is to keep the book consistent. | |
| 35 | ERROR | On page 35, you say ’As always, you can find the answers in the back of the book." However the answers are not there. In the forum discussion, you say you decided to not include the answers. So you should remove this reference to answers that actually do not exist. | 2011-03-05 | ||
| 238 | OK | The definition of higher-order functions is incorrect. A higher-order function is one that takes functions as arguments. ‘map’ is a higher-order function. ‘count’ is not. “Anonymous function” is an independent concept. | 2011-03-05 | Lots of definitions out there. In math, a higher order function is one that takes functions as arguments, or returns functions (basically functions that produce or consume functions). For one example of this description in the programming language context, check out various Haskell sources, including \n \n"http://www.haskell.org/haskellwiki/Higher_order_function". \n \nAnonymous functions are examples of higher order functions, as they are usually passed as arguments. I am inclined to use it as is. | |
| 47 | TYPO | The code block following “>> a.inject(0)” up to “?>end” | 2011-03-05 | ||
| 61 | TYPO | “Did you catch that the optional argument is actually the third one?” Well, no, it’s the fourth, unless you’re counting from zero :) 1. counter name | 2011-03-05 | ||
| 64 | ERROR | In examples of Io messages, at bottom of page it says: “So, the deliver method is the object that sent the message.” That would be consistent with the objects introspection section of the io programming guide, which says that “call sender” returns “locals object of caller”. (IIUC this locals object is “self” in the method or block that sent the message.) | 2011-03-05 | ||
| 54 | DEFER | Entering elvis asObject returns the following error message: Exception: Map does not respond to ‘asObject’ | 2011-03-05 | This code works on the mac, Io version specified in the book. Good catch though. Going to mark this next edition, as we'll update the versions of all languages at that time. | |
| xv | TYPO | <"We must insist that the next programmer we hire has read all of ‘A la recherche du temps perdu.“‘> The single quote should come before the double quote mark at the end ’” not "’ | 2011-03-05 | ||
| 121 | TYPO | In the two places of the third paragrah, “sodoku” is believed to be a misspelled word of “sudoku.” … of the form sodoku(Puzzle, Solution). Our users can provide a puzzle as a list, substituting under-scores for unknown numbers, like this: | 2011-07-30 | ||
| 279 | ERROR | The code sample <‘zip “kirk” “spock”> does not return <[(’kirk’,‘spock’)]> (given that those are single quotes, that’s not even a valid Haskell value) but returns <[(‘k’,‘s’),(‘i’,‘p’),(‘r’,‘o’),(‘k’,‘c’)]>. As we can see here; zip never builds , it always takes two lists (as in the list of chars above), despite the implication shortly thereafter that it can take other arguments: | 2011-07-30 | ||
| 193 | DEFER | I think that if another_fib is an implementation of Fibonacci series, another_fib(0) must return 0 not 1. | 2011-07-31 | I think you are correct, but since this hits both the book and the code example, I am going to wait to fix this problem until the next release. \n \nGood catch. | |
| 46 | ERROR | a and b are referenced in the first paragraph, but don’t appear in the preceding text - the expression ‘a <=> b’ is missing. | 2011-07-29 | ||
| 100 | ERROR | Instead of | ?- [‘code/prolog/food’]. it should read | ?- [‘food’]. Otherwise gprolog cannot load the file (assuming you have donloaded it to CWD like the previous prolog script). | 2011-07-30 | ||
| 116 | DEFER | In the first line of code of ‘optimized_queens.pl’: valid_queen((Row, Col)) :- member(Col, [1,2,3,4,5,6,7,8]). should be: valid_queen((_, Col)) :- member(Col, [1,2,3,4,5,6,7,8]). It works okay but gives a warning. | 2011-07-31 | Good catch. I am going to leave this as is. I will mark it as next release. | |
| 238 | DEFER | The Haskell wiki is correct. It is the function that takes a function as an argument that is higher order not the function that is the argument (just because it is passed as an argument). An anonymous function may or may not be higher order. The two concepts are independent. | 2011-07-31 | ||
| 90 | DEFER | An example in Futures chapter, which fetches an url, raises an error like follows: ==> Error_0x8c9abc0: Error_0x8c9abc0: | 2011-07-31 | I'm going to wait to address this until the next release. | |
| 305 | TYPO | The second list is wrongly named in “We took x from a list of xs, and we took y from a list of xy.”; its name in the “cartesian” function is “ys”, not “xy”. | 2011-07-30 | ||
| 149 | TYPO | “The class has a constructor with one parameter, firstName […]” In the summary (quote shown above) you use “firstName” but in the code sample, you use “first_name” | 2011-07-30 | ||
| 31 | DEFER | In the while/until example the initialization of x is missing (e.g. x=0), which will cause an error (NoMethodError: undefined method `<’ for nil:NilClass). If you’ve continued coding from the last example you’ll probably be fine (since x will be set to 4), but if you’ve startet a new irb-session it will cause this error. | 2011-07-31 | Good point. I'm going to mark this as next-edition so I don't renumber the pages, and renumber the example. I had intended this to be a continuation from the previous example. | |
| 31 | ERROR | [The paperback book identifies itself as “P3.0 printing, March 2011 Version: 2011-3-28”. That isn’t an option on this form, so I picked the only other P3.0 option] The description of Ruby’s Array::inject method seems to be incorrect. Interestingly, it was changed from the 2.0 version (errata report #46026). The text in the book is currently: “(If you don’t specify a value, inject will use the value 0 in the collection.)” This isn’t correct, it instead uses the initial value of the collection (as was originally written), but then starts execution at the second element (perhaps this second fact was the actual correction the previous errata wanted). Some code and output that shows the situation(Ruby 1.9): 0>a = [5,3,4,1] as opposed to: 0>a = [5,3,4,1] or: 0>a = [5,3,4,1] Regards, | 2011-07-29 | Yeah... that's broken. Will fix. | |
| 102 | OK | The problem of painting a map with Prolog is interesting, but i didn’t feel comfortable having to “tell” prolog that blue is different from green, for example. It should “know” that. Moreover, this approach makes the size of the KB grow exponentially with the number of colors. After some tinkering, i got this alternative: color(red). solution( color( ‘Alabama’, A ), /* consult, then do solution(A,B,C,D,E) */ I’m still not 100% happy with it. It seems to me that one should be able to say | 2011-07-31 | This is an interesting solution to the example, but my example illustrates a point: the simplicity of the example is striking, and it teaches the concepts I want to teach. I like your example, but I am going to leave the text as it is. | |
| 65 | TYPO | the postOffice messageTarget returns Object_0x1004ce658. This should be the same as Object_0x100444b38 that was the result of postOffice := Object clone on the previous page. | 2011-07-31 | ||
| 226 | DEFER | It may be interesting to know that “repl” stands for Read-Eval-Print Loop, and that’s the common name for the Lisp/Scheme prompt as well as a precise description of what it’s doing. Each one of these (Read, Eval, Print, Loop) is a function: (loop (print (eval (read)))): read a line of input from the console, evaluate it, print the result back to the console, and repeat. | 2011-07-31 | Interesting note. Will add it to the next edition to preserve the page breaks and the index. | |
| 138 | TYPO | In the following sentence, there should be a space between ‘Nice’ and ‘trait’. Also, ‘trait’ should not be formatted as code. “The final element, a class called Character, mixes in the Nicetrait.” | 2011-07-30 | ||
| 152 | TYPO | Technically speaking, in the following sentence ‘empty’ should be ‘isEmpty’ and ‘first’ should be ‘head’. “We also used count, empty, and first methods for obvious purposes.” | 2011-07-30 | ||
| 193 | DEFER | Immediately after mentioning Erlang is tail recursion optimized, two recursive examples are given - factorial and fibonacci. But neither of them are implemented in a tail recursive fashion. This could be confusing. | Good catch. I will revise these in next edition, ok? \n | ||
| 42 | ERROR | Fixnum is not derived from Class. It is an instance of Class. | 2012-01-21 | ||
| 42 | DEFER | Figure 2.1 is correct but to make it consistent with the code you show, the three blue boxes on the left should be moved down with the left arrow coming from Fixnum, not Numeric. Then add an Object box above Numeric with an up arrow showing the inheritance. | Good catch. Changes like this are a little bit dangerous and expensive, so I am going to live with this problem and fix it in the next edition, ok? | ||
| 43 | OK | This is a minor coding error, but in the “ruby/tree.rb” code, the reference to >>>Currently in PDF<<<< >>>>Should be<<<<<<< Thanks | 2012-01-23 | there's an attr_accessor, and that adds the children method. This is ok. \n \n-bt | |
| 92 | DEFER | In the chapters about Prolog, tuples and list are mentioned. 1. Prolog does not have a real tuple type, and especially not a constant access one. In Prolog there is a binary left associative term constructor ,/2 which is what is used to build things which look as tuples: ?- (1, (2, (3, 4))) = (1, 2, 3, 4). ?- (((1, 2), 3), 4) = (1, 2, 3, 4). In fact, what looks like a tuple is simply a nested term, not different from lists. Things are slightly more complicated as there is a ,/2 predicate which represents the logical conjunction of two predicates: ?- (true, false). ?- (true, true). The list functor is ‘.’. ?- .(3, []) = [3]. The usual […] syntax is just syntactic sugar. Essentially a list is not a “mutable size container” (lists are essentially immutable[0]). ?- ‘,’(3, 4) = (3, 4). The ‘term’ syntax can be used essentially to bypass usual precedence rules which would make the desugared version ,(3, 4) a syntax error. Since in Prolog it is possible to use any functor (including ‘,’) to build terms of arbitrary arity, it is correct to write: ?- X = ‘,’(3, 4, 5). However, that is not a tuple type: ?- ‘,’(3, 4, 5) = (3, 4, 5). Because (1, (2, (3, 4))) = (1, 2, 3, 4). [0] In some sense it can be “modified” because if we have variables we can “extend” the list through unification if the last term is a variable ?- (1, A) = (1, 2, 3). | Ah... the danger of writing about a language that is relatively new to me. Unfortunately, this error is pervasive in the chapter, and pretty difficult to fix at this stage. I am going to have to wait until the next edition. \n \nThanks for the catch, and sorry for the error. | ||
| 12 | TYPO | The output of the two puts is on the same line but should be on the next line >> puts “hello, #{language}”hello, Ruby | 2012-01-21 | ||
| 224 | ERROR | In the middle of the page, there is a sentence saying: “count in this context is a higher-order function.” I think map should be the high-order function in this context. | 2012-01-21 | ||
| 140 | TYPO | val hobbits = Set(“frodo”, “samwise”, “pippin”) should be in order to follow the convention that code executed at the command line is clearly distinguished from the rest of the text. Additionally, it should be syntax highlighted. | 2012-01-21 | ||
| 148 | TYPO | “On the next page is an example of a regular expression that can match uppercase or lowercase F at the beginning of a string.” | 2012-01-21 | ||
| 154 | TYPO | “Find.” should be “Find:” | 2012-01-21 | ||
| 185 | ERROR | It’s receive … end not loop() … end | 2012-01-21 | ||
| 183 | TYPO | There are n commas in the tuples of the shopping list in exercise 2. Consider a shopping list that looks like [{item quantity price}, …]. Write a list comprehension that builds a list of items of the form [{item total_price}, …], where total_price is quantity times price. should be Consider a shopping list that looks like [{item, quantity, price}, …]. Write a list comprehension that builds a list of items of the form [{item, total_price}, …], where total_price is quantity times price. | 2012-01-21 | ||
| 192 | TYPO | The code sample for error trapping on this page is inconsistent with the description and the code on the previous page. {’EXIT’, From, Reason} -> should be {’EXIT’, From, Reason} -> io:format(“The shooter ~p died with reason ~p.”, [From, Reason]), | 2012-01-21 | ||
| 94 | ERROR | All the Prolog code that is downloaded from the site is incorrectly commented at the top. The comments should be preceded with % instead of #. When loading the code, it doesn’t compile with the comments. | 2012-01-21 | ||
| 35 | DEFER | You say “… class will be much more difficult to debug because Ruby can no longer tell when a method is missing. We would definitely want strong error checking to make sure it was accepting valid Roman numerals.” But, adding a line such as return super if (!name.to_s.match(/[IVXLC]+$/)) first thing in the method_missing definition, Ruby will be able to handle the missing methods just fine. The problem of finding the definition of the methods remains, of course. I’d personally strip the quoted lines from that paragraph and add them as an introduction to an exercise to find the return super if cannot_handle_method idiom. | Your design is better than mine. Perhaps in the next edition? | ||
| 239 | DEFER | In Hackers and Painters, Graham chronicles a start-up that leveraged produc- tivity with Lisp to achieve productivity that no other vendors could match. should probably be: In Hackers and Painters, Graham chronicles a start-up that leveraged Lisp to achieve productivity that no other vendors could match. | Good suggestion. Will consider for next edition. | ||
| 253 | TYPO | “seen lists” has no space: You’ve seenlists in many different languages. | 2012-01-21 | ||
| 171 | DEFER | The Fibonacci sequence is defined with the 0th element as 0. The definition on page 171, as another_fib, starts with the 0th element as 1. | You're right, of course. I'm not going to change it here, as the intention is clear enough and I would be likely to inject more errors in the manuscript by fixing the problem. \n \nI am going to wait for the next edition to fix this one, ok? \n | ||
| 250 | DEFER | The Fibonacci sequence is defined with the 0th element as 0. The definition on page 250, as fib, starts with the 0th element as 1. This gives different results from the alternative definition on page 251 where the 0th element is 0. | Good catch, but I think the intent is clear, and don't want to risk turning a small problem into a bigger one. Will consider for the next release. Thanks for finding this one. \n \n | ||
| 228 | ERROR | You wrote "When Clojure parses code, it first breaks the program down into pieces called forms. Then, Clojure can compile or interpret the code’. However, Clojure code is always compiled to bytecode — even at the REPL. It’s not interpreted at all. | 2012-01-21 | ||
| 79 | ERROR | Downloadable source file (friends.pl) given on this page produces compile error due to incorrect comment delimiter. (Am using GNU Prolog 1.3 per author’s suggestion.) Replacing all single-line comment delimiters with % (percent sign) fixes the problem. | 2012-01-21 | Ah. These are auto-generated, and not by me. I will leave a note to the prags. | |
| 15 | OK | In the code examples at the bottom of the page: The irb warning code for “string literal in condition” is 13 and not 31 as printed. | 2012-01-23 | Good eye! \n \nThis is a line number and thus will be different, depending on how many lines you've typed into the console. \n \n-bt | |
| 26 | OK | Bug: In the implementation of the Tree class in ruby, running the given program gives the following error: tree.rb:11:in `visit_all’: undefined local variable or method `children’ for # Solution: on line 11, “children.each …” should instead reference an instance variable “@children.each …” | 2012-01-23 | There's an attr_accessor at the top. That should add the "children" getter method. Perhaps you didn't type that line? \n \n It runs ok for me. \n \n-bt | |
| 105 | TYPO | On fourth bullet (line 16) Tail2-2 must read Tail2-B, Tail2 must read Tail2-A | |||
| 131 | ERROR | The book translates some Scala to Ruby as: args.each {|arg| println(arg)} println isn’t a Ruby function so it should be ‘puts’ | |||
| 150 | ERROR | In the description of the sort example it is said “that will yield a case-insensitive sort”. | |||
| 238 | TYPO | On line 4-5 should be (SomeType.arg) means fire the constructor for SomeType, binding arg to the first parameter. | |||
| 263 | ERROR | There is a discrepancy between the two implementations of the Fibonacci sequence on pages 262-263 of the UK edition. The 1st fib implementation prints out the nth Fibonacci number like a zero based array (write out the 1st 10 numbers starting with a 0). For example fib 10 returns 89, which is the 11th Fibonacci number. The ‘x’ in the fibTuple is the correct fibonacci number though. | |||
| ZjaIX | tzlDB | ERROR | That’s a knowing aenwsr to a difficult question | 2012-03-27 | |
| 232 | ERROR | In “you’ll define a higher-order function with the fn function”, “higher-order” should be “anonymous”. Using “fn” always defines an anonymous function which may or may not be higher order. Higher-order function may also be defined using “defn”. In fact your example using fn is not higher-order. | |||
| 167 | TYPO | In the first paragraph of the Scala subsection titled “Concurrency” (bottom of the page numbered 167 on the page in the PDF —- my reader thinks it’s page 163), you’ve a sentence “Often, the actor uses a pattern matcher to detect the message and perform the appropriate message.” I think the last word should be “action”. Also, “classify” might be more appropriate than “detect”, but that’s a minor preference. Thanks for writing the book! | |||
| 144 | ERROR | In section “Classes in Scala”: class Person(firstName: String, lastName: String) doesn’t result in a class with firstName and lastName attributes, as the text says. It merely results in a class whose constructor takes two arguments but doesn’t do anything with them. To get attributes, “val” must be added in from of the two parameters. Otherwise readers will be confused that they cannot access the supposed attributes if they experiment with the example: scala> class Person(firstName: String, lastName: String) scala> val gump = new Person(“Forrest”, “Gump”) scala> gump.firstName with val though: scala> class Person(val firstName: String, val lastName: String) scala> val gump = new Person(“Forrest”, “Gump”) scala> gump.firstName | |||
| 148 | SUGGEST | In scala/employee.scala: Using “override val” for the name attribute in Employee is not necessary. It’s easier to write it like this: class Employee(name: String, val number: Int) extends Person(name) { This results in the Employee constructor taking the names as an argument and passing it on to Person, where it will live as a field. If you use override val, it results in an override of the public getter method, which is not necessary as Person already provides that. The same thing for scala/nice.scala, this way is much better: class Character(name: String) extends Person(name) with Nice | |||
| 148 | SUGGEST | In scala/employee.scala: “id():String” isn’t recommended style, the colon should always be followed by a space. It’s right most of the time, but it’s not consistent (it looks unclean). Other examples of missing space after colon is in scala/nice.scala, on page 151. Maybe other places, but I’m not yet as far :). | |||
| 43 | 45 | ERROR | The attr keyword defines an instance variable. Several versions exist. The most common are attr (defining an instance variable and a method of the same name to access it)… Presumably this should be attr_reader rather than attr? | ||
| 279 | ERROR | Instead of Anyway, it might be a good idea to shortly discuss the difference between foldr/foldl and foldr1/foldl1 or leave out the latter version. IMO this difference is not related to the application of an operator, e.g. (+), in contrast to an anonymous function. | |||
| 173 | ERROR | 4 + “string”. Yes, but the example is misleading since + doesn’t concatenate strings, e.g. | |||
| 175 | ERROR | {comic_strip, {name, “Calvin and Hobbes”}, {character, “Spaceman Spiff”}}. The code shows a way to represent key-value associations but I don’t think there’s any hashing going on here. The order of key-value pairs matters and a key may appear multiple times. Can it look up values by key? The initial atom is a simple way to indicate type information (what Scala does with case classes) and indeed it doesn’t fit the hash table concept. | |||
| 215 | ERROR | Section: Booleans and Expressions (= 1 1.0) returns false in Clojure 1.3. Is that a language change? (== 1 1.0) does return true. | |||
| 235 | ERROR | Section: Infinite Sequences and take Perhaps it’s a language change in Clojure 1.3, but the fib-pair example as written gets an ArithmeticException integer overflow. Starting iterate with [1N 1N] gets it to happily use BigInt values. BTW there’s no need to map first over all the iterated values — it’s enough to take the first of the nth pair — but maybe you wrote it that way to demonstrate that map works on infinite sequences. Is it typical Clojure code to compute one more fibonacci number than needed vs. returning the second element of the previous fib-pair? | |||
| 251 | TYPO | One of the titles used in “Working with Atoms” does not match. “Seven Languages” becomes “Seven Languages in Seven Weeks”. user=> (swap! top-sellers conj {:title “Seven Languages”, :author “Tate”}) | |||
| 44 | TYPO | In the Tree code example, visit_all method, it should say @children.each instead of children.each | |||
| 32 | ERROR | You list the “logical operators” | and & as behaving more or less like || and && but without shortcutting. This is incorrect. | and & are the bitwise operators and the only reason they can behave somewhat like || and && in some circumstances is due to the specific types you have been comparing and how they have these operators implemented. It is misleading not to specifically refer to these as the bitwise operators. | |||
| 43 | SUGGEST | You describe “methods that test” as those that end in a question mark. I think you can be clearer than that about this Ruby idiom. Specifically, methods that are expected to return a boolean are expected to end in a question mark. You could probably combine the description to include both ideas - testing something and the expectation of a boolean return value. | |||
| 23% | SUGGEST | During Day 2 of Io the reader is suddenly told to “Think of doMessage as somewhat like Ruby’s eval”. eval however was never mentioned any where in the Ruby section an far as I could see. Which can cause readers to stumble a bit. The explanation of what eval is follows in the next sentence, but it’s a bit weird to suddenly learn eval first after you are told to think of something else as eval. | |||
| 25 | TYPO | In the 3rd paragraph of the “I Won’t Be Your Programming Reference” section, “I will walk you through examples in each languages” should be “I will walk you through examples in each language”. | |||
| 219 | ERROR | Clojure: Under the Booleans and Expressions section, you give an example of | |||
| 35 | TYPO | In the check out code of Duck Typing when discussing the type system the example | |||
| 258 | ERROR | This page says: “[…] if/then/else statement” and later: “In Haskell, if is a function” Both are wrong — ‘if/then/else’ is an expression with special syntactic support. | |||
| 260 | ERROR | “[…] use the let function […]” let is not a function. “in Haskell, let binds a variable to a function” ‘function’ should be replaced by ‘value’, as is shown in the following example. | |||
| 267 | ERROR | “Haskell includes first-class ranges and some syntactic sugar to support them” Ranges are not first-class, they’re just sugar for calls to functions from the Enum typeclass. | |||
| 277 | ERROR | “f . g x” is not shorthand for “f (g x)”. Example: “sum . map (+1)” is a valid function. “sum (map (+1))” is a type error. | |||
| 282 | ERROR | at the top of the page: “the types that each statement returns” Those are expressions, not statements. Also, expressions do not return types. | |||
| 283 | ERROR | At the top of the page: “Suit and Rank are type constructors” Suit and Rank are not type constructors — they’re types. | |||
| 282 | TYPO | “a string is an array of characters […] represent the array of characters, with an array […]” s/array/list/ | |||
| 282 | TYPO | “That means that the type Boolean will have a single value, either True or False.” I think I get what this is saying, but it’s confusing, and taken literally is wrong — the type Boolean has two values. | |||
| 287 | ERROR | “You can also specify boilerplate implementations.” That should be ‘default’, not ‘boilerplate’. | |||
| 289 | ERROR | “Haskell allows us to chain let expressions together and express the final form in an in statement.” The example doesn’t show chained let expressions — it shows a single let expression. There is no such thing as an ‘in statement’. That is part of the syntax of let expressions. | |||
| 289 | SUGGEST | “Monads let you simulate program state.” Many monads have nothing to do with state. This seems to imply that monads are only/best for stateful patterns. “do syntax allows programs in the imperative style.” ‘Do syntax’ also allows non-imperative programs when working with other monads. Also, such programs can always be written without ‘do syntax’. A monad has “a type constructor that’s based on some type of container.” Many people (myself included) find this intuitive explanation actually makes it harder to grok monads. The problem is that some monads act like containers, and some don’t. | |||
| 291 | SUGGEST | As mentioned in the 2nd monad law, “m >>= return = m”. However, both the treasureMap example on p. 291 and the last example on p. 294 make the mistake of using “m >>= return” instead of simply “m”. If return needs to be demonstrated, it should be a useful example. | |||
| 290 | ERROR | “return wraps up a function into a monad” ‘return :: Monad m => a -> m a’. It injects any value, not just functions, into the monad. “>>= unwraps a function” Same thing. | |||
| 294 | ERROR | Just is not a type. It is a function of type ‘:: a -> Maybe a’. The examples at the top of the page are confusing. They should probably be: Prelude> Just “some string” :: Maybe String This shows that there can either be a value or not. However, “Just Nothing” is of a totally different type than ‘Just “some string”’. “The bind is also easy. For Nothing, it returns a function returning Nothing. For Just x, it returns a function returning x.” The Maybe implementation of >>= does not return a function. | |||
| 296 | ERROR | “The fully polymorphic template system” The type system is not a template system. Although there is something separate and unrelated called Template Haskell. | |||
| 296 | ERROR | Haskell’s type system is referred to as ‘strong’ on this page and again on p. 298. It should be ‘static’/’statically’. | |||
| 152 | TYPO | (Note that the page# is a guess based on other submissions since I’m reading the Kindle version.) Under “What We Learned in Day 2”, in the fourth paragraph, the second sentence reads: “We also used count, isEmpty, and first methods for obvious purposes.” I looked manually and searched via the search function, but could find no example of a method named “first” being used. | |||
| 276 | ERROR | Two issues [page 276-277] Second, the starter ‘monad’ example [pg277] is also applicitive functor-ish rather than monad-ish. ‘>>==’ and ‘rtn’ are typed ‘Position a -> Position a’; to be monadic they must be type ‘a -> Position a’ Evaluation in a ‘do’ block is enforced by composition, but it is not the same as stringing functions together with the compose operator; if “(bar . foo) x” is valid for a monadic x, then the equivalent bind would be “return x >>= foo . return >>= bar . return”. | |||
| 124 | TYPO | for loop example run as forLoop.scala, but called for_loop.scala on bottom of previous page | |||
| 69 | ERROR | The first paragraph says “Create a list like this” then shows the method ‘list’. Then there’s a paragraph explaining that there’s a shortcut method ‘list’, which we’ve already seen. The first code example should probably use ‘toDos := List clone’ then append values. | |||
| 72 | TYPO | In “What We Learned in Day 3” for Io (Chapter 3), it states “Next, we built an XML generator that used /method_missing/ to print XML elements.” however it was Io’s /forward/ that was used, and while a previous heading was called “Io’s missing_method” (p.67) and went on to say “You can use the /forward/ message in the same way that you would use Ruby’s /missing_missing/” (p.68) it seems a mistake to still refer to the Ruby construct in the Io summary. | |||
| 83 | SUGGEST | In the Prolog code for map.pl on page 83, since the three colours are defined as being different through symmetric relations, there seems to be an unneeded line of code in the rule for coloring: different(Alabama, Mississippini), It’s the only instance of a symmetrically relational subgoal in the rule, all others having been omitted. | |||
| 83 | SUGGEST | The definition of the friend rule works for very simple queries, but gives unexpected results when querying with an unbound variable (e.g. asking “who is the friend of wallace?”: ?- [user]. |: likes(wallace,cheese). ?- friend(wallace,grommit). ?- friend(wallace,X). This is because the “\\+(X = Y)” clause comes before the X and Y variables are bound to possible values by the “likes” statements. If the order of the clauses is changed, the query works: ?- [user]. |: likes(wallace,cheese). ?- friend(wallace,grommit). ?- friend(wallace,X). These examples use SWI Prolog, but I received the same results with GNU Prolog. | |||
| 97 | TYPO | Stupid error I know, but it’s “Gromit” not “Grommit” - only one ‘m’ :) | |||
| 249 | ERROR | Generating the 500th Fibonacci number using the following code: (nth (map first (iterate fib-pair [1 1])) 500) will not work, since the integer values will overflow. You get an error like this: ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1388) In order to successfully generate the number, the BigInt type must be explicit with [1N 1N] as the initial values: user=> (nth (map first (iterate fib-pair [1N 1N])) 500) This is using Clojure 1.5.1 on Java 1.6 | |||
| 250 | SUGGEST | “We grab n elements from the infinite sequence (iterate inc 1). Then we take n of them and multiply them together with apply *.” There seems to be a redundancy between these two sentences - we “grab n elements” and THEN “take n of them”? The inner function is not grabbing n of anything, it is starting generation of infinite elements lazily, and the only time we start limiting this is at “take n”. | |||
| 252 | SUGGEST | You have written: Entering that text into the repl does absolutely nothing to verify that it actually returns a new string, as it just returns the string in question. Perhaps you could add some more code to make it a bit more clear, for example: user=> (identical? “new string” “new string”) | |||
| 261 | ERROR | foldl1 only takes a function and a list. The example in the middle of the page provides 0 as an initial value to foldl1. Removing the zero makes the example work. | |||
| 158 | TYPO | Inconsistent formatting and syntax highlighting val hobbits = Set(“frodo”, “samwise”, “pippin”) | |||
| 159 | SUGGEST | In getPageSizeConcurrently() ‘actor’ is used but not explained. I guessed that it’s a factory method in Actor (since that’s a new import not found in the ‘kids’ example on p.157) that creates an instance of Actor with the code block argument as the act() method and calling start on it… | |||
| 279 | TYPO | Wrong order of arguments in ‘foldl (\\x carryOver -> carryOver + x) 0 [1 .. 10]’ The order and the following explanation would be correct for foldr but has to be reversed for foldl. (Of course, it does not really matter for this particular function. Replace ‘x’ with ‘2 * x’ to see the difference). | |||
| 227 | SUGGEST | The definition of left and right function on SimpleCompass can be improved by omitting the redundant SimpleCompass creation. At least as of Clojure 1.6.0 (which I am using), the functions could be simply “(left [_] (turn bearing 3))” | |||
| 146 | ERROR | def turnRight() { Should be: | |||
| 77 | 79 | TYPO | When you call `postOffice messageTarget` it should report back the `postOffice` object memory address: `Object_0x100444b38`. It currently reports `Object_0x1004ce658`, which is incorrect. | ||
| 104 | SUGGEST | In the explanation of the concatenate example Otherwise: thank you for this very valuable book! | |||
| 84 | TYPO | Typo with foreach->forEach; “we iterate through the phone numbers in the list with forEach” should be “we iterate through the phone numbers in the list with foreach”. | |||
| 76 | SUGGEST | > “The coroutines differed from concurrency in languages like Ruby, C, and Java because threads could only change their own state, leading to a more predictable and understandable concurrency model and less of a need for blocking states that become bottlenecks.” This sentence is confusing. Coroutines are compared to threads, which are “leading to a more predictable and understandable concurrency model …” (?), but a few sections back it was said that threads are harder to use and debug (true).
Thanks. | |||
| 18 | ERROR | The book states, “As always, you can find the answers in the back of the book.” This is not in fact the case. | |||
| 285 | SUGGEST | No one knows what is being asked in the Lazy sequence problem. It specifies function composition where the functions to work with have int -> [int] types. | |||
| 83 | SUGGEST | In the prolog example, map.pl, there is: Isn’t that redundant? | |||
| 24 | ERROR | The examples of functions with associated code blocks (e.g. “in_case_of_emergency”) shows the named block defined before the function. This will not work; the block needs to come afterward, e.g. def foo foo do | |||
| 278 | SUGGEST | The code snippet under “Different Computational Strategies” introduces the `instance` keyword without explanation. | |||
| 281 | TYPO | The “What We Learned in Day 3” section says “We started with types, by looking at the inferred types of existing functions, numbers, booleans, and characters.” - but, in fact, no functions were examined (on pages 268-269) | |||
| 248 | ERROR | Whenever you declare a module named Main in Haskell, and write just the provided code, you will encounter the following error: | |||
| 1 | 1 | SUGGEST | The code examples in the Kindle book are illegibly formated wrapped around in bad ways. I had to return the Kindle book, sorry. | ||
| 223 | ERROR | The book reports: `user => (= 1 1.0) but my repl reports: `user => (= 1 1.0) | |||
| 44 | 44 | TYPO | “You’ve briefly seen modules in the code on page 42.” should be “You’ve briefly seen modules in the code on page 41.” | ||
| 197 | SUGGEST | What I noticed in several places but especially in the Erlang chapter I’m currently looking at, are places where the flow would profit from rearranging some texts. Examples: - On page 197, the paragraph “Like all other languages in this book…”, from my perspective definitely belongs under the “Core Weaknesses” subtitle, and not above it. Anyway, 8 years after coming out, still a good book to get to know different programming languages and paradigms! |