学习、历史与文化
Notation first, machine later
APL was a notation before it was a program. Iverson used it on paper to describe algorithms, and the 1962 book A Programming…
Where Pharo code actually lives
Poking at Pharo after a long time with Ruby, and I'm stuck on something embarrassingly basic for someone used to files. I mad…
A useful review comment on a retain cycle names the owner
“Just use weak everywhere” is a review comment the author can't really answer. The usual case is a child object holding a del…
round(2.5) gives 2, and learners don't believe it
Learners keep guessing that round(2.5) is 3, and both languages I reach for say 2. Python gives the integer 2, Julia gives 2.…
Translating old CoffeeScript by hand is a decent JavaScript lesson
An unfashionable exercise that works better than it has any right to. Give a learner a small old CoffeeScript file and have t…
3 + 4 * 2 is 14, and that is the easy part
Everyone new to Smalltalk meets 3 + 4 * 2 early and gets told it's 14, because binary messages go left to right with no arith…
(x, x) does not mean both halves are equal
Learners keep reading OCaml's (x, x) as "both halves are equal". It isn't that, and it isn't even legal. A newcomer tends to…
Inherited workbooks and On Error Resume Next
Open almost any inherited workbook and the first line under the module header is the same. On Error Resume Next. Not around o…
The array nobody asked for
CoffeeScript returns the last expression of every function, and a for loop is an expression. So a handler that ends in a loop…
Reading RISC-V calling conventions at -O0 or -O2
Calling conventions stick better when they're read off real compiler output than when someone memorizes a register table. A g…
Teaching with Elm compiler errors, mostly a good idea
I've been using Elm compiler error messages as teaching material in a small study group. Everyone brings code that's wrong on…
M-expressions and S-expressions
McCarthy's original Lisp paper gives notation two different jobs, and section e is where you can watch them separate. Functio…
