IRC logs for #openttd.dev on OFTC at 2013-07-21
            
00:31:24 *** Zuu has quit IRC
03:11:22 *** Supercheese has joined #openttd.dev
06:50:58 *** Supercheese has quit IRC
07:52:01 *** Zuu has joined #openttd.dev
07:52:01 *** ChanServ sets mode: +v Zuu
07:58:53 *** Alberth has joined #openttd.dev
07:58:54 *** ChanServ sets mode: +v Alberth
08:39:50 *** frosch123 has joined #openttd.dev
08:39:50 *** ChanServ sets mode: +v frosch123
08:56:29 *** Ristovski has joined #openttd.dev
09:49:39 <Zuu> I've made a final review of http://devs.openttd.org/~zuu/story-sl-fix.patch to ensure that the new data sizes should be correct.
09:50:28 <Zuu> Should I add a _LAST = 255 enum to the page element type enum to emphaize that it is stored as a byte?
09:52:15 <Zuu> s/invalid chunk sizes/invalid data types/ <--- in a comment of the patch
09:52:39 <Zuu> s/invalid/wrong/
09:53:32 <Rubidium> enum?
09:54:06 <Zuu> story_base.h :30
09:54:17 <Rubidium> that requires something akin DirectionByte
09:54:38 <Zuu> http://paste.openttdcoop.org/show/2416/
09:54:56 <Rubidium> as enums have "unknown" size, so it's also endian tricky
09:55:37 <Rubidium> so you need to force a known size, which you do with TinyEnumT
10:04:22 <michi_cc> Hmm, that's a bugger. ICU has nice support for proper word iteration, but due to some internal bugs it can only be used with UTF-16 input and our Textbuf class is very much UTF-8 based (counting bytes left and right).
10:04:55 <Rubidium> templatification! ;)
10:05:07 <Rubidium> a UTF16 and UTF8 version. One with proper support, one without
10:10:15 <michi_cc> That's not the real problem. Those bytes are e.g. used for limiting input to what the network protocol can stomach, which means we'd have to keep a shadow utf-8 byte count as well.
10:10:35 <Zuu> lol, looking for where MakeEnumPropsT defined members are used using "find references" in visual studio 2008 crashes it :-)
10:10:59 <frosch123> aren't all ediboxes limited by number of characters?
10:11:11 <frosch123> while it generally considers 4 byte per char, no matter what
10:11:40 <michi_cc> And of course while string layouting with ICU ends up using UTF-16 as well, all functions in between expect UTF-8.
10:12:43 <frosch123> don't port ottd to ucs2 :p
10:13:38 <michi_cc> frosch123: There's both a character limit (which is actually a code point limit) and a byte limit. The byte limit is used far more often.
10:14:24 <Rubidium> michi_cc: most strings for the network protocol are limited in UTF characters
10:14:58 <Rubidium> e.g. 31 characters, which could be up to 125 bytes
10:15:31 <Rubidium> at least for the names of lots of things. Not sure about the chat though
10:16:28 <michi_cc> Sure about that? My first random look that ended up at network password ad that is limited to 33 *bytes*. And almost all other NETWORK_*_LENGTH in network/core/config.h count bytes as well.
10:21:15 *** ntoskrnl has joined #openttd.dev
10:23:50 <Rubidium> I didn't think of that part of the code ;)
10:31:39 *** Ristovski has quit IRC
10:31:45 *** Ristovski has joined #openttd.dev
10:41:41 <Zuu> I've updated the story-sl patch. I've run over story.cpp and made a few changes so that it better reflects the bit count of data types in story_base.h. I've used Extract<>() for the enum now.
10:43:39 <Zuu> I have defined that the enum uses 8 bytes in command parameters. I though that would reduce the risk that someone thinks that the parameters have more free bits than they do have. But maybe there is a good reason to only use 2 bits for now?
11:03:52 <frosch123> use 8 :)
11:37:42 <Zuu> I though that our network transport package has a fixed size and thus there is no reason to go down to 2 bits if we want to reserve 8.
11:38:07 <Zuu> (or at least the DoCommand parameters have a fixed size)
11:38:40 <frosch123> yeah, you only need to do the bit stuffing for bloated commands which need more than the 2 or 3 parameters
13:14:52 <Zuu> Oh, OpenTTD deletes story pages but not page elements when a company is closed down: http://devs.openttd.org/~zuu/story-bankrupt-fix.patch
13:15:10 <Zuu> Also, OpenTTD forgets to close goal+story windows when a company is removed: http://devs.openttd.org/~zuu/story-gui-owner.patch
13:15:41 <Zuu> A side effect of the story-gui-owner.patch is that the window title of those windows will use the company colour.
13:18:48 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25620 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
13:19:38 <frosch123> doesn't deleteing of storypages trigger deletion of the pagelements?
13:19:57 <frosch123> or will they reappear if you add a new page which happens to get the same id?
13:20:00 <Zuu> nope, but that may be a cleaner solution
13:20:30 <Zuu> they will re-appear if you happen to add a new page with that the same id as the deleted page.
13:21:08 <Zuu> It caused me a lot of hard to reproduce bugs in NoCarGoal until I figured out why it happened :-)
14:00:26 <Zuu> frosch123: Is this destructor solution OK, or should that destructor become non-inline? http://devs.openttd.org/~zuu/story-bankrupt-fix2.patch
14:02:54 <frosch123> i guess add a " if (CleaningPool()) return;
14:02:59 <frosch123> at the top
14:03:13 <frosch123> that should improve exiting a game
14:03:25 <frosch123> but maybe you need to readd the clean in the bankruptness case
14:03:45 <frosch123> (hmm, no, you do not delete all pages there, only those of the company)
14:04:12 <frosch123> (the return ofc after the free :)
14:11:30 *** Maraxus has joined #openttd.dev
14:18:50 *** Maraxus has left #openttd.dev
15:06:35 <Zuu> Patch updated to only remove page elements when the pool is not cleaning.
15:07:23 <frosch123> looks fine to me
15:21:13 *** LordAro has joined #openttd.dev
15:21:13 *** ChanServ sets mode: +v LordAro
15:21:55 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25621 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
15:52:53 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25622 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
15:59:08 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25623 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
16:51:16 <Rubidium> Zuu: http://paste.openttdcoop.org/show/0quXyC3ip8W48lVUd9Jg/ (warnings)
17:02:00 <Zuu> Rubidium: Is it enough with a default: NOT_REACHED() to solve the warning about unused enums in switch or is it better to enumarate them all and also add a defalut case?
17:03:17 <Alberth> if the non-mentioned entries never happen, just add a default case, imho
17:04:38 <Alberth> hmm, does c++ now also need to have all enum values? :(
17:07:06 <Rubidium> Alberth: no, but the compiler wants to make sure you didn't make a mistake
17:07:08 <Zuu> http://devs.openttd.org/~zuu/fix-warnings.patch (not adding all enum values, only a default)
17:07:37 <Rubidium> Zuu: seems okay... lets compile test it
17:08:02 <Rubidium> yup, compile warnings are gone
17:12:40 <frosch123> Alberth: gcc has some weird heuristic there, it warns if two or so are missing, it does not warn of 15 are missing
17:13:14 <Alberth> joy :)
17:13:38 <frosch123> our OnClick and other Window functions usually do not warn
17:13:46 <frosch123> even though we handle only a view widgets
17:13:57 <frosch123> s/view/few/
17:13:58 <Alberth> well, it's better than Java, which requires by language spec a default case
17:14:36 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25624 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
17:14:58 <Rubidium> frosch123: there we get an int passed
17:15:01 <Rubidium> not an enum
17:15:26 <Rubidium> it will start to warn if you template the shit out of it so it uses enums instead of ints for the selected widget
17:15:41 <frosch123> hmm, so i overinterpreted gcc :p
17:45:17 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25625 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
18:12:49 *** Supercheese has joined #openttd.dev
19:04:49 *** andythenorth has joined #openttd.dev
19:04:49 *** ChanServ sets mode: +v andythenorth
19:05:08 <andythenorth> is there a secret room or something for fruit discussion?
19:05:42 <frosch123> no, my upload finishes in half an hour
19:05:51 <frosch123> then i need a test chicken
19:06:06 <andythenorth> I have 20Mbit fibre in my office
19:06:12 <andythenorth> not the fastest, but better than ADSL
19:06:19 <andythenorth> but not there until tomorrow
19:07:04 <frosch123> i also have instructions for instaling from scratch :p
19:07:11 <frosch123> but i doubt that will be faster :)
19:07:23 <Alberth> 1. don't try this at home :p
19:07:29 <andythenorth> does it require a lot of mysql connection stuff?
19:07:41 <frosch123> no mysql, only postgresql
19:08:02 <frosch123> no idea what "a lot" means
19:08:06 <frosch123> it does not run without :p
19:10:52 <andythenorth> bbl
19:10:56 *** andythenorth has quit IRC
19:13:12 *** Alberth has left #openttd.dev
19:41:09 *** andythenorth has joined #openttd.dev
19:41:10 *** ChanServ sets mode: +v andythenorth
19:53:26 <andythenorth> fastest way to produce a set containing the value of a property in multiple objects?
19:53:31 <andythenorth> objects are conveniently in a list
19:53:45 <andythenorth> oops wrong channel :P
19:54:04 <andythenorth> sorry
20:14:33 *** ntoskrnl has quit IRC
20:36:01 <andythenorth> step 1: have login at least do redirect to account index :P
20:36:31 <frosch123> yeah, noticed that, left it as execise :)
20:41:51 *** frosch123 has quit IRC
20:47:23 <andythenorth> didn't figure that out yet :P
20:47:43 <andythenorth> found lots of account methods, but nothing obvious for login
20:57:08 *** andythenorth has left #openttd.dev
22:08:04 *** LordAro has quit IRC
22:45:33 *** Ristovski has quit IRC