Non-interactive batch-deleting in TaskWarrior

Well, given how much time I spent squashing bugs on my system after updating it, I missed quite a few instances of daily routine tasks (eg. doing my exercises) in TaskWarrior.

Given that I don’t have a GUI installed and TaskWarrior’s support for temporarily disabling the “are you sure?” confirmation is broken, I decided to whip up a tiny little expect script.

Here it is in case anyone else ever wants to batch-delete easily.

Posted in Geek Stuff | Leave a comment

Hacking together a quick update notifier

Since upgrading to Lubuntu 14.04 (more vitriol on the bugs therein later), I’ve discovered that the update notifier has lost the dconf key to disable the daily “please reboot” nag.

Distraction aside, I don’t react well to programs trying to impose specific behaviours on me, so I decided to replace it (and this blog post might have taken more time to write than my replacement).

Here’s what my new update notifier looks like:

To be honest, I actually prefer a flat list like this as opposed to the new tree-view layout they also added to update manager. This way, I don’t have to waste time clicking expanders to get a complete list of what’s being installed before I OK it.

Clicking “Upgrade Now” opens a terminal window containing apt-get and clicking “Remind Me Later” exits the script until cron re-runs it the next morning.

Here’s the source for anyone who wants it:

Posted in Geek Stuff | Leave a comment

Extracting music from XWB files on Linux

I just picked up Shipwreck for $1 on sale and decided I really liked two of the tracks. Like other MonoGame ports, it uses the same XWB-format bundles for music as XNA games on Windows and X-Box do, so you need unxwb to extract them.

Since not everyone is a programmer and unxwb is under the GPL, here’s a copy of the unxwb Zip to which I’ve added a Makefile and both 32-bit and 64-bit x86 binaries built on Ubuntu 12.04 LTS.

Just run it like this and you should get a bunch of audio files dumped into the current working directory.

unxwb -b music.xsb music.xwb

For those who aren’t running Linux, aren’t using an x86-compatible processor, have older system libraries than Ubuntu 12.04 LTS, or don’t trust binaries off random websites, here’s how to build from source on a Debian-family distro:

  1. sudo apt-get install build-essential zlib1g-dev
  2. unzip unxwb-ubuntu12.04-x86_64.zip
  3. cd unxwb
  4. make

If you want to replicate exactly what I provided, make sure you’re building on Ubuntu 12.04.4 LTS for x86_64 and replace that last step with this:

  1. sudo dpkg --add-architecture i386
  2. sudo apt-get update
  3. sudo apt-get upgrade
  4. sudo apt-get install zlib1g-dev:i386 advancecomp
  5. make dist

You can start from either the contents of the original zip or mine. As long as you add my Makefile, make dist should produce the same result.

Posted in Web Wandering & Opinion | Leave a comment

Early Modern English for Authors

Last Updated: October 26th, 2014

Since I seem to keep offering bits and pieces of this advice to people over and over, here’s a guide (which I’ll probably amend as things occur to me) for writing consistent, believable, and easy-to-understand Early Modern English dialogue in your stories.

Note: Yes, I’m aware that this could be tidied up more. I’ll do it if I can ever find the time but I wanted to get this out where people could benefit from it.

1. Second-Person Singular Pronouns

In English today, we use you/your/yours as our all-purpose second-person pronoun family. However, that was not always the case.

As is still the case in modern French, Early Modern English had two sets of second-person pronouns:

Ye/You/Your/Yours
Used for speaking formally or addressing groups of people (like “vous” in French).
Thou/Thee/Thy/Thine
Used for talking to a single friend or family member or, in some cases, for showing disrespect for a stranger (like “tu” in French).

Using these pronouns is very simple:

