100% found this document useful (1 vote)
22 views

Eloquent JavaScript 3rd Edition Marijn Haverbeke - The ebook is available for quick download, easy access to content

The document promotes the download of various editions of 'Eloquent JavaScript' and other JavaScript-related ebooks from ebookultra.com. It includes links to download the 3rd edition of 'Eloquent JavaScript' by Marijn Haverbeke, along with other titles for those interested in learning JavaScript. The document also provides details about the book's licensing and contributors.

Uploaded by

roscoclonan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
22 views

Eloquent JavaScript 3rd Edition Marijn Haverbeke - The ebook is available for quick download, easy access to content

The document promotes the download of various editions of 'Eloquent JavaScript' and other JavaScript-related ebooks from ebookultra.com. It includes links to download the 3rd edition of 'Eloquent JavaScript' by Marijn Haverbeke, along with other titles for those interested in learning JavaScript. The document also provides details about the book's licensing and contributors.

Uploaded by

roscoclonan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download the full version and explore a variety of ebooks

or textbooks at https://ebookultra.com

Eloquent JavaScript 3rd Edition Marijn Haverbeke

_____ Follow the link below to get your download now _____

https://ebookultra.com/download/eloquent-javascript-3rd-
edition-marijn-haverbeke/

Access ebookultra.com now to download high-quality


ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

Eloquent JavaScript A Modern Introduction to Programming


1st Edition Marijn Haverbeke

https://ebookultra.com/download/eloquent-javascript-a-modern-
introduction-to-programming-1st-edition-marijn-haverbeke/

Eloquent JavaScript A Modern Introduction to Programming


2nd Edition Marijn Haverbeke

https://ebookultra.com/download/eloquent-javascript-a-modern-
introduction-to-programming-2nd-edition-marijn-haverbeke/

Beginning JavaScript 3rd ed Edition Paul Wilton

https://ebookultra.com/download/beginning-javascript-3rd-ed-edition-
paul-wilton/

JavaScript a beginner s guide 3rd ed Edition Pollock

https://ebookultra.com/download/javascript-a-beginner-s-guide-3rd-ed-
edition-pollock/
JavaScript jQuery The Missing Manual 3rd Edition David
Sawyer Mcfarland

https://ebookultra.com/download/javascript-jquery-the-missing-
manual-3rd-edition-david-sawyer-mcfarland/

Professional JavaScript for Web Developers 3rd Edition


Nicholas C. Zakas

https://ebookultra.com/download/professional-javascript-for-web-
developers-3rd-edition-nicholas-c-zakas/

Special Edition Using Javascript Mcfedries

https://ebookultra.com/download/special-edition-using-javascript-
mcfedries/

Pro JavaScript with MooTools Learning Advanced JavaScript


Programming 1st Edition Mark Joseph Obcena (Auth.)

https://ebookultra.com/download/pro-javascript-with-mootools-learning-
advanced-javascript-programming-1st-edition-mark-joseph-obcena-auth/

JavaScript Creativity Exploring the Modern Capabilities of


JavaScript and HTML5 1st ed. Edition Hudson

https://ebookultra.com/download/javascript-creativity-exploring-the-
modern-capabilities-of-javascript-and-html5-1st-ed-edition-hudson/
Eloquent JavaScript 3rd Edition Marijn Haverbeke
Digital Instant Download
Author(s): Marijn Haverbeke
ISBN(s): 9781593279509, 1593279507
Edition: 3
File Details: PDF, 2.16 MB
Year: 2018
Language: english
Eloquent JavaScript
3rd edition

Marijn Haverbeke
Copyright © 2018 by Marijn Haverbeke

This work is licensed under a Creative Commons attribution-noncommercial


