3 ms·
You might have to require that any code that uses the now/at constructs be wrapped in a macro invocation, e.g. (with-time-travel ...). The with-time-travel macr
by MathMonkeyMan 3y ago
You might have to require that any code that uses the now/at constructs be wrapped in a macro invocation, e.g. (with-time-travel ...). The with-time-travel macro would then be a syntax transformer that rewrites the program. I'm not sure how, though... you'd have to enumerate all of the code blocks that are inside "at" forms, and then conditionally dispatch to them in the expansion of the "now" form; but that doesn't quite work because (now) is a value, and so figuring out which "at" forms consume it is probably undecidable. You can't have all the cases in the expansion, either, because of the incompatible environments.
It's an interesting problem, but one that I think is ok not to be able to solve in Scheme.
- autumn-antlers 3y agoIt's only legal for each `now` to be consumed by at-most one `at` form, so at that point you'd just be re-implementing the "timeline" and "instant" system from mariposa. The need to wrap the program in a form and the management of `now` "values" has me pondering the implications of IanTheHenry's macaroni[1] system, which (like the CSS :has operator) allow macros to climb up into manipulations of their parent forms-- the `now` macro could effectively wrap every remaining form in the program with a new context that augments eg. the closure of `at`. But indeed, perhaps a problem to not become too invested in :p 1: https://github.com/ianthehenry/macaroni https://github.com/ianthehenry/macaroni
- autumn-antlers 3y ago> perhaps a problem to not become too invested in uh, case in point, that hypothetical closure would have some difficulty crossing module boundries (and that's assuming it gets away with re-writing top-level define forms), but still nothing technically incomputable, just supremely ill-advised and still closer to a reimplimentation of mariposa's semantics than a truely native concept emerging out of the continuations system