Log for #openttd on 20th August 2017:
Times are UTC Toggle Colours
00:03:53  <Wolf01> 'night
00:03:56  *** Wolf01 has quit IRC
00:19:42  *** wroom has joined #openttd
00:19:54  <wroom> hello, anyone up?
00:20:49  <wroom> anyone knows where to find more info about writing AI scripts?
00:21:48  <wroom> nevermind just found this:
00:22:25  *** mescalito has quit IRC
00:28:00  *** wroom has quit IRC
00:31:35  *** Progman has quit IRC
01:01:03  *** supermop has joined #openttd
01:09:04  *** supermop has quit IRC
01:09:46  *** Flygon has joined #openttd
01:11:47  *** supermop has joined #openttd
01:14:29  *** supermop_home has joined #openttd
01:19:48  *** supermop has quit IRC
01:26:36  *** supermop_home has quit IRC
01:30:47  *** gelignite has quit IRC
01:38:12  *** luxtram has quit IRC
01:38:52  *** luxtram has joined #openttd
01:40:48  *** orudge` has quit IRC
01:40:58  *** orudge` has joined #openttd
01:40:58  *** ChanServ sets mode: +o orudge`
01:54:22  *** chomwitt has quit IRC
02:06:26  *** orudge` has quit IRC
02:06:39  *** orudge` has joined #openttd
02:06:39  *** ChanServ sets mode: +o orudge`
02:06:47  *** glx has quit IRC
03:23:34  *** debdog has quit IRC
03:28:36  *** debdog has joined #openttd
03:40:15  *** sim-al2 is now known as Guest2886
03:40:16  *** sim-al2 has joined #openttd
03:41:04  *** supermop_home has joined #openttd
03:44:50  *** Guest2886 has quit IRC
05:01:14  *** JGR__ has joined #openttd
05:07:10  *** JGR_ has quit IRC
05:11:15  *** supermop_home has quit IRC
05:13:09  *** Alberth has joined #openttd
05:13:09  *** ChanServ sets mode: +o Alberth
05:29:12  *** orudge` has quit IRC
05:29:14  *** orudge` has joined #openttd
05:29:15  *** ChanServ sets mode: +o orudge`
05:31:49  *** sla_ro|master has joined #openttd
05:31:54  <V453000> iz dog iz cat
05:31:56  <V453000> iz python
05:43:08  *** supermop has joined #openttd
05:44:14  *** chomwitt has joined #openttd
05:45:20  <Alberth> o/
05:48:17  <V453000> o/
05:48:28  <V453000> assembling giant list is really fun to debug
05:48:32  <V453000> fun as in wtf :D
05:50:06  <Alberth> can't you make the sub-lists smaller temporarily?  eg insert sub_list = [''stuff xyz"]
05:50:42  <Alberth> or split assembly out into a separate function that takes all the sublists
05:50:56  <Alberth> so you can develop and test it separately
05:53:16  <V453000> I basically do
05:53:29  <V453000> I found the issue, just added some debug code :)
05:53:40  <Alberth> yep, good tactic :)
05:54:20  <Alberth> the alternative is pdb, a debugger, but that works better if you have to closely follow all the steps it takes
05:54:47  <V453000> haha well I basically do that, I just put the debug function in every step :D
05:55:27  <Alberth>
05:55:49  <Alberth> interactive command line to step through each line, print vars, etc
05:56:35  <V453000> :)
05:57:05  <Alberth> :O it's even readable :p
05:57:28  <Alberth> I usually do stuff like  print(n, len(lst))
05:57:38  <V453000> yeah well I don't test it separately
05:57:42  <V453000> so I need readability
05:57:54  <V453000> as there are other things printed all over the place
05:58:11  <Alberth> ah, too much output :p
05:58:25  <V453000> now I need to see how the F do 257 items appear in the list
06:01:28  <Alberth> json?
06:03:13  *** andythenorth has joined #openttd
06:03:23  <Alberth> more python lovers, o/
06:15:26  <andythenorth> lo
06:16:03  * andythenorth has never learnt pdb
06:16:14  <andythenorth> print(foo) covers all evil
06:16:46  <Alberth> I hardly use pdb too
06:17:55  <Alberth> last time I had a 15-20 'if' statements, and one of them fired, and I needed to know which one, and why
06:18:22  <Alberth> startup took 6 minutes, so I didn't want to do many runs :p
06:29:12  <andythenorth> ok so I’ve rage quit on reviewing bugs :D
06:29:19  <andythenorth> well, more just quit
06:29:27  <andythenorth> bugs / patches /s
06:29:50  * andythenorth now looking at the 161 bugs in FS
06:29:51  <Alberth> yeah, it's complicated
06:30:16  <andythenorth> reviewing?
06:30:29  <Alberth> yes, reviewing is complicated
06:30:37  <andythenorth> it’s above all just boring
06:31:14  <Alberth> code isn't so bad to review, or figuring out if it is proper is also somewhat doable, but deciding whether it is a good addition is a nightmare
06:31:20  <andythenorth> working on stuff I want for the game ~= doing other fun life things > working on stuff other people want for the game
06:31:44  <Alberth> for most stuff, the entire idea is quite alien to me
06:31:55  <andythenorth> +1
06:32:09  <andythenorth> it’s also way too much like work
06:32:42  <andythenorth> 2 out of 75 patches interest me
06:32:45  <andythenorth> and one is just a typo
06:32:53  <andythenorth> in translation keys
06:32:57  <andythenorth> but code quality is important :)
06:33:05  <Alberth> that typo thing does get in the way, doesn't it? :p
06:33:24  <andythenorth>
06:33:59  <Alberth> :O a real one, how nice
06:34:02  <andythenorth> presumably changing a lang string ID breaks all current translations?
06:34:14  <peter1138> hi
06:34:29  <andythenorth> hi peter1138
06:35:19  <Alberth> no, wolf also changed the string names in the translations
06:36:37  <andythenorth> seems fair
06:37:01  <andythenorth> ha, a patch that peter1138 hasn’t lost on his filesystem
06:41:37  *** HerzogDeXtEr has joined #openttd
06:41:37  <peter1138> yes that patch wasn't satisfactory
06:44:46  * andythenorth closes a bug
06:45:38  <Alberth> hmm, how did wolf miss src/lang/frisian ?
06:46:46  <andythenorth> :)
06:48:05  <andythenorth> in other places
06:48:14  <andythenorth> some bugs get closed as ‘this is a total tarpit’
06:48:31  <andythenorth> where even diagnosing the issue outweighs any possible benefit
06:48:48  <andythenorth> I would file this under ‘tarpit’
06:50:00  <Alberth> timetables **are** very broken
06:50:32  <andythenorth> they’re just a wrong concept
06:50:42  <andythenorth> but my prejudice against them is on record :P
06:50:52  <Alberth> not sure, they do keep the vehicles somewhat spread out over the entire route
06:51:03  <andythenorth> except when they break...
06:51:17  <Alberth> which beats clumping up, so only the first vehicle makes any profit
06:51:29  <Alberth> oh, you need loads of slack :p
06:51:42  <Alberth> and lots of patience to get themselves sorted out
06:51:52  <andythenorth> I just wonder who, ever, might sit and diagnose that bug :)
06:51:54  <Alberth> and a place where they can pass each other
06:51:58  <andythenorth> and what’s gained by fixing it :)
06:52:03  *** mescalito has joined #openttd
06:52:21  <Alberth> I use it mostly in pax & mail services
06:52:31  <andythenorth> here’s another
06:52:32  <Alberth> where you just run around
06:52:37  <andythenorth> file failed to download, once
06:52:52  <andythenorth> which given upstream issues, transient connectivity failure etc
06:53:01  <andythenorth> or local filesystem errors
06:53:08  <andythenorth> is imho a tarpit
06:54:10  <Alberth> yeah, the error cause is not trackable
06:54:15  <andythenorth> closing
06:54:22  <Alberth> but "error window not on top" is something we might want to fix
06:55:02  <andythenorth> fair
06:55:14  *** debdog has quit IRC
07:01:52  <andythenorth> I have tried to repro this, got nothing
07:02:36  *** debdog has joined #openttd
07:05:35  <Alberth> perhaps an interaction between sea level and rough land or so
07:05:45  <Alberth> but it's nice swamp-ish land :p
07:07:15  <andythenorth> no repro, no fix :)
07:07:16  <Alberth> :O  frisian isn't even used
07:09:46  <andythenorth> is there any way to see map settings on a save?
07:09:57  <andythenorth> I want to try and repro from the attached save on 6216
07:11:19  <DorpsGek> Commit by alberth :: r27894 /trunk/src (55 files in 3 dirs) (2017-08-20 09:11:08 +0200 )
07:11:20  <DorpsGek> -Fix [FS#6608]: Typo fix in STATIOV_* string names (Wolf01)
07:11:44  <Alberth> likely they are stored in the variables you can see in the console
07:12:12  * andythenorth had better learn to debug better
07:14:26  <andythenorth> ok, using same seed as save in 6216, I can’t repro
07:14:32  <andythenorth> I don’t have exact settings
07:14:41  <andythenorth> also, not being able to copy-paste in console
07:14:42  <andythenorth> is crap
07:15:06  <Alberth> you also need the exact same version
07:15:11  <andythenorth> ach
07:15:15  <Alberth> seed is version dependent
07:15:18  <andythenorth> lawks
07:15:39  <andythenorth> ok, well I’m not going back to 1.5.0 beta to repro :)
07:15:48  <andythenorth> it doesn’t happen in 1.7.1 or 1.6.1
07:16:11  <Alberth> at least not trivially reproducible :p
07:16:39  <andythenorth> we’d have reports if it was frequent
07:16:58  <Alberth> the general landscape is a major step forward compared with the original terrain generator, so who's complaining :)
07:17:20  <andythenorth> are you saying “Feature not bug”? :P
07:17:44  <Alberth> don't think so
07:18:40  <andythenorth> it’s a bit of a second class environment for developers eh?
07:18:43  <andythenorth> no tab complete
07:18:46  <andythenorth> no copy-paste
07:18:58  <andythenorth> not much in the way of tests
07:19:28  <andythenorth> no known-good test data (or known-bad test cases)
07:19:40  <Alberth> /me ponders linking the "most tests are useless" article :p
07:19:50  <andythenorth> functional tests aren’t useless
07:20:04  <Alberth> there are a few regression tests in the AI area
07:21:23  <andythenorth> one of the most valuable things I’ve seen is known-good content
07:21:33  <andythenorth> in ottd, that would be savegames
07:22:16  * andythenorth thinking
07:22:27  <Alberth> yeah, I do such tests too at work
07:22:46  <Alberth> but it mostly works if you have a quick decision check
07:22:54  *** debdog has quit IRC
07:23:21  <andythenorth> I haven’t made any so far because I’d break them all the time
07:23:30  <andythenorth> my usual case is testing newgrf
07:23:43  <Alberth> defining "it's correct" in an openttd game is far from trivial
07:23:51  <andythenorth> so, e.g. testing FIRS production means setting up vehicle routes, running the game blah blah
07:23:59  <andythenorth> but then I break the savegame with changes :P
07:24:11  <Alberth> factorio builds and runs such tests
07:24:34  <Alberth> probably by executing some script to build the setup
07:24:43  <andythenorth> AI or GS then
07:24:48  <Alberth> and deciding by something happening
07:28:19  *** supermop_home has joined #openttd
07:29:05  *** debdog has joined #openttd
07:29:35  *** supermop has quit IRC
07:41:24  *** Wolf01 has joined #openttd
07:41:41  <Wolf01> o/
07:41:44  <Alberth> o/
07:42:09  <Wolf01> "Missed the 'src/lang/frisian.txt' file, but it seems that isn't even compiled." <- I don't even have it
07:42:35  <Alberth> :O
07:42:49  <Wolf01> Something fishy?
07:43:06  <Alberth> clearly, but no idea what's happening
07:43:25  *** Progman has joined #openttd
07:43:35  *** supermop_home_ has joined #openttd
07:44:33  <Alberth> it's src/lang/unfinished/frisian.txt
07:45:25  <Alberth> svn reports it as a file in the VCS
07:45:52  <Wolf01> Yes it's there
07:46:07  <Wolf01> Oh, VS can't find those one
07:46:08  <Alberth> as you had all other unfinished languages in the patch
07:46:49  <Wolf01> I think they are excluded from the solution
07:47:13  <Alberth> it is, the file isn't build by strgen
07:47:18  <Alberth> *lng* file
07:47:46  <Wolf01> Shit, I can't rely on IDE file search
07:48:36  *** supermop_home has quit IRC
07:48:52  <Alberth> clearly, you must have all files marked as part of the project, or they don't exist :p
07:49:01  <Alberth> but silly indeed
07:49:09  <Wolf01> Even with "show all files
07:50:14  <peter1138> bash + vim isn't an IDE?
07:50:34  <Alberth> to some it isn't
07:50:43  <Alberth> they like to make their own wheel
07:51:42  <Alberth> in particular OS manufacturers that believe a computer is a useful tool without a compiler on it
07:53:05  *** orudge` has quit IRC
07:53:29  *** orudge` has joined #openttd
07:53:30  *** ChanServ sets mode: +o orudge`
07:55:12  <Wolf01> It's an OS for the masses ;)
07:57:02  <Alberth> such a shame, using it as just a glorified type writer
07:57:28  <Alberth> :)
07:58:34  *** supermop_home has joined #openttd
07:59:48  *** supermop_home_ has quit IRC
08:01:51  *** frosch123 has joined #openttd
08:01:57  <Wolf01> Quak
08:03:02  <frosch123> hoi
08:04:15  *** sim-al2 is now known as Guest2901
08:04:16  *** sim-al2 has joined #openttd
08:09:19  *** Guest2901 has quit IRC
08:11:11  <andythenorth> o_O
08:11:15  <andythenorth> fix looks valid
08:11:57  <Wolf01> Yes
08:12:35  * andythenorth compiling it
08:13:16  *** supermop_home_ has joined #openttd
08:14:49  *** supermop_home has quit IRC
08:15:11  <Wolf01> Fix is incomplete
08:15:21  <andythenorth>
08:15:32  <andythenorth> Wolf01: what did I miss? o_O
08:16:00  <Wolf01> Oh no, it's right, I just found twice the same result as I looked for the string
08:16:13  <Wolf01> (3 results)
08:16:52  <Alberth> language files are in some other part?
08:16:58  * Wolf01 still sleeping
08:17:58  <andythenorth> yeah that one should go in imo
08:18:28  <Wolf01> Agreed
08:18:57  *** Progman has quit IRC
08:19:10  <Wolf01> Mark it with patch
08:19:42  <Alberth> don't bother, I'll add it
08:19:59  <andythenorth> I already did it
08:20:11  <andythenorth> it’s interesting have ‘with patch’ and ‘patch’ as status and type
08:20:22  <andythenorth> bug trackers are always confusing :)
08:20:24  <Alberth> quick andy :)
08:20:41  <andythenorth> admin is my main job :P
08:20:56  <andythenorth> how do I set the game seed?
08:21:02  * andythenorth trying to make sense of
08:21:13  <andythenorth> I can’t find a console command to set the seed
08:21:25  <Wolf01> Patch type is confusing... patch for what? Feature? Bug? Just codechange?
08:21:25  <andythenorth> there is EBKAC somewhere
08:21:33  *** ToBeFree has joined #openttd
08:21:51  <andythenorth> :)
08:22:51  <Wolf01> I marked mine as "feature request" and I would have set the status as "with patch" but I have a branch for it instead
08:23:04  <andythenorth> eh, 6604 is dull, I’m not exploring that any further :P
08:24:02  <Wolf01> Set the seed via console (set generation_seed N) <- OMG there it is
08:24:53  <andythenorth> yes
08:25:08  <andythenorth> but there’s not copy-paste and no tab-complete
08:25:24  <andythenorth> I’m not sitting typing all that out to reproduce his 5 different cases
08:25:30  * andythenorth makes way too many typos for that
08:25:46  <Wolf01> You could use "1" as seed
08:26:15  <andythenorth> too lazy
08:26:28  * andythenorth looking for other FS
08:26:34  <Wolf01> I'm going to try it with the tropic tgp change
08:26:36  <andythenorth> 453 left
08:27:27  <andythenorth> anyone got 4K monitor? :P
08:27:29  <andythenorth>
08:27:54  *** supermop has joined #openttd
08:28:08  <DorpsGek> Commit by alberth :: r27895 trunk/src/vehicle_gui.cpp (2017-08-20 10:28:05 +0200 )
08:28:09  <DorpsGek> -Fix [FS#6606]: Tooltip of 'increase service interval' said 'decrease' (adf88)
08:28:18  <Wolf01> <andythenorth> but there’s not copy-paste and no tab-complete <- are you kidding? I've just done it
08:28:34  *** supermop_home has joined #openttd
08:28:36  <andythenorth> ho :)
08:28:40  <andythenorth> what am I doing wrong? o_O
08:29:02  <andythenorth> oh so there’s paste
08:29:09  <andythenorth> but not copy, because no text caret?
08:29:43  <andythenorth> is inflation a supported feature?
08:29:48  <andythenorth>
08:30:02  * andythenorth would sunset inflation w.r.t fixing it
08:30:18  <andythenorth> it’s fundamentally broken, and minor fixes are a waste of time
08:30:56  <Wolf01> OK, SE doesn't obey to the seed too
08:31:38  <Wolf01> Tried setting it after and before clicking on "random land"
08:33:28  <Alberth> making inflation somewhat configurable might not be a bad idea
08:33:34  *** supermop_home_ has quit IRC
08:33:40  <Alberth> users could then tune the disaster :p
08:34:10  <Wolf01> Ok, I know what to do: add a seed textbox and only save the seed in settings when confirmed
08:34:17  <Alberth> but I just turn it off, I am not interested in money
08:34:17  <andythenorth> Alberth: part of ES :P
08:34:22  <andythenorth> I turn it off too
08:34:27  <andythenorth> game does not need inflation
08:34:33  <andythenorth> did TTD have it?
08:34:36  <Alberth> yes
08:35:22  <andythenorth> so the OpenTTD innovation was to enable disabling it :P
08:35:26  <andythenorth> hmm
08:35:55  *** supermop has quit IRC
08:36:05  <Alberth> I don't know if it was configurable in TTD, probably not
08:36:22  <Alberth> or it was linked to bank interest rate or so
08:36:27  <Alberth> perhaps it still is
08:37:14  <andythenorth> I would delete it
08:37:20  <andythenorth> I know I say that about everything it
08:37:26  <andythenorth> but I am serious about this one
08:37:38  <andythenorth> even though it violates a core game goal (preserving TTD gameplay)
08:37:48  <andythenorth> it causes bug reports that no-one is interested in fixing
08:37:59  <andythenorth> and it also causes bug reports for newgrf authors
08:38:12  <andythenorth> delete, migrate savegames to just drop it
08:38:14  <Alberth> we also get bug reports about stupid default vehicle set
08:38:42  <andythenorth> sometimes things need killed with fire
08:38:57  <Alberth> :D
08:39:33  <andythenorth> I will field the brief inevitable whining if someone else does the rm
08:40:36  <andythenorth> an alternative is to move it to newgrf / GS
08:40:41  <andythenorth> but I think it’s TMWFTLB
08:42:26  * andythenorth wonders how it currently works
08:42:42  <andythenorth> presumably there’s an inflation factor applied to every cost calc
08:42:56  <Wolf01> >_> seed gets overwritten somewhere
08:43:00  <andythenorth> probably I look for CMD_COST or so
08:47:47  <Wolf01> Boys... GenerateWorld was called with "reset settings = true" in SE
08:48:40  <Wolf01> Now I understand why a lot of stuff I set between tests got reset
08:50:21  <Wolf01> BTW, it resets the seed anyway, even with that set as false
08:51:03  <andythenorth> is that desirable? o_O
08:51:10  <Eddi|zuHause> what would not resetting the seed help? the seed gets changed every time you generate a random number
08:51:12  <Wolf01> Yes and no
08:51:14  <andythenorth> seems odd to have console commands for settings, then throw them away?
08:55:07  *** tycoondemon has quit IRC
08:59:51  <andythenorth> 451 FS
09:00:06  <andythenorth> if I can get to 420 without cheating
09:00:17  <andythenorth> that’s ~50% of the number at start of August
09:00:24  <andythenorth> also bbl
09:00:25  *** andythenorth has quit IRC
09:02:41  <Wolf01> How do I properly debug the seed? It always shows -290403268
09:03:41  <Alberth> likely there are at least 2 seeds, one in the configuration, and one that is used in the random number generator
09:04:23  <Alberth> if you load a game, probably even 3
09:04:37  <Alberth> but basically, find uses
09:04:55  <Alberth> setting a watch on reading or writing may also work
09:05:15  <Wolf01> No, I mean, what to set in DEBUG() as number placeholder
09:05:39  <Wolf01> Ok, found it %u
09:05:49  <Alberth> yeah, I would guess printf-style
09:05:58  <Eddi|zuHause> i'd try %x
09:06:14  <Eddi|zuHause> but i always forget printf stuff
09:06:25  <Wolf01> Me too
09:16:08  *** chomwitt has quit IRC
09:17:19  <_dp_> o/
09:17:25  <Wolf01> Ok, I could set what I want to game_config, it always discards game_config and copies it from newgame_config
09:19:35  <Alberth> makes sense
09:20:39  <Wolf01> Not according to this comment: /* Copy all XXX_newgame to XXX when coming from outside the editor */
09:20:47  <Wolf01> I'm still inside the editor
09:21:25  <Alberth> :O
09:21:57  <Wolf01> That is in StartGeneratingLandscape()
09:22:32  <Wolf01> And doesn't check where we are or were we are coming from
09:23:45  <Alberth> on entering the SE it gets copied too? Otherwise you have no sane start values
09:24:03  <_dp_> yeah that game/newgame thing always looked like a bug incubator to me
09:24:27  <_dp_> in every function changing settings you need to keep track in which context is it executed
09:24:41  <_dp_> and never call one fuction in two contexts if it's not prepared
09:25:06  <_dp_> but yeah, globals :p
09:25:54  <Wolf01> That's why I wanted to switch to a singleton with accessors, and do that logic there and only there
09:26:40  <_dp_> Wolf01, singleton is just a fancy name for a global :p
09:26:44  <Wolf01> No more _game_mode changes but X.ChangeGameMode(GM_EDITOR)
09:26:58  <Wolf01> Yes, but it's not a variable without any control
09:27:15  <Wolf01> And the logic must be done there
09:27:26  <Alberth> making it an object-like thing with methods helps a lot
09:27:26  <Wolf01> So you know it always behave the same way
09:28:06  *** FLHerne has joined #openttd
09:28:16  <Alberth> also "foo = new Foo()"  and passing foo to everybody, is just as global, it's just more clear who gets it
09:28:22  <Wolf01> I started with _game_mode and works fine, but with _switch_mode I have some problems, since it seem deferred
09:28:45  <Alberth> yeah, switching game modes is weird to say the least
09:28:50  <_dp_> well, yeah, I guess it's slighly better
09:28:57  <_dp_> but still not very testable, etc.
09:28:58  <Wolf01> As you do _switch_mode = XYZ  ... logic ... SwitchToMode()
09:29:39  <Alberth> dp, small steps :)
09:29:54  <Eddi|zuHause> i think frosch123 had some "newgrf utopia" thing, which needs proper contexts where you can test stuff
09:30:25  <Alberth> likely
09:31:04  <_dp_> Alberth, :)
09:31:44  <_dp_> actually, I did pretty much the same to citymania/luukland server, moving everything to one superclass and having just one _game global
09:33:14  *** debdog has quit IRC
09:34:26  <Wolf01>
09:34:31  <_dp_> but that's about the only viable solution there, I don't want to change interfaces of vanilla functions, that would be a disaster to merge
09:34:41  *** orudge` has quit IRC
09:34:45  *** orudge` has joined #openttd
09:34:45  *** ChanServ sets mode: +o orudge`
09:36:02  <_dp_> Wolf01, I'd opt for a single _globals instance instead of statics class, would be easier to unglobal it later
09:36:21  <Wolf01> You can't put logic in variables
09:36:44  <_dp_> _globals.is_game_mode(GM_NORMAL)
09:36:55  <Eddi|zuHause> uhm, yeah you can, it's called "class"
09:36:56  <Wolf01> Oh, ok, misread
09:36:56  <_dp_> or ->
09:37:21  <Wolf01> Yes, possible
09:37:41  <Alberth> IsGameMode, but indeed
09:38:26  <_dp_> oh, I forgot methods are camel case too in openttd
09:38:31  * _dp_ too used to pep8
09:41:14  <Wolf01> I would like to work with an IoC Container
09:41:26  <Wolf01> And everything as a service
09:41:44  <Wolf01> Then for tests you mock the services in the container
09:42:56  *** debdog has joined #openttd
09:43:01  <Wolf01> The only global thing then would be the container itself
09:43:24  *** supermop_home_ has joined #openttd
09:46:00  *** supermop_home has quit IRC
09:55:57  *** debdog has quit IRC
09:56:57  *** debdog has joined #openttd
09:57:31  <Wolf01> I should learn c++
09:58:15  *** supermop_home has joined #openttd
10:02:32  <Wolf01> I still have a lot of confusion on using the * in c++
10:03:41  *** supermop_home_ has quit IRC
10:04:23  <Alberth> you know that a pointer has 2 values, the address it points to, and the value it points at, right?  * dereferences to the latter
10:04:36  <Alberth> in types, * means "pointer to this type of data"
10:05:18  <Alberth> arrays are mostly red herrings, they are just pointers created by the compiler, that also have their element count remembered
10:05:37  <Alberth> only other use of *   is for multiplication :p
10:07:19  <Alberth>  p->  is equivalent to (*p).
10:07:41  <Alberth> and p[x] is equivalent to *(p+ x)
10:09:07  <Alberth> s/element count/size/
10:09:42  <_dp_> for me hardest thing is usually to choose between passing pointer and passing reference :)
10:11:04  <Wolf01> That too
10:11:28  <_dp_> and c++11/14 doesn't help at all with all the &&
10:11:42  <milek7> i think references are only c+ sugar
10:11:47  <milek7> c++
10:12:51  <_dp_> milek7, many other languages have references, they just don't usually come together with pointers)
10:13:17  <Alberth> references should be used if the parameter is never nullptr
10:14:02  <_dp_> Alberth, sometimes it gets awkward to use reference when everything around uses pointers
10:14:21  <milek7> also don't use gcc, not enough warnings
10:14:23  <Alberth> yep, you have that with legacy C code :p
10:14:46  <Alberth> milek7: -Wall    helps a lot
10:15:47  <milek7> and -Wextra, but clang is better anyway
10:16:56  <Alberth> ok, outside is inviting me to join the sun, which I am going to try for a few hours
10:16:58  <Alberth> bbl
10:17:12  *** Alberth has left #openttd
10:17:24  *** Zuu has joined #openttd
10:18:03  <milek7> int main() { int m = 5; std::cout << "m: " + m << std::endl; }
10:18:14  <milek7> no warning on gcc
10:18:57  *** Wormnest has joined #openttd
10:20:34  *** Stimrol has joined #openttd
10:31:05  *** ToBeFree has quit IRC
10:32:10  <Wolf01> Meh... class Globals *_globals already defined everywhere, what am I missing?
10:33:39  <Wolf01> Also Globals &operator=(const Globals&); "function for operator= not found"
10:40:20  <Wolf01> Could be an intellisense bug
10:43:09  *** supermop_home has quit IRC
10:43:21  *** supermop_home has joined #openttd
10:51:00  <Wolf01> Ok, I think I found the right order to define variables
10:52:45  <Wolf01> Nope, I must be stupid
10:55:02  <Wolf01> Now I just have unresolved esternals
10:57:34  <frosch123> but a "external Foo _bar;" into one header, and put a "Foo _bar;" into *one* source
10:57:38  <frosch123> *put
10:58:16  <Wolf01> Eh, I did that
10:58:26  <Wolf01> Still 1 unresolved external
11:00:04  <Wolf01> If only it says where it is missing
11:00:44  <frosch123> my compiler usually gives a source file
11:01:05  <Wolf01> It's a linker error... it gives openttd.exe
11:01:12  <frosch123> yes, still
11:01:59  <Wolf01> Severity	Code	Description	Project	File	Line	Suppression State
11:02:00  <Wolf01> Error	LNK2001	unresolved external symbol "private: static class Globals * Globals::instance" (?instance@Globals@@0PAV1@A)	openttd	E:\progetti\OpenTTD\wolfolo\projects\openttd.obj	1
11:02:31  <_dp_> Wolf01, did you put it in a new cpp file?
11:02:36  <Wolf01> no
11:02:44  <Wolf01> It's in openttd.h
11:03:06  <milek7> it's static, do you defined it in cpp?
11:03:06  <Wolf01> (and it shouldn't be there)
11:03:29  <Wolf01> It's static inside the class
11:03:29  <_dp_> Wolf01, that's extern, where is the definition inself? it has to be in cpp
11:05:00  <Wolf01> Class definition is in openttd.h
11:05:03  *** orudge` has quit IRC
11:05:51  <Wolf01> If I move it to cpp it throws any kind of error, like missing ; or type specifiers
11:06:16  <milek7> you need Globals *Globals::instance in any cpp
11:06:27  <Wolf01> Yes, there is
11:06:45  <Wolf01> Wait, why ::instance?
11:06:51  <Wolf01> It's a private member
11:08:18  *** orudge` has joined #openttd
11:08:18  *** ChanServ sets mode: +o orudge`
11:09:57  <_dp_> Wolf01, static in class in only declaration, you need definition in some cpp as well.
11:10:02  <_dp_> Wolf01, like this
11:13:38  <Wolf01> It's not a static class, it's a singleton, it just returns a single instance
11:14:10  <V453000> weird, if I make one arg default to True, it stops accepting the -r False from console. I tried changing it to int so it was -r 0 but that fails as well. As soon as I make the thing default to 0 / False, it works. :0 Any random ideas? :D
11:15:13  <_dp_> Wolf01, instance variable is declared as static in your class, right? but that doesn't define it, you define variables in cpp, not h files
11:15:39  <Wolf01> The instance variable is internal to the class
11:16:08  <_dp_> Wolf01, still needs to be defined somewhere
11:16:16  <frosch123> Wolf01: you are doing c++, not java
11:16:41  <Wolf01> Fuck c++ private members defines outside of the class
11:16:52  <frosch123> you must define all static members, public/private makes no difference whatsoever
11:19:33  <_dp_> it's easier to grasp if you think how #include works, it pretty much just inserts text of h file in that place
11:19:52  <_dp_> if you have definition in h file and include it from two places you'll get two copies of variable
11:19:53  <Wolf01> No, I can't understand how "static" works
11:22:26  <Wolf01> Ok, now I have type redefinition...
11:36:38  <Wolf01> /* static */ Globals *Globals::instance; <- 'instance': is not a member of 'Globals'
11:37:27  <Wolf01> I think the worst part of c++ is that it isn't like java
11:37:34  <Wolf01> That's why I use c#
11:40:03  <_dp_> Wolf01, check BasePersistentStorageArray in newgrf_storage.h/cpp it has some static members
11:46:14  <Wolf01> Mmmh
12:10:04  *** supermop has joined #openttd
12:13:06  *** supermop_home has quit IRC
12:13:09  *** supermop_home has joined #openttd
12:14:32  <milek7> Wolf01: include header containing declaration in that cpp
12:16:16  *** orudge` has quit IRC
12:16:20  <Wolf01> It's already included
12:16:42  *** orudge` has joined #openttd
12:16:42  *** ChanServ sets mode: +o orudge`
12:17:14  <milek7> impossible
12:17:19  <Wolf01> Ok
12:18:05  *** supermop has quit IRC
12:20:04  <Wolf01> now I'm here
12:21:21  <_dp_> Wolf01, ofc it is redefinition look at any other class in openttd :P
12:21:33  <_dp_> Wolf01, there can't be two class Globals { }
12:22:13  <milek7> delete that Globals { from cpp
12:22:23  <_dp_> and use bool Globals::IsGameMode(GameMode mode) {} to define members
12:22:38  <_dp_> or rather methods
12:24:23  <Wolf01> Shit, I must inherit to implement methods this way
12:25:25  <_dp_> Wolf01, wut? how does inheritance get here?
12:25:40  <Wolf01> The definition in .h is like an interface
12:27:08  <V453000> omg fancy haz 7 debug levels :D
12:27:21  <_dp_> Wolf01, yeah, it mostly declares things. but inheritance is a completely diffenet thing, it's a way do define another class, while you seem to still be struggling with just one :p
12:28:25  *** supermop_home_ has joined #openttd
12:28:52  *** orudge` has quit IRC
12:28:54  *** orudge` has joined #openttd
12:28:55  *** ChanServ sets mode: +o orudge`
12:33:22  <Eddi|zuHause> Wolf01: if you think inheritance is the solution to your problem, you probably need to take a few steps back and rethink the concepts you're trying to implement
12:33:25  *** supermop_home has quit IRC
12:35:11  <Eddi|zuHause> (this is basically why my professor thought teaching OOP with C++ is a bad idea)
12:35:41  <Wolf01> Yes, I'm starting to think that too
12:35:43  <Eddi|zuHause> (because sometimes the C++ way of doing things is not the optimal way of doing things)
12:36:52  <Wolf01> Ok, back to the unresolved external symbol "private: static class Globals * Globals::instance" (?instance@Globals@@0PAV1@A)
12:37:14  <Wolf01> At least now it doesn't throw any weird error
12:37:36  <Wolf01> And I have declaration in .h and implemented the methods one by one in .cpp
12:38:04  <_dp_> Wolf01, literally, just put "Globals * Globals::instance" in cpp
12:38:16  <_dp_> Wolf01, but don't remove anythig
12:39:11  *** orudge` has quit IRC
12:39:19  <Wolf01> I really can't understand that, is the compiler so stupid it can't do it by itslef?
12:39:28  <Wolf01> Like . vs ->
12:39:35  *** orudge` has joined #openttd
12:39:35  *** ChanServ sets mode: +o orudge`
12:39:43  <milek7> no, maybe you want to assign initialization value
12:39:59  <_dp_> also you need to specifi which translation unit it belongs to
12:40:02  <michi_cc> Wolf01: Why do you need a singleton and a global instance at the same time? ('Singleton' is just a fancy dress up name for global anyway.)
12:40:26  <Wolf01> Because I'm doing it step by step
12:40:33  <_dp_> putting it in a class is just a promise that you'll define it somewhere later.
12:40:51  <_dp_> aka declaration
12:40:58  <michi_cc> Oh, and for . vs ->, don't look at c++ operator overloading :)
12:42:45  <Eddi|zuHause> <Wolf01> I really can't understand that, is the compiler so stupid it can't do it by itslef? <-- so, do you get into a stickshift car and then complain that it's too stupid to switch gears automatically like other cars?
12:43:04  *** supermop_home has joined #openttd
12:43:58  <Wolf01> No, I would complain if I should tell the shift what cog to move and in which position I want it
12:44:12  <Wolf01> The shiftstick hides all that to me
12:44:25  <Wolf01> The automatic drive is only another facade to it
12:44:39  *** supermop_home_ has quit IRC
12:45:39  <michi_cc> On a serious note, yes, the compiler really is that stupid because it doesn't have the required information. The *linker* could clean it up (and has to do it in case of template stuff), but that really is more of a kludge than a proper solution. Gets somewhat hairy if you mix and match different object files.
12:45:58  <_dp_> Wolf01, as c++  doesn't ask you the memory offset to put that variable to
12:46:07  <Eddi|zuHause> Wolf01: the point is, while moving from stickshift to automatic makes things easier, you also give up other features that people actually might want (like manually choosing whether to maximise torque or lowering fuel consumption)
12:46:41  <michi_cc> E.g. what should the linker do if one object file has the variable intialized by 0 and another by 1?
12:47:20  *** mindlesstux has quit IRC
12:47:27  <Wolf01> In this case it shouldn't, also, I should initialize it to nullptr in one place and not touch it anywhere else
12:47:49  *** mindlesstux has joined #openttd
12:48:52  <_dp_> Wolf01, that's exactly what's happening in c++, you initalize it in cpp file and don't touch (define) anywhere else
12:49:24  <_dp_> Wolf01, but you still need to declare that such variable exists so other parts of program could use it.
12:50:13  <milek7> headers are most annoying thing in c++, but maybe this will change with imports
12:50:17  <Wolf01> But that behavior should be defined by the definition, because in this case it relies on that, and no, other parts of the program shouldn't use it because is private
12:50:17  <milek7>
12:51:19  <Eddi|zuHause> Wolf01: the trouble with C++ is, you need to put the private declarations in the public .h file, you can't separate it
12:51:35  <_dp_> Wolf01, you can have methods of same class defined in different translation units (~= cpp files) iirc
12:51:46  *** orudge` has quit IRC
12:52:12  <Wolf01> _dp_: Yes, I'm fine with that
12:52:17  *** orudge` has joined #openttd
12:52:17  *** ChanServ sets mode: +o orudge`
12:53:05  <Wolf01> It's what Eddi said which it doesn't look right to me
12:53:13  <Eddi|zuHause> Wolf01: and you can't (sensibly) put definitions in .h files (because that definition would be duplicated in every translation unit)
12:53:58  <_dp_> also part of the problem is that in class X {} you define class but not necessarily it members
12:54:01  *** luxtram has quit IRC
12:54:03  <Wolf01> Like that is what I want to do
12:54:31  *** luxtram has joined #openttd
12:54:37  <_dp_> Eddi|zuHause, except that sometimes you can (like inline)
12:55:42  <milek7> and sometimes you must ;p (like templates)
12:57:01  <Eddi|zuHause> yeah, C++ is silly :p
12:57:19  <_dp_> sometimes c++ is very confusing just because it's like 3 different languages in one
12:57:27  <Wolf01> Silly language, silly CVS... does that make OTTD a silly game?
12:57:38  <Eddi|zuHause> sure
12:57:41  <milek7> template error messages are the worst
12:57:43  <_dp_> in c++ they had to put object system in a way that's compatible with c linkage
12:59:07  <_dp_> and in c++11/14 things got even crazier
13:00:26  <Wolf01> ok, that is
13:01:12  <Wolf01> Now I should add all those _global_variable to it
13:02:31  <Wolf01> Maybe move the definitions on a new file too, to keep openttd.cpp clean
13:03:23  <milek7> templates are imo bad design, interface-based generics would be better
13:05:52  <_dp_> it hard to judge c++ design since every small detail has a lot of reasons behind it
13:06:00  <_dp_> backwards compatibility takes a toll
13:07:35  <milek7> eh, but you usually don't call c++ members from c code
13:07:59  <_dp_> milek7, you call c ones from c++
13:08:17  <_dp_> milek7, and even other language ones
13:08:48  <milek7> but they are just function with arguments and return value
13:08:59  <milek7> no c++, virtual, objects, etc. magic
13:11:03  <_dp_> milek7, you mean why keep obj files backwards compatible?
13:11:41  <_dp_> dunno, but there must be a lot of reasons :p
13:12:36  <_dp_> probably because of dynamic linkage stuff
13:15:22  <michi_cc> The first C++ compiler (Cfront) compiled to *C*, not to object code. A lot of now historical baggage is probably due to that (e.g. the requirement to fit into the C linking model).
13:22:17  *** luxtram has quit IRC
13:26:39  <Eddi|zuHause> what's wrong with c++ templates?
13:28:07  <milek7> that they don't require to specify interface-class
13:28:26  <_dp_> Eddi|zuHause, imo "is there anything right about them" is a better question :p
13:28:31  <milek7> and that usually causes horrible error messages
13:29:14  <milek7> and that they must be compiled for each spectialization
13:29:37  <_dp_> they finally fixed >> syntax so I guess that's one fine thing about them :)
13:30:06  *** luxtram has joined #openttd
13:30:27  <milek7> i think that if they required abstract interface-class they could be compiled only once
13:32:18  <milek7> hmm
13:32:29  <milek7> but that can be done without templates
13:32:41  <milek7> so i think that templates aren't necessary at all ;p
13:39:43  <Eddi|zuHause> milek7: but you need templates for cases where you DON'T want a class/inheritance
13:41:25  <Eddi|zuHause> milek7: opposing to OOP/inheritance, which resolves at runtime, templates resolve at compile time
13:41:48  <Eddi|zuHause> milek7: which is what makes YAPF 10 times faster than NPF
13:44:19  *** Flygon has quit IRC
13:45:25  *** Alberth has joined #openttd
13:45:25  *** ChanServ sets mode: +o Alberth
13:46:17  *** sim-al2 is now known as Guest2918
13:46:18  *** sim-al2 has joined #openttd
13:46:35  *** mindlesstux has quit IRC
13:47:05  *** mindlesstux has joined #openttd
13:50:22  *** Gja has joined #openttd
13:51:16  *** Guest2918 has quit IRC
14:03:11  <supermop_home> should i steal people from japan stations to put in these trams?
14:04:47  <Eddi|zuHause> depends on your value of "steal"
14:05:06  <supermop_home> I believe its a gpl set
14:05:22  <supermop_home> but i wonder if the people will look good in a tram
14:07:22  <Wolf01> Heh... identifier byte undefined... yes
14:15:51  <Alberth> uint8  perhaps?
14:22:06  <Eddi|zuHause> wrong order of .h files?
14:22:14  <Wolf01> Nah, missing stdafx.h include
14:23:09  <Wolf01> Also yes, wrong order since the error was shown in globals.h and stdafx was included in .cpp
14:25:21  *** sim-al2 has quit IRC
14:27:21  <Wolf01> What's up with spanish.txt and spanish_MX.txt? Regenerate projects swapped all the entries
14:30:32  <_dp_> shouldn't stdafx only be included in cpp files?
14:30:56  <Wolf01> It's where I included it
14:31:49  <_dp_> ah, right, h order...
14:37:22  *** orudge` has quit IRC
14:37:34  *** orudge` has joined #openttd
14:37:35  *** ChanServ sets mode: +o orudge`
14:38:17  *** synchris has joined #openttd
14:39:01  *** gelignite has joined #openttd
14:42:08  *** Gja has quit IRC
14:50:28  *** orudge` has quit IRC
14:50:29  *** orudge` has joined #openttd
14:50:31  *** ChanServ sets mode: +o orudge`
14:57:07  <_dp_> more I try to use admin port more I want to throw it out and write my own
15:13:11  *** orudge` has quit IRC
15:13:15  *** orudge` has joined #openttd
15:13:15  *** ChanServ sets mode: +o orudge`
15:22:36  *** Stimrol has quit IRC
15:22:57  <_dp_> omg, smiles in commit messages
15:23:07  <Wolf01> What?
15:23:08  <_dp_>
15:23:23  <_dp_> looks so silly
15:23:26  <Wolf01> Oh shit
15:23:44  <Wolf01> They are cool, but meh
15:27:07  <Wolf01> Uhm, if I move the transparency options into Globals all that remains is the transparency enum
15:27:58  <milek7> hm, but why?
15:28:06  <milek7> what's wrong with many globals?
15:28:56  <Wolf01> Read log from 6 hours ago
15:29:03  <_dp_> milek7, like, everything?
15:29:13  <_dp_> milek7, no testability, no clear state
15:29:48  <Wolf01> Also, how *BAD*is to define transparency methods in a different .cpp file? Globals as sparse class
15:34:12  <_dp_> Wolf01, you mean declare them in globals, but define in different cpp files like they are now?
15:34:18  <Wolf01> Yes
15:35:22  <_dp_> Wolf01, this whole thing with globals isn't quite right still so it's hard to tell how is it better to do it xD
15:35:26  *** andythenorth has joined #openttd
15:35:43  <_dp_> Wolf01, I'd say yes, leave in different files so it's still kind of logically groped together
15:35:50  <Wolf01> Since is clear now that you have to define method by method I would take advantage about it
15:36:35  <Wolf01> And yes, if you go on globals.h you have all the declarations there
15:40:35  <andythenorth> o/
15:42:04  <supermop_home> ok finally drew all these tram bit
15:42:05  <supermop_home> s
15:42:18  <supermop_home> well like half, but enough to start
15:42:42  <supermop_home> half the generations will have to share sprites with the prior one for now
15:44:56  <Alberth> one gets the even pixels, the other the odd pixels
15:50:30  <Wolf01> HasBit(_transparency_lock, i) <- could I convert this to _global->IsTransparencyLockSet((TransparencyOption)i)?
15:55:05  <Wolf01> Mmm no, the functions check to not be in the menu
15:56:14  <Wolf01> I might need 2 sets of functions or a parameter
15:57:33  <Wolf01> I make 2 sets of functions instead of changing the logic, it would be easy to replace them later
16:00:23  <__ln___> is there something worth seeing in Passau?
16:01:36  <_dp_> Wolf01, btw, there is SwitchToMode which is also a bit different from _game_mode = ...
16:01:39  <_dp_> Wolf01, just fyi
16:02:35  <Wolf01> Yes I know, I'm still trying to find some good logic to replace that
16:03:04  <_dp_> ... and _switch_mode =
16:04:31  <Wolf01> Yes
16:05:09  <_dp_> probably good idea to leave them be for now
16:05:10  <V453000> is there any reason at all why a palette converter should care about the windows palette for ttd?
16:05:15  <V453000> I always used the DOS palette
16:05:34  <_dp_> like, things can easily crash if you replace _switch_mode = .. with SwitchToMode
16:06:11  <Wolf01> V453000: I think you can use the one you want as OTTD automatically loads it with the right palette
16:06:25  <V453000> well sure
16:06:38  <V453000> but if you are making a script for others to use it is good to know if WIN palette is ever useful
16:06:42  <V453000> because I don't remember it being useful
16:06:52  <V453000> it has a few extra grays or something I think
16:07:02  <V453000> orsomething
16:07:11  *** Maraxus has joined #openttd
16:07:36  <V453000> idk I will just ignore it
16:08:26  <Wolf01> _dp_: yes, I already had a close encounter with that
16:09:36  <andythenorth> V453000: WIN palette is LOSE
16:09:39  <andythenorth> don’t bother
16:09:50  <andythenorth> iirc, it has less greys
16:09:54  <andythenorth> due to windows stealing some
16:10:03  * andythenorth might be spreading prejudice, not facts
16:10:31  <V453000> ye
16:10:43  <V453000> I think it's facts
16:10:48  <Wolf01> Only because you use OS X
16:12:48  *** glx has joined #openttd
16:12:48  *** ChanServ sets mode: +v glx
16:13:55  <Eddi|zuHause> V453000: WIN palette has a few extra magic pinks, and shuffled around the greys, while removing some colours. you should ignore it
16:18:05  * andythenorth looking for rude emojis to send back to Wolf01 
16:18:09  <andythenorth> can’t find any good ones :P
16:18:35  <Wolf01> ᐠ( ᐛ )ᐟ
16:21:44  <supermop_home> is running cost per articulated part?
16:22:27  <Eddi|zuHause> supermop_home: most things on articulated parts have no effect
16:22:41  <Eddi|zuHause> supermop_home: and should be set to 0
16:29:03  *** Maraxus has quit IRC
16:32:49  *** Prof_Frink has joined #openttd
16:37:28  <andythenorth> anyone help apply 3928’s patch here?
16:44:09  <Alberth> that hunk was rejected, have a look at the source file, and insert the two lines manually
16:45:06  <Alberth> likely some code was added to the destructor
16:45:07  <andythenorth> thanks
16:45:29  <andythenorth> ugh, xcode opens .cpp files
16:45:40  <andythenorth> xcode has no line numbers, how is this supposed to be an IDE?
16:45:47  <andythenorth> probably EBKC
16:46:16  <Alberth> perhaps Apple believes line numbers are not relevant :p
16:46:28  <Alberth> or too confusing :p
16:46:43  <Wolf01> SDTG_VAR("transparency_options", SLE_UINT,          SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC, 0, _globals->GetTransparency(),  <- this fucks me out
16:47:31  <Alberth> looks like that comes from a tales/*.ini   file?
16:47:38  *** Progman has joined #openttd
16:47:38  <Alberth> settings.ini or such
16:47:45  <Wolf01> Yes
16:47:58  <milek7> what's good graphical text editor?
16:47:59  <milek7> i opened 3kl file with sublime/pluma/atom/chromium/firefox
16:48:17  <milek7> and the only one that is perfectly smooth while scrolling is firefox...
16:48:17  <Wolf01> milek7: VSCode
16:48:18  <LordAro> gvim
16:48:49  <Wolf01> Alberth: any idea?
16:49:25  <Alberth> I don't understand what you need to know
16:49:55  <Wolf01> What to put in place of the old global variable, because c++ don't like what I pasted
16:49:57  <Alberth> SDTG_VAR is a macro that folds it arguments into some struct, with defaults for all the values you didn't supply
16:50:26  <milek7> eh, i have keyboard with cursor keys so don't need weird vi modes
16:50:37  <Zuu> andythenorth: On windows alt+G or ctrl+G usually open a dialog to enter the line number in IDEs. Duno what key that would be on a mac. And no idea if xcode would follow that pattern.
16:50:53  <Alberth> o/ Zuu
16:51:10  <Zuu> Hello :)
16:51:14  <Alberth> Wolf01: perhaps the macro takes the address?
16:51:14  <andythenorth> hi Zuu
16:51:24  <andythenorth> ok this group collapse UI works
16:51:27  <andythenorth> but the counts don’t
16:51:30  <Wolf01> Alberth: could be
16:51:30  <andythenorth> they’re borked
16:51:35  <Alberth> Check pre-processor output
16:51:54  <Alberth> or track #define of SDTG_VAR & friends
16:51:58  <Wolf01> expression must be an lvalue or a function designator
16:52:23  <Alberth> lvalue means "something you can write a value into"
16:52:31  *** Gja has joined #openttd
16:52:37  <Alberth> no idea what "function designator" means
16:53:02  <Alberth> well, &func    would be valid
16:53:23  <Alberth> but likely you don't want a pointer to the getter function :p
16:53:27  <frosch123> you cannot put a getter or setter into the SDTG stuff
16:53:33  <frosch123> it must be a reference to the real variable
16:53:45  <_dp_> can go getter for reference
16:54:14  <andythenorth> collapsible groups is probably better eh?
16:54:21  <andythenorth> if we’re going to have sub-groups
16:54:24  <andythenorth> and we do
16:54:31  <Alberth> we do? :O
16:54:42  <Alberth> then, yes likely
16:54:52  <Wolf01> <frosch123> it must be a reference to the real variable <- Ha! Then I fail
16:55:20  *** Zuu has quit IRC
16:56:43  <andythenorth>
16:56:51  *** Zuu has joined #openttd
16:58:34  <peter1138> that's a patch for it ;p
16:58:58  <andythenorth> :D
16:59:05  <andythenorth> Zuu: still interested in this? o_O
16:59:15  * andythenorth on FS spree
17:01:02  <Zuu> Not really doing anytihng with OpenTTD at the moment other than visiting the forum a few times a year and this channel.
17:03:09  <Zuu> So, no.
17:03:58  <andythenorth> still looks like a useful patch
17:04:08  <andythenorth> Wolf01: 5208 - scenario stuff from console
17:04:22  <Zuu> But it looks like there is a patch, and I honestly doesn't remember this FS task.
17:04:58  <Zuu> But it is probably from my tutorial work.
17:05:06  <Wolf01> andythenorth: could be nice to have
17:06:19  *** Gja has quit IRC
17:10:32  <supermop_home> is there an easy way to dectect drive-on side?
17:10:35  *** JacobD88 has joined #openttd
17:10:53  <supermop_home> or do I need to have a parameter to set what side you want the doors to open on
17:11:27  *** JacobD88 has quit IRC
17:12:16  <andythenorth> supermop_: or…don’t worry about it? o_O
17:12:22  <andythenorth> such parameters
17:12:26  <supermop_home> I already drew all the doors
17:12:28  <Wolf01> Ok, I miss only the SDTG_VAR stuff...
17:12:31  <supermop_home> for both sides
17:13:04  <Wolf01> But not now, must go outside to eat stuff
17:14:47  <Alberth> supermop_home:     traffic_side
17:15:32  <luxtram> Hi, I am reading the source and I am wondering what is the meaning of the mode parameter of TrainLocoHandler. Any pointers?
17:17:00  <frosch123> iirc that function is called multiple times per tick
17:17:07  <frosch123> mode is the iteration number or something
17:19:23  <andythenorth> Zuu: care to look at a couple more? o_O
17:19:34  <andythenorth>
17:19:40  <frosch123> it needs to be called multiple times, since trains can move faster than 1 coordinate per tick
17:20:00  <frosch123> on the first iteration it likely does some more stuff that during the other
17:25:38  *** pdoan has joined #openttd
17:26:20  <Zuu> andythenorth: How many many more open tasks am I responsible for ... hm I can look that up ... 5 in total. :-)
17:28:50  <Zuu> I don't feel anything in particular for any of those at the moment and I can always open new ones if I feel for, so close them if you like to. :-)
17:31:05  <luxtram> ok, but how does it help to call it twice really and why it is not possible to satisfy the situation with a single call?
17:31:25  <frosch123> it moves the train my one step on every call
17:31:35  <frosch123> and needs to check train collision, end of track and stuff
17:31:47  <frosch123> red signal etc
17:32:23  <frosch123> possibly it can be done better, by first checking with only the front how far you can drive
17:32:28  <frosch123> and then moving everything
17:32:39  <frosch123> but it's not exactly easy code :p
17:33:56  <luxtram> so the train always moves two steps during a tick?
17:34:16  <frosch123> depends on its speed :p
17:34:23  <frosch123> at 0 km/h it does not move any steps
17:34:39  <frosch123> planes iirc can move up to 4 steps per tick
17:39:01  *** supermop_home has quit IRC
17:43:11  *** supermop has joined #openttd
17:46:59  <andythenorth> Zuu: thanks \o/
17:47:04  <supermop> can I put an if thing around a sprite group?
17:47:38  <planetmaker> real sprites are unconditional
17:47:53  <supermop> so no?
17:48:15  <Zuu> Oh.. was thinking about to go out, but now it rains hevily at 45 degree angle. Good I didn't get out for a walk. :-)
17:48:16  <planetmaker> I think no. You need to decide on different sprite groups depending on parameter
17:48:57  <planetmaker> supermop, think of it as such: the sprites cannot be in the newgrf and not in the newgrf at the same time
17:49:25  <frosch123> supermop: everything which you could in an if-condition, you can also put into a switch
17:49:25  <planetmaker> they must always be there - but you can choose not to show them
17:53:05  <Alberth> time to practice your 45 degrees walk, Zuu :)
17:54:15  <Zuu> :-)
17:54:42  <frosch123> ah, that's why the brittish are so obsessed with the silly-walks-business
17:54:51  <Zuu> It is now more normal only a few degrees angled rain.
17:56:59  <supermop>
17:57:25  <supermop> I have my traffic side switch at the bottom of that
18:05:52  <andythenorth> we practice dodging raindrops around here
18:08:16  <andythenorth> lo planetmaker
18:10:43  <andythenorth> can I close? o_O
18:11:37  <frosch123> andythenorth: make a patch that adds it to known_bugs.txt
18:12:07  * andythenorth looks
18:12:11  <frosch123> we document "won't fix" stuff there
18:12:28  <Eddi|zuHause> i'd debate whether this is a bug at all
18:12:41  <Eddi|zuHause> looks more like a feature request
18:12:45  <frosch123> even more a reason for known_bugs then
18:12:50  <andythenorth> is there any particular order to known_bugs.txt ?
18:12:58  <andythenorth> apend to end?
18:13:30  <Eddi|zuHause> of course there's the follow-up bug that payment will be screwed up
18:13:58  <andythenorth> delete neutral stations?
18:14:02  <andythenorth> problem solved
18:14:06  <frosch123> andythenorth: apprently sorted by fs number
18:14:11  <andythenorth> thanks
18:14:34  <andythenorth> there is a proposal for bouy stations
18:14:40  <planetmaker> I guess it can be closed. It's not exactly a bug
18:14:40  <andythenorth> player owned iirc
18:14:52  <planetmaker> and I like the behaviour
18:14:58  <andythenorth> bouy stations would eliminate need for industry built-in stations
18:15:12  <andythenorth> but I can’t think of any savegame migration strategy :(
18:15:30  <Eddi|zuHause> andythenorth: wasted effort, i think
18:15:33  <andythenorth> nor how to handle helicopters
18:15:49  <Eddi|zuHause> plus, people actually want more neutral stations (like city-owned airports)
18:17:10  <andythenorth> people actually also want reliable cargodist
18:17:13  <andythenorth> no griefing
18:17:16  <andythenorth> lots of things ;D
18:17:27  <V453000> andythenorth: iz win, now with the custom built color offset list and with debug levels :D
18:17:45  <V453000> planetmaker: if you told me 4 years ago that I would eventually voluntarily learn programming, I would have told you that you are insane :)
18:17:52  <andythenorth> V453000: you are insane
18:18:04  <V453000> I wouldn't have been wrong, but you would be rihgt ;P
18:18:16  <andythenorth> good eh?
18:18:22  <V453000> andythenorth: you are insane
18:18:59  <Eddi|zuHause> postulate: there are no sane people
18:20:00  <V453000> any suggestions how to name parameters as in the shortcuts? since I am using c-s, it is not easy to use something sensible :D
18:20:04  <andythenorth> tabs eh?
18:20:10  <andythenorth> my editor makes tabs into spaces :P
18:20:14  <V453000> should be spaces
18:20:19  <V453000> tab = 2 spaces
18:20:48  <andythenorth> 4 but yes
18:21:00  <V453000> depends on settings :) in factorio we use 2 so I keep it
18:21:06  <peter1138> 3!
18:21:07  <Eddi|zuHause> python suggestion is to use 4 spaces for indent
18:21:19  <V453000> Eddi|zuHause: why?
18:21:26  <V453000> just better clarity?
18:21:28  <Eddi|zuHause> i don't know. it's what it is
18:21:42  <V453000> k :D
18:21:47  <V453000> I will use 2 for heresy
18:21:55  <Alberth> 2 is not enough, 3 doesn't quite work with the 8 of a TAB, 4 is nice
18:21:57  <_dp_> it's called pep8 a standard for code formatting in python
18:22:25  <Eddi|zuHause> there's no hard reason to actually follow pep8, though :p
18:22:40  <peter1138> tabs are useful when you use variable width fonts ;p
18:23:15  <andythenorth> frosch123:
18:23:24  <Eddi|zuHause> peter1138: how does that have any influence on indentation, though?
18:23:35  <planetmaker> hihi @ V453000 :)
18:23:37  <peter1138> none
18:23:45  <planetmaker> but then... you are :P
18:23:50  <_dp_> Eddi|zuHause, exept every other python programmer picking on you for not following standards :p
18:23:55  <planetmaker> but what changed your mind? what do you learn?
18:25:03  * andythenorth tests
18:26:25  <andythenorth> patch probably ‘breaks’ some FIRS industries
18:27:01  <Alberth> planetmaker: V is somewhat infacted with the "automate everything" virus from andy :)
18:27:36  <Alberth> *infected
18:28:43  <frosch123> except V is in level 1, where you automate stuff which you would do by hand otherwise
18:28:57  <frosch123> while andy is in level 5, where you automate automating automating automating automating thing
18:29:30  <Eddi|zuHause> you should meta-level that, so you automate reducing the layers of automation
18:30:05  <andythenorth> I think V453000 has actually surpassed me by some measure
18:30:29  <andythenorth> frosch123: 4754 patch does what it says on the tin: ‘fixes’ rivers in desert a bit, and probably breaks newgrf industries
18:30:40  <andythenorth> pursue, or dead?
18:35:33  <Alberth> V453000:  iz eazyer
18:35:44  <frosch123> at some point i wanted to move half-desert into the map array
18:36:08  <supermop> what about snowy desert
18:36:30  <Alberth> it's never night in openttd
18:39:53  <peter1138> let's add shaders
18:40:14  <andythenorth> 7 year old asked for day night cycle
18:40:26  <Zuu> Or support for telestick so we can turn of the lights in the room?
18:40:27  <LordAro> peter1138: o/
18:40:28  <andythenorth> I told him totally dark made it hard to see the trains :P
18:40:37  <andythenorth> I get all the regular feature requests here
18:40:46  <andythenorth> we could close FS and forums, and get it all from one 7 year old
18:40:46  <frosch123> andythenorth: the only thing worse than day/night in a video game is weather
18:41:11  <andythenorth> I told him we’d have to remake all the sprites (he’s drawing trains now so he knows it’s work)
18:41:18  <frosch123> actually, since i no longer use solar power, i should disable it again in f
18:41:20  <andythenorth> he said we could just take screenshots and tint them with code
18:41:48  <andythenorth> AUTOMATION
18:41:50  <frosch123> andythenorth: don't show nightgfx :)
18:42:00  <frosch123> lot's of thing are bright at night
18:42:04  <frosch123> which are not during daylight
18:42:42  <andythenorth> I would like night mode
18:42:50  <andythenorth> I would put the work into the sprites :P
18:42:56  <andythenorth> or at least…automating them
18:43:25  <andythenorth>
18:43:39  <planetmaker> oh, the automation-infection. I'm no stranger to that :D
18:43:41  <andythenorth> such heatshrink wrapping of cables
18:44:22  <andythenorth>
18:44:53  * andythenorth also lit a model train layout when much younger
18:45:15  * andythenorth should also write a ‘talking to V’ bot
18:45:20  <andythenorth> “iz bot"
18:45:22  <supermop> trams working
18:45:22  <andythenorth> “iz"
18:45:29  <andythenorth> supermop: such content :)
18:46:04  <frosch123> andythenorth:
18:46:15  <andythenorth> import random; swears = [list]; random.choice(swears)
18:46:35  <andythenorth> could pretty much automater
18:46:35  <LordAro> [<class 'list'>]
18:46:42  <andythenorth> window purples -> yellow
18:46:52  <andythenorth> headlight yellow -> yellow
18:47:00  <andythenorth> tail light red -> red
18:47:09  <andythenorth> everything else -> compression
18:47:20  <andythenorth> probably non-linear
18:47:28  <andythenorth> there’s probably an algorithm for it :P
18:48:38  <milek7> but roads should be lightened in patterns
18:49:11  *** pdoan has quit IRC
18:49:22  <supermop> could use more cab styles and liveries, and a better panto
18:50:48  <andythenorth> michi_cc: peter1138 will do the roads
18:50:50  <andythenorth> with shaders
18:53:25  <supermop> if I up a tram's max speed does that break grf with previous versions?
18:53:51  <andythenorth> not probably
18:54:04  <andythenorth> strictly it does, if you’re being purist
18:54:34  <supermop> realized my late 80s LRV isn't better enough than my 60s articulated tram
18:56:00  <supermop> also my ersatz Melbourne W class is too good
18:56:11  <supermop> it still is a good buy in 2000
18:57:12  <Alberth> evergreens
18:58:48  *** orudge` has quit IRC
18:58:58  <andythenorth> trams tend to evergreen
18:59:04  *** orudge` has joined #openttd
18:59:05  *** ChanServ sets mode: +o orudge`
18:59:20  * andythenorth wonders if “Landscape:” is a thing for grouping FS stuff
18:59:28  <andythenorth> seems to be a bit of that
18:59:41  <supermop> well the W class stills runs in melb
18:59:45  <frosch123> as in stuff for a potential newlandscape?
19:00:02  <andythenorth> not sure yet
19:00:12  * andythenorth needs to check
19:01:17  <andythenorth> nah, there’s not much in FS for it
19:01:27  <andythenorth> I wondered about making landscape gen pluggable
19:01:40  <supermop> i'll need to add a low floor property to make the old trams illegal after 2000
19:01:55  <andythenorth> eh, dumping raw C++ into mods…probably very very insecure? o_O
19:02:02  * andythenorth just thinking
19:02:30  <V453000> that looks nice Alberth thanks :) I will digest it first though
19:02:33  <frosch123> how about dumping opengl shader code into newgrf :p
19:02:42  <andythenorth> o_O
19:02:44  <planetmaker> :D
19:02:47  <frosch123> and wait until noone does opengl anymore :p
19:05:22  <V453000>  /me discovered andythenorth's flicker
19:05:29  <V453000> some spectacular vehicles right there
19:05:45  <frosch123> lego?
19:05:52  <V453000> arr
19:06:17  <frosch123> i think i saw those
19:06:19  *** pdoan has joined #openttd
19:06:26  <V453000> well I didn't :)
19:06:50  <frosch123> i think andy and wolf are on some legobook network or something
19:07:14  <planetmaker> lego... I'm mad at lego. The Saturn V set was sold out too soon
19:07:37  <V453000> XD
19:07:40  <V453000> "ok"
19:07:44  <planetmaker>
19:07:53  <planetmaker> available for like 2 weeks or so?
19:08:03  <frosch123> didn't wolf had it
19:08:17  <frosch123> and doesn't wolf regulary get rid of old sets to make space for new?
19:08:18  <planetmaker> it came out in July. Dunno?
19:08:33  <V453000> XD
19:08:35  <peter1138> much earlier than july
19:08:45  <V453000> I suddenly feel completely normal
19:08:49  <planetmaker> ok, June
19:08:55  <V453000> that shit's dope
19:09:06  <peter1138> i nearly ordered one
19:09:13  <peter1138> but then decided i didn't need £110 of lego
19:09:14  <V453000> can't wait for daughter to grow so I could justify ordering one
19:09:41  <planetmaker> I decided I do... but thought I could spend that on an occasion like Christmas. So wrong :(
19:10:02  <V453000> haha
19:10:02  <peter1138> they made it very limited for no reason i guess
19:11:02  <andythenorth> V453000: lego is like pixels
19:11:18  <andythenorth> grid system
19:11:24  <andythenorth> lack of true realism
19:11:34  <V453000> I know right :P
19:12:15  <andythenorth> also Lego teaches much about colour palette
19:12:52  <V453000> :>
19:13:07  <V453000> iz realizms though, in a way I like
19:13:15  <V453000> the shovel and stuff at the ends are giving it a really nice final touch
19:13:25  <andythenorth> greebles
19:13:41  <andythenorth>
19:15:02  <V453000> hehe
19:15:11  <andythenorth> also designing in false colour, to get structure right first, same as sprites
19:15:27  *** pdoan has quit IRC
19:15:47  *** luxtram has quit IRC
19:15:54  <V453000> yez
19:16:17  <V453000> Alberth: added it, script works :>
19:16:25  *** pdoan has joined #openttd
19:16:27  *** luxtram has joined #openttd
19:16:36  <V453000> btw andythenorth can I redistribute the generated palette you have in roadhog? :P under gplv2 ofc
19:17:03  <andythenorth> yes
19:17:11  *** orudge` has quit IRC
19:17:27  <V453000> gg, you get credit for this spectatular piece of art
19:17:40  <milek7> why anyone cares about palettes in 2017?
19:17:45  *** orudge` has joined #openttd
19:17:46  *** ChanServ sets mode: +o orudge`
19:17:57  <V453000> ._.
19:17:59  <V453000> heavy breathing
19:19:55  * andythenorth counting to 10 slowly
19:20:05  <V453000> milek7: openttd still won't run without some 8bpp even if you have 32bpp over it :P and as we discovered, apparently for many people the 32bpp is simply not an option due to performance
19:20:09  <V453000> 10
19:20:37  <V453000> + palette has some benefits too if you draw pixelz
19:20:55  *** pdoan has quit IRC
19:21:30  <milek7> performance? framebuffer is anyway probably stored in at least 24bit
19:21:54  *** pdoan has joined #openttd
19:21:59  <V453000> well don't ask me why but even people with beastly computers sometimes have to me unexpected problems with running 32bpp
19:22:45  <andythenorth> how can I replicate this?
19:22:46  <andythenorth>
19:23:07  <andythenorth> I might make a special rule for TGP crap: you have to tell what settings were used
19:23:14  <andythenorth> that rule will definitely work
19:23:18  <andythenorth> always :P
19:23:30  <planetmaker> andythenorth, savegame will tell
19:23:38  <andythenorth> title says 'default'
19:23:38  <planetmaker> but... not provided either :|
19:23:49  <planetmaker> default... default... that's a non-statement
19:23:49  * andythenorth tries to find defaults
19:24:13  <planetmaker> I also use default. But there's an openttd.cfg and then it doesn't care about defaults, but it uses the values stored there
19:24:29  <planetmaker> defaults are those which you get when you delete your openttd.cfg and have it rewritten by the game
19:24:34  <andythenorth> which size map, what water settings etc
19:24:45  <andythenorth> ok I’ll mv openttd.cfg
19:25:07  <planetmaker> but I'd not bet much on none of those being changed or set by the user
19:25:46  <andythenorth> ok no snow
19:26:03  <andythenorth> and no rainforest
19:26:08  <andythenorth> so completely valid bug report
19:26:27  <planetmaker> hm :)
19:26:29  <supermop> hmm
19:26:44  <supermop> my tiny tram from 1890 goes 80 kmh
19:26:50  <supermop> I think that is a mistake
19:27:27  <andythenorth> weeeee
19:27:39  <andythenorth> maybe it’s a pneumatique
19:27:47  <planetmaker> faster than a horse? That must be detrimental to the passenger's health!
19:28:12  <Eddi|zuHause> random progression i just thought of: 1890: 30km/h, 1920: 40km/h, 1950: 50km/h, 1980: 60km/h
19:28:12  <supermop> I don't enjoy playing with pitifully slow vehicles but ill need to make up some progression at least
19:28:31  <Eddi|zuHause> probably useless
19:28:36  <supermop> Eddi|zuHause sounds realistic,
19:28:54  <supermop> i think ill want 80 kmh by the 50s though to not be too boring
19:28:58  <Eddi|zuHause> 1980 should be more like 80km/h, but with inner-town speed limits
19:29:23  <andythenorth> supermop_: I don’t want to impede creative fun, but
19:29:47  <andythenorth> bloody FS :)
19:29:53  <andythenorth> I can’t get below 449 now
19:30:02  <supermop> is that km or miles andy?
19:30:10  <supermop> 25 sounds useless
19:30:26  <andythenorth> mph
19:33:42  *** Gja has joined #openttd
19:43:10  <andythenorth> eh Wolf01 this is like the reverse of the seed issue? o_O
19:51:46  *** ToBeFree has joined #openttd
19:53:11  *** orudge` has quit IRC
19:53:15  *** orudge` has joined #openttd
19:53:15  *** ChanServ sets mode: +o orudge`
19:54:36  *** sla_ro|master has quit IRC
19:57:20  *** Alberth has left #openttd
20:02:21  <andythenorth> how creaking is the UI part of groups (vehicles list)
20:02:32  *** sim-al2 has joined #openttd
20:02:48  <andythenorth> groups themselves are quite lame, but is the UI code a horrowshow, or ok?
20:11:42  <andythenorth> nvm :)
20:11:44  <andythenorth> bye
20:11:45  *** andythenorth has quit IRC
20:18:23  <Wolf01> Eh.. he just quit
20:19:23  *** Zuu has quit IRC
20:20:26  <Wolf01> BTW yes, SE and game should be one way
20:20:38  <V453000> so how should I call my fancy conversion script
20:20:47  <V453000> Palletizer? :) Palletizator?
20:20:50  <Wolf01> DoAutomatedStuff?
20:21:34  <Wolf01> Also, back on those SDTG_VAR
20:21:54  <Wolf01> I might need a workaround
20:21:58  <frosch123> V453000: downsampler
20:22:09  <V453000> no that sounds unsuperior frosch "D
20:22:10  <V453000> :D
20:22:22  <Wolf01> frosch123, any idea for a workaround?
20:22:45  <Wolf01> V453000: TheMangler?
20:22:58  <frosch123> continuous-palette-transfunctionator?
20:23:17  <frosch123> Wolf01: just let the sameload stuff access the raw private data
20:23:32  <Wolf01> Yes I thought about it but meh
20:23:36  <frosch123> saveload does binary stuff, sizeof, offsetof, endian swapping, ...
20:23:52  <V453000> Radula
20:24:14  <frosch123> Wolf01: openttd is no book about conservative oop
20:24:37  <frosch123> it's about breaking the rules when it benefits
20:24:57  <frosch123> V453000: hey-dude-wheres-my-palette?
20:26:12  <frosch123> ach, just call it slugette
20:26:21  *** Gja has quit IRC
20:26:54  <Wolf01> I'd put a comment "Needed for settings: don't use them in code, please"
20:29:15  <Wolf01> Uhmmm... what? It still throws error about _transparency_opt undeclared identifier when I replaced it
20:30:27  <Wolf01> Ooooh, misc_settings_ini not regenerated
20:34:22  <Wolf01> Or maybe I'm modifying the wrong file, I don't edit settings so much
20:35:32  <frosch123> transparency_opt probably should be a member of GUISettings
20:35:33  <Wolf01> Yes, was that
20:35:49  <frosch123> but iirc it's not possible to move all of the settings into _settings
20:36:06  <frosch123> the very early ones need to be separate or something
20:36:06  <planetmaker> slugette :D
20:36:07  <planetmaker> <3
20:36:17  <frosch123> planetmaker: sounds like chocolate
20:36:23  <planetmaker> that, too :)
20:36:30  <planetmaker> But I love chocolate, too :P
20:36:44  <frosch123> i considered ordering that slug-chocolate, but in the end it did not seem worth it
20:36:48  <Wolf01> Ok, compiled, run, access violation
20:39:02  *** Tirili has joined #openttd
20:39:43  <frosch123> planetmaker: <- in case you missed them
20:41:02  <frosch123> 17 euro for 200g american chocolate of unknown quality seemed a bit steep
20:41:02  <planetmaker> I totally did!
20:41:11  <planetmaker> the perfect gift for V :P
20:41:29  <planetmaker> but... uwe... American chocolate?
20:41:43  <LordAro>   5 Reallocated_Sector_Ct   0x0033   089   089   010    Pre-fail  Always       -       14400
20:41:46  <LordAro> oh dear
20:41:48  <frosch123> it's no supermarket chocolate, you never know
20:42:13  <planetmaker> LordAro, just moving my home dir from one disk to another ;) one never knows...
20:43:07  *** FLHerne has quit IRC
20:43:14  <V453000> Hmmm slugette
20:43:30  <V453000> calling it RAINBOW_SLUG actually makes sense
20:43:31  <V453000> gg
20:43:33  <frosch123> <- zoom in
20:44:45  <frosch123> V453000: yeah, but that name is already used
20:44:53  <planetmaker> the modelling is superb :)
20:44:57  <V453000> ._.
20:45:05  <V453000> wot
20:45:42  <frosch123> <- i wonder whether it actually has banana taste
20:46:02  <V453000> oh, hand for scale
20:46:07  <V453000> larger than I imagined
20:46:20  <frosch123> i think it's a different one
20:46:31  <frosch123> the other were 200g in 8 pieces
20:46:42  <frosch123> 25g is not that large
20:46:58  <frosch123> even when hollow
20:47:05  <V453000> right
20:47:27  <planetmaker> ehm... sure that's 200g, frosch123 ?
20:47:36  *** synchris has quit IRC
20:47:45  <planetmaker> ohhh... .47lbs
20:47:46  <planetmaker> hm
20:47:46  <frosch123> Weight .47 lbs
20:47:47  <planetmaker> yes
20:47:55  <planetmaker> nasty, tiny dot :)
20:47:59  *** FLHerne has joined #openttd
20:48:07  <frosch123> 213.1884g
20:48:36  <frosch123> planetmaker: you though 20kg? :o
20:49:29  <planetmaker> it didn't look like 20kg. When I saw 20kg I started to look closer at the text - and discovered the dot
20:49:48  <planetmaker> it's not that I have any relation to what 47 lbs or .47 lbs might be
20:50:37  <frosch123> i learned to measure butter in half pounds
20:51:38  <frosch123> 1 lbs is close enough to a 500g pound
20:53:12  <planetmaker> it is indeed
20:53:32  <planetmaker> lbs doesn't even remotely look like "pound" though
20:54:34  <frosch123> well, i assume you are more used to M☉ :)
20:55:24  <planetmaker> :P
20:55:53  <Wolf01> Uhm... I can't understand why in settings.h _global is not instanciated
20:55:54  <frosch123> £ doesn't look like pound either
20:55:56  <planetmaker> honestly, in my daily work life I'm more used ot µg, and g than M_sun or M_earth
20:56:13  <frosch123> nor like sterling
20:56:20  <planetmaker> that's different... currencies never resemble anything
20:56:45  <planetmaker> and it could be a symbiosis of S and t
20:56:55  <planetmaker> underlined
20:57:03  <planetmaker> or maybe even not underlined
20:58:01  <frosch123> oh £ is actually an L
20:58:13  <frosch123> it's latin pound
20:58:17  <frosch123> "librae"
20:58:36  <frosch123> i never thought it would actually be an L desprite looking like one
20:59:12  <frosch123> and it's related to lira
20:59:25  <Wolf01> "a reasonable approximation can be made by typing an "f" over an "L"."
20:59:49  <frosch123> pff, tell them to bind caps lock to compose
20:59:55  <frosch123> or compose to caps lock?
21:00:01  <Wolf01> Lira is ₤
21:00:29  <frosch123> yeah, the = represents stability :)
21:00:31  <frosch123> like in €
21:02:19  <frosch123> planetmaker: anyway, µg sounds like chemistry, i would have expected either astronomical units, or atomar units
21:03:18  <Wolf01> frosch123, do you have a moment to apply a patch and help me to spot an access violation?
21:03:33  <frosch123> sure
21:03:39  <frosch123> i think i have a clean working copy
21:03:43  *** gelignite has quit IRC
21:04:18  <Wolf01> this one compiles and runs fine
21:04:25  <DorpsGek> Commit by frosch :: r27896 /trunk/src (3 files in 3 dirs) (2017-08-20 23:04:21 +0200 )
21:04:26  <DorpsGek> -Fix: some warnings
21:04:30  <frosch123> now i do
21:05:06  <Wolf01> But if you remove ->GetInstance() from settings.ini it has _globals not initialized and throws access violation
21:05:21  <Wolf01> But _globals should be initialized at that point
21:05:28  <planetmaker> frosch123, how much does a single grain of sand weigh? How much a marble? That's my typical size scale :D
21:06:09  <frosch123> constructor workers use very different grain sizes of sand
21:06:16  <frosch123> :p
21:06:38  <frosch123> Wolf01: doesn't compile
21:06:40  <planetmaker> :) they do
21:06:51  <Wolf01> Uhm, what is missing?
21:07:00  <frosch123> oh, i guess i need to patch sdl_v, which you do not compile on windows
21:08:38  <frosch123> _exit_game?
21:09:08  <frosch123> #include "../globals.h"
21:09:36  <frosch123> Wolf01: warning: globals has non-virtual destructor
21:09:42  <Wolf01> Yes, I'm moving the globals
21:10:10  <frosch123> i definitely would move transparency settings to guisettings
21:10:13  <frosch123> not to globals
21:10:26  <frosch123> gamemode and transparencysettings is completely unrelated
21:10:54  <Wolf01> Ok
21:11:54  <Wolf01> So I should move only _game_mode, _switch_mode and _exit_game
21:12:10  <frosch123> yeah, those would seem related
21:12:12  <Eddi|zuHause> frosch123: but doesn't the title game have magic transparency values?
21:12:19  <Wolf01> Maybe renaming Globals => GameState
21:12:50  <frosch123> Eddi|zuHause: many, no pbs reserations, no breakdowns, ...
21:13:40  <frosch123> if you want to move everything that is different in title game to that class, you may have picked the wrong approach :)
21:14:01  <Wolf01> BTW, in case it would happen again, what could be that access violation? SDTG_VAR evaluated in another thread or such?
21:14:38  <Wolf01> _globals is initialized in the entry point
21:15:47  <frosch123> Wolf01: so, it compiled, what am i supposed to do next?
21:16:05  <Wolf01> Go into settings.ini and remove ->GetInstance()
21:16:11  <Wolf01> From transparency options
21:16:21  <frosch123> _globals->transparency_opt  ?
21:16:28  <Wolf01> Yes
21:16:50  <frosch123> why do you have _globals and Globals::_instance?
21:16:58  <Wolf01> Because it's a singleton
21:17:09  <frosch123> that answer makes no sense
21:17:17  <frosch123> you have a doubleton
21:17:28  <frosch123> _globals and Globals::_instance makes two
21:17:39  <Wolf01> I would like to remove the _global at the end
21:19:31  <Wolf01> I could ::GetInstance() everywhere, but it's long
21:20:08  <Eddi|zuHause> you need a get-method that autmatically creates the instance if it doesn't exist
21:20:27  *** pdoan has quit IRC
21:20:38  <frosch123> Wolf01: also calling a static method with a instance pointer is kind of pointless
21:21:25  *** pdoan has joined #openttd
21:21:49  *** supermop has quit IRC
21:22:29  <LordAro> what is the advantage to having one massive global, as opposed to lots of little ones?
21:23:04  <frosch123> LordAro: wolf wants to create it with a factory to insert some mocks
21:23:18  <Eddi|zuHause> ideally, you would have no globals, but some sort of easily switchable context
21:23:25  <LordAro> i see
21:23:29  <frosch123> or he wants to run two instaces of ottd in one task
21:24:06  <Wolf01> Don't give me weird ideas :P
21:25:55  *** pdoan has quit IRC
21:26:54  *** pdoan has joined #openttd
21:27:16  <peter1138> load the map in 16x16 chunks
21:27:56  <frosch123> Wolf01: anyway, the settings stuff has static initialisation
21:27:58  <peter1138> add the farlands
21:28:27  <frosch123> it does &_globals->GetInstance()->transparency_lock or &_globals->transparenc_lock during static intialisation
21:28:35  <frosch123> which is way before openttd_main
21:28:40  <Wolf01> Oh
21:28:44  <frosch123> so, _globals is NULL at that point
21:28:57  <frosch123> while the method forces the initialisation
21:29:09  <Wolf01> But why it didn't throw the exception until the end of openttd_main?
21:29:33  <Wolf01> "end"
21:29:34  <frosch123> for me it segfaults in LoadFromConfig
21:29:58  <frosch123> precisely when it loads the settings, and tries to store them at NULL
21:30:13  <frosch123> well, NULL+offsetof(.., transparenc...)
21:30:48  <Wolf01> Ok, but _globals is before LoadFromConfig()
21:31:13  <frosch123> btw. this also means that SLEG will never work if you want to swap instances of _globals at runtime
21:31:56  <frosch123> Wolf01: yes, but _globals is not used during LoadFromConfig, but during static initialisation
21:32:02  <frosch123> which is before main()
21:32:52  <frosch123> when you call GetInstance in openttd_main it has already been called by misc_settings.ini
21:33:06  <frosch123> GetInstance is called before main() is called
21:33:13  <Wolf01> Uhm
21:33:16  <Wolf01> I'm lost
21:33:26  <frosch123> Wolf01: read up on "static initialisation" :)
21:33:48  <frosch123> the stuff in SLEG is done during static initialisation
21:35:30  <Wolf01> Oh, because settings.h <-
21:35:41  <frosch123> no
21:36:25  <Wolf01> Aren't headers evaluated first?
21:36:39  <frosch123> SLEG is translated into "static const void* ptr_to_trans = &Globals::GetInstance()->transparency;
21:37:01  <frosch123> Wolf01: "headers" is no concept known to the compiler or linker
21:37:45  <frosch123> the point is that all "static" variables in global scope are initialised before main() is called
21:38:05  <Wolf01> Ok, makes sense
21:38:10  <frosch123> if you initialise _globals in main(), it is still NULL during static initialisation
21:38:31  <frosch123> if you call GetInstance() during static initialisation, that forces it to be called before main()
21:38:50  *** HerzogDeXtEr has quit IRC
21:39:00  <Wolf01> Globals *_globals = Globals::GetInstance(); <- this could have done the trick?
21:39:23  <frosch123> no, that is a deep rabbit hole
21:39:40  <frosch123> if you then use _globals during static initialisation, you get undefined behaviour
21:40:26  <frosch123> you can't define whether _globals is assigned before or after the SLEG
21:40:30  <Wolf01> Right, it says that in "static initialization order fiasco"
21:41:05  <frosch123> if you want to dynamically allocate those globals, you either always use GetInstance
21:41:08  <frosch123> or you get rid of SLEG
21:41:10  <Eddi|zuHause> hence you need a property with a get method
21:41:18  <frosch123> for example by moving transparency to guisettings :p
21:41:27  <Wolf01> Yes, makes sense
21:43:07  <Eddi|zuHause> the point of a property is exactly to hide this call to GetInstance
21:43:46  *** FLHerne has quit IRC
21:44:17  <Wolf01> Better if I start again, I mangled too much this local repo
21:44:37  <frosch123> do you have a list of globals
21:44:55  <frosch123> or do you just handle them when you find one?
21:45:40  <Eddi|zuHause> just grep for variables starting with _?
21:46:42  <frosch123> i thought for "extern"
21:46:56  <Wolf01> I wanted to move most of them in Globals, but it doesn't make sense because 1) different scopes; 2) problem of usage like the settings one
21:47:00  <V453000> RGB_DESTROYER
21:47:03  <V453000> gg
21:47:06  <Wolf01> +1
21:47:12  <V453000> iWin
21:47:22  <frosch123> ottd is a peaceful game
21:47:30  <V453000> graphics development isn't
21:47:33  <frosch123> RGB_SLUGGER
21:47:34  <Wolf01> RGB_BULLDOZER
21:47:46  <V453000> XD RGB DOZER
21:47:55  <guru3> am I just thinking crazy? I seem to remember that the original TT music was different from TTDs, but don't want to install them both to figure it out -_-
21:47:59  <frosch123> RGBOZER?
21:48:12  <V453000> no would be INDEXOZER
21:48:14  <Wolf01> Reggae Booze
21:48:24  <V453000> RGB_WRECKER
21:48:26  *** FLHerne has joined #openttd
21:48:43  <V453000> we haz train crashes and wrecks
21:48:57  <Wolf01> Also, RIP Jerry Lewis :(
21:51:45  *** supermop has joined #openttd
21:51:57  *** mescalito has quit IRC
21:59:50  *** supermop has quit IRC
22:10:28  *** glx has quit IRC
22:10:49  *** glx has joined #openttd
22:12:17  *** Biolunar has joined #openttd
22:22:04  *** Progman has quit IRC
22:35:30  *** pdoan has quit IRC
22:36:28  *** pdoan has joined #openttd
22:40:55  *** pdoan has quit IRC
22:41:58  *** pdoan has joined #openttd
22:49:21  *** Flygon has joined #openttd
22:53:10  <Eddi|zuHause> guru3: i think TTD added some more songs, and some of the existing ones might have been reworked. not sure
22:54:05  <Eddi|zuHause> guru3: also, how the music soundes heavily depended on your sound card
22:56:25  *** Wormnest has quit IRC
22:57:51  *** Tirili has quit IRC
22:59:47  *** supermop has joined #openttd
23:05:03  *** tycoondemon has joined #openttd
23:13:06  *** frosch123 has quit IRC
23:38:51  *** FLHerne has quit IRC
23:51:24  <Wolf01> Ha! Me (left) and a friend of mine on a building contest during the last exposition

Powered by YARRSTE version: svn-trunk