Back to Home / #openttd / 2018 / 10 / Prev Day | Next Day
#openttd IRC Logs for 2018-10-31

---Logopened Wed Oct 31 00:00:49 2018
00:24-!-dvim [~martynas@78-61-207-1.static.zebra.lt] has quit [Quit: WeeChat 2.3]
00:32-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
01:41-!-yellyFish [~yellyfish@181-163-152-57.baf.movistar.cl] has quit [Quit: WeeChat 1.6]
03:13-!-glavinics [~glavinics@2a01:c23:7834:ae00:e986:37be:f9d9:775a] has joined #openttd
03:13-!-glavinics is "glavinics" on #openttd.dev #openttd
03:13-!-glavinics [~glavinics@2a01:c23:7834:ae00:e986:37be:f9d9:775a] has quit []
04:02-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has joined #openttd
04:02-!-nielsm is "Niels Martin Hansen" on #openttd #tycoon
04:24-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
04:24-!-andythenorth is "andythenorth" on #openttd
04:51<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #6954: Doxygen update and warning fixes https://git.io/fxFXo
04:58-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
05:00-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
05:00-!-andythenorth is "andythenorth" on #openttd
05:00-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit []
05:05-!-matt21347 [~matt21347@77.86.33.102] has joined #openttd
05:05-!-matt21347 is "matt" on #openttd #debian-next #debian-welcome #debian
05:15-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
05:15-!-andythenorth is "andythenorth" on #openttd
05:16-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit []
05:17-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
05:17-!-andythenorth is "andythenorth" on #openttd
05:28-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
06:24-!-andythenorth [~andytheno@81.171.232.172] has joined #openttd
06:24-!-andythenorth is "andythenorth" on #openttd
06:24-!-andythenorth [~andytheno@81.171.232.172] has left #openttd []
06:43<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxFdU
06:45<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxFdm
07:29-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
07:29-!-frosch123 is "frosch" on #openttdcoop.devzone +#openttd.dev #openttd
07:35<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 merged pull request #6954: Doxygen update and warning fixes https://git.io/fxdxf
07:41<LordAro>:)
07:41<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 approved pull request #6948: Various minor code cleanups found by scan-build https://git.io/fxFxs
07:41<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 merged pull request #6948: Various minor code cleanups found by scan-build https://git.io/fxHhE
07:42<LordAro>:))
07:44<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 approved pull request #6932: Change: Gradually slow down aircraft speed on breakdown https://git.io/fxFxr
07:45<nielsm>I'm looking at #6928 atm, it looks like way too much work and special casing
07:45<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 merged pull request #6932: Change: Gradually slow down aircraft speed on breakdown https://git.io/fxGAO
07:46<frosch123>yes, that applies to at least half of samu stuff
07:46<frosch123>corner cases over corner cases
07:49<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 approved pull request #6754: Don't automatically deactivate the vehicle clone tool after cloning a vehicle https://git.io/fxFpL
07:50<nielsm>wow wtf is up with the YAPF method of selecting functions to call depending on settings
07:51<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 merged pull request #6754: Don't automatically deactivate the vehicle clone tool after cloning a vehicle https://git.io/vp8bd
07:51<frosch123>nielsm: inline fetishism
07:52<frosch123>someone trying to have a complete inlined copy of the whole algorithm for each combination of parameters
07:53<nielsm>https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_rail.cpp#L617-L625
07:53<nielsm>like that
07:53<nielsm>function pointers to a static function that just constructs an object of the type and calls a similarly named function on the object with parameter pass-through
07:53<LordAro>yapf is scary code
07:54<nielsm>like, just use a damn virtual method
07:54<nielsm>it's still a level of indirection
08:04-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
08:04-!-snail_UES_ is "Jacopo Coletto" on #openttd
08:10<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 opened pull request #6955: Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits. https://git.io/fxFjB
08:12<DorpsGek_II>[OpenTTD/OpenTTD] LordAro approved pull request #6955: Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits. https://git.io/fxFjH
08:12<frosch123>:)
08:15<LordAro>though i wonder if that branch will slow things down
08:16<@peter1138>Yeah it was meant to be super fast.
08:17<frosch123>ROR is only used in 3 places
08:17<frosch123>2 of them have a fixed constant for n, so i hope on the compiler
08:17<frosch123>the 3rd is the just added one
08:18<@peter1138>I meant YAPF, sorry.
08:18<frosch123>ROL is used in md5sum
08:19<frosch123>which also has a chance to be inlined
08:21-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
08:34<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 requested changes for pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxbfz
08:46<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 commented on pull request #6831: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxbJs
08:46<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 closed pull request #6831: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/f4DWv
09:33<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh requested changes for pull request #6928: Fix #5713: Use pathfinder to find closest ship depot https://git.io/fxbLs
09:35<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh merged pull request #6955: Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits. https://git.io/fxFjB
09:45<nielsm>I don't really know about release preparations etc., but would it be an idea to make a "project" board on github for collecting tickets that should be addressed for 1.9.0 release? or does github have a better way of managing that?
09:56<@peter1138>There is a release procedure document somewhere, I'm sure.
09:57<frosch123>nielsm: http://devs.openttd.org/~frosch/backport.txt <- we used to collect stuff for the backports and changelogs together
09:57<frosch123>not sure how to format the changelog with git hashes :p
09:58<frosch123>https://wiki.openttd.org/To_do_for_releases <- that's the old workflow, which is now mostly obsolete due to git and new compile farm :p
09:58<LordAro>can't, really
09:59<LordAro>wellz you could, but they'd be even less useful than the revision numbers
09:59<LordAro>a project board for collecting issues sounds like a good idea though
10:00<LordAro>assuming a 1.8.1 release is actually desired
10:00<frosch123>depends when we have a farm that can build it :)
10:01<nielsm>I was thinking catching both bugs and desired features (open PRs) we want on a project board
10:06<@peter1138>Does any of the old farm still exist?
10:06<@peter1138>Cos that did still work, didn't it?
10:07<frosch123>i don't think the disk was full
10:08<frosch123>but we would have to revert some c++11 changes :p
10:11-!-Wormnest [~Wormnest@35.136.176.177] has joined #openttd
10:11-!-Wormnest is "Wormnest" on #openttd
10:15<LordAro>nielsm: couldn't hurt to make one, even if it ends up not being used
10:19<nielsm>https://github.com/OpenTTD/OpenTTD/projects/3
10:30<LordAro>ah, i was referring to bugfix releases, rather than major releases
10:30<nielsm>I don't think it makes sense to make a 1.8.1 at this point
10:30<LordAro>major release projects could easily turn into the roadmap pages on the wiki :p
10:31<@peter1138>So anybody else have experience of setting these kind of compile farms up?
10:32<@peter1138>I have VM resources that could potentially be used, but it's not super high-end.
10:33<LordAro>i fear not
10:37<nielsm>also, how to do windows build, non-containerized on a desktop windows version, or containerized cross-compile from linux?
10:38<nielsm>renting a windows server version is probably somewhat expensive
10:39<LordAro>this was what blocked TrueBrain, iirc
10:41<frosch123>https://github.com/TrueBrain/OpenTTD-CF/tree/windows <- that's the last status, i think
10:47<@peter1138>Does it need to be a server version?
10:47<LordAro>it makes certain ...server things easier
10:48<nielsm>also avoids some windows update fun times
10:54<nielsm>https://github.com/tpoechtrager/wclang ?
10:55<@peter1138>i686-w64-mingw32-clang++ < mixed messages about architecture there...
10:55<@peter1138>How to target different Windows versions with that?
10:57<nielsm>that's really an issue I have with all gcc/clang-derived compilers that target win32, they want to use the microsoft C runtime, instead of their own
10:57<nielsm>despite that windows does not have any such thing as "system C runtime"
10:57<nielsm>it's kind of expected that a compiler vendor supplies their own runtime
10:58<nielsm>hm bbl, I should really go for a walk while there's still some daylight
11:19-!-hph^ [~hph@ip72-195-187-57.mc.at.cox.net] has quit []
11:33<@peter1138>You can walk in the dark too.
12:13<@planetmaker><LordAro> [13:59:52] a project board for collecting issues sounds like a good idea though <-- isn't that like the issues on GitHub? And maybe an additional tag as to which version they should be fixed in like we had on FlySpray?
12:14<@planetmaker>(or is 'project board' a github feature I don't know yet? How does it relate to the issues?)
12:17-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has quit [Read error: No route to host]
12:25<nielsm>back... I accidentally bought a new coat too
12:27<nielsm>planetmaker: a project board is more or less a category of mutually exclusive tags, forming a single orthogonal dimension of categorisation of tickets, but they can also hold non-tickets (single-line notes)
12:27<nielsm>and items in each category on a board have an explicit ordering
12:48<LordAro>planetmaker: https://github.com/OpenTTD/OpenTTD/projects/3 basically a github trello thing
13:28-!-Progman [~progman@p548D9430.dip0.t-ipconnect.de] has joined #openttd
13:28-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttdcoop #openttd
13:41-!-yellyFish [~yellyfish@181-163-152-57.baf.movistar.cl] has joined #openttd
13:41-!-yellyFish is "yellyfish" on #openttd
13:49<DorpsGek_II>[OpenTTD/OpenTTD] Hemaolle dismissed a review for pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxddj
13:49<DorpsGek_II>[OpenTTD/OpenTTD] Hemaolle updated pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxddd
13:51<DorpsGek_II>[OpenTTD/OpenTTD] Hemaolle commented on pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxbid
13:57-!-yellyFish [~yellyfish@181-163-152-57.baf.movistar.cl] has quit [Quit: WeeChat 1.6]
14:20<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxbMt
14:23<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 approved pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxbMM
14:24<DorpsGek_II>[OpenTTD/OpenTTD] frosch123 merged pull request #6906: Fix #6742: Only possible to build station next to competitor by using CTRL+click https://git.io/fxddd
14:28-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
14:28-!-Wolf01 is "Wolf01" on #openttd
14:28<Wolf01>o/
14:28<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxbDk
14:31-!-yellyFish [~yellyfish@181-163-152-57.baf.movistar.cl] has joined #openttd
14:31-!-yellyFish is "yellyfish" on #openttd
14:32-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
14:32-!-andythenorth is "andythenorth" on #openttd
14:33<andythenorth>o/
14:34<andythenorth>loads of merges :o
14:35<andythenorth>pull queue, -samu https://github.com/OpenTTD/OpenTTD/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+-label%3A%22waiting-on-author%22+-author%3ASamuXarick+
14:35<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxbDD
14:51<Arveen>this channel needs more egg plants 🍆🍆🍆
15:02<andythenorth>it has enough now
15:04-!-Supercheese [AdiIRC@50.37.119.244] has joined #openttd
15:04-!-Supercheese is "Supercheese" on #openttd
15:11<yellyFish>so after decoding a newGRF, how should a line calling for var 0x61 look like?
15:11*andythenorth looks
15:16<yellyFish>found it
15:17<andythenorth>can't find it in nars 2.5.1
15:17<andythenorth>:P
15:17<andythenorth>oof
15:21<LordAro>https://help.github.com/articles/transferring-an-issue-to-another-repository/ sounds useful for the dorpsgek repos :p
15:24<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #6935: Add: EnsureNoShipFromDiagDirs https://git.io/fxbQP
15:24<nielsm>could I get someone else to weigh in on that as well?
15:25<andythenorth>I read it, but I can't comment on the answer :(
15:40<yellyFish>is there any overarching logic to how the game connects NewGRFs and set variables,etc? or is it just something that got more and more features and needs a rework?
15:42<Xaroth>andythenorth: mind testing something (if you're on windows that is)
15:42<Xaroth>if I set `mono_font = Tahoma` in my openttd.cfg, and start openttd, it will start crashing randomly.
15:42<andythenorth>such not windows :)
15:42<Xaroth>ah, lame :P
15:42<andythenorth>I should test the macOS ICU port though
15:43<nielsm>Xaroth is that 1.8.0 or a dev version?
15:43<Xaroth>1.8.0
15:43<nielsm>probably the ICU layout issues then
15:44<Xaroth>fair enough
15:44<Xaroth>Related to https://github.com/OpenTTD/OpenTTD/issues/6882 then I take it?
15:44<nielsm>I can make a build of current master if you want to try
15:44<Xaroth>meh, I'm not fussed
15:44<nielsm>(will you need 32 bit or 64 bit?)
15:45<Xaroth>simply not using Tahoma as mono font would work :P
15:45<Xaroth>but if it's related to #6882, I have a crash.dmp
15:49<LordAro>can't hurt to shove it into the issue
16:07-!-glx [kvirc@000128ec.user.oftc.net] has joined #openttd
16:07-!-mode/#openttd [+v glx] by ChanServ
16:07-!-glx is "Loïc GUILLOUX" on @#opendune @#openttd.noai #openttd.notice +#openttd
16:12<andythenorth>oops
16:12*andythenorth reading youtube comments
16:13<LordAro>ono
16:13<Xaroth>why would you read youtube comments?
16:13<andythenorth>to remind myself
16:13<andythenorth>I was watching a video about electricity smart meters
16:13<andythenorth>and then there were comments
16:14<andythenorth>about conspiracy theories
16:17<andythenorth>it's funny
16:17<andythenorth>the dumb conspiracy fucks are scared of networks and devices and governments
16:17<andythenorth>but they're happy to sit posting on YT
16:18<andythenorth>self-identifying :P
16:18<andythenorth>basic violation of opsec
16:19*andythenorth back to pixels
16:21<yellyFish>does anyone know how to read and make sense of a nfo file?
16:21<andythenorth>kinda
16:21<andythenorth>it's hard from compiled source
16:21<andythenorth>but somewhat
16:22<yellyFish>i am trying to isolate 4 lines and why are they being called so much
16:23<andythenorth>can you paste them?
16:23<andythenorth>with a bit of context?
16:24<andythenorth>https://paste.openttdcoop.org/
16:24<yellyFish>yeah i was searching pastebing but it was giving me garbage text
16:25<andythenorth>if it's NARS 2.5.1 I have some guesses for var 61
16:25<andythenorth>but I'd need to see the rest of the action 2 chain
16:26<andythenorth>and what it's reading from the other vehicle
16:26<nielsm>it'd be a huge amount of work, but it might be interesting to add detailed logging to openttd itself of newgrf happenings
16:27<andythenorth>the forum post suggests it's looking for C6?
16:27<andythenorth>do we need to shift that to get the actual var it's reading?
16:27<andythenorth>where is eddi when he's needed? o-o
16:27<andythenorth>@seend Eddi|ZuHaus
16:27<andythenorth>@seen Eddi|ZuHaus
16:27<@DorpsGek>andythenorth: I have not seen Eddi|ZuHaus.
16:27<Wolf01>"send"
16:28<andythenorth>oof
16:28<Wolf01>@seen __ln__
16:28<@DorpsGek>Wolf01: __ln__ was last seen in #openttd 16 weeks, 3 days, 0 hours, 23 minutes, and 20 seconds ago: <__ln__> TrueBrain: also, how hard can it be to figure out my comment COULD be related to a repo that was mentioned on the previous line?
16:28<Wolf01>Mmmh
16:28<LordAro>rip
16:28<Wolf01>Must be in a trip again
16:28<andythenorth>oh C6 is the ID
16:29<frosch123>nielsm: problem with that is that only few people can read it
16:29<andythenorth>NARS used to have a thing where it adjusted engine HP depending on wagons
16:29<frosch123>i did http://devs.openttd.org/~frosch/inspect_backtrace.png somewhen
16:29<andythenorth>it might also be running costs, or just livery stuff
16:29<frosch123>but stopped continueing it, once i had solved the problem at that time :p
16:29<Wolf01>It's perfectly readable
16:29<andythenorth>yellyFish: you could also try with Iron Horse 2 dev build
16:29<andythenorth>which probably calls 0x61 a lot
16:29<andythenorth>but has full source :P
16:30<yellyFish>fug. i can't paste it. can i upload the file somewhere?
16:30<andythenorth>http://bundles.openttdcoop.org/iron-horse/push/LATEST/
16:30<andythenorth>if it's NARS 2.5.1 I've got it decompiled here
16:30<andythenorth>which sprite numbers?
16:30<andythenorth>or line numbers, either, just tell me which :D
16:30<andythenorth>so much wasted time confusing those two :)
16:31<Wolf01>I had a discussion with my boss today because he isn't sure we should use guids as primary key on every table for the new project, having composite clustered keys (like 5-7 columns) helps readability...
16:31<andythenorth>ah the endless guid debate
16:31<yellyFish>4190
16:31*andythenorth likes UUIDs starting at 0 :P
16:31<andythenorth>and incrementing by 1
16:32<andythenorth>then we all know where we stand
16:32<andythenorth>apparently it goes wrong when you merge UIDS from multiple sources :P
16:33<yellyFish>or search for '61 C6'. it should give you 4 ocurrences
16:33<andythenorth>yellyFish: my suspicion, based on scanning that, it's livery stuff
16:33<andythenorth>I need to read more though
16:33<andythenorth>so long since I did this
16:33<yellyFish>it is getting the engine ID offset by register 0x10F
16:34<andythenorth>so it's high speed mail and pax cars?
16:35<yellyFish>i think so
16:36<andythenorth>I'd have to reformat the action 2s to read them properly
16:36<andythenorth>I can't read single line bytecode :P
16:36<yellyFish> 02 00 10 81 // 19 Bytes, A2, Feature 00 (Train), A2 set ID 10, type 81(1 byte variable)
16:36<yellyFish>4191 61 C6 00 FF // var 0x61, parameter 0xC6, get engine ID offset by register 0x10F
16:36<yellyFish>4192 02 // 2 ranges and default
16:36<yellyFish>4193 10 00 55 55 // A2ID 10, low 55, high 55
16:37<yellyFish>4194 10 00 59 59 // A2ID 10, low 59, high 59
16:37<yellyFish>4195 30 00 // default: A2ID 30
16:37<yellyFish>that's what i dissected from the first occurrence
16:37<andythenorth>my suspicion is that it's returning results for sprites 3925-3927
16:37<andythenorth>or similar, depending which block you're in
16:37<andythenorth>the sprites for these vehicles depend on the engine ID
16:38<andythenorth>it might be something else, but pikka removed most of the BAD FEATURES in NARS 2.5.1
16:39<andythenorth>you should see the same 0x61 calls in Iron Horse 2, for consists with a caboose, or pax cars or mail cars
16:39<andythenorth>I linked it above
16:39<yellyFish>but it is getting called a lot. isn't there a more CPU friendly way of doing that?
16:40<frosch123>do you want to change the grf or ottd?
16:40<yellyFish>if it's inevitable, the latter, else the former
16:42<frosch123>you need to figure out what is put in register 10f for var61
16:42<yellyFish>-1 and 1
16:42<yellyFish>alternating
16:42<frosch123>ok, so you have an articulared wagon or engine
16:43<frosch123>multiple vehicles are composed from the same articulated parts with different heads
16:43<frosch123>you can remove that by duplicating the code
16:43<frosch123>like templates instead of virtual methods :)
16:44<frosch123>but without a compiler which does that, you won't have fun :p
16:45<andythenorth>it will get called on every redraw no?
16:45<andythenorth>is it particularly expensive?
16:45<yellyFish>i think lies in why am i getting so much calls for that than anything else
16:45<yellyFish>and they get quit expensive if you add them
16:45<yellyFish>quite*
16:46*andythenorth tries to remember difference between 81 and 85
16:46<frosch123>usually you should get var 0C the most
16:46<andythenorth>I thought there was a way to trivially get the ID of the lead vehicle
16:46<frosch123>if you get 61+vehicle id more often, you have a case of virtual functions
16:46<frosch123>andythenorth: it's not the lead vehicle
16:47<andythenorth>no
16:47<andythenorth>it does some other stuff
16:47<andythenorth>it varies sprite by position in consist of similar ID?
16:47<frosch123>it's articulated wagons
16:47<yellyFish>it calling 0x61 with par 198 that in turn returns u->GetEngine()->grf_prop.local_id;
16:48<yellyFish>u being the vehicle offset by register 0x10F
16:48<andythenorth>I am just guessing from trying the vehicles in game and reverse engineering their behaviour :P
16:48<andythenorth>my nfo-reading days are a distant memory
16:51<yellyFish>i want to know why it is trying to get that value so much, is it necesary? can it be removed, modified or optimized in the newGRF or the game
16:51<yellyFish>i have already optimized a little bit
16:51<yellyFish>but still it is not enough.
16:53<frosch123>yellyFish: callbacks are decision trees
16:54<frosch123>you can optimise them by calling them less often, by rebalancing the decisions, or by making the evaluation faster per node
16:55<frosch123>with var61 + vehicle id + offset +-1: i only see the second option
16:56<yellyFish>i have made the evaluation a bit faster by skipping a second call to vehiclegetvariable again when i am sure of the result
16:56<yellyFish>just for var61 wit parameter 198
16:56<yellyFish>beside that i would like to know if i can reduce the number of calls
16:58<frosch123>if the call comes from UpdateViewport, you can optimise it a lot
16:58<frosch123>but it requires some refactoring of the vehicle drawing and hashing
17:07<andythenorth>or drop this from newgrf spec? o_O
17:09<frosch123>does iron horse use it?
17:10<frosch123>sounds like an attempt to increase your market share by banning the competitors :p
17:12<yellyFish>i would prefer to learn from this so it doesn't happen again or diminish the chance of it happening
17:12<andythenorth>Iron Horse uses it extensively
17:13<andythenorth>there's no performance warning on it iirc
17:13<yellyFish>are you using it for trains?
17:13<andythenorth>yes
17:13<andythenorth>but I could delete a lot of BAD FEATURES if it was removed
17:14<yellyFish>what kind of parameter?
17:14<frosch123>i doubt the var is more expensive than any other
17:14<yellyFish>is the var,par pair
17:14<yellyFish>that determines if it is expensive
17:15<yellyFish>at least for 0x61, depending what parameter you pass you get a different branch
17:19<yellyFish>i think i am getting confused
17:19<yellyFish>i'll re-run the profiling
17:20<frosch123>what do you use for profiling?
17:25<yellyFish>callgrind
17:25<frosch123>can you post a screenshot of the callgraph?
17:26<frosch123>http://kcachegrind.sourceforge.net/html/CallGraph.html <- that thing
17:30<yellyFish>uh, sure, wait a sec
17:36<yellyFish>ok. where do i upload it to?
17:37<frosch123>no idea, we do not run our own imagebin
17:38<LordAro>imgur
17:39<yellyFish>https://postimg.cc/JsS3ybTq
17:39<yellyFish>callgrind it's pretty cool, can refer to source code and even assembly
17:39<frosch123>yep :)
17:41<frosch123>so, 100% via UpdateViewport
17:41<frosch123>oh, only 98%, 2% is industries
17:45<frosch123>ah, found the cb backtrace queue, should probably port that one to git
17:55<frosch123>hmm, can't find any diffs wrt. UpdateViewport :(
17:59<LordAro>bottom of cargoaction.cpp, there are some template function definitions for some types
17:59<LordAro>...are these necessary?
17:59<LordAro>it doesn't seem to break anything if i remove them
18:00<frosch123>those functions are called in cargopacket.cpp
18:00<frosch123>but they are not defined in a header, so someone needs to instantiate them
18:00<frosch123>cargopacket.cpp can't
18:01<LordAro>the template function is in the header, why does it need the instantiated version like that?
18:01<frosch123>for some reason ottd likes to put template implementations into source files, hoping to make compilation faster or something
18:02<frosch123>cargoaction.cpp:44 and 63
18:02<frosch123>they are not in the header
18:03<LordAro>the definitions aren't, but the declaration is
18:04<LordAro>i'm missing something about why that matters...
18:04<frosch123>in *normal* code you have template definitions in the header
18:04<frosch123>templates are instantiated when used
18:04<frosch123>every source file creates those instantiations it needs
18:04<frosch123>the linker removes duplicates
18:05<frosch123>in *ottd* code template definitions are in source files, so other places cannot instantiate them
18:05<frosch123>you have to force instantiation
18:05<LordAro>ah right
18:05<LordAro>yes, that... makes sense
18:06<frosch123>it's like yapf with templates instead of virtual methods :p
18:07<frosch123>you make stuff complicated in the hope that it is faster somehow
18:08*andythenorth has never seen that pattern ever
18:08<andythenorth>never ever
18:08<@planetmaker>o/
18:08<frosch123>hoi pm
18:08<andythenorth>like the records store 'optimised' for performance
18:09<andythenorth>but you can't actually query it, because that would be o(n) complexity or something
18:09<andythenorth>it's only optimised for reading in the way the optimiser intended
18:09<andythenorth>and nothing else works
18:09<andythenorth>and it's not actually faster
18:09<andythenorth>and it adds a second source of truth to the system
18:09*andythenorth may have bitterness
18:10<frosch123>think about * and whether to put them left or right
18:10<frosch123>then let others argue about it, and enjoy your beverage
18:10<@planetmaker>hehe :)
18:13-!-matt21347 [~matt21347@77.86.33.102] has quit [Quit: Leaving]
18:13*andythenorth wonders if santa will bring 44 more Iron Horse sprites
18:13<frosch123>at work i once argued for "let's use the code style the other teams use, instead of making ourown" :p
18:13<@planetmaker>nielsm, thanks for the explanation and link earlier. Appreciated :)
18:13<andythenorth>that's fantastic, you're hired frosch123
18:13<andythenorth>we have a rule about 4 spaces, except when somebody has already formatted the file with 2
18:14<frosch123>actually, that is an understatement. my boss raised the question whether we should discuss a style for a new project, and i cut him short before finishing the question :p
18:14<nielsm>learning C is all about placing * correctly the first time around, every time
18:15<andythenorth>what is learning python all about? o_O
18:15*andythenorth has been trying
18:15<andythenorth>since about 2004
18:16<@planetmaker>hm... learning python... is it about using OO appropriately - and doing without strict typing
18:16<nielsm>python is just throwing shit at the REPL until something works, then add it to a random module
18:16<frosch123>python is about people. who are not able to indent correctly, to fail completely on the first meters
18:16<frosch123>early filters are the best
18:16<andythenorth>is it mostly about cargo-culting from stack overflow?
18:18<andythenorth>I can't tell if I am doing it wrong or not :P
18:20<frosch123>https://xkcd.com/1306/ <- just make sure you hit at the bottom of the curve
18:20<frosch123>s/hit/enter programmnig/ or something
18:21<andythenorth>oof
18:21<andythenorth>imagine programming in twitter
18:21<andythenorth>we did try to invent a programmatic control language in twitter
18:21<nielsm>nah, to understand python you have to understand "from __future__ import braces"
18:21<andythenorth>it didn't get far as an April fool joke
18:21-!-Wormnest [~Wormnest@35.136.176.177] has quit [Quit: Leaving]
18:21<andythenorth>I treat python as a game, where I win by using @property as much as possible
18:22<andythenorth>and I award myself bonus points for list comprehensions that are (1) complex (2) but easy to read
18:22<andythenorth>it's not a good language to play 'paste from stack overflow' though
18:23<andythenorth>all the answers get a counter answer about why a is more pythonic than b, or not
18:23<andythenorth>and someone benchmarks something
18:23<andythenorth>whereas JS, someone says 'I made a fiddle' and then you just paste that straight to prod
18:24<andythenorth>maybe adding in a paste from an alternative answer too, because, more is better right?
18:25<frosch123>i am still trying to figure out java
18:25<andythenorth>get an enterprise patterns poster for your wall
18:25<andythenorth>profit
18:25<frosch123>i have difficulties connecting my observations "used a lot in corporations" and "not used at all in open source"
18:25<andythenorth>ha
18:25<andythenorth>I should go to bed
18:26<nielsm>the core of java is a deep taxonomy of namespaces, and a heavy use of inner classes
18:26<andythenorth>tomorrow won't just arrive on its own
18:26<andythenorth>it needs my support
18:26<andythenorth>by sleeping
18:26<frosch123>i think a good java library has more directories than files
18:26<nielsm>preferably so many directories it breaks win32 MAX_PATH
18:27-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has left #openttd []
18:27<nielsm>AbstractFactoryBuilders are also very useful
18:29<frosch123>:)
18:33*LordAro notes there is a cargo_type.h & cargotype.h
18:33<LordAro>this is... unfortunate
18:34<frosch123>we have that multiple times
18:34<frosch123>for example industrytype, industry_type
18:35<frosch123>though i think at some point we started calling the classy one _base
18:36<nielsm>one relates to programmatic types and one to kinds of the gameplay element
18:36<LordAro>ah, that makes slightly more sense
18:36<LordAro>several _base.h's around
18:37<frosch123>goal_base and goal_type is a good example
18:41<yellyFish>why do we use NULL instead of nullptr?
18:41<frosch123>what?
18:41<LordAro>legacy
18:42<nielsm>nullptr is c++11 which is not-quite-yet officially adopted here
18:42<frosch123>we do not even have a c++11 compile farm running, and you ask about nullptr :p
18:42<yellyFish>really? didn't know that
18:43<LordAro>well, we do
18:43<LordAro>it's just not complete
18:45<nielsm>https://www.tt-forums.net/viewtopic.php?p=1214289#p1214289 <- manual nighttime builds :P
18:47<@planetmaker>:)
18:47<frosch123>halloween release
18:47<nielsm>time to play classic Trains vs Zombies again?
18:48<@planetmaker>let's add a few showels of coal then before we start :)
18:55<frosch123>https://www.tt-forums.net/viewtopic.php?t=4039 <- i underestimated your age :)
18:56<LordAro>positively ancient
19:02<@planetmaker>jfs = niels?
19:03<frosch123>"danish" is a unique identifier, right?
19:03<@planetmaker>@seen Bjarni
19:03<@DorpsGek>planetmaker: Bjarni was last seen in #openttd 7 years, 3 weeks, 5 days, 22 hours, 44 minutes, and 8 seconds ago: <Bjarni> heh
19:03<@planetmaker>more or less :)
19:09<nielsm>planetmaker yes
19:16-!-Supercheese [AdiIRC@50.37.119.244] has quit [Quit: Valete omnes]
19:22<@planetmaker>I guess I fell for the same misjudgement as froshc
19:25<@planetmaker>he, a whopping 12 years in the forums without any posting in between
19:26<nielsm>and I'll let you know that for a very long time (until about 1-2 years ago) I absolutely refused to touch anything OTTD at all, for moral reasons (essentially theft/reappropriation of IP)
19:27<nielsm>but decided recently to adopt a ship of theseus model, in that most things have been replaced by now making it a different same thing
19:27<nielsm>I was owner of #tycoon on quakenet for several years too :)
19:29<@planetmaker>I wouldn't know that... never been on that network. I guess I dropped-in here somewhen in the ~2006 and got sucked-into :D
19:30<@planetmaker>probably I read forum already before that w/o registering
19:30<frosch123>there was a quakenet time before freenode?
19:30<frosch123>or was tycoon on quakenet and openttd on freenode?
19:31<nielsm>#tycoon was originally on quakenet, I think #openttd was too for a little while but not sure
19:31<nielsm>but for the above reasons #tycoon had a strict "do not talk about ottd" policy
19:32<frosch123>oh, indeed, my logs from 2007-05-16 say quakenet
19:33<frosch123>ottd was already on oftc at that tiem
19:34-!-ST2 [~ST2@server02.btpro.nl] has left #openttd []
19:35-!-ST2 [~ST2@server02.btpro.nl] has joined #openttd
19:35-!-ST2 is "ST2" on #openttd #/r/openttd
19:35<ST2>lazy way to check if channel was still with +R
19:35<ST2>:D
19:42<nielsm>wow, look at the time
19:42<nielsm>gn
19:42<@planetmaker>night
19:50-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has quit [Ping timeout: 480 seconds]
20:16-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
20:16-!-snail_UES_ is "Jacopo Coletto" on #openttd
20:17-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
20:23-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
20:47-!-Progman [~progman@p548D9430.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
21:35-!-yellyFish [~yellyfish@181-163-152-57.baf.movistar.cl] has quit [Ping timeout: 480 seconds]
21:39-!-Thedarkb1-X40 [~beno@86-42-116-106-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Ping timeout: 480 seconds]
21:42-!-Hobbyboy [Hobbyboy@0001fb73.user.oftc.net] has quit [Read error: Connection reset by peer]
21:43-!-Hobbyboy [Hobbyboy@0001fb73.user.oftc.net] has joined #openttd
21:43-!-Hobbyboy is "Andrew" on #perl #openttd #oftc #moocows #linode @#YourBNC
22:32-!-Hobbyboy [Hobbyboy@0001fb73.user.oftc.net] has quit [Read error: Connection reset by peer]
22:32-!-Hobbyboy [Hobbyboy@0001fb73.user.oftc.net] has joined #openttd
22:32-!-Hobbyboy is "Andrew" on #perl #openttd #oftc #moocows #linode @#YourBNC
---Logclosed Thu Nov 01 00:00:50 2018