Thou
The subject of the sentence, just like “I”, “we”, “you”, “he”, “she”, and “they”.
Thee
The object of the sentence, just like “me”, “us”, “you”, “him”, “her”, and “them”.
Thy
The posessive determiner, just like “my”, “our”, “your”, “his”, “her”, and “their”.
Thine
The posessive pronoun, just like “mine”, “ours”, “yours”, “his”, “hers”, and “theirs”.

You can remember these by recognizing that

thee rhymes with me
thy my
thine mine

There’s also a good chart in the Declension section of the Wikipedia “Thou” article.

(This also makes you realize that the common phrase a ‘holier than thou’ attitude is bad grammar and was probably cooked up by people who picked up words like “thee” and “thou” from the King James Bible without understanding how to use them.)

1.1 Verb Forms

Now, this does require special verb forms, but they’re ridiculously simple to remember. Just stick “st” or “est” (Whichever feels right. This was before standard spelling) onto the end of the verb which “thou” directly applies to.

Here are some examples of properly constructed sentences:

  • “Dost thou know him?”
  • “Thou knowest that he hates thee.”

There are irregular verbs, but only four of them and they’re only irregular in the sense that, in five specific tenses, you crunch things down even more to avoid awkwardness.

Here is the list from Wikipedia, slightly adjusted for clarity:

Present Past
you are, you were thou art thou wert
you have thou hast thou hadst
you shall thou shalt
you will thou wilt

Note: While they aren’t irregular conjugations, keep in mind that you can use “you be” and “thou beest” in place of “you are” and “thou art” if you think they’lll help the flavour… just don’t go overboard.

2. Proper use of “mine” and “thine”

In early modern English, “my” and “thy” change form when the next word begins with a vowel:

hand eye
A a hand an eye
My my hand mine eye
Thy thy hand thine eye

This made it easier to speak quickly because, when you ran your words together, you got “my nye” rather than “mye”.

Again, this has a parallel in modern French where, most of the time, you only say the terminal consonant in a word as a way to smoothly flow into the starting vowel on the next word.

3. Proper use of “Ye”

No, this is not about “ye olde shoppe”. That’s just “the old shop”. (There was a period of time before standard spelling when we’d also been forced to abandon the letter Thorn (Þ and þ) by things like italian-made printing type but hadn’t settled on “th” as a replacement yet.)

I’m talking about the pronoun “ye“, which was used before the meaning of “you” became more general. Just like “thou” and “thee” are subject and object, “ye” and “you” are also a subject-object pair.

“Ye gave of your own riches.”

That’s it. There are even a couple of places in modern writing where we still quote it:

  • Oh, ye of little faith.
  • Hear ye, hear ye!

4. Proper use of the “-eth” suffix on verbs

You’ve probably seen phrases like “my cup runneth over”. That’s what we’re talking about. Surprisingly, “-eth” is just the old way to form the present tense of the third-person singular.

Now, we say “God gives and he takes away”. Then, we said “God giveth and he taketh away.”

5. Proper use of “Shall”

“Shall” is an interesting verb because it took me a while to assemble a simple explanation. Nowadays, we mostly use “will” in its place but that wasn’t always so.

Basically, “shall” is to “will” as “should” is to “would”. Compare “shall we?” and “will we?”

Using “shall” carries a connotation of intent, command, order, or prophecy. (eg. “Thou shalt not kill”)

In archaic English, where the use of “shall” is expected, using “will” carries the opposite connotation rather than being neutral. “I shall fall asleep” indicates that it’s a decision you’ve made, so “I will fall asleep” carries an undercurrent of “whether I want to or not” by contrast.

As a side note, this means that “shan’t” (the contraction of “shall not”) is used in many places where, now, we’d often use “won’t”.

6. Use of contractions

Given how much of the archaic English we write is spoken by nobles, I should remind less experienced authors that, when speaking that formally, you typically avoid contractions like “won’t” and “shan’t” because “will not” and “shall not” help to reinforce the sense of conviction in your words (which, as a royal, translates to using the might of a political entity to back it up).

7. Use of the “do” auxilliary verb

In the past, people were more likely to save “do” for places where they needed emphasis, so your Early Modern English dialogue can use things like “Dare I?” instead of “Do I dare?” and “I dare not” instead of “I don’t dare” to feel more accurate.

8. Use of “whom”

While many people say things like “to who” today, with “whom” dying off because it doesn’t lend any additional expressive power, if you ask your grandparents (or even your parents, depending on the school they went to), they’ll probably tell you that it was drummed into them that “to who” is bad grammar because “who” is the subject and “whom” is the object.

(“Who gave it to whom?”)

The same principle applies with derived words like whoever (whomever) and so on. As with Thou, the Wikipedia page for Whom is also easy to understand and very helpful in getting used to what has been trimmed from common use.

9. Know the vernacular

One of the biggest differences between Modern English and believable Archaic English is the same as between American English and British English: Which synonyms people prefer when speaking informally.

For example, here are a few of the words and phrases I can think of which can help your archaic speech:

  • You have my gratitude (I’m grateful)
  • Surely you jest (You’ve gotta be joking)
  • Had I but known (If only I’d known)
  • Nary (never a/not any, as “nary a sound”)
  • Nigh (near/nearly, as in “Our doom is nigh” or “Nigh-impregnable”)
  • Nought (nothing, as in “It was all for nought”)
  • Tarry (Wait/stay/delay, as in “I mustn’t tarry longer”.)
  • ‘Tis (An archaic contraction of “it is” which was used as casually as we now use “they’re” or “isn’t”. Given that there was no standard spelling at the time, I prefer to write “T’is” so it’s not mistaken for an opening single quote with no matching closing quote.)
  • Unto (Like “upon” or “to”, but indicating an indirect object, as in “Bestowed unto him”)
  • Unto (Synonym for “until”, as in “unto death”)
  • Yay and Nay (yes and no)
  • Yea (so/this, as in “About yea high”)
  • Yonder (This/That/Here/There/Those, indicating a place. Eg. “Over yonder” or “yonder valley”)
  • Yon (A synonym for “yonder” that may sound more natural in some places.)
  • Ensue (eg. “chaos ensued”)
  • Employ (in its role as a synonym for “use”)
  • Singular (we used to use it instead of “unique”. See, for example, Sherlock Holmes.)

Archaic grammar (especially among nobles) often uses more indirect and/or deferential phrasing. (Basically, hedging your bets when talking to someone.) For example:

  • “I fail to see how/why” instead of “I don’t see/understand how/why”
  • “If you will permit me” instead of “If I’m allowed”

Tip: If you have a friend who’s learning French, ask for their help. A lot of archaic English grammar is more obvious when approached from modern French. (eg. “J’ai peur” -> “I have fear” -> “Have no fear” or “J’ai faim” -> “I have hunger” -> “I hunger”)

10. Never End A Sentence With a Preposition

As long as you know when to make exceptions, following this dying rule helps to lend an educated air to your character. (eg. “I know the place of which you speak” rather than “I know the place you speak of”)

Don’t bother with the also-common “don’t split the infinitive” rule though. That just cripples your ability to make sentences feel good (eg. denying you the option of “to boldly go” by requiring that “to go” remain an undivided phrase).

…and, besides, it was imposed on English’s Germanic grammar by scholars with a hard-on for Latin. (And, as anyone who’s studied French knows, you can’t split the infinitive in Latin because it’s one word. In French, “to go” is “aller” and “we go” is “nous allons”)

11. Lesser-Used Grammatical Moods

As anyone who’s done any kind of academic language study (eg. learning French at College/University) knows , languages have various “moods“.

In English, we commonly use the indicative mood (“You are going to them”), the conditional mood (“You would go to them if…”), the imperative mood (“Go to them”), and the potential mood (“You may go”, “She can go”).

