libera/#climacs - IRC Chatlog
Search
14:32:55
beach
More ideas. The desired *relative* (to the parent wad) indentation of a wad depends on the role of that wad in its parent. The indentation of a wad representing an argument of a function call is calculated differently from that of the binding of a LET special form or a lambda list. And whether we draw an arrow that indicates incorrect indentation depends only on the relative calculated indentation.
14:33:02
beach
Now suppose the user does something nasty like inserting the left parenthesis of a new LET binding. Then lots of expressions in the buffer have their relative positions as children changes, but my guess is that most expression wads preserve their roles preserved. So if we indicate in the wads what role was used to compute the relative indentation of its children, we have to redo that computation only when its role changes.
14:34:51
beach
About compilation, I think we need something like Bike's linter, though it is possible that he didn't pay too much attention to performance. We may need a compiler that is fast, that does not optimize for performance of the resulting code, but that may optimize for other reasons such as detecting dead code.
14:36:22
beach
Such a compiler may need its own intermediate representation. But the good news (at least I think so) is that such a compiler is relatively simple compared to one that must optimize for performance of the resulting code.
14:46:46
beach
I just did a performance test. I compiled the function that computes the indentation of a DEFMETHOD. It is more than 50 lines long, it contains several macro calls, including a LOOP. It contains an FLET with two functions. Many function calls are to generic functions, usually accessors. Compilation with SBCL using my default settings, with DEBUG 3 etc, took 0.008 seconds.
14:47:36
beach
I think this means that we can probably stop worrying about the time it takes to compile a top-level form in a buffer.
14:48:34
beach
I didn't do a file compilation. I first read the form and then compiled it as a lambda expression using COMPILE.