# Jonathan Sterling ⊢Home.

iOS Engineer at Yardsale, armchair type theorist and syntactician. Student of Ancient Greek, Latin, Sumerian, Akkadian, Hittite, German and Old English.

I’m currently banging my head against a three-dimensional model of natural language syntax in Intuitionistic Type Theory, which I hope will help us generate word order for Greek with minimal incidental structure. My more ambitious goal is to demonstrate a clear distinction between lexically mandated intrinsic structure, and the incidental structure which arises from an inexpressive theory.

Below are some articles that I have written recently on various topics relevant to my interests.

### Combinatory Categorical Grammar for Ancient GreekMay 20, 2013

This is the first in a series I intend to write in regard to the syntax of Ancient Greek hyperbaton, and what can be done about it formally using a combinatory categorial grammar1. We will begin with a pathological example of Y1 hyperbaton from Sophocles’ Trachinian Women:

τὴν Εὐρυτείαν οἶσθα δῆτα παρθένον;
the-*acc* of-Eurytus-*acc* know-*2.sing* of-course girl-*acc*
“You of course know the daughter of Eurytus…?” (Trachinian Women, l. 1219)

### Derivative and Novel Speeches in Plato’s SymposiumMay 19, 2013

The six speeches of the Symposium may be divided into two sets: on the one hand, there is Phaedrus’s speech and those which are derivative of his, and on the other hand, there are the novel speeches; and these are the ones which reject the previous approaches and propose unique theories of Eros.

### A Survey of Phrase Projectivity in the AntigoneApril 28, 2013

In this paper, I demonstrate how, and to what degree, phrase projectivity corresponds with register and meter in Sophocles’s Antigone, by developing a quantitative metric for projectivity and comparing it across lyrics, trimeters and anapaests using the data provided by the Perseus Ancient Greek Dependency Treebank. In the appendices, the formal algorithm for the computations done herein is developed in Haskell.

### Inferring Typing Derivations for the STLC in HaskellApril 13, 2013

We can define the STLC at the type-level in Haskell, and then provide a type of derivations (proofs of well-typedness) which is indexed by terms. Further, we can use Haskell’s type classes to infer typing derivations for well-typed terms in the STLC.

### Vinyl: Modern Records for HaskellApril 6, 2013

Vinyl is a general solution to the records problem in Haskell using type level strings and other modern GHC features, featuring static structural typing (with a subtyping relation), and automatic row-polymorphic lenses. All this is possible without Template Haskell.

### Proving Type Inequality in C++February 10, 2013

It is trivial to prove type equality in Haskell (to the extent that anything is every “proved” in Haskell). As for proving type inequality, Conor McBride demonstrates that this is possible to do using type families. Today, I’d like to show some techniques for doing the same in C++ with templates.

### A Pattern for Lightweight Immutability in Objective-CDecember 27, 2012

Today, I hope to introduce a more lightweight approach to immutable objects in Objective-C that sidesteps some of the problems with class clusters (such as hostility to subclassing) by making some trade-offs. The class cluster approach provides the following fronts of protection against illegal mutation:

1. Mutation methods only occur in the interfaces for the mutable variants. This protects us when types are preserved.
2. Sending a mutation message to an immutable object results in an exception.

I’m going to argue that the first force of protection (that of types) is far more important than the second (that of runtime exceptions), and that if we are willing to give it up, we can have a vastly simpler notion of immutability and mutability. Finally, I’ll discuss ways we can recover runtime exceptions in the case of an unsafe cast, and finally how we can recover the functionality of -mutableCopy in a subclass-friendly fashion.

### Eliminating Stringly-Typed Code in Objective-CDecember 20, 2012

Perhaps the greatest sin in the common body of Cocoa design patterns is the pervasiveness of “stringly-typed” code:1 it frequently comes up in KVO and bindings, among other things. Various macros have arisen to allow type checking of keypaths, largely thanks to efforts by Justin Spahr-Summers and myself. Today, I’d like to talk a bit about some ideas for enforcing statically trusted boundaries for checked keypaths.