Thursday, January 24, 2013

Lull, pt. II

Unfortunately, I must make yet another update explaining why development of NCPrime applications appears to have ceased.

This is mostly due to the fact that active development has indeed come to a standstill. I regret to inform you that I have in fact done nothing at all to GJS 2.5.0 since around the time of my last post here (26 December 2012). I have also not made a single post yet this year, and indeed was on track to post nothing at all for the entire month of January!

My real-world life has gotten quite difficult lately, as I am no longer in school and consequently unemployed. Whilst this is temporary, I have six months ahead of me in which I appear to have nothing to do whatsoever. Seeking employment is proving more troublesome than I had ever expected, since despite my thorough knowledge of computers from a technical, diagnostic, and software (programming) standpoint, I currently lack the certifications necessary to work at most major (and minor) computer repair centers.

For example, Best Buy and Micro Center (to both of which I have applied) require at least A+ certification in order to work in their service and/or repair divisions, even (in some cases) providing only basic customer service. Best Buy does not mandate it for junior Geek Squad agents, but it is preferred.

Now, I could easily get such certifications, based on my research and conversations with people who happen to have them themselves. I will do so as soon as I feel adequately prepared, and that will certainly help me!

It's a foot in the door, at least.

Additionally, I have not been feeling very well lately, dealing with a great deal of personal issues, most of which are admittedly directly related to my current state of unemployment in a semester-long medical leave of absence from college.

All of this has contributed to my recent lack of programming - indeed, I have not even opened VS2012 in quite some time and just before writing this post was wracking my brain in attempts to remember exactly where I'd left off with GJS 2.5.0 and what my plans were to rectify the few minor issues that had cropped up after the first successful, yet altogether basic implementation of the "Quick Run" sieve testing style.

I sincerely hope to regain the motivation to continue development of GJS and, of course, other NCPrime applications in the very near future.

I will admit, however, that I have for quite some time been at a loss as to how I can further improve programs such as MuPuPriNT and IsItPrime. For example, MuPuPriNT's last update was on 5 December 2012, very nearly two months ago; IsItPrime had updates not much more recently. The last major updates to those applications was in fact nothing to do with overall functionality but more with making them entirely cross-platform capable (which was a success). The functionality of those two particular applications has remained pretty much the same since the middle of November (or earlier, in the case of certain features).

This is not necessarily a problem, but the best applications are the ones constantly being updated for the sake of providing upgrades to functionality, efficiency, and interface as well as fixes for minor bugs and addressing the occasional stability concern.

Perhaps it's just that I currently lack any ideas as to how I can enact some sort of immediate change in either of those particular applications and provide a substantial update of any sort. I'm really not all that concerned about MuPu and IIP, though. I would sooner resume active and focused development of GJSieve 2.5.0 than waste time tinkering with ideas I've more or less forced myself to think up for applications that already work as intended!

This obviously means that no, GJS 2.5.0 does not work as intended. In fact, it doesn't work at all. It will take me a little time to get back into the swing of things, but once I do (re-familiarize myself with writing code and using Visual Studio and so on and so forth) I am confident that I will be able to provide a highly functional and well-programmed version of GJSieve in the not-so-distant future.

Bear in mind, of course, that this version of GJSieve is not really going to look, feel, or work much like the GJS you're used to (provided you have used the latest version of GJSieve, which is currently listed as 2.2.3b). It's going to be much, much closer to functioning like a true prime number sieve, and it'll look a bit different as well (which is for the best). It will also implement a very similar command hierarchy and global variable delegation system to those already present in MuPuPriNT and, to a lesser extent, IsItPrime.

GJSieve has not officially been updated at all since 24 November 2012! From the first of November right up to now, exactly two months past the last update, there have only been 55 downloads of GJSieve (mostly in Spain, interestingly enough). In that same time period of 1 November 2012 to 24 January 2013, there have been only 67 downloads from MuPuPriNT in total, over half of which were the build-it-yourself source archive.

I feel rather bad about not only letting my project(s) stagnate, but also for not keeping everyone informed as well as I should have. Rest assured, though, NCPrime is still alive and well - or at least, making great progress towards a full recovery!

