Times are UTC Toggle Colours
00:05:08 *** snail_UES_ has joined #openttd 00:55:32 *** Supercheese has quit IRC 01:03:50 *** FLHerne has quit IRC 01:11:39 *** supermop has quit IRC 01:16:10 *** Samu has quit IRC 01:30:17 *** Gustavo6046 has quit IRC 02:27:11 *** supermop has joined #openttd 02:35:12 *** supermop has quit IRC 02:58:37 *** glx has quit IRC 03:01:57 *** ToffeeYogurtPots has quit IRC 03:02:19 *** ToffeeYogurtPots has joined #openttd 03:12:46 *** supermop has joined #openttd 03:13:12 *** cHawk has quit IRC 03:24:54 *** snail_UES_ has quit IRC 03:25:36 *** Thedarkb has quit IRC 03:31:22 *** ToffeeYogurtPots has quit IRC 04:10:58 *** nahkiss has quit IRC 04:11:02 *** dvim has quit IRC 04:11:02 *** innocenat has quit IRC 04:11:24 *** colde has quit IRC 04:15:22 *** innocenat has joined #openttd 04:31:54 *** cHawk has joined #openttd 04:33:27 *** supermop has quit IRC 04:39:48 *** sla_ro|master has joined #openttd 04:49:38 *** nahkiss has joined #openttd 05:06:47 *** HeyCitizen has joined #openttd 05:11:05 *** colde has joined #openttd 05:25:05 *** sla_ro|master has quit IRC 05:31:39 *** cHawk has quit IRC 05:39:30 *** cHawk has joined #openttd 05:54:30 *** Supercheese has joined #openttd 06:05:57 *** chomwitt has quit IRC 06:11:33 *** dvim has joined #openttd 06:34:50 *** supermop has joined #openttd 06:43:09 *** Cubey has quit IRC 06:43:52 *** supermop has quit IRC 07:20:35 *** john-aj has joined #openttd 07:36:27 *** Smedles has joined #openttd 07:48:11 *** keoz has joined #openttd 08:34:01 *** Supercheese has quit IRC 08:48:12 *** andythenorth has joined #openttd 08:48:15 <andythenorth> o/ 09:00:58 *** Biolunar has joined #openttd 09:16:22 *** Biolunar has quit IRC 09:17:20 <SpComb> Eddi|zuHause: is it actually possible to build flyovers for rail junctions? 09:17:31 <SpComb> was unable to figure out how yesterda 10:06:07 <andythenorth> I like this boat https://www.flickr.com/photos/56155704@N02/27265894554/in/pool-workboatsntugboats/ 10:13:02 *** andythenorth has quit IRC 10:22:19 <Eddi|zuHause> SpComb: yes, with manually adjusting the incline of the track, you can build bridges 10:22:58 <Eddi|zuHause> but it's a bit fiddly 10:25:49 <SpComb> haven't tried that yet 10:26:18 <SpComb> I did one tunnel underpass to keep the pax and cargo networks separate, and that was waaay too fiddly 10:26:32 <SpComb> ended up accidentially deleting the original tunnel and being unable to rebuild it, had to revert to an autosave 10:26:33 <Eddi|zuHause> there's also http://steamcommunity.com/sharedfiles/filedetails/?id=837486389 but i never tried that 10:28:13 <SpComb> hah, modded in as a passsenger station? 10:28:40 <SpComb> > Are there any suggestions for fixing a CTD when these are selcted? I can load the mod in a save, but anytime I click to select one of the junctions I get an instant freeze and then crash. 10:28:53 <SpComb> wish it was in the actual game :< 10:28:58 <Eddi|zuHause> that sounds unfortunate 10:30:59 <SpComb> but yeah, at least with the tunnel, if you accidentiall deleted it and then tried to rebuild it by connecting the tracks, it would just want to build some crazy cutting across the tracks on top instead of a new tunnel 10:31:38 <SpComb> you have to like delete the tracks, raise the ground up again (?), and then rebuild the tracks with a downward slope in order to get a new tunnel 10:32:24 <SpComb> somehow they managed to get the similar UI to work perfectly well in Cities: Skylines 10:39:14 <Eddi|zuHause> C:S construction method is also not without flaws 10:39:22 *** andythenorth has joined #openttd 11:02:48 *** ToBeFree has joined #openttd 11:04:20 *** Thedarkb has joined #openttd 11:14:57 *** ToBeFree has quit IRC 11:51:24 *** Samu has joined #openttd 11:51:40 <Samu> hi 11:54:29 *** tokai|noir has joined #openttd 11:54:29 *** ChanServ sets mode: +v tokai|noir 11:59:32 *** FLHerne has joined #openttd 11:59:48 *** tokai has quit IRC 12:02:34 *** Borg has joined #openttd 12:02:40 <Borg> howdy... 12:02:49 <SpComb> Eddi|zuHause: I can't remember having any problems with it, apart from some really difficult things being a little difficult, but that's to be expected 12:03:07 <SpComb> even basic tunnels/bridges seem very difficult in TF 12:03:24 <SpComb> where other tracks/infrastructure is involved, not just existing terrain 12:03:25 <Borg> if OpenTTD is singled threaded.. how come extra GRF text on industries are broken sometimes? 12:03:44 <andythenorth> what's broken? 12:03:49 <andythenorth> it's not repainted? 12:03:57 <Eddi|zuHause> Borg: how does "single threaded" relate to "bug free"? 12:04:26 <Borg> Eddi|zuHause: I rather see it as synchronization problem... 12:04:40 <Borg> andythenorth: it is repainted.. but.. get distorted.. 12:04:46 <Eddi|zuHause> Borg: could be loads of other problems 12:04:47 <andythenorth> screenshot? 12:04:49 <Borg> like.. 2 concurent things paint stuff 12:04:54 <andythenorth> it's usually cache invalidation somewhere 12:04:57 <Borg> andythenorth: I try to do it.. 12:05:11 <andythenorth> either the cb isn't being re-triggered 12:05:24 <andythenorth> or the region isn't marked dirty correctly 12:05:28 <Borg> thats key small screenshot shortcut? 12:05:31 <Samu> talking about single threaded stuff? 12:05:38 <Borg> s/thats/whats/ 12:05:45 <Eddi|zuHause> SpComb: yes, they fixed the track layout problems (switches, crossings) between train fever and transport fever, but the bridges are still a bit tricky 12:05:46 <andythenorth> I've seen industry window text bug many times fwiw 12:06:05 <Samu> could AIs perhaps be executed all at once, in separate threads? 12:06:07 <andythenorth> this week I managed to get the depot view to show me ships in my company colours 12:06:13 <andythenorth> but the buy menu lost the company colouring 12:06:19 <andythenorth> that was new and unusual 12:06:20 <Borg> CTRL+S 12:06:22 <Borg> okey.. lets try 12:06:28 <Samu> and then queue up their commands? 12:06:39 <Borg> got it 12:06:53 <Samu> or am i probably misunderstanding the way it works now? 12:07:37 <Borg> andythenorth: http://ds-1.ovh.uu3.net/~borg/tmp/openttd_ind_repaint.png 12:07:42 <Borg> it works worse on screenshot :) 12:07:46 <Borg> s/works/looks/ 12:08:17 <Samu> Net Power? 12:08:31 <Borg> Samu: its my GRF.. :) support for electric power.. fun 12:08:36 <Eddi|zuHause> that looks like a bounding rectangle issue, like calculating the wrong text length for what to redraw 12:08:43 <Samu> yes, but where is the problem, :o 12:08:56 <Borg> Samu: look at text distortion? 12:09:11 <andythenorth> it should be 900%? 12:09:14 <Samu> i see it after net power 12:09:18 <Borg> exacly 12:09:21 <andythenorth> yeah 12:09:25 <Borg> it probably wanted to display 98% or so 12:09:26 <Eddi|zuHause> i think it switched from 90% to 100%? 12:09:27 <andythenorth> industry window does that 12:09:37 <andythenorth> it's not very good at repaint 12:09:39 <Samu> maybe a invalidatedata issue? 12:09:53 <Samu> redraw? 12:09:57 <Borg> Eddi|zuHause: it rather switched from 100% -> 97% or so.. 12:10:15 <Borg> it happens kinda often actually 12:10:32 <Borg> I see exacly same problem in GRF debug windows too 12:10:33 <Borg> its global 12:10:46 <Eddi|zuHause> i'm pretty sure it calculates the wrong text length estimate 12:11:00 <Borg> not sure how blitter works there and here.. but in old times.. I used to draw everything to memory.. and then send it to GFX ;) 12:11:18 <Eddi|zuHause> that's how it works 12:11:28 <Eddi|zuHause> but it doesn't update the whole screen every time 12:11:32 <Borg> then I dont know how it can fuckup.. if its single threaded.. 12:11:35 <Eddi|zuHause> it calculates rectangles that have changed 12:11:37 <Samu> forgot the exact function, it's a function that forces a redraw 12:11:38 <Borg> ahhh.. 12:11:41 <Eddi|zuHause> and redraws only those 12:11:42 <Borg> so it must be it.. 12:11:54 <Eddi|zuHause> and here it chooses a too small rectangle 12:11:55 <andythenorth> put dirty blocks on 12:11:59 <andythenorth> and have a look 12:12:04 <Borg> oh 12:12:05 <Borg> lets see 12:12:13 <andythenorth> it's on the ? menu 12:12:56 <Borg> unfortunatelly.. not 12:13:16 <Borg> well, so its in menu stuff only.. I guess 12:13:30 <Borg> I never see drawing artifacts in game (using default ttd gfx) 12:14:36 <andythenorth> http://docs.openttd.org/toolbar__gui_8h.html 12:14:43 <andythenorth> enable newgrf_developer_tools 12:14:49 <Samu> something like UpdateWidgetSize 12:14:57 <Samu> SetDParamMaxValue(i, INT16_MAX); 12:15:31 <Samu> then set the boundingbox size 12:15:34 <Samu> i think 12:15:49 <Samu> dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR)); to the maximum size 12:15:58 <Samu> that's an example i found in the code 12:15:58 <Borg> andythenorth: they dont work on menus.. only on game objects 12:16:08 <andythenorth> eh? 12:16:11 <Borg> andythenorth: anyway. its must be invalidation.. because when I move window.. text get fixed 12:16:32 <andythenorth> oh yeah the dirty blocks are limited to game viewport 12:16:37 <andythenorth> I never noticed before 12:17:57 <Borg> anyway 12:18:05 <Borg> if you want to see it on your own eyes.. u can connect to my server 12:18:09 <Eddi|zuHause> Borg: would still be interesting if it breaks on switching 90->100 or 100->90 or some other condition 12:18:12 <Borg> and observe for a few secs power station 12:18:29 <Borg> Eddi|zuHause: it always break when new text is shorter 12:18:36 <Borg> never when new text is longer 12:18:42 <Borg> at least from what I seen so far 12:19:42 <Samu> i have a question about multi threading AIs 12:20:53 <Samu> instead of executing them one by one and waiting for the results of their actions, why not execute them all at once, and then queue the execution of their actions in order? 12:22:00 <Borg> Samu: I would rather just spawn secondary thread.. for AIs only.. and execute all AIs there.. 12:23:17 <Samu> maybe i could take a better look at how it works atm 12:23:45 <Borg> it will be easier to do imo.. because now.. it works on single thread anyway.. 12:24:20 <Samu> hmm so you know how it works? 12:25:19 <Samu> when having 15 AIs, the game stalls too much 12:27:26 <Eddi|zuHause> Borg: it sort of already does AIs in individual threads, for having independent contexts, but they can't really be parallel, because there's no useful locking mechanism on the map 12:27:42 <Eddi|zuHause> (this is overly simplified) 12:28:43 <Flygon> I can't wait til we start shipping CPUs with alternate universes inside them so that we can bypass the thermal, electrical resistance, and atomic size limits of existing technology. 12:28:56 <Flygon> Because dammit. 12:29:08 <Flygon> If we want a lag-free 4k*4k OpenTTD map with 16 AI. 12:29:20 <Flygon> We need a 1.67THz CPU with an alternate reality inbuilt! 12:29:26 <Eddi|zuHause> tardis computers? 12:29:43 <Flygon> yes 12:31:08 <Samu> i thought of a queue mechanism of some sorts 12:31:39 <Samu> instead of waiting for the result of the previous AI 12:32:28 <andythenorth> "eventually consistent" ? 12:32:32 <andythenorth> o_O 12:32:58 <andythenorth> can we exploit AI timing to read memory? o_O 12:34:03 <Borg> andythenorth: oh. come on.. 12:34:26 <Borg> or.. not ;) 12:34:32 <Borg> whatever.. 12:34:34 <Samu> whoever finishes computing their stuff first, is executed first 12:34:42 <Borg> Samu: u dont get other point.. 12:34:50 <Borg> reading map.. will not be synchronized 12:35:02 <peter1138> Just pretend it's quantum. 12:35:33 <Samu> ah, yes, I see 12:35:49 <peter1138> (More Shrödinger) 12:36:00 <andythenorth> as it's a snow day 12:36:06 <andythenorth> can we have multi-docks today? 12:36:21 <peter1138> Technology means that I can work even on "snow days" 12:36:27 <peter1138> Also I forgot about it. 12:36:31 <peter1138> Where did I get? 12:37:09 <andythenorth> you hadn't figured out where to park ships 12:37:12 <andythenorth> when they're waiting 12:37:14 <andythenorth> or something 12:37:17 <peter1138> Hmm. 12:37:31 <peter1138> No, I never did waiting ships :p 12:38:19 <peter1138> Hmm, something about finding the correct tile without having to loop over the tile area every time a ship crosses a tile edge. 12:38:24 <andythenorth> yes that 12:38:36 <Samu> does the map really have to be synchronized between AIs? I was imagining them working on the same "map frame" 12:38:37 <peter1138> I think I got distracted by Samu's "attempt" to improve ship pathfinding. 12:38:40 <andythenorth> can't they just head for one dock? 12:38:43 <andythenorth> or something 12:39:07 * andythenorth wavey hand programming 12:39:13 <andythenorth> 'probably fine' 12:39:37 <Samu> oh, peter1138 I really wanted to work on that, but it's just too much for my abilities 12:39:48 <peter1138> Well that doesn't work if you have a docks either side of a long but narrow (where the docks are) landmass. 12:41:22 <andythenorth> hnmm 12:42:47 <Borg> guys... also. I have 2 tickers open.. from a months? or longer? 12:42:50 <Eddi|zuHause> how do roadstops work there? 12:42:51 <Borg> no single comment.. whats going on? 12:43:56 <peter1138> Eddi|zuHause, the tiles explicitly listed. I did in one patch abuse the RoadStop to explicitly list docking points. 12:44:01 <Eddi|zuHause> Borg: i've had tickets open for a year before being solved (where "solving" meant commiting the already written patch). and that was when there were a lot more active developers 12:44:42 <peter1138> Hmm, I don't have my dev environment set up since upgrading my PC. 12:44:50 <Borg> Eddi|zuHause: geez... 12:47:30 <peter1138> Yeah us developers are evil scheming bastards. 12:50:58 <Flygon> Now now now. 12:51:10 <Flygon> You're only en evil scheming bastard if you like devving for the SNES. 12:51:10 <Flygon> :3 12:52:49 <Eddi|zuHause> now, if i have a background process waiting for input in a shell, how do i get that specific process to the foreground so i can input stuff? 12:53:10 <Borg> fg 12:53:16 <Borg> or fg <jobid> 12:53:34 <Eddi|zuHause> how do i find out the jobid? 12:53:38 <Borg> jobs 12:54:07 <Eddi|zuHause> that doesn't list the right process 12:54:14 *** snail_UES_ has joined #openttd 12:54:45 <Borg> then there is nothing attached to shell waiting for processing.. 12:58:39 <Eddi|zuHause> hm, it randomly decided to work after the third attempt 12:59:33 <Borg> be aware. .that any output that process made earlier.. will not be refreshed on fg 13:00:16 <Eddi|zuHause> that wasn't the problem 13:00:25 <Eddi|zuHause> it didn't process any input the first time 13:11:09 <Eddi|zuHause> uhm weird... now that i have successfully attached a gdb to the game, it actually runs normally... 13:11:38 *** Gustavo6046 has joined #openttd 13:23:58 <Borg> ahh yeah.. getto style... fun 13:24:03 <Borg> I made nice clusterfuck.. ;) 13:24:03 *** snail_UES_ has quit IRC 13:27:35 <D-HUND> Eddi|zuHause: problem solved 13:27:54 <D-HUND> oops, wrong nick 13:27:57 *** D-HUND is now known as debdog 13:28:07 <Eddi|zuHause> debdog: well... 13:29:54 *** ToffeeYogurtPots has joined #openttd 13:52:53 <andythenorth> yo V453000 14:10:40 <supermop_work_> yo 14:17:40 <andythenorth> ho ho 14:17:54 <andythenorth> again I've managed to get OpenTTD confused about company colours 14:17:58 <andythenorth> some ships are using them, some are not 14:18:07 <andythenorth> instances of same vehicle ID :P 14:18:19 <andythenorth> cache invalid? 14:18:41 <andythenorth> changing the company colours fixes the issue 14:19:27 *** john-aj has quit IRC 14:23:22 *** Flygon has quit IRC 14:24:26 <andythenorth> slow compile is slow :( 14:24:36 <andythenorth> 30 seconds :( 14:24:44 <andythenorth> I hate everything 14:25:08 <Borg> like what? 14:28:04 <Samu> how to multi-thread in openttd code? hmm i really wonder 14:28:34 <Samu> is it try / catch? 14:29:01 <andythenorth> right now I hate everything I am focussed on 14:29:09 <andythenorth> so it's the speed of nml compiling :P 14:29:23 <andythenorth> 'everything' beyond that limited world view, not so hating 14:29:49 <Borg> NML is written in python? 14:30:39 <andythenorth> yes 14:30:45 <Borg> no wonder its slow ;) 14:30:47 <andythenorth> nmlc is 14:30:54 <andythenorth> there was a thought to reimplement in C++ or similar 14:30:59 <andythenorth> but then who'd maintain it? o_O 14:31:36 <andythenorth> 30 seconds for a compile is so painful 14:31:50 <andythenorth> it should be < 10s 14:32:02 <Borg> u must have huge NML project then 14:32:06 <andythenorth> no 14:32:08 <andythenorth> it's tiny 14:32:11 <Borg> LOL? 14:32:15 <Borg> how many kloc? 14:32:35 <andythenorth> only 20k 14:32:45 <Borg> 20 kloc? its not that tiny... 14:33:00 <andythenorth> FIRS is 326k 14:33:00 <Borg> % wc -l X2025.src 14:33:01 <Borg> 667 X2025.src 14:33:04 <andythenorth> and compiles in 1 min 14:33:05 <Borg> thats tiny project 14:33:34 <andythenorth> FIRS is 11MB of nml 14:33:43 <andythenorth> Unsinkable Sam is only 768KB 14:33:48 <Borg> really? 14:34:11 <andythenorth> really 14:34:13 *** synchris has joined #openttd 14:34:16 <Borg> I wonder why its so huge.. 14:34:21 <andythenorth> hmm, the graphics dirs are similar sized though 14:34:23 <Borg> 11MB of .txt files.. 14:34:32 <Borg> I cant belive it 14:34:42 <andythenorth> it's a lot of whitespace 14:35:34 <LordAro> generated files, presumably? 14:35:40 <andythenorth> of course :) 14:35:44 <Borg> heh? 14:35:49 <Borg> why having NML then? 14:35:53 <Borg> if you still need to generate... 14:35:57 <LordAro> how big is the source you work on? :p 14:36:12 <LordAro> Borg: oh you sweet summer child 14:36:23 <Borg> summer child? da fuck? ;) 14:36:24 <andythenorth> Borg: (1) writing nml by hand sucks (2) writing a generator for nfo would suck 14:36:34 <Borg> then NML sux.. period 14:36:40 <andythenorth> yes, this is known 14:36:47 <Borg> da fuck ** 2 ?! 14:36:51 <Borg> well.. I still use NFO myself 14:36:53 <andythenorth> that's where we started talking, no? o_O 14:36:58 <andythenorth> "I hate everything" 14:37:38 <Borg> hmm src -> generating NML -> generating NFO... 14:37:45 <Borg> I wonder how optimized that stuff is there at end 14:37:46 <Borg> ;) 14:37:54 <LordAro> if you apply that metric, everything sucks 14:37:54 <andythenorth> some 14:38:02 <LordAro> people generate python 14:38:07 <andythenorth> it has been optimised somewhat 14:38:08 <LordAro> people generate c++ 14:38:19 <Borg> I never generate anything high level.. 14:38:21 <LordAro> it's another layer of abstraction, is all 14:38:22 <andythenorth> wow, there is 600KB of whitespace 14:38:24 <andythenorth> in FIRS 14:38:28 <andythenorth> just in dead line-endings 14:38:34 <andythenorth> and I only removed 50% of them 14:38:47 <LordAro> Borg: and you hand roll everything you do in assembly? of course you don't, don't be ridiculous 14:39:04 <andythenorth> I wonder if dumping the whitespace affects compile time 14:39:05 <Borg> LordAro: yes I do.. if I use asm... ultra rare these days 14:39:11 <Borg> C ftw! 14:39:11 <Borg> ;) 14:39:38 <LordAro> ah, but C just generates assembly! how inefficient! 14:39:43 <Borg> no no 14:39:45 <Borg> its all fine 14:39:55 <Borg> U use high level.. and dont care much about low level 14:40:17 <Borg> weird stuff: <strange lang> -> C -> bytecode 14:40:22 <Borg> but.. ppl do it... 14:40:23 <LordAro> that's not why you generate source code 14:40:24 <LordAro> at all 14:40:42 <Eddi|zuHause> SpComb: so my "first impression" is that bridges are still a bit fiddly, but i have learned about holding "shift" which prevents snapping 14:40:56 <Eddi|zuHause> SpComb: also the "new" switched crossings are great, just a bit hidden 14:41:00 <LordAro> source code is generated because it's very similar, only changing slightly between different classes/functions/whatever 14:41:07 <LordAro> look at yacc/bison 14:41:11 <LordAro> hell, look at cpp 14:41:24 <Borg> well. I never had to use yacc.. but Im not a coder really.. 14:41:29 <LordAro> they all generate source code to prevent you from repeating yourself 14:41:32 <Borg> more of hacker... 14:41:37 <LordAro> so stop talking shit ;) 14:41:49 <Borg> ok 14:42:37 <LordAro> the code i'm working on at the moment has 3 or 4 levels of source code generation, depending how you count it 14:44:23 <LordAro> source code is read by programmers, not computers 14:44:35 <Samu> how do i use try / catch for multithreading stuff? or am i doing this wrong? 14:45:13 <LordAro> Samu: more detail required 14:45:15 <Borg> LordAro: yeah.. and thats why Im against any generation.. but its just me 14:45:42 <Borg> of course unless you generate trivial stuff.. aka.. inflating 14:45:49 <Eddi|zuHause> Borg: in your average compiler there's about half a dozen middle languages that get generated and reprocessed, how is generating NML any special? 14:45:50 <Samu> i'm going to experiment multi-threading AIs, don't care yet about map sync 14:46:28 <Samu> ai_core.cpp line 68 /* static */ void AI::GameLoop() 14:46:54 <Samu> I'm gonna use a variable like this 14:46:56 <Samu> uint16 ai_looped = 0; FOR_ALL_COMPANIES(c) { if (c->is_ai) { ai_looped |= 1 << c->index; } } 14:47:23 <Samu> adds a flag for every ai company, then next it does is ... execute everyone of them at the same time 14:47:34 <Samu> when they finish their stuff, the flag is cleared 14:47:43 <Samu> for their c->index 14:47:44 <Borg> Eddi|zuHause: its not special... it just.. weird to me.. it just means.. NLM is badly designed.. aka defies it points 14:47:47 <Borg> but.. its just me 14:47:58 <LordAro> it is definitely just you 14:48:14 <Borg> ok ;) 14:48:24 <Samu> i know i have to use a try somewhere around here c->ai_instance->GameLoop(); 14:48:44 <Samu> and a catch of ai_looped matching 0 14:48:57 <Eddi|zuHause> Borg: with "i do everything in C" you've missed the point about picking the right language for the job... 14:49:08 <LordAro> Samu: i think you've missed the point of something somewhere 14:49:27 <LordAro> try catch has nothing (inherrently) to do with multithreading 14:49:45 <Borg> Eddi|zuHause: I dont do everything in C.. I pick right tool for the task 14:50:16 <Eddi|zuHause> Borg: then why do you complain that someone thinks NML is the right tool for the task? 14:50:16 <Borg> but if I pick C.. I rary use any middle stuff.. unless its big, non-monolitic project 14:50:33 <Borg> Eddi|zuHause: geez.. Im sorry.. you misunderstood me.. 14:51:15 <Samu> hmm, so i'm doing this wrong 14:51:42 <Borg> I just think.. that for such simple stuff like NFO compiled.. NML should be so high level.. you dont need to generate stuff.. you should be able to reuse code.. 14:52:01 <Borg> but. lets cut it.. I see anger.. ;) 14:52:10 <Borg> I never used NML.. so I should not make too strong opinions 14:52:25 <Borg> I was just suprised by 2 things: big compiles times.. and MB+ sources codes.. generated 14:53:09 <andythenorth> better than 11MB written by hand :) 14:53:12 <andythenorth> which some people do 14:53:22 <andythenorth> writing 326k lines manually....insane 14:54:05 <Borg> andythenorth: how you can avoid that? 14:54:20 <andythenorth> code generator 14:54:21 <andythenorth> innit 14:54:23 <Borg> dude... 14:54:31 <Borg> if its all logic.. (big project)... 14:54:42 <Borg> I hardly see how you can generate anything.. 14:54:59 <andythenorth> NML is just a declarative language, mostly 14:55:12 <andythenorth> it's very little logic, nearly all just markup 14:55:20 <Borg> hmm.. 14:55:25 <Borg> ok.. thats explains alot.. 14:55:30 <Borg> Im glad then I didnt touched it.. 14:55:45 <andythenorth> but nfo is the same 14:55:49 <andythenorth> it's nearly all markup 14:55:58 <Borg> NFO? you mean hex stuff? 14:55:59 <LordAro> the NFO would be much bigger, surely 14:56:03 <andythenorth> bytecode yes 14:56:19 <Borg> hmm.. yeah.. but its NFO... 14:56:21 <Borg> its all right :) 14:56:27 <andythenorth> the NFO would be much more compact than the NML fwiw 14:56:29 <Borg> especially when we see the roots of it 14:57:17 *** sim-al2 has quit IRC 14:57:33 <andythenorth> but NFO remains mostly just markup 14:57:46 <Borg> I dont get that.. part.. but ok.. 14:59:28 <andythenorth> I don't think the term 'markup' translates well, I'm abusing it 15:00:02 <andythenorth> in the newgrfs I've seen, the majority of nfo is used to declare static properties 15:00:16 <Borg> hmm 15:00:27 <andythenorth> it's not really programming, it's just configuration code 15:01:00 <Borg> well, its a bit of programing.. in Action 2.. Var and AdvVar 15:01:05 <Borg> very limited tho.. 15:01:15 <andythenorth> yes the action 2 / varaction 2 are the logic 15:01:17 <SpComb> Eddi|zuHause: switched crossings? you mean https://www.transportfever.com/wiki/doku.php?id=construction:trackandstreet#double_slip_switch ? 15:01:32 <andythenorth> the action 0 and action 1 stuff is very amenable to templating 15:01:38 <andythenorth> there's no point writing that stuff out by hand 15:01:47 <Eddi|zuHause> SpComb: yes 15:02:07 <andythenorth> meanwhile, for action 2 / varaction 2, it's hard to apply DRY 15:02:16 *** snail_UES_ has joined #openttd 15:02:17 <Borg> andythenorth: sure.. depends on scale.. it might be worth of generating that 15:02:27 <andythenorth> why wouldn't you generate it? 15:02:36 <andythenorth> unless you can't write a generator :P 15:02:37 <Borg> because I have just.. few of them? 15:02:40 <andythenorth> yes ok 15:02:47 <Borg> so it would be waste of time.. to write it.. 15:02:48 <andythenorth> if one has 100 vehicles 15:02:55 <Borg> different story 15:02:57 <andythenorth> one doesn't want to write the boilerplate 100 times 15:02:59 <Borg> my GRF is mostly logic 15:03:09 <andythenorth> now the other issue is less good 15:03:11 <andythenorth> although in principle one can have shared varaction 2 15:03:14 <andythenorth> and use registers 15:03:29 <andythenorth> in practicality, it's easier to repeat the varaction 2s for every vehicle / industry 15:03:37 <andythenorth> so there is a huge amount of repetition in the codebase 15:03:42 <andythenorth> with only tiny difference 15:03:47 *** Mazur has quit IRC 15:04:00 <andythenorth> there is no effective way to parameterise the logic and make it shared methods 15:04:15 <Borg> andythenorth: yeah.. thats why NLM should handle that out of the box.. 15:04:22 <Borg> I wonder what was the rationale for creating NLM then.. 15:04:24 <andythenorth> the language can do it, but it's tortuous to use 15:04:31 <andythenorth> the rationale for NML is trivial 15:04:37 <andythenorth> most people can't or won't write nfo 15:04:42 <Borg> ok ;) 15:04:47 <Borg> fair enough.. 15:05:45 <andythenorth> and that is how we arrive at 11MB 15:09:07 <andythenorth> 166 near-identical switches for '[foo]_tile_fence_station' in FIRS 15:09:24 <andythenorth> each one is 9 lines 15:09:44 <andythenorth> but near-identical != identical 15:10:11 <andythenorth> and parameterising them with registers is either hard or impossible, or creates actually same or more code, because the registers still have to be stuffed 15:10:56 <Borg> yeah. I know NFO stuff.. im abusing temp storage alot 15:12:02 <Borg> probably.. If I would like to create bigger GRF project.. I would write generator myself.. at some point. 15:12:11 <Borg> but as I said.. my project is under 1kloc 15:12:15 <Borg> so... pointless 15:12:24 <Borg> and it will not grow.. im glad of the results 15:20:13 *** snail_UES_ has quit IRC 15:24:08 <Eddi|zuHause> now here comes the tricky part, i need to upgrade a junction to doubletracks 15:24:16 <Eddi|zuHause> without breaking all the routes 15:24:21 <Eddi|zuHause> and destroying half the city 15:26:10 <Eddi|zuHause> also, to have through-tracks in this station i need to destroy the foot path to the other side :/ 15:28:57 *** Gustavo6046 has quit IRC 15:30:11 *** nahkiss has quit IRC 15:30:47 <Borg> ;) 15:31:56 <Borg> im at the limit too.. 15:32:09 <Borg> I should split stations probably 15:32:13 <Borg> but its too big cluster fuck.. 15:32:28 <Borg> so I will just wait for X2001.. 15:32:48 *** nahkiss has joined #openttd 15:58:57 *** Thedarkb has quit IRC 16:15:03 *** Thedarkb has joined #openttd 16:32:57 <Eddi|zuHause> Achievement: "Load a train with 250 goods"... that, my dear game, is a ship... 16:44:28 *** HerzogDeXtEr has joined #openttd 16:52:57 *** cHawk has quit IRC 16:58:33 *** TheMask96 has quit IRC 16:59:24 *** cHawk has joined #openttd 17:00:49 *** TheMask96 has joined #openttd 17:11:10 *** Biolunar has joined #openttd 17:15:58 *** Progman has joined #openttd 17:23:27 *** Cubey has joined #openttd 17:33:55 *** ToBeFree has joined #openttd 17:40:06 *** Coobies has joined #openttd 17:42:50 *** frosch123 has joined #openttd 17:44:48 *** Cubey has quit IRC 17:57:35 <Eddi|zuHause> ooh... ships now have multiple cargo holds 17:58:02 <Eddi|zuHause> that should simplify a few things 17:59:57 <andythenorth> :o 18:00:19 *** glx has joined #openttd 18:00:19 *** ChanServ sets mode: +v glx 18:07:38 *** ToBeFree has quit IRC 18:16:20 <Samu> https://imgur.com/9oQwD8k - squirrel does not like what I'm doing 18:18:08 <Samu> the VM or whatever is erroring 18:21:19 <Samu> seems that the squirrel vm thing can only process one AI at a time. If I try to make it process multiple threads, I guess the variables of each AI get messed up between themselves. 18:21:33 <Samu> what can I do? 18:22:03 *** Wolf01 has joined #openttd 18:22:20 <Wolf01> o/ 18:22:29 <Samu> does anyone know if this has been tried before by someone else? 18:24:16 <Wolf01> Sure, on the Simpsons, maybe on the Griffins, if not, then try South Park 18:25:45 <Samu> google says: http://forum.squirrel-lang.org/mainsite/forums/default.aspx?g=posts&t=1906 18:26:07 *** Thedarkb has quit IRC 18:29:12 <Samu> who's the thread expert? 18:29:28 <Samu> http://forum.squirrel-lang.org/mainsite/forums/default.aspx?g=posts&m=4242#post4242 is this answer related to what I'm trying to do? 18:30:20 <Borg> hmmm HMMM.. 18:30:48 <LordAro> Samu: gonna go ahead and suggest "no, no one's tried this (vaguely successfully) before" 18:30:57 <LordAro> multithreading is fundamentally hard 18:31:43 <LordAro> and trying to shoehorn some sort of multithreaded squirrel (or even just multiple instances of the squirrel vm) into OTTD, which is very much single threaded, is almost certainly doomed to failure 18:31:51 <LordAro> without rewriting basically everything 18:32:06 <Eddi|zuHause> well, in computer science there's hard problems, and THEN there's multithreading 18:32:49 <andythenorth> I don't really understand the problem tbh 18:32:56 <andythenorth> why is multi-threading hard? 18:33:13 <Wolf01> Syncing 18:33:20 <andythenorth> you can only sensibly multi-thread parallel operations 18:33:28 <andythenorth> otherwise you have to stop and compare state all the time 18:33:37 <LordAro> exactly 18:33:42 <andythenorth> so what's hard about it? 18:34:04 <andythenorth> oh sometimes people are determined to stop and compare state? 18:34:05 <LordAro> the number of operations that can be described as truely parallel, and don't interfere with each other is really rather small 18:34:15 <Wolf01> The only reliable part I was able to do was: RetrieveRSS().whenAll(DoStuff()) 18:34:15 <LordAro> resource contention is a bitch 18:34:16 <andythenorth> and then we have spectre and meltdown 18:34:31 <andythenorth> speculative instructions :P 18:34:37 <andythenorth> to use up spare cycles 18:34:41 <LordAro> technically, neither of those are concurrency related 18:34:49 <LordAro> branch prediction is not the same 18:34:54 <andythenorth> no, I'm adding one and one to get 5 18:35:37 <andythenorth> it just struck me that they are a similar class of 'clever tricks to get more out of CPU' 18:36:31 <LordAro> https://softwareengineering.stackexchange.com/questions/81003/how-to-explain-why-multi-threading-is-difficult 18:36:56 *** Thedarkb has joined #openttd 18:39:13 <Samu> what I had in mind was to work on a specific openttd-frame-tick, launch all 15 VM's in parallel, wait for all their work to finish, then resume openttd. 18:39:46 <andythenorth> what does -j do on gcc? 18:39:56 <andythenorth> I can't find the docs in google quickly :P 18:39:58 <LordAro> i have a suspicion that would be slower than normal 18:40:03 <LordAro> andythenorth: gcc -h 18:40:18 <LordAro> Samu: what would happen if 2 AIs tried to build something on the same tile? 18:40:31 <andythenorth> I don't have GCC, and clang doesn't have -h :P 18:40:32 <Samu> that, I don't really know 18:40:39 *** sla_ro|master has joined #openttd 18:40:44 <andythenorth> anyway is -j threads? 18:40:48 <LordAro> andythenorth: well their options are basically identical 18:40:53 <LordAro> probably 18:41:01 <andythenorth> I use it, I just wonder what the implementation is 18:41:03 <glx> yes -j is threads 18:41:30 <andythenorth> ok so how does GCC manage multi-threading? Does each thread pick something from the end of a dependency chain? 18:41:45 <Samu> I was hoping the DoCommand functions to have some sort of queue 18:41:46 <andythenorth> and they just work up the tree, blocking when they can't compile until another finishes? 18:41:48 <LordAro> C files don't have dependency chains 18:41:57 <glx> each thread compiles a source file 18:42:00 <andythenorth> right 18:42:01 <andythenorth> ok 18:42:01 <Samu> like they do in network 18:42:03 <LordAro> they're individual compilation units, once all the #includes have been resolved 18:42:12 <LordAro> Samu: maybe so 18:42:25 <LordAro> but which order to commands get added? 18:42:30 <glx> well I think -j is a make flag btw 18:42:32 * andythenorth should read the docs 18:42:37 <andythenorth> yes it is a make flag 18:42:40 <andythenorth> I was wrong 18:42:57 <Samu> whoever gets to it first, most likely 18:43:01 <glx> so indeed make just fires multiple gcc at a time 18:43:03 <Borg> yeah.. its make flag, means jobs 18:43:28 <LordAro> jobs are subtly different from threads 18:43:38 <LordAro> which i've found annoying in the past 18:46:08 <andythenorth> is it a worker pool? 18:46:14 * andythenorth is guessing not reading docs 18:46:16 <LordAro> basically, yeah 18:46:49 <andythenorth> wow, deliveroo is apparently working 18:46:57 <andythenorth> 13 restaurants open and delivering 18:46:59 <Wolf01> It's nice how sometimes you come out with interesting discussions :) 18:47:11 <andythenorth> you have snow too Wolf01 ? 18:47:16 <andythenorth> you made our news today 18:47:19 <andythenorth> not you personally 18:47:47 <glx> andythenorth: but better don't use the service when it's snowy, too dangerous for the guys on bikes 18:47:58 <andythenorth> I live on a hill too 18:48:14 <Samu> no snow where I am 18:48:22 <Samu> but rains 18:48:25 <Wolf01> Yes, yesterday we had some in my area, but in the Appennines zones they are really submerged 18:50:34 *** Stimrol has joined #openttd 18:54:34 <supermop_work_> it is raining and snowing at the same time here today 18:54:44 <Wolf01> Here too, today 19:04:52 *** Coobies has quit IRC 19:12:21 <Samu> how to run multiple squirrel vm's without conflicting 19:13:46 *** Wormnest has joined #openttd 19:14:27 <Samu> guess i'm gonna give up 19:16:38 <Samu> even with only 1 AI, i get conflicts, hmm 19:38:57 * andythenorth making ships 19:39:05 <andythenorth> only thinking is noisy 19:39:09 <andythenorth> making is silent 19:44:56 *** Borg has quit IRC 20:02:44 <andythenorth> makefile args 20:02:50 <andythenorth> is the convention upper or lower case? 20:03:03 *** Stimrol has quit IRC 20:03:08 <andythenorth> docs say upper, except for internal vars, but I can't grok that 20:03:54 <andythenorth> the var in question is passed to python, and controls the number of workers in a parallel processing pool 20:06:02 <SpComb> Eddi|zuHause: http://steamcommunity.com/sharedfiles/filedetails/?id=1318213879 I managed to do it 20:06:51 <Eddi|zuHause> ok :) 20:07:18 *** synchris has quit IRC 20:07:23 <Eddi|zuHause> that doesn't even remotely look like anything i build :p 20:08:32 *** ToBeFree has joined #openttd 20:10:33 *** Stimrol has joined #openttd 20:10:51 *** ToBeFree has quit IRC 20:10:52 *** ToBeFree has joined #openttd 20:17:57 <Samu> managed to do something! a single AI instance thread doesn't conflict with itself anymore. Or at least, so far 20:18:34 <Samu> but if another AI starts... the squirrel asserts all over random places 20:20:48 *** sla_ro|master has quit IRC 20:28:52 <andythenorth> Eddi|zuHause: I've got a multi-line string, with many empty lines 20:29:06 <andythenorth> how can I drop the empty lines in python, neatly? o_O 20:30:39 <Eddi|zuHause> andythenorth: split on '\n' and then [x for x in lines if x != ''], and then join on '\n' again? 20:30:59 <Eddi|zuHause> or regex a '\n*' into '\n' 20:34:16 <frosch123> s/*/+/ 20:36:26 <Eddi|zuHause> whatever 20:38:10 <andythenorth> hmm 20:38:15 <andythenorth> escaped_nml = '\n'.join([x for x in escaped_nml.split('\n') if x != '']) 20:38:21 <andythenorth> doesn't pick up the empty lines 20:38:21 *** Supercheese has joined #openttd 20:39:21 * andythenorth wonders what's in them 20:39:47 <andythenorth> oh they have whitespace :P 20:39:54 <andythenorth> and tab stops 20:40:10 <Eddi|zuHause> andythenorth: trim? 20:40:43 <Eddi|zuHause> x.trim()!='' or so 20:41:05 <Eddi|zuHause> just a random guess 20:42:20 <andythenorth> Stack Overflow suggests strip(' \t\n\r') 20:42:57 <glx> seems smart :) 20:43:35 <andythenorth> also I have multiple utils.py open :P 20:43:40 <andythenorth> and I've been typing in the wrong one 20:57:49 <andythenorth> trying to figure this bug out https://www.tt-forums.net/viewtopic.php?p=1203376#p1203376 20:57:57 <andythenorth> not sure how the grf gets its name 20:58:44 <andythenorth> I suspect custom_tags is not being rebuilt 20:59:28 <andythenorth> yup 21:23:10 *** Wormnest_ has joined #openttd 21:25:35 *** Gja has joined #openttd 21:26:01 <andythenorth> made my compile faster :P 21:27:38 *** Wormnest has quit IRC 21:34:56 <andythenorth> hmm 21:36:01 <andythenorth> I need to trigger CUSTOM_TAGS rebuilding if the repo version has changed http://dev.openttdcoop.org/projects/firs/repository/entry/Makefile#L72 21:36:07 <andythenorth> I have no idea how to do that 21:36:46 <andythenorth> it could just be rebuilt on every build of the grf 21:36:50 <andythenorth> it's cheap to run 21:36:55 <andythenorth> but again, no idea :) 21:41:32 *** frosch123 has quit IRC 21:50:29 *** john-aj has joined #openttd 21:52:51 *** Mazur has joined #openttd 22:02:37 *** Mazur has quit IRC 22:10:32 *** sim-al2 has joined #openttd 22:11:28 *** supermop has joined #openttd 22:12:20 *** Biolunar has quit IRC 22:13:38 *** Mazur has joined #openttd 22:15:05 *** Gja has quit IRC 22:16:56 *** Gustavo6046 has joined #openttd 22:20:21 *** ToBeFree has quit IRC 22:22:46 *** andythenorth has quit IRC 22:25:01 *** sim-al2 is now known as Guest246 22:25:03 *** sim-al2 has joined #openttd 22:27:40 *** Gustavo6046 has quit IRC 22:27:48 *** Gustavo6046 has joined #openttd 22:28:34 *** Guest246 has quit IRC 22:32:03 <Eddi|zuHause> ok, my ships are a bit stuck in traffic now :/ 22:46:36 <Eddi|zuHause> manually assinging the terminals seems to have helped that 22:52:33 *** sim-al2 is now known as Guest248 22:52:35 *** sim-al2 has joined #openttd 22:56:04 *** Guest248 has quit IRC 22:59:21 *** Flygon has joined #openttd 23:31:26 <Samu> eww, I'm so bad at this, I managed to trigger multi-threaded asserts 23:32:10 *** Wormnest_ has quit IRC 23:36:10 *** sim-al2 is now known as Guest252 23:36:11 *** sim-al2 has joined #openttd 23:39:38 *** Guest252 has quit IRC 23:41:24 *** ATMunn has joined #openttd 23:41:54 *** ATMunn is now known as Guest253 23:42:50 *** Guest253 is now known as ATMunn 23:44:41 <ATMunn> i've been having a weird problem in openttd recently 23:45:03 <ATMunn> whenever i try to pan the map with the right mouse button, it kinda spazzes out and doesn't actually move 23:45:24 <ATMunn> so im basically forced to use another method of scrolling if i want to actually play the game 23:45:41 <ATMunn> i used to play the game just fine without this happening 23:46:02 <Samu> windows 10? 23:46:13 <ATMunn> yes, unfortunately :P{ 23:46:27 <Samu> ok, download 1.7.2, it was fixed 23:46:50 <ATMunn> ah thanks