Config
Log for #openttdcoop.devzone on 21st September 2014:
Times are UTC Toggle Colours
00:25:18  *** erlehmann has quit IRC
01:28:22  *** gelignite has quit IRC
05:53:00  *** andythenorth has joined #openttdcoop.devzone
07:03:04  <DevZone> Yippee, build fixed!
07:03:05  <DevZone> Project road-hog build #313-push: FIXED in 44 sec: https://jenkins.openttdcoop.org/job/road-hog/313/
07:18:09  *** LSky` has joined #openttdcoop.devzone
07:19:35  *** andythenorth has quit IRC
07:55:49  <DevZone> Project grfcodec build #28-push: SUCCESS in 34 sec: https://jenkins.openttdcoop.org/job/grfcodec/28/
08:04:02  <Rubidium> http://rbijker.net/openttd/extra_action5_type_nml.diff <- need to feedback on naming ;)
08:13:09  *** oskari89 has joined #openttdcoop.devzone
08:19:28  *** Alberth has joined #openttdcoop.devzone
08:41:27  *** LSky`` has joined #openttdcoop.devzone
08:45:55  *** LSky` has quit IRC
08:49:10  *** LSky`` is now known as LSky`
08:55:45  <Alberth> planetmaker:  (18:56:37) frosch123: planetmaker: can #5411 be closed?  <-- a question for you
08:57:27  <planetmaker> ah, hm. Well. Yes and no :) There's coloured output. But that output is broken on some terminals (e.g. see the jenkins logs when there are warnings)
08:57:45  <planetmaker> as such I left it open, should a better solution than current emerge
09:00:33  <Alberth> maybe update the issue to reflect that?
09:01:23  <planetmaker> yeah. But I guess I never followed up on yours and MinchinWeb's suggestion
09:01:36  <planetmaker> the colour commit is older than your replies there
09:02:45  <planetmaker> Minchinweb's solution looks a bit too easy, if we don't want to add another hard dependency, though
09:07:00  <Alberth> I still believe it's a bad idea to have coloured output in the compiler itself, but it's there
09:08:38  <Alberth> (it causes havoc when redirecting output to a file, or do automagic processing on them)
09:09:09  <planetmaker> it's there for the peace of mind of a certain norhern andy :D
09:09:53  <michi_cc> Only use colour when isatty (or whatever the python equivalent is) says true?
09:10:01  <planetmaker> and granted, colouring the warnings and errors indeed makes them stick out nicely
09:10:19  <planetmaker> yeah, that would be the sane thing to do, I think
09:35:32  *** frosch123 has joined #openttdcoop.devzone
09:41:57  <frosch123> Rubidium: maybe OTTD_PALETTE, would match OTTD_GUI
09:42:14  <frosch123> i think it would not stay with just black, but gain random recolour sprites in random order
09:42:30  <frosch123> or OTTD_RECOLOUR
09:42:43  <planetmaker> OTTD_PALETTE or OTTD_RECOLOUR sounds both good, yes
09:42:48  <frosch123> though that one would have to commit to BE or AE :p
09:42:51  <planetmaker> But then... we don't support TTDP anymore anyway
09:43:17  <frosch123> planetmaker: yeah, but maybe train fever adds grf support :p
09:43:21  <planetmaker> :D
09:45:03  <frosch123> i think of the OTTD_xxx types as "random stuff in random order that fits nowhere lese"
09:45:40  <planetmaker> yeah, somewhat :)
09:47:54  <planetmaker> I'm a bit undecided, but possibly let's call it OTTD_RECOLOUR. It's recolour_sprite, and that's what it is, too
09:48:10  <frosch123> ah, so NML uses BE :) i was not sure about that
09:48:15  <planetmaker> it's not a completely new palette with new colours like ttd and win differ
09:58:04  <planetmaker> http://devs.openttd.org/~planetmaker/patches/tmp.diff <-- Alberth, you think that would improve the situation?
10:00:41  <frosch123> only warnings are coloured? not errors?
10:00:48  <frosch123> errors are too obvious?
10:01:17  <planetmaker> I think so, yes
10:01:33  <planetmaker> it then bails out anyway with the error shown prominently
10:02:00  <planetmaker> but my patch is buggy it seems
10:03:37  <Alberth> yes, os.isatty  takes a file descriptor rather than a file object like sys.stderr
10:04:34  <planetmaker>     if os.isatty(sys.stderr.fileno()): might do the trick instead
10:04:49  <planetmaker> according to stackoverflow :P
10:05:55  <Alberth> sys.stderr.isatty()   should work
10:06:18  <Alberth> https://docs.python.org/3/library/io.html#io.IOBase.isatty
10:06:19  <Webster> Title: 16.2. io — Core tools for working with streams Python 3.4.1 documentation (at docs.python.org)
10:07:18  <planetmaker> does, yes
10:07:21  <Alberth> The character encoding is platform-dependent.  Under Windows, if the stream is interactive (that is, if its isatty() method returns True), the console codepage is used, otherwise the ANSI code page.  Under other platforms, the locale encoding is used (see locale.getpreferredencoding()).    <-- but this worries me  (sys.stderr docs)
10:07:47  <Alberth> ie it's broken under Windows
10:15:10  <planetmaker> hm, yeah. As broken as currently
10:17:10  <Alberth> ok, the patch itself is fine, isatty seems also to be supported under windows
10:17:23  <Alberth> colouring itself is broken, but no more than it alsready was :p
10:17:50  <planetmaker> but agreed, the ncurses approach is probably better, if it works correctly also on windows (dunno)
10:17:55  <Alberth> but that was to be expected if you use hard-coded ansi escape sequences
10:18:20  <Alberth> you need something to query the system how to change colour
10:18:52  <planetmaker> yeah
10:20:10  <Alberth> curses is more oriented towards full-screen applications
10:20:24  <Alberth> ie before graphical applications became the standard
10:22:29  <planetmaker> I briefly looked at it before I made this quick-hack-fix :P Seemed more complicated for this issue
10:22:45  <DevZone> Project 2ccts build #311-push: SUCCESS in 1 min 37 sec: https://jenkins.openttdcoop.org/job/2ccts/311/
10:24:33  <Alberth> the proper solution may be to 1) not add anything when not a tty, and 2) add colour when a package like https://pypi.python.org/pypi/termcolor  or colorama   is detected
10:24:34  <Webster> Title: termcolor 1.1.0 : Python Package Index (at pypi.python.org)
10:24:52  <Alberth> there are probably more such packages
10:25:20  <frosch123> i checked 3 of them: termcolor, colorama, blessings
10:25:20  <planetmaker> hm, true. Such test should not be too difficult either
10:25:27  <frosch123> none were installed on my system by default :)
10:25:52  <planetmaker> yeah, that's the issue with colorama and termcolor which I checked, too :D
10:25:57  <Alberth> pypi is mostly all random python packages made by random people :)
10:26:30  <frosch123> random packages by random people installed randomly on random systems by random sysadmins :)
10:26:49  <planetmaker> :D
10:30:10  <Alberth> http://devs.openttd.org/~alberth/yumex_packages.png    I can just install them
10:31:04  <planetmaker> yeah, but I still would not want them a hard requirement
10:31:20  <planetmaker> making them optional for good colour support would be nice and ok, I think
10:31:47  <planetmaker> but then it could well be that w/o the chosen one(s) there's no colour output. That's ok, I guess
10:32:33  <Alberth> it's better than refuse to compile due to lack of recolouring the errors :p
10:33:29  <planetmaker> :D
10:39:00  <Alberth> termcolor is just one file, if it works under windows, we could even add it to nml
10:40:42  <Rubidium> http://rbijker.net/openttd/extra_action5_type_nml.diff <- frosch123 / Alberth / planetmaker, I can commit that in that way to NML? Or is more needed?
10:41:32  * Alberth doesn't know, it looks logical though
10:42:22  <planetmaker> looks like it's all you need, yes
10:43:07  <frosch123> looks complete to me, but i only code nml by trial-and-error :)
10:47:09  <DevZone> Project opengfx-mars build #155-push: SUCCESS in 2 min 22 sec: https://jenkins.openttdcoop.org/job/opengfx-mars/155/
10:47:19  <DevZone> Project Townnames - German build #102-push: SUCCESS in 9.7 sec: https://jenkins.openttdcoop.org/job/german-townnames/102/
10:47:20  <DevZone> Project NML - NewGRF Meta Language build #367-push: SUCCESS in 3 min 42 sec: https://jenkins.openttdcoop.org/job/nml/367/
10:53:39  <DevZone> Project opengfx-mars build #156-push: SUCCESS in 2 min 9 sec: https://jenkins.openttdcoop.org/job/opengfx-mars/156/
10:53:47  <DevZone> Project Townnames - German build #103-push: SUCCESS in 7.9 sec: https://jenkins.openttdcoop.org/job/german-townnames/103/
10:53:48  <DevZone> Project NML - NewGRF Meta Language build #368-push: SUCCESS in 3 min 22 sec: https://jenkins.openttdcoop.org/job/nml/368/
11:05:19  <DevZone> Project OpenGFX build #150-push: FAILURE in 4 min 56 sec: https://jenkins.openttdcoop.org/job/opengfx/150/
11:06:18  <planetmaker> hm, failure? :(
11:06:41  <planetmaker> hm... NML did not update correctly?
11:08:52  <Rubidium> very likely
11:09:18  <planetmaker> yeah. Hmpf
11:09:23  <planetmaker> why oh why
11:10:16  <planetmaker> hm, that's why. That's bad
11:10:40  <planetmaker> It didn't believe that tip or release was built: "Neither tip nor a release was built. Not updating NML"
11:14:20  <DevZone> Project opengfx-mars build #157-push: SUCCESS in 2 min 10 sec: https://jenkins.openttdcoop.org/job/opengfx-mars/157/
11:14:28  <DevZone> Project Townnames - German build #104-push: SUCCESS in 7.8 sec: https://jenkins.openttdcoop.org/job/german-townnames/104/
11:14:29  <DevZone> Project NML - NewGRF Meta Language build #369-push: SUCCESS in 3 min 29 sec: https://jenkins.openttdcoop.org/job/nml/369/
11:23:48  <DevZone> Yippee, build fixed!
11:23:49  <DevZone> Project OpenGFX build #151-push: FIXED in 6 min 7 sec: https://jenkins.openttdcoop.org/job/opengfx/151/
11:27:00  *** gelignite has joined #openttdcoop.devzone
11:27:03  <DevZone> Project xussrset - Trains from Russia build #454-push: SUCCESS in 3 min 48 sec: https://jenkins.openttdcoop.org/job/xussrset/454/
11:31:49  *** Supercheese is now known as Guest382
11:31:55  *** Supercheese has joined #openttdcoop.devzone
11:32:26  <DevZone> Project xussrset - Trains from Russia build #455-push: SUCCESS in 3 min 27 sec: https://jenkins.openttdcoop.org/job/xussrset/455/
11:37:20  *** Guest382 has quit IRC
11:39:10  *** ODM has joined #openttdcoop.devzone
12:22:54  <DevZone> Project xussrset - Trains from Russia build #456-push: SUCCESS in 3 min 27 sec: https://jenkins.openttdcoop.org/job/xussrset/456/
12:24:16  <frosch123> so, nml keeps track on how many sprites it needs from a specific source .png
12:24:33  <frosch123> it loads the .png on first use, and frees them when the last sprite has been extracted
12:24:47  <frosch123> it does the encoding in the order of sprites in the grf
12:25:02  <frosch123> so, in the best case a png is opened, all sprites are used, and then it is freed
12:25:23  <frosch123> in the worst case, the grf alternates sprites between png, and all need opening, resulting in massive memory usage
12:25:52  <frosch123> but since nml has a sprite cache anyway, i guess it would make sense to update the spritecache independent from the grf encoding
12:26:05  <frosch123> then it could reorder the sprite references by .png source
12:26:29  <frosch123> then only one .png file and the spritecache are opened at most at any time
12:29:25  *** gelignite has quit IRC
12:34:05  <DevZone> Project 2ccts build #312-push: SUCCESS in 1 min 31 sec: https://jenkins.openttdcoop.org/job/2ccts/312/
12:35:03  *** oskari892 has joined #openttdcoop.devzone
12:36:14  <Alberth> seems useful
12:41:48  *** oskari89 has quit IRC
12:41:53  <frosch123> yeah, problem is: it requires changing more than 5 lines :p
12:42:04  <frosch123> so, more nml exploring :)
13:07:41  <frosch123> does python have a concept of private vs. public methods?
13:08:01  <frosch123> it's so fucking hard to figure out what methods are the interface to the outside
13:12:57  *** erlehmann has joined #openttdcoop.devzone
13:35:10  *** oskari89 has joined #openttdcoop.devzone
13:41:53  *** oskari892 has quit IRC
14:02:29  <Alberth> not really, you can use a _ prefix for internal methods if you really want
14:03:39  <Alberth> I once removed several of those, as they weren't actually used as private :p
14:03:42  <Alberth> frosch123:  ^
14:03:54  <frosch123> i think that is what i  most dislike about dynamically typed languages, the lack of abstract base classes resp. interfaces
14:04:58  <Alberth> you can have sort-of abstract classes https://dev.openttdcoop.org/projects/nml/repository/entry/nml/output_base.py
14:13:44  *** erlehmann has quit IRC
14:35:18  *** oskari892 has joined #openttdcoop.devzone
14:42:03  *** oskari89 has quit IRC
15:35:25  *** oskari89 has joined #openttdcoop.devzone
15:42:08  *** oskari892 has quit IRC
16:12:27  *** andythenorth has joined #openttdcoop.devzone
16:19:33  *** andythenorth is now known as Guest404
16:19:33  *** andythenorth has joined #openttdcoop.devzone
16:22:04  *** Guest404 has quit IRC
16:40:48  <DevZone> Project road-hog build #314-nightlies: FAILURE in 47 sec: https://jenkins.openttdcoop.org/job/road-hog/314/
16:44:54  <DevZone> Project xussrset - Trains from Russia build #457-push: SUCCESS in 3 min 32 sec: https://jenkins.openttdcoop.org/job/xussrset/457/
16:47:40  <DevZone> Project poltrams build #13-push: SUCCESS in 22 sec: https://jenkins.openttdcoop.org/job/poltrams/13/
16:52:35  <DevZone> Project World Airliner Set build #380-push: SUCCESS in 4 min 26 sec: https://jenkins.openttdcoop.org/job/worldairlinersset/380/
16:55:13  <DevZone> Project 2ccts build #313-push: SUCCESS in 2 min 38 sec: https://jenkins.openttdcoop.org/job/2ccts/313/
17:50:28  *** erlehmann has joined #openttdcoop.devzone
18:57:34  <DevZone> Project World Airliner Set build #381-push: SUCCESS in 3 min 5 sec: https://jenkins.openttdcoop.org/job/worldairlinersset/381/
19:03:18  *** Alberth has left #openttdcoop.devzone
19:48:43  *** LSky` has quit IRC
19:57:50  <DevZone> Project xussrset - Trains from Russia build #458-push: SUCCESS in 5 min 57 sec: https://jenkins.openttdcoop.org/job/xussrset/458/
20:21:04  <planetmaker> grmbl.... zbase repo(s) seem weired to me. Some links in it seem to fail... but I don't see why...
20:27:05  *** ODM has quit IRC
20:27:15  <DevZone> Project yeti build #40-push: SUCCESS in 3 hr 39 min: https://jenkins.openttdcoop.org/job/yeti/40/
20:43:26  *** efess has quit IRC
21:25:45  *** andythenorth_ has joined #openttdcoop.devzone
21:27:47  *** oskari892 has joined #openttdcoop.devzone
21:30:58  *** erlehmann has quit IRC
21:30:58  *** andythenorth has quit IRC
21:30:58  *** oskari89 has quit IRC
21:30:58  *** frosch123 has quit IRC
21:30:58  *** andythenorth_ is now known as andythenorth
21:31:46  *** erlehmann has joined #openttdcoop.devzone
21:44:55  *** frosch123 has joined #openttdcoop.devzone
21:52:06  *** oskari892 has quit IRC
22:11:12  *** andythenorth has quit IRC
22:17:21  *** frosch123 has quit IRC
22:24:35  *** erlehmann has quit IRC
23:51:57  *** efess has joined #openttdcoop.devzone
23:53:58  *** efess` has joined #openttdcoop.devzone
23:56:21  *** k has joined #openttdcoop.devzone
23:56:52  *** efess is now known as Guest456
23:56:52  *** k is now known as efess

Powered by YARRSTE version: svn-trunk