libera/#climacs - IRC Chatlog
Search
9:06:37
scymtym
ok, i think. the structure editing functions as a whole were more work than i had thought. i want to work on the cache invalidation for incrementalist next
9:09:23
scymtym
and there is a little "easter egg": you can mark put point into an expression or mark some text and extract that into a function with the "extract as function" command. a proper version will need the ast to find free variables and also indentation, but i thought i could add something fun
9:11:44
scymtym
it asks the user for a name, replaces the expression or region with 06(NAME), moves points after the toplevel form and inserts 06(defun NAME () CONTENT-OF-EXPRESSION-OR-REGION)
9:13:19
scymtym
it is pretty easy to express with the available abstractions: https://github.com/robert-strandh/Second-Climacs/blob/master/Code/GUI/McCLIM-ESA/Base/transform-table.lisp#L103-L121
9:14:50
beach
Yes, very nice! Given those abstractions, I hope that others will come up with some interesting refactoring code as well. This could increase interest for our stuff.
9:20:15
scymtym
right. i did my best to document the text.editing library properly. same for incrementalist but given that incrementalist can be used via the "expression" protocol of the text.editing library, i can imagine that incrementalist will mostly be used indirectly
9:22:55
scymtym
right, and that is without the ast. i imagine common operations will be getting the cst or ast "at point" or moving point according to the structure of one of those trees. the "expression" protocol should be enough for those cases
9:24:13
beach
Are you thinking of using Iconoclast, or your own ASTs? Or maybe you haven't given it any thought.
9:30:01
scymtym
i haven't thougth about the concrete representation since it just entails switching the builder for what i'm doing so far. my ast+cst-based syntax highlighting needs the "destructuring" part of the builder protocol which iconoclast mostly supports, i think
9:31:37
beach
I don't remember that part, but you may be right. Also, an advantage of Iconoclast is that it is used by Common Boot which provides functionality we will eventually need, like generating code from MACROLET.
9:32:39
beach
... and simpler stuff like connecting definitions and uses of lexical variables and such.
9:32:57
scymtym
yes. would you prefer the cps evaluator or the maclina bytecode machine for performing the required evaluation (read-time evaluation and custom reader macros as well)
9:35:16
beach
Either way, we need a way to analyze the code in a way that we can then access the analysis to provide feedback for the user.
9:36:23
scymtym
there would probably be a significant mismatch since i don't think maclina can consume asts
9:37:40
scymtym
an additional code generator. maclina provides one but i think it does either s-expr -> bytecode or cst -> bytecode
9:38:25
beach
The thing about the CPS code is that it is very large, but then, code is required only in a few situations. And I am planning to optimize the AST tree at some point.
9:38:51
scymtym
the cps evaluator may also be more convenient when, for example, a macro expander signals an error and we want to point to the code
9:39:19
beach
That might very well be the case, yes. I try to preserve source information as much as possible.
9:40:16
scymtym
we will see. i expect some challenges in that area. for example, there will probably be macro expanders that can't run to completion because they do too much work
9:40:49
scymtym
anyway, i have to fix the cache invalidation first or we won't even have a reliable cst