Discussion:
[Larceny-users] apropos for Larceny
KenD
2016-07-01 21:18:10 UTC
Permalink
Greetings,

As an occasional Scheme user, I forget the details and find an "apropos" function useful.

(apropos "foo")

will look in Larceny's interaction-environment and return a list of variable-name symbols which contain a match to "foo".

e.g.
(import (scheme load))
(load "apropos.scm")
(apropos "conso")
(console-error-port
console-error-port-factory
console-input-port
console-input-port-factory
console-output-port
console-output-port-factory)

-----
-KenD
-----
PS: Sorry about the legal boiler plate.
If you (re)distribute, feel free to substitute any open source licence you are currently using.
Lars T Hansen
2016-07-01 22:17:15 UTC
Permalink
There's also an apropos function already. Try (require 'apropos) to load
it.

--lars
Post by KenD
Greetings,
As an occasional Scheme user, I forget the details and find an "apropos" function useful.
(apropos "foo")
will look in Larceny's interaction-environment and return a list of
variable-name symbols which contain a match to "foo".
e.g.
(import (scheme load))
(load "apropos.scm")
(apropos "conso")
(console-error-port
console-error-port-factory
console-input-port
console-input-port-factory
console-output-port
console-output-port-factory)
-----
-KenD
-----
PS: Sorry about the legal boiler plate.
If you (re)distribute, feel free to substitute any open source licence you
are currently using.
_______________________________________________
Larceny-users mailing list
https://lists.ccs.neu.edu/bin/listinfo/larceny-users
KenD
2016-07-01 23:29:59 UTC
Permalink
On Sat, 2 Jul 2016 00:17:15 +0200
Post by Lars T Hansen
There's also an apropos function already. Try (require 'apropos) to load
it.
--lars
Thanks. I missed that.

Er, how does one import that with/into -r7rs mode?

Thanks,
-KenD
========================================================
Larceny v0.99 "Goldie" (May 25 2016 08:17:39, precise:Linux:split)
larceny.heap, built on Wed May 25 08:20:15 PDT 2016
Post by Lars T Hansen
(import (primitives r5rs:require))
(r5rs:require 'apropos)
#t
Post by Lars T Hansen
apropos
Error: unhandled condition:
Compound condition has these components:
#<record &assertion>
#<record &message>
message : "?: undefined global variable: apropos \n"

Entering debugger; type "?" for help.
debug>
========================================================
William D Clinger
2016-07-01 23:51:49 UTC
Permalink
Post by KenD
Post by Lars T Hansen
There's also an apropos function already. Try (require 'apropos) to load
it.
--lars
Thanks. I missed that.
Er, how does one import that with/into -r7rs mode?
(import (primitives r5rs:require))
(r5rs:require 'apropos)
#t
Post by KenD
(import (primitives apropos)) ; could have been done by earlier import
(apropos "conso")
(console-error-port
console-error-port-factory
console-input-port
console-input-port-factory
console-output-port
console-output-port-factory)


This does not find macros, which use a different mechanism.

Will
KenD
2016-07-02 03:02:30 UTC
Permalink
On Fri, 1 Jul 2016 19:51:49 -0400 (EDT)
KenD
Post by KenD
Er, how does one import that with/into -r7rs mode?
(import (primitives r5rs:require))
(r5rs:require 'apropos)
(import (primitives apropos))
Ah! Much better!!!

I had tried IMPORT and REQUIRE separately in different sessions.

Requiring both forms is not intuitive.

I guess I really need to find time to read more of the documentation.

Oh, and I just found the larceny/lib directory BTW. Much goodness.

I have habitually cd'd to larceny/src to start searches and did not find apropos in larceny/src/{Lib,Rts,*}.

Thanks for bearing with me. I really am slow about such things. At this point you have to consider me a "programming hobbyist"

Cheers,
-KenD

Loading...