Hi all, Thanks to everyone who replied. I apologize for posting and vanishing ... a family emergency on Saturday took me away for the weekend.
David: Thank you for the exposition about your task scheduler. I have something similar, a (thread safe) priority queue based on data/heap, although it isn't persistent like yours. This "time definition" code was an attempt to make using it easier / more natural. Ryan: You are probably correct that this job doesn't need such a complex macro ... probably one to parse out times, plus some purpose functions would suffice. But the question about how to reference the environment from a macro is tangential to the task and I really thank you for trying to answer it. I'm going to have to study your solution for a while as I'm not sure I yet understand it. ----- <frustration> I have written 2 compilers from scratch, and I have no trouble using non-hygienic macros in Lisp, or syntax-rules, syntax-case in Scheme. But I start to get queasy when the task exceeds what can be done easily with syntax-rules or syntax-case. I can't easily articulate my problem with syntax: the best I can come up with is that it is, in a real sense, a black box. There is an API to manipulate it ... but no real understanding of exactly what is being manipulated or how the functions tie together. For me the documentation talks a lot but doesn't seem to say very much. [I recognize that this is a personal failing ... obviously other people are able to figure it out, so the problem must be with me.] Lisp's macros are ... I won't say easier to use correctly, because they aren't ... but IMO they are easier to understand and think about because the input is just a tree of normal Lisp objects that can be manipulated using normal Lisp functions. No dichotemy of "this is syntax" vs "that is data", and no bridges to cross between two different representations. </frustration> Thanks to everybody. I need to go now and study what Ryan did. George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.