miniblog.

Lisp is the only language I've seen where it's idiomatic to have some locals scoped to the *middle* of a function. It's a consequence of let blocks. It's neat, but I rarely miss it elsewhere. I'm happy with "scoped from here to the end of the block" in e.g. C or Rust.
Using Miri, the Rust interpreter, as a profiler to find bottlenecks: https://medium.com/source-and-buggy/data-driven-performance-optimization-with-rust-and-miri-70cb6dde0d35
On the challenge of measuring spam prevalence externally, because historical data tends to be cleaner:
I've released difftastic 0.39! In this release: * Erlang support! * Added `--check-only` and `--exit-code`, making difftastic useful in shell scripts * Fixed some nasty display and file detection bugs
Photo
One nice property of key-value punning is how it reduces the risk of accidental reordering. Point { x, y, z } is less verbose than Point { x: x, y: y, z: z } and less error-prone than Point(x, y, z).
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.
Effects and code as a database in Unison: https://jaredforsyth.com/posts/whats-cool-about-unison/ Unison is looking at changing their program representation to plain sqlite!
I'm adding Erlang support for difftastic! The basic diffing works, but I'm still tweaking syntax highlighting. The grammar distinguishes between "strings" and 'atoms', but I'm not sure if I should highlight both the same way.
Photo
Lisp and Erlang are the only languages I've seen where a comment can start with a single character, but it's very common to use two (;; or %% respectively)
Thoughtful article on the long term consequences of AI generated art, copyright, the art industry and historical innovations (e.g. the invention of the camera):
Rust's editions make it much easier to change syntax over changing APIs. This is probably true in other languages too. It's a really compelling argument for keeping your stdlib small when your language reaches 1.0.
"It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures." — Alan Perlis I'm still not sure I agree with this: explicit data types are often nice. Following this maxim leads to pervasive lists or hash maps.
Apple is going to significantly open up iPhones, including allowing third party app stores!
The TypeScript docs have IDE-like hover types on all the examples, which is really impressive. I also like how the second example always shows the type of the relevant part, regardless of mouse position. It's clear and mobile friendly. Screenshot from https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types
PhotoPhoto
Do you prefer longer, readable keywords (e.g. function, export, foreach) or keyword that are shorter and faster to type (e.g. fun, pub, for)? Why?
Showing 541-555 of 7,549 posts