Well this is a project that spirialed.

I wrote a LinkedList and HashSet. They're designed to work with objects. Yeah I know I was never a fan of OOP but I was stuborn. You create them with callback functions for comparing object, hashing them etc. I imagine these could be quite easily wrapped up in NaNs OOP model. Regardless theres no silly copyright messing with these, if anyone finds them useful then do with them as you wish, or modify them till your hearts content.

Anyway I decided I needed a prog to test them, one occured to me, a program to count the number of distinct words in a file. I decided I wanted to process large files, so inspired by bitRAKEs line count apps I wrote a ScanFile function to using threads to read in a file and process it at the same time. I tried to fully describe this function.

Then I had to write routines to extract the words. And I wanted things case insensitive, so I wrote routines to Hash and Compare Strings.

Then I decided the output aught to be ordered so I wrote a quicksort to order it. Actually I'm proud of the simple signed integer quicksort, it seems to be very fast. The OOP one is of course slower due to callbacks. I don't know how to avoid that.

This crashes spectacularly on Win2k. I don't have a degugger on my 2k machine and attempts to use simpler debugging techniques by outputted to a file as the programs runs give a different result every time :( hmmm.
Posted on 2003-08-14 17:53:03 by Eóin
Oooh yeeeeaaaah... :stupid:
Posted on 2003-08-14 18:07:10 by Eóin
What did you write the example in VC?

Cause i get error looking for a MSVCR70.dll....

And no offense, but i dont feel like sniffing thu all the files without seeing how they are to work together ;)

Posted on 2003-08-16 09:29:33 by NaN
I linked it againt the wrong lib. I had been mess with different ones trying to get fprintf to work. I'll recompile tonight maybe.

And yeah I know the projects a mess, like I said it spirialed. Maybe I'll do a simple one which just demonstrates the 3 key files easily. :(
Posted on 2003-08-16 11:40:44 by Eóin
Ok this time I wrote the sample app in Masm, should be easier to follow, espicially since it does nothing special.

To compile you'll only need the macro file included in addition to masm32.
To compile the Fasm files you should only need the macro files included (and Fasm of course)

I also recompiled the WordCount app against the proper library, also included.
Posted on 2003-08-16 22:17:00 by Eóin