license (http://creativecommons.org/licenses/by-nc/3.0/). All code in the
book may also be considered licensed under an MIT license (https://eloquentjavascript.
net/code/LICENSE).
The illustrations are contributed by various artists: Cover and chapter illus-
trations by Madalina Tantareanu. Pixel art in Chapters 7 and 16 by Antonio
Perdomo Pastor. Regular expression diagrams in Chapter 9 generated with
regexper.com by Jeff Avallone. Village photograph in Chapter 11 by Fabrice
Creuzot. Game concept for Chapter 16 by Thomas Palef.
The third edition of Eloquent JavaScript was made possible by 325 financial
backers.

You can buy a print version of this book, with an extra bonus chapter included,
printed by No Starch Press at http://a-fwd.com/com=marijhaver-20&asin-
com=1593279507.

i
Contents
Introduction 1
On programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Why language matters . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
What is JavaScript? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Code, and what to do with it . . . . . . . . . . . . . . . . . . . . . . . 7
Overview of this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Typographic conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1 Values, Types, and Operators 10


Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Unary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Boolean values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Empty values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Automatic type conversion . . . . . . . . . . . . . . . . . . . . . . . . . 18
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2 Program Structure 22
Expressions and statements . . . . . . . . . . . . . . . . . . . . . . . . 22
Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Binding names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The console.log function . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Return values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Control flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Conditional execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
while and do loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Indenting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
for loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Breaking Out of a Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 33

ii
Updating bindings succinctly . . . . . . . . . . . . . . . . . . . . . . . 34
Dispatching on a value with switch . . . . . . . . . . . . . . . . . . . . 34
Capitalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3 Functions 39
Defining a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Bindings and scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Functions as values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Declaration notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Arrow functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The call stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Optional Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Growing functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Functions and side effects . . . . . . . . . . . . . . . . . . . . . . . . . 54
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4 Data Structures: Objects and Arrays 57


The weresquirrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Mutability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
The lycanthrope’s log . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Computing correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Array loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
The final analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Further arrayology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Strings and their properties . . . . . . . . . . . . . . . . . . . . . . . . 72
Rest parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
The Math object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Destructuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

iii
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

5 Higher-Order Functions 82
Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Abstracting repetition . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Higher-order functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Script data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Filtering arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Transforming with map . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Summarizing with reduce . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Composability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Strings and character codes . . . . . . . . . . . . . . . . . . . . . . . . 91
Recognizing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

6 The Secret Life of Objects 97


Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Class notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Overriding derived properties . . . . . . . . . . . . . . . . . . . . . . . 103
Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The iterator interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Getters, setters, and statics . . . . . . . . . . . . . . . . . . . . . . . . 110
Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
The instanceof operator . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7 Project: A Robot 117


Meadowfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
The task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Persistent data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
The mail truck’s route . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Pathfinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

iv
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

8 Bugs and Errors 128


Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Strict mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Error propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Cleaning up after exceptions . . . . . . . . . . . . . . . . . . . . . . . . 136
Selective catching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

9 Regular Expressions 143


Creating a regular expression . . . . . . . . . . . . . . . . . . . . . . . 143
Testing for matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Sets of characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Repeating parts of a pattern . . . . . . . . . . . . . . . . . . . . . . . . 146
Grouping subexpressions . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Matches and groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
The Date class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Word and string boundaries . . . . . . . . . . . . . . . . . . . . . . . . 150
Choice patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
The mechanics of matching . . . . . . . . . . . . . . . . . . . . . . . . 151
Backtracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
The replace method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Greed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Dynamically creating RegExp objects . . . . . . . . . . . . . . . . . . 157
The search method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The lastIndex property . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Parsing an INI file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
International characters . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

10 Modules 167
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

v
Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Improvised modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Evaluating data as code . . . . . . . . . . . . . . . . . . . . . . . . . . 170
CommonJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
ECMAScript modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Building and bundling . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Module design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

11 Asynchronous Programming 180


Asynchronicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Crow tech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Promises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Networks are hard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Collections of promises . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Network flooding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Message routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Async functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
The event loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Asynchronous bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

12 Project: A Programming Language 202


Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
The evaluator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Special forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
The environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Cheating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

13 JavaScript and the Browser 216


Networks and the Internet . . . . . . . . . . . . . . . . . . . . . . . . . 216
The Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

vi
HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
HTML and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
In the sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Compatibility and the browser wars . . . . . . . . . . . . . . . . . . . 222

14 The Document Object Model 224


Document structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
The standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Moving through the tree . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Finding elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Changing the document . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Creating nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Cascading styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Query selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Positioning and animating . . . . . . . . . . . . . . . . . . . . . . . . . 238
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

15 Handling Events 243


Event handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Events and DOM nodes . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Event objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Default actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Key events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Pointer events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Scroll events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Focus events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Load event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Events and the event loop . . . . . . . . . . . . . . . . . . . . . . . . . 255
Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Debouncing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

vii
16 Project: A Platform Game 261
The game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
The technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Reading a level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Encapsulation as a burden . . . . . . . . . . . . . . . . . . . . . . . . . 268
Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Motion and collision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Actor updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Tracking keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Running the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

17 Drawing on Canvas 284


SVG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
The canvas element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Lines and surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Drawing a pie chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Storing and clearing transformations . . . . . . . . . . . . . . . . . . . 297
Back to the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Choosing a graphics interface . . . . . . . . . . . . . . . . . . . . . . . 304
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

18 HTTP and Forms 308


The protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Browsers and HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Fetch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
HTTP sandboxing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Appreciating HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Security and HTTPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Form fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Disabled fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

viii
The form as a whole . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Text fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Checkboxes and radio buttons . . . . . . . . . . . . . . . . . . . . . . . 321
Select fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
File fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Storing data client-side . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

19 Project: A Pixel Art Editor 330


Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
The state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
DOM building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
The canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
The application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Drawing tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Saving and loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Undo history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Let’s draw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Why is this so hard? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

20 Node.js 350
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
The node command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Installing with NPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
The file system module . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
The HTTP module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
A file server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

21 Project: Skill-Sharing Website 369


Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Long polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
HTTP interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
The server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
The client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

ix
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

Exercise Hints 388


Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Data Structures: Objects and Arrays . . . . . . . . . . . . . . . . . . . 390
Higher-Order Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
The Secret Life of Objects . . . . . . . . . . . . . . . . . . . . . . . . . 393
Project: A Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Bugs and Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Asynchronous Programming . . . . . . . . . . . . . . . . . . . . . . . . 398
Project: A Programming Language . . . . . . . . . . . . . . . . . . . . 399
The Document Object Model . . . . . . . . . . . . . . . . . . . . . . . 400
Handling Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Project: A Platform Game . . . . . . . . . . . . . . . . . . . . . . . . . 402
Drawing on Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
HTTP and Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Project: A Pixel Art Editor . . . . . . . . . . . . . . . . . . . . . . . . 406
Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Project: Skill-Sharing Website . . . . . . . . . . . . . . . . . . . . . . . 409

x
“We think we are creating the system for our own purposes. We
believe we are making it in our own image... But the computer is
not really like us. It is a projection of a very slim part of ourselves:
that portion devoted to logic, order, rule, and clarity.”
—Ellen Ullman, Close to the Machine: Technophilia and its
Discontents

Introduction
This is a book about instructing computers. Computers are about as common
as screwdrivers today, but they are quite a bit more complex, and making them
do what you want them to do isn’t always easy.
If the task you have for your computer is a common, well-understood one,
such as showing you your email or acting like a calculator, you can open the
appropriate application and get to work. But for unique or open-ended tasks,
there probably is no application.
That is where programming may come in. Programming is the act of con-
structing a program—a set of precise instructions telling a computer what to do.
Because computers are dumb, pedantic beasts, programming is fundamentally
tedious and frustrating.
Fortunately, if you can get over that fact, and maybe even enjoy the rigor
of thinking in terms that dumb machines can deal with, programming can be
rewarding. It allows you to do things in seconds that would take forever by
hand. It is a way to make your computer tool do things that it couldn’t do
before. And it provides a wonderful exercise in abstract thinking.
Most programming is done with programming languages. A programming
language is an artificially constructed language used to instruct computers. It
is interesting that the most effective way we’ve found to communicate with a
computer borrows so heavily from the way we communicate with each other.
Like human languages, computer languages allow words and phrases to be
combined in new ways, making it possible to express ever new concepts.
At one point language-based interfaces, such as the BASIC and DOS prompts
of the 1980s and 1990s, were the main method of interacting with computers.
They have largely been replaced with visual interfaces, which are easier to learn
but offer less freedom. Computer languages are still there, if you know where
to look. One such language, JavaScript, is built into every modern web browser
and is thus available on almost every device.
This book will try to make you familiar enough with this language to do
useful and amusing things with it.

1
On programming
Besides explaining JavaScript, I will introduce the basic principles of program-
ming. Programming, it turns out, is hard. The fundamental rules are simple
and clear, but programs built on top of these rules tend to become complex
enough to introduce their own rules and complexity. You’re building your own
maze, in a way, and you might just get lost in it.
There will be times when reading this book feels terribly frustrating. If you
are new to programming, there will be a lot of new material to digest. Much of
this material will then be combined in ways that require you to make additional
connections.
It is up to you to make the necessary effort. When you are struggling to follow
the book, do not jump to any conclusions about your own capabilities. You are
fine—you just need to keep at it. Take a break, reread some material, and make
sure you read and understand the example programs and exercises. Learning is
hard work, but everything you learn is yours and will make subsequent learning
easier.

When action grows unprofitable, gather information; when infor-


mation grows unprofitable, sleep.
—Ursula K. Le Guin, The Left Hand of Darkness

A program is many things. It is a piece of text typed by a programmer,


it is the directing force that makes the computer do what it does, it is data
in the computer’s memory, yet it controls the actions performed on this same
memory. Analogies that try to compare programs to objects we are familiar
with tend to fall short. A superficially fitting one is that of a machine—lots of
separate parts tend to be involved, and to make the whole thing tick, we have
to consider the ways in which these parts interconnect and contribute to the
operation of the whole.
A computer is a physical machine that acts as a host for these immaterial
machines. Computers themselves can do only stupidly straightforward things.
The reason they are so useful is that they do these things at an incredibly
high speed. A program can ingeniously combine an enormous number of these
simple actions to do very complicated things.
A program is a building of thought. It is costless to build, it is weightless,
and it grows easily under our typing hands.
But without care, a program’s size and complexity will grow out of control,
confusing even the person who created it. Keeping programs under control is
the main problem of programming. When a program works, it is beautiful. The

2
art of programming is the skill of controlling complexity. The great program
is subdued—made simple in its complexity.
Some programmers believe that this complexity is best managed by using
only a small set of well-understood techniques in their programs. They have
composed strict rules (“best practices”) prescribing the form programs should
have and carefully stay within their safe little zone.
This is not only boring, it is ineffective. New problems often require new
solutions. The field of programming is young and still developing rapidly, and
it is varied enough to have room for wildly different approaches. There are
many terrible mistakes to make in program design, and you should go ahead
and make them so that you understand them. A sense of what a good program
looks like is developed in practice, not learned from a list of rules.

Why language matters


In the beginning, at the birth of computing, there were no programming lan-
guages. Programs looked something like this:
00110001 00000000 00000000
00110001 00000001 00000001
00110011 00000001 00000010
01010001 00001011 00000010
00100010 00000010 00001000
01000011 00000001 00000000
01000001 00000001 00000001
00010000 00000010 00000000
01100010 00000000 00000000

That is a program to add the numbers from 1 to 10 together and print out
the result: 1 + 2 + ... + 10 = 55. It could run on a simple, hypothetical
machine. To program early computers, it was necessary to set large arrays of
switches in the right position or punch holes in strips of cardboard and feed
them to the computer. You can probably imagine how tedious and error-prone
this procedure was. Even writing simple programs required much cleverness
and discipline. Complex ones were nearly inconceivable.
Of course, manually entering these arcane patterns of bits (the ones and
zeros) did give the programmer a profound sense of being a mighty wizard.
And that has to be worth something in terms of job satisfaction.
Each line of the previous program contains a single instruction. It could be
written in English like this:

3
Exploring the Variety of Random
Documents with Different Content
goblin should call next day, and make him laugh, or else die by slow
boiling. This the goblin heard with a mixture of scorn and
amusement, curling his nose and showing his teeth in an aristocratic
manner.
As the cunning Gigag left the king’s chamber to go to his quarters
in a corner of the great palace, he took good care to scatter about
two scientifically-prepared powders, one of which dissolved in the
air, producing sleep, and the other by a similar change entered the
nostrils, producing throughout the body tickling sensations and a
disposition to low chuckling. When Gigag again came before
Googloom, it was seen that none of the royal guards were fit for
duty, and that throughout the palace and its grounds the disposition
among courtiers, retainers, servants, pages, to laugh in their sleeves
at the smallest incitement, was unmistakable. Even the kitchen cats
had caught the infection, and mewed dispersedly.
“Now, O great Googloom!” said Gigag when all the court had
assembled, “let me in three acts essay to complete that
transformation by which thy people’s despair shall be turned to joy,
and thy laughing face shall behold its own merriment.” At this
moment the giant shook like one who is tickled all over, but cannot
laugh, experiencing the greatest tortures without knowing what to
make of them. To divert him the goblin related his favorite story of
the merry owl, with such catcalls, crowing, mincing, and mewing,
and withal such unearthly jest, that a thousand dogs would have
died if they did not laugh. What wonder, then, that long before the
witty Gigag had concluded a favorite page was so wrought upon by
chuckling that, bursting his buttons, at length he laughed right out,
which had such an effect upon all assembled that they chuckled, and
then roared. “Ho, guards!” cried Googloom; but Gigag easily drew
his attention to the second part of the programme—for the goblin
had actually brought the giant to the point of complacency. “I
propose now,” he said, “to show you the most ridiculous
countenance that was ever seen, except one.” Hereupon he
diminished and heightened his figure at intervals, while he curved
his nose by degrees, lengthened his teeth as he pleased, and put
upon his mouth such an expression of maddening humor that his
spectators gasped with laughing, to the vast confusion of the
helpless giant, who vowed with a feeble smile that the gifted Gigag
was certainly the most ingenious man he ever knew.
“Nothing will serve you, I perceive, O beautiful Googloom! except
the light of science; and now I will show you the face of the most
ridiculous man that ever was born.” Accordingly, by means of an
instrument which he had invented, Gigag reflected upon a large
canvas the features of Googloom! Unwittingly the giant smiled, for
he had never seen so preposterous a face before; and the more he
smiled, the more ridiculous it grew, till at last, after the giant himself
had given way to laughter, it was so horribly funny that the whole
court shrieked and shrieked again, and Googloom, losing all control,
roared with such a volume and power of merriment that he toppled
off his throne, and was crushed under its ruins. The people, seeing
the faces of the courtiers and of each other, caught an infectious
laughter, which prevailed throughout all Odom, and did not by any
means cease when the goblin Gigag was called to the throne, and
the reign of science began.

THE HAPPY ISLANDS.


“Tell me, brother, dearest brother,
Why it is thou aye dost weep?
Why thus, ever listless, sittest
Looking forth across the deep?

“Thy impatient steed is wond’ring


Why his master doth not come,
On his perch thy hawk is sleeping,
E’en thy hound’s deep voice is dumb.

“Yesternight there came a minstrel


With a glee-maid young and fair,
If mayhap their merry voices
Would beguile thy weary care.”

“Hawk may sleep, and hound may slumber,


My impatient steed must wait,
Nor care I to hear the minstrel
Who is resting at the gate.

“E’en the keen breeze of the mountains


Would not cool my fevered brow,
E’en the shrill note of the trumpet
Would not serve to rouse me now.

“Dost remember, that our father


Told us how his wond’ring eyes
Once beheld the Happy Islands
Far off on the ocean rise?

“Those fair Islands where no mortal,


As ’tis said, has ever been,
Though at evening in the westward
They at sunset oft are seen.

“Those blest Islands that so often


W d i t l’ th
Were our aged minstrel’s theme,
That surpass the fairest fancies
Of a poet’s wildest dream.

“Where the Holy Grail lies hidden


Far from mortal quest or claim,
And the Tree of Life stands, guarded
By the Seraph’s sword of flame:

“Where the Blessed Ones are dwelling


Till the dawning of the day
When this world and all upon it,
Like a dream, will pass away.

“And our sire sailed towards those Islands,


Till their shore he drew so near
That the strains of heavenly singing
Fell upon his raptured ear.

“And as that immortal music


O’er his ravished senses stole,
An intense and eager longing
Took possession of his soul.

“When, lo! as entranced he listened,


Suddenly the mists of night,
Gath’ring round the Happy Islands,
Hid them from his anxious sight.

“Then all through that weary midnight


Stayed he waiting for the dawn,
But when day broke, lo! the Islands
With the mists of night had gone.

“From that day thou know’st he languished,


And could take nor food nor rest,
For he aye was thinking, thinking
On those Islands of the Blest
On those Islands of the Blest.

“When he died, dost thou remember


We heard music from the sea,
That enchained us with the weirdness
Of its mystic melody?

“Scarce three days ago at sunset


I was sitting, thinking here,
When I saw those Happy Islands
In the west there, bright and clear.

“Words would fail to tell their beauty,


They were wrapt in golden haze,
And they glowed with such a radiance
That on them I scarce could gaze.

“And since that resplendent vision


On my raptured senses fell,
It has haunted and enthralled me
With the magic of its spell.

“I must go and seek those Islands


That far to the westward lie.
I hear distant voices calling,
I must find those isles or die.”

At the early dawn next morning


Young Sir Brian sailed away,
Mournfully his brother watchèd
On the shore the livelong day.

Long kept guard the weary watchers,


’Mid the tempest and the rain,
But ah! nevermore Sir Brian
To his home came back again.

It is said by some he perished


t s sa d by so e e pe s ed
In the wild and stormy wave,
Where the sea-birds wailed the requiem
O’er his mist-enshrouded grave.

If perchance he reached those Islands,


Be ye sure that he stayed there;
For what earthly joy or beauty
With those Islands can compare?

Where the sun is ever shining


And the blossom doth not fade,
Where from quest of mortal hidden
The most Holy Grail is laid.

Where with flaming swords the Seraphs


Stand around the Tree of Life,
Where the Blessed Ones are dwelling
Who have conquered in the strife.

Note.—This poem is founded on an ancient Irish legend, to the


effect that the Happy Islands, as they are called—that is, the
temporal resting-place of the blessed, where yet stands the Tree of
Life guarded by the cherubim—are situated in the ocean somewhere
to the far westward of Ireland.
It is said they are sometimes to be seen at sunset from the coast
o’ Galway.
Many have sought to find them, and some even have come near
them, but just as they were approaching, either the night fell or a
storm arose and drove them from the enchanted shores.

NEW PUBLICATIONS.
Les Droits de Dieu et les Idees Modernes. Par l’Abbé
François Chesnel, Vicaire-Général de Quimper.
Poitiers et Paris: Henri Oudin. 1875.
Every age has its special errors and its special manifestations of
the truth precisely opposite to those errors. The special errors of the
present age may be well summed up under one formula, which we
find on p. 335 of the Abbé Chesnel’s work bearing the title placed at
the head of this notice: “The pretended incompetence of God and
his representatives in the order of human things, whether scientific
or social.” The system which springs from this fundamental notion
has received the name of Liberalism. In contradiction to it, the
authority of God and the church over those matters which are
included in the order of human things, is the truth which in our day
has been the special object of inculcation, definition, explanation,
and defence on the part of the Catholic Church and her most
enlightened advocates. A great number of the very finest
productions of our contemporary Catholic writers in books,
pamphlets, and periodicals, treat of themes and topics connected
with this branch of the great controversy between Catholic truth and
universal error. The volume just published by the Abbé Chesnel is
particularly remarkable among these for simplicity, lucidity, and
moderation in its statements, and for its adaptation to the
understanding of the great mass of intelligent and educated readers,
who are unable to profit by any treatises presupposing a great
amount of knowledge and thought on abstruse matters. The form of
dialogue helps the author and the reader very much in respect to
the facility and simplicity of the work of giving and receiving
elementary instruction on the subjects contained within the volume.
The other topics besides the particular one we are about to mention
are handled very much in the same manner by M. Chesnel as by
other sound and able writers, and require no special remark. Thank
God! our instructed American Catholics are not inclined to bury
themselves in what the author happily styles “the fog of liberalism,”
in so far as this confuses the view of the rights of the church and the
Holy See in respect to the usurpations of the civil power and the
rebellions of private judgment. We have turned with a more
particular interest to that part of the volume which treats of the
nature, origin, acquisition, and loss of sovereign rights by the
possessors of political power in the state. This is one of the most
difficult topics in the department of ethics, and one seldom handled,
in our opinion, so well as by our author. To a certain extent sound
Catholic writers agree, and the principles maintained are proved with
ease to the satisfaction of right-minded students. That political
power is from God, that human rights are from God, that an
authority certainly legitimate cannot be resisted within its lawful
domain without sin, are so many first principles universally accepted
and easily proved. But when the sources and criteria of legitimacy
are in question, there is far less agreement even among those who
reject liberalism, and much less facility of laying down and proving
propositions in a satisfactory manner. The ingenious and learned Dr.
Laing, in his little book entitled Whence do Kings Derive the Right to
Rule? in our opinion sustains most extravagant theories regarding
the divine right of monarchs. On the other hand, we are not entirely
satisfied with the reasonings of the very able and brilliant Dublin
Reviewer on the principles of legitimacy. In fact, we have not seen
the subject handled in a perfectly thorough and satisfactory manner
by any author writing in the English language. M. Chesnel is not
exhaustive, but, so far as his scope in writing permits him to develop
his subject, he seems to us remarkably clear and judicious. The
beginning of sovereignty he traces to the parental expanding into
the patriarchal authority. Acquisition of lawful sovereignty he refers
to inheritance, election, and just conquest. The rehabilitation of a
sovereignty unjustly acquired he refers to the accession of the right
of a nation to the possession of the goods which have become
dependent on the peaceable maintenance of a de facto sovereignty,
sanctioned by a common consent. The possessor who has been
unjustly despoiled of his sovereignty de jure by one who has become
sovereign de facto evidently loses his right as soon as it is
transferred lawfully to this spoliator or his heirs in the manner
indicated. The author, as we think unnecessarily, resorts to the
supposition that he is supposed to cede it, because he cannot
reasonably maintain it. He adds, however, that if he does not cede it
he nevertheless loses it, which seems to us to make his cession or
non-cession wholly irrelevant and without effect. It is lost by the
prevalence of a higher right on the part of the nation. Nevertheless,
we think that until a permanent and stable union of the welfare of
the nation with the right of the new dynasty is effected, the former
sovereign right may in certain cases remain in abeyance, and
therefore revive again in the future. This appears to us to be
exemplified in the case of the rights of Don Carlos to the throne of
Spain, and of the Comte de Chambord to the throne of France.
Strictly, in themselves, their rights have been in abeyance, and
remain imperfect, until the national welfare, sustained by a sound
and powerful part of the body politic, demands their restitution and
actually effects the same. In such cases there is always more or less
doubt about the real sense of the better and sounder part of the
nation, and about the best settlement of conflicting claims for the
common good. And hence it is that the best men may differ, and
conscientiously espouse opposite sides, when a nation is in an
unsettled and divided state respecting its sovereignty.
In respect to the relation of the state to the church, the author
has some very just and sagacious remarks on the peculiar condition
of things in our own republic, quite in accordance with the views
which have been expressed by our soundest American Catholic
writers. We conclude our criticism by quoting a few passages:
“The religious system existing in the United States does not
resemble, either in its origin or in its applications, that which the
liberal sect imposes on the Catholic peoples of Europe. The American
population, the progeny of colonists driven from England by
persecution, never possessed religious unity. When Presbyterians,
Episcopalians, and Catholics, who had all fought in common for
independence, assembled in Congress and formed their constitution,
they recognized the variety of worships as an antecedent fact, and
endeavored to accommodate themselves to it in the best way they
could. No false political theory disturbed the good sense of these
legislators. Governed by a necessity manifestly invincible, and which
still continues, they secured to each worship a complete liberty;
proclaimed that which is a just consequence from this principle: that
the state should have only a very restricted agency—that is, no more
than what is necessary for reconciling the liberty of each one with
that of all others. In fact, when separated from the true church, the
state is reduced to pure naturalism, and in this condition the action
of the state, separated from the church, ought to be reduced to the
minimum” (p. 179).

Memoirs of General William T. Sherman. By Himself. New


York: D. Appleton & Co. 1875.
This book marks an epoch in the literary history of the war. Ten
years of reconstruction and of political spoil-gathering, of slow and
still incomplete recuperation at the South, and of reluctant, painful
subsidence to the moderate profits and the quiet of peace at the
North, had dulled the excitement attending the events of the war,
had corrected many prejudices, had taken off many of the prominent
actors of both sides of the contest, and had added to the literary
public many men and women who were children when Sherman
“marched to the sea.” And now comes one of the great conquerors
of the Rebellion, and tells almost every word that an honorable man
would dare to tell of all that he knows about the soldiers and the
generals, the fighting and the plotting, of the war, and with infinite
frankness—not stopping with facts, and dates, and figures, but
detailing his remembrance of conversations, frankly offering his
opinion of motives and his judgment of character, as well adverse as
favorable—as readily giving names of those deserving blame as of
those worthy of praise. No wonder, therefore, that these Memoirs
have set the whole country to thinking about the war, and all the
newspapers to discussing it. We have already had scores of
explanations and defences of those attacked, or of friends in their
behalf, and we are promised the Memoirs, Recollections, and
Narratives of many of the more prominent generals; so that we shall
shortly be supplied with testimony as to all the events of the late
war, given by the actors themselves or by eye-witnesses.
The first six chapters are occupied with General Sherman’s life
from the beginning of the Mexican war till the outbreak of the civil
war. They are intensely interesting. Many of those who afterwards
became leaders of great armies are introduced to the reader as
simple captains or lieutenants in the old army. Little incidents
illustrative of their characters are continually related, and the writer’s
own impressions, with his unflinching candor, continually offered,
every page glowing with good-humor and sparkling with entertaining
anecdotes. The domestic archives of more than one household of
Lancaster, Ohio, must have been well ransacked to get the letters
written home by the young artillery lieutenant, in order to secure
such exactness in date, and place, and conversation. One learns
from these chapters about all that was done in California during the
Mexican war, and who did it; graphic descriptions of many of the
natural wonders of that country, and a very interesting account of
the early gold excitement. Gen. Sherman was on the staff of Col.
Mason, commanding United States forces in California, when gold
was found in Sutter’s mill-race; was present when Sutter’s
messenger showed it to Col. Mason and asked for a patent to the
land; went to Sutter’s place, and saw the first miners at work there;
wrote (August 17, 1848) the official despatch of Col. Mason to the
Adjutant-General which gave the world the first authentic
information that gold could be had in California for the digging.
After peace was concluded with Mexico, the author of the Memoirs
returned to the States; but soon resigned his commission, went back
to California, and opened a banking office in San Francisco—a
branch of a well-known house in St. Louis. His statement of the
events of the year 1856 in San Francisco is most interesting,
throwing much light on the history of the famous Vigilance
Committee. He was Militia General at the time, and, in conjunction
with the Governor, treated with the leaders of the Committee, whom
he undertakes to convict of falsehood, positively asserting that, had
Gen. Wool given him the arms, he was prepared to fight the
Vigilantes with militia, and would have suppressed them. Hard times
induced him shortly after to wind up his banking business and return
to the States, and in the autumn of 1860, after trying and giving up
various undertakings, he had organized and was president of a
flourishing military school, under the patronage of the State of
Louisiana. When that State seceded, Sherman at once resigned and
went North, and when war broke out was commissioned colonel in
the regular army, rising gradually in rank till finally half the army and
country was subject to his command.
Now begins his story of the war. To the most timid civilian there is
an intense fascination in that war—a deep interest in every true
narrative of it. Gen. Sherman takes us through some of its most
exciting scenes, and so frankly and so familiarly that you feel as if
you were some invited stranger, sharing his mess, discussing his
plans, participating in his hopes and fears, and rejoicing with him in
his nearly uniform success. His first battle was Bull Run, in which he
commanded a brigade. Shortly after this he was transferred to the
West, where he remained until in the winter of 1864-5, when, having
fought and conquered his way from Chattanooga to Atlanta, then
through Georgia and South Carolina, he found himself in North
Carolina, in command of a large army, and upon the communications
of Richmond. The General’s narrative of these four years is intensely
interesting. Every description of battle or march is intelligible and
vivid, every statement of plans is clear. The battle of Shiloh is
wonderfully well described; so are the battles which were fought
around Atlanta. The same may be said of the storming of Fort
McAllister—one of the most gallant deeds of the war. Thousands of
ex-soldiers will fight their battles over again with this book—will lose
themselves in the great mass of the army—will struggle once more
against that sickening sensation which their sense of honor
overcame as the first bullet whistled by, the first pale, senseless form
was borne to the rear on the bloody stretcher—will tingle again in
every nerve at the first sight of the Southerners—will feel the sudden
thrill of the fearful excitement of the rush, or of the stubborn
defence, or the ecstasy of victory. Many a one will once more feel
the terrible fatigue of the march, the pangs of hunger and thirst, the
weariness of sleepless nights on picket, the tedious, painful weeks
spent in hospital. And every soldier will once more feel sad as he
reads of the places and scenes of the death of his comrades, and
will repeat for the thousandth time that it was always the best men
who were killed.
The charges of cruelty and barbarity made during and after the
war against Gen. Sherman are indignantly denied. The depopulation
of the town of Atlanta is justified in so far as the General clearly
shows the purity of his motives and can cite the approval of both the
civil and military authorities; yet the ugly fact remains that it was
done not for the instant safety of his army or the immediate injury of
the enemy’s, but thousands of women and children were driven
among strangers and their homes abandoned to the chances of a
civil war to secure a temporary convenience. As to the unauthorized
foraging of the troops generally, the General condemned and often
reproved and condemned it; though his correspondence shows a
secret satisfaction at the devastation committed in South Carolina,
except where it might result in permanent injury to private property.
His defence against Secretary Stanton’s charges of usurping civil
powers in treating with Gen. Jos. Johnston is simply complete. Gen.
Sherman here had the honor to be the first after the war to suffer
abuse and persecution because a kind heart and chivalrous
sympathy with a gallant and beaten foe roused the hatred and fear
of a class of politicians as malicious and vindictive as they were
ambitious.
The last chapter, “Military Lessons of the War,” is extremely
interesting, especially to military men. It contains some very
important conclusions; for example, that infantry must hereafter
fight in skirmishing order; that cavalry can no longer be used against
organized infantry; that every night’s camp in an enemy’s vicinity
should be covered by light works; and that good troops with the rifle
can beat off from trenches double their numbers. All this and nearly
all the other opinions advanced in this chapter had become truisms
to even the common soldier in our war, and the late Franco-German
war has made them such for the whole world. But Gen. Sherman’s
modesty has hindered him from showing that his own persistent
adherence to this new science not only gained him Atlanta, but left
him an intact and veteran army with which to crush through the
heart of the South; and that Gen. Grant’s neglect of it, and his
adopting the “hammering-away” method instead, not only did not
conquer Lee and take Richmond, but positively buried the old gallant
Army of the Potomac between the Rapidan and the Appomattox.
It is a great injustice to the Army of the Cumberland and its
General to say so glibly that at Chickamauga “Bragg had completely
driven Rosecrans’ army into Chattanooga”; it is notorious that at the
battle itself the key of the position was never given up, and that the
whole army offered battle defiantly at Rossville before retiring to
Chattanooga. Such a mistake as this throws discredit upon Gen.
Sherman’s statements of other events of which he was not an eye-
witness. It is also much to be regretted that in matters wholly
private he should not have reserved the names of persons whose
conduct was reprehensible. Thus it adds nothing to the interest of
his narrative to give the name of the officer of the ship whose
incorrect reckoning so inconvenienced the passengers on the
author’s first voyage to California; or to give the name of the lawyer
who swindled him out of the proceeds of a note given him to collect;
wife and children and friends should not be made to share public
disgrace for private acts of which they themselves are entirely
guiltless.

The First Christmas: A Mystery Play. By Albany James


Christie, S.J. London: Burns & Oates. 1875. (New
York: Sold by The Catholic Publication Society.)
We wish we could say that the contents of this small volume are
worth its elegant exterior.

A Politico-historical Essay on the Popes, as the Protectors


of Popular Liberty. By Rev. Henry A. Brann, D.D.
New York: D. & J. Sadlier & Co. 1875.
In spite of the confident assurance which every loyal Catholic has
that the rule of Rome, both temporal and spiritual, is not, never has
been, nor ever will be, a despotism, it cannot be denied that but few
are well acquainted with the facts of history which prove that the
Papal power has been the only interpreter, defender, and protector
of their rights which the people ever had, and that all the liberties
nations now enjoy are the result of the preaching and defence of the
doctrines which lie at the basis of all civilization by the popes,
bishops, and priests of the Catholic Church.
Just new the old howl against Rome is being renewed—the howl
of the wolves against the shepherd; and the sheep now and again
think it necessary to apologize to the wolves for the care their ever-
watchful guardian keeps over them, and also try to make them
understand that it is both convenient and necessary that he should
keep a dog and carry a crook. It is little wonder that the wolves bark
and snarl in reply to the apologies, and see no force in our argument
for either the dog or crook. But the sheep of the true fold, and also
the “other sheep” who are not yet of it, need, rather, plain,
straightforward instruction, which, by the grace of God, they will
receive to their profit. Such is the essay before us, which we heartily
welcome as most opportune, and, although far from being
exhaustive of the subject, is both pertinent and forcible. We
commend it as an excellent pamphlet to be freely distributed both
among Catholics and honest-minded American non-Catholics.

The Story of S. Stanislaus Kostka. Edited by Father


Coleridge, S.J. London: Burns & Oates. 1875.
(New York: Sold by The Catholic Publication
Society.)
This is the thirteenth volume of the admirable Quarterly Series
edited by the Jesuit fathers in London. The “Story” is a brief one, but
full of interest. We confess that S. Stanislaus has always seemed to
us more charming than even S. Aloysius. Both “angelic youths” are
among the greatest glories of the Catholic Church and the Society of
Jesus.
Father Coleridge tells us that the present work was at first
intended to be a simple translation from the Italian of Father Boero,
but that he has taken the pains to prepare an original narrative
instead. All who know his style will be grateful for the exchange. He
has also confined himself to a narration of facts, without digressing
into “religious and moral reflections.” We think this, too, makes the
volume more attractive, particularly to the young.

Biographical Readings. By Agnes M. Stewart. London:


Burns & Oates. 1875. (New York: Sold by The
Catholic Publication Society.)
It is somewhat aggravating to those familiar with the larger
biographical dictionaries to take up a compilation like this. One is
reminded of the poet who sent his MSS. to a learned editor to
prepare them for publication, and, after hearing the judgment
passed by the critic, insisted that he had thrown out the best pieces
and retained the only trash in the collection. The reader must try to
put himself in the place of the compiler who undertakes the invidious
task of determining who to speak of and what to say in a book of
the kind. Almost inevitably, each reader has to regret the absence of
some subjects by him deemed important. But, at least, the work will
serve as an introduction to more exhaustive ones, and Catholics
have an assurance in the editor that the stale assertions against
cherished names, lay or cleric, which have heretofore disfigured
most non-Catholic biographical sketches, will not be found here.

The Young Ladies’ Illustrated Reader. New York: The


Catholic Publication Society, 9 Warren St. 1875.
This is the last volume of the Young Catholic’s Illustrated Series of
Readers. We have read it with considerable care, and are of the
opinion that it is the best book of the kind in the English language.
The selections, which embrace a wide range of subjects, all bearing
more or less directly upon the mission and work of woman, have
been made with discernment and taste. The most important lessons
are here taught in the most agreeable style and in the pleasantest
manner. It is a treatise on the duties of Christian women without any
of the dulness of the moral essay.
We admire especially the biographical sketches of the foundresses
of religious orders which are scattered here and there through the
book. Whatever the vocation of a young girl may be, she will be all
the truer and nobler woman for having been taught to reverence
and love the religious life.
The perusal of the several Readers of the Young Catholic’s Series
has shown us, in a light in which we have never seen it before, the
great educational value of such books. We are not surprised at the
favorable manner in which these Readers have been received, nor
shall we be astonished to hear of their superseding all others in our
Catholic Schools.

Announcement.—In the October number of The Catholic World we


shall begin a new serial story, entitled Sir Thomas More: A Historical
Romance.

Books and Pamphlets Received.

From P. O’Shea, New York: Notes on the Rubrics of the


Roman Ritual. By the Rev. James O’Kane. 12mo,
pp. xiv., 471.
—Lives of the Saints, with a Practical Instruction on
the Life of each Saint. By Rev. F. X. Weninger,
D.D., S.J. Part III. 8vo, pp. 144.
—Recollections of the Last Four Popes and of Rome in
their Times. By His Eminence Cardinal Wiseman.
12mo, pp. 487.
From Appleton & Co., New York: John Dorrien. By Julia
Kavanagh. 12mo, pp. 500.
From the Officers: Proceedings of the General
Theological Library for the year ending April 26,
1875. 8vo, pp. 49.
From K. Tompkins, New York: “Righteousness”: The
Divinely-Appointed Rule of Life. By Philalethes.
Paper, 12mo, pp. 75.
From J. S. White & Co., Marshall, Mich.: Mass in C.
with Accompaniment for Piano or Organ. By Rev.
H. T. Driessen.
From George Willig & Co., Baltimore: Peters’
Celebrated Mass in D. Composed by W. C. Peters.
Pp. 32.
From D’Augutin Cote et Cie., Quebec: Annuaire de
l’Université Laval pour l’Année Académique 1875-
6. 8vo, pp. 97, xxviii.
From The Christian Brothers’ College, Memphis:
Address to the Graduates, June 25, 1875. By Hon.
Jacob Thompson. 12mo, pp. 8.
FOOTNOTES
[1] For particulars see Bulletin of the Catholic Union, Jan.,
1875, which contains an admirably-prepared statement of the
whole case.
[2] Italy! Italy!… Oh! that thou wert less fair or more powerful!
[3] “A slavish Italy! thou inn of grief!”—Cary’s Dante.
[4] Conf. of S. Aug., b. x. ch. vi.
[5] A Sister’s Story.
[6] “Love that denial takes from none beloved.”—Cary’s Dante,
Inferno, canto v.
[7] Alexandrine de la Ferronnays.
[8] Madame Swetchine.
[9] We have the eleventh edition of the English translation with
the title, The Lady’s Travels into Spain, 2 vols., London, 1808.
[10] See John Hay’s Castilian Days, p. 233.
[11] Psiquis y Cupido, two autos, refacciamento of the comedy
of Ni Amor se libra de Amor; El Pintor de su Deshonra, comedy of
same name; El Arbol del Mejor Fruto, La Sibila del Oriente; La
Vida es Sueño, comedy of same name; Andromeda y Perseo,
comedy of same name; El Jardin de Falernia, comedy of same
name; Los Encantos de la Culpa, el mayor Encanto Amor.
These, we believe, are all the autos which duplicate comedies.
[12] A Mass, followed by the Benediction of the Most Holy
Sacrament, is celebrated with this intention the first Saturday of
every month at nine o’clock, in the chapel of the Barnabite
Fathers at Paris, 64 Rue de Monceau. The reader will find at the
end of our second essay (Le Pape de Rome et les Popes de
l’Eglise Orthodoxe d’Orient. Paris: Plon) a notice upon the
“Association of prayers in honor of Mary Immaculate for the
return of the Greco-Russian Church to Catholic Unity,” with the
documents relating to it.
[13] “It is not for naught that the Russians have preserved
among the treasures of their faith the cultus of Mary; it is not for
naught that they invoke her, that they believe in her Immaculate
Conception, without, perhaps, knowing it, and that they celebrate
its festival.… Yes, Mary will be the bond which shall unite the two
churches, and which will make of all those who love her a people
of brethren, under the fraternity of the Vicar of Jesus Christ” (Ma
Conversion et ma Vocation, par le Père Schouvaloff, Barnabite, II.
part, §9, Paris, Douniol, 1859).
[14] She chose S. Rose of Lima for her patron, and took her
name at confirmation.
[15] The day of burial.
[16] See Louis XVII., sa Vie, sa Mort, son Agonie, par M. de
Beauchesne, published 1852.
[17] Materia quandoque est sub una forma, quandoque sub
alia, per se autem nunquam potest esse; quia, quum in ratione
sua non habeat aliquam formam, non potest esse in actu (quum
esse in actu non sit nisi a forma), sed solum in potentia; et ideo
quidquid est in actu non potest dici materia prima.—Opusc. De
Principiis Naturæ.
[18] Quia materia est potentia tantum, ideo est una numero,
non per unam formam quam habeat, sed per remotionem
omnium formarum distinguentium.—In 1 sent., dist. 2, q. 1, a. 1,
ad 3m.
[19] Forma accidentalis advenit subjecto jam præexistenti in
actu; forma autem substantialis non advenit subjecto jam
præexistenti in actu, sed existenti in potentia tantum, scilicet
materiæ primæ.—In Arist. De Anima, lib. 2, lect. 1.
[20] Hæc est vera natura materiæ, ut scilicet non habeat actu
aliquam formam, sed sit in potentia ad omnes.—In Arist. Metaph.,
1, lect. 12.
[21] Materia prima est potentia pura, sicut Deus est actus
purus.—Sum. Theol., p. 1, q. 115, a. 1, ad 2m.
[22] Ut enim ad statuam æs, vel ad lecticam lignum, vel ad
aliud quidpiam corum quæ formam habent, materia et quod
forma caret se habet priusquam formam acceperit, sic ipsa ad
substantiam se habet et ad id quod est hoc aliquid, atque ens.—
Physic., lib. 1.
[23] Materia prima est in omnibus corporibus.—Sum. Theol., p.
1, q. 8, a. 4.
[24] Oportet ponere etiam materiam primam creatam ab
universali causa entium, … sed non quod sit creata sine forma.—
Ibid., q. 44, a. 2.
[25] Quod autem materia prima remaneat actu post formam,
non est nisi secundum actum alterius formæ.—Contra Gent., lib.
2, c. 81.
[26] Id communiter materia prima nominatur, quod est in
genere substantiæ ut potentia quædam intellecta præter omnem
speciem et formam, et etiam præter privationem; quæ tamen est
susceptiva formarum et privationum.—De Spirit. Creaturis, art. 1.
We can hardly conceive how the matter thus abstracted from all
forms can be understood to remain “not under privations.” When
we conceive the matter without any form, we conceive it as
deprived of all forms. The thing is evident. Materia absque forma
intellecta cum privatione etiam intelligitur, says S. Thomas
himself, De Potentia, q. 4., a. 1.
[27] Terra autem ipsa quam feceras, informis materies erat,
quia invisibilis erat et incomposita … de qua terra invisibili et
incomposita, de qua informitate, de quo pene nihilo faceres hæc
omnia quibus iste mutabilis mundus constat.—Confess., lib. 12 c.
8.
[28] Augustinus accipit informitatem materiæ pro carentia
omnis formæ; et sic impossibile est dicere quod informitas
materiæ tempore præcesserit vel formationem ipsius vel
distinctionem. Et de formatione quidem manifestum est. Si enim
materia informis præcessit duratione, hæc erat jam in actu; hoc
enim creatio importat. Creationis enim terminus est ens actu;
ipsum autem quod est actus, est forma. Dicere igitur, materiam
præcedere sine forma, est dicere ens actu sine actu, quod
implicat contradictionem.—Sum. Theol., p. 1, q. 66, a. 1.
[29] Informe appellabam non quod careret forma, sed quod
talem haberet, ut, si appareret, insolitum et incongruum
aversaretur sensus meus, et conturbaretur infirmitas hominis.
Verum illud quod cogitabam, non privatione omnis formæ, sed
comparatione formosiorum erat informe: et suadebat vera ratio ut
omnis formæ qualescumque reliquias omnino detraherem, si
vellem prorsus informe cogitare; et non poteram. Citius enim non
esse censebam quod omni forma privaretur, quam cogitabam
quiddam inter formatum et nihil, nec formatum, nec nihil, informe
prope nihil. Et cessavit mens mea interrogare hinc spiritum meum
plenum imaginibus formatorum corporum et eas pro arbitrio
mutantem atque variantem; et intendi in ipsa corpora, eorumque
mutabilitatem altius inspexi, qua desinunt esse quod fuerant, et
incipiunt esse quod non erant; eorumdemque transitum de forma
in formam per informe quiddam fieri suspicatus sum, non per
omnino nihil; sed nosse cupiebam, non suspicari. Et si totum tibi
confiteatur vox et stilus meus, quidquid de ista quæstione
enodasti mihi, quis legentium capere durabit? Nec ideo tamen
cessabit cor meum dare tibi honorem et canticum laudis de iis
quæ dictare non sufficit. Mutabilitas enim rerum mutabilium ipsa
capax est formarum omnium in quas mutantur res mutabiles. Et
hæc quid est? Numquid animus? numquid corpus? numquid
species animi vel corporis? Si dici posset “Nihil aliquid,” et “Est
non est,” hoc eam dicerem; et tamen jam utcumque erat, ut
species caperet istas visibiles et compositas.—Confess., lib. 12, c.
6.
[30] Tu enim, Domine, fecisti mundum de materia informi,
quam fecisti de nulla re pene nullam rem.—Confess., lib. 12, c. 8.
[31] Licet essentia, qua res denominatur ens, non sit tantum
forma, nec tantum materia, tamen hujusmodi essentiæ sola
forma suo modo est causa.—De Ente et Essentia, c. 2.
[32] Etiam formæ non habent esse, sed composita habent esse
per eas—Sum. Theol., p. 1, q. 5, a. 4.
[33] Nec forma substantialis completam essentiam habet; quia
in definitione formæ substantialis oportet quod ponatur, id cujus
est forma.—De Ente et Essentia, c. 5.
[34] Creationis terminus est ens actu; ipsum autem quod est
actus est forma.—Sum. Theol., p. 1, q. 66, a. 1.
[35] This article is reprinted, with the author’s permission, from
advance sheets of a pamphlet published by Basil Montagu
Pickering, London.—Ed. C. W.
[36] S. Matthew xviii. 8.
[37] Thomas à Kempis, book iii. c. 3.
[38] Genesis xvii. 1.
[39] Psalm xlv. 11.
[40] Psalm xxxiii. 9.
[41] 1 Corinth. iii. 16.
[42] Philip. ii. 13.
[43] Psalm ciii. 30.
[44] January 15, 1872. This, and the subsequent quotations of
the words of Pius IX. are taken from Actes et Paroles de Pius IX.
Par Auguste Roussel. Paris: Palmé. 1874.
[45] Traite du S. Esprit, par Mgr. Gaume, 1864.
[46] January 22, 1871.
[47] De Maistre, Soirées de St. Petersburg, Xe Soirée.
[48] S. Matt. xvi. 18.
[49] 1 Timothy iii. 15.
[50] Psalm lxvi. 5.
[51] S. Paul’s Epistle to the Romans, xi. 23.
[52] Encyclical to the German bishops, 1854.
[53] January 24, 1872.
[54] History of the Conflict between Religion and Science. By
John W. Draper. New York: D. Appleton & Co. 1874.
[55] The metrical translations used in this article are
substantially those of Mr. D. F. MacCarthy, whose works have
been noticed before. We cannot refrain from again expressing our
admiration and wonder at the successful manner in which he has
overcome difficulties almost insuperable, and which no one can
appreciate until he has himself attempted to translate Spanish
asonantes into corresponding English verse.
[56] We have already spoken of Spanish asonante rhyme and
the difficulty of its translation into corresponding English verse.
For those who are unacquainted with Spanish prosody the
following explanation of what the asonante is may not be amiss.
Assonance consists simply in the similarity of the final, or last
two vowels in the line, e. g., luna, juzoa, culpas, gula, suma.
These all are considered to rhyme because they have the same
vowels, u-a; honor, sol, hoy, dió, cuatro, are examples of single
asonantes in o.
Dean Trench calls this the “ghost and shadow of a rhyme.” How
well Mr. MacCarthy has succeeded in reproducing it the reader
can see in the above extract. The asonantes in the original are u-
a, for which Mr. MacCarthy has substituted u-e.
[57] See Daniel, chap. v. 10, 11.
[58] Dico ergo primo: Materia prima ex se, et non intrinsece a
forma, habet suam entitatem actualem essentiæ, quamvis non
habeat illam nisi cum intrinseca habitudine ad formam.—Disp.
Metaph. 13, sect. 4, n. 9.
[59] Dico secundo: Materia prima etiam habet in se et per se
entitatem, seu actualitatem, existentiæ distinctam ab existentia
formæ, quamvis illam habeat dependenter a forma.—Ibid. n. 13.
[60] Subjectum secundum privationem.—Arist. 8. Metaph., n. 1.
[61] Si enim materia prima haberet aliquam formam propriam,
per eam esset aliquid actu; et sic, quum superinduceretur alia
forma, non simpliciter materia per eam esset, sed fieret hoc vel
illud ens; et sic esset generatio secundum quid, et non simpliciter.
Unde omnes ponentes primum subjectum esse aliquod corpus, ut
aërem et aquam, posuerunt generationem idem esse quod
alterationem.—In 8. Metaph., lect. 1.
[62] Cardinal Tolomei, who was not only a well-read man, but
also a peripatetic at heart, candidly confesses that the peripatetic
view of generation has never been substantiated. “Depend upon
it,” says he, “either no sound argument can be adduced in proof
of the peripatetic system, and we must, accordingly, simply
postulate it; or, if any proof can be adduced, it consists in the sole
argument from authority.” Crede mihi; vel solidi nihil afferri potest
pro systemate peripatetico adstruendo, adeoque simpliciter erit
postulandum; vel unico a nobis allecto argumento (auctoritatis)
satis est roboris ad ipsum confirmandum.—Phil. Mentis et
Sensuum, diss 8, phys. gen. concl. 2. And speaking of the
argument drawn from substantial changes, he declares it to be a
mere sophism: Est mera petitio principii, et æquivocatio inter
materiam primam ab omnibus philosophis admissam, et materiam
primam Aristotelicam.—Ibid. See Tongiorgi, Cosmol., lib. 1, c. 2,
n. 42 et seq.
[63] On the difference between substantial and essential forms,
see The Catholic World, November, 1873, p. 190.
[64] Summa Theol., p. 1, q. 76, a. 4.
[65] Vera corpora, quæ nimirum substantiæ sunt, et non
aggregata substantiarum, componuntur quoad essentiam ex
materia et forma substantiali.—Liberatore, Metaph. Special., p. 1,
n. 53.
[66] Hominis ergo compositio ex materia et forma substantiali
ostendit, esse in rebus naturalibus quoddam subjectum naturale
natura sua aptum ut informetur actu aliquo substantiali; ergo tale
subjectum imperfectum et incompletum est in genere substantiæ;
petit ergo esse semper sub aliquo actu substantiali.—Suarez,
Disp. Metaph. 15, sect. 1, n. 7.
[67] This reason is given by Suarez: “Homo constat forma
substantiali ut intrinseca causa.… Nam anima rationalis substantia
est et non accidens, ut patet, quia per se manet separata a
corpore, quum sit immortalis; est ergo per se subsistens et
independens a subjecto. Non ergo est accidens, sed substantia”—
Disp. Metaph. 15, sect. 1, n. 6.
[68] Hæc paritas est innumeris affecta disparitatibus, quantum
videlicet interest inter animam rationalem, spiritualem, per se
subsistentem, immortalem, et entitates quasdam corporeas,
corruptibiles, incompletas.—Loc. cit.
[69] See Tongiorgi, Cosmol., lib. i. c. 2, n. 35.
[70] The Catholic World, April, 1875.
[71] See The Catholic World, February, 1874, p. 584.
[72] See “Le Courrier Russe,” by M. J. Martinov, from which the
present article is in great part an abridged translation, Revue des
Questions Historiques for April, 1874.
[73] It was on the 19th of February, 1861, that the
Emancipation of the Serfs was proclaimed.
[74] Rousskaïa Istoria v jizneopisaniakh ïeïa glavneïchikh
predstavitelaei.
[75] The Væringer, or Varangians, were a people of
Scandinavian race who had settled in Neustria, which owes to
them its name of Normandy. Many of these warriors were invited
into Sclavonia by the Novogorodians to defend their northern
frontier against the incursions of the Finns; but some years later,
in 862, Rurik, their chief, took possession of Novogorod, assuming
the title of Grand Prince. Others of the same race established
themselves at Kiev, in the year 864.
[76] The Countess Boutourlin and her sister, the Countess
Virenzov.
[77] Drevniaïa russkaïa istoria do Mongolskago iga. Moscow:
1871.
[78] Amongst these may be named the Historic Papers of
Arseniev, those of Catherine II., and the Marquis de Chétardie,
French Ambassador at the court of Elizabeth, and in particular the
very interesting work on Learning and Literature in Russia under
Peter II.
[79] Prikhodsokoïe doukhovenstvo so vremeni reformy Petra I.
Kazan: 1873.
[80] See also The Russian Clergy. By Father Gagarin, S.J.
London: 1872.
[81] See p. 610.
[82] The Ruthenians, or Ruthenes, are a people of Sclavonic
race inhabiting the province of Servia. The Ruthenian or Servian
alphabet is also called “the Alphabet of S. Cyril.”
[83] Istoria vozsoïedineniïa zapadnorouskikh ouniatov starykh
vremen. Petersburg: 1873.
[84]

“E’en thus the Romans, when the year returns


Of Jubilee, with better speed to rid
The thronging multitudes, their means devise
For such as pass the bridge; that on one side
All front toward the castle, and approach
S. Peter’s fane, on the other towards the mount.”
—Cary’s Translation.

[85]
“Like a wight,
Who haply from Croatia wends to see
Our Veronica and the while ’tis shown,
Hangs over it with never-sated gaze,
And, all that he hath heard revolving, saith
Unto himself in thought: ‘And didst thou look
E’en thus, O Jesus, my true Lord and God?
And was this semblance thine?’”
—Cary’s Translation.

[86] The Greville Memoirs. A Journal of the Reigns of King


George IV. and King William IV. By Charles C. F. Greville, Clerk of
the Council to those Sovereigns. Edited by H. Reeve, Registrar of
the Privy Council. New York: Appleton & Co. 1875.
Mémoires du Duc de Saint-Simon sur le siècle de Louis XIV. et
la Régence. Paris: 1858.
[87] This notice is taken in part from the French of Henry
Hoisnard and other sources.
[88] “Preach the Word, be instant in season, out of season.”—2
Tim. iv. ii.
[89] “And the dragon was angry against the woman.”—Apoc.
xii. 17.
[90] The age of some of the “children” in this institution
actually runs up to twenty and even twenty-one.
[91] Possibly the superintendent, Mr. Israel C. Jones, and such
as he, have had much to do with bringing about this magnificent
result. Their course of treatment of the unfortunate children
committed to their care is sufficiently well known to many of our
readers. Here is a picture of Mr. Jones and his associate
reformers, painted by his own hand, and exhibited to the public
gaze in a court of justice. It occurred during the trial of Justus
Dunn, an inmate of the Institution for the Reformation of Juvenile
Delinquents, for the killing of Samuel Calvert, one of the keepers.
In his cross-examination Mr Jones testified respecting various
modes of punishment used in the institution. One was as follows:
“I know of Ward being tied up by the thumbs. (The witness
described this mode of punishment.) In the tailor’s shop there is
an iron column five inches in diameter; around the top of that
was placed a small cord, and another small cord was run through
it, and dropped down; the boys’ thumbs were put into the ends
and drawn up until the arms were extended, but their feet were
not moved.
“By Judge Bedford: How long were they kept in that position?
A. From three, perhaps to eight minutes. To Mr Howe: I tried the
effect upon myself; it was an idea that struck me to deal with
that particular class of boys. I think seven, not to exceed eight,
boys were punished in this way. I was present during the
punishment of one of the boys part of the time. I went out of the
room.
“By Judge Bedford: You do not know of your own knowledge
whether they were raised from the ground? A. Not of my own
knowledge.
“By Mr. Howe: You saw the boys put up by this small whip-
cord? A. Yes, sir.
“Q. And you would leave the room when they were spliced up?
A. Yes, sir; I stepped out of the room once or twice. I have seen
boys beaten with a rattan, but not so severely as to be able to
count the welts by the blood.”
There is much more of the same character, but the extract
given is enough to show the means adopted in this estimable
institution and by this eminently pious superintendent for the
reformation of juvenile delinquents. It is like reading again the
pages of another but an earlier Reformation.
[92] This answer was actually made not long ago to a Catholic
priest by a Protestant clergyman.
[93] How now!
[94] Light of the moon.
[95] Some codices have XXXV.
[96] During the residence of the popes at Avignon, and
afterwards until about the time of the Council of Trent, it was
usual to call cardinals by the name of their native places or of
their dioceses, as the Cardinal of Gaeta (Cajetan), the Cardinal of
Toledo. This was the case at first possibly because the cardinals
were not very familiar with their titles on the banks of the Tiber,
which many of them never saw, and may have been kept up
afterwards when the popes returned to Rome, in some degree by
that love of grand nomenclature which characterized the age of
the revival of letters. It requires sometimes no little search to
discover the real name of one who is called in history, for
instance, the Cardinal of S. Chrysogonus (Cardinalis Sancti
Chrysogoni) or the Cardinal of Pavia (Cardinalis Papiensis).
The present style has long been to call cardinals by their family
names; but if these be ancient or memorable ones, there is a
recognized form of Latinization not to be departed from. Thus, to
give an example, the late Cardinal Prince Altieri was in Latin
Cardinalis de Alteriis.
[97] Those who use the Roman Ordo in saying the Office will
have remarked how constantly the expression Mense decembri
occurs in the lessons of the earlier pope-saints as the season at
which they held one or more ordinations. These ordinations
thought worthy of being recorded were only those of cardinals.
[98] Cenni gives it as here from a precious Veronese MS.; but
Gratian, in the Decretum (dist. 79, can. 5), read filiorum; yet this
does not materially alter the text.
[99] Stand bravely.
[100]

Jesus, thou didst labor,


Aid us in our toil!

[101]

Jesus! thou art the Good Shepherd;


Thy flock, it is the sinner;
Guard it from the wolf infernal
And every kind of evil!

[102] Vie du Frère Philippe. Par M. Poujoulat. Tours: Mame et


Fils.
[103] Letter of March 17, 1766.
[104] Ibid., April 1, 1766.
[105] Ibid., April 17, 1766.
[106] Géométrie Pratique appliquée au dessin Linéaire.
[107] The article is as follows: “Primary instruction comprises
moral and religious teaching, reading, writing, the elements of
the French language, arithmetic, and the legal system of weights
and measures; to which may also be added arithmetic applied to
practical operations, the elements of history and geography, some
acquaintance with physical science and natural history applicable
to the requirements of life, elementary instruction in agriculture,
manufactures and hygiene, land-surveying, levelling, linear
drawing, singing, and gymnastics.”
[108] From the MS. Journey of the Lady Anne of Cleves, in the
State Paper Office.
[109] The first was Catherine of Aragon; the second Jane
Seymour; the third Anne of Cleves. Between the first and second
came Anne Boleyn, who was never his wife; and after the third
came two more queens, Catherine Howard and Catherine Parr,
neither of whom lays claim to the title of wife, as Anne outlived
him for many years.
[110] See Moreri and De Thou.
[111] State Papers.
[112] This essay, by the Rev. Henry Formby, published in
England in 1849, has been many years out of print. We lay it
before our readers with the kind permission of the author, being
assured that those who are interested in the subject of which it
treats will be glad to obtain an opportunity to peruse it.—Ed. C.
W.
[113] Mgr. Parisis, Bishop of Langres, speaks thus of its
importance: “Far, then, from thinking that, in occupying ourselves
with it, we derogate from the sanctity of our ministry, we consider
ourselves to be performing an imperious duty and to be providing
for an urgent necessity” (Instruction pastorale sur le Chant de
l’Eglise).
[114] The Roman chant exists in two principal collections: the
Gradual, which contains the Order of the Celebration of Mass
throughout the year; and the Antiphonale, which contains the
chant for the canonical hours. These usually form two large folio
volumes. Besides these there are smaller collections, the Rituale
and Processionale, Hymnarium, etc.
[115] Fundamental Philosophy, lib. iii. c. 11.
[116] De Divinis Perfectionibus, lib. ii, c. 2.
[117] Fundamental Philosophy, lib. iii. c. 12, n. 82.
[118] Ibid., n. 83.
[119] The Catholic World, January, 1875, p. 487.
[120] The Catholic World, August, 1874, p. 583.
[121] This objection is taken from Dmowski’s Cosmology, n. 34.
[122] The phrase “space is mensurable” is common, but it is
not strictly correct; for it is not absolute space, but only the
intervals or distances (which are relations in space) that are really
mensurable, as we shall see in our next article. Yet, as the phrase
was used in the objection, we kept it in our answer, on the
ground that, although absolute space is not formally mensurable
in itself, it is the reason of the mensurability of all intervals arising
from its extrinsic terminations.
[123] Ipsa enim immensitas divinæ substantiæ et sibi et
mundo sufficiens est spatium, et intervallum capax omnis naturæ
creabilis, tam corporalis, quam spiritualis. Sicut enim essentia
divina est primæva essentia, origo et fundamentum omnis
essentiæ et entis conceptibilis, ita immensitas divina est primum
et intimum intervallum, seu spatium, origo omnis intervalli, et
spatium omnium spatiorum, locus omnium locorum, sedes et
basis primordialis omnis loci et spatii.—Lessius, De Divinis
Perfectionibus, lib. ii., c. 2.
[124] Philos. Fundament., c. xvi. n. 113.
[125] Ibid., c. xvii. n. 119, 120.
[126] The Catholic World, January, 1875, p. 487.
[127] Childishness.
[128] The Chevalier Gaetano Moroni is a gentleman of the
bedchamber to the present Pope. His farraginous work in one
hundred and three volumes, is an inexhaustible source of
ecclesiastical erudition; but as Niebuhr said of Cancellieri’s
writings, these large octavos contain some things that are
important, many things that are useful, and everything that is
superfluous.
[129] Relazione della corte di Roma. The best edition is that
published at Rome in 1774, with notes by the learned Jesuit, F. A.
Zaccaria.
[130] This strange proceeding of the belted custodian of the
conclave is confirmed by a document which was issued by the
cardinals on the 8th of June—“In palatio discooperto episcopatus
Viterbiensis” (Macri, Hierolexicon).
[131] Our English distinction of Very, Right, and Most Reverend
is unknown in good Latin. Admodum Reverendus is barbarous
and repudiated by the stylus curiæ.
[132] Betrayed his uncle Paul IV., was tried by eight of his
peers and condemned to death.
[133] Abused the confidence of Benedict XIII.; condemned by
Clement XII. to a fine of two hundred thousand crowns, to loss of
all dignities, and ten years’ imprisonment.
[134] He purged himself and was reinstated in the cardinalate;
seems to have been more of a dupe than a rogue.
[135] Deprived of his dignity by Pius VI. on Sept. 21, 1791, for
taking the schismatical civil oath of the French clergy.
[136] After the battle of Gravelotte, the Christian Brothers
carried eight thousand wounded from that sanguinary field.
[137] See Les Frères des Ecoles chrétiennes pendant la Guerre
de 1870-71, par J. d’Arsac.
[138] See Vie du Frère Philippe, p. 296.
[139] “Forma erigendi seminarium clericorum:”—“Ut vero in
eadem disciplina ecclesiastica commodius instituantur, tonsura
statim atque habitu clericali semper utentur; grammatices, cantus
computi ecclesiastici, aliarumque bonarum artium disciplinam
discent,” etc.—Concilium Tridentinum: Sessio xxiii. de Reform, c.
18.
[In the letters of the Holy Father Pius IX. establishing the
Seminario Pio, he ordered that the students should be taught
Gregorian Chant, and no other. “Cantus Gregorianus, omni alio
rejecto, tradetur.”—Ed. C. W.]
[140] The approbation of the Missa Papæ Marcelli was based
upon the fact that the music most nearly approached in gravity to
the ecclesiastical song, not that it was better.
[141] It may not be unworthy of remark that the composers of
modern church music have uniformly thought a different style of
composition becoming, whenever occasion required the
introduction of a sham prayer into their operas; as may be seen
in Mozart’s chorus of Egyptian priests in the Zauberflöte, and
many other similar instances. To real prayer, and to the true
adorable sacrifice, it is the operatic effects that are exclusively
dedicated, as in Mozart’s No. XII. and Haydn’s No. II.
[142] The following anecdote is told in the Breviary lections of
S. Felix of Valois, founder of the Congregation of the Most Holy
Trinity for the Redemption of Captives (his day occurs the 20th of
November):
“S. Felix received a remarkable favor from the Blessed Virgin
Mother. All the brethren remaining asleep, and, by the disposition
of God, not rising for the celebration of Matins, which were to
have been recited at midnight on the Vigil of the Blessed Mother’s
Nativity, Felix awoke, as was his custom, and entering into the
choir before the time, found there the Blessed Virgin herself,
clothed in a habit marked with the cross of the order, and in
company with a number of angels habited in the same manner.
Felix, taking his place amongst them, sang through and finished
the entire Office, the Blessed Mother herself acting the part of
precentor.”—Breviarium Romanum.
This is but one specimen, among the many others which are to
be found in church history, of the light in which angels and saints
regard the chant of the Ritual.
[143] Mgr. Parisis continues: “My dear friends and brethren, we
have ourselves never precisely seen these sweet days of the
faith; but in our very early youth we seem to have caught, as it
were, their last twilight; we well remember that the sounds which
first caught our ear were the sweet melodies of the Liturgy, and
during that Reign of Terror when they were banished from the
churches, we bless God with all our heart on recollecting the
holiday evenings when we were rewarded by being allowed to
sing with the family the touching mysteries of the Divine Son of
Mary, at one time in the language of the Church, at another in the
well-known tongue of our religious ancestors.”
[144] It is a fashion to despise unison singing; yet the highest
authorities in the church have given it their decided preference.
The Pontiffs John XXII. and Benedict XIV. have recommended
unison singing to the whole church as the fittest; Abbot Gerbert
and Cardinal Bona recognize its superiority; Mgr. Parisis says, “We
speak here exclusively of unison singing, because it is this that
best suits the church.” Conceit and fashion may be and most
probably are at the bottom of such a feeling of contempt; and of
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like