-
-
Notifications
You must be signed in to change notification settings - Fork 125
Also use mirror services for GNU languages in the "latest-langs" script and show a progress bar like curl #2413
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
Open
Yewzir
wants to merge
15
commits into
code-golf:master
Choose a base branch
from
Yewzir:ftpmirror-gnu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here I've used a different approach. The assignment for the first language in the list is saved and processed for use with the other languages. This seems more efficient than repeatedly executing the query method.
I think I've run the script almost a thousand times, if not more. With the most recent commit, it never crashed, so here it is.
Contributor
Author
|
Now is a good time for reproduction, because things have been going smoothly the last few weeks, but as I said before, it is quite unpredictable. $ time ./latest-langs AWK Bash Forth sed
AWK 5.3.2 → 5.3.2
Bash 5.3.3 → 5.3
Forth 0.7.3 → 0.7.3
sed 4.9 → 4.9
real 3m29.247s
user 0m1.774s
sys 0m0.042s$ time ./latest-langs AWK Bash Forth sed
AWK 5.3.2 → 5.3.2
Bash 5.3.3 → 5.3
Forth 0.7.3 → 0.7.3
sed 4.9 → 4.9
real 6m12.147s
user 0m1.586s
sys 0m0.103s |
The URL still needs to be generated once, but if the mirror service goes down, as is currently the case, the "normal" and generally slower domain is used.
Contributor
Author
|
The last commit causes a progress bar to appear while the script is executing, regardless of how the script was started. oh@Yewzir:~/code-golf$ ./latest-langs --all
######################## 34.4% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I'm trying to improve here is the often long wait times for the GNU languages. Currently, they use ftp.gnu.org/gnu/, but it usually takes a long time to get there. It's quite unpredictable, but I think this can be improved. Based on these commits, ftpmirror.gnu.org/gnu/ is used to navigate to the currently available and usually fastest mirror service. This service is only consulted once for the first GNU language in the list and is maintained for all other GNU languages. Unfortunately, the sorting
?C=M;O=Dis lost by simply changing "ftp" to "ftpmirror", and not every mirror service supports this sorting method, but I've tried to solve this as best I can.