Config
Log for #openttd.dev on 6th April 2013:
Times are UTC Toggle Colours
05:57:54  *** Dewin has quit IRC
07:50:58  *** Alberth has joined #openttd.dev
07:50:58  *** ChanServ sets mode: +v Alberth
08:04:02  *** frosch123 has joined #openttd.dev
08:04:02  *** ChanServ sets mode: +v frosch123
08:16:44  *** Supercheese has quit IRC
08:40:18  *** ntoskrnl has joined #openttd.dev
09:06:04  *** Zuu has joined #openttd.dev
09:06:04  *** ChanServ sets mode: +v Zuu
10:43:08  *** Ristovski has joined #openttd.dev
11:57:10  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25148 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
12:08:00  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25149 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
12:34:17  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25150 || 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:13:51  <frosch123> http://devs.openttd.org/~frosch/diffs/tar_all.diff <- not exactly meant for review yet, but it seems to work now
13:14:13  <frosch123> it changes the treatment of files inside tars
13:14:29  <frosch123> the path of the tar is now considered as well, instead of only the path inside the tar
13:15:21  <frosch123> this simplifies a lot of the tar handling and allows absolute (i.e. unique) paths for referencing files in tars
13:15:52  <frosch123> however, it currently breaks the [newgrf] and profile configuration in openttd.cfg for newgrfs in tars
13:16:47  <frosch123> http://paste.openttdcoop.org/show/2210/ <- so, if it need breaking i wonder about changing it to some useful format in the first place :p
13:16:55  <frosch123> which would allow updating and such
13:18:04  <Alberth> does moving a tar file work?
13:18:52  <frosch123> what kind of moving?
13:20:20  <Alberth> eg from content_download/newgrf to newgrf  or so
13:20:45  <Alberth> hmm, unpacking a tar to a dir with content could also be a case that should work
13:20:52  <frosch123> well, not while ottd is running :p
13:21:08  <Alberth> no hot moving of files?  :D
13:21:14  <frosch123> but if the config uses relative paths from the searchpath, moving from content_download/newgrf to newgrf would work :)
13:21:48  <frosch123> [15:23] <Alberth> hmm, unpacking a tar to a dir with content could also be a case that should work <- that will work if you name the directory the same as the tar, including the ".tar"
13:22:02  <Alberth> lol
13:22:12  <frosch123> but normally i would think it should use the unique id to find moved files
13:22:34  <frosch123> @voice Rubidium
13:22:34  <DorpsGek> frosch123: Error: Rubidium is not in #openttd.dev.
13:22:39  <Alberth> that would be much better :)
13:22:41  <frosch123> @voice Rubidium_
13:22:41  *** DorpsGek sets mode: +v Rubidium_
13:23:25  <Rubidium_> Alberth: you can't move tar files right now while openttd is running either
13:24:06  <Alberth> actually you can, but it breaks openttd, I know :)
13:24:32  <Alberth> I was considering the case without openttd instances running only :)
15:30:37  *** Rubidium has joined #openttd.dev
15:30:37  *** Rubidium_ has quit IRC
16:16:49  <Zuu> Two assorted fixes to musa: http://devs.openttd.org/~zuu/musa-fix.patch
16:17:13  <Zuu> 1: Fixes detection of script short name when there was a comment after the GetShortName method
16:17:39  <Zuu> 2: Removes a unused parameter of a method. (a parameter that I forgot to add to the procedure argument list)
16:18:39  <Zuu> Fix #1 affects the behaviour while #2 only removes unused code.
16:26:16  <frosch123> does the same apply to bananas?
16:27:13  <Zuu> Bananas do not have the aditional checks for comments that I published a patch for as that patch has never been applied to my knowledge.
16:28:13  <Zuu> However, it would make sense to migrate the updated get_short_name logic to bananas. Or better allow musa and bananas to share common code.
16:28:52  <frosch123> bananas has various local changes on the server
16:29:03  <frosch123> root cannot commit or something :p
16:30:03  <Zuu> Though, I think last TB told me that he had not applied it.
16:31:10  <Zuu> Second patch: Adds a new command depgen.py for generating dependency items to use in musa .ini file: http://devs.openttd.org/~zuu/depgen.patch
16:32:52  *** Ristovski has quit IRC
16:33:56  <Zuu> So you can do ./depgen content_download/newgrf/some-newgrf.tar
16:34:38  <Zuu> and it will generate the string needed to be pasted into your .ini file to upload content that dependo no some-newgrf.tar.
16:35:35  <frosch123> +			raise MusaException("depgen do not support Base Graphics") <- "does"
16:38:59  *** Ristovski has joined #openttd.dev
16:45:41  <Alberth> Zuu: line.find('/*') != -1             '/*' in line
16:46:25  <Alberth> if scanning == 4 and line.find('*/') != -1:  <-- store the index to use it in the 'then' part
16:48:09  <Zuu> Does it matter performance wise?
16:48:52  *** ChanServ sets mode: +v Rubidium
16:50:59  <Alberth> you look for the same index twice
16:51:24  <Alberth> except:   <-- that is very bad form, always catch precise those exceptions that you expect
16:51:52  <Alberth> ie bare 'except' would already fail on a typo in a function call
16:52:55  <Alberth> return { 'type': type, 'uniqueid': uniqueid, 'md5sum': "%032x" % md5sum }  <-- why not simply return a triplet?
16:53:43  <Zuu> I used the same methodology as package_xyz in type.py of musa.
16:53:56  <Zuu> I have no idea what a triplet is in Python.
16:54:39  <Alberth> return a, b, c                  and multi-assignment    a, b, c = f()
16:55:00  <Alberth> ie it is a tuple (a, b, c)
16:55:18  <Alberth> if re.search("extends\s+GSInfo", line) != None:  <-- \ misses an escape
16:55:33  <Alberth> other lines there as well
16:55:52  <Zuu> Regarding the index lookup, yes from a hardcore performance perspective, I look up the same index more than onec. However the lookup is a simple loop over a quite short list. A solution that store and reuse the lookup will create longer code in a situation where the performance gain is probably not even noticable.
16:56:34  <Alberth> ok
16:56:54  <Zuu> Good catch regarding the missing escape.
16:57:28  <Alberth> should the 2nd 'if' not be an elif?
16:57:46  <Zuu> Yes it should.. I'll fix that
16:59:40  <Alberth> ext = file.split(".")[-1] +			if ext == "nut":    <--  file.endswith('.ext')
16:59:53  <Alberth> euhm '.nut'   :)
17:00:25  <Alberth> doesn't that need a tolower btw?
17:02:54  <Alberth> there is also a .rfind for searching from the back, but it's probably not worth the trouble
17:04:56  <Alberth> if options.exclude is not None and options.exclude != "":  <-- I would expect a test against an empty list
17:05:11  <Alberth> (and None probably)
17:06:24  <Zuu> I had .lower() for filenames in my already commited musa patch however I got the comment that we shouldn't be case insensitive in general. however, when I ran depgen on my whole content_dowload/newgrf, I found a few tar files with uppercase .GRF inside the tars. Thus I added it back there for the file extension. However I do think most script authors are sensible enough to not use upper case file extensions.
17:07:38  <Zuu> I had file.endswith(".obg") etc. before, but extracted the code that determines the extension to only have simple == checks on each if-statement.
17:07:47  <Alberth> ("%08x" % uniqueid_int).upper()   <-- "%08X" % uniqueid_int
17:08:43  <Alberth> However I do think most script authors are sensible enough to not use upper case file extensions.  <-- haha, find a random windows system and check :)
17:09:14  <Alberth> ie the os does not complain, so users are not even aware of what they do :)
17:10:52  <Alberth> that is all I have to say about this patch
17:12:08  <Zuu> Alberth: Why "%08X" and not "%08x"?
17:12:23  <Zuu> Musa uses "%032x" at other places.
17:12:42  <Alberth> uppercase A-F
17:13:09  <Alberth> >>> print "%08X" % 10
17:13:09  <Alberth> 0000000A
17:13:49  <Zuu> Ah.. upper case without using .upper()
17:15:13  <Alberth> C/C++ does it too :)
17:15:38  <Zuu> I usually don't print to hex.
17:16:09  <Alberth> %e  vs %E  then?
17:16:22  <Zuu> And anyway Delphi uses their own format % codes that are completely different to C++ and the rest of the world. :-)
17:16:46  <Alberth> Hmm, exception texts are also not consistent in style
17:16:55  <Zuu> %n = number (floating); %d = decimal (integer)
17:17:08  <Zuu> At least %s is string..
17:17:09  <Alberth> right :)
17:17:18  <Alberth> %d works in C too
17:19:05  <Alberth> I wonder what %7% does in C++; Java just prints "%" instead of % and 6 spaces
17:43:00  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25151 || 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:28:29  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25152 || 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:34:24  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25153 || 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:34:29  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25154 || 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:34:32  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25155 || 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:50:35  *** Dewin has joined #openttd.dev
18:55:01  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25156 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
19:07:43  *** ntoskrnl has quit IRC
19:38:14  *** Alberth has left #openttd.dev
21:12:26  *** Ristovski has quit IRC
21:15:10  *** Ristovski has joined #openttd.dev
21:42:05  *** Ristovski has quit IRC
21:58:01  *** Dewin has quit IRC
22:04:29  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25157 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
22:16:14  *** frosch123 has quit IRC

Powered by YARRSTE version: svn-trunk