Lacking Natural Simplicity

Random musings on books, code, and tabletop games.

(Relatively) Recent Viewing: Iron Man

I saw Iron Man a while back, before I saw Batman: the Dark Knight. I actually read Iron Man decades ago as a preteen and teen, but can't claim any more than a casual acquaintance. In any case, I ended up liking the movie. It didn't make some of the mistakes I thought it might. I'm looking forwarad to the sequel.

I don't see many movies in the theatres any more. I ought to keep better track of which ones I've seen.

Actual Play: T.A.'s Savage Worlds Game, part 2

This was the second, and concluding, session in T.A.'s Savage Worlds game. L.B. was in from Kentucky and B.B. and D.B. were down from Morgantown, so along with T.A., E.A., and M.A. we had a full table. Moreover, M.B., who is B.B. and D.B.'s much younger brother, also wanted to play. He's a bit too young to understand how the game works, though, so it was a bit frustrating for him and the others. We worked through it and it turned out ok.

T.A. GMed. E.A. played Eureka, the healer. L.B. played Alisia, an archer. D.B. played Surt, the combat mage. I played Loki, the sneaky guy, sharing him with M.B.. M.A. played Ragnar, the wizard. and B.B. played Fritz, an archer.

We decided we had gone back to town after the previous session and picked up a couple of friends. We easily finished off the rest of the goblin clan, picking up a couple more invented-on-the-spot magic items. We continued to have it in for the dire wolves, and Ragnar exploded a couple of them with his magic. The villagers were glad to be freed from the goblin raiding and gladly paid us as they had promised.

Batman: The Dark Knight

I liked the movie a lot. I'd rate it at 4 stars, possibly higher. I was never bored during the movie, and it didn't feel too long to me. I thought the violence was appropriate for the Joker. There were too many false endings.

There were two particular things about the movie that I didn't like.

