13 Oct, 2008, Avaeryn wrote in the 1st comment:
Votes: 0
I'll preface this log with a request of the illustrious coders: Please make a disable command for weather/time related messages :P

10-12-08 RaM Development Team Meeting

You say 'Ok, log started'
Nibios nods.
Quixadhal puts on a powdered wig to look official.
Quixadhal says 'Ok, what's up first?'
You say 'Ok, so how are things going? Should we start with the compile issues you all are working on'
Quixadhal says 'Sure.'
Nibios says 'I think Quix is on top of those, and has them pretty much wrapped up, correct?'
Quixadhal says 'I've been doing mostly straight fixes for compiler issues, and am just getting to the neatening up phase of things.'
You say 'So no major problems? At least it doesn't appear so when readying the posts at MudBytes'
Quixadhal says 'Essentially, I'm looking for a feel on how much license I have to shuffle things around before folks get antsy.'
Nibios says 'As long as you don't do anything nonsensical, go for shuffling things around.'
Quixadhal says 'Nope, so far the 64-bit issue Davion found is the only sneaky one. That one is pretty easy to work around, just hard to spot without a 64-bit machine to test on.'
Nibios nods at Quixadhal.
Avaeryn says 'One thing I think that might need to be addressed is a change log.'
Quixadhal says 'Mainly, I want to try and bring the functions that are related under the same roofs.'
Nibios says 'like the string utils ;)'
Nibios says 'svn kinda forces us to generate a changelog and maintains it for us'
Quixadhal says 'Yes, some of them are poorly named too. All the string stuff should probably be in it's own place.'
Avaeryn says 'so basically making it easier to find certain things in the code.'
Quixadhal says 'Actually, look at HACKLOG, one level up from the src directory.'
Nibios says 'only problem with HACKLOG is it's guaranteed to generate conflicts.'
Quixadhal says 'It's not blow-by-blow exact, but I try to capture what I'm doing.'
Quixadhal says 'and encourage anyone else to add to it. :)'
Quixadhal says 'yeah, but that's why we get to hand-edit when a conflict pops up.'
Nibios smirks at Quixadhal's saying.
Quixadhal says 'a text file is much simpler than when 3 people edit the same set of functions differently…. been there in perl, no less.'
Nibios says 'I was thinking of keeping a private changelog, making it available to everybody, and perhaps that can be merged into HACKLOG as appropriate.'
Nibios says 'but, again, *if* we write reasonable commit comments, it becomes self-documenting.'
Quixadhal smiles happily.
Nibios says 'ie, something better than 'checking in changes to merc.h and act_comm.c' :P'
Quixadhal says 'I'll ask Davion to smack anyone who does a commit -m '''
Nibios says 'heh, definitely'
Avaeryn says 'speaking of Davion, where is he?'
Nibios nudges Davion.
Quixadhal says 'I think he's dead, Jim.'
Avaeryn says 'so other than the compile issues and work on that, has anything else taken place?'
Quixadhal says 'Nope… I was figuring on doing a bit of rearranging and perhaps running things through indent while we figured out which bits to attack first.'
Nibios says 'getting ready to, when things stabilize a bit.'
Quixadhal says 'I think merging in Rutner's bit code might be up near the top of the list.'
Nibios nods in enthusiastic agreement with Quixadhal.
Quixadhal says 'I actually was pondering something I'm calling a "unified bit system" that would use that.'
Nibios says 'we need that before we tackle OLC, I think. Also need to come up with a scheme for writing flags to area files; I really like the idea of writing them with meqaningful names.'
Retnur has entered the game.
Retnur says 'ROAR'
Avaeryn says 'hi retnur!'
Quixadhal waves goodbye to Retnur.
Retnur says 'You posted the wrong address on the forum.'
Quixadhal grins evilly.
Retnur says 'sulinea.arthrmoor.com'
Avaeryn says 'ouch…did i?'
Avaeryn chuckles politely.
Avaeryn says 'typos :P'
Quixadhal throws back his head and cackles with insane glee!
Quixadhal says 'good thing I'm lazy and didn't read then.'
Nibios says 'uhh, isn't that where we are? sulinea.arthmoor.com?'
Nibios says 'ah, the extra 'r''
Retnur says 'Yeah, but not arthrmoor :)'
Nibios nods at Retnur.
Retnur says 'If this were arthrmoor we would be the knight of the round table.'
Avaeryn says 'heh'
Nibios snickers softly.
Quixadhal says 'quick! go make a DNS CNAME entry!'
You chuckle politely.
Nibios says 'odds are some squatter's already sitting on it, but will sell it to you for $100,000'
Quixadhal says 'good timing btw…we were just talking about you Retnur… or about your bit system anyways. ;)'
Nibios says 'as in, we're gonna plug it into the code.'
Nibios says 'or you are, if you want ;)'
Retnur says 'But that sounds like work.'
Quixadhal says 'I was just saying I had an idear about merging all the various bit segments into one namespace.'
Retnur says 'It's something I avoid at all cost.'
Quixadhal says 'smart move. :)'
Nibios chuckles at Avaeryn's post.
Davion says 'I'm here!'
Retnur says 'Plus I'm a SVN noob.'
*Yay!* Go Davion!!! Nibios cheers him on.
Davion says 'Sorry ;) It's Thanksgiving up here in Canadia ;)'
Avaeryn says 'welcome davion :)'
Quixadhal says 'Oooo, does the Air Corps drop turkeys for everyone? *grin*'
Davion says 'We have Air Corps?'
Quixadhal says 'bonus points if you can think of the TV show that's from.'
Retnur says 'Probably something old.'
Avaeryn says 'Mash, probably'
Quixadhal says 'I dunno… I thought the Canadians called it something other than Air Force.'
Quixadhal says 'WKRP in Cincinatti. :)'
Retnur says 'Royal Canadian Airforce'
Davion says 'Nope. We call them the Air Force'
Nibios says 'didnt' they merge all the services a couple years back?'
Retnur says 'I call Canadians frogs.'
Davion peers intently at Retnur.
Nibios snickers softly.
Retnur says 'Bunch of slick french fur traders, the bunch of them.'
Quixadhal says 'Anyways… rather than having seperate bit chunks for ROOM_ ITEM_ AFFECT_ etc…. why not merge them into one namespace so things that overlap (like Invisible, for example) can have the same value/name?'
Retnur says 'What do you mean by separate bit chunks?'
Nibios mulls over the idea at hand. Please be patient.
Quixadhal says 'Thus, you just check for IsInvisible in the bit structure of whatever you're looking at… mob, object, person, frog.'
Retnur says 'You mean having the same bit mean the same thing across different objects?'
Nibios says 'there really isn't a whole heck of a lot of overlap, is there?'
Quixadhal says 'Where appropriate, yeah. Merging the namespaces that are currently split up.'
Retnur says 'I'm not really following well.'
Davion says 'I don't think we should change the default values of the bits. Continuity and such for older areas'
Retnur says 'You'll have to spell it out for me. I'm slow.'
Quixadhal says 'areas aren't a problem… import solves any of those issues.'
Nibios says 'right now, AFF_INVISIBLE is 1, and ITEM_INVISIBLE is 1<<4. I think he means give them the same value.'
Quixadhal says 'Right now, you have seperate bit namespaces for various game objects like rooms, mobs, players, etc. If you want to see if something is invisible, you have to check the bitfield using the right flag.'
Quixadhal says 'if we're using an infinite sized bit system, we could collapse all those together, so the same bit means the same thing, and is checked the same way, regardless of the type of thing.'
Retnur says 'Well, what's the benifit of using the same namespace?'
Nibios says 'that's what I'm wondering'
Retnur says 'The only one I can think of off hand is invisible.'
Retnur says 'That would really be appropriate like that'
Nibios says 'it could also lead to things like help requests asking why aggressive doesn't seem to do anything on objs or rooms'
Quixadhal says 'let's say you wanted to add a property to a room that works much like one that exists for objects… currently, you'd have to duplicate the flags for ROOM_, give them new values, etc.'
Quixadhal says 'If it's one space, you just implement the code to make use of it.'
Retnur says 'So you're looking more just to use AFF_WHATEVER'
Retnur says 'And ones that happen to use the same named effect'
Retnur says 'Just reuse it'
Retnur says 'I don't really have an opinion on the subject. I think it would work fine that way.'
Quixadhal says 'Right, ROOM_DARK right now just means a room has no default light settings. If it were global, you could make an object that was set dark and perhaps implement it to suppress natural lighting. Just an example.'
Retnur says 'There's little reason to break up the bits since with the way my system works it doesn't matter what the numbers are.'
Retnur says 'It doesn't change the efficiency.'
Quixadhal says 'The point is, the code could just check is_set(whatever, "dark")… simplifies the api a bit I think.'
Retnur says 'So I have no opinion on whichever way we decide.'
Quixadhal says 'that's why I was pondering the idea of being able to name bits, it would allow you to make them run-time configurable.'
Nibios says 'I dunno, I see little enough overlap that I don't see what we gain, and if we did unify them, naive coders would be trying to set wimpy on rooms and stuff'
Retnur says 'You mean associate the bits with a string?'
Quixadhal says 'but having them in one namespace would make things MUCH simpler.'
Quixadhal says 'a lookup table, yeah. "dark" might map to bit 107 for all we care.'
Retnur says 'Well, since we aren't using C++ that would require using multiple set_bit type functions for different types of arguments.'
Nibios says 'yeah, the actual number doesn't matter, it really should be 'dark' in pfiles and area files.'
Quixadhal says 'set_bit_byname then.'
Nibios says 'and #defined as FLAG_DARK or some such'
Quixadhal says 'I'm trying to get us away from needing defines.'
Nibios says 'so, umm, how in the code would I check for the 'dark' property? is_dark() function?'
Retnur says 'I don't mind doing it whatever way we decide, but it needs to remain familiar to rom coders.'
Nibios nods in enthusiastic agreement with Retnur.
Quixadhal says 'is_set_byname(thing, "IsDark"), maybe.'
Nibios says 'eww, a string comparison each time we want to check a flag value?'
Quixadhal says 'we're already going to have to do away with the old practice of if(foobit & BIT_ONE | BIT_TWO).'
Nibios nods at Quixadhal.
Retnur says 'Well, that's why I had an issue with it, but I don't mind having the option of a way of setting bits like that'
Nibios says 'I agree there, fortunately there aren't really all that many occurrences of that kind of thing'
Retnur says 'Might be interesting to be able to do is_set_byname(thing, "IsDark IsInvis")'
Nibios says 'sort of like thw skill_lookup() and gsn's'
Retnur says 'As it stands set_bit will work by set_bit(thing, 1, 2, 5, 10, etc)'
Quixadhal says 'yep, and the nice thing is you could then add bits on the fly.'
Retnur says 'To set multiple bits in one statement.'
Retnur says 'Since bitwise operations no longer work or can be convereted.'
Nibios says 'that gets pretty tricky to do :P'
Nibios says 'a variable arglist to set_flag() I meant'
Quixadhal says 'that's why we get paid the big bucks, right?'
Nibios smirks.
Davion chortles mischievously.
Quixadhal says 'I think Retnur is suggesting passing in multiple arguments as a single string, with whitespace seperating the bit names.'
Quixadhal says 'you could just parse that with strtok, or our friend one_argument.'
Retnur says 'Well, it makes sense to have that option.'
Davion nods sagely.
Nibios says 'strtok clobbers its input string, so you couldn't use a literal "IsDark IsInvis"'
Quixadhal says 'yep, not saying to remove the ability to use defines and/or raw numbers.'
Quixadhal says 'but if you use the string version, it's portable.'
Retnur says 'You could simply parse the string with one_argument'
Retnur says 'It's not really that big of an ordeal.'
Quixadhal says 'yeah, strtok is kindof ugly that way.'
Quixadhal says 'one argument is now const char happy, so that works.'
Davion says 'Wow'
Nibios nods.
Davion says 'I've never even heard of strtok'
Retnur says 'Let's just get the boost::tokenizer library in here.'
Retnur says 'And call it a day.'
Nibios smirks.
Quixadhal grins evilly.
Nibios says 'speaking of one_argument() being string-happy now, str_dup() should deal with constants too'
Nibios says 'and it should definitely return a const'
Quixadhal says 'it has a few issues with the shared string system.'
Quixadhal says 'I had to make an EVIL HACK to make it happy, as it is.'
Retnur says 'I think all of those dup type functions that malloc should be changed to the garabage collection malloc.'
Retnur says 'And just not deal with the hassle.'
Davion says 'I dunno about that'
Nibios says 'that was a cast to another cast just to get around a warning. But seriously, it should return a const char *'
Davion says 'str_dup uses the internal string hash'
Davion says 'Getting rid of that could drastically increase the RAM usage (no pun intended ;))'
Retnur says 'str_dup can be changed to a wrapper for strdup easily.'
Quixadhal says 'the thing is, str_dup sometimes returns a const, but sometimes returns an actual strdup() valid writeable string… depending.'
Nibios says 'do you know what str_dup does?'
Retnur says 'How does the internal string hash system that rom employs save memory?'
Nibios says 'no reepitition of identical strings'
Retnur says 'It returns a const that lets free_string know it doesn't need to be freed'
Quixadhal says 'duplicate strings are hashed, so 500 rooms saying "you are surrounded by grass." all share the same pointer.'
Nibios nods at Quixadhal.
Retnur says 'Hrm'
Davion nods at Quixadhal.
Quixadhal says 'so, sometimes it's a const char *, other times it's a full strdup() and thus a writeable char *.'
Quixadhal says 'hence, the Ugly Hack (TM).'
Nibios says 'or 200 mobs with short descs of "a guard"'
Retnur says 'I don't think it saves enough ram.'
Nibios says 'if youi think aobut it, though, what str_dup() returns should never be writeable.'
Retnur says 'Someone run the numbers of what we actually save for that headache.'
Davion nods at Nibios.
Retnur says 'Imma take stock rom and figure out the difference in ram usage.'
Nibios says 'where's the headache with it?'
Quixadhal says 'You sure? What if I'm using str_dup() because I was passed a constant and want a copy to muck with?'
Retnur says 'I bet it's less than 30 or 40k'
Nibios says 'that's what satrcpy is for'
Quixadhal says 'I''
Nibios says 'strcpy even'
Quixadhal says 'strcpy doesn't allocate memory for me.'
Retnur says 'Then you better remember to use strdup'
Retnur says ':)'
Nibios says 'char mybof[MAX_STRING_LENGTH] works fine :P'
Retnur says 'Someone asked what the headache is'
Quixadhal says 'evil!'
Retnur says 'The headache is not being able to garbage collect'
Retnur says 'That's a big headache'
Nibios says 'if youi want garbage collection, we should be doing this in java then'
Retnur says 'Done'
Retnur says 'We're doing it in java'
Quixadhal says 'but yes… I'm not defending the use of str_dup OR the string hash system… just saying why it's messy.'
Quixadhal says 'awwwww, but do we support JRE 1.4, 1.2, 1.5???'
Retnur says 'I think str_dup is really bad programming practice.'
Nibios smirks.
Retnur says 'Most new coders confuse it with strdup'
Retnur says 'And it just gets ugly.'
Quixadhal says 'let's just use perl. print $_ if !$!'
Nibios says 'there ya go!'
Davion says 'Hrm'
Davion says 'It's not that bad'
Retnur says 'The hash itself takes more ram than it probably saves. :P'
Retnur says '*goes to look how this thing is implemented*'
Davion says 'RSS with str_dup is 5500, with strdup it's 5700'
Nibios says 'and the string savings is area-dependent.'
Davion nods.
Quixadhal says '200K then? we lost that going from gcc 3.4 to g++ 4.1'
Nibios says 'oh, speaking of which, gcc generates a smaller binary than g++ by about 18%, and g++ takes about 20% longer to compile.'
Davion says 'Another archaic technique it seems'
Quixadhal says 'Of course, the guy who touts having 100K rooms which are all grassland may be unhappy.'
Nibios snickers softly.
Davion grins evilly.
Retnur says 'Heh'
Retnur says 'I hope we're not coding around the premise that people who use the codebase will be using the same descripting for 100k rooms.'
Avaeryn boggles at the concept.
Nibios has 727439 rooms on his mud right now
Avaeryn says 'i can't imagine that, at all'
Davion says 'I have a few million, but they don't actually exist till you step in them'
Quixadhal says 'I hope not. I'd have to add a random() call to abort() if I found that happening.'
Nibios says 'well, same with most of mine.'
Retnur says 'I've got a few million virtual rooms for worldmap and 15k traditional rooms.'
Davion grins evilly.
Quixadhal says 'I keep meaning to make a perlin noise terrain system… *sigh*'
Davion says 'Does str_dup actually save you ram?'
Nibios says 'thought you were gonna measure it and let us know'
Davion says 'I did'
Davion says 'And I reported'
Davion says 'Someone's ignoring me :('
Nibios says 'I saw your report on RSS'
Retnur says 'Didn't save much. There's not too many identical strings.'
Quixadhal says 'My mud predates str_dup, so I have no data to add.'
Retnur says 'And they tend to be short ones like short descrs'
Retnur says 'Where the pointer takes 4 additional bytes anyways'
Davion says 'The RSS would be the only thing that matters in this cas'
Davion says 'e'
Retnur says 'RSS?'
Nibios says 'for what it's worth, smaug just uses it as a frontend for strdup'
Quixadhal says 'Resident Set Size, I believe.'
Nibios says 'yep, Resident Set Size'
Quixadhal says 'pages of data actually in memory.'
Davion says 'I think it has more to do with OBJ_INDEX_DATA/OBJ_DATA and MOB_INDEX_DATA/MOB_DATA'
Retnur says 'My vote is abolish str_dup or make it a wrapper'
Retnur says 'That's what I've done with it on my mud for years.'
Davion says 'Seeing as those are probably the only cases where strings are absolutely identical'
Quixadhal says '#define str_dup() strdup()… problem solved.'
Nibios says 'that's an excellent example, really'
Retnur says 'On top of that you have to use resources to compare the strings'
Retnur says 'To know if they are identical'
Nibios says 'especially if yoiu have a dozen instances of the same mob (or object)'
Retnur says 'The longer the string the more you save'
Quixadhal says 'then you can move to gc_strdup() (or whatever it's called).'
Retnur says 'But the longer the string dramatically the more CPU to compare it'
Retnur says 'It's not a sound system this day and age.'
Nibios says 'it works, though.'
Retnur says 'How does it work?'
Nibios says 'pretty good, usually'
Retnur says 'It makes the program more confusing and saves minimal ram at the expense of CPU'
Retnur says 'It's a bad compromise for systems that have little ram from yesterdays standards.'
Quixadhal says 'interesting comparison to do… valgrind with str_dup vs. valgrind with strdup… see if removing it would produce many leaks.'
Retnur says 'That's why you put in gc_strdup() and forget about freeing anything string dup'd'
Retnur says 'Never have a problem with memory leaks again'
Quixadhal says 'yeah, I'm just covering bases here. ;)'
Davion says 'We'd just have to remove every call to free_string'
Retnur says 'No you wouldn't.'
Davion says 'Sure you would. Leaving in redundant calls is also bad practice ;)'
Retnur says 'It frees on its own only if it wasn't freed by the code'
Nibios says 'free_string() just calls free() if its arg is not NULL'
Quixadhal says '#define free_string() free(), which if you used gc_free would become a no-op.'
Retnur says 'It wouldn't really be a redundant call.'
Retnur says 'ALl strings would be made using gc_malloc'
Retnur says 'So you'd just change free to gc_free'
Retnur says 'It's free_string after all'
Avaeryn says 'afk for a few, but still logging'
Quixadhal nods.
Nibios says 'gc_malloc isn't a part of the gcc package though'
Retnur says 'It's a library that can be packaged with the mud, I'm pretty sure.'
Quixadhal says 'It must be readily available if Debian includes it on their default set.'
Retnur says 'If someone didn't wan to type apt-get, I suppose.'
Retnur says 'It's a pretty important library for bug-free development. Especially considering how big of a problem memory leaks are for newbie coders.'
Asylumius has reconnected.
Nibios says 'I can type apt-get all I want, all I get is "bash: apt-get: command not found"'
Asylumius gallantly tips his hat.
Quixadhal says 'It might well be that python uses it internally, and python seems to be almost as widespread as perl for sysadmin stuff these days.'
Davion says 'What .h is it hiding it?'
Nibios says 'I think it's a bad idea to require an external lib that may not even be available on some systems'
Davion says 'Every webhost IMHO should have python ;)'
Quixadhal says 'that's the only qualm I have, actualy. However, it doesn't detract from the idea of removing str_dup.'
Retnur says 'I think Nibios is sort of a nay-sayer. :)'
Retnur says 'If we don't want to use gc_malloc that's fine.'
Retnur says 'All I know is if I was developing a mud from our finished project'
Quixadhal says 'That's one we can easily have as a define'd option, for those who have the library available to them.'
Retnur says 'The first thing I woudl do is implement it'
Quixadhal says 'If autoconf weren't such a pain in the arse, it could even check for it…. '
Nibios snickers softly.
Retnur says 'Anyone checked out the boost::thread library?'
Nibios says 'does it work in C?'
Retnur says 'Little off subject, but I was toying around with that and it's quite sweet.'
Retnur says 'Nah.'
Nibios says 'well there's your answer then.'
Quixadhal says 'No, I fear those modern things…. I expect to find a boost::MMO in there soon.'
Retnur says 'if it were 1985 it would rpobably be in C'
Retnur says 'Well it's been accepted as new standard'
Retnur says 'So it won't be boost too much longer'
Retnur says 'But it's good stuff for multi-threading'
Quixadhal says 'I knew they were pushing for it, did it make it then? Nice.'
Retnur nods.
Retnur says 'I was doing threading with C api before this'
Asylumius says 'How did we get from gcc and no c++ dependent code to boost?'
Quixadhal says 'blue sky mode. :)'
Nibios says 'that's what I would like to know :P'
Retnur says 'Imma ninja-install C++ code into RaM'
Asylumius says 'Then I need to go to the book store :P'
Nibios says 'retnur keeps suggesting we add C++ stuff and calls me a nay-sayer when I say no :P'
Retnur says 'Nah, I'm not suggesting adding C++ code'
Quixadhal says 'that's ok.. it's RaM, so we can just reboot and it'll go away, right?'
Davion grins evilly at Quixadhal.
Nibios chuckles politely.
Retnur says 'It's a C project, just mentioning a useful library to a room full of programmers. I'm sure someone in here uses C++ for other projects other than me :p'
Davion says 'No'
Quixadhal says 'I use perl and scare C++ people into submission.'
Davion grins evilly.
Nibios grins evilly at Quixadhal.
Retnur says 'I use a some python and perl.'
Retnur says 'I used to know perl a lot better.'
Quixadhal says 'writing a few hundred thousand lines of object oriented perl code to do database stuff leaves scars.'
Davion says 'Deep, deep scars.'
Nibios says 'I tried to learn Perl from the first edition of Wall's book'
Retnur says 'Perl has too many ways of writing the same code.'
Retnur says 'My biggest complaint with it'
Davion says 'Aaaanyways'
Davion says 'We're getting way off topic here'
Nibios says 'yeah, Aaaanyways'
Retnur says 'The leader is supposed to keep us on topic'
Retnur pokes Davion in the ribs.
Davion groans loudly.
Davion says 'What do you think I'm doing!'
Quixadhal looks at his fishing pole and puts it away slowly.
Davion cracks a bullwhip menacingly.
Retnur says 'Alright, so we decided to leave the string management system in?'
Davion says 'I think we've moved to a bigger issue… use gc_malloc'
Nibios says 'it's a thrid part lib'
Retnur says 'It's not a standard library.'
Davion says 'Oh'
Nibios says 'third party lib, even'
Davion says 'I guess we can kibosh that one, unless we can wrap it with the release.'
Quixadhal says 'I think we were arguing about taking it out, but making gc_malloc an option for those who have it.'
Retnur says 'I'm not sure why it isn't a standard library.'
Nibios says 'any idea what the license is with it? Keep in mind we're incompatible wqith GPL'
Davion says 'Oh ya'
Davion says 'Well then!'
Quixadhal says 'yep, we can use GPL stuff, but we can't make it part of our distro.'
Davion says 'I think at the very least we should make it easy for the people to change the allocater at will'
Nibios says 'right, Quix'
Quixadhal says 'so the best we can do is say define it in the makefile, but you have to install it yourself.'
Retnur says 'Or we can write our own gc_malloc'
Nibios says 'and right there we've lost two thirds of the newbie coders'
Davion says 'I don't think we should do this. Keep in mind, some people picking up this codebase will know -nothing- aboutprogramming'
Davion says 'It'll be the new "crypt fails to compile!" bug'
Davion says '"bug"'
Nibios nods in enthusiastic agreement with Davion.
Retnur says 'I don't like the idea of defines and optional settings and stuff, but at the same time I don't like the ideas of rogue pointers and memory leaks.'
Quixadhal says 'I'm all for yanking str_dup and allowing gc_malloc as an option that isn't on by default.'
Nibios says 'so we don't put in any rogue pointers and memory leaks. Coders who play with this afterwards are on their own'
Retnur says 'Coders after us are going to be noobs.'
Retnur says 'By large.'
Asylumius says 'Since I don't know, how "available" is gc_malloc?'
Nibios says 'meh, finding memory leaks builds character :P'
Retnur says 'I think we've determined that gc_malloc is off the table.'
Retnur says 'So what does that leave us?'
Nibios says 'well, we can leave str_dup() alone, or we can make it a wrapper around strdup()'
Asylumius says 'homework'
Quixadhal says 'if str_dup is only saving us 200K of memory for all the code, I'd just as soon yank it and make a wrapper.'
Quixadhal says 'I'll have to move it anyways… I want all the str_ stuff in some nice file like strings.c so it makes sense. :)'
Nibios says 'if we do that, though, there is one thing I'd like to do, and that's instrument it.'
Retnur says 'What do you mean by instrument it?'
Davion says 'Ok guys, Turkey dinner time, I'll be back as soon as possible'
Quixadhal says 'have fun!'
Nibios says 'keep track of how many strings have been created, and how much memory is being used by them.'
Nibios says 'okay, take care'
Quixadhal says 'Ahhh, good idea.'
Quixadhal says 'I never object to keeping statistics. :)'
Nibios says 'On my mud, right now my shared string space is 43245 strings of 6753042 bytes. I'm going to conservatively estimate that half of them are being used twice. That means it's saving me about 3.4 meg right now.'
Avaeryn says 'i'm back'
Nibios says 'I also think I'm going to be adding some information to that'
Nibios says 'wb, Avaeryn'
Retnur says 'So how is the shared string thing implemented'
Retnur says 'Is it a big array of pointers to strings?'
Avaeryn says 'things on hold while davion eats turkey?'
Quixadhal says 'My mud pre-dates that, but I could probably grep the world file to see how often thigns are duplicated.'
Nibios says 'actually, grepping world files won't tell you much.'
Nibios says 'just out of curiosity, Retnur, you've been advocating we get rid of it all this time without knowing what it does or how it works?'
Quixadhal says 'Yes it will, if the string is bigger than one line, it's probably unique. :)'
Nibios says 'well, let's say youi have a mob, there's a MOB_INDEX_DATA struct with the name, descs, etc of that mob.'
Retnur says 'I was advocating we figure out the actual number it saves us vs the headache it gives us to leave it in.'
Nibios says 'when you instantiate that mob with create_mobile, the mob's name, descs, etc, are shared with the copies in the MOB_INDEX_DATA struct.'
Retnur says 'I know all of that. I want to know how it actually does the sharing'
Retnur says 'And comparing.'
Nibios says 'I don't see where the headache is, honestly.'
Retnur says 'Because in the str_dup I see it isn't that functional'
Retnur says 'It's only returning old memory if it's the string actively being compared. Not any string that is identicle.'
Nibios says 'okay, it searches teh shared string space, using the length of the string as a hash.'
Retnur says 'I don't see it preforming a search str_dup at all.'
Nibios says 'there are better hashing angorithms btw, Erwin published a snippet for one a while back.'
Nibios says 'algorithms, even'
Quixadhal says 'it actually compares the pointer value first… if you're asking to dup one that is already shared, it returns you the same pointer you passed in.'
Retnur says 'I'm not seeing that. Did you remove stuff already from str_dup?'
Quixadhal says 'do a make tags, and then vim -t str_dup *grin*'
Nibios says 'right. I was describing how it works at boot time, actually'
Quixadhal says 'it's defined in db.c'
Quixadhal says 'line 2599 in my copy at the moment.'
Nibios suddeenly wonders if he's confusing fread_string with str_dup :P
Retnur says 'All I see in str_dup is if the address of str is greater than string_space and str is less than top_string then return the address of str'
Retnur says 'Otherwise allocate new memory.'
Retnur says 'I don't see a search here or any string comparisons.'
Quixadhal says 'if it isn't in the shared space, it uses alloc_mem to recycle a new block'
Nibios says 'yep, that's it'
Quixadhal says 'yeah, fread_string is what puts things into the shared space.'
Nibios says 'my bad, I really was thinking of fread_string'
Retnur says 'So str_dup doesn't even deal with the shared space anyways?'
Nibios says 'so str_dup really isn't a performance hit at all, then'
Quixadhal says 'I think.'
Quixadhal says 'str_dup doesn't add to it… it prevents you from duplicating a string that's already shared.'
Nibios says 'right'
Retnur says 'Hrm'
Quixadhal says 'you can kindof think of it as ROM. The strings loaded at boot time are declared to be the shared region, and if you ask to dup one of those, you just get the same pointer back again.'
Nibios says 'yep'
Quixadhal says 'it's bad practice to have called it str_dup, since it doesn't always…. you won't know if you can actually write to the pointer you get back.'
Nibios says 'also if the string is zero length it returns &str_emnpty0.'
Quixadhal says 'put another way, if you DO write to it, you can corrput every instance of the mob in question.'
Retnur says 'So if you run out of the memory you defined with MAX_STRING from fread_string it does an exit()'
Nibios says 'yes youi can.'
Nibios says 'and trash area files when you asave.'
Retnur says 'And you have to define more ram to be allocated than you plan on using so you don't hit that exit'
Quixadhal says 'yep'
Nibios says 'MAX_STRING sets the size of the shared string space, after boot is over, it's no longer used.'
Retnur says 'It's used for fread_string.'
Retnur says 'If you run out of that number you get a bug and a game shutdown'
Nibios says 'yep'
Quixadhal says 'which is used for player files, notes, probably a few other bits at runtime.'
Nibios says 'and if you set it too high you waste memory'
Nibios says 'oh, player files should never be in the string space, except coincidental matches.'
Retnur says 'So I guess you have to be constantly monitoring that number to make sure you are setting it high enough but not too high as you continue to grow as a mud.'
Nibios says 'and notes should be loaded after boot is over.'
Retnur says 'Anything that uses fread_string will be there.'
Quixadhal says 'ahhh, there's a boolean that's set at boot time and cleared afterward.'
Nibios says 'fread_string varies its behavior according to how fBootDb is set'
Quixadhal says '2297 in db.c'
Retnur says 'Funny part is if you ever accidently use free on any of the strings that use that shared string space'
Retnur says 'It'll free the entire thing'
Retnur says 'Because it was created with a single calloc call'
Nibios says 'if you use free in *anything* not allocated by malloc et al youi get weird & wonderful things :P'
Retnur says 'strdup uses free'
Retnur says 'It's in the realm of possibilities that a new coder, our target audiance'
Nibios says 'strdup also calls malloc internally'
Retnur says 'Will think that's the case with str_dup'
Retnur says 'I know when I worked with kyndig on his mud'
Retnur says 'He thought that.'
Retnur says 'And he wasn't exactly a noob.'
Retnur says 'That wouldn't even be an easy bug to track since it would crash sometime after the free. Not on the free.'
Quixadhal says 'If you're lucky, it would crash before an area file got saved, since some of the strings in it might now be occupied by other data.'
Retnur says 'Gotta love memory corruption.'
Nibios says 'I'd like to think a newbie coder would also notice all those calls to free_string and wonder what those are all about, and hopefully realize they're associated with str_dup'
Quixadhal says 'yep, that's about 90% of what we find running gdb to solve crash errors.'
Nibios says 'especially since free_string is typically called to free the old string immediately before callinbg str_dup with the new one'
Retnur says 'Eh, they might know that free_string is being used but assuming they think they know how str_dup works (and by looking at str_dup it appears to use malloc, btw)'
Retnur says 'They would assume it's safe to free.'
Nibios says 'they'd learn pretty quickly they're wrong'
Retnur says 'After they tore something up maybe. But it's possible to make that mistake knowing about it.'
Retnur says 'Most coders use free() in every day life. It's not out of the realm of possibilities to throw in a free instead of a free_string by mistake.'
Nibios says 'in any case, we have to have a str_dup function. Whether it's the stock code or a wraper around strdup or whatever doesn't matter; we still need the actual function itself.'
Retnur says 'If it's strickly a wrapper around strdup then it doesn't matter if free is used or free_string'
Quixadhal says 'well, WE don't…. we want one to be nice to people trying to apply snippets they don't understand.'
Nibios says 'well, that's where I was going, yes'
Nibios says 'seriously, I don't know why you're so worried about people calling free by mistake.'
Quixadhal says 'that's why I left in the silly DECLARE_FOO wrappers too.'
Retnur says 'Someone show me how it is recycling memory'
Retnur says 'I don't see it'
Nibios says 'if I knew of cases where it has happened, I'd agree with youi. But haven't'
Retnur says 'I see every single fread_string getting'
Retnur says 'top_string + sizeof(char *)'
Retnur says 'No comparison'
Retnur says 'I don't see any code using smart pointers at all.'
Quixadhal says 'that would be this ugly line… !strcmp( top_string+sizeof(char *)+1, pHash+1 )'
Retnur says 'in fread_string'
Retnur says '?'
Quixadhal says 'yes.'
Quixadhal says 'down at case ~'
Retnur says 'Oh I see.'
Retnur says 'So string has is an array of pointers to strings'
Retnur says 'string hash*'
Nibios nods.
Retnur says 'Hrm. I guess the CPU isn't much of an issue if it is done at load time.'
Quixadhal says 'yep, and it loops across them all to try to find a match. I would have used a binary tree or soemthing.'
Quixadhal says 'actually that comparison runs every time fread_string is used.'
Nibios says 'actually, on my old 486, the mud used to take a couple minutes to boot, and it was spending most of its time in that loop in fread_string'
Quixadhal says 'it only allocates new entries at boot time.'
Retnur says 'Yeah'
Retnur says 'But it's only done at boot up right?'
Nibios says 'my mud, at the time. also had that ssm mdule :P'
Nibios says 'yes, only at boot time, on RoM'
Quixadhal says 'No, the comparison will be done for any fread_string call.'
Nibios says 'ssm.c extended that behavior to all the time'
Retnur says 'When is fread_string used other than bootup?'
Retnur says 'In earnest?'
Nibios says 'reading pfiles'
Retnur says 'That's true.'
Quixadhal says 'OLC'
Retnur says 'Well, it is a CPU hog for sure.'
Retnur says 'A single string compare is more quantums than people realize.'
Retnur says 'Since it runs through each character to match them.'
Nibios says 'right, that's why I don't like the idea of looking up flags by name.'
Nibios says 'if you want a real cpu hob, btw, take a look at strcat someday :P'
Nibios says 'cpu hog, even'
Quixadhal says 'it's an order of magnitude difference though.'
Retnur says '65,000 strings with fread_string would be quite taxing.'


Nibios says 'I'll check that out with grpof next time I'm doing a profiling session.'
Quixadhal says 'a flag lookup is a short string that is, more often than not, going to match and thus not have to walk the entire tree. A strdup() is a longer string that often will not match, thus walking every string in the entire shared string table.'
Nibios doesn't think that 'Nibios' or even 'Quixadhal' is all that long
Retnur says 'Well, the strings that really matter for strdup are the longer onces since that's where the ram is saved.'
Quixadhal agrees, but thinks a typical room description is pretty long, and 10,000 of them will take a bit of time.
Nibios says 'and besides, seriously, how often are pfiles read? vs flags beiong checked several times a second?'
Retnur says 'Let's save the pfiles in binary.'
Nibios says 'I'm thinking of aggr_update specifically, btw'
Retnur says 'Well, we're gonna fix all of those polling functions.'
Nibios says 'oh sure! GREAT idea!'
Retnur says 'Those are ridiculous CPU hogs.'
Retnur says 'I've always prefered binary pfiles over ascii ones.'
Retnur says 'But that's just be.'
Retnur says 'me*'
Nibios says 'you're serious?'
Retnur says 'I like being able to seek to a certain position in the file and save just the fields that were changed.'
Retnur says 'Not rewriting and reading entire files.'
Quixadhal says 'Hey, if it were me… I'd store everything in PostgreSQL and be done with it.'
Nibios says 'I thought you were joking when you suggested binary pfiles :P'
Nibios says 'ask the CircleMud community about binary pfiles.'
Retnur says 'I wrote a system for a codebase in C++ I was working on to automatically save fields in SQL without any extra code required. Just naming the fields in the structure when you created them.'
Quixadhal says 'ask any MUD admin who's had to fix a broken player file about binary pfiles. :)'
Retnur says 'And it saved real time as values were changed. It was interesting'
Retnur says 'But it was too slow to really be practical.'
Nibios says 'exactly, Quix'
Retnur says 'If you have a real problem with a pfile I don't see how you can fix it anyways.'
Retnur says 'Not accurately.'
Retnur says 'Better just to have a backup anyways.'
Retnur says 'Binary pfiles let a lot of things happen that you just can't do with ascii ones. The difference in speed of loading and saving is probably 10 fold.'
Retnur says 'You can still do tags and whatever in binary files.'
Quixadhal says 'If I know some joker got a skill they shouldn't have because of a bug, I can go edit their file and remove it… if it's text.'
Quixadhal says 'not that that has ever happened…. *look around the ceiling*'
Retnur says 'I suppose, but you could also remove the skill inside of your mud.'
Nibios says 'You haven't read esr's "The Art of Unix Programming", have you? Or McConnell's "Code Complete"?'
Quixadhal says 'The skill works fine, they just shouldn't have been able to train it.'
Nibios says 'and yeah, that's another thing, like Quix said'
Retnur says 'I've known people who specifically have mini scripts/programs in their pfile directory to edit pfiles in a meaningful way offline.'
Nibios says 'there are times when yoiu do have to go in and adjust something in a pfile.'
Quixadhal says 'and my MUD is based off Diku Gamma… very little in the way of editing ANYTHING from in the game. :)'
Nibios says 'and still, so what? How long does it take to read an ascii pfile? How many cpu seconds a day are spent on it?'
Retnur says 'Enough to where it can become noticable with a command that loads pfiles to produce offline score sheets or "finger" or whatever commands you use to generate that info.'
Nibios says 'my finger command doesn't read pfiles'
Retnur says 'Then I guess you're one of the lucky ones, because all of the snippets do.'
Nibios says 'and something that runs offline doesn't impact the mud anyway'
Retnur says 'I don' tmean something running offline.'
Retnur says 'I mean something running to get info from offline elements.'
Retnur says 'Like opening pfiles.'
Retnur says 'Try making a command that mails all of your offline players by generating a list with a scan_dir'
Nibios says 'if you're going to be opening and reading them constantly, then keep the datas in memory, or a database.'
Retnur says 'It'll probably hickup for about 3 or 4 seconds if you have more than a hand full of pfiles'
Nibios says 'who cares how long it takes? You did call it via fork() and exec(), didn't you?'
Retnur says 'Keeping the datas in memory isn't really that good of an option, at least not all of it, and a database should have been used instead of ascii files anyways.'
Retnur says 'So you're making my argument for me.'
Retnur says 'And the databases are saved in binary mode.'
Nibios says 'but you also have this nifty thing called sql that makes it almost as easy to work with as ascii text'
Quixadhal says 'I have a single file that is modified when a character is created or deleted that holds their name and a few statistics. Why not just integrate a small web server to run on another port?'
Nibios says 'but seriously, if your mailer takes more than a fraction of a second of mud cpu time, you're doing something wrong.'
Retnur says 'If I was just going to go pie in the sky I would just put it all in a SQL database from the word go.'
Nibios says 'heh, I'd agree with you on that one.'
Quixadhal says 'Not MySQL though… can't see how people can live without proper foreign key constraints.'
Nibios sighs.
Nibios says 'let people use the SQL server they want. Or happen to have.'
Retnur says 'Well, I don't see how people live with C over C++ in this day and age but some people still manage.'
Nibios says 'like me, for instance.'
Nibios says 'some of us even prefer working in C'
Quixadhal says 'Yes, but I use SQL to do my integrity checking, so I don't have to do it all in code.'
Quixadhal says 'without foreign keys, you can't do that… so you write the checks twice, once for the game, once for the web code, maybe another time for something else.'
Retnur says 'Well, I used to use C and was hard headed about learning C++.'
Retnur says 'But then one day I saw the light, fortunately.'
Nibios says 'one thing I've come to be leery of is all prophets for the ne True Language, regardless of what that language is.'
Nibios says 'One True Language, even'
Retnur says 'Considering C++ still supports all C code, I guess C++ is C with just more features.'
Retnur says 'So I don't see the downside of making a hybrid.'
Nibios says 'bigger and klunkier. And not really a superset, either.'
Retnur says 'Spoken like a true believer.'
Quixadhal says 'Objective C is a superset….'
Nibios says 'as Quix can tell you, you cannot just feed arbitrary C code to C++ and expect it to compile.'
Retnur says 'As I can tell you, you can 999 out of 1000 lines.'
Retnur says 'And if you can't, it was because you should have wrote it the correct way from the beginning.'
Nibios says 'I'm not saying C++ doesn't have advantages. I'm just saying that it's not the One Answer for Everything'
Quixadhal says 'We could rewrite ROM in Forth…'
Retnur says 'It's the answer for most of the most outrageous problems of C.'
Nibios nods at Quixadhal.
Retnur says 'And the fact that you can still use all of C while using C++ gives it no downside.'
Nibios says 'I guess you missed the part where I pointed out it's not really a 100% superset'
Retnur says 'Other than claiming it is less efficient which is still efficient enough to be used on every single major project these days that requires efficiency.'
Retnur says 'I'm disputing the idea that it isn't a superset for how you use the language.'
Retnur says 'I guarentee it takes little change to get it to compile for you and brings many new features to the table.'
Quixadhal says 'we could write a ROM emulation layer for MudOS…'
Retnur says 'I thought the debate over C or C++ was over like 10 years ago.'
Nibios says 'okay, so C++ is in fact the greatest thing since sliced bread. Fine. But we're doing the mud in C, so the whole discussion is irrelevant.'
Retnur says 'When colleges stopped mandating new C classes.'
Retnur says 'I prefer python.'
Retnur says 'Probably better for writing a mud too.'
Nibios says 'it probably is'
Quixadhal says 'how about brainfuck? Yes, that is a real language…. *grin*'
Retnur says 'But if I'm going to be working with C, I see little reason not to use C++ features that make it better. Especially when we're already compiling with g++'
Nibios falls to the ground and rolls around laughing hysterically.
Nibios says 'brainfuck is actually kinda cool'
Quixadhal says '8 commands, you can learn it at lunchtime.'
Nibios says 'uhh, what did you not understand about we're doing this in C?'
Nibios nods at Quixadhal.
Nibios says 'and a minimalist can reduce it to 7, but hten it's not brainfuck'
Quixadhal says 'LOL, it's actually a derived language… the parent is called P''
Quixadhal says 'This is hello world. "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.——.——–.>+.>."'
Nibios says 'yep'
Nibios was about to post his version, but would have to strip the comments first
Quixadhal says 'We could use that as our scripting language for mudprogs…'
Nibios says 'there ya go!'
Quixadhal chuckles politely.
Nibios says 'anyway, where were we?'
Davion says 'Ok back'
Davion says 'Where were you :P'
Retnur says 'Has anyone discussing improving the logging functions on this project?'
Retnur says 'The logs are quite pitiful as it stands.'
Nibios says 'how so?'
Nibios says 'youi mean the way they basically just say 'an error has occurred', and leave it up to you to figure out what and where?'
Davion says 'Ya know guys, if we're going to hold these meetings every week, don't you think we should focus more on what to do in the short term, with a bit of a blurr on the long term?'
Quixadhal says 'I rewrote mine to be a unified log_printf with a bunch of arguments like severity, file/function/line numbers, things involved (room, obj, mob), etc… and then made macros to use them.'
Retnur says 'The logging seems somewhat important for the short term.'
Davion says 'I agree, but maybe we should define what we want for a first release'
Nibios says 'I use a log_printf() too, including vnums etc whenever possible.'
Retnur says 'Okay, what do we want for a first release?'
Nibios says 'basically, a quickmud/firstmud done right, right?'
Nibios says 'and we're quibbling over just what we mean by 'done right' :P'
Quixadhal says 'I think I'm going to continue refactoring code, possibly see what happens if I comment out str_dup and friends, and work on integrating that bit system with my crazy namespace idea. For starters.'
Retnur says 'That converting all of the underlying systems to the new bit system is more work than it sounds at first glance.'
Davion sits down and thinks deeply.
Nibios says 'okay, one thing I may not have said is I see no harm in trying to merge the namespaces, I just didn't see the gain. If you want to do it, go for it.'
Davion says 'I think for a first release we should focus on A)Cleaning the code for various compilers, B) Fixing the major bugs'
Davion says 'Then we have a solid base to work from'
Quixadhal says 'maybe, I think it's worth investigating though.'
Retnur says 'As far as I know most of that is done other than bugs that are unknown?'
Davion says 'Well, I can't compile under 64bit system'
Retnur says 'Seems like quixadhal has done a lot of cleaning.'
Davion says 'Btw, the %zd works like a charm'
Retnur says 'What is different for a 64bit system compile?'
Quixadhal says 'Yes, A is almost done. I kindof consider shuffling and refactoring to be part of cleaning. :)'
Nibios says 'weren't we going to add the things that almost everybody adds, like olc etc?'
Davion says 'Yes'
Davion says 'But maybe not for the initial release'
Nibios says 'Oh, Davion, I think Samson gave us a fix for the 64-bit problem.'
Quixadhal says 'yep, that's version 1.0 though. all projects release a 0.1 first.'
Davion says 'Ya'
Davion says 'I'm about to commit it'
Davion says 'However'
Retnur says 'I've never dealt with a 64 bit machine'
Davion says 'It doesn't fix all the 64bit errors'
Nibios says 'oh, there are more?'
Retnur says 'What kind of errors are you getting?'
Davion says 'Just one'
Davion says 'return (char *)(unsigned int)str;'
Quixadhal says 'LOL'
Retnur says 'What's the error?'
Davion says 'First of all! Wtf :P Second of all'
Retnur says 'Why is that casting even done?'
Nibios says 'I know you're haviong trouble with Quix's umm, "fix"'
Davion says 'db.c:2681: error: cast from const char* to unsigned int loses precision'
Quixadhal says 'That gets around the compiler's "issues" with the const char str_dup mess.'
Nibios says 'get rid of the casts, return a const char *'
Retnur says 'why not just (char *) str'
Retnur says '?'
Quixadhal says 'You can't'
Nibios says 'g++ don't like that'
Retnur says 'Why don't g++ like that?'
Nibios says 'once upon a time, a cast meant 'I really know what I'm doing, trust me'. But nowadays the compiler isn't buying it.'
Quixadhal says 'we had that discussion… some of the strings are const, some aren't.'
Nibios says 'because it's discarding a const qualifier'
Retnur says 'So let me ask you this'
Retnur says 'Why can't you just change the str variable to char *str?'
Retnur says 'Evne if you pass it from a const that should work'
Nibios says 'is there anyplace in the code where a string returned by str_dup is modified? I can't think of any offhand.'
Nibios says 'because then youi can't give it a const char * for an argument'
Quixadhal says 'Isn't there a way to modify strings on objects?'
Nibios says 'as far as I know, they all releaqse the old string and str_dup a new one, none of them actually change it.'
Quixadhal says 'How about when you make a corpse of so-and-so?'
Retnur says 'I don't understand why the argument for str_dup is a const char anyways.'
Nibios says '(let's not mention smnash_tilde for now) :P'
Davion says 'It should never be modified. Ever'
Davion says 'Things passed by str_dup should be const'
Davion says 'It's really unfortunate that diku and such totally ignore the const qualifier.'
Nibios says 'when you make a corpse it still uses str_dup'
Retnur says 'If you're returning a char *'
Quixadhal says 'So, you expect the newbie coder to know to use str_dup for const things, but strdup when they want to modify it?'
Retnur says 'No matter what'
Retnur says 'Then it defeats the purpose'
Retnur says 'That's not the proper use of a const'
Retnur says 'If you were returning a const every time, then yes, that would be proper use.'
Retnur says 'Plus technically it should be const char const *'
Retnur says 'Not const char *'
Retnur says 'Since were never changing the pointer either.'
Quixadhal says 'The fact is, you aren't modifying the string you pass in… you MIGHT want to modify what gets returned, if it isn't in the shared string space.'
Quixadhal says 'hence the split persona.'
Nibios says 'well, what I'm saying is, there's no case where the string returned by str_dup needs to be written to'
Quixadhal says 'Then str_dup is a bad name.'
Retnur says 'And what I'm saying is either the return value should be const char *'
Davion says 'What do you mean? Every string when you str_dup or strdup should not be modified'
Quixadhal says 'and is overly confusing…. '
Retnur says 'Or the passed value shouldn't be'
Nibios says 'why is it a bad name?'
Davion says 'As it's sized to the agrument. The only way modifying it would work is if it's the exact same size replacement'
Nibios nods at Quixadhal.
Nibios says 'err nod davion'
Quixadhal says 'or shorter.'
Davion says 'No'
Davion says 'Shorter would cause a memory leak'
Quixadhal says 'Nope.'
Davion says 'Doesn't it read till \0?'
Quixadhal says 'strings are null terminated.'
Davion says 'Ya'
Retnur says 'It wouldn't cause a leak'
Davion says 'Exactly'
Quixadhal says 'the rest of that memory isn't lost….'
Retnur says 'free doesn't read to \0'
Quixadhal says 'free will free the entire block'
Davion says 'free_string may…'
Retnur says 'So it doesn't matter where it is ull terminated for free'
Retnur says 'Hrm'
Nibios says 'can someone please pint to a place in the RoM code where a string returned by str_dup is modified?'
Retnur says 'It wouldn't really be a memory leak anyways since you never free that string memory ever anyways.'
Retnur says '(with the current system)'
Davion says 'Never is, Nibios'
Nibios says 'that's true only if the string is in the shared space'
Davion says 'Any time the string requires modifying, free_string is called, followed by a str_dup'
Retnur says 'If we make str_dup return a const (like it should since its returning the address of the a const)'
Quixadhal says 'str_dup hooks into the alloc_memory recycle mess.'
Nibios says 'I know, that's why it should return a const char *. But I'm hearing 'but what if youi want to change it?''
Retnur says 'Then all of the variables we return it to have to be constants'
Retnur says 'Or we run into the same issue anyways'
Davion says 'It's never changed'
Retnur says 'x1000'
Davion says 'I agree with it returning the const char*'
Nibios says 'and yes it's a bigger mess than one_argument()'
Quixadhal says 'it comes back to… what is the entire steaming pile really gaining us, that we're arguing so much to keep it?'
Retnur says 'But like I said, the type should be const char const * for the passed argument. The memory is constant but so is the pointer.'
Davion says 'Oh'
Retnur says 'If the pointer location was to change it would be equally bad.'
Quixadhal says 'would not #define str_dup() strdup() solve that whole set of issues?'
Retnur nods at Quixadhal.
Nibios says 'why should the pointer itself be a constant?'
Davion says 'strdup doesn't return a const anything'
Retnur says 'The same reason the memory should be. Whatever you pass is always what you want ti to point to'
Retnur says 'Nothing different'
Davion says 'Err'
Davion says 'Wouldn't that require the variable you're setting be a char const *?'
Quixadhal says 'well, then I guess the folks who designed libc figured you might want to modify copies of strings.'
Nibios says 'so you can't ever search that string for ohh, say color codes, then'
Retnur says 'const pointer doesn't mean you can't search the string'
Retnur says 'It means you can't point to a new string'
Nibios says 'if you can't change the pointer, how can you?'
Retnur says 'With a new pointer, as you should anyways'
Quixadhal says 'actually, const char * doesn't mean you can't modify the pointer… you can't modify what it's pointing TO.'
Davion says 'const char * yes, const char const * no.'
Nibios says 'right'
Retnur says 'char *p = &str[0]'
Davion says 'Enough said ;)'
Nibios says 'but char * const means you can't modify the pointer itself'
Retnur says 'Nobody is talking about modifying a pointer to search a string.'
Retnur says 'It means you can't change the value of the pointer variable.'
Nibios says 'right'
Retnur says 'Which you shouldn't if you want it to always point to the full string'
Retnur says 'You can still examine the string'
Retnur says 'You can still search it'
Nibios says 'this is also true'
Retnur says 'But the argument of const char * is an academic one that breaks down the second you are returning something that is insisted to be constant to a normal pointer.'
Nibios says 'okay, you're right, we don't want to modify the pointer, if we need to we assign it to another pointer'
Davion says 'At any rate guys, I think 'const char const *' is going a bit far'
Nibios nods in enthusiastic agreement with Davion.
Davion says 'const char *, is a goo didea'
Retnur says 'Well, explain why const char * is more important than const char const *'
Retnur says 'I think both are equally ridiculous in this situation.'
Davion says 'I updated the svn with the %zd fix'
Davion says 'I dunno'
Nibios says 'okay, cool'
Quixadhal thanks Davion heartily.
Davion says 'That's another thing'
Retnur says 'You don't want the value of str being changed, but do you want what str is looking at to be changed?'
Davion says 'How should we handle the svn?'
Retnur says 'That in turn changes the value of str.'
Davion says 'Should all of us have access, or just one or two of us?'
Nibios updates to revision 5
Retnur says 'I don't know anything about SVN.'
Nibios says 'I think it's pretty much essential that active developers have write access.'
Retnur says 'I'm guessing there is some sort of database we connect to with a client?'
Davion says 'Ya'
Davion says 'You use linux, Runter?'
Retnur says 'Yeah'
Quixadhal says 'I don't mind, although it would be best if we all had access via our own usernames.'
Davion says 'type 'svn checkout http://sulinea.arthmoor.com/ram''
Nibios says 'yes, definitely, separate usernames.'
Quixadhal says 'otherwise tracking changes becomes…. challenging. :)'
Davion says 'Uhh'
Nibios nods at Quixadhal.
Davion says 'Who's good with svn?'
Davion has no clue how to setup usernames for svn ;)
Quixadhal says 'unless we just agree that anything that breaks is Davion's fault.'
Davion gasps in astonishment.
Nibios says 'I'll be goling through that myself in the next day or two, Davion, I'll take note sfor you or something.'
Nibios giggles at Quixadhal's actions.
Davion says 'Kew'
Retnur says 'What does checkout do?'
Davion says 'Downloads the current repository'
Quixadhal says 'I installed and started using it a few days ago. But I've used cvs for years.'
Nibios says 'checks out a copy of whatever you're checking out'
Retnur says 'So if we all make different changes it will keep up with them and combine them?'
Nibios says 'anybody got that URL to the manual handy?'
Retnur says 'But what if we make changes to the same file?'
Quixadhal says 'checkout creates a working copy.'
Davion says 'Oh'
Davion says 'Cool'
Davion says 'The svn multuser stuff is handled by the svn password file'
Quixadhal says 'you can then do an update to merge new changes from the repository into your copy'
Nibios says 'the idea is, as long as people don't change the same line in the same file, it keeps everythign straight'
Quixadhal says 'and a commit to push your own changes.'
Davion says 'Commit is password protected atm'
Retnur says 'How do I update?'
Davion says 'Currently only one person has the password'
Nibios says 'svn update'
Retnur says 'And the address?'
Quixadhal says 'if we both make changes to overlapping sections of a file, it brings up a conflict resolution (much like diff rejects) that you have to solve.'
Davion says 'http://sulinea.arthmoor.com/ram'
Retnur says 'So when it says skipped that means I am up to date?'
Davion says 'I guess'
Retnur says 'Skipeed 'http://sulinea.arthmoor.com/ram''
Davion says 'lol'
Davion says 'Nice c/p :P'
Nibios says 'There's an O'Reilly book called "Version Control with Subversion", goole for it; its available online.'
Quixadhal says 'once you've got a working copy, you can do updates/commits/etc in that directory without having to spell out the repository path.'
Nibios says 'okay, here's a question, should we all have separate branches?'
Retnur says 'But what I don't understand is when i do svn update all it says is "Skipped ','"'
Retnur says 'Is that correct?'
Quixadhal says 'we could, although we might have to rearrange a bit.'
Nibios says 'what version is your working copy?'
Davion says 'svn update, sync's you to the current version'
Retnur says 'revision 5'
Davion says 'That's the current version'
Nibios says 'you're up to dat ethen.'
Nibios says 'odd, though, for me it says "At revision 5." when I type svn update again.'
Davion says 'Ya, same'
Retnur says 'No idea.'
Davion says 'Wtf Retnur'
Davion says 'Ok guys'
Nibios says 'wqhen I actually udated, it said 'Updated to revision 5.''
Davion says 'So for our first version we should begin installing the bug fixes in http://www.mudbytes.net/index.php?a=topi...'
Quixadhal says 'try svn status'
Quixadhal says 'and also svn info <filename>'
Davion says 'And also fix this thing with Quix's "fix"'
Davion says 'But seriously, multicasting in one statement… that's a new one for me :)'
Retnur says 'svn: warning: '.' is not a working copy'
Nibios chuckles politely.
Nibios says 'oh, also try svn status –verbose'
Retnur says 'although info seems to work'
Quixadhal says 'are you in the directory, or one level up?'
Retnur says 'I was one level up, im in the directory now'
Retnur says 'ANd now status doesn't produce anythin'
Quixadhal says 'that should work.'
Retnur says 'No output at all.'
Nibios says 'which directory? ram?'
Retnur says 'I'm in ram directory'
Quixadhal says 'yep, which means everything is up to date and nothing has changed locally.'
Retnur says 'Ah'
Nibios says 'okay, all should work fine now'
Retnur says 'Alright'
Nibios says 'try svn update, should say At revision 5.'
Retnur says 'When I'm in the directory svn update indeed works.'
Quixadhal says 'it uses the .svn subdir to figure out where things should be.'
Nibios says 'oh, and *never* muck around in .svn'
Quixadhal snickers softly.
Nibios says 'do I lie, Quix?'
Davion says 'Just remember, Retnur, before you start modifying your working copy, -always- type 'svn update''
Retnur says 'So quixadhal is gonna get right on fixing all of those bugs right?'
Quixadhal says 'Yeah, you can hurt yourself if you change anything.'
Quixadhal says 'can I fix the 64-bit cast problem by removing str_dup?'
Nibios says 'don't we want to keep it for snippets?'
Quixadhal says '#define str_dup() strdup()'
Retnur says 'I think str_dup should have been named str_dup_or_maybe_recycle'
Nibios says 'actualy, if it returns a const char *, you can get rid of both casts and all will be well'
Davion nods at Nibios.
Quixadhal says 'says he who doesn't know how many things g++ 4.2 will probably whine about once that const goes on.'
Nibios snickers softly.
Retnur nods at Quixadhal.
Nibios says 'true :P'
Retnur says '1000 things'
Nibios says 'actually I do have a very good idea; I've done this before'
Retnur says 'Just make str_dup route to strdup'
Quixadhal says 'well, since I don't have a 64-bit system to test against… I'll probably assume it's a difference between int and long and see if size_t will do the job.'
Retnur says 'Any snippet that uses str_dup will get the same functionality'
Davion says 'Quix: I can give you access to a 64bit shell'
Quixadhal says 'then I'll mask str_dup and your little dog too.'
Davion says 'If you guys need shells, I got loads ;)'
Quixadhal says 'that would be fine, if it's not too much trouble. ssh I assume?'
Retnur says 'Meh'
Nibios says 'I have my own linux box, thank you.'
Retnur says 'Last time I needed a shell you didn't come through, davion :p'
Davion says '…Yes I did'
Retnur says 'No you didn't.'
Retnur says 'You told me to go talk to some guy on mudbytes'
Retnur says 'Who said no'
Davion says 'Oh'
Davion says 'Zeno shut you down!'
Quixadhal says 'I have a real linux box in the corner, and a virtual machien with gcc 4.3 on it… but no 64-bit CPU to play with.'
Nibios nods at Quixadhal.
Davion gasps in astonishment.
Retnur says 'He said I don't post enough on mudbytes or something.'
Davion says 'What a bastard'
Retnur says 'I don't post enough *anywhere*.'
Retnur says 'Not just mudbytes :p'
Davion says 'He probably doesn't like you from your kyndig.com days ;)'
Retnur says 'probably but I don't know who he is'
Retnur says 'As long as he isn't Elanthis'
Davion shakes his head.
Davion says 'lol!'
Quixadhal contemplates the joys of office politics.
Davion says 'I'm a huge fan of Elanthis' SourceMU
0.0/1