By Developers, For Developers

Historical errata for Seven More Languages in Seven Weeks

PDF PgPaper PgTypeDescriptionFixed onComments
71TYPO

“the best part of working Factor was the simple joy”

Perhaps that should be changed to:

“the best part of working on Factor was the simple joy”

or

“the best part of working with Factor was the simple joy”

2014-07-01r157882
71TYPO

“and by collaborating with all of the extremely talented contributors”

Perhaps the ‘by’ should be removed:

“and collaborating with all of the extremely talented contributors”

2014-07-01r157894
51TYPO

In the line:

IN: scratchpad “Hello, Factor!”

the syntax highlighting appears to be incorrect for the ‘!"’ portion of the text.

2014-07-01r157881
54SUGGEST

In the following:

The if word takes a value and two quotations and calls the first quotation if the value is anything else but f(false). In the latter case, the second quotation is called

it seems the word ‘else’ may not be necessary. So it would read:

The if word takes a value and two quotations and calls the first quotation if the value is anything but f(false). In the latter case, the second quotation is called

Another take on this would be:

The if word takes a value and two quotations. If the value is anything but f(false) the first quotation is called. Otherwise the second quotation is called.

2014-07-01r157895
81SUGGEST

Here’s a version of ‘fizzbuzz’ from Rosetta Code:

USING: math kernel io math.ranges ;
IN: fizzbuzz
: fizz ( n — str ) 3 divisor? “Fizz” “” ? ;
: buzz ( n — str ) 5 divisor? “Buzz” “” ? ;
: fizzbuzz ( n — str ) dup [ fizz ] [ buzz ] bi append [ number>string ] [ nip ] if-empty ;
: main ( — ) 100 [1,b] [ fizzbuzz print ] each ;
MAIN: main

These words accept at most one item from the stack. I think this version is a little cleaner, but this is definitely a judgment thing. :) Hard to argue with four one-liners though. ;)

2014-07-01Thank you for the nice find. However, the example in the book works to tell a story about a functional pipeline so I prefer to keep it as it is.
4TYPO

“Like many of its fellow scripting language” -> languages

2014-07-01r157896
6TYPO

“You can compare any values for equality inequality with == and ~=, respectively.” -> equality and inequality (I guess)

2014-07-01r157898
9TYPO

“You can also explicitly create variadic functions, that is, functions with an arbitrary number of outputs.” I think that should be “inputs”.

2014-07-01r157900
18TYPO

“This new function just stores each key/value pair in a list, then concatenates them into string at the end.” -> a string

2014-07-01r157897
19SUGGEST

Functions `strict_read` and `strict_write` don’t work as intended if `false` is allowed as a table value. In that case, we need `if _private[key] ~= nil then …`.

2014-09-13
27SUGGEST

The assignment for day one Lua says to write a program to print the first n even prime numbers. This is a bad assignment because there is only one even prime number, 2. Should be changed to just the first n prime numbers.

2014-07-01r157899
12xiTYPO

…until you’re read this section -> “…until you’ve read this section” perhaps?

2014-07-05r157983
77TYPO

USING io math.functions ; should be USING: io math.functions ;

2014-07-07r158009
86TYPO

Explanation of cart-item code says “On the second line, we have the same code but we then call >>price on the instance.” — it should say “price>>” for the second line as it is extracting price and putting it on the stack.

2014-07-07r158019
13ERROR

You ask to “create a program that will print the first n even prime numbers”. There is only one even prime number.

2014-07-11Duplicate of erratum #76938, already fixed.
19ERROR

metatables, reading and writing:

When putting the code in the order given in the book nothing happens (no error message as strict_read and strict_write are nil). That got me quite confused, please put the definition of mt after the definitions of strict_*

2014-09-13
33SUGGEST

Setup Day3 for linux

para 2 reads

sudo apt-get install build-essential lua5.1 lua5.1-dev cmake rtmidi

should that not be? lua5.2 and lua5.2-dev?

2014-09-13
103SUGGEST

When you introduce the `if` you should explain the different between if .. then .. else and if | .. -> | .. -> | otherwise ..

2014-08-15
212ERROR

This might be a nitpicky but the following sentence is not entirely correct:
“Using precise terminology, Vect is indexed by Nat
and Type. The Nat is the number of elements allowed in this vector.”

