-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there anyway for us to look up symbols of one module like Python dir(object) to look up the attributes (methods and attributes) #48
Comments
I'm not sure about other Scheme implementations but in LIPS (my scheme) I've added But I'm not sure how much possible is to add those to a compiler, a lot of scheme implementation just compile the code on the fly and then evaluate the results and don't expose internals. |
egg |
Geiser can only do it if the Scheme implementation can do it.
|
The Chez Scheme API is decent. It would be good to standardize in a SRFI. @jcubic is right that when compiling Scheme code, the compiler may throw away the information needed to query the libraries, but in the REPL it should work in all Scheme implementations. |
That is why I said that building the docker image with source code with an additional module to looking up symbols for the modules in the implementations is reality now. Having a SRFI to standardize would be great. |
Few Scheme implementations provide a R5RS mode with nothing extra. Most of them add:
I don't know which implementation is closest to R5RS with nothing else. |
An easier way to do that might be to parse the source code of the implementation. Scheme code is easy to parse. |
Here's a |
thanks |
Yes. That is a correct implementation for people to go with. In Chicken, from toplevel module perspective, the user in REPL to evaluate an expression, which invoke the procedures, and the |
SRFI 17 and 28 are built into Chicken. They don't have their own source files (or |
One more thing is that in Python3, there is one module |
For instance, In Chicken ,we can inspect the source code of exported symbols in the module of the egg |
in Python, it's easy because AFAIK in Python everything is the first-class citizen including modules, classes, and meta classes. In Scheme, you will need to write a static code analyzer unless implementation provides a mechanism for inspecting things. |
Every Scheme REPL knows about all the libraries and what they export. We just don't have a standard API to ask the REPL about those things. |
AFAIK Scheme libraries are not first-class objects in most implementations, but they could be. RnRS allows that. |
@jcubic static code analyzer, like JS, c and c#, they have this concept, which is that before you submit the source code to the repo, those source code should be passed by scanning tool for static code analyzer. But in Scheme, sound like that there is not this concept, you wrote scheme code, which is all kind of forms, those forms is accepted by the compiler, then that is. |
I was thinking about the boundary, which is that for instance, the |
There are two levels:
Chez Scheme has APIs like The package level isn't as easy to standardize, but we should try anyway. |
|
Sound like that in order to support In the package level, Maybe phpDocumentor is the way to go, which that the source code as the input to generate the document for the people to look up .The package level is in the document level. Although, in library/module, they still can look up the modules/functionalities,methods/classes in REPL. But that is for the debug and performance. |
Is there anyway for us to look up symbols in REPL in one module(
,m r5rs
) ,and like Python dir(object) to look up the attributes (methods and attributes)? Seem like there is an eggapropos
to help out. But as I installed it. It is more like emacs-symbolist to look up symbols present in the currently running REPL session. For instance,call-with-port
is in the moduler7rs
in chicken implementation, But afterimport r7rs
, whichever module (,m r5rs
or,m r7rs
)are you in, they always check with symbols by,a call-with-port
in the moduler7rs
.The text was updated successfully, but these errors were encountered: