libera/#sicl - IRC Chatlog
Search
10:30:27
beach
I am about to take a long-ish lunch break. Recently, I often get the feeling that I am going around in circles. I need to break that feeling or I won't get anything done.
10:32:33
Brucio-61
sorry to hear that. don't feel obligated to pursue the approach i suggested. i am probably biased by thinking the fact that the builder protocol can do such transformations independently of the "target" builder is cool
10:34:21
beach
Sure. I think I'll do what I often do which is write something myself, and if and when I realize that I could use something existing, I'll change and adapt the code.
10:35:30
beach
By the way, I think I discovered (no doubt not as the first person) an alternative way of writing a tree transformer application. As I recall, the traditional way is to have a function that takes function arguments for pre-processing and post-processing of nodes, yes?
10:36:57
beach
But with CLOS, the primary method can do just the traversal, and client code (specializing to a CLIENT class) can define an :AROUND method to do whatever processing is required, before calling CALL-NEXT-METHOD, after calling it, or changing the node entirely and calling the traversal routine recursively on the changed node.
10:39:21
Brucio-61
right, that's a pretty flexible approach. do you generally mutate nodes or build a fresh tree for the result?
10:43:42
beach
I could do CHANGE-CLASS and then make a recursive call, since I can't do CALL-NEXT-METHOD then.
15:05:32
beach
Maybe I should work on something that does not involve type specifiers for now. I need type specifiers to turn LET* into LET, but I can turn LET into FLET without manipulating type specifiers, and I can turn FLET into LABELS and (FUNCTION (LAMBDA ...)) into FLET also without type specifiers.
16:20:53
Brucio-61
beach: 6S-EXPRESSION-SYNTAX:APPLICATION. that syntax description handles 6((lambda () ...) ...) as well as 6(FUNCTION-NAME ...)
16:35:53
beach
For what it's worth, I feel somewhat better now that I worked on some of the other AST transformations.
16:53:49
Brucio-61
beach: i pushed support for the abbreviated type declaration syntax to the 6beach branch. you should be able to simply pull the change
20:28:45
bike
I fixed up the virtual machine "cross" system so it can compile and eval in arbitrary first class environments again. and wrote out an example https://github.com/clasp-developers/cvm/tree/main/Cross
20:29:04
bike
(despite still being in clasp-developers at the moment, this works on any implementation)