freenode/#sicl - IRC Chatlog
Search
13:31:43
heisig
Lazy environment building seems to work fine. But there is a problem - built-in CL functions like macroexpand cannot finalize such environments.
13:32:18
heisig
So once again I have the situation that macroexpand won't work on some augmented environments.
13:34:16
heisig
Before I invest a lot of time figuring out a decent mechanism for augmenting native environments, I'd like to discuss use-cases for that.
13:34:56
heisig
Because if the only reasonable use-case is writing a CL compiler, I'd say we move the entire augmentation part from Trucler to CST-to-AST.
13:46:06
MichaelRaskin
Hello, I think I know why example where augmenting native environments would make things much simpler…
13:49:26
heisig
MichaelRaskin: But code walkers don't have to use host environments. They could use CST-to-AST environments.
13:50:11
heisig
Indeed, after digging into several CL implementations, I'd say that environment augmentation is always tailored towards a particular compiler or interpreter.
13:50:19
MichaelRaskin
If I want to write a crazy macro, I do want a code walker that supports native environments
13:51:26
beach
heisig: Yes, I don't think it is possible to have an existing language processor work with Trucler anyway.
13:52:24
heisig
I have found several nice use-cases for portable environment queries, but really no good ones for portable environment augmentation.
13:53:22
scymtym
could advising/encapsulating the relevant functions be a way to make existing compilers work with trucler environments?
13:54:03
MichaelRaskin
heisig: technically speaking, powerful enough queries are sufficient to mimic augmentation, yes
14:00:44
heisig
How about having two projects/protocols - one for portable environment queries, and another one with a particular implementation of lexical environments?
14:01:10
heisig
Whether the latter is part of CST-to-AST, or a standalone library wouldn't matter much.
14:03:58
heisig
Oh, and while I am making wild proposals - I'd like to introduce functions for iterating over all visible functions/variables/blocks etc.
14:08:38
MichaelRaskin
Indeed — it doesn't have any implementation-conditioned code, an handling host environments requires some
14:11:41
heisig
Let me give a funny use-case for portable queries: One could write a (TODO) macro that touches each non-ignored variable and function to avoid compiler warnings.
14:12:15
heisig
Instead, this macro could record its presence in a database. And it could also turn into a breakpoint at runtime.
14:13:41
MichaelRaskin
My coworker actually used the debug macros I presented a year before Agnostic-Lizard