First, I’d like to point out two ways of using the moods you already know in a less common fashion:

  • You can negate the imperative mood without using “do” (“Fear not”)
  • You can form a potential mood using “ought” or “must” (“I ought not go”, “No, you mustn’t!”) since they’re far less common in modern speech. (Except for “oughta” as in “Why, I oughta…”)

Second, I’d like to introduce you to an entire English grammatical mood that has almost died out: The subjunctive.

The subjunctive has several functions (talking about hypotheticals, expressing opinions, and making polite requests) and I know of only two forms which are both distinctive and still in use:

  • If I were (as opposed to “If I was“, used to talk about hypotheticals)
  • I suggest that he beat the drum (as opposed to “he beats the drum”, used to express an opinion)

That second one is how “long live the king” classifies as subjunctive, by the way. If it were indicative, it’d be “long lives the king”. (A reordering of “the king lives long.”)

As Wikipedia points out, there are also two other distinctive constructions which have drifted far enough from common speech to sound flat-out wrong to some modern English-speakers:

  • And if he be not able
  • I will ensure that he leave immediately (“[ensure] [that he leave]” as opposed to “[ensure that] [he leaves]”)

As an author using the subjunctive in the present day, using “If I were” properly is the main thing you want to focus on:

  • “If I was…” is the past conditional. You’re saying “If [factual statement]…” so you use it in phrases like “If I was rich, where did the money go?”
  • “If I were…” is the future subjunctive. You’re saying “If [hypothetical statement]…” so you use it in phrases like “If I were rich, I’d have the time that I lack“.

12. Further Reading

First, using a thesaurus to find synonyms that feel more archaic is an easy technique… assuming you grew up speaking English. (For example, we don’t use “permit” as a verb as much as we used to. “If you’ll permit me to…” sounds more archaic than “If you’ll allow me to…”.)

Second, If you’ve got the time and want to make your archaic English feel even more accurate, direct experience can be a big help. Given how messy English was in the days before standardized spelling, my advice is to work backwards from modern English.

Drop by Project Gutenberg and download some books that are still modern enough to read but have sat in the public domain for long enough for the language to have drifted. I recommend starting with the Sherlock Holmes series (text or audio) and then moving on to the original novel version of Frankenstein (audiobook), since they’re both still engaging reads.

(And, for people who have only seen the movies, you’re really missing out. The Frankenstein novel is a deep read and invented the core “speculative fiction” branch of science fiction. There’s a reason only the novel is subtitled “Or, The Modern Prometheus“)

Finally, if you really want to put in an effort and feel like dropping by your local library, ask your local library for Martin Gardner’s The Annotated Alice (preferably the Definitive Edition) as well as some high school-style annotated copies of Shakespearean plays. You’ll be surprised at some of the ways the language has drifted.

(For example, when Alice says “let’s pretend”. That used to only be meant in the sense of “pretender to the throne”… so a more accurate translation would be closer to “let’s lie” than “let’s play make-believe”)

Posted in Literary Geekdom, Writing | Leave a comment

The Most Eye-Opening Things I’ve Ever Read

Every now and then, I run across an article where the amount of condensed epiphany simply blindsides me… so I’ve decided to start collecting them here. (Listed in the order I read them)

Against School by John Taylor Gatto
I first read this article back when I was in high school and it blew me away. It’s basically a condensed summary (with references) of Gatto’s longer works, which explain why the boredom and conformity of high school is a feature, not a bug, and the core purpose of compulsory education, as currently implemented, is to produce obedient sodiers and factory workers.Sir Ken Robinson also touched on the value-neutral economic disadvantages this system brings in the 21st century in a great talk which had the relevant bit illustrated by RSA Animate.

Southern Values Revived by Sara Robinson
I already mentioned this before and it’s not quite as mind-blowing as some of the other stuff I read, but it definitely got me thinking.
It’s an explanation of how and why, in America, there have been two different definitions of “liberty” that have persisted since the very beginning… and how both the civil war and the current struggles between progressive and regressive ideas are part of the same struggle that’s been going on since the brutal Barbados slave owners expanded northward and their ideology came into conflict with that which spawned the U.S. constitution.
Who’s Cheating Whom? by Alfie Kohn
Now, back to the marginally mind-blowing. This heavily-cited article explains, in detail, why current attempts to stop academic dishonesty (cheating) are doomed to failure because cheating is a symptom of a fundamental flaw in our approach to education. It ends by pointing out how, if we were to stop cheating, we would have destroyed everything we claim to value along the way.
On Artificial Intelligence by David Deutsch
This is, without a doubt, the most mind-blowing of the bunch.It starts by talking about how the laws of physics guarantee that artificial general intelligence (artificial sapience) is possible. It then moves on to explaining why self-awareness is merely a symptom and creativity is the true “tough nut to crack”, likening our “the brain’s parallelism is the key” addiction to emergent behaviour  rationalizations to expecting buildings to fly if we just build them tall enough.

Finally, if you’re already too educated for that to blow your mind, it ends with one more attempt by drawing attention to how primitive and arbitrary our definition of personhood is and how, by the time we successfully create an artificial general intelligence, we will have learned enough to formulate a concrete, objective definition.

The First Global Civil War by Lionel Dricot
Let’s just say that this article recasts the worldwide fight between established organizations (government, corporations) and things like “piracy” and “social media” by doing a point-by-point comparision between recognized civil wars and the current state of the world.
Why are companies like the Big 5 (now Big 3) record labels fighting piracy to the point where they have to merge to remain profitable? Because it’s not about money, it’s about control.

Finally, while they’re an ongoing thing and, hence, not easy to place in order, Rick Falkvinge’s articles on TorrentFreak provide a very thought-provoking alternate perspective on the nature and history of copyright and the cause and meaning of the fight against “piracy”.

Update: Also, while they’re not technically reading, I strongly recommend watching the Yale Open Courseware recordings of PHIL 176: Death with Shelly Kagan. They’re a hugely eye-opening introduction into how to rationally discuss the nature of conscious existence.

Posted in Web Wandering & Opinion | Leave a comment

Working around the Cave Story+ “Soundtrack”

So I’m feeling like listening to the Cave Story+ remastered version of the title page tune that better fits the SNES-era ambiance of the game’s original visuals. No problem. The Humble Bundle gave me the soundtrack… but it doesn’t contain that version.

…it contains the version from the much maligned DS soundtrack (plantation.ogg) and some weird remix of the original NES-like version (intro menu.ogg) which uses the same instruments but with a different beat. I’m no expert but, judging by the way I hate it, I think it’s jazz.

Ugh. If I wanted to listen to a cover, I’d listen to Brentalfloss’s version with lyrics. Time to use what came in the game… OK, each track is two Ogg Vorbis files (a lead-in clip and a loop clip). I can work with this.

I whip out a lossless Ogg Vorbis concatenation tool and it works… but the abrupt end isn’t nice. Long story short, here’s a little script which uses oggCat and sox to produce a soundtrack-like output file with everything except the ending fade-out being a lossless repackaging of existing compressed data.

It does give a couple of warnings on the console, but they seem to be harmless and I think that’s just because oggCat contains code that expects correct frame timestamps.

Posted in Geek Stuff | Leave a comment

Game Review – Guacamelee!

Well, since I got it in a Humble Bundle, I guess it’s time for another game review: Guacamelee!

Guacamelee! is a metroidvania-style platformer themed around Mexican wrestling and the Día de Muertos (Day of the dead). In practice, this means that it’s very colourful, has a fair bit of backtracking, and expects you to punch and grapple with enemies rather than shooting or jumping on them.

Since the only two-player support is for cooperative play, the game takes the opportunity to implement simplified fighting controls similar to Super Smash Bros. but with moves and combo chaining that are much more forgiving and satisfying for people like me who don’t play traditional fighting games. (After all, it’s not as if the enemies are going to get frustrated if you kill them with one massive combo.)

The game recommends an X-Box 360 gamepad and the Linux release detected and configured mine without so much as a hiccup. While the controls aren’t as delightfully “react to you every twitch and thought” responsive as in Super Meat Boy or Escape Goat, they are very solid and satisfying. I’d liken them to a faster-paced, 2D version of Nintendo 64 platformers like Super Mario 64 or Banjo-Kazooie… or, perhaps even closer, Super Smash Bros. Melee, since you can punch, kick, and grapple.

The art style and the music are very pleasing. In fact, it’s the nicest high-resolution 2D platformer I’ve played in a long time. (Generally, the really beautiful ones are either running on a 3D engine or mimicking the pixellated retro look of games from the SNES era and before.) However, as the game warns you on startup, it’s not for people at risk of photosensitive epilepsy since it uses bright flashing colours when you gain a new ability or upgrade your health or stamina. As for the music, it’s pleasing but, like most of the platformer music I’ve seen, it’s more for setting the atmosphere than to be listened to on its own. (Though I do have the rain/war temple music on my playlist.)

Given its Día de Muertos influence, it uses the same “switching worlds at the touch of a button” mechanic as in Giana Sisters: Twisted Dreams. However, it balances things a little differently. Guacamelee! relies much more heavily on the “present in one world, absent in the other” mechanic while allowing you to use your foll complement of moves in either. Also, the lack of morphing animation makes the visual differences seem more subtle, so pay attention if you don’t want to mistake it for just a palette swap. (Not to mention that I don’t remember Giana Sisters having enemies who can always attack youbut can only be attacked if you are in the same world.)

(It also improves upon the “please don’t share this DRM-free release” message in Giana Sisters: Twisted Dreams by only showing it the first time you start the game rather than as a nag screen… though the one in Giana can be disabled if you’re observant.)

One of the things that I found to be a very pleasant surprise was the characterization. The interactions between your character and the villains are entertaining and I especially like how human the villains feel. (I don’t want to give too much away, but I especially like the villain’s main sidekick who also happens to be his girlfriend.) I’m not sure I’ve ever seen that in the platformers I’ve played before.

Speaking of delightful little bits, I love their choice for an analogue to Samus Aran’s morph ball… you turn into a chicken. I won’t spoil the context but, as a whole, I found its use in the game very grin-worthy. (Especially once you realize that certain human-form costumes also come with alternate chicken-form costumes.)

…which brings me to the three problems I have with the game:

First, for something that’s otherwise so immersive, did they really need to break the fourth wall so brazenly? The hermit is a hoot… but if I have to smash his statue collection to get abilities, why must he collect chozo statues?

Less egregious but still at least as jarring as it is grin-worthy, why did they have to fill the billboards in the town with meme and game references like “Me Gusta Guavas”, “Angry Rooster awesomesauce”, “Casa Crashers“, and the like (or hide a QR code which only serves as a reference to Fez)? For a game that’s so polished otherwise, that kind of fourth-wall breaking is as jarring as it is grin-worthy.

Second, the length. I haven’t beat this yet, but it definitely feels like I’m completing it a lot more quickly than other metroidvanias in recent memory like Super Metroid, La-Mulana, Aquaria, or Unepic.

Finally, I was never clear on what acted as autosave points (there’s no manual save), so I kept losing the last bit of progress I made because I guessed incorrectly. (I suspect it’s the skull who also acts as a skill merchant, but if the flames and chattering were supposed to signify a saved game, I’d have preferred something less likely to be misinterpreted as “Hey, buy something, would ya!”)

All in all, I’d definitely say that it’s worth a play (especially since they’re fellow Canucks and the first people I’ve noticed acknowledging a national holiday properly :P)… but you might want to wait until it’s on sale again to make up for the length.

Posted in Reviews | Leave a comment