Mind is getting blown by multi-stage programming! Does anyone know of any simple examples of it being used as a way of doing offline partial evaluation in compilation? Most of the stuff I see is for run-time code generation. 🤔
Conversation
Replying to
Eventually I'd like to use this as a technique for getting better codegen in dependently typed programming languages, but I think these techniques might be handy for my work in binary data format descriptions.
2
Replying to
There's this paper about static staging: cs.utexas.edu/users/mckinley
That said, it isn't clear to me what the difference is between typed macros and static staging -- syntactic flexibility vs rigidity?
2
1
I think there is some correspondence, but I don't know. The annoying thing about full spectrum dependent types is that you lose the phase information that is present in traditional languages, so it's hard to compile things like type parameters and constant parameters efficiently.
2
Show replies
Replying to
Is there any inherent difference between "online" and "offline" techniques; rather than just whether you choose to have it run before or after you ship the software?
(I was going to ask if you're familiar with LMS, and link cs.purdue.edu/homes/rompf/pa, but seems that's "online".)
1
Yeah I've seen LMS before, and it looks really interesting! "On Cross-Stage Persistence in Multi-Stage Programming" seems to suggest there is: fos.kuis.kyoto-u.ac.jp/~igarashi/pape
1
2
Show replies


