Arc Forumnew | comments | leaders | submitlogin
2 points by stefano 6001 days ago | link | parent

I've been thinking about implementing macros in a compiled lisp, and I've come up with this solution: when you encounter a macro compile it to a temporary file, compile it as a shared library, load it, execute it and compile the returned value. For this approach to work the compiling environment and the compiled environment should use the same internal representation of data structures, so I think that the best way to get macros working is to have a metacircular compiler first, so arc2c would need to be rewritten in the core Arc that it currently support. I hope this helps. As of real coding help I'm under exams, but I hope to be able to help by the end of June.

BTW, on how many projects are you working currently? :)



1 point by almkglor 6001 days ago | link

non-work related ones? 2, arc2c and my "snap" virtual machine.

Not sure about that solution. Certainly it seems that you need access to the macros on the same "level" as the compiler's code. Ouch, my head hurts.

-----