Search
Wednesday, 10th of October 2018, 0:57:11 UTC
1:07:21
no-defun-allowed
hi s-geometry
2:19:52
Guest68062
** NICK PuercoPop
2:26:50
ealfonso
Why do I get different results with macro vs macrolet? https://pastebin.com/4nu0qsr9
2:27:38
beach
Good morning everyone!
2:27:39
|3b|
you need to pass the local environment to macro0expand to see macrolet
2:28:24
|3b|
ACTION doesn't remember if there is a better way to get that local environment than with a macro or not
2:29:29
|3b|
macro/macrolet accept &environment lambda-list keyword to let you get access to the environment while expanding the macro
2:32:24
|3b|
something like (defmacro x (form &environment e) `',(macroexpand form e))
2:33:12
|3b|
then inside your macrolet (x (slot my-slot)) will expand to '(my-slot ...)
2:54:26
ealfonso
actually I'm still stuck... shouldn't the inner macro (defined via macrolet) be expanded before the defclass macro? https://pastebin.com/1U571DZC
2:56:08
Bike
since that's not even in a normal evaluation context, the my-local-slot-macro form will never be evaluated, so it's just a syntax error.
2:56:53
beach
ealfonso: Macro calls are expanded only when they are in a position of evaluation.
2:57:24
beach
ealfonso: The slots of a DEFMACRO form are not in such a position.
2:57:44
beach
I am saying the same thing as Bike, only with different words.
6:44:27
no-defun-allowed
morning shka_
Wednesday, 10th of October 2018, 12:57:11 UTC