Wednesday, the 9th of February

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.

Thursday, the 10th of February

Early Afternoon:
Well, i did my PPPTraf port, and sent it in. Its a little rough around the edges *ahem*, and i got alot of work to do on it. I'm also planning on taking a look at msend, which i plan to commit to ports.

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:
Well, i went to snappers place to take a look at his Fujitsu "Cheetah Eater" 18gb U2W LVD 10,000 rpm drive. We tried it on my PIII a few days back, and my old 7,700rpm Micropolis was running circles around it! Needless to say, we were both baffled -- and so was everyone else! (The card was an Adaptec 7940U2W.) Anywho, it seems to be working better at his place (we're using using the retail card, not the OEM). And it was all alone on the scsi bus this time. We still don't know if its working like it should, since we have nothing to compare it against. His Seagate Cheetah U2W 18gb should be here in a few days ....

Early Morning:
Its like 3am right now. I've been putting some organisation into my projects (proper Makefiles, README files, etc). I've begun design and work on Zircd ... It looks like it'll be a nice little C++ ircd. I also ressurected libdiskiller. Its a little library i wrote of useful stuff. I use it pretty often, and others have said its pretty nifty. I'm going to commit it to the FreeBSD ports once a few things that depend on it are commited. (ie, Zircd). TC14, and LinkBot2 depend on it too, but i'm going to leave those projects to just rott. Unless theres interest, i'm never going to release them. Some of that code is *VERY* embarassing ....

Friday, the 11th of February

Early Afternoon:
Well, to tell you the truth, i've been a little disappointed. I haven't done much at all. I'm thinking of writing Zircd in C. C++ just annoys me. I guess the day is still young. I got all night.

Evening:
Okay, well, i spent many hours designing, and writing Zircd in C. I've come to a conclusion. If your writing something in C, your doing it the hard way. C++ is soo much easier (especially with libdiskiller). My C code has got fucken pointers everywhere. And don't get me started on the pointers to pointers ..... and why the fuck didn't gcc warn me when i forgot a return() in a function that was meant to return a pointer? i must say, i was REALLY baffled for a while till i noticed ... 

Its 2:36am. Time to restart it in C++.

Saturday, the 12th of February

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.

Sunday, the 13th of February

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 ....

Monday, the 14th of February

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.

Tuesday, the 15th of February

Early Afternoon:
Yes, i am evil. I installed MS DevStudio. It simply rocks. I couldn't resist. I'm sick of pico! I did a custom install of my MS VC++ 5.0 CD, and did ONLY DevStudio. Now, over Samba, i can edit all my project files in ~diskiller on my FreeBSD box. Not only that, now that samba is up, FrontPage can edit my website directly too. (rather then using a local copy, and then ftp). Yeah, i'm lazy. I cbf'd editing raw html in pico no more. I'm planning on making this site better with some images (and i got a few people who wanna help), but i've been too lazy to do that. Or rather, too busy coding to care right now. Later.

Wednesday, the 16th of February

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!

  • Server Clustering. What options do i have? IRC style, all-to-all, ants?
  • Hashes? I learnt a hell of alot about hashtables a year or two back, but i can't remember anything. lol. How do i make a hash function, and why are tables with odd numbers like 997 better then 1000 ?
  • Benchmark performance of C++ strings vs. C strings. UNIX Domain Sockts, etc. (I recall my Dual P200 could shove 100mb/sec from one process to another under FreeBSD). Is this fast enough ?
  • Maybe some more database performance benchmarks (MySQL vs. my own stuff), etc.
Thursday, the 17th of February

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.

Friday, the 18th of February

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.
C++: ~35 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 :)

Saturday, the 19th of February

Well. I didn't do much. Slept alot :) I wonder what happened to my book on advanced data structures and algorithms ...

Sunday, the 20th of February

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.

Monday, the 21th of February

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.

Tuesday, the 22th of February

milhouse:~/projects/libdiskiller/test> ./test3

Okay, lets search ...

0x0
0x0
0x7
0x8
libdiskiller.so: Hash.cpp: Cleaning up ...
test3 in free(): warning: junk pointer, too high to make sense.
test3 in free(): warning: junk pointer, too high to make sense.
milhouse:~/projects/libdiskiller/test> 

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 :)

Saturday, the 26th of February

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.

Tuesday, the 29th of February

*looks at the date*. Well the world didn't blow up today. Thats always good a thing.

Menu
. main page
. about me
. contact
. icq
. diskcam
. irc
. journal
. rants
. projects
. schedule
. screenshots
. nice stuff
. cnbinc
. bookmarks
. pgp

Quick Links
. slashdot
. kuro5hin
. space.com
. msnbc
. msnbc space
. google
. altavista
. babelfish
. userfriendly
. daemonnews
. freebsdzine
. ebay
. segfault
. freshmeat
. freebsd.org
. linux.com
. linux.org

Contact
diskiller@diskiller.net
Please use PGP!

DISKILLER's Domain
diskiller@diskiller.net
Copyright (c) Martin Minkus, 1999-2000.
All rights Reserved.