Back to Home / #openttd / 2019 / 03 / Prev Day | Next Day
#openttd IRC Logs for 2019-03-12

---Logopened Tue Mar 12 00:00:08 2019
00:03-!-supermop_Home [~user@pool-71-105-225-37.nycmny.fios.verizon.net] has quit [Remote host closed the connection]
01:29-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
01:35-!-Smedles [~quassel@61-245-155-93.3df59b.adl.nbn.aussiebb.net] has quit [Ping timeout: 480 seconds]
01:37-!-Smedles [~quassel@61-245-155-93.3df59b.adl.nbn.aussiebb.net] has joined #openttd
01:37-!-Smedles is "Paul Smedley" on #openttd
01:50-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
01:50-!-Supercheese is "Caseum" on #openttd
02:52-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
02:52-!-andythenorth is "andythenorth" on #openttd
02:57<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7365: Fix: Fluidsynth should not try to lock sample data in memory https://git.io/fhhNw
02:58<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7365: Fix: Fluidsynth should not try to lock sample data in memory https://git.io/fhjV2
03:05<DorpsGek_II>[OpenTTD/website] andythenorth commented on pull request #65: Add: Monthly Dev Post of April 2019 https://git.io/fhjVP
03:32-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Quit: Valete omnes]
03:39<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7365: Fix: Fluidsynth should not try to lock sample data in memory https://git.io/fhjwe
03:41<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7366: Add: List recently executed commands in crashlog output. https://git.io/fhjwU
03:43<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7366: Add: List recently executed commands in crashlog output. https://git.io/fhjwT
04:28<andythenorth>oof
04:29<andythenorth>cargo colours :P
04:29<andythenorth>coal, coke, coal tar, carbon black
04:29<andythenorth>all currently black :P
04:54-!-m3henry [~oftc-webi@62.232.243.6] has joined #openttd
04:54-!-m3henry is "OFTC WebIRC Client" on #openttd
04:56<andythenorth>hmm FIRS pax is over-priced
04:56<andythenorth>relative to original game
05:01<andythenorth>wait wat, price factor is a dword?
05:01*andythenorth teddy bear programming
05:06<@peter1138>Cargo colours eh
05:10<andythenorth>rgb?
05:10<andythenorth>I have 73 cargos defined, and FIRS has guards to make them all have unique colours and price factors :P
05:10<andythenorth>to avoid errors
05:10<andythenorth>running out of colours :P
05:15<@peter1138>unique price factors?
05:16<andythenorth>so that they don't overlap on the cargo payment chart
05:16<@peter1138>o_O
05:16<andythenorth>prop 12
05:16<@peter1138>I don't think that's a huge issue. You can filter them.
05:16-!-Xaroth [~Xaroth@00017153.user.oftc.net] has joined #openttd
05:16-!-Xaroth is "Xaroth Brook" on #openttd +#openttd.dev
05:16<@peter1138>Obviously you don't want them all the same.
05:16<andythenorth>it bugs me, and isn't hard to solve until now
05:16<Xaroth>https://opensource.googleblog.com/2019/03/introducing-season-of-docs.html << Something for OpenTTD?
05:17<andythenorth>I can defeat the guard I wrote in the compile because nml allows floats :P
05:17<andythenorth>but the result on the chart of e.g. 131 and 131.5 is overlap :D
05:19<andythenorth>wonder why I set pax so high though, it's about £105 where OpenTTD base set is about £74
06:34<DorpsGek_II>[OpenTTD/website] PeterN commented on pull request #65: Add: Monthly Dev Post of April 2019 https://git.io/fhjKG
06:34<LordAro>AmigoOS is a much better name
06:34<@peter1138>:)
06:40<Eddi|zuHause>the paragraph about passenger generation doesn't quite fit the theme of the other paragraphs, which is performance optimizations
06:46<Eddi|zuHause>and the paragraph about catchment area could use a screenshot
06:55<@peter1138>planetmaker, https://jenkins.openttdcoop.org/job/opengfx/204/console < seems it built the wrong branch.
07:36<planetmaker>hm, interesting
07:44<@peter1138>TrueBrain, do we want to compile with -Wunused-value (CMake branch does it)?
07:45<LordAro>config.lib explicitly disables it
07:45<@peter1138>Ah.
07:45<LordAro>perfect time to review it, of course
07:46<@peter1138>We just have these very weird constructs that do increments based on conditionals.
07:46<LordAro>oh wait, only with clang
07:46<@peter1138>I can cast to void to ignore it, update the construct to something... less weird, or just allow unused-values.
07:47<LordAro>i'd prefer option 2 :)
07:47<@peter1138>Yes, me too.
07:47<@peter1138>(val = 0, score < 170) || (val++, score < 350) || (....)
07:47<@peter1138>It's even ambiguous.
07:48<LordAro>ew
07:48<Eddi|zuHause>i never really liked these constructs
07:48<LordAro>oh, i remember looking at those before
07:48<@peter1138>They strike me as some kind of assembly-code-left-over.
07:48<LordAro>highscore tables, right?
07:48<@peter1138>This one is for Company HQ growing.
07:49<Eddi|zuHause>i've seen these in the station rating calc
07:49<@peter1138>Yes, there too.
07:50<Eddi|zuHause>but if you rewrite them with if, you might get deep nesting {}
07:50<Eddi|zuHause>or rely on the fact that the conditions are incremental
07:51<Eddi|zuHause>monotonous
07:51<Eddi|zuHause>however you want to call it
07:51<Eddi|zuHause>"if one condition is false, all following conditions are also false"
07:53<LordAro>that particular construct dates from r1, certainly
07:56<Eddi|zuHause>doesn't surprise me
08:00-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Ping timeout: 480 seconds]
08:01<@peter1138>https://paste.openttdcoop.org/pbwfwbvef
08:02-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
08:02-!-snail_UES_ is "Jacopo Coletto" on #openttd
08:02<@peter1138>You could do the if without lamba but then you'd need if (x) { } else if (y) { } else if (z) { } ...
08:03<@peter1138>Or
08:03<Eddi|zuHause>https://paste.openttdcoop.org/pwqxrpiro
08:04<@peter1138>https://paste.openttdcoop.org/pc2lyz98q
08:04<@peter1138>Yes
08:04<@peter1138>Same solution, different section;
08:04<Eddi|zuHause>i'm not 100% sure if i haven't changed the semantics
08:04<@peter1138>I think you have.
08:04<LordAro>:)
08:05<@peter1138>Hmm, no
08:05<@peter1138>I changed the order but didn't need to.
08:05<Eddi|zuHause>order shouldn't be relevant
08:05<@peter1138>Yeah that's probably the best way for conciseness.
08:05<@peter1138>No I realised :)
08:07<@peter1138>If it was perl you'd do ... well, one of 2 million solutions.
08:07<@peter1138>But...
08:09<LordAro>https://godbolt.org/z/Vij81z godbolt comparison
08:10<Eddi|zuHause>i don't think i follow any of that
08:10<LordAro>i think i like func3 the best
08:10-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
08:10-!-andythenorth is "andythenorth" on #openttd
08:11<@peter1138>LordAro, no optimization flag?
08:11<LordAro>you can add them yourself
08:11<@peter1138>Well, yes.
08:11<LordAro>and i forgot :p
08:11<@peter1138>func2 is very literal
08:11<@peter1138>(with optimization)
08:12<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z opened pull request #7370: Cleanup: Remove questionable syntax in station rating calculation https://git.io/fhjil
08:13<@peter1138>Hmm, func3 is too.
08:13<@peter1138>func1 gets optimized away nicely
08:16<@peter1138>Weird, their clang doesn't compile func2
08:17<@peter1138>Verison 6+ does
08:17<@peter1138>but I'm on 3.8.1 which works with it.
08:20<Eddi|zuHause>oh, i forgot one instance
08:21<@peter1138>Don't look at src/rail_cmd.cpp:2288 ;)
08:22<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax in station rating calculation https://git.io/fhjil
08:24<Eddi|zuHause>do we want to do them one-by-one or all in one PR? :)
08:25<Eddi|zuHause>there's probably a better/cleaner trick for rail_cmd.cpp:2288
08:27<@peter1138>Yeah, probably
08:28-!-Heiki [~hp@taimen.sr2.fi] has joined #openttd
08:28-!-Heiki is "Heikki Piirainen" on #debian-offtopic #openttd #debian-next #debian
08:37<LordAro>Eddi|zuHause: one PR, imo
08:37<@peter1138>One PR, separate commits.
08:49-!-Flygon [~Flygon@114-198-109-47.dyn.iinet.net.au] has quit [Quit: A toaster's basically a soldering iron designed to toast bread]
08:55-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: snail_UES_]
08:55-!-octernion [~octernion@206.223.172.50] has joined #openttd
08:55-!-octernion is "octernion" on #openttd
08:59<Eddi|zuHause>ok, i definitely messed that one up :p
08:59-!-octernion [~octernion@206.223.172.50] has quit []
09:00<@peter1138>?
09:01-!-octernion [~octernion@206.223.172.50] has joined #openttd
09:01-!-octernion is "octernion" on #openttd
09:01<Eddi|zuHause>https://ibin.co/4Zw4S3my1aTR.png
09:04<LordAro>:D
09:04<LordAro>i see no problems here
09:08<Eddi|zuHause>i'm not entirely sure where i went wrong: https://paste.openttdcoop.org/pkwl0wrxh
09:09<@peter1138>Ah you changed it completely.
09:09<@peter1138>You've got confused by the semantics of the existing construct.
09:10<Eddi|zuHause>probably
09:10<@peter1138>TRACK_BIT_HORZ is rti->base_sprites.track_ns + 1
09:10<Eddi|zuHause>oh?
09:10<@peter1138>I think
09:10<@peter1138>Hmm, I am getting confused :P
09:11<@peter1138>Stupid construct.
09:11<Eddi|zuHause>yeah. that's why we're replacing it :p
09:11<Eddi|zuHause>i need the original code to compare...
09:11*LordAro hands Eddi|zuHause ttd.exe
09:12<@peter1138>Eddi|zuHause, the order of the original is not TRACK_ order.
09:12<@peter1138>TRACK_BIT_X comes before TRACK_BIT_Y
09:12<Eddi|zuHause>that's probably stupid :)
09:12<@peter1138>That's TTD original :p
09:12<Eddi|zuHause>was a silly assumption of mine that this would be consistent :p
09:14-!-Samu [~Ricardo@pa4-84-91-142-34.netvisao.pt] has joined #openttd
09:14-!-Samu is "realname" on #openttd
09:14<Eddi|zuHause>ok, needs an array like the other one, and reordered
09:14<Samu>hi
09:16<Eddi|zuHause>also, CROSS is apparently not a junction
09:18<Eddi|zuHause>ok, slightly better, the junctions are still off
09:23<Eddi|zuHause>hm, the track sprites are right, but the junction ground is wrong
09:29<Eddi|zuHause>ah, i see the error
09:29<Eddi|zuHause>i think
09:29-!-octernion [~octernion@206.223.172.50] has quit [Quit: octernion]
09:30<Eddi|zuHause>seems right now
09:30<DorpsGek_II>[OpenTTD/OpenTTD] stale[bot] commented on issue #6315: Advanced Fences: (with patch) https://git.io/fhjXt
09:31-!-octernion [~octernion@206.223.172.50] has joined #openttd
09:31-!-octernion is "octernion" on #openttd
09:32<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax in station rating calculation https://git.io/fhjil
09:33<Eddi|zuHause>not sure if it's actually good :)
09:33<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjXY
09:34<@peter1138>That is why it hasn't really been changed :)
09:43-!-supermop_work [~supermopw@38.105.230.30] has joined #openttd
09:43-!-supermop_work is "A CIRC user" on #openttd
09:43<@peter1138>Hmm, 737 Max 8 banned from UK airspace.
09:44-!-supermop_work_ [~supermopw@38.105.230.30] has joined #openttd
09:44-!-supermop_work_ is "A CIRC user" on #openttd
09:44<Eddi|zuHause>yeah, and a few other countries
09:44<Eddi|zuHause>because 2 crashes is now a series
09:45<Eddi|zuHause>which might be true :)
09:46<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
09:51<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
09:51-!-supermop_work [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
09:56<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
09:57<Samu>supermop_work_, hi
09:59<Eddi|zuHause>there's another one in order_gui.cpp:398
10:00<@peter1138>Eddi|zuHause, i would recommend leaving the rail one as it is.
10:05<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
10:06<Eddi|zuHause>any particular reason? i mean there's a dozen different ways to do this :)
10:11<DorpsGek_II>[OpenTTD/OpenTTD] GabdaZM updated pull request #7369: Add: k-d tree element checker function https://git.io/fhjZB
10:14<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhj13
10:14<@peter1138>Eddi|zuHause, because it's already a partial look up table.
10:14<@peter1138>Just not an array.
10:14<@peter1138>I think it might be better to redesign base_sprites.
10:15<@peter1138>Fortunately base_sprites is not used by newgrf railtypes.
10:16<Eddi|zuHause>but there are pre-railtypes NewGRFs?
10:18<andythenorth>do we need them?
10:18<Eddi|zuHause>yes.
10:19<andythenorth>when does stuff get to die?
10:19<Eddi|zuHause>never.
10:19<andythenorth>well that's a definitive answer :P
10:22<@peter1138>But yeah, we look up some base values in that struct. Then do some calculations.
10:22<@peter1138>That seems pointless to me.
10:23<@peter1138>I think changing that is out of scope of your PR
10:23<Eddi|zuHause>yes ;)
10:23<@peter1138>So I suggest to not make the changes there that you have.
10:23<Eddi|zuHause>ok, i scrap that then.
10:27<DorpsGek_II>[OpenTTD/OpenTTD] M3Henry requested changes for pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhj1w
10:28<@peter1138>Well it's not HTML/CSS :)
10:28<Eddi|zuHause>?
10:28<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhj1K
10:28<@peter1138>m3henry's comment, "mixed code and data"
10:29<Eddi|zuHause>huh, i pressed F5 and the comments were gone
10:29<@peter1138>Yup, same.
10:30<m3henry>:s
10:30<@peter1138>And now they're back.
10:30<@peter1138>std::lower_bound eh
10:30<Eddi|zuHause>that sounds like overkill?
10:30<m3henry>It's the the generic algorithm which is being manually unrolled by the code
10:30<@peter1138>Probably.
10:30<m3henry>Just express the intent
10:31<@peter1138>I'm not sure how you'd implement it that way./
10:33<Eddi|zuHause>yeah, the description lower_bound sounds like nothing we need here
10:33<@peter1138>I think std::lower_bound is working the opposite way.
10:33<@peter1138>We have one value.
10:33<@peter1138>And we're comparing it against a range.
10:35*m3henry is making example
10:36<@peter1138>Thanks.
10:42<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
10:44<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjMT
10:44-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has joined #openttd
10:44-!-nielsm is "Niels Martin Hansen" on #openttd
10:45<@peter1138>Github having issues?
10:46<@peter1138>"This page is taking way too long to load."
10:46<@peter1138>Hmm
10:46<Eddi|zuHause>i noticed dorpsgek messages taking a long time also
10:46<m3henry>https://pastebin.com/5BDxsYUf
10:46<m3henry>Turns out upper_bound was the right one
10:46<m3henry>But the algo is the same
10:47<m3henry>It's written verbosely as well
10:47-!-Wormnest [~Wormnest@35.136.176.177] has joined #openttd
10:47-!-Wormnest is "Wormnest" on #openttd
10:48<m3henry>could be written as return std::upper_bound(std::begin(bounds), std::end(bounds), rating) - std::begin(bounds)
10:48<@peter1138>Ok for that particular case.
10:50<Eddi|zuHause>https://godbolt.org/z/t_Dtvp <-- doesn't seem to optimize very well
10:51<@peter1138>It's hardly critical performance code path here...
10:51<@peter1138>But I don't think it's an improvement.
10:52<m3henry>I think most of that is iostream stuff
10:52<m3henry>owait
10:52<Eddi|zuHause>i removed that line
10:53<@peter1138>https://paste.openttdcoop.org/pc2lyz98q
10:53<m3henry>Oh I see, the compiler has unrolled the binary search because there are only 4 elements of the array
10:53<@peter1138>^ top entry in that list is more readable for me.
10:53<@peter1138>And anyway
10:54<@peter1138>This is the only case where we're using the result as an index.
10:54<@peter1138>In the other cases, the different things happen.
10:54<m3henry>That was the only caseI was referring to
10:54<m3henry>Don't know how to comment on specific diff
10:54<Eddi|zuHause>this is what we germans call "shooting cannons at sparrows"
10:56<@peter1138>m3henry, in the "review changes" tab, you can click on any line of text to comment.
10:56<@peter1138>err
10:56<@peter1138>"files changed" tab, sorry
10:56<@peter1138>oh, click on the blue [+]
10:57<m3henry>Removing the #include <iostream> line custs it down somewhat
10:57<@peter1138>I think Eddi|zuHause's change is better
10:57<@peter1138>It is simply a clean up, and fixes an issue with a return value being ignored.
11:00<Eddi|zuHause>m3henry: here were the other options we considered https://godbolt.org/z/rLeIP1
11:01<m3henry>https://godbolt.org/z/X09A79
11:02<@peter1138>Btw, it's not a sprite index.
11:03<Eddi|zuHause>that's not really the point :)
11:03<m3henry>:)
11:03<@peter1138>No but for clarirty ;)
11:03<@peter1138>-r
11:03<DorpsGek_II>[OpenTTD/OpenTTD] LordAro commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjMa
11:05<Eddi|zuHause>github ate the comment again :/
11:07<@peter1138>wouldn't be awful if this was turned into a ternary, imo
11:07<@peter1138>Is the comment.
11:07<@peter1138>Reference to bus vs truck
11:07<andythenorth>bad GH :P
11:08<Eddi|zuHause>can't really align the "break"s with a ternary :/
11:09<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
11:09<@peter1138>They're not aligned at the moment.
11:10<Eddi|zuHause>i mean, i have 3 aligned ones, but if i would align them with the 4th (after the ternary), then that would be a silly number of spaces
11:16<m3henry>http://quick-bench.com/bIE3UWH6DSzb-tgHB0Ffewz7QqU do1 wins, just about
11:18-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
11:19<Eddi|zuHause>m3henry: doesn't compile if i set it to C++11
11:19-!-m1cr0man [~m1cr0man@ns312254.ip-188-165-194.eu] has quit [Quit: "\\//," - Spock]
11:20<m3henry>removing constexpr fixes that http://quick-bench.com/WhmW_wsYn2ZOwT5WH-zHYR-al2c
11:22<Eddi|zuHause>and gcc complains about lack of upper_bound
11:24<DorpsGek_II>[OpenTTD/OpenTTD] glx22 updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
11:24<@peter1138>I still think in this case it is not desirable.
11:26<Eddi|zuHause>i'm not sure if i'm using this tool right, but it seems to completely fail on GCC... if i replace upper_bound by lower_bound to make it compile, then it takes 1700000 times longer
11:27<m3henry>I think the test case is being optimized away as the disassembly is empty
11:28<@peter1138>Useful :p
11:29<Eddi|zuHause>also your "if (i>1000) i=0" seems to be in the wrong place
11:29<@peter1138>If you don't optimize it, the simple if block is superior.
11:30<Eddi|zuHause>that's... expected?
11:30<Eddi|zuHause>but also completely useless information :)
11:30<@peter1138>Less useless than having everything optimized away.
11:30<m3henry>Forcing it to not optimize gets this http://quick-bench.com/E77FPoBzfRhxTTpRscDgD0uznQs
11:32<Eddi|zuHause>that seems like more plausible results :)
11:33<@peter1138>Annnnyway.
11:36<m3henry>woah, even faster is std::find_if http://quick-bench.com/L4_Futc0uB1bzklVBE9OpNRICAE
11:39<@peter1138>Yeah but is it really clearer than the existing code?
11:40<m3henry>Must admit that lambdas aren't always the easiest to read
11:41<m3henry>wrapper function called linear_upper_bound?
11:41<Eddi|zuHause>i don't think find_if produces corrrect results
11:44<Eddi|zuHause>i mean if you look at https://godbolt.org/z/ddiKPv the find_if version only ever compares against 170
11:45<m3henry>Oh the optimizes is smart
11:47<m3henry>It should be >=
11:49<Eddi|zuHause>that looks way more plausible
11:49<Eddi|zuHause>still, i agree with peter1138, that it's not really clear to read
11:50<m3henry>Fair 'nuff
11:51<Eddi|zuHause>it's certainly more pythonic :)
11:53<Eddi|zuHause>could maybe be put into a wrapper function
11:53<nielsm>before choosing an algorithm based on what clang and/or gcc turns it into, make sure you also check what msvc turns it into :)
11:55<@peter1138>We're only touching this code because it fails to compile with -Wunused-value
11:55-!-supermop_work_ [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
11:56<@peter1138>Eddi|zuHause, your IsBus ternary as too many closing brackets.
11:56<Eddi|zuHause>oops
11:56-!-synchris [~synchris@139.138.202.72] has joined #openttd
11:56-!-synchris is "Synesios Christou" on #openttd
11:56-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:81a4:1cb0:779f:dc52:9de9] has quit [Ping timeout: 480 seconds]
11:57<Eddi|zuHause>i should maybe be making real pasta instead of copy pasta
11:57<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
11:58<Eddi|zuHause>nielsm: dunno, godbolt seems to output a lot of unreadable nonsense when switching to msvc :p
11:58<nielsm>msvc tends to add a ton of linkable symbols that are not actually used
11:59<@peter1138>Eddi|zuHause, town_gui.cpp:158
11:59<nielsm>any function inline-expanded also gets a non-inline linkable version
11:59<Eddi|zuHause>peter1138: ah, my grep-foo failed to find that because of the comments :p
12:02<@peter1138>I'm tempted, for the rail one, to do the (void)( ... ); trick :p
12:03<@peter1138>Or just do it properly :)
12:08<nielsm>http://classicprogrammerpaintings.com/post/183402738622
12:09<LordAro>nielsm: :D
12:17<Eddi|zuHause>nielsm: not helping :p
12:20-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:81a4:50d5:b1fd:bca5:2e3a] has joined #openttd
12:20-!-Gustavo6046 is "Non dico nomen." on #openttd #oftc #moocows
12:25-!-sla_ro|master [~sla.ro@84.117.88.126] has joined #openttd
12:25-!-sla_ro|master is "slamaster" on #sla #openttd
12:40-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has joined #openttd
12:40-!-andythenorth is "andythenorth" on #openttd
12:50<Eddi|zuHause>i can't seem to make "put the find_if in a wrapper function" work...
12:54<Eddi|zuHause>https://paste.openttdcoop.org/pqqdntpp9 could have been nice, but doesn't compile :/
12:55<nielsm>yeah you can't template on an array value like that, afaik
12:56<Eddi|zuHause>came across this on the way: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4198.html
12:56-!-Progman [~progman@p4FD664FB.dip0.t-ipconnect.de] has joined #openttd
12:56-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttd
12:57<Eddi|zuHause>but i can also not pass the array as a parameter, because then begin/end don't work
12:58<nielsm>template <typename T, typename It> static inline ptrdiff_t IndexOf(const T &value; It begin, It end) { ... }
12:59<nielsm>you'd have to pass begin/end of the range like that
12:59-!-HerzogDeXtEr [~farci@2a02:810a:8a80:4250:ac:5287:718:e6ed] has joined #openttd
12:59-!-HerzogDeXtEr is "purple" on #openttd
12:59<Eddi|zuHause>yeah, but that kinda defeats the point of wrapping it :p
13:00<Eddi|zuHause>means the only way out would be a macro, and i really don't like to go down that path
13:05<@peter1138>https://paste.openttdcoop.org/pszxkjpt6
13:05<@peter1138>^ KISS
13:05<Eddi|zuHause>i know... but i wanted to try this :p
13:07<nielsm>some things are not worth abstracting :P
13:07-!-rocky11384497 [~rocky1138@104.158.175.138] has quit [Ping timeout: 480 seconds]
13:08<@peter1138>I don't think the comments there add anything any more.
13:08<@peter1138>I assume the RATING_x was raw numbers at the time the comments were added.
13:08<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
13:08-!-rocky11384497 [~rocky1138@104.158.175.138] has joined #openttd
13:08-!-rocky11384497 is "Your Mom" on #openttd
13:09<Eddi|zuHause>but i think a range selection like this could simplify a bunch of code in various places
13:10<@peter1138>https://paste.openttdcoop.org/pw5lwmyfg
13:10<@peter1138>^^ but that one could do with comments.
13:10<@peter1138>It's not quite how I'd envisaged "doing it properly" :p
13:10-!-HerzogDeXtEr [~farci@2a02:810a:8a80:4250:ac:5287:718:e6ed] has quit [Ping timeout: 480 seconds]
13:12-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Remote host closed the connection]
13:12-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has joined #openttd
13:12-!-Thedarkb-T60 is "realname" on #openttd #oolite
13:13-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
13:13-!-HerzogDeXtEr is "purple" on #openttd
13:14-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Remote host closed the connection]
13:14-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has joined #openttd
13:14-!-Thedarkb-T60 is "realname" on #openttd #oolite
13:15<nielsm>https://github.com/OpenTTD/OpenTTD/pull/7366 I'm a bit +/- 0 on whether this needs more, or should just be approved
13:16<Eddi|zuHause>peter1138: i think the "if() {}" violates code style?
13:17<Eddi|zuHause>not sure if that would actually reduce readability, though...
13:17<@peter1138>There's one place where it's done :/
13:17<@peter1138>src/newgrf_station.cpp
13:18<Eddi|zuHause>yeah, i see why.
13:18<@peter1138>if (!HasBit(_svc.valid, 0)) { _svc.v40 = GetPlatformInfoHelper(this->tile, false, false, false); SetBit(_svc.valid, 0); }
13:18<nielsm>you may as well make that one a single large table, I think?
13:18<@peter1138>if it was a lambda it could be a return, but...
13:18<Eddi|zuHause>nielsm: it's a bit complicated
13:19<@peter1138>Yeah, it could be a table with 63 entries.
13:19<Eddi|zuHause>peter1138: yeah, i was about to suggest turning my original function into a lambda, when you suggested i should drop it
13:20<@peter1138>https://github.com/OpenTTD/OpenTTD/commit/a0b25cec50f1dc6ba97ffed77e32340002c43279
13:20<@peter1138>^ is somewhat different.
13:22<@peter1138>https://newgrf-specs.tt-wiki.net/images/grfwiki/8/85/Rails_combined.png
13:22<@peter1138>Layout of the table
13:22<nielsm>or take the above switch and wrap in a function, then the image = x; break; sequences can be replaced with a return
13:25<@peter1138>I think if you make a big table, someone will try to convert it to an algorithM :p
13:25<Eddi|zuHause>i wonder if my function would get simpler if i swapped the return (junction) and the reference parameter (image)
13:26<Eddi|zuHause>the table would get loads of duplicate entries for the junctions
13:26<Eddi|zuHause>and you still wouldn't get the "is this a junction" information
13:28<@peter1138>https://paste.openttdcoop.org/procqh74n
13:29<@peter1138>Eddi|zuHause, quite.
13:29<m3henry>Eddi|zuHause: did you mean template <typename T, typename V> std::size_t IsInsideRanges(T const& container, V rating) ?
13:29-!-octernion [~octernion@206.223.172.50] has quit [Quit: octernion]
13:29<nielsm>yay for closure functions called once
13:29<Eddi|zuHause>m3henry: what would that solve?
13:29<@peter1138>All to avoid `if () { }` :p
13:30<m3henry>You said it wouldn't compile?
13:30-!-HerzogDeXtEr1 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
13:30-!-HerzogDeXtEr1 is "purple" on #openttd
13:30<m3henry>I believe non-typename parameters as auto is a c++17 feature
13:30<Eddi|zuHause>nielsm: i tried f(T x, T b[])
13:31-!-octernion [~octernion@206.223.172.50] has joined #openttd
13:31-!-octernion is "octernion" on #openttd
13:31<Eddi|zuHause>err
13:31<Eddi|zuHause>m3henry:
13:31<Eddi|zuHause>m3henry: but then begin/end cannot be called on a T[]
13:31<m3henry>can
13:32<m3henry>You did <typename T, array_like> f(T&)
13:33<m3henry>You did <typename T, array&> f(T) sorry
13:33-!-HerzogDeXtEr2 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
13:33-!-HerzogDeXtEr2 is "purple" on #openttd
13:34<Eddi|zuHause>m3henry: the compile failure was because if i pass a local array, it complains about that array having no linkage
13:36-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Ping timeout: 480 seconds]
13:38<m3henry>I'll look again later xD
13:38-!-m3henry [~oftc-webi@62.232.243.6] has quit [Quit: Page closed]
13:40-!-HerzogDeXtEr1 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Ping timeout: 480 seconds]
13:45<TrueBrain>peter1138: I think CMake enables that by default .. can't remember I did anything with that tbh
13:45<@peter1138>TrueBrain, it's fine, we're just considering fixing the code.
13:46<TrueBrain>yeah, removing those weird statements would really help :)
13:51<@peter1138>Eddi|zuHause, hmm... if ( ... ) { ... ; break; }
13:51<@peter1138>Certainly looks better then if ( ... ) {\n ...; \n} else if ( ...
13:51<Eddi|zuHause>yes
13:55-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
13:55-!-HerzogDeXtEr is "purple" on #openttd
13:57-!-HerzogDeXtEr1 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
13:57-!-HerzogDeXtEr1 is "purple" on #openttd
13:58-!-HerzogDeXtEr2 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Ping timeout: 480 seconds]
14:04-!-supermop_work_ [~supermopw@38.105.230.30] has joined #openttd
14:04-!-supermop_work_ is "A CIRC user" on #openttd
14:05-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
14:05-!-Wolf01 is "Wolf01" on #openttd
14:05-!-HerzogDeXtEr1 [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Read error: Connection reset by peer]
14:05-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Read error: No route to host]
14:05<@peter1138>https://paste.openttdcoop.org/p6kb84m7i
14:05<@peter1138>^ version with comments.
14:05<Wolf01>o/
14:05<@peter1138>Er, ignore the lambda bit, I guess.
14:06-!-supermop_work__ [~supermopw@38.105.230.30] has joined #openttd
14:06-!-supermop_work__ is "A CIRC user" on #openttd
14:06-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has joined #openttd
14:06-!-HerzogDeXtEr is "purple" on #openttd
14:06<TrueBrain>but that is the best part!
14:07<andythenorth>right let's figure out what's wrong with GS
14:07<Eddi|zuHause>i tried a similar thing https://paste.openttdcoop.org/pdinihf3j and was wondering about where to put the CROSS
14:11-!-Wormnest [~Wormnest@35.136.176.177] has quit [Ping timeout: 480 seconds]
14:12-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Remote host closed the connection]
14:12-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has joined #openttd
14:12-!-Thedarkb-T60 is "realname" on #openttd #oolite
14:13-!-supermop_work_ [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
14:15<@peter1138>Eddi|zuHause, Yeah...
14:16<@peter1138>Maybe we should fill out the base_sprites instead :)
14:16<@peter1138>I'm gonna try it
14:16-!-octernion [~octernion@206.223.172.50] has quit [Quit: octernion]
14:20-!-octernion [~octernion@206.223.172.50] has joined #openttd
14:20-!-octernion is "octernion" on #openttd
14:25-!-glx [kvirc@000128ec.user.oftc.net] has joined #openttd
14:25-!-mode/#openttd [+v glx] by ChanServ
14:25-!-glx is "Loïc GUILLOUX" on +#openttd
14:28<@peter1138>Well, that works but doesn't really gain anything.
14:34<Wolf01>https://img-9gag-fun.9cache.com/photo/aqK6XYj_460s.jpg HA!
14:34<andythenorth>cryo tank wagons? o_O https://www.vtg.com/wagon-hire/our-fleet/g91111d/
14:35<andythenorth>for Horse
14:38<supermop_work__>yo
14:41<andythenorth>yo supermop_work__
14:44-!-m3henry [~m3henry@host-212-139-212-35.static.as9105.net] has joined #openttd
14:44-!-m3henry is "realname" on #openttd
14:56<@peter1138>YO
14:57<andythenorth>YO YO
14:59<supermop_work__>so what's going on
15:00<@peter1138>Well...
15:02<@peter1138>https://github.com/OpenTTD/OpenTTD/commit/ac87f5c9d82aa1c3e7f4eda7dce719262bd08fe1
15:02<@peter1138>I'm pretty sure that does not add anything beneficial.
15:04<@peter1138>https://paste.openttdcoop.org/pdinihf3j < simpler, does the job.
15:04<@peter1138>But... numbers ;(
15:05<Samu>uhm, I have a problemo
15:06<Samu>https://imgur.com/J5YHSL9
15:06<Samu>£10,000 k
15:06<Samu>represented like that is ugly
15:07<Samu>is it fixable?
15:07<nielsm>that's text layout, it's probably complicated
15:07<@peter1138>Um.
15:08<@peter1138>What's the string?
15:08<@peter1138>7,338 days is kinda shit too :p
15:08<@peter1138>But I guess that's.. hmm.
15:08<@peter1138>20 years and 38 days?
15:08<nielsm>and is £10,000k a confusing way to write 10 million?
15:08<@peter1138>That's an odd representation.
15:09<@peter1138>But yes, that's why I asked what the string is :-)
15:09<@peter1138>Samu, is it your own GS? One on bananas?
15:12<DorpsGek_II>[OpenTTD/OpenTTD] PeterN approved pull request #7368: Codechange: Update town sign on population change only when population is shown. https://git.io/fhjQt
15:12<DorpsGek_II>[OpenTTD/OpenTTD] PeterN merged pull request #7368: Codechange: Update town sign on population change only when population is shown. https://git.io/fhj3k
15:13<@peter1138>I guess he still doesn't get it with commit messages :-)
15:13<@peter1138>https://github.com/OpenTTD/OpenTTD/pull/7364 < anything blocking that now?
15:14<@peter1138>^ it kinda needs a broken newgrf as a test case. But hey.
15:14<Samu>it's my gs
15:14<Samu>£10,000 k is fine, but it's in 2 lines :(
15:14<Samu>the string is...
15:15<Samu>gonna look
15:15<Samu>STR_GOAL_REACHED : {WHITE}{COMMA} days{BLACK} after inauguration, {WHITE}{COMPANY}{BLACK} {COMPANY_NUM} was first to reach a company value of {GREEN}{CURRENCY_SHORT}{BLACK}. {}{}Game is now paused. {}{}Press {YELLOW}Continue{BLACK} to resume game.
15:15<@peter1138>Ok
15:15<@peter1138>{CURRENCY_SHORT}
15:16<@peter1138>Yeah, that's odd.
15:17<nielsm>might need a ZWNBSP around the thousand separator, or use another character for thousand separator that does not allow line breaks around it
15:17<Samu>GSGoal.Question(25, GSCompany.COMPANY_INVALID, GSText(GSText.STR_GOAL_REACHED, this.goal_company.days_taken, this.goal_company.c_id, this.goal_company.c_id, this.goal_company.goal_value), GSGoal.QT_INFORMATION, GSGoal.BUTTON_CONTINUE);
15:18<nielsm>(if any of the unicode layout libraries want to be trusted to not do weird stuff)
15:19<Samu>it is on bananas
15:19<@peter1138>Yeah, so...
15:19<@peter1138>Where do we format text?
15:22<@peter1138>NBSP is already used for the space before the "k"
15:23<nielsm>strings.cpp has way too many things in it
15:23<@peter1138>Somewhat.
15:24<@peter1138>FEFF? Hmm
15:32<TrueBrain>right .. time to see if I can get regression ported to CMake
15:32<TrueBrain>this will be fun :D (really?)
15:37<@peter1138>Hmm, well, FEFF doesn't wor k:p
15:37<nielsm>actually it should not be ZWNBSP (aka. the BOM), but probably ZWJ (zero width joiner)
15:38<nielsm>also, is the unicode layout library used when using sprite font? (I don't think it is, otherwise we'd also be seeing the ICU crashes on sprite font cases)
15:38-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Ping timeout: 480 seconds]
15:39-!-gelignite [~gelignite@55d46a9d.access.ecotel.net] has joined #openttd
15:39-!-gelignite is "gelignite" on #openttd
15:40<@peter1138>Eddi|zuHause, do you want to add the rail_cmd updates too?
15:40<Eddi|zuHause>peter1138: i can do that
15:40<@peter1138>I don't feel my "rewrite" offers anything compelling.
15:40-!-Thedarkb-T60 [~Thedarkb-@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has joined #openttd
15:40-!-Thedarkb-T60 is "realname" on #openttd #oolite
15:41<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
15:42-!-supermop_work [~supermopw@38.105.230.30] has joined #openttd
15:42-!-supermop_work is "A CIRC user" on #openttd
15:42<Eddi|zuHause>should i have put credit in the commit message?
15:42<@peter1138>Nah
15:43-!-supermop_work_ [~supermopw@38.105.230.30] has joined #openttd
15:43-!-supermop_work_ is "A CIRC user" on #openttd
15:45-!-supermop_work__ [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
15:50-!-supermop_work [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
15:52<TrueBrain>"lang/welsh.lng's language ID is already known"
15:52<TrueBrain>hmm
15:56<@peter1138>So #7370 passed CI, anyone want to review it? :p
15:56<@peter1138>Shame we don't have unit tests, this is perfect for that.
15:57<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjQb
15:58<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjQN
15:58<@peter1138>Oh spam :(
15:58<@peter1138>q
15:58<TrueBrain>so add unit tests :D
15:58<@peter1138>Nah
15:59<@peter1138>Not worth it before CMake ;)
15:59<TrueBrain>fair
15:59<TrueBrain>why do I get these language errors .. I dont get it
15:59<@peter1138>And this PR will help your CMake build.
16:01<TrueBrain>and I get a "File not readable"
16:01<m3henry>Eddi|zuHause I think this is what you want: https://godbolt.org/z/ZU4t0o
16:01<TrueBrain>without context
16:01<TrueBrain>lovely
16:01-!-octernion [~octernion@206.223.172.50] has quit [Quit: octernion]
16:01<Eddi|zuHause>m3henry: can't have c++14
16:01<m3henry>It doesn't
16:02<m3henry>That's why it has trailing return types and that comment
16:03<Eddi|zuHause>frankly, that construct looks horrible
16:03<m3henry>Yeah, that's why they introduced _t typedefs and such in later standards
16:04<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z updated pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjil
16:07<m3henry>This is the c++17 version, which is at least without all the type-trait spam
16:07<m3henry>https://godbolt.org/z/4v6Ldr
16:07-!-sla_ro|master [~sla.ro@84.117.88.126] has quit []
16:09<@peter1138>My quick "unit test" shows no differences, it's not conclusive though
16:09<@peter1138>Eh, it's not a unit test, it's a regression test.
16:09<@peter1138>I printed the input and output and compared master vs the pr...
16:09<Eddi|zuHause>it's a unit regression test :)
16:10<Eddi|zuHause>a true unit test would imply you wrote the test before writing the unit
16:12<TrueBrain>hmm .. is it normal to get "welsh.lng's language ID is already known" for every language file on startup?
16:13<TrueBrain>it is like it scans the same folder twice
16:13<TrueBrain>(for the regression, that is)
16:13<@peter1138>No?
16:13<@peter1138>Hmm, pub.
16:13<TrueBrain>./openttd -x -vnull:ticks=1 -snull -mnull -g -d9 -c ai/regression/regression.cfg 2>&1 | less
16:13<TrueBrain>if I execte that in 'bin', it always shows me that
16:13<TrueBrain>seems the searchpaths get a bit confused
16:13<@peter1138>Good idea to try make regression though :)
16:14<@peter1138>Passed.
16:14<+glx>maybe scanning exe path and cwd too
16:14<TrueBrain>silly
16:14<TrueBrain>but okay, I am going to ignore that, as it is already there :P
16:14<+glx>ah and -c fucks the path search too
16:15<+glx>there's an issue on github/PR
16:15<@peter1138>TrueBrain, ah yes, iwt that command, I do.
16:15<TrueBrain>even without -c it does that, it seems
16:15-!-octernion [~octernion@206.223.172.50] has joined #openttd
16:15-!-octernion is "octernion" on #openttd
16:16<@peter1138>It does say it's adding the current dir twice.
16:16<TrueBrain>so it doesn't deduplicated searchpaths :D
16:16<TrueBrain>well, we already knew this needed work :P
16:17<TrueBrain>btw, I suggest that with CMake we start following sane rules .. no file generation outside the 'build' folder :P
16:17<TrueBrain>(including baseset and stuff)
16:18<TrueBrain>and make a single command (say, install, or pre-install), that preps 'bin' if we want
16:18<+glx>well baseset and lang are already done like that ;)
16:18-!-synchris [~synchris@139.138.202.72] has quit [Quit: yeeha!]
16:18<TrueBrain>no, baseset was not :D
16:18<TrueBrain>lang is ;)
16:18<+glx>baseset was
16:18<TrueBrain>-set(BASESET_EXTRAGRF_FILE ${CMAKE_SOURCE_DIR}/bin/baseset/orig_extra.grf)
16:18<TrueBrain>+set(BASESET_EXTRAGRF_FILE ${CMAKE_BINARY_DIR}/baseset/orig_extra.grf)
16:18<TrueBrain>I just typed that
16:19<+glx>it's a source file
16:19<TrueBrain>euh
16:19<TrueBrain>hmm
16:19<TrueBrain>you are right
16:19<TrueBrain>so ...
16:19<TrueBrain>hmm
16:19<TrueBrain>sorry :D
16:19<TrueBrain>that it is in the bin folder confused the fuck out of me :D
16:20<TrueBrain>well, something for another day
16:20<+glx>but most stuff in bin should be copied into build during generation
16:20<TrueBrain>shouldn't it be in media/baseset to stat with, I wonder
16:21<+glx>no media is the source, but the search path is ./baseset
16:21<+glx>like lang
16:21<TrueBrain>I meant the bin/baseset/openttd.grf etc
16:21<TrueBrain>I wonder if 'bin' is the right folder to start that off in
16:22<TrueBrain>if we put it in media/baseset, and let Basetset.cmake copy it to the CMAKE_BINARY_DIR folder, doesn't that make more sense? (honest question)
16:22<+glx>ah, theorically it's generated it grfcodec is found
16:22<TrueBrain>even if it isn't generated
16:22<TrueBrain>not everything in media needs to be generated, does it? :)
16:23<TrueBrain>side-question: media/baseset/translations.* can be removed now, not?
16:23<+glx>ha yes they can
16:23<TrueBrain>media/extra_grf leads to baseset/orig_extra.grf ?
16:24<TrueBrain>(if you have grfcodec)
16:24<TrueBrain>shouldn't we convert it to an NML project? :D
16:24<+glx>maybe
16:25<Eddi|zuHause>i thought we wanted to keep the dependencies low :p
16:25<Eddi|zuHause>it's not like the baseset has much to gain from nml's complexity
16:25<+glx>depending on grfcodec or nmlc is similar, no ?
16:25<+glx>well + python
16:26<TrueBrain>and something about preach what you teach ;)
16:27<+glx>at least nml should be easier to read than nfo ;)
16:27<andythenorth>yeah but nml :(
16:28<andythenorth>it's not an easy build
16:28<TrueBrain>pip install nml
16:28<TrueBrain>? :)
16:29<andythenorth>does that work on Windows now?
16:29*andythenorth has NFI, but we have to provide a Windows nml binary afaik
16:30<DorpsGek_II>[OpenTTD/OpenTTD] M3Henry updated pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhSz0
16:30<+glx>probably because newgrf devs are lazy ;)
16:30<+glx>or don't want to try to compile tools
16:31*TrueBrain knows nothing about nml :)
16:31<TrueBrain>first cmake
16:31<TrueBrain>STOP DISTRACTING ME
16:31<TrueBrain>:P
16:31<andythenorth>ha ha
16:31<andythenorth>I did consider trying a pyenv wrapper for nml https://hackernoon.com/reaching-python-development-nirvana-bb5692adf30c
16:31<andythenorth>but eh
16:31<andythenorth>stuff and things
16:31<andythenorth>time
16:31<andythenorth>tanks
16:31<+glx>btw I finished script_window.hpp generation
16:31<+glx>next step is all the .sq
16:32<TrueBrain>cool :)
16:32<+glx>then xxx_instance.cpp
16:33<+glx>but the generated hpp is not usable, because the current .sq #include "../script_window.hpp"
16:36<TrueBrain>okay .. so yeah, moving files out of 'bin' makes regression a bit easier :D
16:38<TrueBrain>and gives a clean place to add the grfcodec call :D
16:38<TrueBrain>sweet :)
16:46-!-octernion [~octernion@206.223.172.50] has quit [Quit: octernion]
16:47<+michi_cc>grfcodec will accept anything, while NML has to be updated which might get a tad annoying while coding a patch.
16:53<andythenorth>dependency problems
16:53<andythenorth>how often is openttd.grf patched though?
16:59<Eddi|zuHause>often enough?
16:59<andythenorth>often enough that the spec changes?
16:59<Eddi|zuHause>adding stuff to action 5 is always a spec change?
17:00<andythenorth>ok
17:02<TrueBrain>bah, 'make test' in CMake is annoying
17:06<TrueBrain>did we ever fix that Squirrel outputs pointers in all kind of weird ways depending on the platform?
17:06<TrueBrain>gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0);
17:06<TrueBrain>that lovely regex :P
17:07-!-gelignite [~gelignite@55d46a9d.access.ecotel.net] has quit [Quit: Good fight, good night!]
17:08<Eddi|zuHause>wtf would "0x(nil)" mean?
17:09<Eddi|zuHause>and what's the trailing x0?
17:10<TrueBrain>I know it was to fix up various of platforms being silly :D
17:22<TrueBrain>hmmm .. how to 'diff' in a CMake safe way
17:22<TrueBrain>hmm
17:27-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has quit [Quit: wroom]
17:29<TrueBrain>ha, does seem to work :D
17:29<TrueBrain>most likely Windows will fail
17:30<+glx>of course windows needs the exe to be converted
17:30<TrueBrain>exactly :)
17:30<TrueBrain>and I need to fix that 'make test' also copies the regression files
17:30<TrueBrain>not sure yet how ..
17:30<DorpsGek_II>[OpenTTD/OpenTTD] stale[bot] closed issue #6887: Add layer showing boundaries for local authorities https://git.io/fhj57
17:32<TrueBrain>my MSVC project keeps rebuilding
17:32<TrueBrain>very annoying
17:33<TrueBrain>(VS2019)
17:33<+glx>two options for that, use editbin but it's not directly in the path, or we can include https://devs.openttd.org/~glx/convert.zip in the test step
17:33<+glx>it's a small C file IIRC, wrote that long time ago
17:34<TrueBrain>depends how difficult getting the path is with cmake
17:34<TrueBrain>it might surprise us :D
17:37<TrueBrain>VS2017 also keeps rebuilding
17:37<TrueBrain>well, that is pretty useless :D
17:37<TrueBrain>I generate (with -G a VS2017 project
17:37<TrueBrain>I open it in VS2017
17:37<TrueBrain>I hit build
17:37<TrueBrain>wait a long time
17:37<TrueBrain>hit build again
17:37<TrueBrain>rebuilds EVERYTHING
17:37<TrueBrain>you don't glx?
17:38<+glx>last time I checked it didn't
17:47<+glx>ok all .sq files are created, almost empty because SquirrelExport.cmake does nothing, but it's a big step :)
17:52<TrueBrain>1/2 Test #1: regression_tst_regression ........ Passed 9.21 sec
17:52<TrueBrain> Start 2: regression_tst_stationlist
17:52<TrueBrain>2/2 Test #2: regression_tst_stationlist .......***Failed 3.10 sec
17:52<TrueBrain>w00p :D
17:52<TrueBrain> Start 1: regression_tst_regression
17:52<TrueBrain>1/2 Test #1: regression_tst_regression ........ Passed 9.22 sec
17:52<TrueBrain> Start 2: regression_tst_stationlist
17:52<TrueBrain>2/2 Test #2: regression_tst_stationlist ....... Passed 3.06 sec
17:53<TrueBrain>and there we go :)
17:53<+glx>nice
17:54<DorpsGek_II>[OpenTTD/OpenTTD] PeterN approved pull request #7370: Cleanup: Remove questionable syntax https://git.io/fhjdo
17:55<TrueBrain>now lets see if I can get MSVC to work so I can test it ..
17:59<TrueBrain>if it keeps rebuilding, there is not a lot I can do ..
17:59<TrueBrain>meh
18:01<TrueBrain>okay, can';t say I know enough about MSVC to understand this :P
18:07<TrueBrain>Windows doesn't have a Shared dir? How can the regression run? :P
18:07<TrueBrain>or is the shared directory done hardcoded ..
18:08<+glx>there's a shared dir
18:08<+glx>I think
18:08<TrueBrain>there is, but it is done differently than other platforms
18:08<TrueBrain>lol
18:09<+glx>it's <all users>\documents\openttd or something
18:09<TrueBrain>C:\Users\Public\Documents\OpenTTD\
18:09<+glx>yes that one :)
18:10<+glx>and we get it via windows API
18:10<TrueBrain>MSVC stores openttd.exe in a weird location
18:10<TrueBrain>meh
18:10<TrueBrain>it is for some reason under build/Debug
18:10<TrueBrain>it should be in build/
18:11<+glx>no because you can also have it in build/Release
18:11<Eddi|zuHause>there's build/Debug and build/Release?
18:11<TrueBrain>that is not how CMake (should) work
18:11<+glx>depends on the configuration used to build
18:11<TrueBrain>so nice that MSVC is being the annoy child in the class
18:11<TrueBrain>but brrr
18:11<+glx>and that's how cmake does it for msvc projects
18:11<TrueBrain>(the binary should be in the build folder in the same location as the source folder)
18:12<TrueBrain>I am somewhat surprised that strgen runs
18:12<+glx>cmake knows where the exe will be :)
18:13<TrueBrain>except that we run it as 'strgen'
18:13<TrueBrain>meh
18:13<TrueBrain>why are things always this annoying
18:13<+glx>yes we put strgen and cmake translate that to the right exe
18:13<+glx>because it recognise a target name
18:13<TrueBrain>which we cannot do for openttd
18:14<TrueBrain>it is the typical: everyone does A, but one thing has to do B
18:15<+glx>hmm if you use "openttd" with extension it doesn't convert ?
18:15<+glx>*without
18:15<TrueBrain>it is in a completely different cmake
18:15<TrueBrain>so no
18:15<TrueBrain>(Regression is like baseset etc not executed from the main flow)
18:16<+glx>maybe pass it as an define, using $<TARGET_FILE:openttd>
18:17<milek7>cmake relation with build configuration is weird: on make/other it requires one CMAKE_BUILD_TYPE, but on MSVC it always generates all possible configurations in vcproj
18:17<+glx>because it's a project file, intended to be used in GUI
18:18<TrueBrain>get_property doesn't work .. lets try the alternatives ..
18:18<TrueBrain>TARGET_FILE does work, so .. I guess that will have to do
18:22<TrueBrain>okay, manually it works, after converting the executable
18:23<DorpsGek_II>[OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
18:23<TrueBrain>tomorrow or so I will battle MSVC, see why it is acting this annoying
18:24*m3henry hopes to merge soon
18:24<TrueBrain>glx: so for MSVC regression breaks; which is not a change in what it used to do :P
18:25<TrueBrain>mingw should work, as far as I can tell (but I cannot test mingw here)
18:25<+glx>mingw needs conversion too I think, but I can quickly check
18:26<TrueBrain>haha, installing the OpenGFX fails, because bin/baseset no longer exists :D
18:26<TrueBrain>epic
18:27-!-Progman [~progman@p4FD664FB.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
18:27<+glx>of course make test doesn't build
18:28<TrueBrain>hmm .. Linux fails for a completely different reason
18:28<TrueBrain>which is also odd :D
18:28<TrueBrain>owh, that might be my change
18:28<TrueBrain>bugs all around :D
18:36<DorpsGek_II>[OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
18:37<TrueBrain>lets see if I can fix 2 bugs :P
18:37<TrueBrain>I wanted to go to bed early .. I failed :D
18:40<DorpsGek_II>[OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
18:42<TrueBrain>lol .. on linux the OpenGFX is installed in the "wrong" location (in /usr/share, and it is checking /usr/local/share) :D
18:44<DorpsGek_II>[OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
18:44<TrueBrain>we just keep trying!
18:46<TrueBrain>mkdir: /Library/Application Support/OpenTTD/baseset: Permission denied
18:46<TrueBrain>:( *sad panda*
18:47<TrueBrain>well, that is somewhat an issue ..
18:47<TrueBrain>why are our searchpaths so fucked up? :(
18:49<TrueBrain>okay, this sounds like for a me-problem tomorrow
18:49<TrueBrain>and you guys are boring today :( So silent ...
18:49<TrueBrain>night all!
18:49-!-andythenorth [~andytheno@cpc87219-aztw31-2-0-cust178.18-1.cable.virginm.net] has quit [Quit: andythenorth]
18:50<m3henry>o/
18:54-!-HerzogDeXtEr [~farci@ip923425f9.dynamic.kabel-deutschland.de] has quit [Read error: Connection reset by peer]
18:58<+glx> Start 1: regression_tst_regression
18:58<+glx>1/2 Test #1: regression_tst_regression ........***Failed 223.60 sec
18:58<+glx> Start 2: regression_tst_stationlist
18:58<+glx>2/2 Test #2: regression_tst_stationlist ....... Passed 60.11 sec
19:02<+glx>but no conversion needed for mingw
19:06-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
19:07-!-supermop_work_ [~supermopw@38.105.230.30] has quit [Ping timeout: 480 seconds]
19:11-!-m3henry [~m3henry@host-212-139-212-35.static.as9105.net] has quit [Quit: Leaving]
19:14-!-Guest3115 [~th0bse@2001:7c7:2055:13c:b89e:abcf:78e5:7b0a] has joined #openttd
19:14-!-Guest3115 is "th0bse" on #openttd
19:14-!-Flygon [~Flygon@114-198-109-47.dyn.iinet.net.au] has joined #openttd
19:14-!-Flygon is "Flygon" on #openttd
19:21<DorpsGek_II>[OpenTTD/OpenTTD] glx22 commented on pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhjbE
19:37-!-Wormnest [~Wormnest@35.136.176.177] has joined #openttd
19:37-!-Wormnest is "Wormnest" on #openttd
20:23-!-supermop_Home_ [~user@pool-71-105-225-37.nycmny.fios.verizon.net] has joined #openttd
20:23-!-supermop_Home_ is "Guest" on #openttd
20:29<supermop_Home_>what would someone recommend for a nice mnitor
20:29<supermop_Home_>monitor
20:30<supermop_Home_>with good color and high dpi sort of similar to my surface book's screen
20:33<@peter1138>Uh...
20:33<@peter1138>Something 4K and IPS then?
20:33<supermop_Home_>i mean are monitors basically a commodity these days?
20:34<supermop_Home_>where you just buy whatever meets your spec?
20:34<@peter1138>Uh...
20:34<supermop_Home_>since 2003 i have bought a total of two monitors
20:35<supermop_Home_>one in 2003 and one in early 2017 that i don't like
20:41-!-Thedarkb-X40 [~beno@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has joined #openttd
20:41-!-Thedarkb-X40 is "realname" on #openttd #/r/openttd #oolite
20:51<@peter1138>Hmm, crap.
21:08-!-Thedarkb-X40 [~beno@51-171-48-215-dynamic.agg3.kny.prp-wtd.eircom.net] has quit [Ping timeout: 480 seconds]
21:41-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:81a4:50d5:b1fd:bca5:2e3a] has quit [Ping timeout: 480 seconds]
21:52-!-Beerbelott [~Berbe@00028cd3.user.oftc.net] has joined #openttd
21:52-!-Beerbelott is "purple" on #openttd
21:55-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
21:55-!-Supercheese is "Caseum" on #openttd
22:19-!-octernion [~octernion@toroon015yw-lp130-04-70-31-5-220.dsl.bell.ca] has joined #openttd
22:19-!-octernion is "octernion" on #openttd
22:23-!-glx [kvirc@000128ec.user.oftc.net] has quit []
22:26-!-snail_UES_ [~snail_UES@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
22:26-!-snail_UES_ is "Jacopo Coletto" on #openttd
22:27-!-octernion [~octernion@toroon015yw-lp130-04-70-31-5-220.dsl.bell.ca] has quit [Ping timeout: 480 seconds]
22:36-!-Guest3115 [~th0bse@2001:7c7:2055:13c:b89e:abcf:78e5:7b0a] has quit [Killed (NickServ (Too many failed password attempts.))]
22:36-!-th0bse_ [~th0bse@2001:7c7:2055:13c:b89e:abcf:78e5:7b0a] has joined #openttd
22:36-!-th0bse_ is "th0bse" on #openttd
22:39<Samu>hi
22:39<Samu>supermop_Home_, wanna continue game? or a new game?
22:40<Samu>anyway, it's a bit late
22:40<Samu>2:40 am
22:49<Samu>well im off to bed, cyas
22:49-!-Samu [~Ricardo@pa4-84-91-142-34.netvisao.pt] has quit [Quit: Leaving]
22:51-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Read error: Connection reset by peer]
22:52-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
22:52-!-Supercheese is "Caseum" on #openttd
22:57-!-supermop_Home_ [~user@pool-71-105-225-37.nycmny.fios.verizon.net] has quit [Remote host closed the connection]
22:58-!-Wormnest [~Wormnest@35.136.176.177] has quit [Quit: Leaving]
23:01<DorpsGek_II>[OpenTTD/OpenTTD] PeterN opened issue #7371: Kdtree is built too early in savegame loading process https://git.io/fhjxX
23:16-!-D-HUND [~debdog@2a00:79c0:619:5500:7a24:afff:fe8a:d04d] has joined #openttd
23:16-!-D-HUND is "Wowbagger" on #openttd #bitlbee
23:20-!-debdog [~debdog@2a00:79c0:66c:9400:7a24:afff:fe8a:d04d] has quit [Ping timeout: 480 seconds]
23:25-!-Beerbelott [~Berbe@00028cd3.user.oftc.net] has left #openttd []
23:36<DorpsGek_II>[OpenTTD/OpenTTD] JGRennison opened issue #7372: FindStationsAroundTiles with use_nearby=true returns no results for industry tiles https://git.io/fhjpe
23:40<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on issue #7372: FindStationsAroundTiles with use_nearby=true returns no results for industry tiles https://git.io/fhjpJ
23:52-!-tokai [~tokai@00012860.user.oftc.net] has joined #openttd
23:52-!-tokai is "Christian Rosentreter" on #openttd
23:52-!-mode/#openttd [+v tokai] by ChanServ
23:59-!-tokai|noir [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
---Logclosed Wed Mar 13 00:00:10 2019