- Jaska Börner 24 January 2013

Wednesday, December 26, 2012


I thought I should probably post here again, since I haven't in over two weeks.

I have not been programming very much or at all in these last few weeks for several reasons, none of which have anything to do with a lack of ideas or motivation. Mostly, I have been incredibly busy (tis/twas the season) and have been working on several other projects at the same time.
  • I have been trying to find uses for old and/or broken computer parts, so I have been tearing them apart down to individual electronic components and bits of circuit board in hopes that I might be able to make them into jewellery or decorations of some sort. 
  • I have been cleaning and organizing my own room as well as other parts of my family's house, which is a Sisyphean task.
  • I have been driving a lot and running errands, so I am out of the house too often to sit and program for hours on end. 
Generally speaking, I'm afraid to start on anything because I may not be able to finish - and I can't stand leaving things unfinished!

That said, GJSieve 2.5.0 is very much still unfinished. Currently, the "quick run" option is crudely implemented and doesn't really work very well, if at all. The ideas I have to make it better and smoother are:
  • Make global variables for determining and reporting the testing range
  • Make a wrapper class that is owned by the main window class and is responsible for creating and managing the worker classes, which in turn manage the testing thread(s)
  • Have the wrapper class contain variables that are updated via signals from the worker and update statistics on the test
  • Have the wrapper class receive signals from the threads in order to update the GUI in real-time
  • When a test begins, fill the newly-created (or already-existing) worker class instance with a new candidate number at the chosen k and the current number in the range
  • When a test ends, rather than exiting the thread, a signal will be sent to the wrapper class instance to find the next candidate number at the chosen k using the next number in the range
  • When the last number in the range is reached, the wrapper class will be responsible for sending signals that exit the threads and printing statistics on the entire sieve run
  • Have the wrapper class responsible for clean-up
  • Delete the wrapper class instance when safe to do so
This is just for quick runs at the moment. I will eventually have to implement this for all testing types.

I am still debating whether to keep verbose and reverse BFTD testing in this iteration of GJSieve. If it is to be a true "sieve," there is no real reason to factor a candidate number in its entirety! What may end up being the actual available testing options are quick runs, triple-threaded BFTD, and six-threaded BFTD.

The latter two will of course work the same way as verbose and reverse already do, but it would be tricky to write because the threads will need to send signals to the worker almost constantly, which would trigger a slot that signals all threads if a factor has been found. That's just so when one thread finds a factor, they all stop. I know it can be done, but it will be difficult - especially for the reverse testing!

This will all come to fruition in 2013, I can promise you that much.

Tuesday, December 11, 2012

Slight blog redo

I edited and updated the blog format itself a bit today, in keeping with the heavy modifications I made to my personal blog, which was long overdue for a refresh!

Soon enough we'll need a logo. I already have one, but it's too big / not the right shape exactly to go up top with the description:

There is a story behind this ubiquitous NullCoding design - it's just for another time. And perhaps another blog...

Saturday, December 8, 2012

IsItPrime 2.1.0 beta source + Windows exe

SourceForge had a bit of trouble processing these files, it they weren't available for download until today despite uploading them two days ago. The default download still points to 2.0.8. Nope. Try this 2.1.0 executable instead!

If you want the source, check the readme file (bottom of page) first, and then download this archive.

I have still not tested this on Mac or Linux, but it's exactly the same build process and procedure as MuPuPriNT and definitely takes less time.

I will release executables for Mac and Linux when I have the chance. I will test it on Mac in the very near future. I need to move all my computers across the state, so I currently don't have a Linux machine available (but will tomorrow).

Sorry those links took so long.

Thursday, December 6, 2012

Source Code and More Updates!

MuPuPriNT is on a roll - almost 50 downloads this week, mostly of source code! This is great. I had no idea people were that interested. Also, it's cool that they're downloading source. This leads me to believe that the majority of people who are into recreational mathematics and prime number testing run some form of Linux and therefore need to be able to build from source.

