The game HyperRogue is very interesting. Its main gimmick is that it’s played on a hyperbolic plane (surface with negative curvature) instead of an Euclidean plane (surface with zero curvature) like 99.99% of 2-D games are. Playing in this kind of geometry is compellingly mind-bending. Other than the geometry involved, the main way the game differs from typical roguelikes is that the player character doesn’t gain levels or skills in the course of play — instead, the game opens up new “lands” with new environmental challenges and/or monsters with new attributes as the player demonstrates their skill by meeting the unlock requirements for each land.
The game supports “achievements”, where whenever your gameplay meets the condition of some challenge (some very easy, some nightmarishly hard, most of medium difficulty), it records this in a log file. Of course, met achievements aren’t all that the log file contains, but it’s nice enough to start each “met achievement conditions” record with “ACHIEVEMENT
” and a marginally-descriptive achievement name, followed by other relevant information. Unfortunately, you can’t get a list of your fulfilled achievements merely by running grep '^ACHIEVEMENT ' hyperrogue.log
because the game logs when you fulfill an achievement’s conditions separately for every run, not just the first run to fulfill it. So, to extract the records of each achievement’s first fulfillment, we ignore any record with an achievement name we’ve seen before and print out the line otherwise (ie, if we haven’t seen it before), which is nigh-trivial in awk
[link]:
/^ACHIEVEMENT / {
if (!($2 in ach)) {
ach[$2] = 1;
print;
}
}
At 86 characters, it’s the fifth example from me of “twitcode” (programs under 140 bytes). And being in awk
, it’s the fifth language I’ve twitcoded as well.
Comments Off on twitcode #5: Extract HyperRogue achievements from log file
While I privately celebrate Independence Day, let me reminisce on a small, but odd, part of my recent trip to the mother country we independenced from. For a round-trip international flight, you’re questioned by security agents four times: by the TSA before leaving the country, by ICE upon your return, and by their equivalents in the foreign country upon arrival and departure there. The TSA screening was very routine, but the British immigration/customs officer had this weird thing where he’d repeat all my answers back with a really skeptical tone.
“Where are you going from here?”
“I’ll be staying here in London for the next five days.”
“You’re lodging in London?”
“Yes.”
“Why are you coming here?”
“Primarily to visit my family.”
“You’re visiting family, who live in London?”
“Yeah.”
“And when are you leaving?”
“I fly back home on July 1st.”
“You’re flying back to the US on the 1st of July?”
“Yep.”
“And how are you getting to London?”
“I bought a ticket for a National Express bus.” [The “Tube” was shut down due to a labor strike.]
“You’re taking a National Express bus to London?”
“Yup.”
[Dropping the skeptical act] “Very good, welcome to the UK.”
Maybe the idea is somebody fabricating their answers will feel a need to elaborate instead of simply confirming? Whatever. The odder bit was the trip back, where each security officer asked me a strange question.
“Where is your journey starting from?”
“Uh, what?”
“Where is your flight leaving?”
[Borrowing the tone of his countryman] “You want to know the airport my flight departs from?”
“Yes.”
“From this airport, London Heathrow.”
“Very good.”
And then, from ICE:
“What’s in London?”
“Uh, what?”
“You said you flew in from London, what’s there?”
“Well, there are a lot of things in London: Parliament, and a stretch of the River Thames, and several bridges over the river, and millions of people, one of whom is a first cousin, and his wife, and —” [at this point, the agent cuts me off, and I don’t even get a “very good”. I guess that’s a British thing.]
Comments Off on Wacky security questions
A while ago in “Rotating only one cubie”, I said there was “extra structure” to the Rubik’s Cube’s moves that preserves the sum-total of all corner cubie orientations, and of all edge cubie orientations, but didn’t preserve the sum-total of center cubie orientations. I didn’t get into that then, because it’s hard to describe, and why they’re preserved wasn’t the point of that post. But I did make a note to get to it later, as I wasn’t aware of any good explanations of it that I could link to, and it’s high time for that “later” to become “now”.
The dynamics of the corner and edge cubies are pretty different in this regard, which is probably expected by everybody who’s played around with the Rubik’s Cube that much — edge and corner cubies have very distinct characters in general. As is usual with the Rubik’s Cube, the corner cubies are easier to think about. (I think this is mostly because there are only 8 of them, while there are 12 edge cubies.) So, let’s do them first.
(more…)
A Mos-Ukr
A Sev S A Mos-Ukr
A Ukr Holds
A War S A Ukr
A Gal S A Ukr
A Rum S A Ukr
As long as I’m being silly here, note that Ukraine must not attack, as it’d lose the support necessary to hold off Moscow’s attack, and that even if Moscow convinced one of the regions supporting Ukraine to switch to supporting their attack, it’d still fail to overcome the Ukrainian defense.
Comments Off on The quick diplomatic solution
Brussels Times: Belgian scientific base in Antarctica engulfed by Covid-19 despite strict measures
• All personnel fully vaccinated? Check. ☑
• Frequent testing? Check. ☑
• Quarantined over the incubation period? Check. ☑
• Covid-19 outbreak anyway? Check. ☹
We can’t stop this.
Comments Off on Can’t stop the Omicron