While Vect is indeed indexed by a value of type Nat, it is parameterised by a value of type Type. The difference is that parameters are uniform in the resulting (it is ‘a’ in both constructors, while Nat differs ‘Z’ and ‘S n’). Idris will automatically detect such property (unlike Agda, which has an explicit syntactic difference) and it is apparent in the induction principle and the associated eliminator (try elim_for Prelude.Vect.Vect) and you will see how things are quantified.

2014-08-01Fixed: r158852
134TYPO

The symbol :magnito in the Marvel Universe is incorrect! The correct spelling is Magneto, or in the sample code piece it would be :magneto. While I understand this may seem trivial, the fate of the Universe depends upon it’s Villains (oh wait, Hero, wait, he’s a bad guy again, uhmm, nevermind, whichever he is today) names being spelled correctly.

2014-07-20r158459
135ERROR

The print function at the bottom of page 135 no longer compiles of at least Elixir 0.12.4
def print(x), do: Enum.map x, &(IO.puts &1)
now spits out:

(SyntaxError) iex:1: unexpected comma. Parentheses are required to solve ambiguity in nested calls. Syntax error before: ‘,’

2014-08-15
96SUGGEST

ELM point pattern matching does not work in repl

xDist {x} = abs x

can be compiled but does not work in the repl.

2014-08-15
77TYPO

We now everything we need to calculate: “now” should be “know”

2014-07-20r158458
90TYPO

You will see that Elm takes full advantage of it’s heritage: “it’s” should be “its”

2014-07-25r158634
94TYPO

factoral 1 = 1 (and more occurrences in the rest of the code example)
“factoral” should be “factorial”

2014-07-25r158634
90TYPO

The character \\ helps when you’re running in the repl .
Superfluous space between repl and .

2014-07-25r158634
99TYPO

What were you main influences?
“you” should be “your”

2014-07-25r158634
105ERROR

String allows us to deal with graphics

According to library.elm-lang.org/catalog/elm-lang-Elm/0.12.3/String, String is for string manipulation.

2014-08-15
105TYPO

We’ll use Input records This API will allow us

Missing period after “records”

2014-07-25r158634
107TYPO

which will come into handy when we work on our game
“into” should be “in”

2014-07-25r158634
112SUGGEST

The game is called LanguageHeads, but the module is called LanguageHead. I’d just call it LanguageHeads (plural) as well.

2014-08-15So close to production, I am going to leave this as is because it might introduce other errors.
124TYPO

The third day will a little shorter

Missing “be” between “will” and “a”

2014-07-26r158645
126TYPO

Tuples are collections of fixed-size
“fixed-size” should be “fixed size”

2014-07-26r159645
150TYPO

We’ll start with the entire problem problem,
One “problem” is enough.

2014-07-28r158697
152TYPO

defmodule StateMachoneText do
“StateMachoneText” should be “StateMachineTest”

2014-07-28r158697
155TYPO

the macro will do all of the work for us, creating everything everything
One “everything” is enough

2014-07-28r158697
157TYPO

Most of Elixir semantics
“Elixir” should be “Elixir’s”

2014-07-28r158697
157TYPO

languages like Lisp, Ruby and Clojure.
Missing Oxford comma

2014-07-28r158697
158TYPO

protocols, which adds dynamic polymorphism to the language
“adds” should be “add”

2014-07-28r158697
163TYPO

start_link will spawns and links the supervisor process
Remove “will”

2014-07-28r158697
174TYPO

We also examined membero, a built in relation
“built in” should be “built-in”

2014-07-29r158701
174TYPO

Now’ll we’ll try to write some relations of our own.
“Now’ll” should be “Now”

2014-07-29r158701
174TYPO

[mano :alonso-church]
“alonso” should be “alonzo”

2014-07-29r158701
176TYPO

In the previous example, it may appears
“appears” should be “appear”

2014-07-29r158701
91SUGGEST

In the Elm ChessPiece example:

> data ChessPiece = CP Color Piece
> piece = CP Black Queen
CP Black Queen : ChessPiece

It is not explained what the meaning of “CP” is, and I could find no mention of it in the book or on the elm-lang.org site. The example also doesn’t work without it.

What does it mean?

2014-08-15
136SUGGEST

