IRC logs for #openttd on OFTC at 2015-02-16
⏴ go to previous day
00:02:49 <samu> visual blockings, what's that?
00:03:18 <supermop> i should have signed up for some classes here just to get a student id so i could upgrade my rhino stuff cheaply
00:05:42 <samu> can you attach a canal slope to the lock, exclusive to the lock only, not buildable via canal drag&drop?
00:06:50 <samu> problem might come when destroying that lock
00:07:05 <Eddi|zuHause> the lock IS the canal slope.
00:07:52 <Eddi|zuHause> samu: with "visual blockings" i mean "there are rocks in the way"
00:08:12 <Eddi|zuHause> may be difficult to see, depending on which base set you are using
00:11:17 <samu> trying to come up with a solution for the lock build cost
00:11:56 <Eddi|zuHause> maybe you start by reading what the code actually does currently?
00:14:45 <samu> { 7500, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_WATER }, ///< PR_BUILD_LOCK
00:15:02 <samu> that's the lock itself without the extra tiles
00:15:54 <samu> 5000, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_WATER }, ///< PR_BUILD_CANAL
00:17:02 <samu> building on bare land: 7500+5000+5000
00:17:27 <samu> building on river: 7500+0+0+10000
00:17:58 <samu> problem comes up when the canal tiles have different costs
00:18:36 <samu> building on bare land: 7500+625+625
00:18:46 <samu> building on river: 7500+0+0+10000
00:20:00 <samu> 10000, PCAT_CONSTRUCTION, GSF_END, INVALID_PRICE }, ///< PR_CLEAR_WATER
00:21:18 <Eddi|zuHause> so, really you want to check the build locks command function, and change the handling of rivers.
00:44:34 <samu> where is it ? can't find
00:48:03 <samu> DEF_CMD(CmdBuildLock, CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_LOCK
00:56:43 <samu> complicated to follow this. It is building command names into other names
00:57:44 <Eddi|zuHause> samu: well CMD_BUILD_LOCK is the internal number that is sent (e.g. over the network) when a lock should be built, and this line registers CmdBuildLock as the function that should be called when this command number is received
00:58:47 <Eddi|zuHause> so the next step would be to look where CmdBuildLock is defined
01:13:08 <samu> it is not defined, the command is constructed?
01:13:18 <samu> then sent into some recursive thing
01:13:38 <samu> i dont know how to follow this code
01:17:03 <Eddi|zuHause> maybe you're looking in the wrong file?
01:32:59 <samu> static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag flags)
01:35:10 *** michi_cc_ has joined #openttd
01:43:17 <samu> maybe the river slope is missing a property?
01:54:01 *** luaduck_zzz is now known as luaduck
01:55:30 <samu> im looking at water_cmd.cpp
01:55:41 <samu> MarkCanalsAndRiversAroundDirty
01:57:12 <glx> that they will be redrawn
02:03:18 <samu> WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
02:07:12 <samu> svn://svn.openttd.org/trunk/src/water_cmd.cpp
02:07:34 <samu> i don't see anything wrong
02:11:10 <samu> /* Sloped canals are locks and no natural water remains whatever the slope direction */
02:11:24 <samu> am i reading this right?
02:12:28 <samu> sloped canals are locks, but it makes use of the water there is on that slope
02:25:26 <samu> all I know is that the cost is taking the middle tile clearing cost into the sum, but when destroying the lock, the river slope tile is restored
02:28:29 <samu> I need something in there that goes like "if river tile is present -> add 0 to sum, if river tile not present -> sum the cost of clearing the tile"
02:29:55 <samu> oh gosh, nobody answers, I have to go sleep
02:37:02 *** Celestar1 has joined #openttd
03:36:30 *** Speedy` has joined #openttd
03:36:37 *** Speedy` is now known as Speedy
04:50:58 *** luaduck is now known as luaduck_zzz
05:19:02 *** itsatacoshop247_ has joined #openttd
05:21:40 *** itsatacoshop247 has quit IRC
05:53:54 *** luaduck_zzz is now known as luaduck
05:56:17 *** Eddi|zuHause has joined #openttd
06:40:32 *** Flygon_ has joined #openttd
06:49:13 *** Flygon__ has joined #openttd
07:06:05 *** stormchaser3000 has joined #openttd
07:06:26 <stormchaser3000> i seem to have an issue.
07:06:33 <stormchaser3000> i can't get music to play
07:30:07 *** andythenorth has joined #openttd
07:35:03 <andythenorth> so python object hashes aren’t a reliable reference where a multiprocessing pool is in use
07:35:08 <andythenorth> which I guess makes sense
07:35:52 <andythenorth> multiple pool threads could change state on an object, and return it or references to it, leaving your program...borked
07:56:05 <V453000> what sort of evil magic are you doing again andythenorth
07:56:22 <andythenorth> fixing the old magic
07:56:29 <andythenorth> the problem with magic is when it breaks
08:00:51 *** stormchaser3000 has left #openttd
08:38:01 *** Alberth has joined #openttd
08:38:01 *** ChanServ sets mode: +o Alberth
09:11:56 *** kais58|AFK is now known as kais58
10:34:51 *** Suicyder has joined #openttd
11:09:13 *** andythenorth has joined #openttd
11:39:10 *** andythenorth has left #openttd
11:43:04 *** zwamkat has joined #openttd
11:53:26 *** zwamkat has joined #openttd
11:58:06 *** itsatacoshop247_ has quit IRC
12:02:53 <V453000> trying to import some meshes with the hyper intelligent VrayProxy, but I am getting more issues than anything else so far XD
12:03:01 <V453000> also moar progress on bridgez has been done :>
12:04:44 <supermop> i just struggled with renderer today, then rendered a bunch, then realized it was wrong and needs to be re-rendered
12:04:55 <supermop> and not sure how to do CC
12:05:24 <V453000> yeah ... I use some approach where I wreck the tones to 8 colours, from separate masked render
12:05:32 <V453000> you can read it in the NUTS technical wiki
12:06:52 <supermop> the other option is the pikka way of separate sprites, but i feel that would be weird
12:07:40 *** zwamkat has joined #openttd
12:09:30 <V453000> yeah well, separate sprites will look nicer.
12:09:33 <V453000> the 8bpp is just shit
12:09:41 <V453000> I havent managed to get that to look nice
12:09:53 <V453000> but separate sprites = filesize x16 which is just fucked up
12:10:03 <supermop> i wonder if you limit it to just a small area or stripe...
12:10:13 <V453000> that is what I will try as well
12:10:20 <V453000> not making full-CC vehicles, just making smaller parts
12:10:34 <V453000> Also, very detailed/heavily textured etc. stuff looks a bit nicer
12:10:49 <V453000> but anything "normal" just gets wrecked because 8 colour shades are just not enough for this resolution :)
12:12:19 <V453000> ... the only problem with smaller parts I had so far was that my mask had some bad edge offset but I believe I can get rid of that eventually
12:12:36 <V453000> I recommend setting up some automated rendering so that you dont get insane
12:12:51 <V453000> rendering every model 3 times just because normal / CC1 / CC2 is tedious to be done manually :)
12:16:09 <supermop> rhino is supposedly very scriptable
12:17:30 <supermop> but with the green triables as CC, so one can choose blue and get blue triangles as various shades
12:17:43 <supermop> only doable with sprites i guess
12:18:48 <supermop> like these blue triangles:
12:19:26 <supermop> do you use google drive?
12:19:48 <juzza1> why cant that be done with recolor map?
12:20:14 <V453000> nah I use dropbox for files :)
12:20:52 <V453000> but yeah, the 8bpp map is just ... idk, havent managed to get good results with it
12:21:31 <supermop> the greens are different hues though?
12:22:34 <V453000> different brightness will handle that
12:23:15 <juzza1> i actually meant the 8bpp map that does the recoloring automatically
12:26:32 <juzza1> supermop: the color intensities are taken from the base image, the 8bpp mask only sets the "function" for that are (cc in this case, could also be blinking lights etc.) it's difficult to explain without testing it yourself
12:28:31 *** andythenorth has joined #openttd
12:28:51 * andythenorth wonders if list.extend(other_list) changes order of other_list
12:32:28 *** Supercheese is now known as Guest5615
12:32:33 *** Supercheese has joined #openttd
12:49:20 *** andythenorth has joined #openttd
12:51:53 *** glevans2 has joined #openttd
13:14:27 *** Alberth has joined #openttd
13:14:27 *** ChanServ sets mode: +o Alberth
13:18:43 *** sla_ro|master has joined #openttd
13:27:43 *** tokai|mdlx has joined #openttd
13:44:45 <samu> WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
13:44:45 *** shadowalker has joined #openttd
13:45:20 *** FLHerne has joined #openttd
13:46:44 <Eddi|zuHause> it keeps the water class if it is already water, and sets it to canal if not
13:47:16 <andythenorth> Iron Horse is more sane, and compiles marginally faster
13:48:12 <samu> strange, it work for the upper tile and lower tile, and not for the middle tile
13:49:44 <Eddi|zuHause> it really is missing the important bit :p
13:50:27 <Eddi|zuHause> which is the next line after that.
13:52:47 <samu> this? > if (!IsWaterTile(tile) {
13:54:07 <samu> if (!IsWaterTile(tile)) {
13:54:37 <samu> let me write in that pastebin
13:55:29 *** shadowalker is now known as shadowalkerLeShAFK
14:00:40 *** shadowalkerLeShAFK is now known as shadowalker
14:04:38 <Eddi|zuHause> there's a "compile and run" button in visual studio
14:04:40 <samu> i could only build the .exe once
14:04:46 <samu> it failed on the next tries
14:17:16 <samu> is the work folder C:\OpenTTD or just OpenTTD?
14:18:04 <Eddi|zuHause> the "work folder" structure is explained in the readme
14:27:37 <samu> i write (WorkFolder)\OpenTTD essentials\win32\library;
14:28:08 <samu> or C:\OpenTTD\OpenTTD essentials\win32\library;
14:30:16 <samu> Error 40 error LNK2026: module unsafe for SAFESEH image. C:\OpenTTD\trunk\projects\liblzma.lib(liblzma_la-sparc.o) openttd
14:33:11 <samu> Warning 1 warning C4005: 'FACILITY_DIRECTMUSIC' : macro redefinition (..\src\music\dmusic.cpp) c:\openttd\openttd essentials\shared\include\dmerror.h 12 1 openttd
14:33:33 <ST2> maybe not the correct solution but worked for me ;)
14:34:06 <planetmaker> ST2, it'll probably be helpful to amend our wiki with the compile instructions
14:34:44 <planetmaker> that's where people look (and find much quicker) rather than in a "random" forum thread
14:34:49 <samu> safeseh? what does it mean
14:35:05 <ST2> that's a good idea indeed, will look what can do when I get home :)
14:36:00 <ST2> anyway, I wasn't sure was a correct solution, was only one that worked for me xD
14:36:04 <samu> it is already in the wiki
14:36:14 <samu> i just didn't read all of it lol
14:37:43 <samu> your visual studio is much less graphical
14:37:47 <planetmaker> ST2, the wiki lives from contributions like yours. It works... so it can't be entirely wrong. And a wiki has history and can be amended and corrected also easier than a forum thread
14:38:44 <samu> mine is all windows 8 styling, though I'm on windows 7
14:39:05 <planetmaker> (and no, I cannot contribute to the 'how does it work on windows' discussion more than this... last time I compiled on windows is ages ago)
14:39:13 <planetmaker> and I used mingw :P
14:41:35 <samu> the wiki terminology differs a bit than my version
14:42:22 <samu> project properties is solution properties
14:43:34 <planetmaker> that's probably different MSVC versions... thus your version might want a separate thing. But dunno... I won't use MSVC soonish
14:48:42 <samu> compiling is fast, i thought it would take hours
14:50:03 <Alberth> incremental builds are fast
14:50:14 <Alberth> it only rebuilds things that are modified
14:50:47 <samu> build succeeded... well, what now?
14:51:22 <samu> so it builds, but where is it?
14:53:10 <samu> 4> openttd_vs100.vcxproj -> C:\OpenTTD\trunk\projects\..\objs\Win32\Release\openttd.exe
14:53:51 <samu> there is no Release folder
14:54:53 <Eddi|zuHause> just click the "run" button
14:55:34 <samu> nevermind, i'm an idiot, yes just clicked that
14:56:52 *** andythenorth has joined #openttd
14:58:24 <samu> lol im such an idiot, I didn't edit the water_cmd file
15:00:51 * andythenorth used set.difference() correctly today
15:00:54 <andythenorth> first time for everything
15:01:32 <Alberth> oh, I promised pixa fixing, that's still needed?
15:02:41 <Alberth> hmm, my copy claims no incoming changes :p
15:03:26 <andythenorth> there’s no test program in pixa, so it’s frustrating to test the module directly
15:03:33 <andythenorth> I have been testing with Iron Horse
15:06:37 <Eddi|zuHause> maybe try with cets? scripts/img.py is somewhat standalone, if you have the right input file (that comes out of scripts/generate.py)
15:08:28 <samu> glad that part only affects the cost and not how it builds
15:08:43 <samu> lock pricing looks *nearly* correct now
15:09:44 <samu> it must add the cost of a canal tile, even though it doesn't build one
15:09:58 <samu> if it is placed on bare land
15:10:45 *** quorzom has joined #openttd
15:11:00 <andythenorth> Eddi|zuHause: that looks useful thanks
15:13:08 <samu> cost.AddCost(_price[PR_BUILD_CANAL]); - i put this a line after cost.AddCost(ret);
15:18:33 *** Quatroking has joined #openttd
15:19:59 *** shadowalker is now known as shadowalkerAFK
15:20:58 <samu> however, there is a little issue
15:21:11 <samu> the default lock will now cost 5000 more
15:21:41 <samu> but it's pricing structure is more sensible
15:23:52 <samu> that's what I wrote in the file
15:25:24 <samu> canal tile costs 5000, lock structure costs 7500
15:26:01 <samu> if building on 3 bare land tiles it will now cost 5000+(7500+5000)+5000
15:26:43 <Eddi|zuHause> you could reduce the lock cost to 2500 to keep the old price
15:27:02 <samu> that's on some other file, right?
15:27:27 <Eddi|zuHause> yes. there is a base price list somewhere
15:28:04 *** Myhorta has joined #openttd
15:33:30 *** shadowalkerAFK is now known as shadowalker
15:40:59 *** Myhorta has joined #openttd
15:42:02 <samu> it reminds me of communism countries that place their leader behind in every local
15:48:26 *** Celestar1 has left #openttd
15:48:55 <Alberth> import * magic was suggested by 2to3
15:49:57 * andythenorth unbreaks iron horse
15:50:17 <Alberth> it refused to change pixa/pixa.py, so I made some small improvements
15:50:33 <andythenorth> I can never curl patches from pastebin anymore
15:50:37 <andythenorth> dunno if it’s the line endings
15:51:03 <Alberth> I always save the raw text
15:51:55 <andythenorth> they come off pastebin with cr instead of lf
15:52:00 <andythenorth> or my browser does that
15:53:06 <samu> there is another issue, about the maintenance cost
15:53:06 <andythenorth> so I need a test program :P
15:53:31 <samu> the lock costs 6 pieces of maintenance
15:53:49 <samu> the water tiles cost 1 each
15:54:15 <samu> wondering if it makes sense
15:54:47 <samu> it currently costs 8 pieces of maintenance
15:55:10 <samu> but I think it should cost 9
15:55:25 <planetmaker> ^^ @ andythenorth
15:55:36 <planetmaker> mind the "/raw" in the URL
15:56:16 <andythenorth> that fails on cr
15:56:22 <andythenorth> it must be my browser
15:56:35 <planetmaker> and yes, it comes with (Stripping trailing CRs from patch.)
15:56:35 <planetmaker> warnings here, too. But patch doesn't mind
15:56:37 * andythenorth would have thought curl was set to lf
15:56:53 <planetmaker> at least my patch doesn't
15:57:20 <planetmaker> patch unexpectedly ends in middle of line
15:57:20 <planetmaker> <-- hm, though :P
15:59:48 <Eddi|zuHause> samu: the number of pieces is completely arbitrary, and has nothing to do with how many tiles it occupies
16:00:02 <samu> LOCK_DEPOT_TILE_FACTOR - multiplier for how many regular tiles a lock counts
16:00:29 *** shadowalker is now known as shadowalkerAFK
16:01:18 <Eddi|zuHause> samu: yes, but you lay a logic beneath it that it does not have.
16:03:19 *** liq3 is now known as Guest5632
16:04:21 <samu> 3*3=9 +1 per canal -> can't be 11
16:04:23 <andythenorth> Alberth: pixa appears to work so far, under python 2 :) I have unrelated problems testing it under python 3 :)
16:05:56 <Eddi|zuHause> juzza1: i'd guess "indirect()" or something
16:06:19 <planetmaker> juzza1, I'm not sure what you're asking there
16:06:35 <samu> how do i make it account for this non-existant logic
16:06:52 <samu> have the middle tile behave like it's a canal
16:06:59 <samu> if it wasn't build on river
16:07:15 <samu> just for the maintenance cost
16:10:02 <samu> if (!IsWaterTile(tile)) c->infrastructure.water++;
16:10:23 * andythenorth has an adventure into python3 unicode
16:10:30 <samu> there's a tile - delta and a tile + delta, it is missing the tile
16:11:41 <planetmaker> juzza1, maybe what I added below your example lines
16:13:10 <juzza1> planetmaker: thanks, exactly what i was looking for
16:15:10 *** Progman has joined #openttd
16:20:33 <samu> when demolishing, it doesn't remove
16:20:45 <samu> must edit somewhere else too
16:41:54 <andythenorth> debugging multiprocessing is an unabridged joy
16:42:24 <andythenorth> all errors are eaten by some other pickling error when the pool worker tries to write the actual error out
16:43:51 <andythenorth> code works with multprocessing suppressed
16:44:05 <andythenorth> despite that the pool is doing nothing to mutate shared state :|
16:48:52 <andythenorth> other than no ‘go 16x faster’ option, Iron Horse appears to work with python 3
16:49:09 *** TheMask96 has joined #openttd
16:49:36 <andythenorth> Alberth: dunno if you have the python 3 deps, but I’ve pushed it
16:49:57 <andythenorth> would get invoke multiprocessing
16:50:01 <andythenorth> or 4 or 16 or whatever
16:50:09 <andythenorth> pw=0 will disable it
16:50:29 <andythenorth> interested if you get the same error as me
16:51:01 <andythenorth> I’m worried I’m mutating state somewhere unintentionally
16:54:41 <andythenorth> or multiprocessing changed
16:55:58 <Alberth> is that in different working copies?
16:56:13 <Alberth> CF also had problems with that iirc
16:56:37 <andythenorth> iirc, it generates the revision from it
16:57:04 <Alberth> 66.55s pw=8 full build
16:57:22 *** oskari89 has joined #openttd
16:58:04 <Alberth> make: *** No rule to make target 'docs/license.txt', needed by 'doc'. Stop.
16:58:04 <Alberth> make: *** Waiting for unfinished jobs.... oh it did have errors
16:58:21 <andythenorth> oh that’s exciting
16:59:01 <samu> how do I make the difference visible?
16:59:10 <Alberth> dependencies are broken, I use -j4 for make
16:59:31 <samu> want to compare it with the original
17:01:23 <Alberth> run a diff against the checked out working copy
17:02:09 * andythenorth wonders if a try: except: would aid these errors
17:02:23 <Alberth> andythenorth: haha, nice message :)
17:02:23 <Alberth> Slow nml rendering? Try the COMPILE_FASTER=True make flag if you're only changing vehicle properties
17:02:35 <andythenorth> sounds like not tip
17:03:31 <samu> i have to copy the original into a pastebin?
17:03:42 <Alberth> pixa is my patched version, did you commit that?
17:04:17 <andythenorth> I committed the pixa changes to Iron Horse yes
17:04:18 <Alberth> samu: you used a version control system to get the sources (hg or svn or so)?
17:04:25 <andythenorth> I haven’t updated the pixa module repo yet
17:04:35 <samu> i was told to download tortoise
17:04:37 <andythenorth> pixa ships inside my project repos, for…reasons
17:04:47 <Alberth> oh, right, it doesn't use the pixa projects
17:05:13 <Alberth> samu: that version control system can tell you what you changed exactly
17:05:34 <samu> hmm, how exactly do i do it
17:05:41 <samu> there's too many options
17:05:43 <Alberth> ie it generates a diff from the last commit to what you have now
17:06:27 <Alberth> I don't use windows or tortoise stuff
17:06:59 <Alberth> the command line is just a simple 'svn diff' in the root of the source
17:07:36 <samu> tortoisemerge? I see 2 windows side by side
17:07:55 <samu> working base to the left
17:07:58 <samu> working copy to the right?
17:07:59 <planetmaker> <andythenorth> pixa ships inside my project repos, for…reasons <-- hm, why?
17:08:20 <andythenorth> planetmaker: I don’t know how to put it on pypi, and didn’t go read the docs to find out
17:08:31 <andythenorth> nor do I know how to package it for pip or something
17:08:56 <andythenorth> it is somewhat packaged for setuptools, but I suspect that even is not right
17:09:14 <planetmaker> hm, so what I do on DevZone is pointless?
17:09:31 <andythenorth> what does it do?
17:09:35 <andythenorth> build the package?
17:09:56 <andythenorth> or install in the environment?
17:10:11 <planetmaker> it has the repo there. And builds maybe *something*.
17:10:33 <andythenorth> do any of us understand setuptools?
17:11:06 *** luaduck is now known as luaduck_zzz
17:11:09 <planetmaker> Not that much. But I guess it works for NML. So it can be fiddled to make it work, possibly
17:11:29 <planetmaker> but indeed I see the last real pixa package is ancient
17:11:36 <planetmaker> kinda prehistoric :P
17:12:15 <andythenorth> it does very little :)
17:12:24 <samu> i dont know how to do this
17:12:35 <planetmaker> well, I guess forgot that I asked :P I'll make a mental note and add that to the tail of my todo list :P
17:13:14 <andythenorth> I only ship it in the repo to ease building Iron Horse etc for other people
17:13:21 <andythenorth> I could install it to my virtualenvs
17:13:43 <andythenorth> but if it’s not on pip or easy_install, asking people to download a third party python module and install it is painful
17:14:13 <planetmaker> andythenorth, I just wondered and remembered that I created some special devzone install rules for pixa. Seems it's about pointless what I did... it's not a proper python package install
17:14:17 <planetmaker> Alberth, not yet. ty
17:14:36 <Alberth> ie it's quite terrible broken
17:14:45 <planetmaker> that's strange. yes, terrible indeed
17:14:59 <Alberth> 32bpp does work, so it's perhaps somewhere in the m4 stuff?
17:15:00 <planetmaker> I'm sure it hasn't been that way always ;)
17:15:13 <planetmaker> uh... m4 branch is not main branch, no?
17:15:35 <Alberth> I don't know tbh, I just casually browsed the history
17:15:58 <planetmaker> I didn't like the m4 build stuff. Thus it should still be in a separate branch
17:16:04 <samu> i have no idea what i'm doing
17:16:06 <planetmaker> unless xotic merged it
17:17:37 * andythenorth wonders if pdf is useful for this multiprocessing problem
17:17:40 <planetmaker> two heads, two branches, Alberth: hg log -r"head()" --template='{branch}-{rev}:{node|short} {desc}\n'
17:17:42 <andythenorth> I have managed to never learn pdf
17:18:23 <Alberth> oh, right, I was wondering about the relation of a document format and python code :p
17:18:56 <planetmaker> hg glog -r694:700 --template="{branch} {rev}:{node|short} {desc}\n"
17:19:33 <Alberth> planetmaker: didn't we have trouble with concurrent execution of hg programs in the same repo?
17:20:04 <planetmaker> hm... I recall that topic. But not at all what it was about
17:21:40 <planetmaker> still not ringing the issue
17:22:47 <planetmaker> was it about pulling while repo was pushed or so?
17:23:27 <Alberth> I don't know any more
17:23:53 <planetmaker> first some food here. bbl
17:24:17 <samu> i still have no idea what I want to look for
17:25:14 <Alberth> really, it's faster than waiting for someone to asnwer your questions
17:25:39 * andythenorth is trying to read the manual on broken multiprocessing
17:25:54 <andythenorth> debugging a black box :D
17:26:06 <Alberth> perhaps first see what hg is doing?
17:26:21 <Alberth> it can't be that useful to do hg queries for each sprite
17:26:48 <andythenorth> it does that? o_O
17:27:12 <Alberth> I ran top to watch parallel execution, and hg popped up quite often
17:28:13 *** frosch123 has joined #openttd
17:28:27 <samu> when i do right click, tortoiseSVN, diff
17:28:50 <samu> bah let me take a screenshot
17:30:20 <andythenorth> hmm must be the makefile running hg
17:30:32 *** FLHerne has joined #openttd
17:30:51 <samu> i right clicked water_cmd.cpp, highlighted tortoiseSVN, then clicked diff
17:30:53 <Alberth> maybe just query existence or version or so
17:33:56 <samu> i have no idea how to share this diff thing
17:34:20 <andythenorth> multiprocessing has some logger
17:34:26 <andythenorth> but no idea how to use it yet :)
17:34:40 * andythenorth goes back to redneck debugging
17:34:48 <andythenorth> commenting lines in a bisect :P
17:34:55 <andythenorth> until the offender is found
17:39:20 <Eddi|zuHause> samu: "create patch file" sounds appropriate
17:40:08 <andythenorth> that’s interesting
17:40:09 <planetmaker> Alberth, what do you try to do? I'm somewhat missing the context of your hg parallel execution question
17:40:43 <andythenorth> ^ this is the function being passed to Pool.map()
17:40:51 <andythenorth> and it still blows up with a pickling error
17:40:52 <Alberth> andy has problems with parallel builds, and it uses hg
17:40:53 <planetmaker> and why do you need to query hg so often (for what)?
17:41:05 <planetmaker> what do you parallelize?
17:41:37 <Alberth> bad andy, NEVER use "except:" unless you want hours of debugging fun
17:41:55 <samu> is this all I need to copy?
17:42:01 <andythenorth> Alberth: this is debugging fun :D
17:42:13 <andythenorth> that isn’t my production code, that’s trying to find out what is erroring
17:42:20 <andythenorth> given that all errors are broken :P
17:42:34 <Alberth> yeah, errors have that property :p
17:43:00 <Alberth> perhaps open a file, and append messages to it?
17:45:04 <Alberth> so the problem is elsewhere
17:45:44 <planetmaker> samu, the difference between newbie and noob is that a newbie knows how to use help. And has no fear to simply consult the help of the programmes s/he uses
17:46:13 <samu> i faced similar issues in university
17:47:14 <samu> i could do some 'advanced' stuff, then i couldn't figure out how to save it, or load it back
17:47:23 <samu> managed to make that code work
17:48:52 <samu> not sure if I overlook something
17:49:08 <samu> no idea how it would work when merging companies or bankrupting
17:50:47 <andythenorth> somehow I’ve got a bad object
17:53:42 <andythenorth> I have a list containing EngineConsist and WagonConsist objects, both subclassed from Consist class
17:53:59 <andythenorth> EngineConsist instances work in multiprocessing
17:54:06 <andythenorth> WagonConsist instances don’t
17:57:31 <andythenorth> can’t even pass WagonConsist instances to the mapped function
17:57:57 <andythenorth> maybe they contain something that can’t be pickled
17:58:13 <andythenorth> maybe I can try pickling them
17:58:22 <samu> i think the else block is missing something...
17:58:38 <planetmaker> Alberth, how do I trigger that hg multiprocessing bug with firs? Or is that not the issue?
17:58:46 <samu> how could I run the game twice?
17:59:29 <Alberth> planetmaker: update iron horse, run make pw=8
18:00:32 <samu> how would the game know if it is deducting from the rigtht company?
18:00:49 <samu> c->infrastructure.water--;
18:01:01 <Eddi|zuHause> "c" is the company
18:01:06 <planetmaker> samu, now look up the variable type of "c"
18:01:40 <planetmaker> I only get zillions of sprite level warnings from grfcodec with iron horse. But works fine with pw=6
18:02:19 <samu> what if the company bankrupts?
18:03:29 <samu> Company *c = Company::GetIfValid(GetTileOwner(tile));
18:04:48 <samu> i can't run this thing twice, visual studio doesn't let me
18:05:59 <Alberth> planetmaker: that's the version
18:06:58 <Eddi|zuHause> samu: but why do you need to start it twice for that?
18:07:24 <samu> just figured how to do it
18:07:31 <samu> ran a 2nd time visual studio
18:07:56 <Eddi|zuHause> samu: you can just switch companies, you know
18:08:21 <Eddi|zuHause> start a multiplayer game, look in the company menu
18:08:39 <andythenorth> pickle.dumps() fails on a WagonConsist instance
18:08:43 * andythenorth loves redneck debugging :)
18:08:51 <andythenorth> it’s so satisfying to get a result with no debugging skills
18:08:57 <Alberth> takes time, but it always works :)
18:09:34 <andythenorth> now to find out what changed from python 2 :P
18:11:53 <samu> company 2 won't buy 1 yet
18:13:30 <samu> yay twitch.tv is still streaming one of these versions live
18:24:24 <andythenorth> dict_keys is not pickleable
18:24:35 <andythenorth> oh maybe 2to3 has done that
18:25:58 <andythenorth> is not pickleable :o
18:26:07 <andythenorth> is this a sensible replacement? [key for key in cargo_graphics_mappings_normal]
18:27:45 <Alberth> .keys() is an iterable
18:27:55 <andythenorth> oh so I can just call list on it :)
18:28:11 <andythenorth> that was actually fun to debug
18:28:46 <Xaroth|Work> .keys and .values (and .items) have changed in behavior between 2 and 3
18:28:46 <Alberth> I like to do boring refactor things, everybody is a bit crazy :)
18:28:49 <Xaroth|Work> in 2 they all returned lists
18:28:53 <Xaroth|Work> in 3 they all return iterators
18:30:24 <Xaroth|Work> well, they did mention that in their roadmap to py3k
18:30:36 <Xaroth|Work> backwards-mostly-compatible :P
18:34:30 <samu> arf, how long does it take to bankrupt
18:35:47 <Alberth> users? they never bankrupt
18:35:59 <Alberth> AIs do bankrupt though
18:37:05 <samu> think i better restart and make vehicles losing money
18:37:29 <planetmaker> samu, one year negative bank balance
18:41:48 <peter1138> You need Adobe Flash Player to watch this video.
18:42:52 <samu> if it doesn't work, blame twitch again
18:42:53 <andythenorth> ho, interestingly, the python 3 (nmlc 0.4.0) build of Iron Horse is slower
18:43:58 <andythenorth> compared to python 2 (nmlc 0.3.x)
18:44:15 <andythenorth> whereas for FIRS python 3 (nmlc 0.4.0) compile is _much_ faster than python 2
18:44:18 <Alberth> python3 is a bit slower indeed
18:44:24 <andythenorth> very different compilation steps too
18:44:46 <andythenorth> Iron Horse is chameleon -> nml -> nfo -> grfcodec, multiprocessing
18:44:49 <Alberth> fr0sch did some magic in nml with image processing
18:45:09 <andythenorth> I suspect I’m not getting that caching speed up at all
18:45:31 <andythenorth> and the other slowness will be incidental python 3 slowness
18:45:31 <Alberth> of course, if you move things to nfo/grfcodec :p
18:48:04 <planetmaker> 16%... interesting :)
18:50:06 <andythenorth> AIUI, nmlc 0.4.x also has parsing improvements?
18:50:16 <planetmaker> andythenorth, for ogfx-landscape the difference between caching (1 minute) and not caching (45 minutes) is tremendous
18:50:39 <andythenorth> each nml file for Iron Horse is only 1000-2000 LOC
18:50:47 <andythenorth> which is a rough indication that they aren’t very complicated
18:50:54 <andythenorth> only 3-9 vehicles in each file
18:51:58 <frosch123> Alberth: 95% of iron-horse compiliation time is starting python
18:52:25 <planetmaker> andythenorth, for a clean repo, iron horse fails to build docs/license.txt
18:52:58 <frosch123> andy split the nml into 100 files, each take 1 second startup, and 0.1 seconds processing or so
18:53:06 <planetmaker> lol. And the other 5% are optimized currently? :P
18:53:11 <Alberth> planetmaker: running parallel makes? :p
18:53:42 <planetmaker> which is my default, leaving me with a core for chatting and a core for video stream :P
18:53:42 <andythenorth> nmlc 0.4.0 is so much faster for FIRS, wondering about ditching this nml -> nfo -> grfcodec business
18:53:50 <Alberth> makefile doesn't specify the dependencies properly
18:54:29 <Alberth> /me wonders how many channels you chat at :p
18:55:11 <planetmaker> I chat usually in about 4. But there's 23 open ones ;)
18:56:02 <planetmaker> and you know all those 4 important ones ;) well, maybe not coop private one
18:57:09 <Alberth> hmm, that's how irc has so many lurkers :p
18:57:23 <glx> hehe I have 19 open chans
18:57:40 <planetmaker> well, besides the openttd channels, the only other 'important' one for me is #mercurial at freenode
18:59:02 <andythenorth> “make clean” followed by “make -j6 pw=16” blows up horribly for me btw
18:59:22 <glx> because your makefile is broken
18:59:55 <planetmaker> surely also partly my fault :)
18:59:55 <andythenorth> that would be the usual sign + cause :)
18:59:58 <andythenorth> whereas “make pw=16” appears fine
19:00:09 <planetmaker> jack-of-all-newgrfs makefile is fragile
19:00:17 <andythenorth> the deps aren’t independent, it’s a tree
19:00:30 <samu> test 2: company 2 buys company 1
19:00:30 <andythenorth> dunno which deps chameleon is exploding on though
19:02:15 * andythenorth pushes a fix to the multiprocessing anyway
19:02:19 <andythenorth> who has the most cores?
19:03:07 <samu> i got a pseudo real octal eight x8 fx-8000 series amd fx-8150
19:04:55 <andythenorth> do you have an Iron Horse checkout though? And nmlc 0.4.x with python 3? o_O
19:05:07 * andythenorth wanted to play pointless speed tests
19:05:23 <samu> i'm pretty sure the answer is no
19:06:13 *** gelignite has joined #openttd
19:07:04 <samu> test 3: build a lock on bare land
19:09:46 <andythenorth> hmm no iron_horse.nml to try compiling with nmlc :P
19:10:06 <samu> where can i download that
19:10:25 <samu> what the heck is a python 3
19:10:52 <planetmaker> the successor of python2
19:13:07 <samu> i have a feeling it's going to fail in one of the two next tests
19:21:08 *** Myhorta has joined #openttd
19:21:39 <samu> Unhandled exception at 0x0067A933 in openttd.exe: 0xC0000005: Access violation writing location 0x00001240.
19:22:07 *** LadyHawk has joined #openttd
19:22:12 <andythenorth> if I do a pure nmlc compile (no nfo), it will probably be faster. On the first run.
19:22:24 <andythenorth> but it won’t be faster for partial compiles :P
19:22:46 <samu> i get a bunch of stuff in visual studio about local
19:24:31 <samu> i'm staring at some error in detail, no idea what this means
19:25:52 *** Myhorta[1] has joined #openttd
19:28:35 <samu> it's exactly the part I edited
19:29:25 <samu> i was destroying a lock with no owner
19:29:38 <samu> apparently the game doesn't know there's no owner
19:29:56 <samu> but was subtracting -1 from water maintenance
19:30:05 <samu> what can i do to prevent that
19:31:11 <samu> is causing the error, how can i improve that
19:39:10 <samu> if (c != NULL) c->infrastructure.water--;
19:40:11 <samu> if the lock ower is no one then it means someone owns it?
19:43:28 <samu> there's a big red stop symbol next to that line in visual studio :) the program is smart
20:04:25 <glx> samu: if you can reproduce it, post on the bug tracker
20:04:37 <Alberth> glx: he is writing a patch
20:04:54 <samu> so what i'm doing is a patch?
20:05:00 <glx> that's another solution (and a better one)
20:05:34 <Alberth> glx: no, he is enhancing the program, costs are badly balanced(tm) :)
20:05:54 <samu> ok test 3: pass on 2nd try
20:06:47 <samu> test 4: company 1 builds a lock, then merges with company 2. company 2 buys company 1 when bankrupting
20:08:45 <Wolf01> does compiling ottd works on vs2014?
20:10:56 <samu> I am destroying the program
20:11:17 <samu> alberth doesn't agree with me on something
20:18:49 <samu> doesn't crash, but it's counting wrong
20:19:16 <samu> 4,294,967,295 water tiles
20:20:00 <samu> lol property maintenance is giving me money
20:21:47 <samu> company 1 builds a lock on 3 bare tiles
20:22:02 <samu> it counts as 9 water tiles in company details
20:22:21 <samu> company 2 buys company 1, it only counts 8
20:22:39 <samu> i destroyed it and it became -1
20:22:47 <samu> or 4,294,967,295 water tiles
20:23:21 <Alberth> if you use the '?' tool, and click at water, do you get the company?
20:23:43 <samu> ops i closed openttd, must retest
20:26:05 <samu> ok, waiting for bankrupt
20:26:30 <Alberth> no need, just check if the tile has an owner
20:27:48 <samu> company 1 builds the lock
20:28:02 <samu> yes it's owned by company 1, but company 2 must buy company 1 first
20:28:21 <samu> all the 3 tiles owned by company 1
20:28:34 <glx> so 1 tile is incorrectly transfered
20:29:27 <glx> the problem is in the buy part
20:30:39 <glx> if you have 9 water tiles before being bought, you should have 9 water tiles after, not 8
20:31:07 <samu> yes, that's what I want to do, but it also depends where the lock was built upon
20:31:37 <glx> something is not modified properly on owner change
20:32:43 *** LadyHawk has joined #openttd
20:33:22 <Wolf01> uhm, the wiki say I need the Windows SDK, but I'm sure VS already installed those components
20:33:46 <samu> im buying company 1 with comp 2
20:34:35 <samu> it belongs to company 2, but only counts 8
20:36:50 <glx> yes but as each tile counts 3 there should be an underlying part which is not transfered even if land info says it's ok
20:37:14 *** Myhorta has joined #openttd
20:38:37 <glx> a tile can have multiple owners even if only one is shown
20:39:09 <glx> and in your case one of the owners is wrong
20:39:45 <glx> don't focus on the counting part but on the property transfer part
20:40:24 <glx> Wolf01: SDK was required before VS2012 IIRC
20:41:43 <samu> hmm no, each tile doesn't count as 3
20:42:16 <samu> and the middle tile can count as either 2 or 3
20:42:50 <samu> but builds 2 extra tiles if there's no water
20:43:17 <samu> what i done to that was add one more count when it's not placed on water
20:43:46 <Wolf01> mmh, I think I would take a lot to fix the solution
20:44:09 <glx> still the problem is in the transfer I think, not the counting
20:44:51 <DorpsGek> andythenorth: DanMacK was last seen in #openttd 1 day, 0 hours, 53 minutes, and 22 seconds ago: <DanMacK> Hey
20:45:01 <andythenorth> thought it was about 24 hours :)
20:45:04 <andythenorth> he might turn up
20:45:33 <samu> i created some fake counting logic, according to zuHause
20:46:05 <samu> i dunno how to explain it
20:46:39 <glx> if it's not consistent it's wrong
20:48:49 <Wolf01> I think I'll wait for vs120 support :P
20:50:30 <samu> i must be missing some other place that also needs edit?
20:51:44 <Alberth> how many water tiles actually exist for the company that built the lock?
20:52:02 <glx> the problem is if (c != NULL) { c->infrastructure.water--; }
20:52:50 <samu> if built on dry tiles: 8 on the original, 9 on mine
20:54:55 <glx> yes the increment on build seems correct
20:55:07 <Alberth> wouldn't ownership transfer count actual tiles, instead of copying infrastructure.water blindly?
20:55:55 <samu> it should count based on where it was originally built upon
20:57:02 *** HerzogDeXtEr1 has joined #openttd
20:57:50 <samu> everything else seems to be counting correctly, except when merging
20:57:54 <glx> anyway if (c != NULL) { c->infrastructure.water--; } seems wrong for me
20:58:52 <glx> at least it's not at the right location I think
21:00:25 <glx> but the main thing is to check what happens during the merge
21:00:25 <samu> does the game re-builds?
21:00:33 <samu> yes, i think that's what's missing
21:01:26 <glx> there's a CMD_ something for that IIRC
21:03:17 *** flipFLOPS has joined #openttd
21:05:24 <Alberth> 2066:CommandCost CmdBuyCompany looks like the thing in economy.cpp, line 2066
21:06:04 <andythenorth> edibles tank cars
21:06:08 <andythenorth> could refit to food
21:06:24 * andythenorth can’t remember if some industry sets use food as proxy for milk, beer, etc
21:09:06 <glx> and going deeper it should be in ChangeOwnershipOfCompanyItems() (economy.cpp:289)
21:11:23 <glx> ChangeTileOwner_Water() in water_cmd.cpp:1271
21:11:55 <glx> that's when the counting gets wrong
21:14:29 <glx> you'll need to detect if there was water before the lock construction, then decrement old and increment new in this case
21:31:16 <Eddi|zuHause> andythenorth: my company sells (amongst others) food-quality CaCO3 solution, which can be either transported in tank trucks, or IBCs (1m³ standard containers)
21:31:27 <andythenorth> Eddi|zuHause: realism ftw
21:32:49 <Eddi|zuHause> actually, i lied, it's CaCl2 solution
21:33:23 <Eddi|zuHause> CaCO3 is pretty hard to dissolve in water :p
21:33:38 <Eddi|zuHause> so we dissolve the CaCO3 in HCl :p
21:38:34 <samu> if (is_lock_middle) Company::Get(old_owner)->infrastructure.water -= 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.
21:39:13 <samu> old owner counting also counts?
21:40:13 <glx> when owner changes the game decrements old and increments new
21:40:39 <glx> so you must take care of your change there too
21:42:03 <glx> it's like destroy and rebuild
21:42:22 <glx> without the real destroy part :)
21:49:09 *** shadowalkerAFK is now known as shadowalker
21:54:39 <samu> lock is water_class-canal - always, right?
21:55:43 <samu> second owner = company that is being sold to third owner
21:55:52 <samu> third owner = buys second owner
21:56:07 <samu> what varies is first owner
21:56:40 <samu> can be river, or can be bare land, and when it's bareland, increment +1 to water maintenance thingy
21:57:13 *** shadowalker is now known as shadowalkerAFK
21:57:21 <samu> when it's river, don't do anything
22:06:00 <glx> oh there are 2 cases in ChangeTileOwner_Water(), decrement happens when a company buys another, but also when the company is just removed after bankrupt
22:07:44 *** Myhorta has joined #openttd
22:17:04 <samu> testing again, no idea what i've done is correct
22:20:32 <planetmaker> it helps tremendously to not restrict maximum openttd version for newgrfs... I should better check the musa.ini I use :P
22:22:42 <Alberth> it does force you to update, eg translations :)
22:23:00 <planetmaker> it dawned on me that it's not the grf being aweful when it wasn't offered as update even for myself :P
22:23:16 <planetmaker> and actually, no it doesn't require that; I can update that via web interface
22:23:52 <Alberth> I mean make a new version of the newgrf with updated translations
22:24:11 <planetmaker> it's from yesterday :P
22:24:39 <Alberth> yes, but when 1.6 comes out, it's a year old
22:24:42 <planetmaker> there's no unreleased translation
22:24:59 <planetmaker> (I was talking of opengfx+landscape)
22:25:42 <Alberth> planetmaker: sorry, I am missing the point apparently, too tired
22:26:33 <planetmaker> there's no hidden point. Probably I miss yours :)
22:26:43 <samu> looks fixed for when there's bareland
22:26:50 <samu> now testing when it's a river tile
22:26:58 <planetmaker> I just noticed that the version I uploaded ours ago to bananas wasn't even downloaded once. And I wasn't offered it as update to my old version either
22:27:28 <planetmaker> so... then I noticed I used a faulty musa.ini :) But could correct it luckily just by removing the maximum allowed OpenTTD version stored for it in bananas
22:54:51 <samu> i don't really understand why it works
22:56:15 <samu> company 3 is gonna buy company 2 that bought company 1
22:59:44 <samu> and finally... bankrupt company 3
23:00:06 <samu> but i have no idea how to tell how many maintenance tiles the owner_none have
23:01:18 <glx> owner_none has no maintenance tiles
23:01:46 <samu> really? why am i subtracting tiles then :(
23:02:10 <glx> you are substracting from old_owner
23:03:33 <glx> it's not gone when you substract, it's gone only when all the changes are done
23:04:06 *** Flygon__ has joined #openttd
23:04:15 *** Myhorta[1] has joined #openttd
23:04:27 *** itsatacoshop247_ has joined #openttd
23:05:16 <glx> and this function could be called if an owner sells a tile to another, doesn't happen but better have a safe function in case it's added one day
23:05:36 <Eddi|zuHause> you could try starting a new company after the old one is gone, and check whether there were things lingering
23:06:32 <Eddi|zuHause> if things were not cleaned up properly, this new company would own stuff from the old company long after it is gone
23:07:02 <samu> ah I see, i can test that when this bankrupts
23:07:26 <glx> oh don't forget the saveload code
23:07:41 <glx> seems infrastructure is not saved
23:09:40 <glx> AfterLoadCompanyStats() in company_sl.cpp:95
23:14:50 <samu> first test, company bankrupted, recreated another, it starts with none infrastructure tiles
23:15:59 *** itsatacoshop247__ has joined #openttd
23:17:32 <samu> i destroyed the leftovers
23:17:38 <samu> maintenance is still none
23:17:53 <samu> for this part I assume it's correct
23:19:01 <samu> okay, i'm on that file now, where is line 95
23:19:11 <samu> visual studio doesn't number lines
23:20:07 <glx> options, text editor, c/c++
23:20:56 <glx> oh there's also "all languages"
23:21:19 <glx> makes more sense to check it there
23:22:17 <glx> anyway current line is also shown in status bar
23:23:30 *** itsatacoshop247_ has quit IRC
23:26:06 <samu> oh i found it - // do not count the middle tile as canal
23:34:26 <samu> if (GetWaterClass(tile) == WATER_CLASS_CANAL)
23:34:34 <samu> i need the opposite of ==
23:36:18 <samu> well i put canal, but i don't really understand why it works
23:37:55 *** JacobD88 has joined #openttd
23:38:11 <samu> that comment now makes no sense
23:38:22 <samu> // do not count the middle tile as canal
23:42:05 <samu> looks like it works, I load the save game, it was previously loading as 17, now it's 18
23:42:53 <samu> loaded back, and still 18
23:43:35 <samu> how do i share this diff patch?
23:44:27 <Eddi|zuHause> if you want it included in the game, put it on bugs.openttd.org, if you want feedback from other players, put it on the forum
23:44:51 <samu> yeah, but how do i pack the two files?
23:45:12 <Eddi|zuHause> create the patch from the directory, not from the individual files
23:45:58 <glx> from trunk directory, not a subdirectory :)
23:46:19 <Eddi|zuHause> i was about to say that. the trunk directory, not the src directory
23:48:20 *** supermop has joined #openttd
23:51:34 <glx> why does it always touch project files
23:52:45 <glx> you can safely delete lines 1-202
23:55:14 <glx> oh the cost thing is probably wrong
23:57:45 <samu> ah I guess I forgot something
23:58:11 <samu> when demolishing, it should subract a fake cost of clearing a water tile
23:58:30 <glx> well the docommand is used to check many things, like ownership
continue to next day ⏵