freenode/#sicl - IRC Chatlog
Search
6:04:17
beach
ringer1: This is the right channel for discussions about Cleavir and SICL. But again, you need a lot of Common Lisp and CLOS experience to be able to actually do any substantial work.
6:04:42
beach
ringer1: If you are eager to help out, I may be able to find some tasks that don't require that much experience.
6:52:49
ringer1
I won't claim any great skills, but I do want to use this software and will try to help if that's a net positive, but I also get that trying to get someone started can be more expensive to you than it's worth
6:53:25
ringer1
I don't know much CLOS but understand it, Lisp is better; my C++ was strong but is out of date
6:53:59
ringer1
I can do Assembly (which probably isn't needed, but it mean I can also do C and LLVM)
6:55:56
ringer1
THere was an (probably) almost trivial issue on Clasp. I can pick around, maybe look at trying to get a build on Windows (for my own purposes and to document it.)
7:10:50
beach
ringer1: Cleavir is very heavy on CLOS. I suggest you stick to Clasp-specific non-CLOS code at the moment.
7:19:36
beach
The generic-function invocation protocol in environment E3 is not quite working. The reason for that is that I am faking ADD-METHOD and the fake is not doing enough. It is not updating the specializer profile, for example.
7:19:45
beach
So instead of faking it, I would like to use the production SICL version of ADD-METHOD. The problem is that ADD-METHOD is a generic function, so we have a circular dependence.
7:19:57
beach
Luckily, the code is structured so that the specified methods of all significant generic functions do nothing but call a function to do the job.
7:19:59
beach
So the solution here is to introduce the function ADD-METHOD-DEFAULT in E3 under the name ADD-METHOD. That way, generic-function invocation does not have to work for ADD-METHOD to work, and we break the circularity.
7:21:26
beach
I structured the code like this for maximum flexibility during bootstrapping, but in fact, I don't think of this particular possibility very often. I should think harder. :)
7:23:54
beach
ADD-METHOD invokes the "dependent maintenance protocol" http://metamodular.com/CLOS-MOP/dependent-maintenance-protocol.html, but that one I will definitely fake, because there are no dependents during bootstrapping. All I need to do is define MAP-DEPENDENTS to do nothing and UPDATE-DEPENDENT to call ERROR (because UPDATE-DEPENDENT should never be called).
7:52:18
beach
So I can't use the production ADD-METHOD to add a method to a generic function, because it would invoke the accessor to add the method.
8:26:48
beach
OK, so generic functions in environment E2 are host generic functions. Functions that operate on these generic functions should be defined in E1, because that's the pattern I have decided upon (for reasons I won't go into here).
8:27:43
beach
However, I import ADD-METHOD from the host into E2, even though ADD-METHOD is at the same level as an accessor. I should really import it into E1.
8:28:40
beach
Generic function in E3 are bridge generic functions. The host doesn't know what to do with those, so I define my own way of executing them. The SICL technique.
8:29:48
beach
But, because ADD-METHOD was taken in E2, I define ADD-METHOD for bridge generic functions in E3. This is a mistake, because it needs to call accessors defined in E2.
8:30:45
beach
If I fix this problem, I should be able to use the production ADD-METHOD, provided I define it in E2.
8:31:12
beach
So, why do I import the host ADD-METHOD into E2? Probably because it makes it easier to define DEFMETHOD in E2.
8:32:43
beach
So the mission for today (and maybe more) is to figure out how I can define DEFMETHOD in E2 so that it invokes ADD-METHOD in E1, thereby making it possible to define SICL ADD-METHOD in E2 to be invoked by DEFMETHOD in E3.
8:33:43
beach
Once I understand this stuff, I should be able to write it down. Hopefully in a way that others can understand as well.
8:34:48
beach
By the way, part of why I am blabbing so much here is that this channel is logged. So I should be able to consult the logs to understand what I was thinking at the time, given that there is no way I will remember it.
8:52:57
beach
In the SICL MOP, I define this additional function (not specified by the AMOP) named ENSURE-METHOD.
8:55:21
beach
So the definition of ENSURE-METHOD needs to move one step down. The one currently in E2 should move to E1, and the one currently in E3 should move to E2.
9:03:39
beach
The only problem with that idea is that, in the next phase, I need to load it into E2 and move the definition into E3, but then I will clobber the definition in E2.
9:19:03
beach
I think I am on the right track. I think I just identified some more specialized code that I can eliminate if I do it this way.
9:27:43
beach
Bad news: It is currently a mess. Good news: When I clean it up, it will be much prettier.