quicksort.exs drops duplicate elements. Maybe change the first list comprehension from `x < head` to `x <= head`. On a related note, it seems `lc` has been deprecated in favor of `for` in recent versions of Elixir.

2014-08-15
149TYPO

“Think of unqoute” -> unquote

2014-08-01r158837
153TYPO

“See if you can identify each of the these steps” -> “each of these steps”?

2014-08-01r158837
220TYPO

The one downside of defne is that you must always match on all the functions arguments
“functions” should be “function”

2014-08-01r158838
221TYPO

even if some of it’s values are logic variables
“it’s” should be “its”

2014-08-01r158838
221TYPO

Tests are run in order and whichever tests passes
“tests” should be “test”

2014-08-01r158838
224TYPO

For conde, we already say matche and defne
“say” should be “saw”

2014-08-01r158838
16TYPO

there’s a , at the end of the line height = cube_size,
I’m not sure it matters, but it seems strange, since these tables don’t have on in the final element of any other table.

2014-09-13
225TYPO

We used featurec to contrains maps
“contrains” should be “constrain”

2014-08-02r158893
226TYPO

There are an infinte number of answers
there are an infinite number of possibilities

“are” should be “is” in both cases

2014-08-02r158893
227TYPO

We can ask core.logic to solve for every triple of distinct numbers that whose sum is 100
remove “that”

2014-08-02r158893
227TYPO

All the logic variables are constrained the finite range of 1 to 100.
Add “to” after “constrained”

2014-08-02r158893
227TYPO

such as [6 28 66] and 66 28 6.
The second vector is missing its brackets.

2014-08-02r158893
231TYPO

We’ll use Clojure’s reduce function to affect the transformation
“affect” should be “effect”

2014-08-13r159275
235TYPO

Asking for stories with more than 10 elements in whcih Yvette dies
“whcih” should be “which”

2014-08-02r158893
237SUGGEST

“miniKanren is more than a library. It’s simultaneously a new language and a new programming paradigm.”

Logic programming is a paradigm. miniKanren is certainly a fascinating implementation, but calling it a paradigm itself is a bit over the top.

2014-08-13r159275
167TYPO

Julia works in that the spirit
remove “the”

2014-08-03r158934
170TYPO

Dictionary literals use curly braces and=>, just like older version of Ruby.
“version” should be “versions”

2014-08-03r158934
172TYPO

Fetching keys and values from the dictionary is easy, as is testing for existence of a entry
“a entry” should be “an entry”

2014-08-05r159067
172ERROR

the_keys = keys(numbers)

ERROR: numbers not defined

2014-08-13r159274
175TYPO

A slice of single element still returns an array.
add “a” after “of”

2014-08-05r159067
176SUGGEST

“Julia is designed as a language for scientific and other numerical programming.”

This sounds like “scienctific” is more specific than “numerical”. I’d swap those two words.

2014-08-13r159274
177TYPO

Use a comma to give multiple indexes to an array.

For consistency with the rest of the book, “indexes” should be “indices”

2014-08-05r159067
178TYPO

and we didn’t even cover much of its built in library functions
“built in” should be “built-in”

2014-08-05r159067
34SUGGEST

change #include “lua.h” ff to #include PATH_TO_INSTALLATION/lua.h. Otherwise the compiler will load files from the current directory. There are versions (and versions and versions…) available on the internet, all of which give incomprehensible errors. There goes another day.

2014-09-13
35TYPO

Same problem with include. RtMidi.h is, usually, not in the same directory, so use PATH_TO_INSTALLATION/RtMidi.h (often /usr/local/include/RtMidi.h)

2014-09-13
35SUGGEST

tonumberx and a host of other functions are only available in the 5.2 edition of the lua library. Don’t install 5.1

2014-09-13
34SUGGEST

Somewhere in your CMakelist.txt the use of the library RtMidi is missing, which gives rise to all kinds of incomprehensible errors. I’ve tried adding it to the CXXFLAGS, but that didn’t work. Editing link.txt so that -lrtmidi is added to the link command works, but it seems ugly.

2014-09-14
33SUGGEST

ZynAddSubFX uses old style OSS audio, which is not supported in many Linux systems. It is possible to get audio from ZynAddSubFX using padsp (please add the footnote; I spent hours looking for it). In general, Day 3 of the LUA chapter invites a host of hardware and software problems having nothing to do with LUA. I’d suggest scrapping it.

