PLT Stuff At Last!
Well, I wanted to blog more this summer. I can’t really claim that I was too busy, since I wasn’t. I did make a lot of progress on my Hearthstone card collection though. But I think I’m back now. I’ve read five books in the past three weeks, all to do with programming languages, so I better write while the mood lasts.
I’ve been doing a lot of reading on Forth, however, and how to efficiently compile it and other related languages. A lot of the literature for the JVM and CIL doesn’t apply as well here since Forth can have divergent stack effects and very often functions with multiple return values. Looking into the internals of the Go compiler could likely yield some valuable insight to efficient multiple return values.
But the problem of type inference remains. I think I’ve come up with a type inference algorithm for higher-order stack languages, and I’m going to try it out on a batch-compiled version of Forth. More information on this is forthcoming, because I haven’t actually proved anything yet, but I’ve tested it by hand on several edge cases and it seems to be robust. Spoiler alert: the type system doesn’t support Forth’s divergent stack effects, but is still more general than the system formalized by Christopher Diggins (in that preserves associativity of composition while allowing composition of functions like (A ~ B)(C ~ D)). The language will, like Forth, be super low level but capable of higher level design patterns. I’m sticking with the ongoing alcohol-related naming theme, I’ve named the language Yeast right now.
Uh, well, for having a lot less classes it’s taking more time than undergrad seemed too. Part of that might be adjusting to living outside of Idaho for the first time in my life. Boston’s a great city, definitely the most fun big city I’ve ever been in. It has a character all its own, independent from the living inhabitants, and the people have so far been great. Driving in the city is absolutely abominable though. I take the T.
I wasn’t a huge fan of the Northeastern campus when I first arrived, but it’s grown on me, and the library is exquisite. Most of the aforementioned books I’ve been reading have been read while I lounge in one of the open grassy areas on campus, which are well stocked with benches and Adirondack chairs. It’s great, but not as great as seeing so many other people doing the same thing.
I’m planning to work on formalization of concatenative languages on this blog. Like I said, I think I have the type inference algorithm worked out, but I want to get a better foundation in PLT theory before I go too far afield. I’ve looked into the formalization of semantics as well, and it seems that concatenative languages yield themselves very well to term rewriting semantics. Look to see posts in both of the above categories soon.