* Not to be confused with the homonymous Sky News [1].
3,179 karma · joined July 15, 2014
Interested in programming languages and machine learning.
https://twitter.com/breandan
https://github.com/breandan
https://breandan.net/
"Life imitates art far more than art imitates life."
—Oscar Wilde, The Decay of Lying (1889)Well, how reassuring!
"Don't you see that the whole aim of Newspeak is to narrow the range of thought? In the end we shall make thought-crime literally impossible, because there will be no words in which to express it."
—George Orwell, 1984 (1949)[1]: https://en.wikipedia.org/wiki/McGill_University_School_of_Co...
[2]: https://www.cs.mcgill.ca/~ratzer/backup/welcome.html
[3]: https://mcgill.imodules.com/controls/email_marketing/view_in...
[1]: https://leanprover-community.github.io/blog/posts/lte-final/
[1]: https://github.com/breandan/galoisenne/blob/8f0f1e9e4e02062c...
> Well, your own link proves it, doesn't it?
That code simulates a bounded cellular automaton, which effectively reduces to a regular language, but that's about as far as I've been able to get. If it's possible to implement general recursion, I'm not quite sure how - yet. > Kotlin has nominal subtyping, contravariance, and generics, therefore its type system is undecidable.
They're not using Kennedy and Pierce's system, but it's closely related. See Tate (2013) [1], in particular, "In general, since declaration-site variance can easily be encoded into use-site variance..." > I ported that code directly to Kotlin
Can you share your translation of Eric's code? Maybe we can get it to work. > One person noodling around for a few weeks
Well, I've been trying for about three years, but to be fair I'm a pretty slow programmer so you may have better luck. > a language being too obscure to have seen much academic study
Doesn't seem too obscure to me. https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=kotl... > T isn't generic in that code, it's just a class.
I think it needs to be a generic type in Kotlin for this to work, because otherwise it will dispatch to a single method. It's tricky to get Kotlin to do much compile time computation. Not saying that it's impossible, but LMK when you've actually tried it. Here's some sample code if you want to try encoding a Boolean logic:https://github.com/breandan/galoisenne/blob/2e465e7a753f6341...
> link's example for C# would translate directly into Kotlin
T() is not possible for a generic T in Kotlin.