I have also written IsItPrime 2.1.0, which like MuPuPriNT is meant to be built from source. It looks a bit different from previous versions:

IsItPrime 2.1.0 GUI, adapted from MuPuPriNT's
This version also uses many more global variables and definitions, several of which are determined at runtime and one of which is determined at build time (currently on Windows only), asking if you wish to build a debugging display widget as well.

This widget will have more use in the future, as it is a full-featured debug display. Currently, though, it does very little except show the current working directory and, on Mac, mysterious error messages.

In the future, I will include a build option to ask what "style" you wish to build - currently, the default is Windows7Style for Windows, MacStyle for Mac, and CleanLooks for Linux (I believe - not sure on the latter). Theoretically, you should be able to use whichever you want. This can easily be determined with a simple build-time-generated file with a single definition in it. I will work on that!

Additionally, I am still working on a completely overhauled GJSieve that is actually a true sieve as discussed in this post. It's still in the planning process, but I hope to begin development very soon.

I currently have a lot going on in the real world outside of my programming ventures, so my time needs managed quite well. So far, so good - but we'll see what the future brings. But for NCPrime in general, it looks pretty bright!

Links to download IsItPrime executables and source will be up as soon as SourceForge has processed the files. It seems they're a bit slow on that at the moment.

Wednesday, December 5, 2012

MuPuPriNT for Mac 2.1.2a

Turns out that building on Mac is not nearly as much of a pain as I thought - but building for Qt5, now that's a pain.

You can find a pre-built app bundle (zipped up) here. I guess I could have put it in a disk image, but oh well, I didn't.

Next I will try for Qt5, but that's actually going to involve changing a fair bit of code. I can't have two versions of Qt installed at the same time, since the executables placed in /usr/bin/ need to be called plain "qmake" and "uic," not "qmake-4.8" and so on and so forth...we'll see!

This Mac version is fairly stable, but is still plagued by that bizarre "null pixmap" problem that never shows up anywhere else...

Tuesday, December 4, 2012

Future of GJSieve?

There is a question mark in the title for two reasons.

For one, I have wondered for some time if the naming convention is particularly relevant anymore. Originally, GJSieve was named for its two developers, in order of their actual contributions to the application as of about 5 March 2012, which is the earliest date at which I can find actual source code for the absolute first (and therefore most elementary) version of GJSieve. The G stands for Gabriel and the J for Jaska (me!)

I came up with the idea, of course, but Gabriel actually wrote the original rough draft of the program. Thus, he was listed as a developer on the Google Code page we used to use as a main project site. Since we no longer use Google Code, he is not included as a developer at all. He has also not actually done anything relating to GJSieve or other NCPrime applications (beyond moral support and encouragement) since that initial design phase.

There is also the question of whether GJSieve (and therefore MuPuPriNT) is actually a "sieve" at all. Wikipedia says that, from a computational number theory perspective, a prime sieve works by:

...creating a list of all integers up to a desired limit and progressively removing composite numbers (which it directly generates) until only primes are left. This is the most efficient way to obtain a large range of primes; however, to find individual primes, direct primality tests are more efficient.
What GJSieve actually does is test one number at a time at a specific k and n (for Proth numbers, in this case). Thus, it is more accurately styled a "direct primality test" in this context.

If I were to rename GJSieve, it'd be called NCProth or something to that effect, since "NCPrime" is the name of this software development label as a whole.

Another idea is to stop development of GJSieve as a standalone entirely, since it does nothing that MuPuPriNT cannot!

However, I think a more viable course of action is to develop an entirely new application, which could still be called GJSieve, that asks for a specific value of n and then a range of k, and then generates a large array of Proth integers for each k at that n and subsequently tests all of them using any of several fast testing methods to see which (if any) out of that array are possible primes. Then it'd be a true sieve!

This is not merely an idea - it's actually going to happen. I just haven't started yet, that's all.

I will, as mentioned, continue calling it GJSieve as a tribute to Gabriel, who did after all get me interested in programming on my own and was responsible for the initial design of GJSieve up to version 0.3a way back in March of 2012.

That's all on GJSieve for now.