1
0
Fork
You've already forked racket
0

Racket definition messages vague compared to other implementations #1

Open
opened 2019年03月14日 23:33:41 +01:00 by juszczakn · 11 comments
juszczakn commented 2019年03月14日 23:33:41 +01:00 (Migrated from gitlab.com)
Copy link

It seems like the Racket function definitions that geiser is providing are pretty vague.

racket

I installed guile just to get a comparison:

guile

I'd be interested in looking into this issue actually, do you have any pointers as to where to start? Maybe this is just a limitation of how Racket exports symbols?

EDIT:

Looks like it's down to autodoc.rkt/parse-signatures and locations.rkt/symbol-location. The module name for a lot of core functionality in racket is resolving to %runtime and the like, instead of actual files for geiser to go and parse. I updated symbol-location* to resolve to an actual file path with:

 (resolved-module-path-name
 (module-path-index-resolve (third binding))))

but that just resolves to ...racket/collects/racket/main.rkt, which is just where the majority of racket's base symbols are required and then provided from.

It looks like the vague function definitions for most of the core library is because, since no source file is found, it just ends up calling autodoc.rkt/infer-signatures.

More to come, if/when I get back to this.

It seems like the Racket function definitions that geiser is providing are pretty vague. ![racket](/uploads/99af4aaf64c1f0f268938a8026a0ed05/racket.png) I installed guile just to get a comparison: ![guile](/uploads/d09d6882e903acdfd707c234aa5ba6ef/guile.png) I'd be interested in looking into this issue actually, do you have any pointers as to where to start? Maybe this is just a limitation of how Racket exports symbols? EDIT: Looks like it's down to `autodoc.rkt/parse-signatures` and `locations.rkt/symbol-location`. The module name for a lot of core functionality in racket is resolving to `%runtime` and the like, instead of actual files for geiser to go and parse. I updated `symbol-location*` to resolve to an actual file path with: ``` (resolved-module-path-name (module-path-index-resolve (third binding)))) ``` but that just resolves to `...racket/collects/racket/main.rkt`, which is just where the majority of racket's base symbols are required and then provided from. It looks like the vague function definitions for most of the core library is because, since no source file is found, it just ends up calling `autodoc.rkt/infer-signatures`. More to come, if/when I get back to this.
juszczakn commented 2019年03月14日 23:45:52 +01:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
juszczakn commented 2019年03月15日 03:18:58 +01:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
juszczakn commented 2019年03月15日 03:19:34 +01:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
juszczakn commented 2019年03月15日 03:20:59 +01:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
juszczakn commented 2019年03月15日 03:25:16 +01:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
jaor commented 2019年03月15日 22:57:53 +01:00 (Migrated from gitlab.com)
Copy link

AFAIR, that's all the location information that racket is ever going to provide because those %-modules belong to the C-world (or belonged, when i implemented it... most of the time it was %kernel then). But maybe there's some other info somewhere...

AFAIR, that's all the location information that racket is ever going to provide because those %-modules belong to the C-world (or belonged, when i implemented it... most of the time it was %kernel then). But maybe there's some other info somewhere...
juszczakn commented 2019年04月02日 01:30:42 +02:00 (Migrated from gitlab.com)
Copy link

So, looking back into this again. All this documentation lives in scrbl files, so I'm looking into possibly seeing what it would take to parse the scrbl docs to be able to generate the signatures. Certainly a bit of a roundabout and buggy way to do things :|

So, looking back into this again. All this documentation lives in scrbl files, so I'm looking into possibly seeing what it would take to parse the scrbl docs to be able to generate the signatures. Certainly a bit of a roundabout and buggy way to do things :|
juszczakn commented 2019年04月02日 04:35:45 +02:00 (Migrated from gitlab.com)
Copy link

I've got something that kinda works, using this idea.

https://gitlab.com/juszczakn/geiser/commits/scribscrape

It's not pretty and I'm sure it's buggy, but it seems to work for a lot of basic functions. I'll need to use it a bit to work out some of the bugs.

Screenshot_from_2019年04月01日_21-42-57
Screenshot_from_2019年04月01日_21-43-11

I've got something that kinda works, using this idea. https://gitlab.com/juszczakn/geiser/commits/scribscrape It's not pretty and I'm sure it's buggy, but it seems to work for a lot of basic functions. I'll need to use it a bit to work out some of the bugs. ![Screenshot_from_2019年04月01日_21-42-57](/uploads/ccbe6bb093c1e6aee7364c9848de6a95/Screenshot_from_2019年04月01日_21-42-57.png) ![Screenshot_from_2019年04月01日_21-43-11](/uploads/db595b9a2c2889398bbd48eb87bb9435/Screenshot_from_2019年04月01日_21-43-11.png)
jaor commented 2019年04月02日 20:43:04 +02:00 (Migrated from gitlab.com)
Copy link

thanks, this looks interesting... if you want to test it a bit more and
submit a PR, i think we can include it in the master branch. it's
better than nothing (as an aside, this could be something that racket
itself provides as part of their introspection/help API, so another
possibility would be to ask in their lists to have something like this
included.

thanks, this looks interesting... if you want to test it a bit more and submit a PR, i think we can include it in the master branch. it's better than nothing (as an aside, this could be something that racket itself provides as part of their introspection/help API, so another possibility would be to ask in their lists to have something like this included.
jaor commented 2020年07月20日 06:58:48 +02:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
jaor commented 2020年07月20日 06:58:49 +02:00 (Migrated from gitlab.com)
Copy link

moved from jaor/geiser#270

moved from jaor/geiser#270
Sign in to join this conversation.
No Branch/Tag specified
master
0.16
0.14
0.11.2
0.11.1
0.11
0.9
0.10
0.8.1
0.8
0.7
0.6
0.5
0.4
0.3
0.2.2
0.2.1
0.2
0.1.4
0.1.3
0.1.2
0.1.1
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geiser/racket#1
Reference in a new issue
geiser/racket
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?