Back to Home / #openttd / 2019 / 11 / Prev Day | Next Day
#openttd IRC Logs for 2019-11-30

---Logopened Sat Nov 30 00:00:03 2019
00:03-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
00:04-!-glx [kvirc@000128ec.user.oftc.net] has quit []
00:08-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
00:08-!-supermop_work_ is "A CIRC user" on #openttd
00:38-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
00:40-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
00:40-!-supermop_work_ is "A CIRC user" on #openttd
00:58-!-Flo [~Flo@tsrvpq3242w-lp130-04-76-68-242-225.dsl.bell.ca] has quit []
01:10-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
01:17-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
01:17-!-supermop_work_ is "A CIRC user" on #openttd
01:43-!-sla_ro|master [~sla.ro@89.136.179.137] has joined #openttd
01:43-!-sla_ro|master is "slamaster" on #sla #openttd
01:47-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
01:51-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
01:51-!-supermop_work_ is "A CIRC user" on #openttd
02:03-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has joined #openttd
02:03-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttd
02:15-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
02:15-!-andythenorth is "andythenorth" on #openttd
02:21-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
02:24-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
02:24-!-supermop_work_ is "A CIRC user" on #openttd
02:55-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
03:01-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
03:01-!-supermop_work_ is "A CIRC user" on #openttd
03:01<andythenorth>hmm
03:01<andythenorth>why is python import perfomance so poor?
03:01<andythenorth>and what can I do about it ? :P
03:02<andythenorth>is using modules wrong?
03:02<andythenorth>I could just write everything in one python file
03:03-!-dude[m] [~dudeggc-p@2001:470:1af1:101::382f] has quit []
03:03<Eddi|zuHause>andythenorth: it depends on loads of things, like what kinds of initialisations the module does
03:04<Eddi|zuHause>or whether it needs to be converted to .pyc first
03:04<andythenorth>it scales horribly
03:04<andythenorth>there are some core modules that I import hundreds of times
03:04<andythenorth>they're only 0.02s or such
03:04<andythenorth>but they scale up to delays of seconds
03:05<andythenorth>then I use a multiprocessing pool, and every pool instance scales that delay
03:05<Eddi|zuHause>im sure there are import optimizers :)
03:05<andythenorth>it's interestingly a new problem in 3.7 or 3.8
03:05<andythenorth>3.5 does not show this behaviour
03:05<Eddi|zuHause>"pool instance" sounds like loads of initialisation code
03:06<andythenorth>it is, and there's a known problem of overhead
03:07<andythenorth>this file takes 0.2s to run (python src/iron_horse.py) https://github.com/andythenorth/iron-horse/blob/master/src/iron_horse.py
03:07<andythenorth>or 1.1s to import (import iron_horse)
03:08<andythenorth>at least one problem appears to be that chameleon's PageTemplateLoader class is incredibly slow to import
03:09<andythenorth>so I'll find a way around that :P
03:09<Eddi|zuHause>i don't think i can help you here
03:09<andythenorth>no, this is my mess
03:09<andythenorth>but the 3.5 vs 3.8 degradation was shocking
03:09<andythenorth>it's probably because 3.8 is faster
03:09<andythenorth>so something in the implementation has changed, and is no longer caching modules or similar
03:14<Eddi|zuHause>likely a side effect of some other fix
03:15<andythenorth>3.8 is generally faster for the cases I have, about 10%-20%
03:17<andythenorth>also I learn some things this way :P
03:17<andythenorth>mostly regrets
03:17<@planetmaker>moin, is it possibly worth reporting that as regression back to python? With the example as-is?
03:20<andythenorth>not in the current form
03:20<andythenorth>I'm using terrible python practices, like no main()
03:20<andythenorth>I'll find out if the regression is legitimate, or just my bad style, then see :)
03:21<andythenorth>shall we place a bet on who is more likely wrong? :P
03:26<andythenorth>3.8 vs 3.5 is measurably faster for nmlc
03:28<Eddi|zuHause>andythenorth: step 1: make two test environments with 3.5 and 3.8 )and possibly some inbetween versions) to test whether the slowdown is real
03:28<andythenorth>done
03:28<Eddi|zuHause>2a) comment out code, until the difference disappears
03:28<andythenorth>yes
03:29<Eddi|zuHause>2b) work through the changelog which changes would be likely to cause a slowdown
03:29<andythenorth>that's not done yet :P
03:30<andythenorth>I've fixed some self-inflicted problems, and now have parity for total run time between 3.5 and 3.8
03:30<andythenorth>but as 3.8 is generally faster, that masks some things that are slower :)
03:31<andythenorth>general observation, Iron Horse nmlc run time is about 28s for py3.8 vs 35s for py3.5
03:31-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
03:32<andythenorth>oh if I let the caches prime, my total 3.8 run time is now a few seconds less than 3.5
03:32<Eddi|zuHause>so 20% faster
03:32<andythenorth>yes
03:33<andythenorth>the remaining interesting problem
03:33<andythenorth>is why a specific module takes 0.2s to just run
03:33<andythenorth>and 1.1s to import
03:33-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
03:33-!-supermop_work_ is "A CIRC user" on #openttd
03:34-!-arikover [~user@x4db7a985.dyn.telefonica.de] has joined #openttd
03:34-!-arikover is "arikover" on #openttd
03:36<andythenorth>hmm, that's same behaviour on 3.5 also, but after the first import, it's cached
03:36<andythenorth>whereas 3.8 seems to incur the 1.1s every time the module is imported
03:41<andythenorth>very interesting :P
03:41<andythenorth>where's that xkcd on time saved? :P
03:52<andythenorth>https://paste.openttdcoop.org/projijyrr/hxy91u/raw
03:53<andythenorth>python3.5 doesn't trigger multiple imports when Pool is used, python3.8 does
03:53<andythenorth>(I knew this already, I just added timings to verify it)
04:01<@planetmaker>at your service ;) https://xkcd.com/1205/
04:02<andythenorth>thx
04:03<andythenorth>ok found it https://github.com/python/cpython/pull/13603
04:03<andythenorth>python mp fork inherits from parent, mp spawn initialises clean
04:03-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
04:04<andythenorth>fork is unreliable, changed on macos, consensus couldn't be achieved to change it on *nix for 3.8
04:04<andythenorth>may be changed for *nix in 3.9
04:04<andythenorth>super :)
04:05-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
04:05-!-supermop_work_ is "A CIRC user" on #openttd
04:06<andythenorth>https://news.ycombinator.com/item?id=5191495
04:07<@planetmaker>I hoped you were joking :D
04:08<andythenorth>joke multithreading not do about I
04:19<@peter1138>"I didn't test my PR."
04:20<@peter1138>Is that how other developers do things?
04:20<andythenorth>somewhat
04:20<andythenorth>on certain days I think OpenTTD is well above the average on quality
04:29*andythenorth duty calls :P
04:29-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
04:35-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
04:38-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has joined #openttd
04:38-!-nielsm is "Niels Martin Hansen" on #openttd
04:40-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
04:40-!-supermop_work_ is "A CIRC user" on #openttd
05:06-!-arikover [~user@x4db7a985.dyn.telefonica.de] has quit [Quit: ERC (IRC client for Emacs 26.3)]
05:11-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
05:12-!-Samu [~Ricardo@po1-84-90-251-49.netvisao.pt] has joined #openttd
05:12-!-Samu is "realname" on #openttd
05:19-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
05:19-!-supermop_work_ is "A CIRC user" on #openttd
05:49-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
05:58-!-HerzogDeXtEr [~farci@ip923408a4.dynamic.kabel-deutschland.de] has joined #openttd
05:58-!-HerzogDeXtEr is "purple" on #openttd
06:02-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
06:02-!-supermop_work_ is "A CIRC user" on #openttd
06:32-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
06:33<nielsm>https://www.tt-forums.net/viewtopic.php?p=1227166#p1227166 <-- why doesn't it print the (full path) name of the log file it fails to open?
06:33<nielsm>that would make diagnostics easier
06:34-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
06:34-!-supermop_work_ is "A CIRC user" on #openttd
06:37<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh closed issue #7848: Cannot scroll when building on Android https://git.io/Je12F
06:37<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on issue #7848: Cannot scroll when building on Android https://git.io/Je12F
06:42-!-freu[m] [~freunetwh@2001:470:1af1:101::36cd] has quit []
06:44-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has quit [Ping timeout: 480 seconds]
06:52<Samu>I'm so tempted to buy this https://www.pcdiga.com/processador-amd-ryzen-7-2700-octa-core-3-2ghz-c-turbo-4-1ghz-20mb-sktam4
06:53<Samu>at that price
06:53<Samu>but it's last gen :( and next year, new stuff is coming out
06:57<Samu>with about €370 i can upgrade cpu, mb, ram and still add a 1 TB SSD
06:57<Samu>and a tower
06:57<Samu>so undecided
07:04-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
07:05-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
07:05-!-supermop_work_ is "A CIRC user" on #openttd
07:35-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
07:35-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
07:35-!-Wolf01 is "Wolf01" on #openttd
07:39-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
07:39-!-andythenorth is "andythenorth" on #openttd
07:40<andythenorth>well
07:41-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
07:41-!-supermop_work_ is "A CIRC user" on #openttd
07:49<andythenorth>so why am I tickling "[Errno 24] Too many open files"
07:51<andythenorth>ulimit reports 'unlimited'
07:51<Wolf01>Close a file handler when you finish to use it?
07:51<andythenorth>yes, I wonder where it is though
07:52<andythenorth>and why this triggers with pypy but not python3
07:53<Wolf01>I think that "unlimited" is like "free! (with a 4.99€ purchase)" or "you get unlimited call time (up to 200 minutes/month)"
07:53<Wolf01>Maybe it depends on other things, like OS, ram, whatever
07:54<Wolf01>"
07:54<Wolf01>"Too many open files" errors are always tricky – you not only have to twiddle with ulimit, but you also have to check system-wide limits and OSX-specifics"
07:55<andythenorth>ulimit -n 4096 solves it
07:55<andythenorth>but I wonder if I should be closing files
07:56<Wolf01>^
07:58<andythenorth>well I wonder where, to be more accurate :P
08:00<Wolf01>Just after you finished to write/read it
08:00-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
08:03-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
08:03-!-andythenorth is "andythenorth" on #openttd
08:10-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has joined #openttd
08:10-!-nielsm is "Niels Martin Hansen" on #openttd
08:11-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
08:13-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
08:13-!-supermop_work_ is "A CIRC user" on #openttd
08:16-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
08:21<supermop_Home>can an industry distribute cargo to only 2 stations, or is it 2 station per cargo?
08:22<nielsm>two per cargo
08:23<nielsm>when a cargo packet is about to be distributed it searches for all stations in catchment and sorts them by rating for that cargo, then picks the top two
08:23<supermop_Home>ah ok
08:24<supermop_Home>with cdist i usually keep two stations, one for far destination and one for near
08:25<supermop_Home>but in this case i think i want separate trains taking the vehicles vs the engineering supplies
08:32-!-Flygon [~Flygon@114-198-97-156.dyn.iinet.net.au] has quit [Quit: A toaster's basically a soldering iron designed to toast bread]
08:42*andythenorth closes some file handles :P
08:43-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
08:44<andythenorth>hmm
08:44<andythenorth>closing file handles seems to have made the compile faster :P
08:44<Wolf01>Ahahaha
08:45<andythenorth>not sure why that would be
08:46<andythenorth>plenty of RAM :P
08:48-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
08:48-!-supermop_work_ is "A CIRC user" on #openttd
08:48-!-HerzogDeXtEr [~farci@ip923408a4.dynamic.kabel-deutschland.de] has quit [Read error: Connection reset by peer]
08:50-!-HerzogDeXtEr [~farci@ip923408a4.dynamic.kabel-deutschland.de] has joined #openttd
08:50-!-HerzogDeXtEr is "purple" on #openttd
09:00<andythenorth>oh lol
09:00<andythenorth>the py3.8 syntax errors were me not nml
09:00<andythenorth>but the file handles are nml :P
09:04<supermop_Home>hmm this GS wants 'raw energy' once a town is bigger than 10k
09:05<supermop_Home>but in steeltown that only means coal, which means a coke oven
09:05<andythenorth>oof
09:05<andythenorth>which GS?
09:06<supermop_Home>and the only coal mine, oven, and steelmill are conveniently all near eachother in the far corner of the map
09:06<supermop_Home>so setting up a new oven in the middle of my big city makes no sense
09:06<supermop_Home>think globally act locally
09:07<andythenorth>rage quit!
09:07<andythenorth>only solution ^
09:08<supermop_Home>nothing makes me want to move to a new city like huge trains of coal being hauled in to be baked in town, just to be carried back out to where they came from
09:08<andythenorth>I am trying Migrations GS
09:08<andythenorth>when you serve an industry, it spams a new town and houses round it
09:09<andythenorth>neat concept, probably not going to be a keeper for me :)
09:09<supermop_Home>oooh
09:09<supermop_Home>cool
09:10<supermop_Home>i accidentally started this steeltown game in tropic, so now im setting up complex systems to serve vehicles to all towns to let them grow
09:10<supermop_Home>because all but one town spawned in the desert
09:14<andythenorth>oops
09:18-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
09:23-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
09:23-!-supermop_work_ is "A CIRC user" on #openttd
09:41*andythenorth wonders what happens to an open Image file when copy is called on it :P
09:41<andythenorth>do I also need to close the copy?
09:53-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
09:55-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
09:55-!-supermop_work_ is "A CIRC user" on #openttd
09:59-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has joined #openttd
09:59-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttd
10:02-!-WormnestAndroid [~WormnestA@35.136.143.225] has quit [Remote host closed the connection]
10:02-!-WormnestAndroid [~WormnestA@35.136.143.225] has joined #openttd
10:02-!-WormnestAndroid is "WormnestAndroid" on #openttd
10:09<andythenorth>hmmm when things work...
10:25-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
10:27-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
10:27-!-supermop_work_ is "A CIRC user" on #openttd
10:27-!-gandi[m] [~gandiubpo@2001:470:1af1:101::371c] has quit []
10:31-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
10:31-!-snail_UES_ is "Jacopo Coletto" on #openttd
10:39<andythenorth>ho ho
10:39<andythenorth>Iron Horse compile is reliably ~10 seconds faster with python 3.8 compared to a week ago with python 3.5
10:39<andythenorth>BUT some of the gain is due to me removing broken/slow things that worked under 3.5 and don't in 3.8 :P
10:41<andythenorth>@calc 55/68
10:41<@DorpsGek>andythenorth: 0.808823529412
10:57-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
10:59-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
10:59-!-supermop_work_ is "A CIRC user" on #openttd
11:25<Samu>it's 1958 in the debug test, 3 years away from the crash
11:26<Samu>enabling autosaves
11:29<FLHerne>andythenorth: PyPy doesn't use reference-counted GC
11:29<FLHerne>So file handles are only closed whenever the GC feels like it, whereas in CPython they're usually closed when leaving their scope
11:29-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
11:30<FLHerne>(or, of course, when actually closing them like the spec says to :P)
11:30<andythenorth>oic :)
11:30<andythenorth>that makes sense
11:30<andythenorth>nmlc might want to Image.close()
11:30<andythenorth>I didn't look where
11:31<andythenorth>it's possibly a cause of reported RAM bloat as well, but dunno
11:31<andythenorth>not sure the 2 are connected?
11:34-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
11:34-!-supermop_work_ is "A CIRC user" on #openttd
11:34<FLHerne>Might well be
11:36<Eddi|zuHause>i wouldn't count "GC can free it" under "bloat"
11:36<Eddi|zuHause>however, "GC can't figure out that it can be freed" is different
11:38-!-Wormnest_ [~Wormnest@35.136.143.225] has joined #openttd
11:38-!-Wormnest_ is "Wormnest" on #openttd
11:43<andythenorth>I stopped testing with pypy, it's faster for some cases, but slower than others
11:49<andythenorth>hmm overall faster with pypy though
11:55<andythenorth>48s vs 55s
11:57<andythenorth>if I could switch py38 and pypy I could save another 8 seconds :P
11:57<andythenorth>but 'source' to swtich virtualenv doesn't seem to work from a makefile
11:59<Eddi|zuHause>i've no clue what you're saying
12:00-!-lastmikoi_ [~lastmikoi@195.154.38.38] has joined #openttd
12:00-!-lastmikoi_ is "lastmikoi" on #virt #qemu #openttd
12:01-!-lastmikoi [~lastmikoi@195.154.38.38] has quit [Ping timeout: 480 seconds]
12:01-!-lastmikoi_ is now known as lastmikoi
12:02<andythenorth>some python interpreters are faster than others
12:02<andythenorth>which one is fastest depends on the code being run
12:02<andythenorth>the compile is made up of discrete steps
12:03<andythenorth>I could switch to the fastest interpreter for each step
12:03<andythenorth>but it's unwise, and I can't get it to trivially work anyway
12:04<snail_UES_>andythenorth: I just read your past messages… just curious, how long does it take to compile IH?
12:04-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
12:04<andythenorth>roughly 1 minute
12:04<andythenorth>it's very slow
12:05<snail_UES_>right… my set with m4nfo is much quicker
12:05<Eddi|zuHause>CETS spends 1 minute in grfcodec alone
12:06<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh updated pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/fhho4
12:06<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/Je1QY
12:07<andythenorth>I did consider switching to m4nfo
12:07<Eddi|zuHause>it's about 300k lines of NFO
12:07<Eddi|zuHause>and grfcodec cannot be parallelized
12:07<Eddi|zuHause>so while it's only 20% of the work, it's 50% of the time
12:08<snail_UES_>mine just compiled in 28 seconds, including something like $1A5F recoloring tables
12:08<snail_UES_>without those, it’d take like 10 secs
12:08-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
12:08-!-supermop_work_ is "A CIRC user" on #openttd
12:08<andythenorth>how long does it take you to generate the m4nfo?
12:09<snail_UES_>you mean, within those 28 seconds?
12:09<snail_UES_>let me see
12:09<andythenorth>no, I mean to get the input file?
12:10<andythenorth>or you wrote it all by hand?
12:10<snail_UES_>I wrote my code by hand… well, with lots of copy and paste :p
12:10<snail_UES_>but all of the logic is done by hand
12:11<andythenorth>@calc 38/55
12:11<@DorpsGek>andythenorth: 0.690909090909
12:11<andythenorth>ok so about 30% of the Horse compile is code generation, graphics generation, docs generation, overhead
12:12<Eddi|zuHause>andythenorth: my generate.py takes 6 seconds
12:12<andythenorth>you should have parellelised it :P
12:12<andythenorth>use 16 processes, it would be done in 5 seconds
12:13<snail_UES_>you mean you don’t write your nml code by hand? then how do you do it?
12:13<LordAro>andythenorth: what bit of it is being parallelised?
12:13<andythenorth>snail_UES_: I don't even know how to write nml :)
12:13<andythenorth>I have to look it up every time
12:14<Eddi|zuHause>andythenorth: how would you parallelize reading a giant table? from a single file? :p
12:14<andythenorth>LordAro: just graphics generation
12:14<andythenorth>Eddi|zuHause: divide it into 16 chunks :P
12:14<andythenorth>map reduce
12:14<andythenorth>the overhead will kill you :P
12:14<snail_UES_>andythenorth: so how are you coding your set? :p
12:14<andythenorth>python
12:15<LordAro>personally i'd like make deal with parallelising for me
12:15<LordAro>s/like/let/
12:15<snail_UES_>you write in python, then python generates nml, and then from nml you compile the newgrf?
12:15<andythenorth>yes
12:15<snail_UES_>alright… sounds a bit convoluted to me :)
12:16<andythenorth>I really don't like nml
12:16<andythenorth>if I could template nfo, I would, but I'm not smart enough
12:16<andythenorth>the nml is actually compiled to nfo
12:16<andythenorth>then grfcodec is used
12:16<snail_UES_>omg...
12:16<andythenorth>it's faster
12:17<snail_UES_>python —> nml —> nfo —> newgrf? :D
12:17<Eddi|zuHause>snail_UES_: it probably is convoluted in andy's case, but if you have any kind of theoretical background it's pretty clean and straightforward to generate code.
12:17<Eddi|zuHause>snail_UES_: basically, you write one vehicle, and it does all the copy-paste for you
12:18<snail_UES_>yes, but each vehicle has its own quirks...
12:18<andythenorth>that's why it gets convoluted
12:18<andythenorth>and that's why Iron Horse vehicles are all pretty much the same
12:18<snail_UES_>it’s rare that 2 vehicles are coded exactly the same in any trainset
12:20<snail_UES_>right… well, if your trains are coded the same, it would be easy to create templates in nfo
12:20<Eddi|zuHause>snail_UES_: there are ways out of that dilemma. like you can extend the system to handle all these tiny differences, or you can restrucure them to minimize the differences
12:20<snail_UES_>Eddi|zuHause: yeah, like bringing some degree of standardization
12:20<snail_UES_>I will totally do it for my next sets...
12:21<snail_UES_>the narrow gauge one was my first, so I had crazy ideas
12:21<andythenorth>I did that for HEQS :P
12:21<andythenorth>Iron Horse is probably my 8th or 9th attempt at templating
12:21-!-gelignite [~gelignite@55d4cbd7.access.ecotel.net] has joined #openttd
12:21-!-gelignite is "gelignite" on #openttd
12:22<snail_UES_>templating helps, but then the result might lack variety...
12:22<Eddi|zuHause>i found templates to be too restrictive
12:22<Eddi|zuHause>that's where the code generation comes in, you have more ways to fit in the variations
12:22<snail_UES_>you need to find a compromise between standardization and diversity
12:23<andythenorth>there's a gameplay aspect as well
12:23<Eddi|zuHause>code generation is essentially just fancy templates
12:23<andythenorth>too much variation is bad for e.g. AIs, coop etc
12:23<andythenorth>not enough variation is dull as hell
12:24<snail_UES_>what do you mean by "coop"?
12:24<andythenorth>coop style gameplay
12:24<snail_UES_>in multiplayer?
12:24<andythenorth>anywhere
12:24<andythenorth>they like all trains to have same performance
12:25<andythenorth>or so
12:25<snail_UES_>all trains to have the same performance??
12:25<snail_UES_>then just buy the same model :p
12:25<nielsm>can any language lawyers give a quick opinion on this? :) https://github.com/OpenTTD/OpenTTD/pull/7353#discussion_r337248135
12:25<andythenorth>it it tonne-miles?
12:26<nielsm>yes
12:26<andythenorth>many
12:26<nielsm>ok
12:26*andythenorth wonders whether to try and make Iron Horse compile faster
12:27<LordAro>much vs many is the same as less vs fewer
12:27<Eddi|zuHause>LordAro: the problem is, if your native language uses the same word for both cases
12:28<LordAro>Eddi|zuHause: true :)
12:28<Eddi|zuHause>... then you might lack the ability to distinguish these cases
12:28<andythenorth>nmlc is so much faster under pypy
12:28<andythenorth>maybe I do need to switch interpreter in the makefile
12:28<LordAro>uncountable vs countable - how much water, there is less water. how many people, there are fewer people
12:29<LordAro>e.g.
12:30<Eddi|zuHause>LordAro: that may seem logical to you...
12:30<snail_UES_>LordAro: this might look a bit complicated to anyone who wasn’t born English ;)
12:30<snail_UES_>even lots of native-born Americans have an incredible trouble with that
12:30<LordAro>quite a lot of British people too :p
12:30<andythenorth>lego or legos :P
12:30<Eddi|zuHause>LordAro: it's like a japanese person confusing "r" and "l", or a french person randomly sprinking "h" into a word
12:31<snail_UES_>what pisses me off is native-born speakers who confuse “it’s” with “its”
12:31<snail_UES_>you see that all the time...
12:31<andythenorth>I do that all the time :)
12:31<snail_UES_>:p
12:31<andythenorth>it's really hard to not get wrong
12:31<LordAro>"[wsc]ould of" gets me
12:31<nielsm>and classic their/they're/there
12:32<nielsm>that too
12:32<andythenorth>that's classic
12:32<Eddi|zuHause>that's the reverse case, because in most foreign languages there is no way to confuse these two things
12:32<snail_UES_>that too...
12:32<LordAro>"off of" particularly gets me
12:32<andythenorth>I know all the rules, but I still make the mistakes
12:32<Eddi|zuHause>so non-native speakers are less likely to make that mistake
12:32<andythenorth>the language is stupid
12:32<andythenorth>but flexible
12:32<Eddi|zuHause>what i never could wrap my head around was peopple using "of" instead of "have"... what?? why?
12:33<andythenorth>nmlc run time Iron Horse: py38 39s; pypy 20s
12:33<andythenorth>^ substantial saving
12:33<nielsm>heh, Aircraft::GetCurrentMaxSpeed() is not used anywhere at all
12:33<andythenorth>:P
12:34-!-glx [kvirc@000128ec.user.oftc.net] has joined #openttd
12:34-!-mode/#openttd [+v glx] by ChanServ
12:34-!-glx is "Loïc GUILLOUX" on #openttd.noai #openttd.notice +#openttd
12:34<andythenorth>so how do I change virtualenv in a makefile :P
12:34<nielsm>and the point of GetSpeedOldUnits() is not explained anywhere as far as I can tell
12:34*andythenorth wonderw
12:34<LordAro>andythenorth: you really don't
12:34<LordAro>Eddi|zuHause: probably due to contractions - "should've" -> "should of"
12:35<andythenorth>LordAro: the speed though :P
12:35<nielsm>"shuddef"
12:36<LordAro>andythenorth: sure, but switching dev environments from within a makefile? ew ew ew
12:36<Eddi|zuHause>andythenorth: excuse my ignorance, but the point of a virtualenv is that the program being run doesn't know about it?
12:36<andythenorth>it's just an interpreter LordAro
12:36<andythenorth>I used to have a mixed python3 / python2.7 compile :P
12:36<LordAro>i'm guessing nml itself can't cope with pypy?
12:37<andythenorth>Eddi|zuHause: somewhat yes
12:37<LordAro>then call pypy as "pypy" ? why is the virtualenv a factor?
12:38<nielsm>aircraft movement speed is deep magic
12:38<andythenorth>I don't use system-wide python
12:38<andythenorth>it's very fragile
12:38<LordAro>sure, but your build system doesn't need to know that
12:38<andythenorth>Makefile.local maybe
12:38<LordAro>virtualenv sets up your environment
12:38<Eddi|zuHause>yeah, i don't understand what the virtualenv has to do with it. you need a virtualenv with both interpreters in it
12:38<nielsm>the virtualenv should have the python version used encoded in it
12:38<LordAro>make runs in that environment
12:38<LordAro>end of
12:38-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
12:39<Eddi|zuHause>and then just call the interpreter in the makefile
12:39<nielsm>by having an appropriate symlink from the venv's bin directory to the intended interpreter
12:39<andythenorth>what nielsm said
12:39<Eddi|zuHause>one virtualenv, two interpreters.
12:39<andythenorth>that's not how it's done
12:40<Eddi|zuHause>but that's the only way to do it
12:40<andythenorth>that's just a particularly inventive way to break things
12:40<nielsm>this is one good line: v->subspeed = (t = v->subspeed) + (byte)spd;
12:40-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
12:40-!-supermop_work_ is "A CIRC user" on #openttd
12:40<andythenorth>actually one virtualenv, two interpreters might be the best way to break things so far :)
12:40<andythenorth>it's so subtle
12:40<andythenorth>it would take ages to figure it out :)
12:41<Eddi|zuHause>nielsm: if i were to work in QA, i'd immeddiately ban = in expressions
12:41<Eddi|zuHause>nielsm: so many ways for it to go wrong
12:42<LordAro>there are certain cases where it's acceptable
12:42<Eddi|zuHause>and "t = subspeed; subspeed += spd" isn't even any longer
12:42<LordAro>but those are vanishingly rare
12:42<LordAro>e.g. while((foo = read())) {...}
12:42<Eddi|zuHause>LordAro: iterator.
12:43<Eddi|zuHause>LordAro: that's a for-loop
12:43<nielsm>static void MaybeCrashAirplane(Aircraft *v);
12:43<nielsm>yeah
12:45<Eddi|zuHause>nielsm: there's a good chance you can trace these kinds of expressions back to the original decompile
12:45<+glx>andythenorth: you can have many venv, but you can have only one enabled per session
12:45<andythenorth>yes
12:45<andythenorth>one has to switch
12:45<+glx>that's the main use of venv
12:45<andythenorth>yes
12:46<andythenorth>doing that in the Makefile might be considered unwise :P
12:46<+glx>Makefile doesn't have to know about venv
12:46<+glx>it's the responsability of the user
12:46<andythenorth>rock, hard place
12:47<andythenorth>that game-overs switching interpreter
12:47<Eddi|zuHause>Makefile MUST NOT know about virtualenv
12:47<andythenorth>we have a work Makefile that actually creates virtualenvs
12:47<Eddi|zuHause>that's different
12:47<andythenorth>but it's for creating a build environment, not for the compile
12:48<Eddi|zuHause>that makefile lives on a meta-environment
12:48<andythenorth>yes
12:48<+glx>projects themself don't care
12:48<nielsm>@todo De-mystify the cur_speed values for helicopter rotors. <- yeah that too
12:49<andythenorth>well I could just install all the deps in system-wide pypy
12:49<+glx>you can use --user
12:49<andythenorth>but I hate system-wide python installs, they break at no-notice
12:49<+glx>or use venv from the global install
12:50<+glx>on windows I can't install modules system wide if not in an admin shell
12:50<Eddi|zuHause>i stand by my opinion that the only way to do what you want is to have both interpreters in the same virtualenv
12:50<+glx>but pip supports that easily
12:51<andythenorth>Eddi|zuHause: that might work because pypy is tracking py3
12:51<andythenorth>but it's very prone to breaking
12:51<andythenorth>which package should be installed in the env for which interpreter?
12:51<andythenorth>it defeats the point of the env
12:51<+glx>pip takes care of that
12:52<andythenorth>are there interpreter-specific packages?
12:52<+glx>venv/bin is put in front of the path
12:52<andythenorth>I'm confused now
12:52<+glx>so if you use python2 -m pip you install for python2, and python3 -m pip to install python3
12:53<andythenorth>well I could try it
12:54<andythenorth>I can always just delete the env if it breaks
12:54<+glx>venv/bin/pip on the other hand will use the latest interpreter added to the venv
12:55*andythenorth looks what's in bin/activate
12:55<+glx>bin/activate just adds the path IIRC
12:56<+glx>basically
12:56<andythenorth>so with two interpreters, I'm curious how it will know which one to activate
12:58<+glx>anyway it's probably easier to just do python2 -m venv venv2 and python3 -m venv venv3
12:59<andythenorth>that results in 2 venvs though
12:59<+glx>but only one used at a time
12:59<andythenorth>hmm
12:59*andythenorth still confused
12:59<andythenorth>the only solution seems to be system-wide install
13:00<andythenorth>not doing that
13:02<Samu>{type=VKI_STATION (0) id={station=1746 town=1746 sign=1746 } center=-48128 ...}
13:02<andythenorth>is there a convention for naming pypy?
13:02<Samu>the id being equal to station, town and sign, is that the way it works?
13:03<andythenorth>probably the makefile needs to test if pypy exists?
13:06<DorpsGek_III>[OpenTTD/OpenTTD] SamuXarick commented on issue #7847: Crash - Assertion failed at line 213 of src\core\kdtree.hpp: next != INVALID_NODE https://git.io/Je1Eh
13:07<nielsm>Samu: the id there is a union, not a struct, so it's only the id for the appropriate item type
13:08<nielsm>(it's not a StationID, TownID, SignID all at the same time, only the one type given by VKI_STATION/etc.)
13:08<Samu>btw, it also crashed on master version
13:08<Samu>ah, i see
13:08<+glx>of course, 1.10 is master ;)
13:09<+glx>not the more recent master, but still master
13:09<Samu>master-gd865916a07
13:09<+glx>and no changes happened in this area since beta release
13:10-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
13:10<+glx>still no fast way to reproduce ?
13:11<andythenorth>hmm maybe I can rewrite to be faster for pypy
13:11<Samu>_viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index));
13:11<andythenorth>seems that it needs code written for it
13:11<andythenorth>or I could maybe switch template language
13:11<Samu>it enters this part, and tries to find something, and reaches invalid_node
13:11<+glx>Samu: yes I know where the crash is, I posted the log in the issue ;)
13:12<+glx>at some point it takes the wrong branch of the tree I think
13:12-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
13:12-!-supermop_work_ is "A CIRC user" on #openttd
13:13<+glx>now the question is why ?
13:13<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh updated pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/fhho4
13:14<Samu>is there anything I can do to brute force a search?
13:14<Samu>branch stuff
13:15<andythenorth>hmm
13:15<andythenorth>FIRS
13:15<Samu>or maybe a failsafe when it fails to find, have it make some slower search
13:15<andythenorth>py35: 59s; py38: 47s; pypy: 31s
13:15<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/Je17r
13:16<+glx>FIRS (at least the one on github) needs a big update for current nmlc
13:16<andythenorth>there's a branch
13:16<andythenorth>v4-development or something
13:16<andythenorth>main reason I switched it to git :)
13:16<+glx>luckily as you did it only one file needs changes ;)
13:17<andythenorth>has something else changed? :P
13:20<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh updated pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/fhho4
13:22<+glx>ha yes v4-development-track compiles
13:22<+glx>I forgot to check branches last night
13:22<andythenorth>I wonder if FIRS is suitable for stored procedures :P
13:23<andythenorth>there are some truly horrible things for drawing the correct ground tile: snow, slope etc
13:23<andythenorth>they are endlessly repetitive
13:23<+glx>it is if switches are based on the same calculations
13:23<andythenorth>I am hoping that stored procedures might work for Iron Horse
13:23<andythenorth>optimistically, I might remove 20k lines of 170k total
13:25<andythenorth>FIRS :P https://github.com/andythenorth/firs/blob/master/src/templates/spritelayouts_groundaware.pynml#L62
13:25<andythenorth>I don't know if childsprite can use a stored procedure result
13:27<andythenorth>that would be a trip deep into nml :P
13:27<andythenorth>https://newgrf-specs.tt-wiki.net/wiki/Action2/Sprite_Layout#Extended_format_using_multiple_combined_sprites
13:27<andythenorth>there's also an advanced format using registers :P
13:29<andythenorth>this check is super, I wonder what it expands to in the final varaction 2 :P https://github.com/andythenorth/firs/blob/master/src/templates/spritelayouts.pynml#L34
13:32<+glx>I think childsprite can use a stored procedure result
13:32<+glx>I guesse the stuff is converted to a varact2 by nmlc
13:33<andythenorth>maybe nml could consolidate them for me :P
13:34<+glx>it should be possible to use [STORE_TEMP(), procedure()]
13:34<+glx>and in the procedure you use LOAD_TEMP() to get the parameter
13:35<andythenorth>:)
13:36*andythenorth wonders how compilers optimise
13:37<andythenorth>this expression is all keywords
13:37<andythenorth>(climate != CLIMATE_TROPIC) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_DESERT)) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_NORMAL) && ((nearby_tile_terrain_type( 1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type(-1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type( 0, 1) != TILETYPE_DESERT) && (nearby_tile_terrain_type( 0,-1) !=
13:37<andythenorth>TILETYPE_DESERT) ) )
13:37<+glx>and we could probably add something like function name(args..) { return <calculation>; } to let nmlc generate the varact2
13:37<andythenorth>so presumably all instances of it could be resolved to one instance
13:37<andythenorth>automatically :P
13:37<andythenorth>do compilers construct tables of recurring patterns?
13:38<+glx>I don't think nmlc does :)
13:39<andythenorth>:)
13:40<Samu>it exists
13:40<Samu>+ [2595] {element={type=VKI_STATION (0) id={station=1746 town=1746 sign=1746 } center=-48128 ...} left=2597 right=...} Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::node
13:40<Samu>it's in the list of nodes
13:40<Samu>it just fails to find it
13:41<nielsm>does the cached position match the expected?
13:41<nielsm>(cached position = the position stored in the tree)
13:42<Samu>center, left and right?
13:42<nielsm>yes
13:42<Samu>not sure how to check, but let me try
13:42-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
13:44<Samu>https://imgur.com/qmWN94d
13:44-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
13:44-!-supermop_work_ is "A CIRC user" on #openttd
13:44<Samu>nop, doesn't seem to match
13:45<Samu>sec, i take another screenshot
13:45<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/Je15f
13:46<Samu>https://imgur.com/a/glwkJej
13:46<Samu>2 screenshots
13:46<Samu>the top for one is 43872, the top for the other is 43904
13:46<Samu>they should have the same value, right?
13:47<+glx>I think I know what happened
13:47<+glx>dock removed, land raised, sign moved
13:47<nielsm>ah yeah
13:48<nielsm>so changing land height below a ghost station sign can trigger bugs
13:48<nielsm>ugh
13:48<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh updated pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/fhho4
13:48<+glx>let see if I can reproduce using these simple steps
13:49<Samu>land lowered, it seems
13:49<+glx>whatever the sign moved
13:49<andythenorth>maybe I can speed up PIL :P
13:50<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/Je15T
13:50<+glx>it's annoying to not be able the batch replies to reviews ;)
14:11<@peter1138>Yeah
14:11-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
14:12<nielsm>glx: you can if you go to the Files Changed tab first
14:14-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
14:20-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
14:20-!-supermop_work_ is "A CIRC user" on #openttd
14:43<+glx>and write a new review ?
14:44<Samu>i can't reproduce the crash glx
14:44<Samu>raised land, lowered land, nothing seems to make it crash
14:50-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
14:51-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
14:51-!-supermop_work_ is "A CIRC user" on #openttd
15:04<Samu>strange, when I load an autosave from a month earlier
15:04<Samu>i get top = 43904, and it's now node 171, instead of 2595
15:05<nielsm>is the station already demolished at that time?
15:05<Samu>yes
15:05<nielsm>yeah
15:05<+glx>node changes when something is added removed, ignore the nod ;)
15:05<nielsm>the tree is recalculated when the save is loaded
15:05<+glx>*node index
15:05<Samu>so, gonna try load when the station is not yet demolished
15:06<nielsm>so if you save and reload while the tree is in an inconsistent state, the state will be rebuilt to be consistent
15:06<+glx>the main issue is to find why the sign "moved"
15:06<+glx>or how we can move it without updating the tree
15:10<Samu>top = 43872 with the station yet built
15:11<Samu>if i delete the station, will i get the crash now?
15:11<nielsm>how does the map look with the station in place?
15:11<nielsm>compared to how it looks after it was deleted
15:12<nielsm>sorry, demolished not deleted
15:12<Samu>https://imgur.com/1SAlRbV looks like this
15:13<nielsm>so the AI demolishes the dock and also lower the land piece it sits on
15:13<Samu>yes, but he's not demolishing now :(
15:14<Samu>ais after load tend to do different than a straight run
15:14<nielsm>yes they use the interactive random, not a game state random
15:21-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
15:24-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
15:24-!-supermop_work_ is "A CIRC user" on #openttd
15:26<Samu>yay, i think i found a more reproducible way to crash it
15:26<Samu>gonna try again to confirm
15:29<Samu>yes! it crashed
15:29<Samu>gonna post
15:31<DorpsGek_III>[OpenTTD/OpenTTD] SamuXarick commented on issue #7847: Crash - Assertion failed at line 213 of src\core\kdtree.hpp: next != INVALID_NODE https://git.io/Je1Eh
15:34<Samu>in autosave11 the top value is different than that in autosave12, because the dock still exists in 11, but not in 12
15:34<Samu>if i load the autosave12 it won't crash
15:36<Samu>do you want autosave12?
15:37<nielsm>I wonder what the trigger for the sign moving it though
15:37<Samu>if you don't lower the land after demolishing the docks, autosave11 won't crash either
15:37<Samu>so it's something related to lowering land
15:38*andythenorth wonders if grfcodec could be faster
15:38<nielsm>normally ghost station signs don't move after modifying the land below them
15:38<+glx>the sign moves when the dock is removed but doesn't cause crash
15:39<+glx>and it moves because content changes
15:41<+glx>waiting for the sign to disappear at 7fps takes time :)
15:41<nielsm>yeah...
15:41<nielsm>but I reproduce it too with that save
15:42<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on issue #7847: Crash - Assertion failed at line 213 of src\core\kdtree.hpp: next != INVALID_NODE https://git.io/Je1Eh
15:43-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
15:43-!-snail_UES_ is "Jacopo Coletto" on #openttd
15:48<andythenorth>hmm
15:48<andythenorth>I need to save 5s on generating the nml
15:49<andythenorth>the overhead of starting the template engine is 1s
15:49<andythenorth>so I don't think parallelising will help :(
15:55-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
15:57<nielsm>okay the bug seems to occur already in demolishing the station
15:57<nielsm>lowering the land is not required
15:58-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
15:58-!-supermop_work_ is "A CIRC user" on #openttd
16:04<+glx>I tried building something similar but that doesn't trigger
16:04<nielsm>yeah it depends on the rest of the map and signs
16:05<nielsm>it has to be sufficiently large and positioned "correctly" so the station sign that moves ends up in a different position in the tree
16:05<+glx>ah yes it's the only station I have when I try
16:05<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on issue #7847: Crash - Assertion failed at line 213 of src\core\kdtree.hpp: next != INVALID_NODE https://git.io/Je1Eh
16:09<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh commented on issue #7847: Crash - Assertion failed at line 213 of src\core\kdtree.hpp: next != INVALID_NODE https://git.io/Je1Eh
16:11<nielsm>if you want to trace it, breakpoint in ClearTile_Station() and follow it into RemoveDock()
16:12<nielsm>and stuff happens with the st->rect.AfterRemoveTile() until st->AfterStationTileSetChange() calls
16:15<nielsm>the reason the sign moves is not because it gets moved, or the tile height changes, but because the way the tile z coordinate is calculated changes when the tile changes from a station tile to a clear tile
16:16<+glx>because it's a slope
16:16<nielsm>yeah
16:26<andythenorth>oof can't commit this to a public repo eh :D
16:26<andythenorth>../../pypy3/bin/nmlc -l generated/lang --verbosity=4 --nfo=generated/iron-horse.nfo generated/iron-horse.nml
16:27<+glx>hardcoded path to an exe ?
16:27<andythenorth>:(
16:28<andythenorth>39s vs 55s
16:28-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
16:30-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
16:30-!-supermop_work_ is "A CIRC user" on #openttd
16:36<andythenorth>Makefile.local and gitignore it? :P
16:43<andythenorth>that seems to work fine
16:44<andythenorth>@calc 39/68
16:44<@DorpsGek>andythenorth: 0.573529411765
16:44<andythenorth>not a bad speed up
16:44<andythenorth>overall
16:56<Samu>Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
16:56<Samu>Point pt = RemapCoords(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE, GetTileMaxZ(st->xy) * TILE_HEIGHT);
16:56<Samu>could this be the issue?
16:56<nielsm>no
16:56<nielsm>I'm fixing that too, but it isn't
16:57<nielsm>I know exactly what's going wrong
16:57<Samu>oh, cool
16:57<nielsm>and it's annoying to fix
16:58<+glx>I think it could be done in ViewportSign::UpdatePosition()
16:58<supermop_Home>andythenorth: why do sliding wagons cost more than curtain sided?
16:58<nielsm>glx yes and no
16:59<+glx>but it first needs to check it's already in the tree before maybe remove
17:01-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
17:03<andythenorth>supermop_Home: not sure :D cost in code is the same for both
17:05<supermop_Home>i mean at this point i can afford the sliding side wagon, running cost is the same
17:05<supermop_Home>i figure it might look better for shipping vehicles
17:06-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
17:06-!-supermop_work_ is "A CIRC user" on #openttd
17:08<supermop_Home>its like $2027 vs $1851 for the large wagon
17:10<andythenorth>mine all cost same :)
17:11<andythenorth>oh the tarp wagon is cheaper
17:12<supermop_Home>well the metal sided looks more like a car carrier
17:12<supermop_Home>so im paying the premium for it
17:13<andythenorth>I should finish the vehicle wagons :P
17:14-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
17:14<andythenorth>https://dev.openttdcoop.org/attachments/download/9482/vehicles_cars_trucks_5.png
17:14<nielsm>glx no doesn't fix it, I suspected that
17:15<supermop_Home>if im dropping a town effect cargo off on the outskirts of town (at a black hole industry) does the TE go to the town with the station name, or closest by mht distance?
17:15<nielsm>thing is the expected position of the sign changes behind the station code when the tile is modified after it stops being a station tile
17:16<nielsm>really ViewportSignKdtreeItem::MakeStation() ought to use BaseStation::sign.top and .center for the position
17:16<nielsm>but those aren't always valid when it gets called first, I think
17:18<+glx>ah yes ViewportSign::UpdatePosition() can't know the object containing it
17:21<nielsm>I think I need to make a StationViewportSign inheriting ViewportSign and keeping track of its kdtree state
17:35<supermop_Home>how many tiles away until luxury passenger car makes sense?
17:37-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
17:38<nielsm>depends on train speed too I think
17:39<nielsm>since the effect of luxury passenger cars is to make the trip "feel shorter"
17:39<nielsm>if it's sufficiently long (too slow) then you'll hit the max cap I think exists
17:39<supermop_Home>185 kph… still haven't figured out all the livery easter eggs in IH
17:41<andythenorth>in tests it's about 64 tiles or so
17:42<andythenorth>the luxury pax cars actually do ~nothing
17:42<andythenorth>the standard pax cars have to have a nerf
17:42<supermop_Home>luxury in HST?
17:42<andythenorth>the decay rate modifier is mostly useless
17:43<supermop_Home>these are just 4 tile push-pulls with a fury on the back
17:43<supermop_Home>and mail emu up front
17:43<supermop_Home>look nice
17:44<andythenorth>:)
17:46-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
17:46-!-supermop_work_ is "A CIRC user" on #openttd
17:49-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
18:03<DorpsGek_III>[OpenTTD/OpenTTD] nielsmh opened pull request #7849: Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates for stations https://git.io/Je1bx
18:03<nielsm>Samu: test that :)
18:13<Samu>ok
18:15<Samu>uhm, i forgot what was the command
18:16<Samu>glx, to create a PR
18:16<+glx>git pr <number>
18:16<+glx>easy to remember :)
18:16-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
18:21<Samu>waiting for sign to disappear
18:21<Samu>is this the right way to test? load the savegame with the station?
18:21<nielsm>yes
18:21<Samu>remove it, and lower terrain
18:21<Samu>ok
18:21<nielsm>also it helped me to test by getting rid of all installed AIs
18:23<Samu>yep, sign poof, no crash
18:24<+glx>code looks good and simplifies a lot of corner cases
18:24-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
18:24-!-supermop_work_ is "A CIRC user" on #openttd
18:25<Samu>gonna try restarting the world
18:25<Samu>see if it passes 1961
18:25<Samu>starting at 1935
18:25-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has joined #openttd
18:25-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttd
18:27-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
18:27-!-snail_UES_ is "Jacopo Coletto" on #openttd
18:27<nielsm>glx: indeed after getting the idea it's quite a "why didn't I do that from the beginning" moment
18:27<+glx>I know the feeling
18:29<Samu>i should be in bed, they don't let me stay up this late
18:30<+glx>then go to be, you can test tomorrow :)
18:30<+glx>*bed
18:30<Samu>ok, take care
18:32<Samu>1940, come on, faster!!
18:32-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
18:33<Samu>meh, better go
18:33<Samu>bye
18:36<DorpsGek_III>[OpenTTD/nml] glx22 opened pull request #67: Minor changes in regression Makefile and .gitignore https://git.io/Je1N2
18:38<nielsm>and me too, gn
18:38<andythenorth>bed
18:38-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has left #openttd []
18:41-!-Samu [~Ricardo@po1-84-90-251-49.netvisao.pt] has quit [Ping timeout: 480 seconds]
18:46-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has quit [Ping timeout: 480 seconds]
18:51<DorpsGek_III>[OpenTTD/nml] glx22 updated pull request #67: Minor changes in regression Makefile and .gitignore https://git.io/Je1N2
18:54-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
18:55-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
18:55-!-supermop_work_ is "A CIRC user" on #openttd
19:25-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
19:27-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
19:27-!-supermop_work_ is "A CIRC user" on #openttd
19:45-!-Progman [~progman@p4FD66C04.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
19:52-!-gelignite [~gelignite@55d4cbd7.access.ecotel.net] has quit [Quit: Good fight, good night!]
19:57-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
20:07-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
20:07-!-supermop_work_ is "A CIRC user" on #openttd
20:15-!-sla_ro|master [~sla.ro@89.136.179.137] has quit []
20:26-!-Flygon [~Flygon@114-198-111-222.dyn.iinet.net.au] has joined #openttd
20:26-!-Flygon is "Flygon" on #openttd
20:27-!-zvxb [~ADikT@174.128.246.10] has quit []
20:32-!-adikt [~ADikT@172.83.40.27] has joined #openttd
20:32-!-adikt is "realname" on #openttd
20:38-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
20:48-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
20:48-!-supermop_work_ is "A CIRC user" on #openttd
21:05-!-Smedles_ [~quassel@61-245-155-93.3df59b.adl.nbn.aussiebb.net] has joined #openttd
21:05-!-Smedles_ is "Paul Smedley" on #openttd
21:08-!-Smedles [~quassel@2403-5800-5100-f00-1654-b611-79f4-51f9.ip6.aussiebb.net] has quit [Ping timeout: 480 seconds]
21:18-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
21:28-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
21:28-!-supermop_work_ is "A CIRC user" on #openttd
21:58-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
22:01-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
22:01-!-supermop_work_ is "A CIRC user" on #openttd
22:18<snail_UES_>anybody there?
22:21-!-D-HUND [~debdog@2a00:79c0:66a:a200:7a24:afff:fe8a:d04d] has joined #openttd
22:21-!-D-HUND is "Wowbagger" on #openttd #bitlbee
22:24-!-debdog [~debdog@2a00:79c0:62f:8c00:7a24:afff:fe8a:d04d] has quit [Ping timeout: 480 seconds]
22:31-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
22:33-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
22:33-!-supermop_work_ is "A CIRC user" on #openttd
23:04-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
23:05-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
23:05-!-supermop_work_ is "A CIRC user" on #openttd
23:10-!-glx [kvirc@000128ec.user.oftc.net] has quit []
23:34-!-Wormnest_ [~Wormnest@35.136.143.225] has quit [Ping timeout: 480 seconds]
23:36-!-supermop_work_ [~supermopw@162.213.133.191] has quit [Remote host closed the connection]
23:37-!-supermop_work_ [~supermopw@162.213.133.191] has joined #openttd
23:37-!-supermop_work_ is "A CIRC user" on #openttd
---Logclosed Sun Dec 01 00:00:05 2019