IRC logs for #openttd on OFTC at 2020-06-03
⏴ go to previous day
00:00:30 <andythenorth> can I do 'return expression_a() + expression_b()' ?
00:00:37 <andythenorth> nml thinks not, asserts
00:00:52 <andythenorth> but I can do 'return LOAD_TEMP(1)'
00:02:28 <andythenorth> I can work around it with STORE_TEMP
00:02:47 <glx> in theory return <expression>; should work
00:04:31 <glx> basically I think it's just a chain to another varact2 returning computed result of <expression>
00:12:19 <glx> but switch parameters are not allowed in ranges, maybe they should
00:13:26 <FLHerne> Only if they're constant, presumably...
01:08:27 *** Gadg8eer has joined #openttd
01:11:12 <Gadg8eer> When is Yexo online, and in which time zone?
01:11:32 <Gadg8eer> Actually, hold on...
01:12:18 <Gadg8eer> Yexo-: I need some help coding bridges in m4nfo.
01:13:06 <Gadg8eer> (Sorry, I'm still new to IRC.
02:05:22 <supermop_Home> well the curfew is 8 tonight instead of 11
02:39:10 <supermop_Home> more helicopters today too
02:39:39 *** mindlesstux6662 has quit IRC
02:55:55 *** mindlesstux6662 has joined #openttd
02:56:31 <Eddi|zuHause> if i wanted to write a postapocalpytic movie, i would start with a desease going around, violence breaking out, and a police state forming with massive travel restrictions and being on the street at night is illegal
02:58:08 <Eddi|zuHause> with a president so narcissistic that the world could be burning around him, and he doesn't care, as long as all the cameras are directed to him.
03:32:00 *** blathijs has joined #openttd
04:11:44 <supermop_Home> Eddi|zuHause we already had the police state here for some time - just sometimes its easier to pretend it's not there
04:13:17 <supermop_Home> but municipal governments control over their police forces has been steadily eroding for years, and those police departments increasingly drive policy themselves
04:18:43 <supermop_Home> now the actual military on the streets is a bit rarer
04:18:59 <supermop_Home> and we don't quite have that in new York yet
04:50:42 <Eddi|zuHause> i've seen this news bit where it was talked about how most sherrif elections run unopposed, even if the sherrif in question has highly questionable ethics
04:53:21 <Eddi|zuHause> (as far as i have understood, in america, elected sherrifs are a mostly a thing in rural areas, whereas appointed police forces are a thing in cities)
04:54:03 <Eddi|zuHause> (this is vastly different from germany, where police is a state matter)
05:23:04 <supermop_Home> police is generally a city thing here, sheriffs exist at the county level
05:24:07 <supermop_Home> and are only typically relevant in areas where a county does not contain a large metropolitan area with it's own police force
05:25:48 <supermop_Home> New York County (island of Manhattan) has a sheriff - but the office is mainly procedural
05:29:25 <supermop_Home> We also have state police - but they are not typically involved with day to day law enforcement beyond highway patrol
05:30:39 <supermop_Home> one of our biggest problems here Eddi|zuHause is that in most highly urban cities, the police officers are often not residents of the city or even the county in which they serve
05:32:00 <supermop_Home> In New York many do live in the city, but in areas of Queens or staten Island that resemble a separate town
05:32:56 <Eddi|zuHause> we have a thing here where for big events like, say, a football match, the police forces involved are deliberately shipped in from out-of-state
05:39:42 <supermop_Home> excessive force in response to protest are one problem, but the institutionalized disproportionate use of force in regular day-to-day policing that the protest are in response to, can't be readily fixed by non-local officers
06:13:19 <supermop_Home> i guess i'll try to go to bed
07:15:48 *** Speeder has joined #openttd
07:36:47 *** andythenorth has joined #openttd
07:58:40 <andythenorth> there's one odd bug
07:58:49 <andythenorth> but otherwise it replicates most of var 41
08:12:05 *** sla_ro|master has joined #openttd
08:46:25 <andythenorth> my silly var 41 thing now works
08:46:33 <andythenorth> just need to extend it to multiple IDs
08:46:40 <andythenorth> maybe each vehicle can have a procedure for that
08:47:00 * andythenorth wonders what the limit on procedures is :P
09:10:25 <andythenorth> oof I might have an actual case for prop 25
10:46:25 *** arikover has joined #openttd
11:10:50 <andythenorth> all of that, the net result is you can build powered or unpowered railcars
11:11:01 <andythenorth> and have the sprites combine to make nice looking railcar trains
11:11:22 <andythenorth> gameplay effect: unpowered railcars are 50% cheaper
11:11:40 <andythenorth> definitely massively over-engineered; so fun :)
11:35:47 *** WormnestAndroid has quit IRC
11:35:59 *** WormnestAndroid has joined #openttd
11:48:16 *** WormnestAndroid has quit IRC
11:48:33 *** WormnestAndroid has joined #openttd
13:05:23 <andythenorth> supermop_Home yo :)
13:06:35 <andythenorth> railcar madness continues
13:39:22 *** virtualrandomnumber has joined #openttd
14:20:16 *** Xaroth0 has joined #openttd
14:20:33 *** Xaroth0 is now known as Xaroth
14:22:03 *** virtualrandomnumber has quit IRC
14:51:14 <supermop_Home> hi andythenorth
14:51:34 <supermop_Home> have to restart my computer
14:54:29 *** supermop_Home has joined #openttd
14:59:19 *** virtualrandomnumber has joined #openttd
14:59:54 <andythenorth> supermop_Home railcar trailers, which work seamlessly with the railcars sprite magic :P
15:00:06 <andythenorth> totally pointless but eh
15:03:31 <supermop_Home> just what I wished for
15:11:58 <andythenorth> grf any use to you?
15:12:16 <supermop_Home> i mean it won't fix my city
15:15:21 <andythenorth> supermop_Home pm sent
15:19:19 <andythenorth> I don't know if it's the most stupid feature in Horse
15:19:42 <supermop_Home> i mean it's not a snowplow
15:19:45 <andythenorth> using the electric railcars as driving cabs is probably worse
15:45:41 <supermop_Home> i use the 4rep whatever trick sometimes
15:46:02 <supermop_Home> emus plus loco for OP train
15:46:16 <andythenorth> these new trailers are capped at the lower speed
15:46:21 <andythenorth> I could add express trailers also
15:46:23 <supermop_Home> in this game for a large town on top of a mountain
15:49:18 <FLHerne> andythenorth: Diesel railcars as driving cabs is a thing
15:50:56 <andythenorth> I can't remember why I didn't enable them for that in Horse, I think it's just a whim
15:54:05 <FLHerne> Hm, now I can't find the page
15:54:36 <FLHerne> When Amtrak were diverted into Grand Central a few years ago, they couldn't have the driver in the locomotive
15:54:48 <FLHerne> Because no end doors, and narrow tunnels
15:55:24 <FLHerne> So they attached a DMU car to the front of the locomotive before entering the tunnel, and drove from that
15:56:38 <FLHerne> (because unlike here, US railroad equipment is actually intercompatible :-/)
15:57:29 <FLHerne> EMU<->loco inter-working was a thing here too, of course
15:57:46 <FLHerne> 73/1s could work in multiple with most 3rd-rail EMUs
16:03:50 <Eddi|zuHause> <FLHerne> (because unlike here, US railroad equipment is actually intercompatible :-/) <-- maybe that's a side effect of being 30 years behind in technology? :p
16:05:39 <andythenorth> that and AAR interchange standards
16:06:02 <andythenorth> and not being state nationalised systems
16:06:46 <andythenorth> there is a really nice article from a senior engineer at GMD / EMD when diesels were being prototyped and scaled up
16:07:11 <andythenorth> he talks about offering a standard product, and then every railroad insisting on customisations which required expensive redesign
16:07:49 <andythenorth> it's extremely similar to software 'products' that become distorted into consulting-ware
16:10:20 <Eddi|zuHause> i've recently seen a thing about the northeast corridor, and a train running from washington to boston, that switched engines in new york for the sole reason of the lines being operated by different companies and everything being cross-compatible
16:22:25 <supermop_Home> Eddi|zuHause must have been awhile ago
16:22:33 <supermop_Home> in the Penn RR era?
16:23:01 <Eddi|zuHause> yeah, i think in the 1950s?
16:23:22 <Eddi|zuHause> it was about this accident where the train overshot the platform in washington
16:23:55 <supermop_Home> also back then idk if the NEC was electrified all the way to boston
16:24:33 <supermop_Home> would have been a penn GG1 from Union Station to Penn Station
16:25:09 <Eddi|zuHause> i think they mentioned the full electrification wasn't completed until the 1990s or something?
16:26:12 <Eddi|zuHause> and they mentioned they did away with the unnecessary engine switching after nationalising, and ran GG1s all the way through
16:26:35 <Eddi|zuHause> which would have been the 70s?
16:27:02 <supermop_Home> Amtrak kept the GG1s in the 70s
16:27:44 <supermop_Home> FLHerne Grand central doesn't have caternary either
16:28:04 <supermop_Home> has bottom-contact 3rd rail
16:28:28 <supermop_Home> metro north trains switch to overhead up in Westchester county
16:42:18 *** Wormnest has joined #openttd
16:47:58 <andythenorth> 'suppose da vinci was wrong?'
16:51:31 <Eddi|zuHause> given that scientific information has a half-life, you can assume that by what we know now, da vinci was wrong on most things
16:55:43 <Eddi|zuHause> this was one of the most important innovations of the renaissance era, starting to question the "knowledge" passed down by figures of authority (e.g. Aristoteles, who we know now was wrong on pretty much everything he ever said)
16:56:00 <supermop_Home> nah that big helix helicopter thing is still gonna fly some day
17:05:33 <andythenorth> I did a philosophy module in university, with a lecturer who was interested in demonstrating that some Aristotelian physics was actually valid
17:05:40 <andythenorth> can't remember more than that :P
17:05:53 <andythenorth> all I know these days are ISO 27002 controls, and facts about trains
17:08:57 <LordAro> andythenorth: which is your favourite?
17:36:06 *** virtualrandomnumber has quit IRC
17:55:31 *** sla_ro|master has joined #openttd
17:57:46 <arikover> andythenorth: "I did a philosophy module in university, with a lecturer who was interested in demonstrating that some Aristotelian physics was actually valid": Here, it is said that Aristotle approximations were pretty good for his time https://arxiv.org/pdf/1312.4057.pdf
18:00:32 <andythenorth> I think it was the module on Kuhn and Scientific Revolutions
18:22:15 <FLHerne> Empirical reality isn't a social construct
18:24:21 <FLHerne> To be fair, I think relativists have gone a lot further than Kuhn himself did
18:24:46 <supermop_Home> getting people to actually accept empirical reality does seem to be a bit of a social contruct though
18:26:21 <andythenorth> but we have alternative facts
18:29:45 <supermop_Home> hopefully can go out for a bit before thunderstorms start
18:51:06 *** frosch123 has joined #openttd
19:19:16 <nielsm> so when are we merging cmake?
19:26:29 <andythenorth> it has a few interesting quirks
19:27:26 <andythenorth> it reads var 61 for each vehicle 16 times, for every vehicle in the consist, each time one of the procedures is called
19:29:31 <andythenorth> in total the procedures are called minimum 6 times in the graphics per vehicle that uses this feature, maximum 7
19:29:52 *** supermop_Home_ has joined #openttd
19:31:20 <andythenorth> so every action 3 paint, a single vehicle will read var 61 976 times, but 915 of those will exceed the consist length and return 0
19:31:47 <andythenorth> a 2 vehicle consist will read var 61 3904 times
19:32:26 <andythenorth> a 4 vehicle consist will read var 61 15616 times
19:33:21 <andythenorth> but 12688 of those will exceed the consist length and return 0
19:33:26 <andythenorth> this is probably fine?
19:33:59 <andythenorth> are procedure results cached?
19:35:03 *** Gustavo6046 has joined #openttd
19:35:12 <andythenorth> hmm my maths is wrong anyway, I don't limit at 16
19:35:18 <andythenorth> it's 127 forwards, 127 backwards
19:37:15 <andythenorth> yeah I think it's reading var 61 28448 per single vehicle
19:38:31 <andythenorth> so a 4 vehicle consist reads var 61 455,168 times
19:38:38 <andythenorth> fortunately openttd is really efficient :)
19:41:12 <andythenorth> I could optimise it in several ways
19:43:15 <andythenorth> I could store the results of some procedures earlier in the chain
19:43:18 <andythenorth> so they're only called once
19:44:48 <andythenorth> that would reduce var 61 reads to 4,064
19:45:17 <andythenorth> and I could stop trying to read it when I've exceeded the consist length
19:46:06 <andythenorth> and I could figure out why nml why STORE_TEMP won't accept the result of a var 61 expression
19:47:00 <andythenorth> fixing all of that would cut the var 61 reads down to 2 for a single vehicle
19:47:15 <andythenorth> 28448 -> 2, worthwhile reduction?
19:53:45 <FLHerne> The fact that you need to ask is worrisome :p
19:53:57 <andythenorth> might be premature optimisation
19:54:08 <andythenorth> I've seen both sides of the argument in this channel
19:54:24 <andythenorth> - these things are fast, keep the newgrf code simpler
19:54:35 <andythenorth> - these things are slow, optimise the newgrf for openttd perf
19:54:54 <andythenorth> and it's never conclusive, because we don't really know what affects perf :)
19:56:01 <andythenorth> unrelated, I can definitely crash nml with 'return [procedure_a() + procedure_b()]'
19:56:08 <andythenorth> but 'return LOAD_TEMP(2)' is fine
20:03:58 <FLHerne> What's with the square brackets?
20:08:04 <andythenorth> is that not required to make an expression?
20:08:10 * andythenorth can't really nml
20:08:26 <andythenorth> I just add and remove chars until it works
20:20:27 <FLHerne> No, I'm surprised it even parses
20:23:09 <andythenorth> I should read the docs about what's valid for a return and what isn't
20:24:34 <supermop_Home_> route chartering GS?
20:25:32 <andythenorth> return 1 + switch_alt_var_41_position_in_vehid_chain_multiple_ids() + switch_alt_var_41_position_in_vehid_chain_from_end_multiple_ids();
20:26:00 <Eddi|zuHause> i think [] is a list of expressions?
20:26:34 <andythenorth> that's spurious, it fails with or without
20:26:40 <FLHerne> andythenorth: Yes, but the [] mean you're returning an array (with 1 element), which doesn't seem sane
20:26:52 <andythenorth> I tried it with and without
20:27:11 <andythenorth> adding [] is my usual solution to "this expression won't render", instead of reading the docs :P
20:27:25 <FLHerne> Is this with glx's new switch parameters, or current nml?
20:27:40 <andythenorth> nmlc --version 2020-04-20-g9fdd4bbc
20:28:06 <andythenorth> I didn't try parameters for the procedures yet
20:28:34 <Eddi|zuHause> FLHerne: [] might be weirdly overloaded, so the parser can't throw it out at that point?
20:30:08 <nielsm> NML syntax is peculiar and loves lots of []
20:31:26 <nielsm> idea for a better NML: throw out the custom language and switch to lua, the core mechanism is that there are a bunch of expected declarations at global level
20:31:46 <nielsm> and the runtime provides a bunch of functions and stuff to help produce the correct structure
20:33:25 <FLHerne> If you're doing that, we should just make the Python API decent
20:33:33 <FLHerne> Add some builder functions
20:34:03 <nielsm> I suppose you could do that too...
20:34:15 <FLHerne> (unless I'm missing some fundamental thing about the nature of lua)
20:34:36 <andythenorth> nielsm so do you want to profile my stupid var 61 use? :)
20:35:10 <FLHerne> I already told Andy he should just be calling into nml from his Python script instead of all this templating
20:35:21 <andythenorth> but I like nml so much :)
20:36:16 <andythenorth> FLHerne radical idea, change the templating to output python, then exec() it
20:39:52 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh dismissed a review for pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/Jvjbc
20:40:40 <FLHerne> I hereby revoke your Python privileges for the next year
20:40:44 <andythenorth> you never saw the nfo files with variadic macros? o_O
20:40:48 <andythenorth> wasn't even my idea
20:41:27 <andythenorth> then to migrate FIRS to python, I python templated the variadic macros
20:41:30 <andythenorth> that was a fun time
20:42:03 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh approved pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/JfPbN
20:46:12 *** gelignite has joined #openttd
20:47:26 <FLHerne> Hm, that suggests that spending ages making nmlc marginally faster is probably worthwhile
20:47:33 <FLHerne> It does get run a lot
20:47:34 <andythenorth> that's the more commonly shared version
20:47:57 <andythenorth> it's a nice xkcd, but it doesn't account for broken context
20:48:06 <andythenorth> 10s is short enough to not get distracted
20:48:16 <andythenorth> 5 mins is long enough to get coffee, stretch, have new thoughts
20:48:37 <andythenorth> waiting 60s is just right for getting distracted by a YT video and losing all focus
21:06:55 <glx> nielsm: I think I need to squash some stuff in #7270
21:08:28 <nielsm> glx yeah the PR needs a load of technical fixed to be mergeable
21:09:04 <Wolf01> I was trying to figure out what I missed to do... like starting mIRC
21:10:05 <andythenorth> glx you mean the nml that triggers it, or you want a python traceback?
21:10:21 <glx> python traceback to know where it fails
21:10:46 <andythenorth> can I get that without pdb? :P
21:14:54 <glx> anyway procedure calls in ranges are not properly referenced, I noticed that when trying to add support for parameters in the ranges
21:15:58 <Eddi|zuHause> hm... i tried to start this thimbleweed park mini adventure, and it tells me it's missing directx 12 features?!?
21:27:09 <Eddi|zuHause> seems nobody else managed to get around that error message so far...
21:29:40 <andythenorth> hmm how do I GitHub? :P Usually I test patches by fetching the PR, or adding someone's remote branch
21:30:42 <glx> remote branch should work :)
21:30:46 <Eddi|zuHause> andythenorth: you just add the other person's github as remote, and pull
21:31:24 <Eddi|zuHause> so instead of pulling origin/master you pull glx/whatever
21:32:07 <andythenorth> of course :) thanks :)
21:35:24 <glx> github interface is sometimes confusing
21:47:07 <glx> weird, for some reason the feature seems wrong
21:50:47 <glx> is there an iron horse branch for your current work ?
21:52:27 <andythenorth> I can make one that contains this failing code
21:53:57 <glx> well I have an iron horse clone locally anyway :)
22:02:10 <glx> hehe warnings are important :)
22:02:51 <glx> it's indeed a referencing problem and my fix doesn't solve it
22:04:23 <glx> thanks for the test case :)
22:08:07 <andythenorth> I want to test procedure parameters too
22:08:17 <andythenorth> I have a valid case for them
22:38:29 *** Progman has joined #openttd
23:28:15 *** ChanServ sets mode: +v Terkhen
23:28:15 *** ChanServ sets mode: +o orudge
continue to next day ⏵