I was slightly shocked when a Common Lisper first pointed out to me that macros are syntactic. For example, threading macros aren't limited to function composition.
(->> "UTC"
(current-time-string (current-time))
(lambda ()))
This elisp is building a closure!
miniblog.
Related Posts
I'm slightly surprised that Rust has implemented the Default trait for booleans: https://doc.rust-lang.org/src/core/default.rs.html#205
The default is false, but it feels very arbitrary. Maybe it makes more sense next to integers, where the default value is 0.
Today I learnt about the NonNull<T> type in Rust: https://doc.rust-lang.org/nightly/core/ptr/struct.NonNull.html
It's a *mut T that is never null. Rust is trusting you even more than a normal *mut T, which is slightly daunting.
Difftastic is effectively computing the "tree edit distance" between two ASTs, and there's a bunch of papers on this topic. Literature review is hard though: sometimes a paper takes a while to digest, only to realise that they're solving a slightly different problem.