First, and of less importantance, I don't think there was enough development of Harvey Dent's psyche to make his actions at the end believable. For me to believe that, I think the viewer (though not Gotham's populace, obviously) has to be made aware that Dent has some serious psychological problems which in the end cause him to crack and become seriously insane. I think the coin-flipping in the first part of the movie is not enough, because the coin-toss is fixed. I don't see enough of his pysche to see how he goes from the completely non-random fixed coin to actually letting the now blackened coin randomly decide the fate of innocent children. Mobsters, yes; innocent children who could not possibly be to blame, no. At first I wasn't convinced that his going after Gordon and Batman and letting the Joker go was plausible, either, but I can understand how Dawes's death and their involvement in it could send him after Gordon and Batman, and if he's going to be consistent about the coin I can barely see him letting the Joker off. But after Gordon's family? No.

Second, and more importantly, I think having Batman and Gordon decide for Batman to take the blame for the death of those Dent killed (and Dent?) plays into the tendency of governments and officials to lie to its citizens "to keep them safe" and in particular to lie to them because the government doesn't believe they can deal with the horrible truth. I'm not convinced that Batman would really believe that the citizens of Gothom City would be so traumatized by Dent's breakdown and madness that the city would be seriously impaired, and that even if he did I'm not convinced that he would see it as the correct course. Lying to the public "to keep them safe" just makes the public powerless, and I think Batman isn't about making the public powerless, he's about protecting them when their normal protections aren't working, for whatever reason. He's not going to keep the public weak just because he likes being a vigilante, he's going to help make them strong.

I've read Batman comics and I own the Batman RPG (it was sort of an intro to the Mayfair DC Heroes game) though I've never played it, but I'm in no way a Batman scholar, so I may be misinterpreting things, or perhaps it's just that Batman has varied so much over the years that you can find support for any view, but this is what Batman looks like to me. I don't see Batman deciding to take the blame for those murders just to coddle the public.

Now, the whole idea of the perviously adoring public turning against Batman does lead the story into interesting places, but I think that this could easily happen anyway. For instance, if a a charismatic reporter or official carries on a campaign emphasising the negative aspects of Batman's vigilantism - can you say "collateral damage"? - I could easily see the crowd turning against Batman. (Although that might have too many echos of Peter Parker and J. Jonah Jamison.) But I think some other plausible method could have been found.

Election Choice

I think that one of the main problems with U.S. elections is that in many cases we don't actually have much choice. The way that U.S. elections are organized it is very difficult to vote for anyone other than a Republican or a Democrat. In many states getting on the ballot is difficult for other parties, and even in the states where it's easier the whole structure is set up to favour the Democrats and Replublicans.

To fix this we need to level the playing field by making it easier for alternative parties to get on the ballot, ensure that anybody can vote for anybody on the ballot in the primaries without penalty — regardless of political affiliation, allow the citizens to vote against particular politicians, and eliminate the ability of political parties to select candidates that contradict the popular vote.

Actual Play: T.A.'s Savage Worlds Game, Part 1

Background

T.A. has been coming up with maps and ideas for roleplaying games for a while now, and earlier this week while we were talking about RPGs he said he had a Savage Worlds game he wanted to run. I suggested we do it today, Saturday, in the afteroon, and that's what we did.

His sister E.A. and brother M.A were the only ones of the kids around, and they both wanted to play. We decided to play outside, at a small picnic table in the shade, on top of a large blanket so dropped dice would be easy to find. (T.A.'s idea, and a very good one.) It took a while to get everything set up, and the kids were a little impatient; I can't blame them. But we finally got going. I brought up my Savage Worlds GM Screen and my Flip-Mats and dry-erase pens. E.A. and I got an extra benny each for shuffling cards, and M.A. got a benny for helping set up the table.

T.A. had made several pregenerated characters, so we had a good selection to choose from. E.A. went for a healer again, M.A. picked a wizard, and I picked out a theif and combat mage. E.A. came up with a name for her character, Eureka, but M.A. was stuck, so I asked if he wanted help, and he did. We ended up naming his wizard Ragnar, so I stuck with that for a theme and named my thief Loki and my fire-themed combat mage Surt.

T.A. had made a map of a cavern/dungeon and decided on the monster stats and locations, but beyond that hadn't written anything down. He had thought about what he wanted a lot, though, and had it all in his head.

Actual Play

T.A. told us that our characters had seen notices posted that a small, nearby village was seeking adventurers to help with deal with goblin raiders. A short time later were were talking with the headman of the village, who after some talking promised us 50 gp each in advance and another 50 gp each after the job was done. A short time later we were headed out to the trail the goblins took after their raids.

The trail eventually lead up to the base of a hill and an cavern entrance.

E.A. aced Eureka's Notice roll as we snuck into the entrance and noticed something weird about the wall. It turned out to be a secret door, leading down a short passage and through another secret door into a room with a giant spider just settling down for a nap. Luckily, Loki had eased the 2nd secret door open quietly, so Ragnar tried to cast a Bolt at the spider. Unfortunately, M.A. rolled snake eyes (ones on both his Spellcasting and his Wild Die), and woke the spell up. Next round he spent a benny to get rid of the shaken and aced his Spellcasting roll, aced the damage roll, and so much for the spider.

After that we worked our way through a guardroom and a kitchen, each with goblins and dire wolves. As it turned out, the guards had screamed loud enough for the cook to hear something, but we sent in Ragnar in rat form and he saw the layout of the room and reported back to us. We burst in the door, catching the dire wolf with it and stunning it. The cook died fast, but the dire wolf took forever to kill due to some really lucky rolls. We had it stunned at least 3 times, but could never land another until Surt got the Joker, took a multi-action penalty to cast the spell smite and attack in the same round and aced his Spellcasting roll, killing the dire wolf with one massive blow. He immediately set about skinning the wolf, to take the hide back and have it tanned. And that's were we stopped.

Reflections

T.A. did several neat things. Whenever a PC made a really good search roll and found something magical, T.A. rolled to see which PC the magic item would best suit, then made up a nifty magic item on the spot for that character. The healer got a Staff of Healing that couldn't be used for attacking, but would give the healer a bonus on any healing related roll. The combat mage ended up with a longsword that added a bonus to the damage for his Smite power. Later, when Surt wanted the hide of the dire wolf that he finally killed after it had given the party a long fight, T.A. said that when it was tanned it would give him +1 Armor to attacks from the back. Neither the rolling for who the magic item would suit nor the making up the magic items on the spot was anything he'd seen me do, but it worked well, he came up with nifty magic items that weren't overpowering, and it was neat: no boring “you find a +1 sword” here. In some ways I think it was very “Old School”, in a good way. (I'll talk about “Old School” some other time.)

Fun with Lisp: notf and cdrf

I actually use these in Emacs Lisp, for which you'd need a (require 'cl)), but the define-modify-macro is originally from Common Lisp.

These are trivial, but useful.

(define-modify-macro notf (&rest args) not)
(setq x nil)
(notf x)
x ;;=> t
(notf x)
x ;;=> nil
(setq x (a (b (c t))))
(notf (car (cdr (cadadr x))))
x ;;=> (a (b (c nil)))
(notf (car (cdr (cadadr x))))
x ;;=> (a (b (c t)))
(setq x [1 2 3 t 5])
(notf (aref x 3))
x ;;=> [1 2 3 nil 5]
(notf (aref x 3))
x ;;=> [1 2 3 t 5]

(define-modify-macro cdrf (&rest args) cdr)
(setq x (:a :b :c :d 1 2 3))
(defun frob (keyword) nothing-now)
(while (member (car x) (:a :b :c :d))
  (frob (car x))
  (cdrf x))
x ;;=> (1 2 3)

Fun with Emacs: eval-after-load*

