Applying for a PhD with professor X, when my prior research is in a different field?
Do I have any good angle here?


That depends on what you want to achieve and how long you’re willing to take to achieve it.


  Fortunately, one of those people is Professor X (they contacted me unexpectedly saying that they liked my work, having evidently seen my code-in-progress). Great, right?


Is taking a short-term appointment with X an option? That will offer you a chance to work on your problem and get a reference from a world expert.