2014-09-14
182SUGGEST

“Accessing fields on a value of a type is done with the . operator, just like other dynamic languages.”
I’d remove “dynamic”, it’s the same in Java, and Java isn’t dynamic.

2014-08-13r159274
183TYPO

This is a perhaps unexpected, but probably helps simplify type inference.
Remove “a”

2014-08-07r159118
186TYPO

concurrency and distributed computing is a necessity
“is” should be “are”

2014-08-07r159118
187TYPO

We can still run code even if the worker’s are busy crunching numbers.
“worker’s” should be “workers”

2014-08-07r159118
189TYPO

Along the way we’ll point out of a few more of Julia’s many charms.
Remove “of”

2014-08-07r159118
190TYPO

Now that you’ve seen some of Julia’s main features and put the language through it’s paces
“it’s” should be “its”

2014-08-07r159118
192TYPO

which is more powerful version of overloading
Add “a” after “is”

2014-08-07r159118
183TYPO

“Like any dyanmic language” -> dynamic

2014-08-07r159118
187TYPO

“julia> julia> function flip_coins(times)” -> one prompt too much

2014-08-07r159118
194TYPO

“The extra parantheses” -> parentheses

2014-08-07r159118
197TYPO

“To be more concrete, image a picture” -> imagine?

2014-08-13r159274
202TYPO

“Then, we multiple it element-wise” -> multiply

2014-08-07r159118
202TYPO

“Since the mask keeps only 6 out of the 64 coefficients, this almost 90% less data.” Something’s missing…

2014-08-07r159118
202TYPO

“graying expects pixels values” -> pixel

2014-08-07r159118
203TYPO

“We used lots of new tools to acommplish the task” -> accomplish

2014-08-07r159118
203TYPO

“Try a large block size on a image” -> an image

2014-08-07r159118
204TYPO

“JPEG does prediction of the first cooefficient” -> coefficient

2014-08-07r159118
204TYPO

“is not a an amalgamation of parts” -> not an amalgamation

2014-08-07r159118
205TYPO

“As Julia is new, it’s package library is pretty small.” -> its package library

2014-08-07r159118
185SUGGEST

I’m not sure I understand function `concat` correctly, but doesn’t something like `zeros = int(ceil(log10(b+1)))` make more sense than `zeros = int(round(log10(a))–1)`?

2014-08-13r159274
192TYPO

Use pmap to take a array of trial counts and produce the number of heads
found for each element.
“a array” should be “an array”

2014-08-08r159164
195TYPO

We now have all the pieces to write your own macros.
“your” should be “our”

2014-08-08r159164
196TYPO

Macros excel at removing boiler plate code
“boiler plate” should be “boilerplate”

2014-08-08r159164
197TYPO

This means that in the frequency domain, its easy to identify the important values.
“its” should be “it’s”

2014-08-08r159164
242TYPO

Boolean, Integer, Float, String and Char are primitive types that do about what you’d expect them to.
Missing Oxford comma after “String”

2014-08-08r159164
244TYPO

Type the following into a file called data_types.idr in the console:
Remove “in the console”

2014-08-10r159216
249TYPO

List, String and Integer are types that describe values [], “Hello”, and 6.
Something is missing, maybe “like” after “values”

2014-11-10
254TYPO

Maybe we’d get fancy and and create separate types for each of those.
Remove one occurrence of “and”

2014-08-10r159216
256ERROR

Write a function to transpose the matrix so that element m, n in the
argument is element m, n in the result
Swap m and n, it’s not transposition otherwise

2014-08-10r159216
260TYPO

Lua is putting its mark on everyday programming as a language for embedded systems and scripting because the language is compact, pure, adaptable and clean.
Missing Oxford comma before “and clean”

2014-08-10r159216
262TYPO

“The ecosystem, though it is young, already has a rich and robust ecosystem”
The ecosystem … has an ecosystem

2014-09-14
265TYPO

Y2K, the date problem that came with the turn of the century
“century” should be “millennium”, that’s what the K in Y2K refers to

2014-08-10r159216
265TYPO

Most existing languages will be too slow, too buggy and too complicated.
Missing Oxford comma before “and too complicated”

2014-08-10r159216
265TYPO

In 2010, Seven Languages in Seven Weeks [Tat10] focused on new wave of functional languages.
Add “a” before “new”

