|
|
|||||||||||||||||||||||
First Entry. Well, some interesting stuff has happened. Firstly, I've exchanged serveral emails with John Carmack. Apart from seeing that he really is a great down to earth guy :), its helped me realise some things. I've always been good at coding, and trying out new things, and learning new things. But i have always failed to write a project to completion. I'd usually abandon a project 40% of the way due to boredom, and loss of interest. Often i am writing a project for myself (like PPPTraf), and then i stop, because "its good enough". It does what i needed it to do. Sure it core dumps, is a little inefficient, but by this point, i couldn't care less. Well, i'm going to do a few things differently now. For starters, i'm going to maintain a journal. And this is the first entry. Secondly, i'm going to release my code to the public as soon as it compiles. (well, does something useful, anyway). I used to worry because "oh its crap", "people might laugh cuz i have lots of stupid code in there", "its no way near finished", and so on. (Hell, i'm sure Q has heard more of these excuses then anyone before). But fuck it. If i don't release it now, i'll never bother to fix it, and so i'll never release it. I got 100's of projects in this state. Someone wanted a program to monitor bytes in/out over their PPP connection on FreeBSD and posted a usenet message if there was such a program. I decided to reply, and sent a copy of Traffic 0.9. I got a good response, which needless to say, gave me the encouragement i needed to finish this thing, work its bugs out, and commit it to the FreeBSD ports tree. I want it to make it onto the 3.5 CDs :). This program (Traffic 0.9) is now, as of tonight, renamed to PPPTraf. We both agreed it needed a better name. (BTW, i later found out he goes to my University!) Oh, and btw. Thanks john.
Early Afternoon: Then i'm planning on starting my C++ ircd. I've decided i'm probably going to ditch TC14 (my be all end all, mother of all bots) because, well, its pointless. If i wanna have a nifty bot to hang around in my channels, i've already got that -- DiskBot. My faithful little perl bot, with access to a MySQL database. :) Why do i need TC14? I don't. So R.I.P TC14. Late Afternoon: Early Morning:
Early Afternoon: Evening: Its 2:36am. Time to restart it in C++.
Spent all day working on Zircd, then fixing big holes in libdiskiller's List class. I know its going to crash in some cases, but its just not happening. Its frustrating. *sigh* Tomorrow is my mums birthday. My cousins and everyone are coming over. oh fun. I eventually forced libdiskiller to coredump. You gotta do some a strange order of malloc()'s and overwriting the write part of memory, but eventually the pointer, that pointer, that needs to be followed oh just one last time, is clobbered. Segmentation Fault (Core Dumped). At least i was right, it would happen. The work around, is, however, a kludge.
Mwhahaha. My cousin considered himself a good Q3A player. The Longest Yard. Me: 20. Him, -10. Need i say more ? :) Q, your next. *evil grin* Also watched 'PayBack'. Wierd movie that ....why risk your ass with some mega badasses just to get $70,000 ? Who knows... no one else in the movie seemed to understand his motives either. Hrm. Maybe i missed something ....
Did some more work on Zircd. C++ is cool :) However, its string processing isn' that much better then C. Well, when you contrast it with perl, anyway. All this irc text processing is driving me insane $&*(&@#$)(*&#$(@#$. Ax0n told me there is an irclib. I almost killed myself.
Early Afternoon:
Well, Zircd works, i can get a couple of clients on there, and conduct a discussion. Woohoo. I'm gonna leave it be for a while, since i need to make some big changes to the way it works, and to do that, i need to do some research!
Did top secret research and design most of the day. Kinda Wasted.Net related. Yeah, i made some progress. Still got alot of problems, and holes in my theory. Need to write the code and test this for a few months and see how things go.
I installed Windows NT5 (professional). Windows 98 was pissing me off to extremes. Every morning it would have crashed. Not to mention it would have destroyed an entire OGR block. ARGH! Okay, i did those C string vs. C++ string benchmarks. This involves assigning a string 10,000,000 times. The program was compiled with -O3. The libraries, libc (for C) and libstdc++ (for C++) should also have been compiled with -O3 in the last 'make world'. C: ~10 seconds. It appears as tho C's strings are over 3x, almost 4x, as fast. I'm certainly not that surprised. C++ strings have quite a bit of overhead. I'm gonna go look thro libstdc++ and see how they're implemented, and perhaps, make my own C++ string class thats more basic, but faster, so its on par with C strings. Its possible. (It will always be slower due to the malloc() and free() calls, however). I'm still all for using C++ strings. C strings are often responsible for most crash bugs and memory leaks. Using the standard C++ template library strings is probably better then designing your own, unless performance is your top priority, and your willing to sacrifice everything for it. In that case, you may as well be fuckin crazy and use C strings :)
Well. I didn't do much. Slept alot :) I wonder what happened to my book on advanced data structures and algorithms ...
Q is back in adelaide so we're supposed to go to snappers to play games. Of course this is all gonna be very unsuccessful, cuz snappers computers suck. Besides, he'll be spending his entire time on ebay again!! We need Diablo 2.
Well i was right about last night :) We blew 3 hrs just installing Unreal Tournament. Uni today. No more summer vacation. Noooooo :( And to top it off, the weather fucking sucks. ~40C weather for over a week straight. Its driving me insane. literally.
milhouse:~/projects/libdiskiller/test> ./test3 You gotta love FreeBSD's malloc()/free() test3 is a little test program that tests the new Hash Class in libdiskiller. It works great ;) Thing is, i'm storing junk pointers like 0x1, 0x2, 0x3, etc, and 0x7 and 0x8 as u can see. Once the program quits, the Hash desturctor is called which calls free() on everything to make sure there are no leaks. So free() is called on 0x7 and 0x8. FreeBSD's free() realises they are junk pointers :) Normally i see something like "progname in free(): warning: junk pointer, too low to make sense." This is the first time i've seen "too high to make sense". Under linux this would probably coredump the program. (I dunno, i haven't used the latest glibc on linux, but it USED to coredump) Unfortunately these checks waste a bit of time :( but i think they can all be disabled globally in /etc/malloc.conf or per program by doing extern char * malloc_options="...."; or something. You can make malloc() try to be faster, or try to be more efficient with its memory thus not wasting as much, which will result in malloc() being slower. ah well. its still cool :)
Just so you know, yes, i'm still here. I've just been lazy doing updates :) mikpos has vanished into an empty void, so i'll have to wait a few more weeks before i can get back to discussing libdiskiller stuff with him. I think he forgets i'm only learning C++ :) Secondly, i'm not on an IPv6 enabled OS, so my code can only handle IPv4. So sue me.
*looks at the date*. Well the world didn't blow up today. Thats always good a thing. |
|
||||||||||||||||||||||
|
|||||||||||||||||||||||