Back to Home / #openttd / 2018 / 03 / Prev Day | Next Day
#openttd IRC Logs for 2018-03-02

---Logopened Fri Mar 02 00:00:29 2018
00:06-!-HeyCitizen [] has joined #openttd
00:06-!-HeyCitizen is "Got ZNC?" on #openttd
00:11-!-colde [] has joined #openttd
00:11-!-colde is "Loke Dupont" on #openttd
00:25-!-sla_ro|master [] has quit []
00:31-!-cHawk [] has quit [Quit: Leaving]
00:39-!-cHawk [] has joined #openttd
00:39-!-cHawk is "realname" on #openttd #tor-project #tor
00:54-!-Supercheese [] has joined #openttd
00:54-!-Supercheese is "Supercheese" on #openttd
01:05-!-chomwitt [~chomwitt@2a02:587:dc13:e900:ec17:4c43:c3b5:3e1] has quit [Quit: WeeChat 1.0.1]
01:11-!-dvim [] has joined #openttd
01:11-!-dvim is "Martynas" on #openttd #openjdk #awesome
01:34-!-supermop [] has joined #openttd
01:34-!-supermop is "A CIRC user" on #openttd
01:43-!-Cubey [] has quit [Ping timeout: 480 seconds]
01:43-!-supermop [] has quit [Ping timeout: 480 seconds]
02:20-!-john-aj [] has joined #openttd
02:20-!-john-aj is "John" on #openttd
02:36-!-Smedles [] has joined #openttd
02:36-!-Smedles is "Paul Smedley" on #openttd
02:48-!-keoz [~keikoz@2a01:e35:2fd5:51e0:1037:e61d:fbf:2ba8] has joined #openttd
02:48-!-keoz is "Grmph" on #openttd
03:34-!-Supercheese [] has quit [Quit: Valete omnes]
03:48-!-andythenorth [] has joined #openttd
03:48-!-andythenorth is "andythenorth" on #openttd
04:00-!-Biolunar [] has joined #openttd
04:00-!-Biolunar is "Biolunar" on #openttd #suckless
04:16-!-Biolunar [] has quit [Ping timeout: 480 seconds]
04:17<SpComb>Eddi|zuHause: is it actually possible to build flyovers for rail junctions?
04:17<SpComb>was unable to figure out how yesterda
05:06<andythenorth>I like this boat
05:13-!-andythenorth [] has quit [Quit: andythenorth]
05:22<Eddi|zuHause>SpComb: yes, with manually adjusting the incline of the track, you can build bridges
05:22<Eddi|zuHause>but it's a bit fiddly
05:25<SpComb>haven't tried that yet
05:26<SpComb>I did one tunnel underpass to keep the pax and cargo networks separate, and that was waaay too fiddly
05:26<SpComb>ended up accidentially deleting the original tunnel and being unable to rebuild it, had to revert to an autosave
05:26<Eddi|zuHause>there's also but i never tried that
05:28<SpComb>hah, modded in as a passsenger station?
05:28<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.
05:28<SpComb>wish it was in the actual game :<
05:28<Eddi|zuHause>that sounds unfortunate
05:30<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
05:31<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
05:32<SpComb>somehow they managed to get the similar UI to work perfectly well in Cities: Skylines
05:39<Eddi|zuHause>C:S construction method is also not without flaws
05:39-!-andythenorth [] has joined #openttd
05:39-!-andythenorth is "andythenorth" on #openttd
06:02-!-ToBeFree [] has joined #openttd
06:02-!-ToBeFree is "Tobias "ToBeFree" Frei" on #https-everywhere @#freiwuppertal #oolite-dev #openttd #tor #debian #linux #oolite #oolite-ger @#InfiniteAdventures
06:04-!-Thedarkb [] has joined #openttd
06:04-!-Thedarkb is "realname" on #/r/openttd #openttd #oolite
06:14-!-ToBeFree [] has quit [Remote host closed the connection]
06:51-!-Samu [] has joined #openttd
06:51-!-Samu is "OFTC WebIRC Client" on #openttd
06:54-!-tokai|noir [] has joined #openttd
06:54-!-mode/#openttd [+v tokai|noir] by ChanServ
06:54-!-tokai|noir is "Christian Rosentreter" on +#openttd
06:59-!-FLHerne [] has joined #openttd
06:59-!-FLHerne is "Francis Herne" on #kernelnewbies #openttd
06:59-!-tokai [] has quit [Ping timeout: 480 seconds]
07:02-!-Borg [] has joined #openttd
07:02-!-Borg is "Unknown" on #openttdcoop #openttd
07:02<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
07:03<SpComb>even basic tunnels/bridges seem very difficult in TF
07:03<SpComb>where other tracks/infrastructure is involved, not just existing terrain
07:03<Borg>if OpenTTD is singled threaded.. how come extra GRF text on industries are broken sometimes?
07:03<andythenorth>what's broken?
07:03<andythenorth>it's not repainted?
07:03<Eddi|zuHause>Borg: how does "single threaded" relate to "bug free"?
07:04<Borg>Eddi|zuHause: I rather see it as synchronization problem...
07:04<Borg>andythenorth: it is repainted.. but.. get distorted..
07:04<Eddi|zuHause>Borg: could be loads of other problems
07:04<Borg>like.. 2 concurent things paint stuff
07:04<andythenorth>it's usually cache invalidation somewhere
07:04<Borg>andythenorth: I try to do it..
07:05<andythenorth>either the cb isn't being re-triggered
07:05<andythenorth>or the region isn't marked dirty correctly
07:05<Borg>thats key small screenshot shortcut?
07:05<Samu>talking about single threaded stuff?
07:05<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
07:05<andythenorth>I've seen industry window text bug many times fwiw
07:06<Samu>could AIs perhaps be executed all at once, in separate threads?
07:06<andythenorth>this week I managed to get the depot view to show me ships in my company colours
07:06<andythenorth>but the buy menu lost the company colouring
07:06<andythenorth>that was new and unusual
07:06<Borg>okey.. lets try
07:06<Samu>and then queue up their commands?
07:06<Borg>got it
07:06<Samu>or am i probably misunderstanding the way it works now?
07:07<Borg>it works worse on screenshot :)
07:08<Samu>Net Power?
07:08<Borg>Samu: its my GRF.. :) support for electric power.. fun
07:08<Eddi|zuHause>that looks like a bounding rectangle issue, like calculating the wrong text length for what to redraw
07:08<Samu>yes, but where is the problem, :o
07:08<Borg>Samu: look at text distortion?
07:09<andythenorth>it should be 900%?
07:09<Samu>i see it after net power
07:09<Borg>it probably wanted to display 98% or so
07:09<Eddi|zuHause>i think it switched from 90% to 100%?
07:09<andythenorth>industry window does that
07:09<andythenorth>it's not very good at repaint
07:09<Samu>maybe a invalidatedata issue?
07:09<Borg>Eddi|zuHause: it rather switched from 100% -> 97% or so..
07:10<Borg>it happens kinda often actually
07:10<Borg>I see exacly same problem in GRF debug windows too
07:10<Borg>its global
07:10<Eddi|zuHause>i'm pretty sure it calculates the wrong text length estimate
07:11<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 ;)
07:11<Eddi|zuHause>that's how it works
07:11<Eddi|zuHause>but it doesn't update the whole screen every time
07:11<Borg>then I dont know how it can fuckup.. if its single threaded..
07:11<Eddi|zuHause>it calculates rectangles that have changed
07:11<Samu>forgot the exact function, it's a function that forces a redraw
07:11<Eddi|zuHause>and redraws only those
07:11<Borg>so it must be it..
07:11<Eddi|zuHause>and here it chooses a too small rectangle
07:11<andythenorth>put dirty blocks on
07:11<andythenorth>and have a look
07:12<Borg>lets see
07:12<andythenorth>it's on the ? menu
07:12<Borg>unfortunatelly.. not
07:13<Borg>well, so its in menu stuff only.. I guess
07:13<Borg>I never see drawing artifacts in game (using default ttd gfx)
07:14<andythenorth>enable newgrf_developer_tools
07:14<Samu>something like UpdateWidgetSize
07:14<Samu>SetDParamMaxValue(i, INT16_MAX);
07:15<Samu>then set the boundingbox size
07:15<Samu>i think
07:15<Samu>dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR)); to the maximum size
07:15<Samu>that's an example i found in the code
07:15<Borg>andythenorth: they dont work on menus.. only on game objects
07:16<Borg>andythenorth: anyway. its must be invalidation.. because when I move window.. text get fixed
07:16<andythenorth>oh yeah the dirty blocks are limited to game viewport
07:16<andythenorth>I never noticed before
07:18<Borg>if you want to see it on your own eyes.. u can connect to my server
07:18<Eddi|zuHause>Borg: would still be interesting if it breaks on switching 90->100 or 100->90 or some other condition
07:18<Borg>and observe for a few secs power station
07:18<Borg>Eddi|zuHause: it always break when new text is shorter
07:18<Borg>never when new text is longer
07:18<Borg>at least from what I seen so far
07:19<Samu>i have a question about multi threading AIs
07:20<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?
07:22<Borg>Samu: I would rather just spawn secondary thread.. for AIs only.. and execute all AIs there..
07:23<Samu>maybe i could take a better look at how it works atm
07:23<Borg>it will be easier to do imo.. because now.. it works on single thread anyway..
07:24<Samu>hmm so you know how it works?
07:25<Samu>when having 15 AIs, the game stalls too much
07:27<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
07:27<Eddi|zuHause>(this is overly simplified)
07:28<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.
07:28<Flygon>Because dammit.
07:29<Flygon>If we want a lag-free 4k*4k OpenTTD map with 16 AI.
07:29<Flygon>We need a 1.67THz CPU with an alternate reality inbuilt!
07:29<Eddi|zuHause>tardis computers?
07:31<Samu>i thought of a queue mechanism of some sorts
07:31<Samu>instead of waiting for the result of the previous AI
07:32<andythenorth>"eventually consistent" ?
07:32<andythenorth>can we exploit AI timing to read memory? o_O
07:34<Borg>andythenorth: oh. come on..
07:34<Borg>or.. not ;)
07:34<Samu>whoever finishes computing their stuff first, is executed first
07:34<Borg>Samu: u dont get other point..
07:34<Borg>reading map.. will not be synchronized
07:35<@peter1138>Just pretend it's quantum.
07:35<Samu>ah, yes, I see
07:35<@peter1138>(More Shrödinger)
07:36<andythenorth>as it's a snow day
07:36<andythenorth>can we have multi-docks today?
07:36<@peter1138>Technology means that I can work even on "snow days"
07:36<@peter1138>Also I forgot about it.
07:36<@peter1138>Where did I get?
07:37<andythenorth>you hadn't figured out where to park ships
07:37<andythenorth>when they're waiting
07:37<andythenorth>or something
07:37<@peter1138>No, I never did waiting ships :p
07:38<@peter1138>Hmm, something about finding the correct tile without having to loop over the tile area every time a ship crosses a tile edge.
07:38<andythenorth>yes that
07:38<Samu>does the map really have to be synchronized between AIs? I was imagining them working on the same "map frame"
07:38<@peter1138>I think I got distracted by Samu's "attempt" to improve ship pathfinding.
07:38<andythenorth>can't they just head for one dock?
07:38<andythenorth>or something
07:39*andythenorth wavey hand programming
07:39<andythenorth>'probably fine'
07:39<Samu>oh, peter1138 I really wanted to work on that, but it's just too much for my abilities
07:39<@peter1138>Well that doesn't work if you have a docks either side of a long but narrow (where the docks are) landmass.
07:42<Borg>guys... also. I have 2 tickers open.. from a months? or longer?
07:42<Eddi|zuHause>how do roadstops work there?
07:42<Borg>no single comment.. whats going on?
07:43<@peter1138>Eddi|zuHause, the tiles explicitly listed. I did in one patch abuse the RoadStop to explicitly list docking points.
07:44<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
07:44<@peter1138>Hmm, I don't have my dev environment set up since upgrading my PC.
07:44<Borg>Eddi|zuHause: geez...
07:47<@peter1138>Yeah us developers are evil scheming bastards.
07:50<Flygon>Now now now.
07:51<Flygon>You're only en evil scheming bastard if you like devving for the SNES.
07:52<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?
07:53<Borg>or fg <jobid>
07:53<Eddi|zuHause>how do i find out the jobid?
07:54<Eddi|zuHause>that doesn't list the right process
07:54-!-snail_UES_ [] has joined #openttd
07:54-!-snail_UES_ is "Jacopo Coletto" on #openttd
07:54<Borg>then there is nothing attached to shell waiting for processing..
07:58<Eddi|zuHause>hm, it randomly decided to work after the third attempt
07:59<Borg>be aware. .that any output that process made earlier.. will not be refreshed on fg
08:00<Eddi|zuHause>that wasn't the problem
08:00<Eddi|zuHause>it didn't process any input the first time
08:11<Eddi|zuHause>uhm weird... now that i have successfully attached a gdb to the game, it actually runs normally...
08:11-!-Gustavo6046 [~Gustavo60@] has joined #openttd
08:11-!-Gustavo6046 is "If you look at real names all day, your life sucks" on #openttd
08:23<Borg>ahh yeah.. getto style... fun
08:24<Borg>I made nice clusterfuck.. ;)
08:24-!-snail_UES_ [] has quit [Quit: snail_UES_]
08:27<D-HUND>Eddi|zuHause: problem solved
08:27<D-HUND>oops, wrong nick
08:27-!-D-HUND is now known as debdog
08:28<Eddi|zuHause>debdog: well...
08:29-!-ToffeeYogurtPots [] has joined #openttd
08:29-!-ToffeeYogurtPots is "realname" on #debian #debian-hurd #debian-offtopic #tor #tor-project #tor-onions #tor-offtopic #i2p #https-everywhere #privacybadger #openttd #/r/openttd #privacytech #oftc
08:52<andythenorth>yo V453000
09:17<andythenorth>ho ho
09:17<andythenorth>again I've managed to get OpenTTD confused about company colours
09:17<andythenorth>some ships are using them, some are not
09:18<andythenorth>instances of same vehicle ID :P
09:18<andythenorth>cache invalid?
09:18<andythenorth>changing the company colours fixes the issue
09:19-!-john-aj [] has quit [Quit: john-aj]
09:23-!-Flygon [] has quit [Read error: Connection reset by peer]
09:24<andythenorth>slow compile is slow :(
09:24<andythenorth>30 seconds :(
09:24<andythenorth>I hate everything
09:25<Borg>like what?
09:28<Samu>how to multi-thread in openttd code? hmm i really wonder
09:28<Samu>is it try / catch?
09:29<andythenorth>right now I hate everything I am focussed on
09:29<andythenorth>so it's the speed of nml compiling :P
09:29<andythenorth>'everything' beyond that limited world view, not so hating
09:29<Borg>NML is written in python?
09:30<Borg>no wonder its slow ;)
09:30<andythenorth>nmlc is
09:30<andythenorth>there was a thought to reimplement in C++ or similar
09:30<andythenorth>but then who'd maintain it? o_O
09:31<andythenorth>30 seconds for a compile is so painful
09:31<andythenorth>it should be < 10s
09:32<Borg>u must have huge NML project then
09:32<andythenorth>it's tiny
09:32<Borg>how many kloc?
09:32<andythenorth>only 20k
09:32<Borg>20 kloc? its not that tiny...
09:33<andythenorth>FIRS is 326k
09:33<Borg>% wc -l X2025.src
09:33<Borg> 667 X2025.src
09:33<andythenorth>and compiles in 1 min
09:33<Borg>thats tiny project
09:33<andythenorth>FIRS is 11MB of nml
09:33<andythenorth>Unsinkable Sam is only 768KB
09:34-!-synchris [~synchris@] has joined #openttd
09:34-!-synchris is "Synesios Christou" on #openttd
09:34<Borg>I wonder why its so huge..
09:34<andythenorth>hmm, the graphics dirs are similar sized though
09:34<Borg>11MB of .txt files..
09:34<Borg>I cant belive it
09:34<andythenorth>it's a lot of whitespace
09:35<LordAro>generated files, presumably?
09:35<andythenorth>of course :)
09:35<Borg>why having NML then?
09:35<Borg>if you still need to generate...
09:35<LordAro>how big is the source you work on? :p
09:36<LordAro>Borg: oh you sweet summer child
09:36<Borg>summer child? da fuck? ;)
09:36<andythenorth>Borg: (1) writing nml by hand sucks (2) writing a generator for nfo would suck
09:36<Borg>then NML sux.. period
09:36<andythenorth>yes, this is known
09:36<Borg>da fuck ** 2 ?!
09:36<Borg>well.. I still use NFO myself
09:36<andythenorth>that's where we started talking, no? o_O
09:36<andythenorth>"I hate everything"
09:37<Borg>hmm src -> generating NML -> generating NFO...
09:37<Borg>I wonder how optimized that stuff is there at end
09:37<LordAro>if you apply that metric, everything sucks
09:38<LordAro>people generate python
09:38<andythenorth>it has been optimised somewhat
09:38<LordAro>people generate c++
09:38<Borg>I never generate anything high level..
09:38<LordAro>it's another layer of abstraction, is all
09:38<andythenorth>wow, there is 600KB of whitespace
09:38<andythenorth>in FIRS
09:38<andythenorth>just in dead line-endings
09:38<andythenorth>and I only removed 50% of them
09:38<LordAro>Borg: and you hand roll everything you do in assembly? of course you don't, don't be ridiculous
09:39<andythenorth>I wonder if dumping the whitespace affects compile time
09:39<Borg>LordAro: yes I do.. if I use asm... ultra rare these days
09:39<Borg>C ftw!
09:39<LordAro>ah, but C just generates assembly! how inefficient!
09:39<Borg>no no
09:39<Borg>its all fine
09:39<Borg>U use high level.. and dont care much about low level
09:40<Borg>weird stuff: <strange lang> -> C -> bytecode
09:40<Borg>but.. ppl do it...
09:40<LordAro>that's not why you generate source code
09:40<LordAro>at all
09:40<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
09:40<Eddi|zuHause>SpComb: also the "new" switched crossings are great, just a bit hidden
09:41<LordAro>source code is generated because it's very similar, only changing slightly between different classes/functions/whatever
09:41<LordAro>look at yacc/bison
09:41<LordAro>hell, look at cpp
09:41<Borg>well. I never had to use yacc.. but Im not a coder really..
09:41<LordAro>they all generate source code to prevent you from repeating yourself
09:41<Borg>more of hacker...
09:41<LordAro>so stop talking shit ;)
09:42<LordAro>the code i'm working on at the moment has 3 or 4 levels of source code generation, depending how you count it
09:44<LordAro>source code is read by programmers, not computers
09:44<Samu>how do i use try / catch for multithreading stuff? or am i doing this wrong?
09:45<LordAro>Samu: more detail required
09:45<Borg>LordAro: yeah.. and thats why Im against any generation.. but its just me
09:45<Borg>of course unless you generate trivial stuff.. aka.. inflating
09:45<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?
09:45<Samu>i'm going to experiment multi-threading AIs, don't care yet about map sync
09:46<Samu>ai_core.cpp line 68 /* static */ void AI::GameLoop()
09:46<Samu>I'm gonna use a variable like this
09:46<Samu> uint16 ai_looped = 0; FOR_ALL_COMPANIES(c) { if (c->is_ai) { ai_looped |= 1 << c->index; } }
09:47<Samu>adds a flag for every ai company, then next it does is ... execute everyone of them at the same time
09:47<Samu>when they finish their stuff, the flag is cleared
09:47<Samu>for their c->index
09:47<Borg>Eddi|zuHause: its not special... it just.. weird to me.. it just means.. NLM is badly designed.. aka defies it points
09:47<Borg>but.. its just me
09:47<LordAro>it is definitely just you
09:48<Borg>ok ;)
09:48<Samu>i know i have to use a try somewhere around here c->ai_instance->GameLoop();
09:48<Samu>and a catch of ai_looped matching 0
09:48<Eddi|zuHause>Borg: with "i do everything in C" you've missed the point about picking the right language for the job...
09:49<LordAro>Samu: i think you've missed the point of something somewhere
09:49<LordAro>try catch has nothing (inherrently) to do with multithreading
09:49<Borg>Eddi|zuHause: I dont do everything in C.. I pick right tool for the task
09:50<Eddi|zuHause>Borg: then why do you complain that someone thinks NML is the right tool for the task?
09:50<Borg>but if I pick C.. I rary use any middle stuff.. unless its big, non-monolitic project
09:50<Borg>Eddi|zuHause: geez.. Im sorry.. you misunderstood me..
09:51<Samu>hmm, so i'm doing this wrong
09:51<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..
09:52<Borg>but. lets cut it.. I see anger.. ;)
09:52<Borg>I never used NML.. so I should not make too strong opinions
09:52<Borg>I was just suprised by 2 things: big compiles times.. and MB+ sources codes.. generated
09:53<andythenorth>better than 11MB written by hand :)
09:53<andythenorth>which some people do
09:53<andythenorth>writing 326k lines manually....insane
09:54<Borg>andythenorth: how you can avoid that?
09:54<andythenorth>code generator
09:54<Borg>if its all logic.. (big project)...
09:54<Borg>I hardly see how you can generate anything..
09:54<andythenorth>NML is just a declarative language, mostly
09:55<andythenorth>it's very little logic, nearly all just markup
09:55<Borg>ok.. thats explains alot..
09:55<Borg>Im glad then I didnt touched it..
09:55<andythenorth>but nfo is the same
09:55<andythenorth>it's nearly all markup
09:55<Borg>NFO? you mean hex stuff?
09:55<LordAro>the NFO would be much bigger, surely
09:56<andythenorth>bytecode yes
09:56<Borg>hmm.. yeah.. but its NFO...
09:56<Borg>its all right :)
09:56<andythenorth>the NFO would be much more compact than the NML fwiw
09:56<Borg>especially when we see the roots of it
09:57-!-sim-al2 [] has quit [Ping timeout: 480 seconds]
09:57<andythenorth>but NFO remains mostly just markup
09:57<Borg>I dont get that.. part.. but ok..
09:59<andythenorth>I don't think the term 'markup' translates well, I'm abusing it
10:00<andythenorth>in the newgrfs I've seen, the majority of nfo is used to declare static properties
10:00<andythenorth>it's not really programming, it's just configuration code
10:01<Borg>well, its a bit of programing.. in Action 2.. Var and AdvVar
10:01<Borg>very limited tho..
10:01<andythenorth>yes the action 2 / varaction 2 are the logic
10:01<SpComb>Eddi|zuHause: switched crossings? you mean ?
10:01<andythenorth>the action 0 and action 1 stuff is very amenable to templating
10:01<andythenorth>there's no point writing that stuff out by hand
10:01<Eddi|zuHause>SpComb: yes
10:02<andythenorth>meanwhile, for action 2 / varaction 2, it's hard to apply DRY
10:02-!-snail_UES_ [] has joined #openttd
10:02-!-snail_UES_ is "Jacopo Coletto" on #openttd
10:02<Borg>andythenorth: sure.. depends on scale.. it might be worth of generating that
10:02<andythenorth>why wouldn't you generate it?
10:02<andythenorth>unless you can't write a generator :P
10:02<Borg>because I have just.. few of them?
10:02<andythenorth>yes ok
10:02<Borg>so it would be waste of time.. to write it..
10:02<andythenorth>if one has 100 vehicles
10:02<Borg>different story
10:02<andythenorth>one doesn't want to write the boilerplate 100 times
10:02<Borg>my GRF is mostly logic
10:03<andythenorth>now the other issue is less good
10:03<andythenorth>although in principle one can have shared varaction 2
10:03<andythenorth>and use registers
10:03<andythenorth>in practicality, it's easier to repeat the varaction 2s for every vehicle / industry
10:03<andythenorth>so there is a huge amount of repetition in the codebase
10:03<andythenorth>with only tiny difference
10:03-!-Mazur [] has quit [Ping timeout: 480 seconds]
10:04<andythenorth>there is no effective way to parameterise the logic and make it shared methods
10:04<Borg>andythenorth: yeah.. thats why NLM should handle that out of the box..
10:04<Borg>I wonder what was the rationale for creating NLM then..
10:04<andythenorth>the language can do it, but it's tortuous to use
10:04<andythenorth>the rationale for NML is trivial
10:04<andythenorth>most people can't or won't write nfo
10:04<Borg>ok ;)
10:04<Borg>fair enough..
10:05<andythenorth>and that is how we arrive at 11MB
10:09<andythenorth>166 near-identical switches for '[foo]_tile_fence_station' in FIRS
10:09<andythenorth>each one is 9 lines
10:09<andythenorth>but near-identical != identical
10:10<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
10:10<Borg>yeah. I know NFO stuff.. im abusing temp storage alot
10:12<Borg>probably.. If I would like to create bigger GRF project.. I would write generator myself.. at some point.
10:12<Borg>but as I said.. my project is under 1kloc
10:12<Borg>so... pointless
10:12<Borg>and it will not grow.. im glad of the results
10:20-!-snail_UES_ [] has quit [Quit: snail_UES_]
10:24<Eddi|zuHause>now here comes the tricky part, i need to upgrade a junction to doubletracks
10:24<Eddi|zuHause>without breaking all the routes
10:24<Eddi|zuHause>and destroying half the city
10:26<Eddi|zuHause>also, to have through-tracks in this station i need to destroy the foot path to the other side :/
10:28-!-Gustavo6046 [~Gustavo60@] has quit [Read error: Connection reset by peer]
10:30-!-nahkiss [] has quit [Read error: Connection reset by peer]
10:31<Borg>im at the limit too..
10:32<Borg>I should split stations probably
10:32<Borg>but its too big cluster fuck..
10:32<Borg>so I will just wait for X2001..
10:32-!-nahkiss [] has joined #openttd
10:32-!-nahkiss is "Oskari Kantoniemi" on #openttd
10:58-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
11:15-!-Thedarkb [] has joined #openttd
11:15-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
11:32<Eddi|zuHause>Achievement: "Load a train with 250 goods"... that, my dear game, is a ship...
11:44-!-HerzogDeXtEr [] has joined #openttd
11:44-!-HerzogDeXtEr is "purple" on #openttd
11:52-!-cHawk [] has quit [Ping timeout: 480 seconds]
11:58-!-TheMask96 [] has quit [Ping timeout: 480 seconds]
11:59-!-cHawk [] has joined #openttd
11:59-!-cHawk is "realname" on #tor #tor-project #openttd
12:00-!-TheMask96 [] has joined #openttd
12:00-!-TheMask96 is "Martijn Zweistra" on #openttd @#altcontrol #openttd.notice
12:11-!-Biolunar [] has joined #openttd
12:11-!-Biolunar is "Biolunar" on #openttd #suckless
12:15-!-Progman [] has joined #openttd
12:15-!-Progman is "Peter Henschel" on #openttdcoop #openttd
12:23-!-Cubey [] has joined #openttd
12:23-!-Cubey is "Jaybar" on #openttd
12:33-!-ToBeFree [] has joined #openttd
12:33-!-ToBeFree is "Tobias "ToBeFree" Frei" on #https-everywhere @#freiwuppertal #oolite-dev #openttd #tor #debian #linux #oolite #oolite-ger @#InfiniteAdventures
12:40-!-Coobies [] has joined #openttd
12:40-!-Coobies is "Jaybar" on #openttd
12:42-!-frosch123 [] has joined #openttd
12:42-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd
12:44-!-Cubey [] has quit [Ping timeout: 480 seconds]
12:57<Eddi|zuHause>ooh... ships now have multiple cargo holds
12:58<Eddi|zuHause>that should simplify a few things
13:00-!-glx [] has joined #openttd
13:00-!-mode/#openttd [+v glx] by ChanServ
13:00-!-glx is "Loïc GUILLOUX" on +#openttd
13:07-!-ToBeFree [] has quit [Quit: Leaving]
13:16<Samu> - squirrel does not like what I'm doing
13:18<Samu>the VM or whatever is erroring
13:21<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.
13:21<Samu>what can I do?
13:22-!-Wolf01 [] has joined #openttd
13:22-!-Wolf01 is "Wolf01" on #openttd
13:22<Samu>does anyone know if this has been tried before by someone else?
13:24<Wolf01>Sure, on the Simpsons, maybe on the Griffins, if not, then try South Park
13:25<Samu>google says:
13:26-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
13:29<Samu>who's the thread expert?
13:29<Samu> is this answer related to what I'm trying to do?
13:30<Borg>hmmm HMMM..
13:30<LordAro>Samu: gonna go ahead and suggest "no, no one's tried this (vaguely successfully) before"
13:30<LordAro>multithreading is fundamentally hard
13:31<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
13:31<LordAro>without rewriting basically everything
13:32<Eddi|zuHause>well, in computer science there's hard problems, and THEN there's multithreading
13:32<andythenorth>I don't really understand the problem tbh
13:32<andythenorth>why is multi-threading hard?
13:33<andythenorth>you can only sensibly multi-thread parallel operations
13:33<andythenorth>otherwise you have to stop and compare state all the time
13:33<andythenorth>so what's hard about it?
13:34<andythenorth>oh sometimes people are determined to stop and compare state?
13:34<LordAro>the number of operations that can be described as truely parallel, and don't interfere with each other is really rather small
13:34<Wolf01>The only reliable part I was able to do was: RetrieveRSS().whenAll(DoStuff())
13:34<LordAro>resource contention is a bitch
13:34<andythenorth>and then we have spectre and meltdown
13:34<andythenorth>speculative instructions :P
13:34<andythenorth>to use up spare cycles
13:34<LordAro>technically, neither of those are concurrency related
13:34<LordAro>branch prediction is not the same
13:34<andythenorth>no, I'm adding one and one to get 5
13:35<andythenorth>it just struck me that they are a similar class of 'clever tricks to get more out of CPU'
13:36-!-Thedarkb [] has joined #openttd
13:36-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
13:39<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.
13:39<andythenorth>what does -j do on gcc?
13:39<andythenorth>I can't find the docs in google quickly :P
13:39<LordAro>i have a suspicion that would be slower than normal
13:40<LordAro>andythenorth: gcc -h
13:40<LordAro>Samu: what would happen if 2 AIs tried to build something on the same tile?
13:40<andythenorth>I don't have GCC, and clang doesn't have -h :P
13:40<Samu>that, I don't really know
13:40-!-sla_ro|master [] has joined #openttd
13:40-!-sla_ro|master is "slamaster" on @#sla #openttd
13:40<andythenorth>anyway is -j threads?
13:40<LordAro>andythenorth: well their options are basically identical
13:41<andythenorth>I use it, I just wonder what the implementation is
13:41<+glx>yes -j is threads
13:41<andythenorth>ok so how does GCC manage multi-threading? Does each thread pick something from the end of a dependency chain?
13:41<Samu>I was hoping the DoCommand functions to have some sort of queue
13:41<andythenorth>and they just work up the tree, blocking when they can't compile until another finishes?
13:41<LordAro>C files don't have dependency chains
13:41<+glx>each thread compiles a source file
13:42<Samu>like they do in network
13:42<LordAro>they're individual compilation units, once all the #includes have been resolved
13:42<LordAro>Samu: maybe so
13:42<LordAro>but which order to commands get added?
13:42<+glx>well I think -j is a make flag btw
13:42*andythenorth should read the docs
13:42<andythenorth>yes it is a make flag
13:42<andythenorth>I was wrong
13:42<Samu>whoever gets to it first, most likely
13:43<+glx>so indeed make just fires multiple gcc at a time
13:43<Borg>yeah.. its make flag, means jobs
13:43<LordAro>jobs are subtly different from threads
13:43<LordAro>which i've found annoying in the past
13:46<andythenorth>is it a worker pool?
13:46*andythenorth is guessing not reading docs
13:46<LordAro>basically, yeah
13:46<andythenorth>wow, deliveroo is apparently working
13:46<andythenorth>13 restaurants open and delivering
13:46<Wolf01>It's nice how sometimes you come out with interesting discussions :)
13:47<andythenorth>you have snow too Wolf01 ?
13:47<andythenorth>you made our news today
13:47<andythenorth>not you personally
13:47<+glx>andythenorth: but better don't use the service when it's snowy, too dangerous for the guys on bikes
13:47<andythenorth>I live on a hill too
13:48<Samu>no snow where I am
13:48<Samu>but rains
13:48<Wolf01>Yes, yesterday we had some in my area, but in the Appennines zones they are really submerged
13:50-!-Stimrol [] has joined #openttd
13:50-!-Stimrol is "Stimrol" on #openttd
13:54<supermop_work_>it is raining and snowing at the same time here today
13:54<Wolf01>Here too, today
14:04-!-Coobies [] has quit [Ping timeout: 480 seconds]
14:12<Samu>how to run multiple squirrel vm's without conflicting
14:13-!-Wormnest [] has joined #openttd
14:13-!-Wormnest is "Wormnest" on #openttd
14:14<Samu>guess i'm gonna give up
14:16<Samu>even with only 1 AI, i get conflicts, hmm
14:38*andythenorth making ships
14:39<andythenorth>only thinking is noisy
14:39<andythenorth>making is silent
14:44-!-Borg [] has quit [Quit: leaving]
15:02<andythenorth>makefile args
15:02<andythenorth>is the convention upper or lower case?
15:03-!-Stimrol [] has quit [Read error: Connection reset by peer]
15:03<andythenorth>docs say upper, except for internal vars, but I can't grok that
15:03<andythenorth>the var in question is passed to python, and controls the number of workers in a parallel processing pool
15:06<SpComb>Eddi|zuHause: I managed to do it
15:06<Eddi|zuHause>ok :)
15:07-!-synchris [~synchris@] has quit [Remote host closed the connection]
15:07<Eddi|zuHause>that doesn't even remotely look like anything i build :p
15:08-!-ToBeFree [] has joined #openttd
15:08-!-ToBeFree is "Tobias "ToBeFree" Frei" on #https-everywhere @#freiwuppertal #oolite-dev #openttd #tor #debian #linux #oolite #oolite-ger @#InfiniteAdventures
15:10-!-Stimrol [] has joined #openttd
15:10-!-Stimrol is "Stimrol" on #openttd
15:10-!-ToBeFree [] has quit []
15:10-!-ToBeFree [] has joined #openttd
15:10-!-ToBeFree is "ToBeFree" on #tor #openttd #oolite-ger #oolite-dev #oolite #linux #https-everywhere #debian #InfiniteAdventures
15:17<Samu>managed to do something! a single AI instance thread doesn't conflict with itself anymore. Or at least, so far
15:18<Samu>but if another AI starts... the squirrel asserts all over random places
15:20-!-sla_ro|master [] has quit []
15:28<andythenorth>Eddi|zuHause: I've got a multi-line string, with many empty lines
15:29<andythenorth>how can I drop the empty lines in python, neatly? o_O
15:30<Eddi|zuHause>andythenorth: split on '\n' and then [x for x in lines if x != ''], and then join on '\n' again?
15:30<Eddi|zuHause>or regex a '\n*' into '\n'
15:38<andythenorth>escaped_nml = '\n'.join([x for x in escaped_nml.split('\n') if x != ''])
15:38<andythenorth>doesn't pick up the empty lines
15:38-!-Supercheese [] has joined #openttd
15:38-!-Supercheese is "Supercheese" on #openttd
15:39*andythenorth wonders what's in them
15:39<andythenorth>oh they have whitespace :P
15:39<andythenorth>and tab stops
15:40<Eddi|zuHause>andythenorth: trim?
15:40<Eddi|zuHause>x.trim()!='' or so
15:41<Eddi|zuHause>just a random guess
15:42<andythenorth>Stack Overflow suggests strip(' \t\n\r')
15:42<+glx>seems smart :)
15:43<andythenorth>also I have multiple open :P
15:43<andythenorth>and I've been typing in the wrong one
15:57<andythenorth>trying to figure this bug out
15:57<andythenorth>not sure how the grf gets its name
15:58<andythenorth>I suspect custom_tags is not being rebuilt
16:23-!-Wormnest_ [] has joined #openttd
16:23-!-Wormnest_ is "Wormnest" on #openttd
16:25-!-Gja [] has joined #openttd
16:25-!-Gja is "Martin" on #ceph #bcache #openttd
16:26<andythenorth>made my compile faster :P
16:27-!-Wormnest [] has quit [Ping timeout: 480 seconds]
16:36<andythenorth>I need to trigger CUSTOM_TAGS rebuilding if the repo version has changed
16:36<andythenorth>I have no idea how to do that
16:36<andythenorth>it could just be rebuilt on every build of the grf
16:36<andythenorth>it's cheap to run
16:36<andythenorth>but again, no idea :)
16:41-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:50-!-john-aj [] has joined #openttd
16:50-!-john-aj is "John" on #openttd
16:52-!-Mazur [] has joined #openttd
16:52-!-Mazur is "Stefan Linnemann" on #openttdcoop #openttdcoop.stable #openttd #oolite
17:02-!-Mazur [] has quit [Ping timeout: 480 seconds]
17:10-!-sim-al2 [] has joined #openttd
17:10-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
17:11-!-supermop [] has joined #openttd
17:11-!-supermop is "A CIRC user" on #openttd
17:12-!-Biolunar [] has quit [Ping timeout: 480 seconds]
17:13-!-Mazur [] has joined #openttd
17:13-!-Mazur is "Stefan Linnemann" on #openttdcoop #openttdcoop.stable #openttd #oolite
17:15-!-Gja [] has quit [Quit: Going offline, see ya! (]
17:16-!-Gustavo6046 [~Gustavo60@] has joined #openttd
17:16-!-Gustavo6046 is "If you look at real names all day, your life sucks" on #openttd
17:20-!-ToBeFree [] has quit [Quit: Connection closed for inactivity]
17:22-!-andythenorth [] has quit [Quit: andythenorth]
17:25-!-sim-al2 is now known as Guest246
17:25-!-sim-al2 [] has joined #openttd
17:25-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
17:27-!-Gustavo6046 [~Gustavo60@] has quit [Quit: food water bed]
17:27-!-Gustavo6046 [~Gustavo60@] has joined #openttd
17:27-!-Gustavo6046 is "If you look at real names all day, your life sucks" on #openttd
17:28-!-Guest246 [] has quit [Ping timeout: 480 seconds]
17:32<Eddi|zuHause>ok, my ships are a bit stuck in traffic now :/
17:46<Eddi|zuHause>manually assinging the terminals seems to have helped that
17:52-!-sim-al2 is now known as Guest248
17:52-!-sim-al2 [] has joined #openttd
17:52-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
17:56-!-Guest248 [] has quit [Ping timeout: 480 seconds]
17:59-!-Flygon [] has joined #openttd
17:59-!-Flygon is "Flygon" on #openttd
18:31<Samu>eww, I'm so bad at this, I managed to trigger multi-threaded asserts
18:32-!-Wormnest_ [] has quit [Quit: Leaving]
18:36-!-sim-al2 is now known as Guest252
18:36-!-sim-al2 [] has joined #openttd
18:36-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
18:39-!-Guest252 [] has quit [Ping timeout: 480 seconds]
18:41-!-ATMunn [ATMunn@2a07:5741:0:12ee::1] has joined #openttd
18:41-!-ATMunn is "person" on #openttd #openttdcoop
18:41-!-ATMunn is now known as Guest253
18:42-!-Guest253 is now known as ATMunn
18:44<ATMunn>i've been having a weird problem in openttd recently
18:45<ATMunn>whenever i try to pan the map with the right mouse button, it kinda spazzes out and doesn't actually move
18:45<ATMunn>so im basically forced to use another method of scrolling if i want to actually play the game
18:45<ATMunn>i used to play the game just fine without this happening
18:46<Samu>windows 10?
18:46<ATMunn>yes, unfortunately :P{
18:46<Samu>ok, download 1.7.2, it was fixed
18:46<ATMunn>ah thanks
19:06-!-snail_UES_ [] has joined #openttd
19:06-!-snail_UES_ is "Jacopo Coletto" on #openttd
19:08-!-FLHerne [] has quit [Ping timeout: 480 seconds]
19:10-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
19:13-!-efess` [] has quit [Ping timeout: 480 seconds]
19:21-!-efess` [] has joined #openttd
19:21-!-efess` is "realname" on #/r/openttd #openttd
19:29-!-john-aj [] has quit [Quit: john-aj]
19:37<SpComb> I really like the mechanic with explicit track speed limits, it makes you rebuild all your tracks later on in the game as trains get faster
19:38<SpComb>spent at least an hour making sure all my pax tracks are at least 120km/h
19:42<SpComb>the same junction was already there in ~1920 but with far tighter curves, and without the tunnel in the hills on the other side
19:58-!-Supercheese [] has quit [Ping timeout: 480 seconds]
20:02-!-supermop [] has quit [Ping timeout: 480 seconds]
20:16-!-Samu [] has quit [Quit: Page closed]
20:25-!-Progman [] has quit [Remote host closed the connection]
20:27<Eddi|zuHause>however, i have a track section it won't let me electrify
21:01-!-norenarick_ [] has joined #openttd
21:01-!-norenarick_ is "norenarick_" on #openttd
21:01<norenarick_>are there people in here?
21:15-!-norenarick_ [] has quit [Remote host closed the connection]
21:25-!-Gustavo6046 [~Gustavo60@] has quit [Quit: food water bed]
21:41-!-Supercheese [] has joined #openttd
21:41-!-Supercheese is "Supercheese" on #openttd
21:47-!-Thedarkb [] has quit [Quit: Leaving]
21:56-!-snail_UES_ is now known as Guest259
21:56-!-Guest259 [] has quit [Read error: Connection reset by peer]
21:56-!-snail_UES_ [] has joined #openttd
21:56-!-snail_UES_ is "Jacopo Coletto" on #openttd
22:13-!-Supercheese [] has quit [Read error: Connection reset by peer]
22:46-!-supermop [] has joined #openttd
22:46-!-supermop is "A CIRC user" on #openttd
23:04-!-snail_UES_ [] has quit [Quit: snail_UES_]
23:15-!-glx [] has quit [Quit: Bye]
23:40-!-TrueBrain_ [] has joined #openttd
23:40-!-TrueBrain_ is "Patric Stout" on #openttd #opendune
23:40-!-TrueBrain [] has quit [Read error: Connection reset by peer]
23:45-!-HerzogDeXtEr1 [] has joined #openttd
23:45-!-HerzogDeXtEr1 is "purple" on #openttd
23:51-!-HerzogDeXtEr [] has quit [Ping timeout: 480 seconds]
---Logclosed Sat Mar 03 00:00:30 2018