I picked the book up thinking it would be a re-read from my teenage years, but I didn’t remember anything about it so I must have just thought I read it. I do remember seeing the movie around that time though, as the totally awesome film club in my hometown showed a Tarkovsky retrospective.
The novel and film have little in common, apart from the Zone, the fact that the Stalker has a “defective” daughter, and that the Zone contains something that grants wishes. In the novel, the Stalker Red is depicted as a tough man, skilled in the arts of getting objects out of the Zone and selling them for profit. In the movie, he’s a mystical guide. However, Tarkovsky’s scenography is absolutely spot on, depicting the Zone as an overgrown wilderness containing hidden dangers.
Of course, the concept of “the Zone” has taken on a new meaning after Chernobyl, but it’s interesting to see that Tarkovsky could find settings in the FSU long before that.
The Wikipedia entry for the novel mentions that it was censored at publication. It would be interesting to know that the censors found objectionable. The protagonists are depicted as thieves and profiteers, but they’re also supposed to be Canadian. Maybe the problem was that the antagonists were among the authority figures?
 The SF shelf at the local library had quite a lot of Strugatsky and Lem, maybe because they felt that most SF was too “American”.
Reading Gibson is always a treat. Nice to see him still firing on all cylinders.
Easily McDonald’s most bloody book, even if the themes of corporate warfare and melange of cultures can be traced all the way back to Desolation Road.
I love everything this dude writes so I highly recommend this.
Project website: Advent of Code.
I started on these puzzles on 7 Dec 2015. So far I’ve completed all of them, all but a few on the same day they were posted.
I use Perl for all the solutions.
Most assume the input data is in a file called
input.txt in the same directory as the file. Some require extra
modules from CPAN.
A note on scoring
I score my problems to mark where I’ve finished a solution myself or given up and looked for hints. A score of 2 means I solved both the daily problems myself, a score of 1 means I looked up a hint for one of the problems, and a zero score means I didn’t solve any of the problems myself.
Final score: 43 / 50.
- Day 1 — Not Quite Lisp - my solution. Score: 2.
- Day 2 — I Was Told There Would Be No Math - my solution. Score: 2.
- Day 3 — Perfectly Spherical Houses in a Vacuum - part 1, part 2. Score: 2.
- Day 4 — The Ideal Stocking Stuffer - my solution. Score: 2.
I had to get help with part 2 here, found a regexp in the daily solutions thread for this day.
Day 6 — Probably a Fire Hazard
These could definitely be faster, both run in around 30s.
Day 7 — Some Assembly Required
Had to scrounge around for tips on how to solve this. I had the basic idea down but the problem was keeping track of the solutions as I iterated around.
Day 8 — Matchsticks
Easily the most boring of the problems so far.
Day 9 — All in a Single Night
Essentially the travelling salesman
but the number of destinations is small enough to brute-force
easily. Uses the
module. Output is a list of permutations with the total travelling
distance prepended, so just use
sort -n to find the answer from the
Day 10 — Elves Look, Elves Say
Another computationally expensive problem but even part 2 runs in under 1 minute for me.
Submitted 3h25m after puzzle release.
Day 11 — Corporate Policy.
So far my favorite problem!
Submitted 5h56m after puzzle release.
Day 12 — JSAbacusFramework.io.
Another good puzzle. Uses the JSON module.
Both solutions in one file, just comment one line to get part 1.
Submitted 9h25m after puzzle release (I blame family commitments on weekends!).
Day 13 — Knights of the Dinner Table.
This is a modified day 9 with bidirectionally. Even part 2 which adds another element to the permutation finishes very quickly using brute force.
Submitted 5h03m after puzzle release.
Day 14 — Reindeer Olympics.
A troll! The immediate brute force approach is to simply advance time 1s at a time and check the “position” of each deer at that time. But this is “obviously” dumb so I used a quicker approach for part 1. Part 2 made me regret it…
Submitted for 2 stars 4h04m after puzzle release.
Day 15 — Science for Hungry People.
A combination of outside factors and frustration at getting my indexes right made this a tedious slog.
Submitted for 2 stars 9h45m after puzzle release.
Day 16 — Aunt Sue.
A fun one. Submitted for 2 stars after 2h37m.
Day 17 — No Such Thing as Too Much
Tried a recursive approach first, but got stuck for the part 2 and looked in the daily thread for inspiration. Figured out how to use combinations by looking at other’s code.
Submitted for 2 stars after 6h18m.
Day 18 — Like a GIF For Your Yard
Conway’s Game of Life! I’ve never coded this before so it was a fun exercise.
I tried using arrayrefs first but got tripped up by the deep copy (
dclone i n the code) and decided to go for a hash of hashes instead. I think this contributes to the slow execution time of ~15s.
Submitted for 2 stars after 6h00m.
Day 19 (Saturday) — Medicine for Rudolph
A tough one! I solved part 1 no problems but had to hunt around for hints for part 2.
Day 20 (Sunday) — Infinite Elves and Infinite Houses
Lack of time and impatience led me to look for hints for this. I had
the right initial idea but thought looking for divisors of an integer
PARI package would be too slow, and I have yet to find a
way to install that on the machine I’m using.
In the end it didn’t matter but I wanted this done.
Full credits in source.
Day 21 — RPG Simulator 20XX
I went for a straightforward solution of generating all combos of items and then running a simulated battle with each.
Day 22 — Wizard Simulator 20XX
Not a very good solution, relies on brute force to simulate all possible spell casts and then prints out a win or loss. Note that I had to run it for 5M iterations to get the answer to part 2. This is the only problem I didn’t finish in the same day as it was released (apart from the 7 first ones).
Day 23 — Opening the Turing Lock
Straightforward apart from the slightly ambigious
jio instruction —
read carefully what it means.
Day 24 (Christmas eve) — It Hangs in the Balance
I tried to finesse the answer by hand first but it didn’t simply work to manualy adjust the packages to get desired answer. Instead I checked valid combinations, but with the following assumptions/optimizations:
- I sorted the packages in descending order to check those combinations first.
- I assumed the answer wouldn’t contain more than 6 elements, so just checked combinations up to that value of
- I didn’t bother to confirm the remaining packages would sum correctly.
Runs in about 2s.
Day 25 (Christmas day) — Let It Snow
Straightforward iterative solution. Runs in over half a minute, those with CS backgrounds used modular exponentiation and got much faster results.
Continuing in the tradition of his earlier YA novel Ship Breaker, Bacigalupi transposes the harsh reality of today’s refugees from climate change to a future United States. It’s sobering to realize the horrors in this novel are likely happening right now to people in places where no journalists bother to report from.
Rising temperatures has devastated the US South and West. States have de-facto seceded, closing their borders to refugees from Texas and Arizona. Phoenix is #downthetubes as states with more senior rights to water are ruthlessly enforcing their claims, sending “water knives” to destroy dams and water treatment plants, forcing entire cities to try to move elsewhere for the very basics of life.
In his previous novel The Windup Girl the scenario was life after peak oil. While great, that novel took a leap from our world to the future without really explaining how things got so bad. The scenario in this book is more terrifying - me may never run out of oil but we may run out of potable water.
I was bored one night so I’d thought I’d check just how flare-y my 70s era 35mm ƒ/1.4 Nikkor is for point light sources.
So it’s off to Slussen where I captured the rain-soaked ambiance of the Big City.
(All images below link to full-size JPGs.)
As expected, the 35 wide open has coma galore:
But stop it down to ƒ/2, and it cleans up nicely.
Compare with a much more modern lens, the Cosina-Voigtländer Ultron 40mm ƒ/2. This is a lens with at least one aspheric element, modern coatings, but also built with constraints in mind (compactness):
Here are both lenses at ƒ/5.6:
It’s clear Nikon designed the 35 as a general-purpose PJ lens, where you used it wide open at night when you really had to. It’s remarkably compact with a 52mm filter size and doesn’t really give anything up stopped down.
The images are basically straight out of camera. The warm cast in the 35mm images are from the yellowing of its radioactive thorium lens element.
Focus was on the construction sign by the stop sign in the middle of the image.
Exposure was 1/60 @ ƒ/1.4 and ISO 400 (EV 9).
Competent near-future military SF. First book in a trilogy.