libera/#sicl - IRC Chatlog
Search
5:41:53
beach
In a library that I created recently ("Declare", for manipulating declarations in code), I abstracted out the operations for creating and taking apart expressions, like FIRST, REST, ATOM, CONS, so that they make an indirect call through an instance of a standard class. That way, client code can manipulate expressions in the same way, whether they are represented as S-expressions or as CSTs. I am thinking of doing two things. Number
5:41:53
beach
one would be to extract those operations to a separate library, and adding lots of useful operations to it, like MAPCAR, DESTRUCTURING-BIND, etc. Number two would be to use this library in the version of CST-to-AST (which would have to be given a different name) to make it representation neutral. While number two might sound painful, it is greatly simplified by the fact that the s-expression-syntax library is already representation
5:41:53
beach
neutral. For Second Climacs, we could then add a WAD representation to the new library. And perhaps, the s-expression-syntax library (or perhaps rather the parser.packrat library) could use the new library.
5:44:18
beach
Of course, my recent experience is that, when I have some idea like this, usually scymtym has already implemented it.
5:57:39
beach
So I guess before I start such a library, I'll wait for scymtym to tell me whether he has already done it.
6:12:35
beach
Oh, this is wonderfully circular. The s-expression-syntax library has a parser for DESTRUCTURING-BIND which can be used in this (new?) library I am thinking of, but the s-expression-syntax library would typically also (indirectly) use the library.
8:08:04
beach
Hmm. I have a class SPECIALIZED-PARAMETER-AST and a method (defined right below the class in the same file) CHILDREN that has this class as a specializer. Yet (SB-MOP:SPECIALIZER-DIRECT-GENERIC-FUNCTIONS ...) does not include the CHILDREN function.
8:12:22
beach
Oh, the problem seems to have been caused by an incorrect method qualifier on a different method. Strange stuff.
8:23:34
beach
SBCL didn't complain about adding a method with incorrect method qualifiers to the generic function. :(