IRC logs for #openttd on OFTC at 2019-04-20
⏴ go to previous day
01:05:15 <peter1138> Heh, there two "reddit #1" servers...
01:05:29 <peter1138> One is Vanilla, the other is... "Vanila" ...
01:17:06 <Eddi|zuHause> is that a crossover between Venice and Manila?
01:56:20 <Artea> my other laptop died :(
01:56:56 <Artea> don't know what I going to do without MU Online :S
02:11:47 *** Thedarkb-T60 has joined #openttd
02:48:06 <Artea> seems Generate Name in Fund Town doesn't work
03:08:48 <peter1138> Some of the name generators have a very limited set of names.
03:12:33 *** supermop_Home has joined #openttd
03:21:27 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7527: Add: NewGRF string codes to access PUSH/POP_COLOUR. https://git.io/fjOl2
03:24:03 <Samu> what was the command to remove a pr?
03:24:23 <peter1138> git branch -D branchname
03:24:48 <supermop_Home> why is peter1138 still up I wonder
03:27:44 <peter1138> That is how you delete a branch.
03:27:58 <peter1138> "pr/xxxx" is a branch name.
03:28:29 <glx> but the manual way works too ;)
03:28:45 <peter1138> There is nothing magic about "pr/", it's just a convenient way to identify a pr branch.
03:31:29 <glx> indeed it was clearly unsafe to trust newgrf :)
03:34:10 <peter1138> Who knows what could happen!
04:51:46 <supermop_Home> any more NRT playing?
07:53:13 *** tycoondemon has joined #openttd
08:23:18 *** andythenorth has joined #openttd
09:06:23 <andythenorth> peter1138: so should we just split out trams completely?
09:06:45 <andythenorth> the partial split is confusing in nml too :P
09:19:15 *** Progman has joined #openttd
09:35:09 <nielsm> hah wtf, I just discovered an oversight in my town cargo gen patch
09:35:25 <nielsm> in object_cmd.cpp TileLoop_Object it does cargo generation for the company HQ
09:35:31 <nielsm> which also uses that algorithm
09:35:40 <nielsm> so that needs to be fixed I guess
09:37:01 *** sla_ro|master has joined #openttd
11:43:02 <peter1138> What's confusing about trams in nml?
11:47:22 <peter1138> Well, my late-night soldering worked. Shame it was just temporary though :p
11:47:32 <peter1138> Now I just need to pop out to Mapl... oh.
11:51:48 <andythenorth> peter1138: I think mostly that a tram can have road_type property validly set, and road vehicle can have tram_type validly set
11:52:01 <andythenorth> which isn't actually a problem, just weird
11:52:17 <peter1138> That... sounds like an NML thing?
11:52:23 <andythenorth> it's an nml thing yes
11:52:24 <DorpsGek_II> [OpenTTD/nml] michicc opened pull request #33: Fix c3404c0: Invalid syntax for string code table. https://git.io/fjO6m
11:52:41 <andythenorth> nml _could_ maybe split trams and RVs completely
11:52:46 <andythenorth> dunno if it should
11:53:24 <andythenorth> anyway, /me biab
11:53:32 <peter1138> In NFO you just have look up table index, and the look up table depends on the misc flags
11:53:58 <DorpsGek_II> [OpenTTD/nml] michicc merged pull request #33: Fix c3404c0: Invalid syntax for string code table. https://git.io/fjO6m
11:53:59 <DorpsGek_II> [OpenTTD/nml] PeterN approved pull request #33: Fix c3404c0: Invalid syntax for string code table. https://git.io/fjO63
12:21:09 *** Thedarkb-T60 has joined #openttd
12:27:10 <peter1138> Hmm, I need a for-loop-type-thing that will do both "false" and "true". Maybe I should make my enum a uint8 instead of bool :p
12:32:54 <peter1138> for (bool b : { false, true })
12:42:24 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7521: Fix: Stop Construction Windows Closing on Company Rename (Issue #7479) https://git.io/fjO69
12:43:02 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh dismissed a review for pull request #7521: Fix: Stop Construction Windows Closing on Company Rename (Issue #7479) https://git.io/fjOl5
12:43:32 <LordAro> peter1138: bit weird regardless i feel
12:44:02 <nielsm> that looks very python-ish to me
12:44:05 <peter1138> LordAro, I'm actually doing "for (RoadTramType rtt : { RTT_ROAD, RTT_TRAM })"
12:44:20 <peter1138> As RoadTramType is an enum backed by bool.
12:45:03 <peter1138> If it's a uint8 and I add RTT_END, then that needs to be handled in switch blocks etc :/
12:45:26 <peter1138> Also, it's hidden by "FOR_ALL_ROADTRAMTYPES(rtt)" cos we're evil ;)
12:51:14 <peter1138> That's a swizz! This Easter egg comes in two halves, not one piece ;(
12:56:28 <Wolf01> <peter1138> for (bool b : { false, true }) <- what. the. f?
12:57:37 <peter1138> No, it just iterates both false and true.
12:57:46 <nielsm> RoadTramType ALL_ROADTRAMTYPES[] = { RTT_ROAD, RTT_TRAM }; for (RoadTramType rtt : ALL_ROADTRAMTYPES) ...
12:57:57 <nielsm> why waste a declaration like that when you can do it in less?
12:58:22 <peter1138> Hmm, "Stroll On" sounds very wonky with fluidsynth :/
12:58:43 <nielsm> deduplicate some code?
12:58:47 <peter1138> Wolf01, because I need to iterate both values.
12:59:01 <Wolf01> I would make a function :P
12:59:23 <nielsm> sometimes factoring out to a function is not practical
12:59:25 <peter1138> That's not fun when there are side effects.
12:59:29 <nielsm> the function would end up with ten arguments
12:59:42 <nielsm> (don't know about this specific case)
13:00:33 <peter1138> Not that many, but it's replacing an existing for-loop as well.
13:00:52 <peter1138> I had unrolled it, now I'm un-unrolling it.
13:01:04 <nielsm> and making a lambda function with captures can be rather awkward syntax
13:02:42 <Wolf01> Not that in c# would be different, just a foreach on a list containing false and true :P
13:05:29 <nielsm> I should get up and do something vaguely useful, instead of sipping tea and reading dumb things on the internet
13:06:44 <Wolf01> Me too, but I have 9 days to do that
13:08:12 <nielsm> <@peter1138> Hmm, "Stroll On" sounds very wonky with fluidsynth :/ <-- and yeah those free soundfonts usually supplied don't sound good with music written with roland soundcanvas in mind
13:08:39 *** frosch123 has joined #openttd
13:10:38 <peter1138> nielsm, well, seems there's some weird pitch-shifting happening.
13:21:03 <peter1138> Heh, when you go "wtf is this bit shuffling" and then realise you are in afterload.cpp
13:29:34 *** nartir[m] has joined #openttd
13:30:05 <frosch123> hmm, the latest commit in grf2html is adding .hgignore after svn->hg migration
13:30:14 <frosch123> i wonder whether i drop that commit when converting to git
13:31:52 <peter1138> Hmm, the music stopped at/after 04 "Road Hog"
13:32:22 <peter1138> Oh, no, whoops. I'd muted it.
13:51:09 <nielsm> now what would be a sane default for script max memory?
13:51:48 <nielsm> and should it depend on 32 or 64 bit?
13:52:45 <nielsm> and hmm is that a game setting or a client setting?
13:53:37 <nielsm> since the AI and GS don't actually run on network clients it seems wrong to make it a game setting
13:54:06 <nielsm> and should it even be exposed in the UI?
13:54:38 *** andythenorth has joined #openttd
13:57:36 <frosch123> the main difference is that game settings are stored in the savegame, while client settings are not
13:57:57 <frosch123> make it the same as the opcode limit
13:58:14 <frosch123> wrt. storing and exposure
14:02:20 <frosch123> meh, my connection to devzone has lots of packet loss :/
14:03:34 <andythenorth> FEAT_ROADTRAMVEHS ? o_O
14:03:34 <andythenorth> instead of FEAT_ROADVEHS
14:03:34 <andythenorth> my devzon hg is flaking out occasionally
14:04:12 <frosch123> don't break things just to for breaking :)
14:05:04 <frosch123> if road and tramtypes share labels now, they should probably also share the translation table and feature number
14:05:21 <frosch123> so, everything is ROAD in nml
14:05:32 <andythenorth> I am aware of the pitfalls of tidy-mind problems :)
14:06:20 *** HerzogDeXtEr has joined #openttd
14:06:58 <andythenorth> I just keep running into the side effects of 'road vehicles' being the set of 'road vehicles' and 'trams'
14:07:17 <andythenorth> e.g. in Hog docs, I have a page split into road vehicles, and trams
14:07:35 <andythenorth> and to split, I iterate road vehicles, splitting out road vehicles :)
14:08:13 * andythenorth files it under 'much lolz all'
14:09:11 <peter1138> Nah, translation table and feature is not shared.
14:10:50 <peter1138> To merge them would break existing NewGRFs, and also makes splitting it apart later awkward if that becomes the way forward.
14:11:20 <Wolf01> VS 142 is 2017 or newer?
14:11:43 <peter1138> I think 141 is 2017 and 142 is 2019
14:13:03 <Wolf01> Ok, selected wrong project :P
14:16:03 <Wolf01> Ok, master updated and compiled
14:19:29 <Wolf01> Is the nrt main repo still the andy's one?
14:20:26 <peter1138> andythenorth/nrt-block
14:21:36 <peter1138> Nice, make regression fails D:
14:22:49 <nielsm> ugh apple what is this
14:23:01 <nielsm> also squirrel what is this
14:26:21 <Wolf01> Mmmh, 74 conflicts... the branch is clean, pull -> conflicts, is it stupid or what?
14:26:29 <nielsm> maybe moving the <map> include fixes that
14:28:43 <andythenorth> so pax feldbahn?
14:31:04 <nielsm> hmm or well, maybe after 1980 as a museum railway kind of thing
14:34:40 <nielsm> (I should try talking to that club some time and see if I can get to try driving the steam engine)
14:38:22 <andythenorth> micro feldbahn :P
14:38:44 <nielsm> that's just a large scale model railway :P
14:40:44 <Wolf01> Git reset from VS is really useless, had to do it from cli
14:44:52 *** Thedarkb-T60 has joined #openttd
14:46:25 <peter1138> VS is really useless :p
14:46:51 <Wolf01> Do I still need to include libs with the .user file?
14:48:00 <nielsm> if you use vcpkg then no
14:48:22 <Wolf01> Mmmh, I think I did it on Openttd/master, but not on nrt
15:00:13 <nielsm> okay I can't make exceeding memory budget a hard error, have to allow overdraft and then check status when not executing the vm
15:01:17 <Wolf01> Nope, doesn't work, missing libz, libpng, lzo, ft2build etc
15:02:04 <Wolf01> Can't understand why OTTD master works fine, maybe that's why I gave up with nrt
15:07:12 <Wolf01> x64 works... no win32 libs on vcpgk?
15:23:17 <andythenorth> I need to refactor Hog code a bit for NRT
15:23:38 <andythenorth> otoh, something inside me is pushing on 2 vertebrae, and causing referred pain
15:23:50 <andythenorth> so I'm not very motivated to refactor python :P
15:29:52 <nielsm> this script code is convoluted
15:33:25 <Wolf01> Mr. thenorth, which are the latest versions for nrt newgrfs? Every topic is about a year old
15:43:08 <andythenorth> Wolf01: you just have to dig around in forums :)
15:44:06 *** Progman has joined #openttd
15:44:09 *** lagertonne has joined #openttd
15:44:41 <nielsm> it's kind of troublesome to debug regression failures on windows
15:45:10 <nielsm> it's hard to attach a debugger to the regression run and you don't even get the actual output text dumped anywhere
15:45:22 <Wolf01> andythenorth: why not a curated list of newgrfs for nrt? :P
15:51:29 <nielsm> oh, the regressions passed now
15:51:48 <nielsm> I think a default memory limit of 128 mb for scripts is going to make samu sad :P
15:52:10 <nielsm> but I'm not sure what a sane default would be
15:55:55 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjOPd
15:56:37 <Eddi|zuHause> surely 640k ought to be enough for anyone
15:57:20 <LordAro> nielsm: lower than the point at which the GC falls over :p
15:57:23 <nielsm> 640k is barely enough for a script to boot up :P
15:57:29 <LordAro> should probably scale by map size, tbh
15:58:03 <LordAro> perhaps could aleo try GCing before hard killing the script?
15:58:54 <nielsm> also I think 32 bit builds (sizeof(void*) less than 8) a hard limit of 128 MB would be a good idea since you're already oversubscribing address space with 8 AIs then
15:58:56 <frosch123> how does it scale by map size? by edge length, by area, exponential?
16:00:18 <nielsm> should probably scale by area
16:00:19 <frosch123> scaling by map size is weird
16:00:35 *** ciet[m] has joined #openttd
16:00:38 <Artea> game should have a "crash report"
16:00:40 <Eddi|zuHause> scale by allowed vehicle limits?
16:00:44 <Artea> with the interniares of them
16:00:47 <frosch123> why would you restrict ais to les memory just because you are playing on a smaller map
16:01:04 <frosch123> wouldn't you always adjust the setting to your system?
16:01:20 <nielsm> Artea you mean like the crash report being produced when the game crashes?
16:01:24 <Eddi|zuHause> nobody(*) will ever adjust the setting
16:01:29 <nielsm> there _is_ a crash report and it works for everyone else
16:01:29 <Artea> so we can check the routes of crashed airplanes / trains
16:01:40 <Artea> I mean ingame crash report
16:01:58 <nielsm> okay so more like disaster report
16:02:04 <Eddi|zuHause> Artea: maybe you should announce a topic change :p
16:03:26 <Artea> I'm not in good place right now
16:03:38 <Artea> trying just to clear my mind
16:03:53 <DorpsGek_II> [OpenTTD/OpenTTD] bennyman123abc updated pull request #7521: Fix: Stop Construction Windows Closing on Company Rename (Issue #7479) https://git.io/fjYAS
16:05:52 <Artea> Property Maintenance should be called Company Maintenance
16:06:08 <nielsm> that's much more misleading
16:06:44 <nielsm> why do you think "property" is the wrong word?
16:06:52 <DorpsGek_II> [OpenTTD/OpenTTD] bennyman123abc commented on pull request #7521: Fix: Stop Construction Windows Closing on Company Rename (Issue #7479) https://git.io/fjOXv
16:06:58 <nielsm> it's costs for maintaining the fixed assets you own
16:07:02 <Artea> well, I though was for HQ Property
16:08:38 <nielsm> why would "company" make it any more clear that it covers maintenance for track, stations etc.?
16:08:41 <Artea> don't know, more clarify what it is ?
16:09:02 <Artea> well, is apart of company
16:09:13 <nielsm> yes, it's the company's fixed properties
16:09:30 <nielsm> property = "the land you own and the constructions on that land"
16:09:40 *** Gustavo6046 has joined #openttd
16:10:12 <Artea> so it counts everything ?
16:10:39 <nielsm> "company maintenance" sounds like expenses for running your administration (i.e. wages for administrative staff not involved in the actual transportation business itself)
16:10:50 <Artea> I really need to RTM OTTD
16:13:49 <nielsm> to see the infrastructure breakdown, which is the property maintenance cost
16:14:40 <Artea> good thing I have Infrastuture_maintenance off
16:15:53 <Artea> seems having player joined the my server
16:15:58 <Artea> made me a little happier
16:19:37 <nielsm> lol @ borkai spending so much time scanning the map and collecting data it goes over its memory budget before it even builds anything
16:26:36 * andythenorth took painkillers, and is coding
16:27:32 *** Thedarkb-T60 has joined #openttd
16:28:14 <Artea> I'm put Windows 7 into USB Pen
16:28:18 *** Gustavo6056 has joined #openttd
16:29:44 *** Gustavo6056 is now known as Gustavo6046
16:32:22 <andythenorth> dunno if I should subclass in python for trams
16:33:22 <andythenorth> Horse it's all a bit of a mess, engine type vs track type vs power type
16:34:16 <andythenorth> maybe I just replicate that mess in Hog :P
16:35:46 <andythenorth> are trams a thing, conceptually, or not?
16:37:20 * andythenorth makes it more specific
16:37:30 <andythenorth> is ElectricRoadVehicle subclassed into ElectricRoadVehicle and ElectricTram?
16:38:07 <andythenorth> or should I leave it as is, ElectricRoadVehicle with tram flag and tram_type set
16:38:20 <andythenorth> "Class ElectricRoadVehicle(ElectricRoadVehicle):" looks frigging odd
16:42:39 *** chomwitt has joined #openttd
16:43:27 *** Thedarkb1-T60 has joined #openttd
16:50:21 <andythenorth> Class ElectricRoadVehicle(ElectricRoadVehicleBase) might look ok?
16:50:21 <peter1138> Artea, get an SSD tho ;)
16:51:53 <Artea> it is installed in same place as HDD ?
16:52:13 <peter1138> Yeah, as long as your laptop is not so old that it uses PATA/IDE drives.
16:52:37 <andythenorth> "Class ElectricTram(ElectricRoadVehicleBase):"
16:52:52 <peter1138> I did remove ELRD and RAIL from NRT.
16:53:09 <andythenorth> nothing broke in Hog yet :P
16:53:10 <peter1138> You can add them yourself, of course.
16:53:18 <andythenorth> I just used them because they were there
16:53:26 <peter1138> But in the interests of not-adding-content, I didn't add content.
16:53:53 <andythenorth> what's your opinion this afternoon on hard splitting road / tram?
16:54:05 <peter1138> That's plenty new enough.
16:54:21 <peter1138> andythenorth, I'm happy with it as is.
16:54:25 <andythenorth> not going to change your mind? :)
16:54:32 <andythenorth> I am fine either way
16:54:43 <peter1138> road/tram *types* are already split with regards to feature.
16:54:45 <andythenorth> just about to refactor a bunch of Hog so it makes sense
16:55:03 <peter1138> road/tram vehicles are not, but splitting them would involve having to fix up existing tram newgrfs.
16:55:16 <andythenorth> if English had a plausible word for the superclass of 'road vehicles + trams'
16:55:24 <andythenorth> that would solve 99% of my confusion :P
16:55:39 <peter1138> OpenTTD calls them "ground vehicles"
16:56:17 <andythenorth> I considered RubberTyredVehicle, but doesn't quite work :P
16:56:37 <peter1138> I had a souvlaki pita for lunch. It's basically chicken + salad and a fluffy pita bread. But it was nice, so that was nice.
16:57:26 <peter1138> Latest NRT needs testing, it has the new-old FOR_ALL_ROADTRAMTYPES()
16:57:31 <andythenorth> GroundSaladVehicle
16:57:33 *** Wormnest has joined #openttd
16:57:35 <peter1138> Where "ALL" means "BOTH" I guess :p
16:58:17 <peter1138> ChickenSaladVehicle.
16:58:46 <andythenorth> ElectricFeldbahn
16:59:05 <andythenorth> then the label wouldn't need settinig
16:59:13 <andythenorth> inferred from the class
16:59:18 * andythenorth thinking out loud obvs
17:04:01 <andythenorth> haha I already solved this in existing code
17:04:09 <andythenorth> I hedged all bets, and created 'Haulers' :P
17:04:51 <andythenorth> most of my programming these days is reading existing code a lot first
17:04:56 <andythenorth> then going for a walk
17:04:57 <Eddi|zuHause> andythenorth: you have an irrational obsession about labels. like other people have with server names...
17:05:25 <andythenorth> Eddi|zuHause: do you mean labels for things, or labels as 4 chars?
17:05:34 <Eddi|zuHause> labels as 4 chars
17:05:40 <andythenorth> no I don't care about those at all
17:05:48 <andythenorth> if I cared, I wouldn't ask for any help
17:06:00 <andythenorth> currently all the new labels are HAKE, CAKE, BAKE tec
17:06:08 <andythenorth> and they might just stay like that
17:06:18 <peter1138> Maybe I should play with RUKTS
17:06:27 <andythenorth> if $someone would just tell me what labels to use, I would just paste them in
17:06:46 <andythenorth> I do have an irrational obsession with naming of parts
17:07:15 <Eddi|zuHause> whatever labels you set now, you will regret in half a year :p
17:07:30 <andythenorth> that's why I want you to decide
17:07:40 <andythenorth> then I can outsource the regret
17:21:06 <andythenorth> python subclass mixins are bad, right?
17:21:12 <andythenorth> we tried that before and deleted it
17:24:29 <peter1138> 175 files changed, 4772 insertions(+), 1415 deletions(-)
17:29:14 *** gelignite has joined #openttd
17:32:49 * andythenorth tries mixins, removes them again
17:33:07 <andythenorth> complexity of multiple inheritance, vs. adding a flag to 20 subclasses
18:01:49 <andythenorth> it's easy-ish to work on :P
18:05:37 <andythenorth> I am subclassing tram / truck etc inside Hog compile
18:05:48 <andythenorth> couldn't be having all the confusion about RoadVehicle
18:06:03 <andythenorth> I don't have to see the nml, so I don't care what that does :)
18:07:06 <DorpsGek_II> [OpenTTD/OpenTTD] Gymnasiast opened issue #7530: Crash in kdtree.hpp when removing track in development version https://git.io/fjO1b
18:13:51 * peter1138 gives up on that idea.
18:13:55 <peter1138> No, no way to split this up.
18:19:08 <Lun> Hello, could you please tell me how to set up the automatical changing of old vehicles?
18:21:03 <peter1138> (You might need to show advanced settings, or something)
18:22:06 <Artea> got disconnected from my server
18:23:27 <andythenorth> peter1138: if they weren't specifically called RoadVehicle or VEH_ROAD or whatever, we'd all just move on
18:23:32 <andythenorth> and stop picking at it :D
18:24:35 <Lun> Is there any setting in the main menu for this function?
18:25:09 <peter1138> It's in the settings window? o_O
18:25:52 <Lun> I have to find it in Czech :)
18:27:07 <Eddi|zuHause> does the settings filter work on the internal names as well?
18:29:00 <Lun> Got it!!! Thank you very much Artea!
18:34:27 <pete1> Hi, did you dropped the generic linux builds?
18:35:25 <pete1> Oh, finally or just for now?
18:35:27 <nielsm> previous answer to same question
18:35:50 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7531: Fix e8d397e: Invisible station/waypoint signs could still be clicked on. https://git.io/fjOML
18:38:01 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7531: Fix e8d397e: Invisible station/waypoint signs could still be clicked on. https://git.io/fjOMt
18:40:41 <peter1138> I should stop reading the forums... that was reported only in JGR's thread o_O
18:42:03 <peter1138> Ginger Beer Stout is quite interesting.
18:42:17 *** gelignite has joined #openttd
18:43:56 <peter1138> Minecraft 1.14 will be out in a few days.
18:44:57 <andythenorth> for tea...cod with tomato and thyme?
18:45:49 <andythenorth> oof Hog introduces pax trams on silly intervals :(
18:45:49 <andythenorth> my automatic date stuff won't work with this :P
18:46:20 <peter1138> Have you tried just... setting some things manually? :p
18:46:50 <andythenorth> that's what I'm replacing :)
18:47:18 <peter1138> Things that should be automatic: Sprite offsets.
18:47:24 <andythenorth> because it's net less stupid than what I'm currently doing
18:47:30 <andythenorth> currently I set some stuff manually
18:47:31 <peter1138> Things that shouldn't: vehicle properties
18:47:38 <andythenorth> then some stuff automatically
18:47:51 <andythenorth> and lots of book-keeping to stop them getting out of sync :P
18:47:57 <andythenorth> currently I am definitely Doing It Wrong
18:49:56 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7531: Fix e8d397e: Invisible station/waypoint signs could still be clicked on. https://git.io/fjOML
18:51:15 <peter1138> andythenorth, what do I need to add to NRT?
18:51:54 <DorpsGek_II> [OpenTTD/OpenTTD] James103 commented on pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjOMl
18:52:36 <peter1138> ^ Fairly useless comment.
18:52:36 <andythenorth> dunno, I'm making Hog to test it
18:52:36 <andythenorth> can it go in a nightly yet?
18:52:36 <andythenorth> let players loose on it?
18:53:18 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjOM4
18:53:22 <andythenorth> what's a default anyway? :P
18:53:35 <peter1138> andythenorth, well..
18:53:38 <andythenorth> do I need more RAM?
18:53:48 <peter1138> I guess I should squash all the bugfixes again./
18:53:49 <andythenorth> so I can run 16 AIs?
18:53:55 <peter1138> And then see if there's more I can split.
18:53:55 * andythenorth should stop being a twat and go back to Hog
18:54:02 <peter1138> Someone needs to review it ;P
18:54:32 <nielsm> I'm probably changing the default to 1 GB but hard limiting it to 128 MB on 32 bit builds
18:55:02 <nielsm> because 16 scripts (15 AI + one GS) * 128 MB makes for 2 GB
18:55:13 <nielsm> and on 32 bit windows you only have 2 GB of address space
18:55:28 <nielsm> (well maybe 3 GB but don't count on that)
18:55:58 <peter1138> I'm not sure hard limits are a good idea.
18:56:14 <peter1138> Can a 32 bit build make use of PAE?
18:56:28 <peter1138> Can't remember if that's kernel-level only. Probably is.
18:56:41 <nielsm> uh well I guess technically you could now we have a context switched allocator for squirrel
18:57:07 <peter1138> Right, but say you wanted to run 2 AIs that need 256MB.
18:57:16 <peter1138> You can't because there's an arbitrary 128MB limit.
18:58:20 <nielsm> or maybe do some evillery checking the total memory use of all scripts and if it hits some other limit then start OoM killing the scripts
19:04:47 <andythenorth> there comes a time
19:07:06 <peter1138> Does it still build?
19:08:58 <andythenorth> there's no way to update a checked out PR, right?
19:09:05 <andythenorth> I have to branch -D and go again?
19:10:37 <andythenorth> so does it build?
19:12:19 <nielsm> hmm nah using AWE to support more memory for AIs on 32 bit windows is probably not worth the effort
19:12:46 <nielsm> it would fall square under "stupid programmer tricks"
19:12:59 <peter1138> No point when 64 bit exists.
19:13:05 <peter1138> andythenorth, you updated that quickly!
19:13:43 <nielsm> unless for some reason you're running windows server 2003 (or xp sp1) on some ancient CPU but still have more than 4 GB RAM installed
19:14:15 <peter1138> Are people even using 32 bit builds?
19:14:19 <nielsm> since as far as I can tell the pages involved in AWE must be locked in physical memory
19:14:21 <peter1138> I shouldn't ask that should I?
19:15:12 <andythenorth> compiling OpenTTD is faster than compiling a grf :P
19:15:12 <andythenorth> but now you've updated again L:P
19:15:12 <andythenorth> delete them and find out
19:15:12 <andythenorth> we've found some linux users who don't use the packaged openttd
19:15:36 <peter1138> Is it tea/dinner time yet?
19:16:26 <nielsm> (during one period I did run XP SP1 on a system with 4 or 6 GB RAM, intentionally did not upgrade to SP2 since that would take away my ability to use more than 2.9 GB memory or there about)
19:16:51 <nielsm> (until vista was released then I switched to 64 bit)
19:21:17 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjYfW
19:35:41 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjYfW
19:38:04 * peter1138 git pr 7516 upstream
19:42:23 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjYfW
19:42:54 <nielsm> look ma' I used a selection/stack/planeswitcher widget!
19:43:01 <nielsm> (why is it called three things)
19:45:14 <peter1138> Memory usage seems fairly moderate... for now.
19:47:05 <nielsm> some AIs' usage depends heavily on map size (or maybe rather town+industry count) it seems
19:48:46 <Samu> doesn't look like memory limit is the problem
19:48:47 <peter1138> And then it went bankrupt. Hah.
19:48:59 <Samu> have u found out the cause of the crash?
19:49:56 <nielsm> it's probably related to the data structures the script uses, too heavily nested or something
19:50:20 <nielsm> if it crashes in the GC with a broken stack
19:51:17 <nielsm> but memory limiting AIs and killing them if they use too much may be sufficient symptom treatment
19:51:22 <peter1138> I suspect it's k-d tree related, to be honest.
19:51:37 <peter1138> As that is one elusive crash.
19:51:48 <Samu> nah, it's happened way before
19:53:35 <Samu> doesn't pathfinders use nested ..data
19:58:47 <Samu> what about my AI, how's it doing about memory?
20:00:31 <Samu> have you tried the max value for min distance for road routes, with custom pathfinder profile?
20:00:50 <Samu> longer routes, more nodes to check
20:06:28 <Samu> omg, PathZilla beat SimpleAI in a race for £10M
20:06:39 <peter1138> "Maximum memory allocation exceeded"
20:07:27 <peter1138> nielsm, is the AI now terminated?
20:07:38 <peter1138> I guess not, still shows 1GB usage.
20:10:44 <Samu> CivilAI beats SnakeAI, it was close
20:10:57 *** supermop_Home has joined #openttd
20:20:40 <nielsm> peter1138: if you got the error popup with AI debug window etc then it is terminated
20:21:10 <nielsm> the AI stays zombified (always has) with the last known memory usage shown in framerate window
20:21:20 <nielsm> so you can kill the company or reload the ai
20:21:35 <peter1138> perhaps the framerate GUI should show zombified state?
20:39:41 <nielsm> the total exe file size for each of these demos is at most 64 kb, and they may not use external data files
20:40:53 <nielsm> demo = demonstration of your own skills
20:43:35 <LordAro> Samu misses the point, surprising no one
20:44:04 <nielsm> the 64 kb includes graphics, sound, and the code to bind it together
20:44:53 <nielsm> the code alone to play back music can easily exceed 64 kb if it's not designed and special purposed for making size restricted demos/intros
20:45:44 <Samu> reminds me of those old .com files that were shipped in hacked games
20:46:02 <nielsm> funny you should say that because that's where they descend from
20:46:05 <Samu> funky tune with weird visuals
20:46:37 <nielsm> this category on display right now is called intro because it descends from crack intros
20:49:17 <Samu> video doesn't play for me anymore
21:04:32 *** andythenorth has joined #openttd
21:08:51 <andythenorth> there was a power cut
21:09:03 <andythenorth> big bang, and the power was gone
21:16:03 <andythenorth> I am in the countryside
21:16:25 <andythenorth> something tripped at the nearest HV substation
21:17:48 <andythenorth> I think a fused destructively failed
21:17:55 <andythenorth> but I can't find a YT video of that :P
21:33:20 *** gelignite2nd has joined #openttd
21:33:42 *** gelignite2nd has joined #openttd
21:39:55 <andythenorth> so I've split classes, e.g. DumpTruck and DumpTram
21:40:14 <andythenorth> is feldbahn DumpTram, with the label set?
21:40:19 <andythenorth> or is it DumpFeldbahn?
21:41:59 <andythenorth> peter1138: how's RUKTS? o_O
21:50:22 <peter1138> Dunno, playing Doom (2016)
21:52:02 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjOyd
21:52:27 <Artea> 1,9 GB of Windows Update ;)
21:52:30 <andythenorth> I have original Doom
21:54:09 <nielsm> hmm I wonder if I can make sqmem.cpp be just two line adds instead of a full replacement, but the existing code has tabs in bad places and those may get caught
21:54:37 <nielsm> or if I should just remove the file and remove the define option to not use the new allocator
22:06:40 * andythenorth played PRBoom (Doom) for a bit
22:11:40 <Artea> andythenorth: watch that
22:11:51 <Artea> is so gore and... brutal!
22:15:26 <milek7> nielsm: does openttd on 32bit windows use /LARGEADDRESSAWARE?
22:15:46 <nielsm> I don't know, but it doesn't make much difference
22:15:50 *** Supercheese has joined #openttd
22:16:26 <glx> and it also needs to be enabled at the OS level
22:16:39 <nielsm> yeah that's not much compared to the amount of address space you get on 64 bit
22:17:16 <nielsm> whether you have 2, 3, or 4 GB of address space doesn't make that much difference if you want to run multiple memory hungry AIs
22:28:26 <Samu> BorkAI is the kind of AI that thinks too much, and executes too little
22:30:09 *** andythenorth is now known as Guest679
22:30:10 *** andythenorth has joined #openttd
22:39:01 *** Suprcheese has joined #openttd
22:45:26 *** Suprcheese is now known as Supercheese
22:47:38 * andythenorth does stupid multiple inheritance mixins again :P
22:51:16 * andythenorth rely doesn't trust multiple inheritance :P
23:03:45 <andythenorth> did you win Doom?
23:04:41 <peter1138> I... finished a level.
23:06:23 <peter1138> I think I broke something.
23:06:33 <peter1138> Or maybe not. I'm not sure.
23:11:48 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7516: Memory measurement and limits for Squirrel https://git.io/fjYfW
23:13:33 <peter1138> Ah, I filtered the scenario editor so that only town-built roads could be placed. Probably wrong.
23:15:06 <peter1138> Why can you place tram track but not rail track?
23:17:16 <LordAro> tram track can be owned by towns?
23:17:33 <LordAro> so who owns scenario editor built tram track?
23:18:08 <LordAro> i might suggest that's a bug
23:21:41 <peter1138> If a company goes bankrupt, its tram track (and roads) become owned by noone.
23:22:09 * andythenorth considers JFDI as a roadtype label
23:26:50 *** Wormnest has joined #openttd
23:27:58 <peter1138> Hmm, I thought company-owned stuff was wiped when you loaded a save into the scenario editor. Apparently not.
23:31:53 *** Smedles_ has joined #openttd
23:38:00 <peter1138> It's not 2.30am yet/
23:38:58 <Artea> while installing Windows updates
23:39:15 <andythenorth> oh I broke coop jenkins with Hog 2
23:39:25 *** andythenorth has left #openttd
continue to next day ⏵