2014-08-10r159216
265TYPO

The next gen- eration, languages like Elixir, Julia and Elm, is more practical,
Missing Oxford comma before “and Elm”

2014-08-10r159216
266TYPO

For rapid adoption, languages depends on a large and active community
“depends” should be “depend”

2014-08-10r159216
266TYPO

It’s just much easy to do business with a smaller ecosystem
“easy” should be “easier”

2014-08-10r159216
252ERROR

The error presented for `add` is wrong. The one presented in the book is:
Can’t unify
Vect (m + n) a
with
Vect (plus n m) a
Specifically:
Can’t unify
with
plus m n
plus n m

where it should be:
Specifically:
Can’t unify
Vect (n + n) a
with
Vect (plus n m) a
Can’t unify
plus n n
with
plus n m

That is, the size of xs is n so m should not appear at all in the first part of the error message (since that is the size of ys which doesn’t appear anywhere in the second clause).

2014-09-17
243ERROR

As the module name in the current context is “Functions” the answer to:
“:t stringFunction” must show “Functions.stringFunction” rather than “Types.stringFunction”

2014-11-10
28ERROR

Below the function remove_first(array)
there is a statement which reads
"And now to run the program! Create a new file called punch.lua with the following line at the top

dofile(“scheduler.lua”)"

punch.lua is NOT a new file It was already created on Page 26.

2014-09-13
200ERROR

In the Julia Chapter on macros:

julia> @unless in(a, 1) begin
println(“a does not have 1”)
end
a does not have 1

The macro is wrong, it should start with:
@unless in(1, a)

a contains 1 so it should not print the wrong message
syntax is: in(item, collection) —> Bool

2014-11-10
124ERROR

The scene method does not compile, complaining that “id” cannot be found. The code works when changed to “identity” instead.

2014-11-10
135ERROR

In the ELM chapter, the spawnHead function will not compile because div cannot be found. Not sure what the backticks (`div`) even do, as I couldn’t find them anywhere in the chapter.

[1 of 1] Compiling LanguageHead ( languageHeads.elm )
Error on line 70, column 33 to 49:
Could not find variable ‘div’.

Additionally, when div is removed, the next error message is “Could not find variable ‘Text.height’.”, adding an “import Text” to the top fixes that problem. The next error after that is “Could not find variable ‘.’.” which I could not figure out. I am using elm v0.13. Also, elm-server does not exist (mentioned on page 139), it is now elm-reactor.

It seems ELM is currently a very fast moving language, while very interesting I had a significantly difficult time following this chapter due to these errors plus the author did not distinguish very well between which functions were builtin vs which functions we would write later.

2014-11-10
205TYPO

Chapter 5, Julia - Multidimensional arrays.
In note #1, missing “eye(M,N)” from at the end of the following sentence:

eye constructs the identity matrix. eye(N) makes an N×N matrix, creates an M×N matrix.

The sentence should read (I believe):
eye constructs the identity matrix. eye(N) makes an N×N matrix, eye(M,N) creates an M×N matrix.

2015-07-28This apparently got fixed before the book was published.
29ERROR

scheduler.lua has a bug where actions scheduled for later prevent actions scheduled for earlier to be run.

I believe this is because the `remove_first` function in the scheduler messes with the order of the `pending` table (it puts the last element in place of the first).
The `run` function then waits for the first element to be run. But that isn’t necessarily the earliest action that should be run.
I think it is not apparent with the code in the book because there’s only 2 actions.

I’ve modified punch.lua to make the bug apparent. It is available as a private gist here:
gist[dot]github[dot]com/vise890/d82b6abb98e637f79fa1

