![]() |
![]() |
#1 |
Nov 2008
San Luis Obispo CA
27 Posts |
![]()
What would you think about modularizing the code into one or more DLLs? The purpose would be to separate the prime95 math core from the GUI code. Various applications (Windows desktop, Windows service, web interface) could then all rely on one DLL core, but each provide separate and/or unique user interfaces. Additionally, they might provide different or modernized storage for results, worktodo, etc.
With a core DLL provided by you, others could create various applications using a standard calling interface; thus, the source code would not need to be released. This would add manpower to the programming effort and let others utilize their talents to produce a higher-quality application, perhaps with such features as an installer, auto-updates, improved GUI, or other ideas. I'm just guessing the code is written in C, which is easily ported to a DLL. I would likely write a .NET wrapper that could be integrated into a fancier GUI or Windows Service with an HTTP GUI. Your own maintenence would be eased as the application would be broken into individual components (GUI, prime core, networking core (GIMPS), data persistance (storage)). Thoughts? Last fiddled with by Freightyard on 2008-12-27 at 21:50 |
![]() |
![]() |
![]() |
#2 | |
Oct 2008
California
EC16 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Nov 2008
San Luis Obispo CA
27 Posts |
![]()
ASM--that's right, I remember reading that. I'm guessing just the core is written in ASM, though, and the rest in C.
Either way, it is ENTIRELY POSSIBLE to "inline" ASM into C source files, and it probably is inlined already. Both C and ASM can be linked as a DLL. Inline Assembler Overview (MS C/C++): http://msdn.microsoft.com/en-us/library/5f7adz6y(VS.80).aspx Last fiddled with by Freightyard on 2008-12-28 at 01:26 |
![]() |
![]() |
![]() |
#4 | |
"Richard B. Woods"
Aug 2002
Wisconsin USA
769210 Posts |
![]()
What's your definition of "just"?
Quote:
I think you need to go read the actual assembly source code, _then_ think about the feasibility of in-lining it within C source. (The latest version is in ftp://mersenne.org/gimps/source258.zip) I expect that you'll come to a different conclusion after you see (and understand) the actual assembly source code. :-) Some .asm source modules have thousands of lines, and there are many .asm modules. - - - This is to criticize not your DLL suggestion, which looks reasonable to me, but just the in-lining .asm in C bit. Last fiddled with by cheesehead on 2008-12-28 at 02:26 |
|
![]() |
![]() |
![]() |
#5 |
Nov 2008
San Luis Obispo CA
27 Posts |
![]()
Thanks for the pointer to the source! I didn't realize it was available--or, maybe I did and forgot.
"Inlined" or not, it is just as simple to create a DLL (simple is relative, of course). The point would be compartmentalize the functional parts of the code so that the parts--interface, math engine, data persistence, etc.--are not intertwined with each other and could be individually replaced. >What's your definition of "just"? "Just" the math engine. Not inferring that it is a trivial portion of the source; but that it would be surprising (to me) if the GUI was written in assembly. How deeply intertwined the existing codebase is really is the question. I'm suggesting a move towards a more OO approach. That way, the math engine could be updated, but retain a Windows 95 GUI, for instance. My main drive, if you haven't seen me write about it before, is to see a user interface added to the Windows Service version. |
![]() |
![]() |
![]() |
#6 | |||
"Richard B. Woods"
Aug 2002
Wisconsin USA
22×3×641 Posts |
![]() Quote:
Quote:
Quote:
You haven't yet looked enough at the source code, now that you have a link to it, to know whether the user interface is written in C or assembly! - - - This is not to say that the prime95 code couldn't be improved; it's to say that you seem to have remarkably little basis for suggesting improvements to it. Last fiddled with by cheesehead on 2008-12-28 at 03:16 |
|||
![]() |
![]() |
![]() |
#7 |
Nov 2008
San Luis Obispo CA
27 Posts |
![]()
Well, what I am seeing is pretty good separation among several libraries that are linked together. As I suspected, the GUI is written in standard "Windows C".
It will take me a good while to figure out what I'm looking at. It's certainly not obvious which library is in charge of the "business logic." I'm simply putting forth the idea to release the math engine with a public interface so that others can create alternate GUIs and features. A DLL allows automatic updates without re-linking. |
![]() |
![]() |
![]() |
#8 | |
Nov 2008
San Luis Obispo CA
27 Posts |
![]() Quote:
Adding further: The "basis" is this forum is littered with "feature requests" for Prime95. If the core engine were (or is) available as a binary DLL (or other module) then others with programming talent--myself included--might implement some of these feature requests, produce specialized utilities (i.e., a "Benchmark95.exe"), alternate GUIs, etc., etc. Maintaining just the separate versions of Prime95 would be simplified as well. ??? Last fiddled with by Freightyard on 2008-12-28 at 03:39 |
|
![]() |
![]() |
![]() |
#9 | ||||
"Richard B. Woods"
Aug 2002
Wisconsin USA
170148 Posts |
![]()
(Again, I have no quarrel with the DLL suggestion.)
What I took exception to was that it seemed in post #5 you were flatly stating that the existing prime95 software: (a) was not compartmentalized enough, and (b) was not OO enough, even though your other statements clearly indicated that you were completely, or almost completely, unfamiliar with how that software was actually coded, and thus seemed to have no factual basis for judgments (a) and (b). Quote:
Quote:
Quote:
Quote:
|
||||
![]() |
![]() |
![]() |
#10 |
Nov 2008
San Luis Obispo CA
27 Posts |
![]()
Well now that my ignorance and assumption are laid out on the public Internet...
What I think would be most utilitarian would be modules like so:
One possible specialized implementation could be a Prime95 that is controlled over a network. An Interface Module could link via network connection to a master interface application that oversees and monitors numerous Prime95 systems or an entire GIMPS team. Monitoring/control could be effected locally or over WAN via WWW. Teams could build web sites showing status of their machines. Computer labs could monitor dozens or hundreds of installs remotely. With this type of design, one could make changes to each sub-section without affecting anything else--for example: Upgrading from PrimeNet v4 to v5, bug fixes to CPU affinity, etc. Currently, even small changes require a complete re-compile or re-link of all versions of Prime95. With DLLs, you simply replace the affected DLL. HENCE, new or specialized implementations don't have to tear into each revised version of the source code. Take a look at this project: http://www.cryptofreak.org/projects/gkrellmgimps/ It hasn't been updated since 2003 and would likely be a nightmare to do so. Using modules, it would still be working with v25.8 unless the module interface was changed (likely, but not nearly as often). Good idea or bad? Last fiddled with by Freightyard on 2008-12-28 at 05:06 |
![]() |
![]() |
![]() |
#11 |
P90 years forever!
Aug 2002
Yeehaw, FL
163638 Posts |
![]()
The FFT code is well isolated (but not a DLL). It is used by LLR, SoB, and OpenPFGW.
The GUI code is isolated because it is not portable to other OSes. The rest of the code is a big blob of C code, typical of a project that has evolved over 13 years. Could it be improved? Yes. Do I have the time? No. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
@ George | Gordon | GMP-ECM | 2 | 2017-09-04 04:05 |
requesting permission from George to release Prime95 screenshot under GPL | ixfd64 | Software | 7 | 2012-09-04 06:07 |
George Melly RIP | davieddy | Lounge | 14 | 2007-07-08 08:10 |
Query for George about ERROR 3 | garo | PrimeNet | 17 | 2005-10-18 21:01 |
A Question for George | Hades_au | Software | 8 | 2003-01-29 00:03 |