IRC logs for #openttd on OFTC at 2018-03-02
⏴ go to previous day
00:00:31 <Samu> ah, the oldest company, it seems, would be winner
00:07:59 <Samu> Company Value GS is a Game Script that uses the goal list to rank companies by their current company value. It can also be used to challenge companies to be the first to reach a user defined company value target as a goal as fast as they can.
00:08:48 <Samu> Company Value GS is a Game Script that uses the goal list to rank companies by their current company value. It can also be used to challenge companies to be the first to reach a user defined company value target as a goal, as fast as they can.
00:09:55 <Samu> "as fast as they can" or "in the minimum amount of time possible" or maybe something else you suggest?~
00:11:44 <Samu> not only be the first, but also do it as fast as they can
00:13:53 <Samu> "Company Value GS is a Game Script that uses the goal list to rank companies by their current company value. It can also be used to challenge companies not only to be the first to reach a user defined company value target as a goal, but also as fast as they can."
00:20:22 *** supermop has joined #openttd
00:24:30 <Samu> but also to do it as fast as they can.
00:32:20 *** ToffeeYogurtPots has quit IRC
00:32:42 *** ToffeeYogurtPots has joined #openttd
00:36:52 *** ChanServ sets mode: +v tokai
00:36:52 *** FLHerne has joined #openttd
00:44:07 *** ToffeeYogurtPots has quit IRC
00:44:07 *** supermop_work_ has quit IRC
00:44:08 *** rustyshackleford[m] has quit IRC
00:44:08 *** IgnoredAmbience has quit IRC
00:49:00 *** swimstar[m] has joined #openttd
00:49:00 *** OsteHovel has joined #openttd
00:49:00 *** grossing has joined #openttd
00:49:00 *** Antheus has joined #openttd
00:49:00 *** cute[m] has joined #openttd
00:49:00 *** Agiri[m] has joined #openttd
00:49:00 *** donarek has joined #openttd
00:49:00 *** michi_cc has joined #openttd
00:49:00 *** TheMask96 has joined #openttd
00:49:00 *** ToffeeYogurtPots has joined #openttd
00:49:00 *** FLHerne has joined #openttd
00:49:00 *** sim-al2 has joined #openttd
00:49:00 *** TrueBrain has joined #openttd
00:49:00 *** Alkel_U3 has joined #openttd
00:49:00 *** m1cr0man has joined #openttd
00:49:00 *** Rubidium has joined #openttd
00:49:00 *** goodger has joined #openttd
00:49:00 *** CompuDesktop has joined #openttd
00:49:00 *** ccfreak2k has joined #openttd
00:49:00 *** Maarten has joined #openttd
00:49:00 *** dustinm` has joined #openttd
00:49:00 *** nahkiss has joined #openttd
00:49:00 *** quiznilo has joined #openttd
00:49:00 *** charon.oftc.net sets mode: +vvo michi_cc glx Rubidium
00:49:00 *** innocenat has joined #openttd
00:49:00 *** TinoDidriksen has joined #openttd
00:49:00 *** Warrigal_ has joined #openttd
00:49:00 *** mikegrb has joined #openttd
00:49:00 *** Tharbakim has joined #openttd
00:49:00 *** greeter has joined #openttd
00:49:00 *** techmagus has joined #openttd
00:49:01 *** Extrems has joined #openttd
00:49:01 *** TigerbotHesh has joined #openttd
00:49:01 *** supermop_work_ has joined #openttd
00:49:01 *** Gustavo6046 has joined #openttd
00:49:01 *** Supercheese has joined #openttd
00:49:01 *** Guest167 has joined #openttd
00:49:01 *** supermop has joined #openttd
00:49:01 *** [1]sim-al2 has joined #openttd
00:49:01 *** Mahjong has joined #openttd
00:49:01 *** tycoondemon2 has joined #openttd
00:49:01 *** NGC3982 has joined #openttd
00:49:01 *** Lejving has joined #openttd
00:49:01 *** peter1138 has joined #openttd
00:49:01 *** rustyshackleford[m] has joined #openttd
00:49:01 *** UncleCJ has joined #openttd
00:49:01 *** ericnoan has joined #openttd
00:49:01 *** IgnoredAmbience has joined #openttd
00:49:01 *** ^Spike^ has joined #openttd
00:49:01 *** XeryusTC has joined #openttd
00:49:01 *** charon.oftc.net sets mode: +vov tokai peter1138 peter1138
00:49:01 *** Hirundo has joined #openttd
00:49:01 *** Hazzard has joined #openttd
00:49:01 *** argoneus has joined #openttd
00:49:01 *** lastmikoi has joined #openttd
00:49:01 *** charon.oftc.net sets mode: +ov orudge orudge
01:05:08 *** snail_UES_ has joined #openttd
03:27:11 *** supermop has joined #openttd
04:01:57 *** ToffeeYogurtPots has quit IRC
04:02:19 *** ToffeeYogurtPots has joined #openttd
04:12:46 *** supermop has joined #openttd
04:31:22 *** ToffeeYogurtPots has quit IRC
05:15:21 *** innocenat has joined #openttd
05:39:48 *** sla_ro|master has joined #openttd
05:49:38 *** nahkiss has joined #openttd
06:06:47 *** HeyCitizen has joined #openttd
06:54:30 *** Supercheese has joined #openttd
07:34:50 *** supermop has joined #openttd
08:20:35 *** john-aj has joined #openttd
08:36:27 *** Smedles has joined #openttd
09:48:12 *** andythenorth has joined #openttd
10:00:58 *** Biolunar has joined #openttd
10:17:20 <SpComb> Eddi|zuHause: is it actually possible to build flyovers for rail junctions?
10:17:31 <SpComb> was unable to figure out how yesterda
11:22:19 <Eddi|zuHause> SpComb: yes, with manually adjusting the incline of the track, you can build bridges
11:22:58 <Eddi|zuHause> but it's a bit fiddly
11:25:49 <SpComb> haven't tried that yet
11:26:18 <SpComb> I did one tunnel underpass to keep the pax and cargo networks separate, and that was waaay too fiddly
11:26:32 <SpComb> ended up accidentially deleting the original tunnel and being unable to rebuild it, had to revert to an autosave
11:28:13 <SpComb> hah, modded in as a passsenger station?
11: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.
11:28:53 <SpComb> wish it was in the actual game :<
11:28:58 <Eddi|zuHause> that sounds unfortunate
11: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
11: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
11:32:24 <SpComb> somehow they managed to get the similar UI to work perfectly well in Cities: Skylines
11:39:14 <Eddi|zuHause> C:S construction method is also not without flaws
11:39:22 *** andythenorth has joined #openttd
12:02:48 *** ToBeFree has joined #openttd
12:04:20 *** Thedarkb has joined #openttd
12:54:29 *** tokai|noir has joined #openttd
12:54:29 *** ChanServ sets mode: +v tokai|noir
12:59:32 *** FLHerne has joined #openttd
13: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
13:03:07 <SpComb> even basic tunnels/bridges seem very difficult in TF
13:03:24 <SpComb> where other tracks/infrastructure is involved, not just existing terrain
13:03:25 <Borg> if OpenTTD is singled threaded.. how come extra GRF text on industries are broken sometimes?
13:03:49 <andythenorth> it's not repainted?
13:03:56 <Eddi|zuHause> Borg: how does "single threaded" relate to "bug free"?
13:04:26 <Borg> Eddi|zuHause: I rather see it as synchronization problem...
13:04:40 <Borg> andythenorth: it is repainted.. but.. get distorted..
13:04:46 <Eddi|zuHause> Borg: could be loads of other problems
13:04:49 <Borg> like.. 2 concurent things paint stuff
13:04:54 <andythenorth> it's usually cache invalidation somewhere
13:04:57 <Borg> andythenorth: I try to do it..
13:05:11 <andythenorth> either the cb isn't being re-triggered
13:05:24 <andythenorth> or the region isn't marked dirty correctly
13:05:28 <Borg> thats key small screenshot shortcut?
13:05:31 <Samu> talking about single threaded stuff?
13: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
13:05:46 <andythenorth> I've seen industry window text bug many times fwiw
13:06:05 <Samu> could AIs perhaps be executed all at once, in separate threads?
13:06:07 <andythenorth> this week I managed to get the depot view to show me ships in my company colours
13:06:13 <andythenorth> but the buy menu lost the company colouring
13:06:19 <andythenorth> that was new and unusual
13:06:28 <Samu> and then queue up their commands?
13:06:53 <Samu> or am i probably misunderstanding the way it works now?
13:07:42 <Borg> it works worse on screenshot :)
13:08:31 <Borg> Samu: its my GRF.. :) support for electric power.. fun
13:08:36 <Eddi|zuHause> that looks like a bounding rectangle issue, like calculating the wrong text length for what to redraw
13:08:43 <Samu> yes, but where is the problem, :o
13:08:56 <Borg> Samu: look at text distortion?
13:09:11 <andythenorth> it should be 900%?
13:09:14 <Samu> i see it after net power
13:09:25 <Borg> it probably wanted to display 98% or so
13:09:26 <Eddi|zuHause> i think it switched from 90% to 100%?
13:09:27 <andythenorth> industry window does that
13:09:37 <andythenorth> it's not very good at repaint
13:09:39 <Samu> maybe a invalidatedata issue?
13:09:57 <Borg> Eddi|zuHause: it rather switched from 100% -> 97% or so..
13:10:15 <Borg> it happens kinda often actually
13:10:32 <Borg> I see exacly same problem in GRF debug windows too
13:10:45 <Eddi|zuHause> i'm pretty sure it calculates the wrong text length estimate
13: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 ;)
13:11:18 <Eddi|zuHause> that's how it works
13:11:28 <Eddi|zuHause> but it doesn't update the whole screen every time
13:11:32 <Borg> then I dont know how it can fuckup.. if its single threaded..
13:11:35 <Eddi|zuHause> it calculates rectangles that have changed
13:11:37 <Samu> forgot the exact function, it's a function that forces a redraw
13:11:41 <Eddi|zuHause> and redraws only those
13:11:54 <Eddi|zuHause> and here it chooses a too small rectangle
13:11:55 <andythenorth> put dirty blocks on
13:12:12 <andythenorth> it's on the ? menu
13:13:16 <Borg> well, so its in menu stuff only.. I guess
13:13:30 <Borg> I never see drawing artifacts in game (using default ttd gfx)
13:14:43 <andythenorth> enable newgrf_developer_tools
13:14:49 <Samu> something like UpdateWidgetSize
13:14:57 <Samu> SetDParamMaxValue(i, INT16_MAX);
13:15:31 <Samu> then set the boundingbox size
13:15:49 <Samu> dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR)); to the maximum size
13:15:58 <Samu> that's an example i found in the code
13:15:58 <Borg> andythenorth: they dont work on menus.. only on game objects
13:16:11 <Borg> andythenorth: anyway. its must be invalidation.. because when I move window.. text get fixed
13:16:32 <andythenorth> oh yeah the dirty blocks are limited to game viewport
13:16:37 <andythenorth> I never noticed before
13:18:05 <Borg> if you want to see it on your own eyes.. u can connect to my server
13:18:09 <Eddi|zuHause> Borg: would still be interesting if it breaks on switching 90->100 or 100->90 or some other condition
13:18:12 <Borg> and observe for a few secs power station
13:18:29 <Borg> Eddi|zuHause: it always break when new text is shorter
13:18:36 <Borg> never when new text is longer
13:18:42 <Borg> at least from what I seen so far
13:19:42 <Samu> i have a question about multi threading AIs
13: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?
13:22:00 <Borg> Samu: I would rather just spawn secondary thread.. for AIs only.. and execute all AIs there..
13:23:17 <Samu> maybe i could take a better look at how it works atm
13:23:45 <Borg> it will be easier to do imo.. because now.. it works on single thread anyway..
13:24:19 <Samu> hmm so you know how it works?
13:25:19 <Samu> when having 15 AIs, the game stalls too much
13: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
13:27:42 <Eddi|zuHause> (this is overly simplified)
13: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.
13:29:08 <Flygon> If we want a lag-free 4k*4k OpenTTD map with 16 AI.
13:29:20 <Flygon> We need a 1.67THz CPU with an alternate reality inbuilt!
13:29:26 <Eddi|zuHause> tardis computers?
13:31:08 <Samu> i thought of a queue mechanism of some sorts
13:31:39 <Samu> instead of waiting for the result of the previous AI
13:32:28 <andythenorth> "eventually consistent" ?
13:32:58 <andythenorth> can we exploit AI timing to read memory? o_O
13:34:03 <Borg> andythenorth: oh. come on..
13:34:34 <Samu> whoever finishes computing their stuff first, is executed first
13:34:42 <Borg> Samu: u dont get other point..
13:34:49 <Borg> reading map.. will not be synchronized
13:35:02 <peter1138> Just pretend it's quantum.
13:36:00 <andythenorth> as it's a snow day
13:36:06 <andythenorth> can we have multi-docks today?
13:36:21 <peter1138> Technology means that I can work even on "snow days"
13:36:27 <peter1138> Also I forgot about it.
13:37:09 <andythenorth> you hadn't figured out where to park ships
13:37:12 <andythenorth> when they're waiting
13:37:31 <peter1138> No, I never did waiting ships :p
13: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.
13:38:36 <Samu> does the map really have to be synchronized between AIs? I was imagining them working on the same "map frame"
13:38:37 <peter1138> I think I got distracted by Samu's "attempt" to improve ship pathfinding.
13:38:40 <andythenorth> can't they just head for one dock?
13:39:07 * andythenorth wavey hand programming
13:39:37 <Samu> oh, peter1138 I really wanted to work on that, but it's just too much for my abilities
13: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.
13:42:47 <Borg> guys... also. I have 2 tickers open.. from a months? or longer?
13:42:50 <Eddi|zuHause> how do roadstops work there?
13:42:51 <Borg> no single comment.. whats going on?
13:43:55 <peter1138> Eddi|zuHause, the tiles explicitly listed. I did in one patch abuse the RoadStop to explicitly list docking points.
13: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
13:44:42 <peter1138> Hmm, I don't have my dev environment set up since upgrading my PC.
13:47:30 <peter1138> Yeah us developers are evil scheming bastards.
13:51:09 <Flygon> You're only en evil scheming bastard if you like devving for the SNES.
13: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?
13:53:34 <Eddi|zuHause> how do i find out the jobid?
13:54:07 <Eddi|zuHause> that doesn't list the right process
13:54:14 *** snail_UES_ has joined #openttd
13:54:45 <Borg> then there is nothing attached to shell waiting for processing..
13:58:39 <Eddi|zuHause> hm, it randomly decided to work after the third attempt
13:59:33 <Borg> be aware. .that any output that process made earlier.. will not be refreshed on fg
14:00:16 <Eddi|zuHause> that wasn't the problem
14:00:25 <Eddi|zuHause> it didn't process any input the first time
14:11:09 <Eddi|zuHause> uhm weird... now that i have successfully attached a gdb to the game, it actually runs normally...
14:11:38 *** Gustavo6046 has joined #openttd
14:23:58 <Borg> ahh yeah.. getto style... fun
14:24:03 <Borg> I made nice clusterfuck.. ;)
14:27:35 <D-HUND> Eddi|zuHause: problem solved
14:27:57 *** D-HUND is now known as debdog
14:29:54 *** ToffeeYogurtPots has joined #openttd
15:17:54 <andythenorth> again I've managed to get OpenTTD confused about company colours
15:17:58 <andythenorth> some ships are using them, some are not
15:18:07 <andythenorth> instances of same vehicle ID :P
15:18:41 <andythenorth> changing the company colours fixes the issue
15:24:26 <andythenorth> slow compile is slow :(
15:24:44 <andythenorth> I hate everything
15:28:04 <Samu> how to multi-thread in openttd code? hmm i really wonder
15:29:01 <andythenorth> right now I hate everything I am focussed on
15:29:09 <andythenorth> so it's the speed of nml compiling :P
15:29:23 <andythenorth> 'everything' beyond that limited world view, not so hating
15:29:49 <Borg> NML is written in python?
15:30:54 <andythenorth> there was a thought to reimplement in C++ or similar
15:30:59 <andythenorth> but then who'd maintain it? o_O
15:31:36 <andythenorth> 30 seconds for a compile is so painful
15:31:50 <andythenorth> it should be < 10s
15:32:02 <Borg> u must have huge NML project then
15:32:45 <Borg> 20 kloc? its not that tiny...
15:33:04 <andythenorth> and compiles in 1 min
15:33:34 <andythenorth> FIRS is 11MB of nml
15:33:43 <andythenorth> Unsinkable Sam is only 768KB
15:34:13 *** synchris has joined #openttd
15:34:16 <Borg> I wonder why its so huge..
15:34:21 <andythenorth> hmm, the graphics dirs are similar sized though
15:34:42 <andythenorth> it's a lot of whitespace
15:35:34 <LordAro> generated files, presumably?
15:35:53 <Borg> if you still need to generate...
15:35:57 <LordAro> how big is the source you work on? :p
15:36:12 <LordAro> Borg: oh you sweet summer child
15:36:23 <Borg> summer child? da fuck? ;)
15:36:24 <andythenorth> Borg: (1) writing nml by hand sucks (2) writing a generator for nfo would suck
15:36:40 <andythenorth> yes, this is known
15:36:51 <Borg> well.. I still use NFO myself
15:36:53 <andythenorth> that's where we started talking, no? o_O
15:36:58 <andythenorth> "I hate everything"
15:37:38 <Borg> hmm src -> generating NML -> generating NFO...
15:37:45 <Borg> I wonder how optimized that stuff is there at end
15:37:54 <LordAro> if you apply that metric, everything sucks
15:38:02 <LordAro> people generate python
15:38:07 <andythenorth> it has been optimised somewhat
15:38:19 <Borg> I never generate anything high level..
15:38:21 <LordAro> it's another layer of abstraction, is all
15:38:22 <andythenorth> wow, there is 600KB of whitespace
15:38:28 <andythenorth> just in dead line-endings
15:38:34 <andythenorth> and I only removed 50% of them
15:38:47 <LordAro> Borg: and you hand roll everything you do in assembly? of course you don't, don't be ridiculous
15:39:04 <andythenorth> I wonder if dumping the whitespace affects compile time
15:39:05 <Borg> LordAro: yes I do.. if I use asm... ultra rare these days
15:39:38 <LordAro> ah, but C just generates assembly! how inefficient!
15:39:55 <Borg> U use high level.. and dont care much about low level
15:40:17 <Borg> weird stuff: <strange lang> -> C -> bytecode
15:40:23 <LordAro> that's not why you generate source code
15: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
15:40:56 <Eddi|zuHause> SpComb: also the "new" switched crossings are great, just a bit hidden
15:41:00 <LordAro> source code is generated because it's very similar, only changing slightly between different classes/functions/whatever
15:41:24 <Borg> well. I never had to use yacc.. but Im not a coder really..
15:41:29 <LordAro> they all generate source code to prevent you from repeating yourself
15:41:37 <LordAro> so stop talking shit ;)
15: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
15:44:23 <LordAro> source code is read by programmers, not computers
15:44:35 <Samu> how do i use try / catch for multithreading stuff? or am i doing this wrong?
15:45:13 <LordAro> Samu: more detail required
15:45:15 <Borg> LordAro: yeah.. and thats why Im against any generation.. but its just me
15:45:42 <Borg> of course unless you generate trivial stuff.. aka.. inflating
15: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?
15:45:50 <Samu> i'm going to experiment multi-threading AIs, don't care yet about map sync
15:46:28 <Samu> ai_core.cpp line 68 /* static */ void AI::GameLoop()
15:46:54 <Samu> I'm gonna use a variable like this
15:46:56 <Samu> uint16 ai_looped = 0; FOR_ALL_COMPANIES(c) { if (c->is_ai) { ai_looped |= 1 << c->index; } }
15:47:23 <Samu> adds a flag for every ai company, then next it does is ... execute everyone of them at the same time
15:47:34 <Samu> when they finish their stuff, the flag is cleared
15:47:44 <Borg> Eddi|zuHause: its not special... it just.. weird to me.. it just means.. NLM is badly designed.. aka defies it points
15:47:58 <LordAro> it is definitely just you
15:48:24 <Samu> i know i have to use a try somewhere around here c->ai_instance->GameLoop();
15:48:44 <Samu> and a catch of ai_looped matching 0
15:48:57 <Eddi|zuHause> Borg: with "i do everything in C" you've missed the point about picking the right language for the job...
15:49:08 <LordAro> Samu: i think you've missed the point of something somewhere
15:49:27 <LordAro> try catch has nothing (inherrently) to do with multithreading
15:49:45 <Borg> Eddi|zuHause: I dont do everything in C.. I pick right tool for the task
15:50:16 <Eddi|zuHause> Borg: then why do you complain that someone thinks NML is the right tool for the task?
15:50:16 <Borg> but if I pick C.. I rary use any middle stuff.. unless its big, non-monolitic project
15:50:33 <Borg> Eddi|zuHause: geez.. Im sorry.. you misunderstood me..
15:51:15 <Samu> hmm, so i'm doing this wrong
15: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..
15:52:01 <Borg> but. lets cut it.. I see anger.. ;)
15:52:10 <Borg> I never used NML.. so I should not make too strong opinions
15:52:25 <Borg> I was just suprised by 2 things: big compiles times.. and MB+ sources codes.. generated
15:53:09 <andythenorth> better than 11MB written by hand :)
15:53:12 <andythenorth> which some people do
15:53:22 <andythenorth> writing 326k lines manually....insane
15:54:05 <Borg> andythenorth: how you can avoid that?
15:54:31 <Borg> if its all logic.. (big project)...
15:54:42 <Borg> I hardly see how you can generate anything..
15:54:59 <andythenorth> NML is just a declarative language, mostly
15:55:12 <andythenorth> it's very little logic, nearly all just markup
15:55:25 <Borg> ok.. thats explains alot..
15:55:30 <Borg> Im glad then I didnt touched it..
15:55:45 <andythenorth> but nfo is the same
15:55:49 <andythenorth> it's nearly all markup
15:55:58 <Borg> NFO? you mean hex stuff?
15:55:59 <LordAro> the NFO would be much bigger, surely
15:56:19 <Borg> hmm.. yeah.. but its NFO...
15:56:27 <andythenorth> the NFO would be much more compact than the NML fwiw
15:56:29 <Borg> especially when we see the roots of it
15:57:33 <andythenorth> but NFO remains mostly just markup
15:57:46 <Borg> I dont get that.. part.. but ok..
15:59:28 <andythenorth> I don't think the term 'markup' translates well, I'm abusing it
16:00:02 <andythenorth> in the newgrfs I've seen, the majority of nfo is used to declare static properties
16:00:27 <andythenorth> it's not really programming, it's just configuration code
16:01:00 <Borg> well, its a bit of programing.. in Action 2.. Var and AdvVar
16:01:15 <andythenorth> yes the action 2 / varaction 2 are the logic
16:01:32 <andythenorth> the action 0 and action 1 stuff is very amenable to templating
16:01:38 <andythenorth> there's no point writing that stuff out by hand
16:02:07 <andythenorth> meanwhile, for action 2 / varaction 2, it's hard to apply DRY
16:02:16 *** snail_UES_ has joined #openttd
16:02:17 <Borg> andythenorth: sure.. depends on scale.. it might be worth of generating that
16:02:27 <andythenorth> why wouldn't you generate it?
16:02:36 <andythenorth> unless you can't write a generator :P
16:02:37 <Borg> because I have just.. few of them?
16:02:47 <Borg> so it would be waste of time.. to write it..
16:02:48 <andythenorth> if one has 100 vehicles
16:02:57 <andythenorth> one doesn't want to write the boilerplate 100 times
16:03:08 <andythenorth> now the other issue is less good
16:03:11 <andythenorth> although in principle one can have shared varaction 2
16:03:14 <andythenorth> and use registers
16:03:29 <andythenorth> in practicality, it's easier to repeat the varaction 2s for every vehicle / industry
16:03:37 <andythenorth> so there is a huge amount of repetition in the codebase
16:03:42 <andythenorth> with only tiny difference
16:04:00 <andythenorth> there is no effective way to parameterise the logic and make it shared methods
16:04:15 <Borg> andythenorth: yeah.. thats why NLM should handle that out of the box..
16:04:22 <Borg> I wonder what was the rationale for creating NLM then..
16:04:24 <andythenorth> the language can do it, but it's tortuous to use
16:04:31 <andythenorth> the rationale for NML is trivial
16:04:37 <andythenorth> most people can't or won't write nfo
16:05:45 <andythenorth> and that is how we arrive at 11MB
16:09:07 <andythenorth> 166 near-identical switches for '[foo]_tile_fence_station' in FIRS
16:09:24 <andythenorth> each one is 9 lines
16:09:44 <andythenorth> but near-identical != identical
16: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
16:10:56 <Borg> yeah. I know NFO stuff.. im abusing temp storage alot
16:12:02 <Borg> probably.. If I would like to create bigger GRF project.. I would write generator myself.. at some point.
16:12:11 <Borg> but as I said.. my project is under 1kloc
16:12:24 <Borg> and it will not grow.. im glad of the results
16:24:08 <Eddi|zuHause> now here comes the tricky part, i need to upgrade a junction to doubletracks
16:24:16 <Eddi|zuHause> without breaking all the routes
16:24:21 <Eddi|zuHause> and destroying half the city
16:26:10 <Eddi|zuHause> also, to have through-tracks in this station i need to destroy the foot path to the other side :/
16:32:09 <Borg> I should split stations probably
16:32:13 <Borg> but its too big cluster fuck..
16:32:28 <Borg> so I will just wait for X2001..
16:32:48 *** nahkiss has joined #openttd
17:15:03 *** Thedarkb has joined #openttd
17:32:57 <Eddi|zuHause> Achievement: "Load a train with 250 goods"... that, my dear game, is a ship...
17:44:28 *** HerzogDeXtEr has joined #openttd
18:00:49 *** TheMask96 has joined #openttd
18:11:10 *** Biolunar has joined #openttd
18:15:58 *** Progman has joined #openttd
18:33:55 *** ToBeFree has joined #openttd
18:40:06 *** Coobies has joined #openttd
18:42:50 *** frosch123 has joined #openttd
18:57:35 <Eddi|zuHause> ooh... ships now have multiple cargo holds
18:58:02 <Eddi|zuHause> that should simplify a few things
19:18:08 <Samu> the VM or whatever is erroring
19: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.
19:22:28 <Samu> does anyone know if this has been tried before by someone else?
19:24:16 <Wolf01> Sure, on the Simpsons, maybe on the Griffins, if not, then try South Park
19:29:12 <Samu> who's the thread expert?
19:30:48 <LordAro> Samu: gonna go ahead and suggest "no, no one's tried this (vaguely successfully) before"
19:30:57 <LordAro> multithreading is fundamentally hard
19: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
19:31:51 <LordAro> without rewriting basically everything
19:32:06 <Eddi|zuHause> well, in computer science there's hard problems, and THEN there's multithreading
19:32:49 <andythenorth> I don't really understand the problem tbh
19:32:56 <andythenorth> why is multi-threading hard?
19:33:20 <andythenorth> you can only sensibly multi-thread parallel operations
19:33:28 <andythenorth> otherwise you have to stop and compare state all the time
19:33:42 <andythenorth> so what's hard about it?
19:34:04 <andythenorth> oh sometimes people are determined to stop and compare state?
19: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
19:34:15 <Wolf01> The only reliable part I was able to do was: RetrieveRSS().whenAll(DoStuff())
19:34:15 <LordAro> resource contention is a bitch
19:34:16 <andythenorth> and then we have spectre and meltdown
19:34:31 <andythenorth> speculative instructions :P
19:34:37 <andythenorth> to use up spare cycles
19:34:41 <LordAro> technically, neither of those are concurrency related
19:34:49 <LordAro> branch prediction is not the same
19:34:54 <andythenorth> no, I'm adding one and one to get 5
19:35:37 <andythenorth> it just struck me that they are a similar class of 'clever tricks to get more out of CPU'
19:36:56 *** Thedarkb has joined #openttd
19: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.
19:39:46 <andythenorth> what does -j do on gcc?
19:39:56 <andythenorth> I can't find the docs in google quickly :P
19:39:58 <LordAro> i have a suspicion that would be slower than normal
19:40:18 <LordAro> Samu: what would happen if 2 AIs tried to build something on the same tile?
19:40:31 <andythenorth> I don't have GCC, and clang doesn't have -h :P
19:40:32 <Samu> that, I don't really know
19:40:39 *** sla_ro|master has joined #openttd
19:40:44 <andythenorth> anyway is -j threads?
19:40:48 <LordAro> andythenorth: well their options are basically identical
19:41:01 <andythenorth> I use it, I just wonder what the implementation is
19:41:30 <andythenorth> ok so how does GCC manage multi-threading? Does each thread pick something from the end of a dependency chain?
19:41:45 <Samu> I was hoping the DoCommand functions to have some sort of queue
19:41:46 <andythenorth> and they just work up the tree, blocking when they can't compile until another finishes?
19:41:48 <LordAro> C files don't have dependency chains
19:41:57 <glx> each thread compiles a source file
19:42:03 <LordAro> they're individual compilation units, once all the #includes have been resolved
19:42:25 <LordAro> but which order to commands get added?
19:42:30 <glx> well I think -j is a make flag btw
19:42:32 * andythenorth should read the docs
19:42:37 <andythenorth> yes it is a make flag
19:42:57 <Samu> whoever gets to it first, most likely
19:43:01 <glx> so indeed make just fires multiple gcc at a time
19:43:03 <Borg> yeah.. its make flag, means jobs
19:43:28 <LordAro> jobs are subtly different from threads
19:43:38 <LordAro> which i've found annoying in the past
19:46:08 <andythenorth> is it a worker pool?
19:46:14 * andythenorth is guessing not reading docs
19:46:49 <andythenorth> wow, deliveroo is apparently working
19:46:57 <andythenorth> 13 restaurants open and delivering
19:46:59 <Wolf01> It's nice how sometimes you come out with interesting discussions :)
19:47:11 <andythenorth> you have snow too Wolf01 ?
19:47:16 <andythenorth> you made our news today
19:47:19 <andythenorth> not you personally
19:47:47 <glx> andythenorth: but better don't use the service when it's snowy, too dangerous for the guys on bikes
19:47:58 <andythenorth> I live on a hill too
19:48:25 <Wolf01> Yes, yesterday we had some in my area, but in the Appennines zones they are really submerged
19:50:34 *** Stimrol has joined #openttd
19:54:34 <supermop_work_> it is raining and snowing at the same time here today
20:12:21 <Samu> how to run multiple squirrel vm's without conflicting
20:13:46 *** Wormnest has joined #openttd
20:16:38 <Samu> even with only 1 AI, i get conflicts, hmm
20:39:05 <andythenorth> only thinking is noisy
20:39:09 <andythenorth> making is silent
21:02:50 <andythenorth> is the convention upper or lower case?
21:03:08 <andythenorth> docs say upper, except for internal vars, but I can't grok that
21:03:54 <andythenorth> the var in question is passed to python, and controls the number of workers in a parallel processing pool
21:07:23 <Eddi|zuHause> that doesn't even remotely look like anything i build :p
21:08:32 *** ToBeFree has joined #openttd
21:10:33 *** Stimrol has joined #openttd
21:10:52 *** ToBeFree has joined #openttd
21:17:57 <Samu> managed to do something! a single AI instance thread doesn't conflict with itself anymore. Or at least, so far
21:18:34 <Samu> but if another AI starts... the squirrel asserts all over random places
21:28:52 <andythenorth> Eddi|zuHause: I've got a multi-line string, with many empty lines
21:29:06 <andythenorth> how can I drop the empty lines in python, neatly? o_O
21:30:39 <Eddi|zuHause> andythenorth: split on '\n' and then [x for x in lines if x != ''], and then join on '\n' again?
21:30:59 <Eddi|zuHause> or regex a '\n*' into '\n'
21:38:15 <andythenorth> escaped_nml = '\n'.join([x for x in escaped_nml.split('\n') if x != ''])
21:38:21 <andythenorth> doesn't pick up the empty lines
21:38:21 *** Supercheese has joined #openttd
21:39:21 * andythenorth wonders what's in them
21:39:47 <andythenorth> oh they have whitespace :P
21:40:10 <Eddi|zuHause> andythenorth: trim?
21:40:43 <Eddi|zuHause> x.trim()!='' or so
21:41:05 <Eddi|zuHause> just a random guess
21:42:20 <andythenorth> Stack Overflow suggests strip(' \t\n\r')
21:43:35 <andythenorth> also I have multiple utils.py open :P
21:43:40 <andythenorth> and I've been typing in the wrong one
21:57:57 <andythenorth> not sure how the grf gets its name
21:58:44 <andythenorth> I suspect custom_tags is not being rebuilt
22:23:10 *** Wormnest_ has joined #openttd
22:26:01 <andythenorth> made my compile faster :P
22:36:07 <andythenorth> I have no idea how to do that
22:36:46 <andythenorth> it could just be rebuilt on every build of the grf
22:36:50 <andythenorth> it's cheap to run
22:36:55 <andythenorth> but again, no idea :)
22:50:29 *** john-aj has joined #openttd
23:10:32 *** sim-al2 has joined #openttd
23:11:28 *** supermop has joined #openttd
23:16:56 *** Gustavo6046 has joined #openttd
23:25:01 *** sim-al2 is now known as Guest246
23:25:03 *** sim-al2 has joined #openttd
23:27:48 *** Gustavo6046 has joined #openttd
23:32:03 <Eddi|zuHause> ok, my ships are a bit stuck in traffic now :/
23:46:36 <Eddi|zuHause> manually assinging the terminals seems to have helped that
23:52:33 *** sim-al2 is now known as Guest248
23:52:35 *** sim-al2 has joined #openttd
continue to next day ⏵