20031122, 14:20  #1 
Sep 2002
2×331 Posts 
Triple ranking report program
A small windows program to create a new ranking report using
the file ftops.txt from the link http://mersenne.org/primenet/ftops.txt and initially produce a modified version substituting the column P90 CPU hrs/day  with Total P90 CPU yrs  either reusing the Rank column for combined rank OR leaving the Factoring rank and putting a new column before it with Total rank. (probably reuse the Rank column). An ideal list would have the three ranks Total, LL, Factoring. A triple rank report with the 3 ranks, Account ID, the 3 CPU yrs. The first version will leave the Factoring Rank values alone but sort them by Total CPU yrs, repurpose the last column, making it hold Total P90 CPU yrs. An eventual version will be the triple report. 
20031122, 14:43  #2 
Banned
"Luigi"
Aug 2002
Team Italia
2×2,417 Posts 
You could use two edit boxes, one for ftop.txt and one for the one merged in the topproducers.shtml page, and merge accounts.
Or just add edit boxes where you could insert your personal stats. Luigi 
20031122, 15:03  #3 
Sep 2003
Borg HQ, Delta Quadrant
2×3^{3}×13 Posts 
Let's not get ahead of ourselves. First step is to get the info we need. Shouldn't be a big problem considering that each column is a fixed distance from beginning of the line and each line has the same length. So we just skip to info we need (UserID, factoring years, LL years) copy the appropriate number of characters, strip out any leading blanks, then convert from ASCII to decimals which we can then add together. The tricky part will be to resort them. Any ideas on an efficient way to do that?

20031122, 15:12  #4 
Banned
"Luigi"
Aug 2002
Team Italia
2·2,417 Posts 
Easy.
You create an array of strings, cut the original string in substrings having the needed length (the fields of the array), use the "StringToInt" function on the numeric fields and finally apply a quicksort on the specified field. The other fields will follow automagically. Luigi 
20031122, 15:27  #5 
Sep 2003
Borg HQ, Delta Quadrant
2×3^{3}×13 Posts 
That QuickSort sounds like a nice function. Too bad MASM doesn't have something similar. But if we were to write it in MASM we could still code a similar function ourselves. All that quicksort seems to do is compare a value with the value below it. If the below value is higher, it flips them and continues through the list. Then it continues to call itself until the entire list has been sorted. But considering the size of the ftops.txt list it would be difficult to reserve and use that much memory, not to mention that you wouldn't have a fixed size so you have reserve as you go. If this is to be programmed it looks like MASM is not the optimal choice.

20031122, 17:02  #6 
Banned
"Luigi"
Aug 2002
Team Italia
2×2,417 Posts 
Well, we could use a list of pointers instead...
Luigi 
20031122, 17:05  #7  
Aug 2002
3·83 Posts 
Quote:


20031122, 18:35  #8 
Jun 2003
364_{8} Posts 
The algo PrimeCruncher described sounds more like a Bubble sort than a quicksort. Bubble sort has runtime O(n^2) which is really slow. Quicksort is much faster somewhere around nlogn or maybe even logn. You can also try mergesort or heapsort maybe :) The only type of sort I know how to do in assembly (just had assembly programming this quarter) is selection sort :).

20031122, 18:54  #9  
Aug 2002
7×1,193 Posts 
Quote:


20031122, 23:35  #10 
Sep 2003
Borg HQ, Delta Quadrant
2×3^{3}×13 Posts 
No need to code a program. Just finished whipping up an Excel spreadsheet that will do the job just fine. It's almost completely automated. When opened it will automatically retrieve the ftops.txt file from mersenne.org, then put all the info in the appropriate places. I've added a column with a formula that computes LL+TF. Doesn't auto sort by Total CPU years, so I've implemented a macro to do that. Press CtrlShiftS to sort. I've also "frozen" the first 3 rows (the column headings) so you can scroll to anywhere you like and still know which numbers are which. Oh, almost forgot to mention: it will automatically update the sheet every 60 minutes if you leave it open.
You have to be patient with it. Even on my broadband (cable) connection, it takes about 10 seconds. So be prepared to wait a while if you have dialup (it IS a multimegabyte file). Speaking of multimegabyte files, the spreadsheet itself is! Well I guess that's what you get for using BloatSoft products. 3.4MB according to my computer. Fortunately it's only about 500KB zipped. Since the max attachment size is 97.6KB and even ZIPed the file is 500KB, I've uploaded it to my personal web space. You can download it here: http://home.comcast.net/~captainrichard/files/ftops.zip One more thing. I know this works on Excel 2000 so it should also work on later versions. Don't know about 97 (if anyone's using that) or KOffice, OpenOffice.org, Spread32 or other programs that can read Excel files. Questions/comments/suggestions welcome... though I'm not too experienced with MS Excel so it might take a while... Last fiddled with by PrimeCruncher on 20031122 at 23:37 
20031122, 23:43  #11 
Sep 2003
Borg HQ, Delta Quadrant
2·3^{3}·13 Posts 
Update:
Does not work with Spread32. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
* Provisional Ranking  a1call  Miscellaneous Math  8  20180204 03:14 
Member Ranking.  jwaltos  Forum Feedback  8  20150313 17:01 
Report: Bush surveillance program was massive  cheesehead  Soap Box  4  20090712 03:19 
Ranking and Speed  nngs  Lounge  1  20080331 21:23 
RPS Ranking  grobie  Riesel Prime Search  2  20060118 17:56 