IRC logs for #openttd on OFTC at 2018-09-24
            
00:12:08 *** Gustavo6056 has joined #openttd
00:15:58 *** nielsm has quit IRC
00:17:03 *** Gustavo6046 has quit IRC
00:17:03 *** Gustavo6056 is now known as Gustavo6046
00:20:44 *** GroovyNoodle has quit IRC
00:25:24 *** Oroburos has joined #openttd
00:32:17 *** Thedarkb-T60 has joined #openttd
00:35:43 *** chomwitt has quit IRC
00:41:50 *** HerzogDeXtEr has quit IRC
00:50:46 *** rocky113844 has joined #openttd
01:03:56 *** Oroburos has quit IRC
01:12:25 *** Gustavo6056 has joined #openttd
01:19:08 *** Gustavo6046 has quit IRC
01:19:08 *** Gustavo6056 is now known as Gustavo6046
01:26:44 *** Thedarkb-T60 has quit IRC
01:27:05 *** greeter has quit IRC
01:27:15 *** Thedarkb-T60 has joined #openttd
01:27:30 *** triolus has quit IRC
01:28:09 *** greeter has joined #openttd
02:01:13 *** greeter has quit IRC
02:12:34 *** Gustavo6056 has joined #openttd
02:18:13 *** Gustavo6046 has quit IRC
02:18:13 *** Gustavo6056 is now known as Gustavo6046
02:25:12 *** Flygon has joined #openttd
02:28:39 *** ccfreak2k has quit IRC
02:30:51 *** ccfreak2k has joined #openttd
02:41:12 *** Thedarkb-T60 has quit IRC
03:12:25 *** Gustavo6056 has joined #openttd
03:18:48 *** Gustavo6046 has quit IRC
03:18:48 *** Gustavo6056 is now known as Gustavo6046
03:36:33 *** cHawk has quit IRC
03:48:31 *** acklen has quit IRC
03:48:36 *** acklen has joined #openttd
03:55:28 *** glx has quit IRC
04:06:44 *** cHawk has joined #openttd
04:09:47 *** mindlesstux has quit IRC
04:09:58 *** mindlesstux has joined #openttd
04:12:43 *** Gustavo6056 has joined #openttd
04:19:53 *** Gustavo6046 has quit IRC
04:19:53 *** Gustavo6056 is now known as Gustavo6046
04:59:15 *** Samu has quit IRC
05:12:50 *** Gustavo6056 has joined #openttd
05:13:42 *** haudrauf has quit IRC
05:15:06 *** lethosor has quit IRC
05:15:17 *** lethosor has joined #openttd
05:16:30 *** haudrauf has joined #openttd
05:19:28 *** Gustavo6046 has quit IRC
05:19:28 *** Gustavo6056 is now known as Gustavo6046
05:30:27 *** milek7_ has quit IRC
05:30:28 *** milek7 has joined #openttd
06:13:00 *** sla_ro|master has joined #openttd
06:13:02 *** Gustavo6056 has joined #openttd
06:14:56 *** ToBeFree has joined #openttd
06:15:12 *** ToBeFree is now known as ToBeCloud
06:19:02 *** Gustavo6046 has quit IRC
06:19:02 *** Gustavo6056 is now known as Gustavo6046
06:22:07 *** rocky113844 has quit IRC
06:24:12 *** sla_ro|master has quit IRC
06:57:02 *** snail_UES_ has quit IRC
07:06:27 *** Westie has quit IRC
07:07:29 *** Westie has joined #openttd
07:13:01 *** Gustavo6056 has joined #openttd
07:17:38 *** Gustavo6046 has quit IRC
07:17:38 *** Gustavo6056 is now known as Gustavo6046
07:40:51 *** masse has quit IRC
07:41:13 *** masse has joined #openttd
07:44:26 *** Antheus has quit IRC
07:44:33 *** Antheus has joined #openttd
08:01:39 *** DorpsGek_II has quit IRC
08:13:09 *** Gustavo6056 has joined #openttd
08:14:00 *** andythenorth has joined #openttd
08:19:53 *** Gustavo6046 has quit IRC
08:19:53 *** Gustavo6056 is now known as Gustavo6046
08:39:15 *** Alkel_U3 has quit IRC
08:39:28 *** Alkel_U3 has joined #openttd
08:42:33 *** andythenorth has quit IRC
08:50:19 *** andythenorth has joined #openttd
09:07:53 *** Mek has quit IRC
09:09:52 *** andythenorth has quit IRC
09:12:03 *** IgnoredAmbience has quit IRC
09:12:17 *** IgnoredAmbience has joined #openttd
09:13:17 *** Gustavo6056 has joined #openttd
09:17:17 *** hph^ has quit IRC
09:17:35 *** hph^ has joined #openttd
09:18:22 *** Gustavo6046 has quit IRC
09:18:22 *** Gustavo6056 is now known as Gustavo6046
09:19:13 *** Mek has joined #openttd
09:37:09 *** andythenorth has joined #openttd
10:13:30 *** Gustavo6056 has joined #openttd
10:18:20 *** andythenorth has quit IRC
10:18:22 *** Gustavo6046 has quit IRC
10:18:22 *** Gustavo6056 is now known as Gustavo6046
10:28:59 *** wodencafe has quit IRC
10:29:22 *** wodencafe has joined #openttd
11:13:37 *** Gustavo6056 has joined #openttd
11:20:32 *** Gustavo6046 has quit IRC
11:20:32 *** Gustavo6056 is now known as Gustavo6046
11:55:54 *** m3henry has joined #openttd
12:13:39 *** Gustavo6056 has joined #openttd
12:20:03 *** Gustavo6046 has quit IRC
12:20:03 *** Gustavo6056 is now known as Gustavo6046
12:53:51 *** Samu has joined #openttd
12:54:28 <Samu> hi
13:01:17 *** greeter has joined #openttd
13:03:20 *** masse is now known as MasseR
13:13:57 *** Gustavo6056 has joined #openttd
13:20:07 *** Gustavo6046 has quit IRC
13:20:07 *** Gustavo6056 is now known as Gustavo6046
13:47:47 <Samu> i'm inventing a new cost!
13:47:51 <Samu> drive through
13:48:15 <Samu> _cost_drive_through = null; ///< The extra cost if a road tile is part of a drive through road station.
14:13:59 *** Gustavo6056 has joined #openttd
14:20:42 *** Gustavo6046 has quit IRC
14:20:42 *** Gustavo6056 is now known as Gustavo6046
14:52:13 *** snail_UES_ has joined #openttd
15:01:08 *** snail_UES_ has quit IRC
15:14:01 *** Gustavo6056 has joined #openttd
15:19:52 *** Gustavo6046 has quit IRC
15:19:52 *** Gustavo6056 is now known as Gustavo6046
15:41:49 *** nielsm has joined #openttd
15:49:34 *** Gja has joined #openttd
15:53:54 <Samu> is this explanation confusing:
15:53:55 <Samu> _cost_no_existing_road = null; ///< The cost that is added to _cost_tile if no road connection exists between two tiles. Added twice when the tile to enter has no road, no bridge and no tunnel.
15:54:37 <Samu> how to english?
15:56:08 <m3henry> Perhaps "Cost is doubled when..."
15:56:18 <Samu> ok
15:56:51 <Samu> done
15:57:05 <m3henry> Also is 'null' appropriate? Doesn't sound like a pointer to me
15:57:26 <Samu> yes, at this place
15:57:48 <Samu> the constructor comes next
15:57:50 <Samu> with this._cost_no_existing_road = 40;
15:59:29 *** rocky113844 has joined #openttd
15:59:46 <Samu> but the explanation per se, does it sound confusing?
16:00:31 <m3henry> Is it no_bridge && no_road && no_tunnel?
16:00:48 <Samu> sec,
16:01:18 <Samu> it's this https://paste.openttdcoop.org/pvhz8qahw
16:01:36 <Samu> guess it's a ||
16:03:05 <Samu> IsRoadTile includes drivethrough already
16:03:58 <Samu> and since road vehicles can walk on competitor's drive throughs, it's not needed to check if the drive through is mine
16:05:25 <m3henry> I would say that the if statement is a bit unweildy
16:10:31 <Samu> let me try something different
16:12:03 <Samu> https://paste.openttdcoop.org/puwkoudkt
16:12:05 <Samu> is this better?
16:14:00 <Samu> maybe not
16:14:25 *** Gustavo6056 has joined #openttd
16:14:42 <Samu> https://paste.openttdcoop.org/pf3etzgbs
16:14:50 <Samu> what would you do m3henry
16:15:04 <m3henry> This may be more readable: https://paste.openttdcoop.org/pzowtug1e
16:16:17 *** Flygon has quit IRC
16:19:26 <Samu> which one would be computed with less operations?
16:19:27 *** Gustavo6046 has quit IRC
16:19:27 *** Gustavo6056 is now known as Gustavo6046
16:19:30 <m3henry> By breaking the statement up, you can explain the logic in the variable names
16:19:57 <Samu> this function is called a bajillion times for almost every tile while pathfinding
16:20:09 <Samu> so, it's also important to get the same result in less ops
16:20:25 <m3henry> Have you benchmarked it?
16:20:37 <Samu> not really, but
16:20:43 <m3henry> but benchmark it
16:20:51 <Samu> i saw it in action, it's really intensive
16:21:01 <Samu> debug signs everywhere
16:21:28 <Samu> not sure how i'm gonna benchmark such thing
16:22:16 <Samu> i notice, for example, a high value on here will make the pathfinder check more tiles
16:23:24 <m3henry> An aggressive optimizing compiler is likely to emit similar if not identical machine code for those statements
16:24:07 <m3henry> It's not something I would worry about
16:24:32 <Samu> there's a max #opcodes :o
16:24:41 <Samu> but oki
16:24:55 <m3henry> Have you got the most efficent algorithm?
16:26:16 <Samu> no idea, i was just trying to make the costs look consistent
16:27:22 <Samu> i suppose the original code was faster, for a reason alone, it only tests bridges on sloped tiles
16:27:38 <Samu> my changes make it test bridges on every kind of slope
16:27:47 <Samu> flat slopes
16:28:06 <m3henry> If it is more correct, then you'll have to take that hit
16:28:13 <Samu> pretty much yes
16:28:41 <m3henry> perhaps you can amorrtize the cost over n cycles
16:30:18 <Samu> the original costs was doing DistanceManhattan multiple times for costs
16:30:23 <Samu> erm...
16:30:34 <Samu> repeating the same
16:30:47 <Samu> so i turned it into a local dist = DistanceManhattan
16:30:58 <Samu> i suppose it would fasten up
16:31:24 <Samu> not really sure how the opcodes measure
16:31:46 <Samu> but i expect there would be less operations needed
16:33:12 <Samu> https://dev.openttdcoop.org/projects/lib-pathfinderroad here's the original
16:39:44 *** TinoDidriksen has quit IRC
16:39:56 *** TinoDidriksen has joined #openttd
16:40:35 *** TinoDidriksen is now known as Guest1243
16:41:43 *** Guest1243 is now known as TinoDidriksen
16:43:12 <Samu> sec
16:43:55 <Samu> https://noai.openttd.org/api/trunk/classAIController.html#f878b5cd20739d7c1ce5702dc996cb3b
16:43:58 <Samu> maybe i can measure :p
16:44:04 <Samu> let me experiment this
16:44:25 *** Alberth has joined #openttd
16:44:25 *** ChanServ sets mode: +o Alberth
16:45:47 <Alberth> o/
16:47:51 <Samu> hi
16:49:38 <Samu> how do i actually measure
16:49:53 <Samu> without influencing the measure myself with debug messages
16:50:08 <Samu> seems that's something not possible to do
16:50:37 *** m3henry has quit IRC
16:53:11 <Samu> https://imgur.com/9Rcx3PO
16:53:12 <Samu> lel
16:53:59 <Samu> why do i get a big negative value at times?
16:54:06 <Samu> max opcodes atm is 10000
16:56:56 <Samu> gonna try ur code
16:59:05 <Samu> 49
16:59:10 <Samu> my code wins
16:59:12 <Samu> with 48
16:59:21 <Samu> lol
16:59:54 <Samu> oh, he left
17:08:33 <Samu> got a 47 with my original code
17:10:26 <Samu> if there is a connection: 12
17:11:31 <Samu> if there is a road on new_tile: 26
17:11:33 *** sla_ro|master has joined #openttd
17:11:45 <Samu> if there is no road on new_tile: 47
17:12:04 <Samu> no road on new_tile is the most common occurence
17:14:43 *** Gustavo6056 has joined #openttd
17:21:27 *** Gustavo6046 has quit IRC
17:21:27 *** Gustavo6056 is now known as Gustavo6046
17:26:07 *** WWacko1976-work has quit IRC
17:34:11 *** Wormnest has joined #openttd
17:44:38 *** Gja has quit IRC
17:46:36 *** quiznilo has left #openttd
17:46:53 <Samu> 12 / 26 / 47 vs 12 / 23 / 48 vs 12 / 37 / 49
17:49:22 *** Thedarkb-T60 has joined #openttd
17:56:12 <Samu> Alberth: https://paste.openttdcoop.org/pvhz8qahw (12/26/47) vs https://paste.openttdcoop.org/pf3etzgbs (12/23/48) vs https://paste.openttdcoop.org/pliwj7tdq (12/37/49)
17:56:23 <Samu> number of opcodes
17:57:53 <Samu> x/y/z : x opcodes if there is a connection, y opcodes if there is a road on new_tile, z opcodes if there is no road on new_tile
17:58:36 <Samu> i'm undecided between the first and second codes
17:58:43 <Samu> what is preferible
17:58:55 <Alberth> throw a die
17:59:29 <Samu> I'm more inclined towards 12/26/47
18:00:13 <Alberth> you get opcodes in the 10,000s right?
18:00:22 *** Gja has joined #openttd
18:00:24 <Samu> yes, the default is 10000
18:00:26 <Alberth> not sure how significant 1 op is
18:01:26 <Samu> it's calculated for every tile neighbour stuff
18:02:57 <Samu> @calc 10000 / 47
18:02:57 <DorpsGek> Samu: 212.765957447
18:03:00 <Samu> @calc 10000 / 48
18:03:00 <DorpsGek> Samu: 208.333333333
18:03:01 <Samu> @calc 10000 / 49
18:03:01 <DorpsGek> Samu: 204.081632653
18:04:00 <Alberth> you're avoiding doing double calculations?
18:05:26 <Alberth> that 212 vs 208 isn't true, you also do other things than just computing a tile status
18:07:06 <Samu> z is the most common occurence t.t
18:07:32 <Samu> building on a empty tile
18:08:13 <Samu> y happens when it connects to an existing road
18:08:31 <Samu> x happens when it's already connected
18:10:03 <Samu> y is probably the most rare
18:10:33 <Samu> so i'm inclined towards that z =47
18:10:52 <Samu> there's just too many empty tiles on the map
18:13:45 <Samu> haven't tested computing stations
18:13:51 <Samu> would probably go over 50
18:14:02 <Samu> stations or depot
18:14:29 *** Gustavo6056 has joined #openttd
18:14:40 <Samu> there's much less stations/depots on the map than there is roads
18:15:38 <Samu> unless you can come with a more efficient way to do these checks
18:16:30 <Samu> I'll settle for https://paste.openttdcoop.org/pvhz8qahw for now
18:21:58 *** Gustavo6046 has quit IRC
18:21:58 *** Gustavo6056 is now known as Gustavo6046
18:24:32 *** Gustavo6056 has joined #openttd
18:25:39 *** HerzogDeXtEr has joined #openttd
18:30:09 *** Thedarkb-T60 has quit IRC
18:31:18 *** frosch123 has joined #openttd
18:31:28 *** Gustavo6046 has quit IRC
18:31:28 *** Gustavo6056 is now known as Gustavo6046
18:57:17 <Samu> https://imgur.com/O6gMgEb
18:57:19 <Samu> heh
18:58:09 <Samu> just 1 tile
18:58:26 <Samu> 1 neighbour
19:01:30 <Samu> hmm _cost_slope is a bit expensive
19:02:55 *** lethosor_ has joined #openttd
19:05:57 *** rocky113844 has quit IRC
19:05:57 *** lethosor has quit IRC
19:05:57 *** cHawk has quit IRC
19:05:57 *** ccfreak2k has quit IRC
19:06:30 *** rocky113844 has joined #openttd
19:06:35 *** ccfreak2k has joined #openttd
19:06:35 *** cHawk has joined #openttd
19:14:42 *** Gustavo6056 has joined #openttd
19:21:39 *** andythenorth has joined #openttd
19:22:02 *** Gustavo6046 has quit IRC
19:22:02 *** Gustavo6056 is now known as Gustavo6046
19:23:03 <andythenorth> moin
19:24:16 *** Progman has joined #openttd
19:29:56 *** gelignite has joined #openttd
19:36:36 <Samu> the slope checking is expensive t.t
19:36:44 <Samu> grr, how to fix
19:36:54 <Samu> must dissect it
19:43:43 <andythenorth> is it stuff?
19:44:02 <andythenorth> I have played tanks enough
19:44:07 <andythenorth> are we making the game?
19:48:14 <Samu> https://paste.openttdcoop.org/puwrfr4h7
19:48:31 <Samu> this part cost 80-107 ops
19:48:34 <Alberth> moin
19:48:43 <Samu> how to make it more efficient?
19:48:44 <Samu> halp
19:48:49 <Alberth> at least samu is making the game :)
19:49:18 <Samu> and if combined with the isbridge and istunnel checks it can go to 140s
19:52:14 *** Alberth has left #openttd
20:00:35 <nielsm> Samu try replacing the first 8 lines with this, it might be less ops: https://0x0.st/s3pR.txt
20:05:11 <Samu> woah, let me try that
20:05:32 <LordAro> looks nicer too :p
20:08:41 <Samu> i reduced from 107 to 98
20:08:46 <Samu> now testing nielsm code
20:09:23 <Samu> 86
20:09:26 <Samu> woah, thx
20:10:13 <Samu> i hope it's doing the same as before, i didn't really verify that
20:10:21 <nielsm> it should be
20:10:48 <nielsm> basically eliminates some redundant calls to the library (they might be expensive, might not) and some shared expression elimination
20:14:44 *** Gustavo6056 has joined #openttd
20:17:15 <Samu> tried this
20:17:16 <Samu> local NW = middle - AIMap.GetMapSizeX();
20:17:25 <Samu> local SE = middle + AIMap.GetMapSizeX();
20:17:29 <Samu> got 89
20:17:30 <andythenorth> so nielsm
20:17:34 <Samu> so yeah, it's worse
20:17:37 <andythenorth> what silly thing shall we do next? o_O
20:18:07 <LordAro> the same thing we do every night
20:18:57 <andythenorth> look at PRs and wonder how to get them approved? o_O
20:20:24 <LordAro> yup!
20:20:32 <nielsm> I was working on those GS controls of industry production levels
20:20:51 <nielsm> got slightly sidetracked by a swathe of cargo types :P
20:21:04 <LordAro> frosch123: you should merge some PRs
20:21:38 <andythenorth> I wondered about starting a patchpack
20:21:41 <LordAro> andythenorth: ^ that's how it works, right?
20:21:58 *** Gustavo6046 has quit IRC
20:21:58 *** Gustavo6056 is now known as Gustavo6046
20:22:14 <andythenorth> LordAro: sometimes :P
20:22:24 <andythenorth> hmm
20:22:33 <andythenorth> I think my C++ is too piss poor for me to maintain a PP
20:22:44 <andythenorth> and I don't think it will improve fast enough to be worth it
20:23:20 <LordAro> for the most part there's very little involved
20:23:24 <LordAro> only when they overlap
20:23:34 <LordAro> most of it is git skills >:)
20:23:39 <andythenorth> am I the only person still playing trunk?
20:23:59 <LordAro> what, svn trunk? :p
20:24:01 <andythenorth> git
20:24:05 <andythenorth> forums are all playing JGR
20:24:09 <andythenorth> pretty much universally
20:24:27 <LordAro> :/
20:24:31 <andythenorth> I assume a chunk of player base is just playing stable release
20:24:48 <LordAro> still seeing plenty of bug reports from 1.8.0
20:24:49 <andythenorth> JGR PP has won
20:25:03 <LordAro> the sooner 1.9.0 can happen the better, imo
20:25:14 <LordAro> also restored nightlies
20:25:16 <andythenorth> well...what can we do about it?
20:25:18 <andythenorth> o_O
20:25:25 <andythenorth> I can either help, or draw pixels
20:25:31 <andythenorth> of give money to Wargaming and play tanks
20:25:43 <andythenorth> of / or /s
20:25:59 <andythenorth> what blocks the new compile farm?
20:26:07 <LordAro> i think nightlies are purely dependent on TB
20:26:09 <nielsm> what needs to be done for nightly builds, apart from possibly something regarding money?
20:26:22 <andythenorth> TrueBrain did you have a trello or something for new CF?
20:26:27 <LordAro> or was it windows builds that were blocking?
20:26:32 <andythenorth> mumble mumble project management
20:26:40 <LordAro> mumble mumble bus factor
20:27:35 <LordAro> it's in my logs somewhere, lemme find it
20:28:28 <LordAro> https://trello.com/b/6j90aRB1/openttd
20:28:55 <andythenorth> cool
20:29:16 <andythenorth> ok so 'where to host it' is kind of a blocker?
20:29:37 <LordAro> that does sound familiar, because windows needs to be a separate host
20:30:41 <LordAro> i'm gonna do it
20:30:43 <LordAro> @seen TrueBrain
20:30:43 <DorpsGek> LordAro: TrueBrain was last seen in #openttd 1 week, 4 days, 0 hours, 2 minutes, and 26 seconds ago: <TrueBrain> typing is hard
20:30:51 <nielsm> if any junk machine will do I now have a small machine left over
20:30:59 <LordAro> huh, thought it was longer
20:31:07 <nielsm> my old htpc had its hdmi output fried so can't use it for multimedia purposes
20:31:14 <nielsm> but it could still serve as a build host
20:31:15 <nielsm> >_>
20:32:06 <LordAro> iirc TB had a grand plan involving kubernetes
20:32:20 *** Maarten has quit IRC
20:32:25 *** Maarten has joined #openttd
20:32:45 <andythenorth> I did bureacracy https://github.com/OpenTTD/OpenTTD/issues/6916
20:33:18 <LordAro> ono
20:33:54 <LordAro> oh, did github-dorpsgek get dumped on the other side of a netsplit?
20:34:01 <Samu> speaking of AIMap.GetMapSizeX()
20:34:11 <Samu> this thing is used almost everywhere
20:34:21 <Samu> maybe i should make it a global variable?
20:34:30 <Samu> or whatever you call it
20:34:31 <LordAro> Samu: well it's not going to change
20:34:48 <LordAro> so at least some sort of constant somewhere would seem appropriate
20:34:54 <LordAro> still probably premature optimisation
20:34:58 <Samu> ah, yes, a constant
20:35:23 <nielsm> if you need the value a lot just pull it into a local
20:36:13 <Samu> before the constructor thing, right?
20:36:16 <nielsm> having it in a global constant within a "namespace class" probably costs nearly just as much as having it behind a function
20:36:31 <Samu> oh :(
20:36:57 <nielsm> at least if it's similar to lua, then the lookup of a member in a global space is a bunch of ops in itself
20:37:52 <nielsm> get global namespace, look up named global, look up field in found object
20:37:59 <nielsm> and call it if it's a function
20:38:07 <nielsm> that's 3 or 4 ops to get
20:39:22 *** Wormnest has quit IRC
20:40:53 <LordAro> andythenorth: well, at least it will mean that TB gets sent an email :p
20:41:48 <Samu> testing
20:41:49 <andythenorth> :)
20:42:39 <Samu> 85
20:42:42 <Samu> yay
20:54:29 <Samu> oh yeah 84 now
20:54:57 <Samu> local map_size_x = this._map_size_x;
20:55:07 <Samu> very redundant but saves one more ops
20:59:15 *** tneo has quit IRC
20:59:21 *** tneo has joined #openttd
21:00:03 *** ^Spike^ has quit IRC
21:00:06 <Samu> testing
21:00:08 <Samu> function Road::_IsSlopedRoad(start, middle, end, map_size_x = Road._map_size_x)
21:00:14 *** ^Spike^ has joined #openttd
21:00:30 <Samu> 83!
21:01:02 <Samu> very funny stuff
21:01:26 <LordAro> oho, that's sneaky
21:01:39 <LordAro> remember that code readability is important
21:01:49 <LordAro> making microoptimisations is likely not worth it in the long run
21:02:07 <LordAro> (and it's probably just moving the op to the global level, rather than actually removing it)
21:02:59 <Eddi|zuHause> https://imgur.com/a/NqhMWNO that sounds like a great deal!
21:04:58 <Eddi|zuHause> "Give us all your data and your firstborn, so we can spam the fuck out of you. you get the chance to win a new smartphone"
21:09:50 <nielsm> https://0x0.st/s3fp.txt <- Samu try this, not sure if it's correct
21:10:33 <nielsm> uh fixed: https://0x0.st/s3ff.txt
21:13:07 <nielsm> https://0x0.st/s3fV.txt
21:13:55 <nielsm> https://0x0.st/s3fW.txt
21:14:45 <Eddi|zuHause> what kind of algorithm is generating your filenames?
21:15:06 <LordAro> sequential with other people using it, i think
21:15:07 *** Gustavo6056 has joined #openttd
21:15:15 <nielsm> yeah, it's not my hosting service
21:15:26 <nielsm> so just sequential in some high base
21:15:47 <Eddi|zuHause> but then, how is p->f->V->W a sequence?
21:16:12 <LordAro> huh
21:16:27 <LordAro> can you delete things, perhaps?
21:16:40 <nielsm> it shouldn't reuse names afaik
21:18:58 <nielsm> if this code is correct and my method of counting is correct too, I think it should top out at 20 ops
21:22:02 *** Gustavo6046 has quit IRC
21:22:02 *** Gustavo6056 is now known as Gustavo6046
21:22:33 *** glx has joined #openttd
21:22:33 *** ChanServ sets mode: +v glx
21:33:03 <LordAro> glx: hey, you're someone who can review & merge things as well :>
21:33:20 <glx> hmm yes
21:33:44 <andythenorth> north-fork
21:33:53 <LordAro> that said there are only 6 that aren't waiting on the author
21:33:59 <andythenorth> yes
21:34:06 <andythenorth> it's actually in pretty good shape
21:34:34 <andythenorth> 151 closed PRs
21:34:47 <LordAro> andythenorth: ok, i'm on your side now - do we close the ones that have been 3 months without activity?
21:35:07 <andythenorth> maybe
21:35:13 <andythenorth> like peter1138's?
21:35:16 <andythenorth> o_O
21:35:23 <LordAro> well if it's been 3 months...
21:35:26 <LordAro> they can always be reopened
21:35:31 <andythenorth> eh we could fix some issues
21:35:36 <andythenorth> here's a great one https://github.com/OpenTTD/OpenTTD/issues/6880
21:35:47 <LordAro> haha
21:35:52 <LordAro> shit, yeah
21:36:17 <LordAro> well, we know exactly why it's happening
21:36:21 <LordAro> the issue is how to fix it
21:36:25 <LordAro> i feel like i've said that already
21:38:07 <glx> hmm #6913 probably won't happen
21:38:19 <LordAro> no, i didn't think so
21:38:35 <andythenorth> can't see it
21:38:51 <glx> it's an issue
21:38:52 <andythenorth> too specific to DC?
21:38:59 <andythenorth> I mean I can't see it happening :)
21:39:52 <glx> ha yes too specific, and if we start to add something like that all other similar stuff will be asked
21:40:15 <LordAro> i think that's a "you're welcome to implement it yourself, but lol no"
21:40:48 <Eddi|zuHause> that sounds like something for an admin port library?
21:40:57 <glx> next they will ask for twitch integration
21:41:31 <Eddi|zuHause> same response
21:41:43 <glx> ah yes I think an admin port library could do that
21:42:28 <nielsm> "run this other program too to make the game show up" is not a great solution though
21:43:07 <LordAro> some sort of "ottd_discord" wrapper wouldn't be too difficult from there though
21:44:09 <nielsm> otherwise a kind of plugin system
21:44:23 <andythenorth> all your openttd belong to us
21:48:13 <LordAro> i could hack it so that if you've got "Apple LLVM" compiler, it just forces it to some reasonable version
21:49:26 <LordAro> or we could revert that change so that c++11 isn't actually "required"
21:49:28 <LordAro> or both
21:50:43 <Eddi|zuHause> what is the actual problem? it can't read the version number correctly?
21:50:49 <LordAro> basically, yeah
21:51:01 <LordAro> because apple are stupid and wipe out all trace of the actual clang version number
21:51:05 <Eddi|zuHause> does it maybe choke on some unprintable characters like colour codes?
21:51:35 <andythenorth> it's something like this (or similar) https://stackoverflow.com/questions/33603027/get-apple-clang-version-and-corresponding-upstream-llvm-version
21:52:28 <Eddi|zuHause> brb
21:53:19 *** Eddi|zuHause has quit IRC
21:53:57 *** nielsm has quit IRC
21:55:18 *** sla_ro|master has quit IRC
21:56:12 *** Gja has quit IRC
22:14:59 *** Gustavo6056 has joined #openttd
22:21:35 *** Thedarkb-T60 has joined #openttd
22:22:33 *** Gustavo6046 has quit IRC
22:22:33 *** Gustavo6056 is now known as Gustavo6046
22:24:09 *** Thedarkb1-T60 has joined #openttd
22:25:03 *** Eddi|zuHause has joined #openttd
22:26:31 <LordAro> andythenorth: can you add a `echo "foo: $cc_version"` on line 1329 of config.lib ?
22:27:01 <LordAro> according to the issue, you should be getting "version" 91
22:27:13 <LordAro> issue comments*
22:27:19 <LordAro> but that shouldn't be causing any issues#
22:27:23 <andythenorth> ok BRB
22:28:28 <LordAro> if [ "$cc_version" -lt "30" ]; then branch is triggering, but i don't see how
22:30:24 *** Thedarkb-T60 has quit IRC
22:31:52 <andythenorth> foo: 10
22:32:01 <andythenorth> printed twice
22:32:44 <LordAro> hmm
22:32:48 <andythenorth> https://paste.openttdcoop.org/pc8x0pggn/losr1y/raw
22:32:50 <LordAro> well that explains the version issue
22:33:19 *** Eddi|zuHause has quit IRC
22:33:21 <LordAro> for my own peace of mind, can you run `cc -v 2>&1 | head -n1` ?
22:33:35 <LordAro> and also clang -v 2>&1 | head -n1
22:33:36 <andythenorth> Apple LLVM version 9.1.0 (clang-902.0.39.2)
22:33:45 <andythenorth> Apple LLVM version 9.1.0 (clang-902.0.39.2)
22:33:52 <LordAro> gcc ?
22:34:42 <andythenorth> clang: error: no input files
22:34:56 <LordAro> `gcc -v 2>&1 | head -n1` :p
22:35:02 <andythenorth> I wondered :P
22:35:10 <andythenorth> I learnt to only paste what people type :P
22:35:23 <andythenorth> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
22:35:46 <LordAro> that's... really stupid
22:35:51 <LordAro> but explains where the 10 comes from
22:36:00 <LordAro> (MacOSX10.13.sdk)
22:36:04 <andythenorth> yair
22:36:45 <andythenorth> https://paste.openttdcoop.org/pesaw5ntw/twsacw/raw
22:37:19 *** Eddi|zuHause has joined #openttd
22:37:51 <andythenorth> Eddi|zuHause: so why won't this work then? o_O https://github.com/OpenTTD/OpenTTD/issues/6915
22:37:57 * andythenorth assumes there's a reason
22:39:12 <Eddi|zuHause> andythenorth: it was never implemented because... it's complicated (tm)
22:39:24 <LordAro> hmm, i guess that could work... replace 1328 with: cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`"
22:40:01 <andythenorth> foo: 91
22:40:10 <LordAro> excellent
22:40:13 <LordAro> try compiling
22:40:34 * andythenorth compiling
22:41:40 <andythenorth> not sure if I have the vars set here, do they persist past a computer restart?
22:41:41 <andythenorth> https://github.com/OpenTTD/OpenTTD/issues/6880#issuecomment-411533866
22:41:51 <andythenorth> or I could just explicitly clear them
22:42:04 <andythenorth> oh meanwhile
22:42:05 <andythenorth> clang: error: linker command failed with exit code 1 (use -v to see invocation)
22:42:06 <LordAro> andythenorth: not unless you `export`ed them
22:42:17 <LordAro> that's disappointing
22:42:25 <Eddi|zuHause> andythenorth: anyway, CB36 doesn't have any way to access the to-be-shuffled properties, because of recursiveness
22:42:27 <LordAro> that could be the iconv thing again
22:42:40 <andythenorth> Eddi|zuHause: that's kind of a blocker :)
22:42:53 <Eddi|zuHause> andythenorth: proper way is to actually reorder the articulated vehicles
22:42:54 <LordAro> andythenorth: just to confirm, LDFLAGS="-liconv" ./configure && make ?
22:43:18 <andythenorth> LordAro: works now
22:43:20 <andythenorth> with that
22:43:37 <LordAro> mm
22:43:45 <andythenorth> Eddi|zuHause: how will I do stupid livery tricks on flip then? :P
22:43:52 <andythenorth> if the vehicles actually reverse :(
22:43:58 <Eddi|zuHause> andythenorth: you don't.
22:44:50 <andythenorth> LordAro: so does that advance us any further? o_O
22:45:30 <Eddi|zuHause> more important question: try to resurrect this starting-to-show-old-age computer or just suck it and buy a new one?
22:45:39 <LordAro> andythenorth: it does!
22:46:01 <andythenorth> Eddi|zuHause: try to resurrect it
22:46:07 <andythenorth> then regret
22:46:18 <Eddi|zuHause> already beyond those two phases
22:46:20 <LordAro> next issue is iconv(.h) detection, but it looks like you can override that for now with ./configure --with-iconv - no need for environment variables
22:46:55 <LordAro> if you want to continue, i'd be interested in the output of `find / -name iconv.h 2>/dev/null`
22:46:55 <andythenorth> configure: error: iconv couldn't be found
22:47:00 <LordAro> damn
22:47:07 <andythenorth> that wasn't output from find
22:47:16 <andythenorth> that was from configure parameter
22:47:23 <Eddi|zuHause> --with-iconv=path?
22:47:28 <LordAro> ah yeah, i misread the thing
22:47:36 <LordAro> Eddi|zuHause: that'd work, just a matter of determining the path
22:47:45 <LordAro> and working out why the configure script isn't checking it by default
22:47:54 <andythenorth> the find command prints the path
22:48:01 <andythenorth> "/usr/local/Cellar/libiconv/1.15/include/iconv.h"
22:48:03 *** Exec has quit IRC
22:48:03 *** Exec has joined #openttd
22:48:13 <LordAro> just that one?
22:48:17 <andythenorth> just that one
22:48:26 <andythenorth> obvs. varies per mac eh
22:48:48 <LordAro> yeah...
22:56:17 *** Thedarkb1-T60 has quit IRC
22:56:32 *** Thedarkb-T60 has joined #openttd
22:57:33 *** Progman has quit IRC
22:58:13 <LordAro> andythenorth: at the risk of asking the obvious, are you sure iconv is installed "properly" ?
22:58:31 <andythenorth> it's installed using one of the 2 sensible ways
22:58:58 <andythenorth> I could reinstall
22:59:46 <andythenorth> I'll see if there's any upgrade
23:00:02 * andythenorth waiting for ports tree :P
23:03:31 <LordAro> for whatever reason, the build system is expecting /usr/include/iconv.h or /usr/local/include/iconv.h
23:03:47 <LordAro> i don't know enough about OSX to know why you've got a /usr/local/Cellar
23:03:55 <LordAro> and why iconv is in there
23:04:15 <LordAro> but fwiw, ./configure --with-iconv=/usr/local/Cellar/libiconv/1.15 will work
23:04:38 <lethosor_> That's from homebrew
23:04:55 <andythenorth> the options on macos are homebrew or macports
23:05:03 <andythenorth> or installing your own in the system
23:05:16 <andythenorth> which inevitably breaks when Apple upgrade the OS
23:05:27 <lethosor_> Generally Homebrew will install packages to /usr/local, but maybe not for iconv
23:06:26 <LordAro> hmm, i could do some fanciness to just iterate over the searchpaths...
23:06:44 <LordAro> instead of just /usr/include & /usr/local/include
23:08:04 <andythenorth> allegedly homebrew is supposed to symlink /usr/local/opt/
23:09:31 <andythenorth> seems it does afaict
23:12:22 *** Eddi|zuHause has quit IRC
23:12:39 *** Eddi|zuHause has joined #openttd
23:13:03 <lethosor_> LordAro: homebrew normally links packages it installs into /usr/local. In the case of libiconv, it does not, because macOS distributes libiconv itself
23:13:19 <andythenorth> such fun
23:13:23 <lethosor_> brew info libiconv: "Caveats: libiconv is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble."
23:13:58 <lethosor_> are you still having issues with linking it? not that it helps, but it works fine for me with homebrew, despite that
23:15:05 *** Samu has quit IRC
23:15:15 *** Gustavo6056 has joined #openttd
23:15:59 <LordAro> nothing has any issue linking it
23:16:10 <LordAro> all andythenorth needs to do is force it with ldflags
23:16:33 <LordAro> but the build system is only checking /usr/{local/,}include/ for iconv.h
23:16:42 <LordAro> hang on, i'm putting a branch together
23:17:38 *** Samu has joined #openttd
23:17:40 <Samu> back
23:18:44 *** ttech2 has quit IRC
23:19:47 *** Ttech has joined #openttd
23:19:47 <LordAro> andythenorth: feel like trying https://github.com/LordAro/OpenTTD/tree/macosx-clang-iconv-fix ?
23:20:19 <Samu> where is nielsm
23:21:48 <andythenorth> probably gone to bed
23:21:57 *** rocky113844 has quit IRC
23:22:32 *** Gustavo6046 has quit IRC
23:22:32 *** Gustavo6056 is now known as Gustavo6046
23:22:39 * andythenorth cloning
23:25:54 <Samu> got 49 ops
23:26:02 <Samu> he said it would top at 20
23:26:04 <Samu> :(
23:28:04 *** frosch123 has quit IRC
23:28:07 <LordAro> Samu: well that's still nearly half what you had
23:30:01 <Samu> wait,
23:30:03 <Samu> 44
23:30:18 <Samu> im not sure what is to edit out
23:30:32 <andythenorth> LordAro: test compiling :P
23:30:38 <LordAro> \o/
23:30:51 <andythenorth> eh, let's see if it finished
23:31:52 <Samu> does his code account for IsSteepSlope
23:31:53 <Samu> ?
23:32:06 <LordAro> i think that's for you to work out
23:32:29 <andythenorth> LordAro: compiled, runs
23:32:32 <andythenorth> :)
23:32:36 <LordAro> \o/
23:32:38 * LordAro PRs
23:32:42 <andythenorth> awesome thanks
23:32:48 <Samu> too cody for my brain
23:33:03 *** HerzogDeXtEr has quit IRC
23:34:42 <Samu> i'm always getting 44, that seems fishy
23:36:09 <Samu> i have an idea
23:36:50 <Samu> to see if his function outputs the same result, i'm gonna use this function twice and then assert compare between each other
23:37:08 *** rocky1138 has quit IRC
23:37:31 *** rocky1138 has joined #openttd
23:41:18 <LordAro> wait, crap, i can create branches on OpenTTD/OpenTTD as well?
23:41:33 <andythenorth> :o
23:41:37 <andythenorth> the power
23:41:38 * LordAro deletes
23:41:40 <LordAro> you saw nothing
23:41:57 <LordAro> still can't merge PRs though :p
23:42:53 <Samu> assert(self._IsSlopedRoad(par_tile, prev_tile, new_tile) == self._IsSlopedRoadEfficient(par_tile, prev_tile, new_tile));
23:43:01 <Samu> keks
23:43:57 *** gelignite has quit IRC
23:44:57 <Samu> assertion failed... rip
23:45:27 <Samu> either i misunderstand what needs to be edited, or...
23:59:29 <Samu> local t = AITile; this didn't save any op
23:59:53 <Samu> remained the same