From: Erik H. <eh...@gm...> - 2009-03-01 09:19:45
|
Hi Russell, Welcome to ABCL development. On Sat, Feb 28, 2009 at 10:29 PM, Russell McManus <rus...@ya...> wrote: > I'd like to help improve abcl's introspective capabilities. That would be great. > I'm working towards a slime patch that extends the slime inspector with custom inspector > methods for java objects, classes, and methods. > > At present the feature I'm stumped on is getting DESCRIBE to produce docstrings. Perhaps I'm > missing something simple, and this feature is available, if so please let me know. > > For example: > > ABCL> (describe 'java:jinterface-implementation) > ; No value > > Ouch! > > ABCL> (defun foo () "foo's docstring" nil) > FOO > ABCL> (describe 'foo) > ; No value > > sbcl produces the following: > > SBCL> (defun foo () "foo's docstring" nil) > FOO > SBCL> (describe 'foo) > FOO is an internal symbol in #<PACKAGE "COMMON-LISP-USER">. > Function: #<FUNCTION FOO> > Its associated name (as in FUNCTION-LAMBDA-EXPRESSION) is > FOO. There are no arguments. > Function documentation: > foo's docstring > Its defined argument types are: > NIL > Its result type is: > (VALUES NULL &OPTIONAL) > On Sat, Feb 28, 2009 03:25:18 PM CST it was compiled from: > (LAMBDA () > (DECLARE (MUFFLE-CONDITIONS COMPILER-NOTE)) > (PROGN (SB-INT:NAMED-LAMBDA FOO NIL (BLOCK FOO NIL)))) > > ; No value > > > I'd like do some work on adding this feature. Looking at the problem for an hour or so, > I think that changes to the compiler are required. The compiler is complicated though, and > I did not make great progress. Well, you could start with the low hanging fruit: describing from which packages a symbol is accessible and indicating if it's special and / or if it's bound or fbound. After that, things become more complicated. I found the compiler somewhat complex too, so I too have been making notes. I've tried to summarize them on the ABCL wiki. Did you see this: http://trac.common-lisp.net/armedbear/wiki/DesignOverviewIndex ? I'd be happy to incorporate your notes, or, if you have a common-lisp.net account, you can add them yourself. > Any suggestions on how to proceed would be much appreciated. All I accomplished today > was writing some basic notes on how the compiler works, but I'm starting with zero knowledge. I think you're correct when you say that documentation gets lost and the compiler needs to be adapted to support it. I think there's a FIXME in compiler-pass1 or precompiler, which simply ignores the documentation. But there would also be the question: if the documentation gets stored somewhere, how do we retrieve it from there? I'd love to continue the discussion and help you find what you need to implement the required features. If you need "live" support, I'm regularly in #abcl on irc.freenode.net (firefox url: irc://irc.freenode.net/#abcl), my nick is ehu. Bye, Erik. |