aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
AgeCommit message (Collapse)Author
2009-01-28The nids tool now has a re-write and cleanup option, it can also change theMike Buland
block size. Isn't that nifty?
2009-01-27Nids is even better, all fixed, no problems. And you can define you're ownMike Buland
creator functions for the cache store...soon, you'll also be able to define you're own loader/writer functions, but the default will still work exactly like this. I also did more work on nidstool, I think I may actually have to create a tools dir that will just compile some executables for the libbu++ root, because this thing is handy. You can get info on the system, trace streams' blocks, and I'm working on an analysis function that will help you figure out how to optomize your nids files. Plus, it'll have a function soon for re-writing a nids stream, which will let you change the block size, defragment, and remove unused blocks.
2009-01-27Corrected the Bu::File::canRead() and Bu::File::canWrite() functions, they workMike Buland
now. It helps to read the system docs. Anyway, nids is all fixed up, it seems to work great now, and I guess I got all the corner cases we'll hit for a while, fishtrax really did a number on them :) I also cleaned up all the debugging output, now you can see your program run instead of libbu++ internals. There could still be a good amount of improvement made in nids, it really shouldn't re-write whole blocks every time you write to a stream, but that will be an easy change down the line that won't effect any of the existing code.
2009-01-27Corrected some larger read/write issues in corner cases that I hit suprisinglyMike Buland
often within nids. There's still a problem somewhere, but I'll find it. Also, even after having the file class canRead and canWrite functions work properly, and using them before trying to write to a nids to update info, we never ever write anything, so something is still wrong there. For now, all utilities that open a nids stream read-only will crash when it closes. Pretty minor really.
2009-01-27Hey, I think that'll fix some things valgrind was bitching about. ApparentlyMike Buland
BitString is...not so good...I may have to rewrite big chunks.
2009-01-24Added some append and prepend functions and operators to Bu::List, now you canMike Buland
append one list to another and the like. Also, wow, I found a bug that's been around for ages, I guess we don't copy hash tables often. The interesting thing is that it actually worked, it copied but it would include any data that had been deleted in the old hash table but not reclaimed yet and insert it as new data. Usually the key had been completely destroyed (like with a string) so it came out as keyed to blank string. So in cases like that, all deleted keys would collapse into one deleted key in the new hash table.
2009-01-23Ugh, more fixes...this time I've disallowed ending with an operator, there wereMike Buland
just too many cases where that was causing trouble. Now it seems like everything is working correctly again.
2009-01-23I changed the ParseException in Formula to Bu::FormulaException. It actuallyMike Buland
wasn't in a namespace, and it was a little too generic. I like the idea of putting all the parser exceptions under a new class called ParseException, but well do it a little later.
2009-01-23Fixed a peculiar formula residue bug...eeew, formula residue. Also added aMike Buland
clear function to Bu::Stack
2009-01-21david - needed to actually import the shutdown function from the winsock dll..David
2009-01-21david - #define SHUT_RDWR (SD_BOTH) if WIN32... blech... windows...David
2009-01-20Awesome changes to the formula class! It actually does proper reduction forMike Buland
unary operators now, such as negate and not, and it now handles functions. Functions are actually implemented as unary operators at the moment, so they'll only act on a single value, no commas :-P, but it would probably be pretty easy to make it work on longer call lists. Although I do think that this will work for pretty much all cases out there.
2009-01-19Hey, the socket class closes the socket when the class is destroyed...why...whyMike Buland
wasn't that happening before?
2009-01-19Hey, more cases are covered for when the socket can close now.Mike Buland
2009-01-19This should fix the problem of never knowing if your sockets are closed. NowMike Buland
Bu::Socket::read will throw an exception if the socket has been closed. Also, you'll get an exception at object creation if the socket could connect to a computer, but not the given port.
2009-01-16I...think that's a little better. Wow, function pointers in windows have aMike Buland
lot of problems. This may require a little more research, but basically, you can't just call them inline wherever you'd like. I managed to get it to work by providing simple one line wrapper functions for each function we acquired as a pointer. Crazy mess. Anyway, it should load the library just once now, and Bu::Socket looks a little bit cleaner, but not a heck of a lot. I also added some more docs and removed the author references.
2009-01-16They keys can be accessed now for all stores that support it, they pretty muchMike Buland
all should, but they don't really haaave to.
2009-01-16Ok...we'll try this change up of the cache system. It now takes two pointers,Mike Buland
one to a Calc and one to a Store. It takes ownership of the two objects, and deletes them when it gets cleaned up.
2009-01-16Whoa, Bu::CacheStoreNids totally works now, it's even tested and everything.Mike Buland
Isn't that great?
2009-01-15Fixed a minor suggestion in Bu::Socket, gcc wanted more parenthesies to make aMike Buland
statement clearer (good coding guide). Made the Taf code getters report their own errors, so much nicer. They actually tell you what was looked for from where and that it couldn't be found instead of a horrible old Bu::HashException key not found error.
2009-01-14david - oy, ok uses WSAGetLastError now on windows...David
2009-01-14david - removed debugging goo after finally getting it to workDavid
2009-01-14Gettin' closer.Mike Buland
2009-01-14david - WSA functionsDavid
2009-01-14Ok, no...now we have better debugging.Mike Buland
2009-01-14More debugging.Mike Buland
2009-01-14Ok...this may work. We completely changed the way Bu::Socket resolvesMike Buland
addresses. Windows wouldn't work with the other way at all. But, fortunately, this seems to work, it does more for us, and it looks pretty cute.
2009-01-14david - added getaddrinfo and freeaddrinfoDavid
2009-01-13Ok...now UnsupportedException has text in it's what.Mike Buland
2009-01-13Fixed an out there corner case in Bu::Socket::read where it would get an EAGAINMike Buland
errno out of ::read for no apparent reason. Now it treats it as expected, it just returns zero bytes read.
2009-01-12Really a nothing change, the array is slightly more optimized in one cornerMike Buland
case that you'll never care about. It didn't fix the strange warning messages though.
2009-01-12The Bu::List::end() function was returning a null pointer instead of aMike Buland
properly formed iterator. That caused a few problems. I think it's all set now though.
2009-01-11A new feature has been added to Bu::Server. It's going to be trickier toMike Buland
implement in Bu::ItoServer, but I'll get to it. Basically you can trigger a "tick" any time you want and it will propegate as an onTick event to all active clients. You can also have these generated automatically everytime the system passes through a polling cycle. In this case, you should never ever write data to the socket every tick. It will cause your program to go bursurk.
2009-01-09Whoops! You can't fix a problem in server and forget about ItoServer! That'sMike Buland
just aweful! Well, he's not forgotten now.
2009-01-09Hey, that's better. The server now idles the same, but sends data uber-fast!Mike Buland
2009-01-07Corrected a couple of places where std:: classes were being used and shouldn'tMike Buland
have been. Also made the Unit tests actually use expected values, so you can mark a test as "expected fail" and it'll know. It also prints out cute reports at the end of each run.
2009-01-07Only two real changes. First, Bu::FString and Bu::FBasicString are in differentMike Buland
files. This won't affect any programs at all anywhere. This will just make it easier to maintain and extend later. You still want to include "bu/fstring.h" and use Bu::FString in code. The other is kinda fun. I created a special format for unit tests, they use the extension .unit now and use the mkunit.sh script to convert them to c++ code. There are some nice features here too, maintaining unit tests is much, much easier, and we can have more features without making the code any harder to use. Also, it will be easier to have the unit tests generate reports and be run from a master program and the like.
2009-01-05I mergered Bu::CPtr into Bu::Cache as Bu::Cache::Ptr. This makes more sense toMike Buland
me, is much less messy, and makes the syntax work a little better for me as well. What the hell was a CPtr? Who knows, but a Cache::Ptr, that makes sense. Also, fewer includes to deal with now, just need Cache and you're set. Oh, also, made Cache::Ptr behave much more like a regular pointer, they can be assigned now, as well as created empty (NULL).
2008-12-31Wow, that was a freaky bug. Turned out to not have anything to do with theMike Buland
size of the table, it had to do with using non pointer types for the key (some more complex types worked as well, probably because of lazy memory collection) and then using the [] indexing operators. You wound up with pointers to local variables that didn't exist by the end of the assignemnt operator. Strange, but I didn't actually use references inside of all of the Bu::Hash accessor functions, that means in cases where more complex variables are used as keys (like Bu::FString) it was making several copies of them per operation and destroying them all immediately. Now it will be even faster and use much less memory. Good catch, David.
2008-12-30david - i found a strange hash bug, and made a unit test to reproduce it ↵David
("insert3")... with a hash of type Bu::Hash<int, Bu::FString>, when the size of the hash reaches certain points (11, 23, 46, 94, etc...), it seems to reset itself and not have any data in it...
2008-12-29Corrected the premature end of stream read corner case in Taf...it was freakingMike Buland
out and allocating all memory, now it just throws an exception.
2008-12-29Fixed some horror inside the Taf writer. It had a strange corner case whenMike Buland
adding a property to a group that had a name but an empty value. Also added a isEmpty() function to Bu::FString, finally.
2008-12-25Minor change, just some cleanup goo.Mike Buland
2008-12-24Strange, I never actually made any of the server code clean up behind itselfMike Buland
in the deconstructors. When you deleted a server it wouldn't close it's sockets. We never noticed because servers normally last the entire lifetime of the program they're in.
2008-12-22Hey, corrected a minor issue in Bu::FString. Turns out C++ is hardass enoughMike Buland
that we need a concatination operator for both const chr * and chr *. This fixed a suprising number of problems.
2008-12-20All of the basic, core workings of the Cache are complete, and tested. EvenMike Buland
added some more tests and whatnot. A lot happened, but I can't remember everything. Also, Bu::File reports errors in more error cases.
2008-12-13The Calc should be functional, and is being called by the Cache itself. TheMike Buland
Bu::CacheCalc still needs to reference the Bu::Cache so that it can make the changes it needs to.
2008-12-12All of those changes I thought I'd already committed. The taf writer handlesMike Buland
binary data much better, actually escaping it properly and not stopping on null. Bu::FString has an iterator, it's actually just a raw datatype, but it may have more function later, so careful assuming that it's a char and using it in any non-iterator like way. Also augmented the taf unit test, and added the Bu::CacheCalc base class, the rest of the simple develpment cycle will happen between here and project hhp.
2008-12-10Whoah, got rid of maaajor debuging goo.Mike Buland
2008-12-10Fixed a couple of minor Bu::TafReader bugs. It wasn't parsing the colons, andMike Buland
it was off two characters on the first line for error reporting.