As a fix, I think you could just remove the call to `sort_by_time` in the `schedule` function`
and put it in the `run` function instead. The gist contains a copy of the code with the fix, it seems to work in my tests.

I hope this is helpful. If you need any further clarification, my email is vise890@gmail.com.

Otherwise, I am absolutely loving the book so far. Keep up the great work.

Cheers
Martino

2015-10-08
104ERROR

In the latest build of Elm 0.14 the term lift has been removed. It is now map.

2015-09-01
126TYPO

The 3rd paragraph reads:

[…] The third day will a little shorter […]

missing “be”:

[…] The third day will BE a little shorter […]

2015-10-07
94ERROR

import List (..)
is required to get this example to work:
> 1 :: 2 :: 3 :: []]
Otherwise get an error:is required to get this example to work:
> 1 :: 2 :: 3 :: []]
Otherwise get an error:
Could not find variable ‘::’.
Could not find variable ‘::’.

2015-09-01
179TYPO

In (2) near the end of the page it says
numbers = [:one => 1, :two => 2]
the_keys = keys(numbers)

But the result in (3)
collect(the_keys)
is ‘:c, :b, :a’

Either (2) must be ‘the_keys = keys(explicit)’ (and ‘numbers’ is not needed) or (3) returns ‘:two, :one’

2015-10-08We'll fix this in the next edition if/when there is one.
93ERROR

keyword ‘data’ was changed to ‘type’ in newer elm versions

2015-09-01
134ERROR

The third paragraph from the bottom begins “Elixir executed Rectangle.area/2, and then…”. I think the arity of the function should be 1, that is, Rectangle.area/1.

2015-10-08
135ERROR

The key identifying the book title in the modified map in the middle of the page should be “title” not “book”. That is, the map should read {title: book.title,… not{book: book.title,…

2015-10-08
176ERROR

The example of key handling in dictionary on that page defines:
the_keys = keys(numbers)

However, the following outputs of “collect(…)” and “a: in the_keys”
are inconsistent with the given example dictionary (“numbers”). They rather seem to belong to the dictionary (“explicit”) used in the previous examples on that page.

2015-10-08We'll fix this in the next edition if/when there is one.
103ERROR

Not only is “lift” no longer part of Elm, but “asText” results in “Cannot find variable `asText`” — this makes the whole chapter really difficult to follow through in the “try elm” system.

2015-09-01
129TYPO

The text has literal asterisks in “intelligent sugar”

Surely those words should just be italicized.

2015-10-07
96TYPO

Missing word:

You can explore more of [the] List functions …

2015-10-07
102SUGGEST

It would be helpful to explain the historical context and/or rationale for the function name “lift”.

2015-09-01
112ERROR

Inconsistent word usage:

This page says “… we can lift the gameState signal onto display.” Elsewhere (IIRC), the book speaks of lifting a function onto a signal.

2015-09-01
116SUGGEST

It might be helpful to point out the nice way that “all” works with currying in allHeadsSafe.

2015-10-07
117SUGGEST

The discussion of spawnHead is a bit skimpy for such a complex function.

2015-10-07
122TYPO

The keming of “Text” is very poor in “More about dealing with Text on …”

2015-10-07
125SUGGEST

Consider moving “Each new language …” to the start of the following paragraph.

2015-10-07
127SUGGEST

The phrase “C-style sigils” doesn’t seem very helpful. Wikipedia’s “Sigil (computer programming)” page doesn’t talk about C and none of my C references mention sigils. Did you mean Perl- or Ruby-style?

2015-10-08
132TYPO

“… ran the module, and …” should be “… ran the module and …”

2015-10-07
133SUGGEST

The sentence “Just for fun, …, and {w,h}.” is a bit hard to parse. I’d reword it.

2015-10-07
133SUGGEST

“… the first or second, it will …” would read better as
“… the first or second definition, Elixir will …”

2015-10-07
134TYPO

“… named functions and pipes, …” should be
“… named functions, and pipes, …”

2015-10-07
135SUGGEST

I’d change “This kind of deconstruction …” to
“This kind of destructuring …”

2015-10-07
136TYPO

In the second iex example, “in” is emboldened (and shouldn’t be).

2015-10-08
136SUGGEST

I might add a few more examples, eg: “is_list ‘string’”, “is_list [1, 2]”, and is_list {1, 2}".

2015-10-08
139SUGGEST

Why, exactly, is the Quicksort “ironically named”? Explain or remove.

2015-10-07
142TYPO

"… were all [performed] in the console.

2015-10-07
144TYPO

“… set of fields with the …” should be
“… set of fields and the …”

2015-10-07
144TYPO

“… to represent our video.” should be
“… to represent each video.”

2015-10-08
146TYPO

“… a customer decides to rent, return, or lose …” - Few customers “decide to lose” a video.

2015-10-07
147SUGGEST

I’d swap the order of the fire/2 and fire/3 definitions.

2015-10-08
147ERROR

“Since functional languages are immutable, …” should be
“Since data structures in functional languages are immutable, …”

2015-10-08
147SUGGEST

I’d change “in the console use quote:” to
“use quote in the console:”

2015-10-07
150SUGGEST

“That means … but that syntax is repetitive. Let’s fix that.” has too many
“that”s. Fix that…

2015-10-07
152ERROR

In the code block, shouldn’t &renting/1 be &returning/1 ?

2015-10-08
153TYPO

“… confirms macros run …” should be
“… confirms that macros run …”

2015-10-07
154TYPO

“… and try it out” should be “… and try it out.”

2015-10-07
160TYPO

There is an extra “…> end” line in the first iex example.

<bt: Actually, this is correct. One to close the function, and one to close the receive loop. >

2015-10-08
161TYPO

“Elixir provides tasks, which starts another process and waits until …”
should be
“Elixir provides tasks, which start another process and wait until …”

2015-10-07
161SUGGEST

The sentence “Elixir also provides … applications.” is long and convoluted. I’d break it up.

2015-10-07
161TYPO

“… our video store using …” should be
“… our video store, using …”

2015-10-07
162TYPO

“… is a behavior with some …” should be
“… is a behavior, with some …”

2015-10-07
165TYPO

“The children defines …” should be
“The children list defines …”.

2015-10-08
165TYPO

The word “in” (in the ERROR REPORT) is emboldened and should not be.

2015-10-08
168TYPO

“… not as mature, as some of …” should be
“… not as mature as some of …”.

2015-10-07
186TYPO

The code “type M<: …” should be emboldened.

2015-10-08We'll fix this in the next edition, if/when there is one.
103ERROR

For the benefit of later readers, what used to be `Text.asText` is now `Graphics.Element.show` and `lift` is now `Signal.map`, so a working example is

import Mouse
import Signal
import Graphics.Element

main = Signal.map Graphics.Element.show Mouse.position

2015-09-01
103ERROR

`Signal.count` has been removed. Here’s how to implement it yourself:

count : Signal a -> Signal Int
count asig = foldp (\\sig total -> total + 1) 0 asig

You need to import foldp from Signal for that to work, here’s the complete example:

import Mouse
import Signal exposing (map, foldp)
import Graphics.Element exposing (show)

count : Signal a -> Signal Int
count asig = foldp (\\sig total -> total + 1) 0 asig

main = map show (count Mouse.position)

2015-09-01
203ERROR

Julia changed the semantics of idct to return floats between 0 and 1. The “./ 255.0” should be removed or the code will produce all black images.

2015-10-08
95TYPO

I line 7 and 9 the ‘b’ is unexplained
In line 7 replace “b |” by “color : Color, ”
IN line 9 replace “b” by “Color”

2015-09-01
98TYPO

line 3 from the bottom change “y : number” to “y : number’”

2015-09-01
104ERROR

The text and example describing counting the left and right arrows from the previous version of the book is missing, so the paragraph starting “Now, we create one signal with foldp.” doesn’t make sense.

37TYPO

Bottom paragraph of the page, there is a reference to `luaL_doFile()`. I think it should be `luaL_dofile()`.

It is spelled correctly in the preceding code example.

2%TYPO

The Ghostbusters reference should exorcise poltergeists, not exercise them (that would defeat the purpose!).

174ERROR

New versions of Julia have deprecated the ruby hash syntax.
new syntax
Dict(“a” => 1, “b” => 2, “c” => 3)
Dict{String,Integer}(“a”=>1, “b” => 2)
so it should look like
```
typeof(Dict(:foo => 5))
```
or
```
typeof(Dict{Symbol, Int64}(:foo => 5))
```

27ERROR

lua/day3/b/play.cpp(3) should be
if (argc < 2) { return –1;}

the current code reads … (argc < 1) which is not correct as the function later references argv[1] which would result in undefined behavior if argc is 1

135ERROR

Setting up the map pattern match example as written gives an error:

iex(10)> book
%{author: %{first: “David”, last: “Thomas”}, title: “Programming Elixir”}
iex(11)> { author:{ last: “Thomas”}, book: title} = book

(MatchError) no match of right hand side value: %{author: %{first: “David”, last: “Thomas”}, title: “Programming Elixir”}

iex(11)>

Thank you.

Categories: