-
-
Notifications
You must be signed in to change notification settings - Fork 674
make use of the b-file #41013
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
base: develop
Are you sure you want to change the base?
make use of the b-file #41013
Conversation
I'd suggest to separate |
Documentation preview for this PR (built with commit 9ed0b41; changes) is ready! 🎉 |
Do you think it's possible/ worthwhile to download only a part? How many mb could it be? |
@mantepse My concern is not about the size of b-files. Most of them have at most a few thousand terms and are not that large. So, it's fine to download b-file as a whole. My point is that the user may still want just some particular number of terms even if a larger number of terms is available. Also, value |
Ah, but that's exactly what it does. If they want 100 terms and Oeis knows 100 terms, then |
Oh, I do not see that from reading the description:
There are two things: whether or not we want to fetch the b-file, and the number of terms to return. They seem to be intermixed in an unobvious way here. To my view we should either
Also, you mention "number of available terms" - what is that? The number of terms in the OEIS entry, or the number of terms in the b-file? |
I meant the latter. What I had in mind was the following: as a user, if I want to check or make a conjecture from the first few terms, I don't care how they are obtained. So, in most cases I will want to get all of them. So, the two proposals amount to
or, with the other proposal
If for some reason I want 50 terms if at all possible, I would do
and probably
I guess one reason not to download the b-file, but other than that getting as many terms as possible is if I run through very many sequences. In this case downloading could be too expensive. (I checked, it does make a difference even if only checking 20 sequences.) So, this would be
versus
However, in this case one possibly should download the database anyway. I'm not completely decided what's really better. I must say that, generally, the |
I never used That is,
|
How about using infinity |
Note that currently the full entry of the sequence is obtained at once. Getting the b file takes additional time, and actually quite a bit. |
So, we proposed two possibilities:
I'm fine with either, but a big question remains - do we fetch b-file by default? |
No, fetching the b-file by default is not a good idea. The initial terms are in the same download as the description, so we cannot be lazy here. But the b-file is an additional download and should be avoided if possible. |
Ok, please proceed with your last suggestion then. |
Thanks! It just came to me that it'd be beneficial to have an interface global parameter controlling the default behavior for fetching b-file. E.g., I run once |
I would rather not. In what way would it be easier than calling |
For some yes, for other - not. It's an alternative approach to handling things, which I personally prefer more. Here is analogy with |
done, please check! ( |
fixes #41005
When requesting more terms, we check whether the b-file of the oeis provides them.