Monday, 6 October 2014

Why Doctor Who needs a Scientific Advisor

Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke

A plot hole isn't something that's not explained. It's something you can't explain.
- Steven Moffat

Where does she get the milk for the soufflés?
- The Doctor Asylum of the Daleks

Kill the Moon was a weak episode. The theme of whether one should be prepared to do evil in the pursuit of a perceived greater good is a favourite one with Doctor Who, explored famously in Genesis of the Daleks, and more recently in The Beast Below and The Day of The Doctor. The Doctor's motives for leaving Clara and Courtney to make the crucial decision could have been better explored - a line to the effect of "I trusted you to do the right thing. I didn't trust myself," would have made far more sense of his actions. But the big problem is that the premisses of the story just didn't make sense.

We have a pretty good idea what the Moon is made of and how it was formed. If it were the egg of a giant space creature, the Apollo astronauts would have noticed. Even if it were, it wouldn't suddenly become heavier when it hatched - conservation of mass is one of the most basic laws of physics, so if something gets heavier, the extra mass has to come from somewhere. Bacteria are the size they are because their simple prokaryotic metabolism won't scale up. An oversized spider has to be a multicellular, eukaryotic organism. Even if a giant dragon could hatch out of the Moon, it couldn't fly away by flapping its wings in space - wings need an atmosphere to work. And if it did fly away, the gravitational effects of such a large thing doing so would seriously perturb the Earth's orbit. And no organism could lay an egg larger than itself immediately after hatching.

OK, this is a show about an alien who travels through time in a ship that's bigger on the inside, but even in that context these errors break suspension of disbelief. There's a difference between asking, "What if time travel were possible?" and just not caring about basic physics. The Doctor Who production team needs someone to consult about the scientific plausibility of a story, someone who could tell writers when something didn't work, and what they could do to improve it. "Either you need another way to set up your ethical dilemma, or we can work out something else that could be wrong with the Moon."

The worst story this century could have been vastly improved by a bit of scientific advice. "The monster could be a giant intelligent slime mould that engulfs its prey, and absorbs their knowledge as it digests them. It adopts the likeness of previous victims as camouflage. After The Doctor notices that it avoids one particular woman, who wears a distinctive perfume, he realises that vanilla contains a hormone that will cause its component cells to disperse harmlessly."

Doctor Who did employ somebody in this capacity once. That was Dr. Kitt Pedlar, co-creator of the cybermen.

Even the most fantastical universe has to make sense.

Thursday, 2 October 2014

A Paradox

There is a cat in a box. Also in the box is a radioactive atom, which, if it decays within a certain interval, will trigger a time machine that sends the cat back in time to kill its own grandfather while he was still a kitten. (Why the cat has such an irrational hatred of its grandfather I don't know. I never said it was a nice cat.)

Unless you open the lid, there is no way of knowing whether there has ever been a cat in the box at all.

Monday, 21 July 2014

Starting a new conlang

I've been thinking about starting a new conlang project for a while now. I'm planning to do something with a bit of nonconcatenative morphology, not exactly Semitic but with some similar features, and I really want to try my hand at diachronic conlanging. Over the past few days I've put together the phonological development of the first few stages of the language.

Stage 0

Consonants

pʰ tʰ cʰ kʰ
p t c k ʔ
b d ɟ g
f s ç x h
v z ʝ ɣ
m n
     r
     l

Vowels

i      u
   a

Syllables

CV

Sound changes

V>±hightone/ _ʔ
ʔ>∅
t,d>θ,ð /VV
+asp > -asp

Stage 1

Consonants

p    t    c   k
b    d   ɟ    g
f  θ s  ç    x   h
v  ð z  ʝ     ɣ
m    n
        r 
        l

Vowels

i       u

    a

Tones

Low, High

[C]V[V]

Sound changes

i,u,a> j,w,∅/ _ V

Palatalization
pj, tj, kj > pʲ, t͡ʃ , t͡ʃ
bj, dj, gj > bʲ, d͡ʒ, d͡ʒ
fj, sj, xj, > fʲ, ʃ, ç, ç
vj, zj, ɣj > vʲ, ʒ, ʝ
mj, nj > mʲ, ɲ
rj > ʎ
lj > ʎ
cj, ɟj, çj, ʝj > cː, ɟː, çː, ʝː / V_V
cj, ɟj, çj, ʝj > c, ɟ, ç, ʝ

Labialization

tw, cw, kw > tʷ, cʷ, p
dw, ɟw, gw > dʷ, ɟʷ, b
fw, θw, sw, çw, xw, hw > ɸ, θʷ, sʷ, çʷ, ʍ, ʍ
vw, ðw, zw, ʝw, ɣw > β, ðʷ, zʷ, ʝʷ, w
nw > ŋʷ
rw > w
lw > ɫ
pw, bw, mw > pp, bb, mm / V_V
pw, bw, mw > p, b, m

Stage 3

Consonants

p         t          c         k

            tʷ        cʷ
b          d         ɟ         g

             dʷ      ɟʷ
                   ͡tʃ
                   ͡dʒ
ɸ   f  θ  s    ʃ   ç        x         h
      fʲ θʲ 
         θʷ sʷ      çʷ    
β    v ð   z   ʒ   ʝ        ɣ
      vʲ ðʲ
          ðʷ zʷ     ʝʷ
m      n             ɲ      
                                  ŋʷ
w       r             j
          l              ʎ       ɫ
ʍ

Vowels

i        u
    
     a

Tones
High, Low

Syllables

[C]V
Medial consonants may be geminated

Sound changes
Feature spreading

a, u > e, y / _Ci
i, u > e, o / _Ca
i, a > y,o / _Cu

Tone sandhi

Low>  Rising / _High
High>  Falling / High_

Syncope

Primary stress on first syllable, secondary stress on odd syllables

Where 2 identical vowels (modulo tone) occur in adjecent syllables, the vowel in the less stressed syllable is deleted.

Stage 4

Consonants as Stage 3.

Vowels

i y         u
  e       o
       a

Tones
Low, high, rising, falling

Syllables

[C]V[C]

By stage 4, the phonology is more or less where I want it to be, and subsequent stages will mainly be about gramaticalisation and analogy. However, I've left myself some phonological loose ends for later.

The plan is to go backwards and forwards between Stages 0 to 4 for a bit, building up basic vocabulary and grammar, and then move on to the later stages. Going backwards and forwards is partly an attempt to reconcile the diachronic method with my love of hand-crafted vocabulary. The finished product will probably be about Stage 7.

Tuesday, 17 June 2014

NoSQL for Conlangers

In his blog, fellow-conlanger +Wm Annis writes that the best database format for dictionaries is text.

All his points are valid, but at one point he says The standard is SQL, and that got me thinking. I've done a fair bit of work with SQL, and can do scary things with it, but I wouldn't choose to use it. It's inflexible and clunky. You have to decide your schema in advance, and if your requirements change at a later date, you have no choice but to rebuild entire tables. Anything more complex than a simple one-to-one relationship requires a second table and a join. SQL basically expects you to fit your data to the model, and what you need is to fit the model to your data. Using an ORM like SQLAlchemy doesn't help - it's just a layer of abstraction on top of an inherently clunky system.

For a good dictionary system, you need the flexibility of a NoSQL database. One popular system, that I've done a lot of work with, is MongoDB. This stores documents in JSON format, so a dictionary entry might look like this

{"word":"kitab",
  "definitions":[{"pos":"noun",
                            "definition":"book"]},
"inflections":{"plural":{"nominative":"kutuub"}},
"related":["muktib","kataaba"]}

If a field exists for some words but not others, you only need to put it in the relevant entries. If a field is variable length, you can store it in an array. One slight disadvantage is that cross-referencing between entries can be a little tricky.

Another possibility is ZODB. This is an object persistance system for Python objects. In many ways it's similar to MongoDB, but there's one important difference. If a member of a stored object is itself an object that inherits from persistant, what is stored in the parent object is a reference to that object. Cross-referencing is therefore completely transparent. The only small disadvantage is that it's Python-specific, but unless you really need to write your dictionary software in a different language, that shouldn't be a big problem.

You might also want to consider a graph database like Neo4j. This stores data as a network of nodes and edges, like this

kitab-[:MEANS]->book
kitab-[:PLURAL]->kutuub-[:MEANS]->books

In theory, this is the most flexible form of database. I wouldn't say it was easy to learn or use, though.

There are plenty of other NOSQL databases, these are just the ones I'd use, but I think they're all more suitable for dictionary software than SQL. But do make sure you have a human-readable backup.

Monday, 5 May 2014

Reverse Conlanging

As regular readers will be aware, I like Doctor Who and conlanging.
Unfortunately, these don't intersect much, as the TARDIS has telepathic circuits that can translate any language. However, here's an exception

Venusian lullaby

The Curse of Peladon was written in the days when, if you wanted an alien language, you made up some gibberish and hoped for the best. However, this is coherent enough to make some sense of it. Using the Doctor's translation Close your eyes my darling, well three of them at least! I've worked out the following so far

klid
child
kloklid
diminutive, used to express affection
klida
1st person posessed form, used to express kinship
kloklida
My dear child
pɹaθ
eye
paɹθa
paucal, used for more than two, but not necessarily a complete set, for which the plural would be used
men
you
mennin
your
klatʃ
close (hortative)

One thing that might be harder to explain though, is why it's sung to a slowed-down version of God Rest Ye Merry, Gentlemen.

Saturday, 26 April 2014

Experimenting with IFTTT

I've just started trying out IFTTT. Partly this is because the Feedburner feed for this blog has needed manually prompting to update my Twitter feed, but also because I'm investigating using it to post automatically to Blogger on behalf of my friends at Speculative Grammarian.

To do this, I'm using a feed from one of my Google Code projects. It's a semantic recommendation system I've been working on. I call it Emily, because it finds things (or at least, it will do when it's up and running). Code updates from the project should be appearing here.

Thursday, 13 March 2014

Fonts for Conscripts on FrathWiki

FrathWiki is a MediaWiki-based site for conlangers. I use it to host the documentation for Khangaþyagon and iljena. One drawback, however, is that it was difficult to use a conlang's native script, as this requires a custom font. My friend David Peterson created a font for Bukhstav runes before he was famous, but short of uploading a lot of .png files, it would have been very difficult to make use of it on the wiki.

But no more! I've looked up how to use web fonts in CSS, and created a couple of templates that should allow the use of any conscript you have a font for on FrathWiki. Behold!

http://www.frathwiki.com/Templates_for_using_web_fonts