Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

figuring out # of args

1 view
Skip to first unread message

Paul Tarvydas

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
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
ptar...@tscontrols.com

Barry Margolin

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
In article <fslD5.89964$dZ2.36...@news3.rdc1.on.home.com>,

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, bar...@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.

Jason Trenouth

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
On Fri, 06 Oct 2000 14:36:59 GMT, "Paul Tarvydas" <ptar...@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
> ptar...@tscontrols.com

Try using M-= in the programming environment.

__Jason

Sunil Mishra

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
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

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
Thanks everyone. These are exactly the sort of hints I was hoping for.
Keep 'em coming.
pt

Erik Naggum

unread,
Oct 6, 2000, 3:00:00 AM10/6/00
to
* "Paul Tarvydas" <ptar...@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.

0 new messages