IRC logs for #openttd on OFTC at 2015-05-17
⏴ go to previous day
00:10:22 *** FLHerne has joined #openttd
03:15:48 *** supermop has joined #openttd
04:19:53 <supermop> had 4 beers from up there last night
04:23:34 <supermop> Noisy Minor Red Ale, Newstead Macadamia Amber, Green Beacon Pale, and 4 Hearts Coffee Cream Ale
04:24:07 <supermop> it's good beer week here, and the bar we went to last night was doing all queensland craft breweries
04:24:31 <Pikka> never heard of any of them, they obviously don't sell much locally :)
04:25:00 <supermop> i didnnt see any of them when i was up there either
04:25:31 <supermop> i almost wish they were bottled instead of on tap so i could at least get a look at the labels
04:30:08 <supermop> of f to grab lunch, back later
05:26:40 *** AbsoluteVeritas has quit IRC
05:30:41 *** |Truth| has joined #openttd
05:48:34 *** strohalm has joined #openttd
07:19:49 *** sla_ro|master has joined #openttd
07:23:27 *** Biolunar has joined #openttd
07:35:57 *** andythenorth has joined #openttd
08:16:15 *** Alberth has joined #openttd
08:16:15 *** ChanServ sets mode: +o Alberth
08:19:30 <V453000> 7 growth stages per tree?
08:21:30 <V453000> cant see the extra 2 ones
08:24:39 <andythenorth> you should do 22
08:28:40 <supermop> should have model for you today v
08:30:45 <V453000> lol holy fuck it is 500 trees
08:32:22 <V453000> regarding all climatez ofc
08:34:26 <andythenorth> nmlc spends a *lot* of time on FIRS spritelayouts
08:34:47 <andythenorth> for a 70s compile, deleting most of the spritelayout conditional stuff removes 30s
08:36:04 <andythenorth> should be about 20s
08:36:39 <V453000> I would understand you to want a decrease if it took 20 minutes
08:37:13 <andythenorth> any more than about 9s, I have to start watching a YT video
08:37:21 <andythenorth> so that makes coding very slow, because then I’m watching YT
08:38:23 <V453000> draw pixels while waiting :P
08:38:54 <V453000> since my compile takes like 15+ minutes on all bigger projects, I can return to doing models and come back in a while
08:48:25 <andythenorth> this single childsprite takes ~3s to render
08:48:30 <andythenorth> there are 4 of these just for ground tiles
08:49:19 <andythenorth> ~65% of the FIRS compile time is in childsprite expressions
08:49:25 <andythenorth> that’s bonkers :O
08:51:14 <V453000> do you want to do some little coding for YETI or CATS Adaptive Train Stations?
08:51:23 <V453000> you know, to do something useful? :D :P
08:51:37 <andythenorth> faster is better :P
08:51:42 <andythenorth> think of the time I’ll save
08:51:51 <Supercheese> Internet's being dreadfully slow tonight
08:52:44 <V453000> I cant think of the time you save since I do not know how long videos on YT you watch );
08:53:27 <andythenorth> hide_sprite: (climate != CLIMATE_TROPIC) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_DESERT)) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_NORMAL) && ((nearby_tile_terrain_type( 1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type(-1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type( 0, 1) != TILETYPE_DESERT) && (nearby_tile_terrain_typ
08:53:28 <andythenorth> 0,-1) != TILETYPE_DESERT) ) );
08:55:38 <andythenorth> just that expression for just one spriteset is 3s
08:57:29 *** Supercheese is now known as Guest5473
08:57:34 *** Supercheese has joined #openttd
09:00:25 <Alberth> NML makes a lot of copies of expression trees, for some reason
09:04:45 <Alberth> not sure if that would fix anything tbh
09:16:17 <andythenorth> good spot though
09:19:22 * andythenorth wonders if hide_sprite can use LOAD_TEMP()
09:20:45 <andythenorth> it would be handy if OpenTTD had a convenience method to return the correct ground sprite to newgrf :P
09:21:06 <andythenorth> my guess is that a a good number of newgrfs spend a lot of effort on figuring out ground sprites
09:23:07 <V453000> you mean the shape of the ground sprite?
09:24:04 <andythenorth> and the correct tile to use
09:24:25 <andythenorth> hey, nml docs even has an example for LOAD_TEMP
09:24:54 <andythenorth> I would be surprised if that was slower than FIRS approach :)
09:31:27 <andythenorth> if that works it will save 10s I reckon
09:31:45 <andythenorth> and it drops 4 childsprites, so smaller output
09:38:42 <andythenorth> hey, maybe a FIRS compile will be < 1 min if this works :)
09:38:59 * andythenorth tested it with hax
09:42:01 <Alberth> is || left -> right ?
09:42:40 <Alberth> if it preserves order, the (climate == CLIMATE_TROPIC) is completely useless, as it is implied by failing (climate != CLIMATE_TROPIC)
09:44:24 <Alberth> hmm, and you don't even need order preservation for that
09:44:36 *** Pensacola has joined #openttd
09:44:44 * andythenorth is no good at boolean maths :)
09:45:22 <andythenorth> the check should be done once in a switch, with STORE_TEMP on the result
09:45:27 <andythenorth> the example in the nml docs is quite nice
09:45:51 *** Eddi|zuHause has joined #openttd
09:46:17 <andythenorth> hey, this problem is Eddi|zuHause-shaped :)
09:47:03 <Alberth> nml isn't very well designed in its syntax
09:48:36 <andythenorth> ^ the offending template :)
09:50:13 <Eddi|zuHause> not in the morning.
10:08:12 <Alberth> we'll wait 2 hours :p
10:08:53 * andythenorth has childrens’ parties to go to, so will wait some hours more
10:11:10 *** Progman has joined #openttd
10:18:06 *** Ketsuban_ has joined #openttd
10:22:27 <Alberth> andythenorth: for your template, the "climate == CLIMATE_ARCTIC" is redundant at lines 41, 48, 55
10:22:57 <Alberth> line 20 has the same structure, except the climate literal is different
10:24:07 <Alberth> line 27 can be simplified in the same way, if you add parentheses around the latter 2 alternatives of the ||
10:25:43 <Alberth> the idea is as follows: you have (A || ( ( not A) && B) )
10:26:16 <Alberth> euhm ( (not A) || ( A && B ) ) is perhaps easier
10:26:36 <Alberth> which is the same as ( ( not A) || B )
10:27:40 <andythenorth> this can be applied when I move the checks to a switch
10:27:52 <Alberth> in A && B, if B is true, but A is not, A && B will fail. but your || alternative is (not A), which is true, no matter what B is
10:28:05 <andythenorth> the same logic is needed, but should be expanded once, in a switch, not repetitively in hide_sprite
10:29:15 <Alberth> so the change is that the case A=false and B=true can be derived as 'true' in 1 way in your expression, and in 2 ways in the shorter expression
10:30:40 <andythenorth> fun with boolean
10:31:07 <Alberth> booleans are surprisingly complicated :)
10:34:08 * andythenorth will try the switch conversion later
10:36:46 *** oskari89 has joined #openttd
11:37:39 <TrueBrain> always fun to open up your public_html folder, and find all these fun little patches :D
11:37:54 <TrueBrain> WT3 live patch .. where you receive translations live from WT3, instead of from your local folder :P
11:38:21 <TrueBrain> GS addition to ask all players questions and gather their answers ..
11:41:27 <Xaroth|Work> poll: is TrueBrain crazy
11:41:33 <Xaroth|Work> results: 101%: yes, 0% no
11:43:23 <TrueBrain> a train hurts you when you get in?
11:43:35 <Xaroth|Work> depends on your method of entry
11:43:39 <Xaroth|Work> full frontal.. quite much so
11:44:20 <TrueBrain> well, it mgiht, if the windshield bursts
12:00:16 *** sniezyn has joined #openttd
12:01:03 *** sniezyn has joined #openttd
12:08:08 *** andythenorth_ has joined #openttd
12:20:00 *** andythenorth_ has joined #openttd
12:20:53 *** Ketsuban_ is now known as Ketsuban
13:08:21 *** HerzogDeXtEr has joined #openttd
13:25:16 *** Alberth has joined #openttd
13:25:16 *** ChanServ sets mode: +o Alberth
13:32:15 *** Supercheese_ has joined #openttd
13:32:15 *** Supercheese is now known as Guest5495
13:32:16 *** Supercheese_ is now known as Supercheese
13:33:22 *** roidal_ has joined #openttd
13:34:51 *** gelignite has joined #openttd
13:42:03 *** davidstrauss has joined #openttd
13:42:03 *** eQualizer has joined #openttd
13:42:03 *** luaduck has joined #openttd
13:42:03 *** NGC3982 has joined #openttd
13:42:03 *** OsteHovel has joined #openttd
13:42:03 *** theholyduck has joined #openttd
13:42:03 *** Prof_Frink has joined #openttd
13:46:30 *** tokai|mdlx has joined #openttd
13:57:33 *** FLHerne has joined #openttd
14:51:35 *** andythenorth has joined #openttd
14:54:48 <andythenorth> so I *do* need to take care about the slots used for PAX and Mail :D
14:55:39 <andythenorth> also food in tropic and arctic
14:57:19 <andythenorth> the specs for nfo and nml somewhat imply that without stating it explicitly
15:22:05 *** Progman_ has joined #openttd
15:25:27 *** Progman_ is now known as Progman
15:27:50 <andythenorth> default houses accepting cargos by fixed slot is expected yes?
15:46:01 <Alberth> apparently, but not nice, imho
15:47:07 <Alberth> it defeats the idea of cargo labels somewhat, imho
15:50:29 <andythenorth> maybe we fix it for 2.0? o_O
15:50:32 <andythenorth> 2.0 all the things
16:32:35 *** HerzogDeXtEr1 has joined #openttd
17:03:55 <Eddi|zuHause> the least thing it needs to be fixed is a sensible definition of what cargo will be accepted if GOOD/FOOD/... is not available. nothing? a random other cargo with the right town effect?
17:04:40 <Eddi|zuHause> or just listen on town effect and ignore cargo label? so houses that now accept food accept any TE_FOOD cargo?
17:05:29 <Eddi|zuHause> that may change a lot of current behaviour (e.g. tourists)
17:12:55 <andythenorth> is that desirable?
17:12:58 <andythenorth> or should I just fix FIRS?
17:13:16 <andythenorth> is FIRS non-compliant with spec w.r.t cargo slots?
17:32:57 <TrueBrain> owh, the joys of MSVC ... memmove already defined in LIBCMTD.lib
17:33:39 * andythenorth will just fix FIRS
17:34:25 <andythenorth> so pax must be 0, mail must be 2
17:35:27 <andythenorth> custom list-splice :P
17:36:41 <TrueBrain> and now I have unresolved external symbols .. grr
17:37:08 <TrueBrain> who decided to make this so complicated :(
17:40:57 <TrueBrain> ah, it helps if both projects are Debug, not a mix of Debug/Release :D
17:42:00 <Eddi|zuHause> andythenorth: i think goods was special as well
17:42:50 * andythenorth distracted by Fractional-Reserve Banking
17:42:53 <andythenorth> which is very interestin
17:44:11 *** smoke_fumus has joined #openttd
17:45:08 <andythenorth> money does not work like I was taught it does
17:46:01 <TrueBrain> grr, debug/debug doesnt work either; how hard is it to add library to OpenTTD :(
17:47:47 <TrueBrain> with randomly disabling stuff it works, but still my library functions arent found
17:54:24 <andythenorth> or write some horrible magic to detect certain cargos and magically rewrite the list, with magic
17:55:21 <TrueBrain> omg ... cdecl vs fastdecl ..
17:55:32 <TrueBrain> andy: "horrible" .. stopped reading after that :P
17:58:06 <TrueBrain> wow ... OpenTTD (in debug mode) is really unresponsive when you click content :P
17:59:32 <TrueBrain> online content bla thingy
17:59:38 <TrueBrain> the list is too long or something
18:00:34 <TrueBrain> I remember the time the list was nice and small :P
18:00:42 <michi_cc> TrueBrain: It resorts the content list constantly or something like at and for some reason the sort is very slow in Debug mode. Could never be bothered to find out just why exactly the slowness occurs (I mean, it's totally fine in Release, so...).
18:01:17 <TrueBrain> hehe; fair enough :)
18:02:04 <TrueBrain> I now just have to add a filter quickly
18:02:35 <TrueBrain> awh, my TLS handshake fails :(
18:03:28 <michi_cc> First guess would be to some algorithmic interaction when the list is already perfectly sorted for which Release has some shortcut or so. OTTD could probably cut down on the sorting as well.
18:03:51 <TrueBrain> even with filter it is really really slow :P
18:04:02 <TrueBrain> but once downloaded, it is fast enough
18:05:52 <TrueBrain> owh, lolz ... handshake over port 80
18:28:38 <TrueBrain> major version mismatch :(
18:28:41 <TrueBrain> TLS doesnt love me :(
18:38:41 <TrueBrain> lolz; this TLS library doesnt check if the received msgtype of the handshake is what he expected
18:38:44 <TrueBrain> he just blindly assumes it is :P
19:05:15 <TrueBrain> yippie, https connection with the openttd client \o/
19:25:01 <Eddi|zuHause> that's why you like me.
19:27:02 <andythenorth> anybody spot the my mistake here?
19:27:04 <andythenorth> mandatory_numeric_ids = {'PASS': 0, 'MAIL': 2, 'GOODS': 5, 'FOOD': 11}
19:27:40 <TrueBrain> everything is 4 letters, except GOODS? *guessing randomly* :P
19:27:53 <andythenorth> you score 1 point
19:28:43 <TrueBrain> the ids are not numeric :P
19:28:45 <andythenorth> otherwise TrueBrain is winner
19:30:56 * andythenorth announces: Truebrain is winner
19:31:48 <michi_cc> Zwei Schläge weniger.
19:37:04 <TrueBrain> lolz, connecter is a valid english word?
19:37:07 <TrueBrain> always thought it was a typo
19:38:15 <Eddi|zuHause> english is weird sometimes. most of the times.
19:38:56 <andythenorth> I’d have had connector
19:39:10 <andythenorth> the language is somewhat bendy
19:40:22 <Eddi|zuHause> "Paul Dennis, who stood for the Trade Union and Socialist Coalition in Rainham North, Kent, insisted the result [0 votes for him] was wrong because he had “definitely” voted for himself."
19:40:36 <Rubidium> isn't connecter someone that connects, live a employer is someone that employs
19:41:06 <Rubidium> likewise I'd reckon connectee would be valid as well, as the party that is connected to
19:41:27 <Rubidium> like an employee is someone that's employed
19:41:31 <TrueBrain> connecter and connector are both valid, meaning the same thing ;)
19:41:44 <TrueBrain> connecter gives 170M hits on google, connector 180M
19:41:49 <TrueBrain> seems the world is divided :P
19:42:02 <TrueBrain> connecter is more often refered to from french thou
19:42:23 <Eddi|zuHause> sometimes the world divides along weird lines
19:43:15 <Rubidium> I'd not use google to say anything about how common some word is in a particular language
19:46:22 <Eddi|zuHause> i've seen people use google in that way. i don't think it's a particularly strong argument
19:47:52 *** frosch123 has joined #openttd
19:49:22 <TrueBrain> joyful, our generate script fails if you have a space in your directory path under windows :D
19:49:25 <Rubidium> in any case, trunk has 120 connecters (grep -Ri connecter) and 0 connectors
19:50:05 <TrueBrain> Rubidium: doesnt make it a valid english word ;) But I am surprised it really is .. it sounds wrong/weird
19:50:09 <TrueBrain> connecter .. I would always write connector
19:50:16 <TrueBrain> I am happy they are identical :D
19:50:36 <andythenorth> frosch123: it has been a busy day. TrueBrain is shaking hands with everyone, and I broke towns.
19:53:17 <frosch123> so truebrain has a flu now, and i should avoid him?
19:53:27 <TrueBrain> shouldnt you always?
19:53:47 <andythenorth> can anyone edit the newgrf wiki?
19:54:01 * andythenorth wonders about updating the stuff on cargo IDs, but is banned from wiki
19:54:20 <frosch123> he used a password with spaces or something
19:54:22 <andythenorth> changed my forum password, seems the most likely cause
19:54:53 <andythenorth> does wiki keep the hash locally, or is it oauth or such?
19:59:15 <TrueBrain> no clue how that one works :(
20:00:09 <andythenorth> I was considering a note that PASS, MAIL, GOOD, FOOD need specific cargo slots
20:01:24 <TrueBrain> ffs, this generate script is annoying me :P
20:01:47 <andythenorth> I learnt a new acronym this week
20:01:55 <TrueBrain> fuck the fucking fuck?
20:02:02 *** Johnnei has joined #openttd
20:02:06 <andythenorth> fucking thing’s fucking fucked
20:02:10 <andythenorth> but yours will do
20:07:15 *** Bhoren_ has joined #openttd
20:19:20 <andythenorth> so why is this checking neighbouring tiles? :o
20:19:21 <andythenorth> hide_sprite: (climate != CLIMATE_TROPIC) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_DESERT)) || ((climate == CLIMATE_TROPIC) && (nearby_tile_terrain_type(0, 0) == TILETYPE_NORMAL) && ((nearby_tile_terrain_type( 1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type(-1, 0) != TILETYPE_DESERT) && (nearby_tile_terrain_type( 0, 1) != TILETYPE_DESERT) && (nearby_tile_terrain_typ
20:19:22 <andythenorth> 0,-1) != TILETYPE_DESERT) ) );
20:19:26 <frosch123> michi_cc: TrueBrain: the slowness in the content gui in debug mode is caused by the md5sum computation of the scenarios/savegames
20:19:32 <andythenorth> sprite is GROUNDSPRITE_DESERT_1_2
20:19:52 <frosch123> that's why it hangs after the basesets, but only when opening content gui for the first time
20:21:42 <frosch123> andythenorth: half desert
20:22:06 * andythenorth wonders how much it matters that FIRS does these terrain checks
20:22:24 <frosch123> we have no built-in methods for useful stuff :p
20:22:36 <TrueBrain> frosch123: it only does that in debug mode, or?
20:22:44 <andythenorth> they’re incredibly slow to expand
20:22:50 *** FLHerne has joined #openttd
20:23:18 <frosch123> TrueBrain: no, but apparently md5sum computation benefits a lot from -O2
20:23:21 <michi_cc> frosch123: That might be something else. It's definitely slow until all results have been received, and not just the first time. Randomly inspected call stacks almost always end somewhere below the list sort for me.
20:23:23 <andythenorth> 65% of FIRS compile time is spent on spritelayout expansion
20:24:07 <andythenorth> some of which is redundant
20:24:21 <andythenorth> showing correct terrain at most industries is useless, because they provide a ground tile
20:24:29 <michi_cc> frosch123: More specifically, in the sorting function, which does two GetString()'s, which use a std::stack for argument expansion. And STL classes/iterators have a lot of extra debug stuff in MSVC Debug mode than is skiped in Release.
20:25:45 <andythenorth> even where terrain is shown, the results are dubious
20:25:50 <andythenorth> animals grazing on desert
20:26:47 <frosch123> ok, so there are multiple things that make it slow :)
20:29:49 <Eddi|zuHause> <andythenorth> so why is this checking neighbouring tiles? :o <- desert/grass transition tiles?
20:31:01 <andythenorth> wondering if there’s a better solution by design
20:32:01 <andythenorth> i.e. don’t show terrain at industries
20:32:14 <andythenorth> thereby eliminating the issue
20:33:23 <Eddi|zuHause> it can probably be simplified by clever ue of don't-cares
20:33:47 <andythenorth> my options currently are:
20:34:23 <andythenorth> 1. rewrite to switches and temp registers, not spritelayout expressions (provably faster in tests so far), keeping all the current fine-grained checks
20:34:29 <andythenorth> 2. as 1, but drop some checks
20:34:37 <andythenorth> 3. don’t show terrain at any industry
20:34:51 <andythenorth> 4. show terrain at some industries, special-cased using 1 or 2
20:35:02 <andythenorth> 4 would be the fastest compile, but also most complicated
20:35:21 <andythenorth> actually 3 would be fastest, but eh, loss of features
20:35:56 <Johnnei> about compile times, ever tried compiling firefox? xD
20:36:46 <Johnnei> Was quite suprised how quickly openttd compiled after having compiled firefox for the first time
20:38:12 <Eddi|zuHause> i imagine firefox has an order of magnitude more code than openttd
20:38:17 <andythenorth> currently FIRS has to expand 390 expressions for terrain sprite
20:38:24 <andythenorth> of those 336 are pointless
20:38:42 <andythenorth> and the remainder are ‘needed’, but the results look bad in snow or desert
20:38:57 <andythenorth> this isn’t meaningless optimisation either, it’s 10s or 15s of a compile
20:39:05 <andythenorth> on a 70-80s compile
20:39:07 <Eddi|zuHause> Johnnei: but for andytheimpatient, anything that is not instant is too long.
20:39:37 <andythenorth> OpenTTD compiles faster than FIRS :P
20:39:43 <Johnnei> I actually considered stopping the build after it was churning away for an hour e.e
20:40:12 <andythenorth> try updating your ports tree, or even just building GCC from scratch :P
20:40:21 <Johnnei> Got to love incremental builds, would be straight up pain to compile for nearly 2 hours for every little damn change
20:40:56 <Eddi|zuHause> wine bisecting was annoying enough
20:41:38 <Eddi|zuHause> in the initial big steps of a bisection, there are too many changes to do things "incrementally"
20:42:06 <Johnnei> hehe, I let visual studio take care of figurig out how to make it incremental :p
20:43:05 <Eddi|zuHause> Johnnei: it does that the same way any other system does it: "has this file been changed since the last compile?"
20:43:32 <Johnnei> with the added restriction: ow we can multithread it anymore
20:43:43 <andythenorth> can the FIRS farms just use a tile from the default farm fields?
20:43:49 <Eddi|zuHause> Johnnei: but if you jump between releases, practically every file changed anyway
20:44:34 <Eddi|zuHause> andythenorth: you mean for the industry or for the random fields?
20:44:48 <Johnnei> Or atleast the files which take the longest to compile :p
20:45:13 <andythenorth> for the fields where the animals are
20:45:16 * andythenorth finds screenshots
20:49:29 <Eddi|zuHause> weren't you just working on getting rid of default base set tiles before?
20:50:25 <TrueBrain> cannot convert parameter 1 from 'ssl_context *' to 'ssl_context *'
20:50:36 <andythenorth> default base set tiles are fine if constant in all terrain
20:50:51 <andythenorth> it’s terrain-specific base set tiles that are tedious
20:51:22 <michi_cc> Bah, now you made me actually look ar it :p
20:52:23 <Eddi|zuHause> andythenorth: and how is a farm not terrain specific?
20:52:45 <TrueBrain> that resolves the issue of being slow?
20:53:54 <andythenorth> Eddi|zuHause: dunno, can cows eat snow? Do sheep eat sand? :)
20:53:56 <michi_cc> Mostly, yes. There might still be the MD5 stuff frosch mentioned, but the window now feels almost like in Release.
20:54:41 <TrueBrain> I am neck-deep in TLS stuff :P WIll try it when it compiles :D
20:58:22 <andythenorth> the only industry that currently validly has terrain-specific ground tile is the forest
20:58:31 <andythenorth> and that uses a different template, for legacy migration reasons :P
20:58:35 <TrueBrain> bah; it is hard to get all the callbacks etc right and clean ..
20:58:49 <TrueBrain> every time I think I have something decent ... I found a big gaping hole in the idea :P
20:59:17 <Eddi|zuHause> andythenorth: one would imagine the sheep are inside during the winter...
20:59:50 <Eddi|zuHause> andythenorth: (and the barn door closed)
21:00:13 <andythenorth> so I could make use of the existing snow / not snow split to handle that
21:00:35 <andythenorth> just delete the sheep from the snow sprite...
21:01:35 <frosch123> just make the sheep snow coloured
21:03:18 <frosch123> michi_cc: s/if/of/, but nice otherwise :)
21:03:46 <Alberth> perhaps add a check for minimal ottd version, andy?
21:04:08 <V453000> LOL snow camo for sheep
21:04:41 <andythenorth> could just update that?
21:05:27 <andythenorth> it’s funny being the guardian of a codebase I didn’t write
21:05:31 <andythenorth> I guess that’s common enough
21:05:41 <andythenorth> I have no idea about a lot of FIRS
21:06:16 <Alberth> you didn't encounter everything while changing templates?
21:06:46 <andythenorth> I don’t read most of it
21:06:51 <andythenorth> change, run make
21:06:55 <andythenorth> if it doesn’t break, commit
21:07:32 <andythenorth> regression tests would be a luxury :P
21:09:38 <andythenorth> so I could *immediately* speed up FIRS by only checking terrain at the 9 industries that need to
21:09:45 <andythenorth> and not the 56 that don’t :P
21:10:27 <andythenorth> rewriting the expressions to use temp registers would be useful
21:10:34 <andythenorth> but I am not good enough at boolean logic
21:15:12 <andythenorth> is there a reason (other than just work) that we newgrf can’t delegate the ground tile choice to OpenTTD?
21:16:52 <TrueBrain> in their sourcecode it reads: typedef struct { .. } bla;
21:17:01 <frosch123> not really, for water tiles we even do it
21:17:06 <TrueBrain> now I want to forward declare bla, as I am only going to use it as a pointer, and dont want to include the header all the time
21:17:09 <frosch123> main problem are slopes/foundations
21:17:17 <TrueBrain> what should it be? :D
21:17:27 <andythenorth> slopes / foundations are also a problem in FIRS spritelayouts afaict :P
21:17:34 <andythenorth> seem to be special cased
21:17:56 <Johnnei> conclusion: remove slopes/foundations
21:18:07 <frosch123> TrueBrain: struct bla; typedef struct bla;
21:18:17 <Alberth> TrueBrain: it's an anonymous struct, with a var named 'bla'
21:18:29 <andythenorth> could we add ground tile delegation?
21:18:45 <TrueBrain> Alberth: I know, that is my issue :P
21:18:46 * andythenorth wouldn’t ask, except FIRS already is pinned to nightly OpenTTD
21:18:49 <TrueBrain> frosch123: doesnt work :(
21:18:53 <andythenorth> due to industry count increase
21:19:00 <andythenorth> so now would be a good time
21:19:01 <frosch123> hmm, maybe, struct bla; typedef struct bla bla;
21:19:18 <frosch123> anyway, c has separate name spaces for "structs" and "typedefs"
21:19:24 <TrueBrain> frosch123: redefinition issues :(
21:19:36 <TrueBrain> strongly considering just casting it to void* :P
21:19:50 <Alberth> afaik you cannot refer to anonymous structs, as... they are anonymous
21:21:29 <Johnnei> Surely the NSA can ;)
21:21:40 <TrueBrain> random noise is random
21:23:31 <andythenorth> newgrf would declare a special sprite number to get correct climate-dependent ground tile?
21:23:40 <andythenorth> or ottd would just always draw the terrain?
21:24:19 <TrueBrain> hiding globals in classes like a bozzz
21:24:35 <Alberth> TrueBrain: I wonder if you can make another anonymous struct with the same content and use that as type
21:24:37 <frosch123> andythenorth: when a newgrf draws a plain water ground tile, ottd sometimes adds canal/river dikes
21:24:50 <TrueBrain> Alberth: possibly; but in there are other anonymous structs ....
21:24:53 <frosch123> the same happens for railtypes
21:24:59 <frosch123> station draws a plain rail ground tile
21:25:05 <andythenorth> my preferred interface would be to declare GROUNDSPRITE_NORMAL
21:25:10 <andythenorth> and get the correct sprite
21:25:13 <andythenorth> but that may have issues
21:25:14 <frosch123> ottd draws plain ground tile + railtype overlay instead
21:25:36 <frosch123> so, essetially we need a special sprite number for "draw standard ground sprite"
21:25:47 <TrueBrain> oeh, it compiles; lets ship it!
21:25:56 <andythenorth> TrueBrain: what could go wrong?
21:26:01 * andythenorth never tests commits any more
21:26:04 *** mczapkie has joined #openttd
21:26:09 <andythenorth> as the forums have recently shown
21:29:02 <Eddi|zuHause> __ln__: what strikes me as odd about this article is that they say they factored out 231. which is not prime. and has 3 as prime factor. which would be a trivial check for the original number.
21:31:09 <andythenorth> frosch123: we need slope information because...? o_O
21:31:48 <frosch123> you need at least "orignal slope"/"flat foundation"
21:32:04 <TrueBrain> if (err != ABC && err == DEF)
21:32:11 <TrueBrain> right ... lets stop with the insanity? :D
21:32:28 <andythenorth> yes, that would be convenient
21:32:42 <andythenorth> although industry can sort the foundations out explicitly
21:33:08 <Eddi|zuHause> TrueBrain: for the off-chance that ABC == DEF?
21:40:32 <TrueBrain> meh; I need to access callback from a child in the initializer of a parent ..
21:40:36 <TrueBrain> that is not going to happen :(
21:42:50 <TrueBrain> thank you for letting us know
21:42:53 <TrueBrain> I feel much better now :P
21:49:40 <DorpsGek> Commit by michi_cc :: r27288 /trunk/src (3 files in 2 dirs) (2015-05-17 21:49:35 +0200 )
21:49:41 <DorpsGek> -Fix: Slow network content GUI in MSVC Debug builds due to repeated string resolving.
21:50:11 <andythenorth> I’m not sure that any more than GROUNDSPRITE_NORMAL is needed
21:50:53 <andythenorth> not great results in desert though
21:53:09 <TrueBrain> michi_cc: it is still slow, but at least less slow :D
21:56:20 <__ln__> Eddi|zuHause: i wondered about that too, but perhaps factors in RSA terminology are the products of two primes or something like that. dunno, i don't know how RSA works.
21:57:26 <frosch123> mczapkie: andythenorth: industry ids are always local
21:57:42 <frosch123> there is no need to "reserve" any ids
21:57:48 <frosch123> that issue only exists for cargo ids
21:58:28 <Eddi|zuHause> __ln__: ideally, RSA keys are made up out of two prime factors, which both are about equally long. so a factor of 3 should never ever happen
22:00:18 <Eddi|zuHause> __ln__: these two prime factors constitute the private key, while the product is part of the public key. the theory is that factorization is too expensive to do, which makes the concept "safe"
22:00:20 <TrueBrain> HEAP CORRUPTION DETECTED
22:02:14 <TrueBrain> I dont really get why tbh .. it happens on error in ctor
22:02:42 <Eddi|zuHause> __ln__: things become unsafe if one of the factors is very small (like 231, when it's supposed to be a 4000 bit number), or when it's not a prime number at all (which makes the prime factors even smaller)
22:02:54 <frosch123> TrueBrain: usually a duplicate free earlier
22:06:18 <TrueBrain> cant seem to figure out what causes it; owh well, lets first continue on with the happy-flow :)
22:06:50 <frosch123> that's what valgrind is for :p
22:06:56 <TrueBrain> stuck at Windows atm
22:08:51 <TrueBrain> ah, w00ps, yes, that will fail horribly ...
22:08:58 <TrueBrain> using an instance member as int :D
22:09:44 *** tokai|noir has joined #openttd
22:09:44 *** ChanServ sets mode: +v tokai|noir
22:12:26 <TrueBrain> and a double free \o/ :D
22:13:13 <TrueBrain> every time I think: well, that should fix it, it still breaks at the same place :P
22:15:06 <andythenorth> FIRS now compiles 10-15s faster, for no loss of features :D
22:15:39 <DorpsGek> andythenorth: 0.788732394366
22:16:35 <andythenorth> is that 22% faster? I can’t do decrementing % :P
22:16:59 <DorpsGek> andythenorth: 0.211267605634
22:17:25 <TrueBrain> recv() says the connection was aborted
22:19:25 <TrueBrain> ah, port 80 .. why 80 .. you should be on 443 :(
22:23:06 <mczapkie> frosch123, thanks for info, I thougt that industry are allocated globally
22:24:19 <mczapkie> BTW, is TOWNGROWTH_FOOD flag possible for only one cargo?
22:24:42 <frosch123> but iirc the gui only display one
22:25:31 <frosch123> there is some "town effect multiplier" which says how much a cargo counts for some effect
22:25:45 <frosch123> so some cargos can be more foody than others :)
22:26:39 <mczapkie> I dont understand this town effect mutliplier, what if is set to 0? (in opengfx+ industries it is 0 for goods and food)
22:26:57 <frosch123> 0 probably disables it :p
22:27:50 <mczapkie> no, it is working (food is needed in winter)
22:28:07 <frosch123> yes, but does it actually count the food when delivered?
22:28:19 <mczapkie> probably it is triggering possibility of growth, but not count to growth itself
22:28:35 <frosch123> because 0 would mean that x cargo delivered contributes 0*x=0 to the town
22:29:04 <mczapkie> but what about goods - are goods increasing growth of town by default?
22:29:10 <TrueBrain> grr @ MSVC .. didnt ecompile the correct files when I changed an header :(
22:29:31 <frosch123> by default only food and water have such effects
22:29:36 <frosch123> game scripts are more fancy
22:30:24 <mczapkie> it is strange, why goods are not helping growth, but personally I'm usually using GS's
22:35:25 <mczapkie> does anybody know, how to correctly initialize dev.openddtcoop repo and push without user/pasword and "authorization failed" response?
22:36:10 <mczapkie> I have .hgrc ile with user = hg
22:36:34 <frosch123> it creates repository automatically 7 minutes after project setup
22:36:59 <mczapkie> yes, I see the repo (I created project yestarday)
22:37:29 <frosch123> or push to it, if you already have local commits
22:37:46 <mczapkie> I see, this way, thanks
22:40:41 <mczapkie> still asking about user/passwd
22:40:58 <frosch123> use the same .hgrc as for other projects
22:41:04 <frosch123> just replace the projectname in the url
22:41:14 <mczapkie> wait, wrong address, https instead of hg
22:41:50 * andythenorth is running out of ‘go faster’ in FIRS :)
22:42:00 <andythenorth> it’s now < 1 min with primed cache
22:43:22 <mczapkie> works no fine, thanks
22:50:21 <TrueBrain> frosch123: 30 minutes later ... it was a used after free :P
22:50:31 <TrueBrain> a higher layer did free of host, and then I used host ..
22:50:35 <TrueBrain> giving me GARBAGE :P
22:51:23 <glx> you look like a beginner :)
22:52:17 <TrueBrain> luckily it is only the looks ;)
22:52:30 <frosch123> glx: it's his first life
22:54:16 <andythenorth> hmm, there must be a better way to do date sensitive sprites
22:54:43 <andythenorth> I gain 5-10s by dropping the hide_sprite expressions for just 4 building declarations
22:54:54 <Eddi|zuHause> frosch123: are you sure?
22:56:15 <TrueBrain> much less code than I expected :)
22:57:10 <Eddi|zuHause> TrueBrain: and how trustworthy is polarssl, compared to, say, openssl? :p
22:57:27 <TrueBrain> source code in github
22:57:33 <TrueBrain> so that is already a factor 2 :P
22:57:40 <Eddi|zuHause> that is not really an answer :p
22:58:16 <TrueBrain> but it is used by things like OpenVPN, nginx, powerdns, ..
22:58:20 <TrueBrain> so it is good enough for me :P
22:58:30 *** Speedy` has joined #openttd
22:58:51 *** Speedy` is now known as Speedy
22:58:56 <TrueBrain> and the current patch has certificate validation disabled, so ... what can I say :P
23:00:50 <andythenorth> there must be a more elegant way to do this
23:00:52 <andythenorth> hide_sprite: (construction_state != 3) || (terrain_type != TILETYPE_SNOW) || (current_year + 5 * LOAD_TEMP(0) / 0x10000) < 1920 || (current_year + 5 * LOAD_TEMP(0) / 0x10000) >= 1945;
23:00:56 <frosch123> do you want to ship ottd's certificaste with stable releases? :p
23:01:39 <TrueBrain> if anyone has a better suggestion how to do this, I would love to hear it
23:01:58 <TrueBrain> the main thing I would like to avoid, is that if you start 1.5 in 5 years, it yells the certificate is invalid ;)
23:02:22 <Eddi|zuHause> anyone here noticed that kwin is occasionally slow to react and switch focus to a new window?
23:03:57 <andythenorth> hide_sprite: LOAD_TEMP(n)
23:04:06 <andythenorth> just how to structure the switch?
23:04:18 <andythenorth> for STORE_TEMP()
23:05:04 *** Myhorta has joined #openttd
23:19:37 *** andythenorth has left #openttd
23:20:17 <Speedy> one must learn how irc in bed
23:50:44 *** Biolunar has joined #openttd
continue to next day ⏵