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
libgap: do not restrict libgap.<tab> completion to a fixed list #27923
Comments
comment:1
If we agree that this is the way to go, I can take care of the implementation. |
comment:2
What I'd like to understand whether with this approach there is a performance hit if one |
comment:4
Hi Dima,
This ticket is only about tab completion (VIA |
comment:5
What is the relationship between this ticket, and #27911 which is older? |
comment:6
their exact relationship status is "legally separated" :-) |
comment:7
:-) #27911 is about attribute access |
comment:8
I see, yes that's a subtle difference. In practice there's a lot of overlap in terms of the implementation details. I've never quite understood the current implementation that uses (and limits one to) a hard-coded list. I remember asking about this on sage-devel a while ago when I was first dealing with it, and nobody had a very concrete answer, including Volker who I think wrote it (not sure though). Would definitely give +1 to a better solution if there is one. |
comment:9
Just repeating my comment from #27911, this tends to cough up a lot of private / undocumented functions in GAP that necessarily are in the public GAP namespace but users aren't supposed to access. The current implementation uses IsDocumentedWord to only return documented symbols. Which also is slow as molasses since it grinds through the documentation, so it needs to be cached. On the plus side, gap itself tab-completes over everything so at least we'd match that bug/misfeature/feature (pick your choice). So I'm fine with changing it... |
comment:10
Thanks Volker for the feedback! Agreed, displaying private functions is on the misfeature side. Hopefully that will eventually get fixed on the GAP side. If no one objects I'll make libgap's completion consistent with GAP's later this week or during Cernay. |
comment:11
I agree with Volker that it's a shame that GAP's global namespace is so overloaded, but that's a (mis)feature of GAP that it doesn't ultimately help us to fight against. Perhaps as a policy, when using GAP code internally in Sage only those functions for which |
comment:12
Replying to @embray:
Ok! I'll proceed then. Thanks for feedback.
+1 |
comment:13
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9). |
Changed keywords from none to gap libgap |
comment:15
Anything on this in view of gappy ? |
comment:17
It's been on my todo list but I didn't make an explicit issue for it; thanks for reminding me: embray/gappy#15 |
Since #19917, tab completion on
libgap
returns a fixed list. As noted there, new global functions and objects introduced when loading packages remain therefore hidden. Now that loading packages in libgap is much better supported, this is really becoming an issue.Proposal, after discussion with GAP devs: use the same implementation as in the plain
gap
interface (namely ask GAP for the list of global names), without a cache.Pros:
Principle of less surprise: keep plain GAP, Sage's
gap
and Sage'slibgap
consistent;Follow the design decisions of GAP to take advantage of their expertise;
Supports loading packages and advertising their content (this support was postponed to a later ticket in Libgap tab completion #19917);
No need any more to maintain in Sage a list of "important" GAP functions.
With libgap, fetching the list of global GAP symbols is quasi instantaneous:
Hence the implementation is simple; we need not worry about caching, invalidating the cache upon loading packages, ...
Con:
CC: @vbraun @tscrim @dimpase @embray
Component: interfaces
Keywords: gap libgap
Issue created by migration from https://trac.sagemath.org/ticket/27923
The text was updated successfully, but these errors were encountered: