From: Paul Tarvydas
Subject: figuring out # of args
Date: 
Message-ID: <fslD5.89964$dZ2.36271417@news3.rdc1.on.home.com>
In the old days, it used to be possible to explore a lisp system by looking
at the OBLIST and perusing arguments in the lambda-lists of functions
(stored on a p-list).

I don't know how to do such exploration in modern c-lisp (specifically
Xanalys).  I've hit a number of occassions where, due to apparent lack of
documentation, I wanted to explore to see if a function to do what I wanted
already existed (esp. CAPI stuff).  Sometimes I stumbled on a function with
a suggestive name, but couldn't figure out how many args it needed.

Am I missing something?  Are there tricks that I haven't thought of?  Or,
does the compiled nature of lisp prevent me from actually digging that
deeply?

thanx for any hints
pt
·········@tscontrols.com

From: Barry Margolin
Subject: Re: figuring out # of args
Date: 
Message-ID: <%TlD5.59$Uc7.792@burlma1-snr2>
In article <························@news3.rdc1.on.home.com>,
Paul Tarvydas <·········@tscontrols.com> wrote:
>In the old days, it used to be possible to explore a lisp system by looking
>at the OBLIST and perusing arguments in the lambda-lists of functions
>(stored on a p-list).
>
>I don't know how to do such exploration in modern c-lisp (specifically
>Xanalys).  I've hit a number of occassions where, due to apparent lack of
>documentation, I wanted to explore to see if a function to do what I wanted
>already existed (esp. CAPI stuff).  Sometimes I stumbled on a function with
>a suggestive name, but couldn't figure out how many args it needed.
>
>Am I missing something?  Are there tricks that I haven't thought of?  Or,
>does the compiled nature of lisp prevent me from actually digging that
>deeply?

Try the DESCRIBE function.  The output of this is implementation-dependent,
but I suspect that most implementations will include argument information
when describing a function.

-- 
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Jason Trenouth
Subject: Re: figuring out # of args
Date: 
Message-ID: <a4trtsskk29tb81mu737q7uha0dn45jt7s@4ax.com>
On Fri, 06 Oct 2000 14:36:59 GMT, "Paul Tarvydas" <·········@tscontrols.com>
wrote:

> In the old days, it used to be possible to explore a lisp system by looking
> at the OBLIST and perusing arguments in the lambda-lists of functions
> (stored on a p-list).
> 
> I don't know how to do such exploration in modern c-lisp (specifically
> Xanalys).  I've hit a number of occassions where, due to apparent lack of
> documentation, I wanted to explore to see if a function to do what I wanted
> already existed (esp. CAPI stuff).  Sometimes I stumbled on a function with
> a suggestive name, but couldn't figure out how many args it needed.
> 
> Am I missing something?  Are there tricks that I haven't thought of?  Or,
> does the compiled nature of lisp prevent me from actually digging that
> deeply?
> 
> thanx for any hints
> pt
> ·········@tscontrols.com

Try using M-= in the programming environment.

__Jason
From: Sunil Mishra
Subject: Re: figuring out # of args
Date: 
Message-ID: <39DE05CF.90907@everest.com>
Paul,

I'm not sure entirely what you are asking for. If you are asking for 
hints on how to explore systems, I can give you a few that have proved 
very useful for me.

Most systems are constructed around packages, and getting the exported 
symbols of a package generally turns out to be useful. Try 
do-external-symbols (or one of the other do-*-symbols iterators) to get 
the symbol names. Apropos tends to be useful if you have some notion of 
what the symbol might contain, but then you probably have already run 
into that one.

For xanalys specific tricks, try using the generic function and class 
explorers in the gui tools they provide. Believe it or not, these tools 
actually turn out to be useful at times :-) To get information about 
function arguments, there is lw:function-lambda-list, a handy function 
that I have found myself using rather frequently.

Then there are various cross-referencing tools that give you who-calls 
(and I think who-is-called-by) information about a function. I think 
there is enough to get you started in the user manuals, but you will 
certainly have to do further exploration yourself.

Good luck!

Sunil

Paul Tarvydas wrote:

> In the old days, it used to be possible to explore a lisp system by looking
> at the OBLIST and perusing arguments in the lambda-lists of functions
> (stored on a p-list).
> 
> I don't know how to do such exploration in modern c-lisp (specifically
> Xanalys).  I've hit a number of occassions where, due to apparent lack of
> documentation, I wanted to explore to see if a function to do what I wanted
> already existed (esp. CAPI stuff).  Sometimes I stumbled on a function with
> a suggestive name, but couldn't figure out how many args it needed.
> 
> Am I missing something?  Are there tricks that I haven't thought of?  Or,
> does the compiled nature of lisp prevent me from actually digging that
> deeply?
> 
> thanx for any hints
> pt
> ·········@tscontrols.com
From: Paul Tarvydas
Subject: Re: figuring out # of args
Date: 
Message-ID: <fNrD5.90951$dZ2.37008118@news3.rdc1.on.home.com>
Thanks everyone.  These are exactly the sort of hints I was hoping for.
Keep 'em coming.
pt
From: Erik Naggum
Subject: Re: figuring out # of args
Date: 
Message-ID: <3179836218724464@naggum.net>
* "Paul Tarvydas" <·········@tscontrols.com>
| I don't know how to do such exploration in modern c-lisp
| (specifically Xanalys).  I've hit a number of occassions where, due
| to apparent lack of documentation, I wanted to explore to see if a
| function to do what I wanted already existed (esp. CAPI stuff).
| Sometimes I stumbled on a function with a suggestive name, but
| couldn't figure out how many args it needed.

  I would expect to find a function with a suggestive name like
  "arglist" or somesuch that returns helpful information on the
  argument list.

| Am I missing something?  Are there tricks that I haven't thought of?
| Or, does the compiled nature of lisp prevent me from actually
| digging that deeply?

  That probably depends on how quick you are to understand disassembly.

#:Erik
-- 
  If this is not what you expected, please alter your expectations.