Ok, suppose you want to evaluate a particular bit of code after emacs loads a particular emacs-lisp file, but you want to pass values of local variables into that code. The function eval-after-load makes you quote the expression and doesn't allow passing values into the expression. How about this?

(require 'cl)
(defmacro* eval-after-load* (file varlist &rest body)
  "Like `eval-after-load', but bind variables according to VARLIST in
the current environment of the `eval-after-load' expression, not the
environment when BODY is evaluated.  This allows easy passing of values
into BODY.
Each element of VARLIST is a symbol (which is bound to the current value
of that symbol) or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the
value of VALUEFORM in the environment of the `eval-after-load' expression."
  `(eval-after-load ,file
     '(let ,(loop for v in varlist
                  collect (if (symbolp v)
                              `(,v ,(eval v))
                            `(,(car v) ,(eval (cadr v))))
                  into new-varlist
                  finally return new-varlist) ,@body)))
(put 'eval-after-load* 'lisp-indent-function
     (1+ (get 'eval-after-load 'lisp-indent-function)))

Here's a contrived example which demonstrates when things happen.

(let ((f (make-temp-file "tkb-madness" nil ".el"))
      (x 1))
  (unwind-protect
      (progn
        (save-excursion
          (let ((buf (find-file f)))
            (insert (format "(y-or-n-p \"In the file '%s'! \")" f))
            (save-buffer)
            (kill-buffer buf)))
        (y-or-n-p "This happens before the eval-after-load*")
        (eval-after-load* f
            (x
             (y (y-or-n-p "This happens when the eval-after-load* is executed?"))
             (z 2))
          (y-or-n-p (format "x: %d y: %S z: %d" x y z))
          (y-or-n-p "This happends during the delayed expressions"))
        (y-or-n-p "This happens after the eval-after-load* expression")
        (load f))
    (when (file-exists-p f) (delete-file f))))

You should see something like:

Wrote /tmp/tkb-madness88647vuE.el
This happens before the eval-after-load*(y or n)
This happens when the eval-after-load* is executed?(y or n)
This happens after the eval-after-load* expression(y or n)
Loading /tmp/tkb-madness88647vuE.el (source)...
In the file '/tmp/tkb-madness88647vuE.el'! (y or n)
x: 1 y: t z: 2(y or n)
This happends during the delayed expressions(y or n)
Loading /tmp/tkb-madness88647vuE.el (source)...done

(y-or-n-p is used instead of message so you see each message when it happens.)

Does the eval-after-load* macro make sense?

Fun With Emacs: Unicode and #'describe-char

Ever use the emacs command describe-char? It's even more fun with proper unicode lookup data!

;; First, we'll bind it to a key.
(global-set-key "\C-cD" #'describe-char)

;; Now we'll download it if necessary.
(let ((udf-url "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt")
      (udf-dest "~/tmp/UnicodeData.txt"))
  (if (file-readable-p udf-dest)
      ;; Let describe-char know it exists.
      (setq describe-char-unicodedata-file udf-dest)
    ;; It doesn't exist, and we need to download it!
    (when (y-or-n-p (format "You need to download %s ! Do it? " udf-url))
      ;; Really weird: wget -O 'file' complains that file doesn't exist.
      (let* ((cmd (format "cd ~/tmp/ && wget -O %s --progress=dot '%s'"
                          udf-dest udf-url))
             (buf (get-buffer-create (format " *wget '%s'*" udf-url)))
             (proc (start-process-shell-command "wget-unicode-Data"
                                                buf cmd)))
        (display-buffer buf)
        (set-process-sentinel
         proc
         `(lambda (proc event)
            (unless (string-match "^finished" event)
              (error "unexpected status '%s' getting '%s'" ,udf-url event))
            (setq describe-char-unicodedata-file ,udf-dest)
            (message "Try describe-char now! ☣☥☸▧◉✘✽☮⅙▧⚅☑☢☹☺♠♥♦♣♨♻⚔")))
        (message "Downloading... check describe-char later")
        nil))))

Once this is run and it tells you to try describe-char you can position your cursor over one of the Unicode characters in the message (“C-h e” to display the “Messages” buffer) and press “C-cD” and look for the “Name:” line. You'll see something like this:

      character: ♻ (299515, #o1110773, #x491fb, U+267B)
        charset: mule-unicode-2500-33ff (Unicode characters of the range U+2500..U+33FF.)
     code point: #x23 #x7B
         syntax: w    which means: word
    buffer code: #x9C #xF2 #xA3 #xFB
      file code: #xE2 #x99 #xBB (encoded by coding system mule-utf-8)
        display: terminal code #xE2 #x99 #xBB
   Unicode data:
           Name: BLACK UNIVERSAL RECYCLING SYMBOL
       Category: other symbol
Combining class: Spacing
  Bidi category: Other Neutrals