Monthly Curations: May 2019

Back to Neal Stephenson ….

I think the first Neal Stephenson book I read was Snow Crash, though it was some sort of partial online copy and I didn’t finish it all the way through. This was sometime in the late 90s. I liked it, didn’t fully get it, and I forgot it.

Then I read Anathem, and it blew me away, and I still think it’s my favorite. Not so much for what happens in the story itself (in fact, I’m forgetting the ending as I write this (and I’m not sure he does a good job of endings in general, hmm …)), but more about the world in it, all the wonderful details, and how they’re revealed.

Then I read Snow Crash again, and I loved it this time, and … this “linguistic superpower meta-meme” went into my mind and embedded itself there, one of possibly only three or four others like it (the meta-meme of psychohistory being another old, deep idea, but more on that some other time).

Then I read the Baroque trilogy, and was thrilled to bits. This was on my Kindle (new at the time to me, I’m talking about a decade ago from today), and created a side-passion of etymology for me (I’d been lost in the endless link-following of Wikipedia earlier, this was the same but for word-origins …). (Also, I don’t think I would’ve been able to read them in their paper forms, which I realized when I saw a copy of The System of the World (my favorite of the three, I think) in a bookshop and realized there was no way I was going to lug that around with me.)

Anyway, I was aware of him continuing to write but hadn’t really read any fiction in many years, and while a colleague had recommended Seveneves to me last year, it had languished on my wish-list … until this week, when I started reading it again (in e-book form, if you must know).

Not much of a spoiler alert to share the very first line of the book: The moon blew up without warning and for no apparent reason. So yes, a compelling reason to keep reading. And about 7% of the way through, I’m enjoying it (small observation though: this definitely belongs in the pre-2016-age-of-innocence era when it comes to describing human beings).

When I’m done I think I’ll revisit everything else he’s been up to lately (D.o.d.o and Reamde), which means I have several months of reading pipeline filled up …

Monthly recap (May 2019)

Cut-and-pasted paper square “quilt”
Cut-and-pasted paper square “quilt”

Major updates:

  • Some backyard spruce-up: bird feeders, and my first gardening experience, a pot of badly-planted yet hardy Marigold
  • New fun activity with Tara: “quilting on paper” (more on that later)

Minor updates:

  • Rose Market opened up nearby, so more kebabs, meat 😋
  • Trying to start a protein shake morning habit, without success yet
  • First steps on my new puzzle …
  • Visited the Mountain View A la Carte and Art and Seven Seas Park, Met up with Tara’s friends there …
  • Spent a day at the Children’s Discovery Museum
  • Hike to the Stanford Dish

Watched/read:

  • Started watching “Killing Eve” on Netflix
  • Finished listening to “The ascent of money” and started listening to “Homo Deus” on Audible

Interesting links: May 2019

Artist's rendition of prehistoric fungi http://www-news.uchicago.edu/releases/07/070423.fungus.shtml
Artist’s rendition of prehistoric fungi

“Hello World” in Ocaml

I was curious if Zig was as good as Nim about “minimalist hello-world” builds (yes, a ridiculous metric, but still …), and found that yes, it was quite similar, but was surprised to find that Ocaml did one better on them(!)

➜  ocaml-playground cat hello_world.ml

print_string "Hello World from Ocaml !!\n"

(Yes, that’s it, just one line)

➜  ocaml-playground ocamlc hello_world.ml -o hello_world

➜  ocaml-playground ./hello_world
Hello World from Ocaml !!

➜  ocaml-playground l hello_world
.rwxr-xr-x 18k agam 25 May  0:45 hello_world

Just 18K, under half of Nim and much lower than anything else on this list!

(This is with ocamlc version 4.06.1 on Debian 9.6)

“Hello World” in Zig

  • Creating
➜  zig-playground git:(master) ✗ cat src/main.zig
const std = @import("std");

pub fn main() !void {
    var stdout_file = try std.io.getStdOut();
    try stdout_file.write("Hello from Zigland!\n");
}
  • Running
➜  zig-playground git:(master) ✗ zig build run
Hello from Zigland!
  • Looking at builds:
➜  zig-playground git:(master) ✗ l zig-cache/o
drwxr-xr-x - agam 20 May 18:34 1FaU34FwI7Ct04pmfOlMacuOykIOisQtTn1t1Q3lrQOZcsEF0qxJW3vLauzHjpwm
drwxr-xr-x - agam 20 May 18:36 fyjPplfax8VTFYlidzFwMj_gV5Dw_T9T4PVTNBaOPnxDE5dq2XRo28L0b-87xi0l
drwxr-xr-x - agam 20 May 18:36 r-sdQS7ThLQpXn2OhOye0gD2RSuygbP_R6dWnLJZKjgjdWqQxTSCKB3dHKbWucMG
drwxr-xr-x - agam 21 May 23:21 XxkweE8uWyMc9LocxqJMMKAwTGgBzcn4q3bEKH1tL8Kx-F5Gk3kopgQqLbVLXVbh
  • Debug build size:
➜  zig-playground git:(master) ✗ l zig-cache/o/r-sdQS7ThLQpXn2OhOye0gD2RSuygbP_R6dWnLJZKjgjdWqQxTSCKB3dHKbWucMG/zig-playground
.rwxr-xr-x 406k agam 20 May 18:36 zig-cache/o/r-sdQS7ThLQpXn2OhOye0gD2RSuygbP_R6dWnLJZKjgjdWqQxTSCKB3dHKbWucMG/zig-playground
  • “Release build” size:

zig build -Drelease-small=true

➜  zig-playground git:(master) ✗ l zig-cache/o/XxkweE8uWyMc9LocxqJMMKAwTGgBzcn4q3bEKH1tL8Kx-F5Gk3kopgQqLbVLXVbh/zig-playground
.rwxr-xr-x 53k agam 21 May 23:21 zig-cache/o/XxkweE8uWyMc9LocxqJMMKAwTGgBzcn4q3bEKH1tL8Kx-F5Gk3kopgQqLbVLXVbh/zig-playground

So, 406k for the debug build, 53k for the release build, very similar to Nim here, and comparing very favorably indeed to Rust or Go (!)