--- | Log | opened Wed Jan 05 00:00:15 2022 |
00:47 | -!- | supermop_Home_ [~user@pool-162-83-189-16.nycmny.fios.verizon.net] has quit [Remote host closed the connection] |
02:15 | -!- | sla_ro|master [~sla.ro@93.118.46.75] has joined #openttd |
02:15 | -!- | sla_ro|master is "slamaster" on #sla #openttd |
02:52 | -!- | tokai [~tokai@00012860.user.oftc.net] has joined #openttd |
02:52 | -!- | mode/#openttd [+v tokai] by ChanServ |
02:52 | -!- | tokai is "Christian Rosentreter" on +#openttd |
02:59 | -!- | tokai|noir [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds] |
03:05 | -!- | andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has joined #openttd |
03:05 | -!- | andythenorth is "andythenorth" on #openttd |
03:24 | -!- | felix [felix@bras-base-altoon4123w-grc-02-76-67-70-231.dsl.bell.ca] has quit [Remote host closed the connection] |
03:27 | <@peter1138> | Well |
03:28 | -!- | felix [felix@bras-base-altoon4123w-grc-02-76-67-70-231.dsl.bell.ca] has joined #openttd |
03:28 | -!- | felix is "Felix Kaechele" on #openttd #osm-ca |
04:05 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has quit [Remote host closed the connection] |
04:57 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has quit [Remote host closed the connection] |
04:57 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has joined #openttd |
04:57 | -!- | Gustavo6046 is "Gustavo6046" on @#lock #openttd |
05:20 | <TrueBrain> | "For earlier versions of TTDPatch the variable .." |
05:20 | <TrueBrain> | I love the vague reference :D |
05:27 | <TrueBrain> | hmm ... are temp registers of a procedure local to the procedure, or local to the original varaction? |
05:28 | <TrueBrain> | reading by the text, I assume the first .. |
05:36 | <TrueBrain> | no, there is only 1 _temp_store .. okay |
05:50 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has quit [Ping timeout: 480 seconds] |
05:53 | <TrueBrain> | what makes NML really hard to read for me, is that the keywords provided by NML is a HUGE list .. so often I am confused when reading NML: is this thing locally defined, or defined by NML |
05:53 | <TrueBrain> | some namespacing would really have helped |
05:58 | <@DorpsGek> | [OpenTTD/OpenTTD] J0anJosep opened pull request #9780: Codechange: Make RoadScopeResolver constructor inlineable. https://git.io/JSSI3 |
06:00 | <TrueBrain> | andythenorth: am I right in that "num_supplies_delivered" in FIRS primary industries is currently "write-only"? (as in, it isn't actually used anywhere?) |
06:01 | <TrueBrain> | well, except for the 28th entry (num_supplies_delivered_27) |
06:01 | <TrueBrain> | ah, no, nevermind |
06:01 | <andythenorth> | it should be read somewhere |
06:01 | <andythenorth> | it's shuffled every 256 ticks |
06:01 | <TrueBrain> | yeah, found it .. |
06:02 | <TrueBrain> | NML is not the friendliest to read :P |
06:02 | <TrueBrain> | basically, the boost is calculated based on the last 27 deliveries |
06:03 | <andythenorth> | yes |
06:03 | <TrueBrain> | cool, tnx |
06:05 | <TrueBrain> | I guess that makes boosting a bit more relaxed, you only have to deliver 4 times a year or so |
06:05 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro approved pull request #9780: Codechange: Make RoadScopeResolver constructor inlineable. https://git.io/JSSIg |
06:06 | <TrueBrain> | now approve my backport PR! :P |
06:13 | <TrueBrain> | andythenorth: the tooltip of secondary industries say that you get a boost if you deliver all 3 cargoes (for example), but is this really true? |
06:13 | <andythenorth> | yes |
06:13 | <TrueBrain> | as in, the code reads as if the accepting cargoes are just adding to what is being produced? |
06:13 | <andythenorth> | not in all cases, it's industry specific |
06:13 | <TrueBrain> | ah |
06:13 | <andythenorth> | amounts produced are multiplied by a fraction |
06:13 | <andythenorth> | it might be e.g 2/8 if one cargo delivered |
06:14 | <andythenorth> | 5/8 if 2 cargos delivered |
06:14 | <andythenorth> | 8/8 if all 3 cargos delivered |
06:14 | <andythenorth> | (examples) |
06:14 | <TrueBrain> | ah, I see |
06:14 | <andythenorth> | there's also a split on the output, which is fractional, but that's totally unrelated to the input above |
06:15 | <TrueBrain> | so the current_production_ratio is additive of all inputs |
06:15 | <TrueBrain> | and used as multiplier to the individual |
06:15 | <TrueBrain> | so delivering only wheels to the car-maker is enough to make some cars, just slower :D |
06:16 | <TrueBrain> | rEaLiSm :P |
06:16 | <TrueBrain> | okay, and here too, if you delivered any in the last 3 months, it enables its fraction |
06:16 | <TrueBrain> | gotcha |
06:16 | <TrueBrain> | tnx :) |
06:17 | <TrueBrain> | I love how you seem to be using persistent storage for temporary values :D |
06:17 | <TrueBrain> | but that is fine :) |
06:18 | <TrueBrain> | and I guess closure_counter is never really implemented? |
07:10 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro approved pull request #9779: Backport master into release/12 https://git.io/JSStn |
07:10 | <TrueBrain> | \o/ |
07:10 | <@DorpsGek> | [OpenTTD/OpenTTD] TrueBrain merged pull request #9779: Backport master into release/12 https://git.io/JSVNS |
07:11 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro approved pull request #9772: Fix missing icon https://git.io/JSStC |
07:11 | <LordAro> | you're quick |
07:11 | <TrueBrain> | trying to design a simple RPN-based language .. so I can use the distraction :P |
07:17 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro requested changes for pull request #9726: Fix: Prevents crash when no industries are present https://git.io/JSStz |
07:18 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro approved pull request #9769: Doc: Fix broken links in GitHub docs https://git.io/JSStV |
07:23 | <@DorpsGek> | [OpenTTD/OpenTTD] TrueBrain merged pull request #9769: Doc: Fix broken links in GitHub docs https://git.io/JyOdx |
07:24 | <@DorpsGek> | [OpenTTD/OpenTTD] TrueBrain merged pull request #9772: Fix missing icon https://git.io/Jygdh |
07:24 | <TrueBrain> | abusing admin powers, as rebasing those PRs is stupid |
07:24 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro requested changes for pull request #9770: Fix #9765: Incorrect Company Values https://git.io/JSStS |
07:25 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro merged pull request #9780: Codechange: Make RoadScopeResolver constructor inlineable. https://git.io/JSSI3 |
07:36 | <TrueBrain> | $num_supplies_delivered[27] $num_supplies_delivered[27] %incoming_cargo_waiting[@i] + = |
07:36 | <TrueBrain> | collect all the prefixes? |
07:37 | <LordAro> | are you sure you're not writing perl? |
07:37 | <TrueBrain> | lol |
07:39 | <LordAro> | i think that could actually be valid perl, without the "+ =" on the end |
07:39 | <TrueBrain> | sadly I need some meta-language, as I am not sure NewGRF is turing complete :P |
07:42 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro commented on pull request #9739: Copy server invite code to the clipboard automatically https://git.io/JSSqE |
07:42 | <LordAro> | i'd be surprised if it wasn't |
07:44 | <TrueBrain> | looping is a bit of the issue |
07:44 | <TrueBrain> | you could do tail-recursion, I guess |
07:44 | <@DorpsGek> | [OpenTTD/OpenTTD] pelya commented on pull request #9739: Copy server invite code to the clipboard automatically https://git.io/JSSqa |
07:46 | <TrueBrain> | did anyone check how ^^ looks visually? |
07:46 | <TrueBrain> | code-wise it reads to me that it now has a button with the text "copy to clipboard"? |
07:47 | <TrueBrain> | I would expect something smaller, tbh :) Like a small icon or what-ever ;) But this text might be .. long, for the location it is at :) |
07:47 | <TrueBrain> | I might be wrong, there is no visual in the PR :P |
07:49 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro commented on pull request #9727: Feature #9059: Add buttons to toggle music in the Game Options menu. https://git.io/JSSqi |
07:54 | <@DorpsGek> | [OpenTTD/OpenTTD] LordAro commented on pull request #9642: Feature: Orientation of rail and road depots can be changed https://git.io/JSSqS |
07:55 | <LordAro> | TrueBrain: yeah, ideally a little icon |
07:56 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd |
07:56 | -!- | WormnestAndroid is "WormnestAndroid" on #openttd |
07:57 | <TrueBrain> | https://gist.github.com/TrueBrain/58a388d5e396bba3ae3ec721d3d5fca3 <- something like this is what a FIRS primary industry is, I think .. |
07:57 | <TrueBrain> | writing RPN is hard :P |
07:57 | <TrueBrain> | now the question is, can I actually parse this |
07:57 | <TrueBrain> | need to fix cargo labels for sure :) |
07:59 | <LordAro> | if you're not careful you'll invent nml2.0 :p |
07:59 | <TrueBrain> | I really hope not :P |
08:00 | <TrueBrain> | I am mostly balancing .. am I going to do something that is easy to parse |
08:00 | <TrueBrain> | or easy to write |
08:23 | <TrueBrain> | why is there an "again" in action2 industry cb .. |
08:26 | -!- | D-HUND is now known as debdog |
09:28 | -!- | gelignite [~gelignite@55d4ca9b.access.ecotel.net] has joined #openttd |
09:28 | -!- | gelignite is "gelignite" on #debian #llvm #openttd |
09:40 | -!- | Smedles [~quassel@2403-580d-1--aaa1-59ff-fe53-1a69.ip6.aussiebb.net] has quit [Ping timeout: 480 seconds] |
09:49 | -!- | glx [~glx@000128ec.user.oftc.net] has joined #openttd |
09:49 | -!- | mode/#openttd [+v glx] by ChanServ |
09:49 | -!- | glx is "Loïc GUILLOUX" on +#openttd |
09:57 | <TrueBrain> | adding list support while remaining an RPN is hard :P Right, tons of updates, I think this might actually work :) |
09:59 | -!- | supermop_Home [~user@pool-162-83-189-16.nycmny.fios.verizon.net] has joined #openttd |
09:59 | -!- | supermop_Home is "Guest" on #openttd |
09:59 | <supermop_Home> | yo |
10:03 | <TrueBrain> | found a use-case for "again" .. to cap the stockpile. Which is funny, as there is no need, but knowing how to do it in one go in NML is .. non-trivial :) |
10:03 | <TrueBrain> | @calc 4096 / 3 * 256 / 74 |
10:03 | <@DorpsGek> | TrueBrain: 4723.315315315315 |
10:20 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has joined #openttd |
10:20 | -!- | Gustavo6046 is "Gustavo6046" on @#lock #openttd |
10:30 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has quit [Remote host closed the connection] |
10:35 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has joined #openttd |
10:35 | -!- | Gustavo6046 is "Gustavo6046" on @#lock #openttd |
10:37 | <+glx> | remember "again" is from NFO time |
11:27 | -!- | nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has joined #openttd |
11:27 | -!- | nielsm is "Niels Martin Hansen" on #openttd |
11:36 | -!- | frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd |
11:36 | -!- | frosch123 is "frosch" on #openttd |
11:38 | <frosch123> | TrueBrain: i think andy stored some temporary values in persistent registers for debugging. the in-game inspect window shows persistent registers, so you can use them like printf-debugging |
11:38 | <TrueBrain> | So the comments told me, yes. Still funny :D |
11:39 | <+glx> | and temp registers are valid for current run only |
11:44 | -!- | Wormnest [~Wormnest@35.136.189.95] has joined #openttd |
11:44 | -!- | Wormnest is "Wormnest" on #openttd |
11:49 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has quit [Read error: Connection reset by peer] |
11:50 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd |
11:50 | -!- | WormnestAndroid is "WormnestAndroid" on #openttd |
11:54 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has quit [Read error: Connection reset by peer] |
11:55 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd |
11:55 | -!- | WormnestAndroid is "WormnestAndroid" on #openttd |
11:55 | -!- | jottyfan [~Thunderbi@dynamic-077-013-004-199.77.13.pool.telefonica.de] has joined #openttd |
11:55 | -!- | jottyfan is "jottyfan" on #openttd |
11:55 | -!- | jottyfan [~Thunderbi@dynamic-077-013-004-199.77.13.pool.telefonica.de] has quit [] |
12:01 | -!- | Flygon [~Flygon@2001:44b8:411e:4e00:170:8753:6333:e782] has quit [Quit: A toaster's basically a soldering iron designed to toast bread] |
12:17 | <TrueBrain> | meh; I can compile Javascript to an AST in Rust easily .. but there is too much things you can do in Javascript you really cannot in NewGRF :P |
12:17 | <TrueBrain> | so that would be a frustrating run for developers too |
12:18 | <frosch123> | yeah, not turing complete :) |
12:18 | <TrueBrain> | so I guess I should try to convert my RPN-language to NewGRF .. I think this could work |
12:18 | <TrueBrain> | at least it is more readable than NFO :P |
12:19 | <frosch123> | not sure about that :p |
12:19 | <TrueBrain> | at least you can use variable names instead of numbers ;) |
12:20 | <TrueBrain> | if you have better suggestions, I would love to hear them btw :) |
12:20 | <TrueBrain> | but .. it is tricky :) |
12:21 | <frosch123> | i only used RPN for terms, never for assignments or even function declarations |
12:21 | <frosch123> | so, no idea :) |
12:21 | <TrueBrain> | it is also not really meant for it :P |
12:21 | <TrueBrain> | but I just designed a stack-based language, which RPN is too |
12:21 | <frosch123> | i did not quite understood what your "global" namespace is |
12:21 | <frosch123> | but maybe not important :) |
12:21 | <TrueBrain> | persistent registers |
12:21 | <TrueBrain> | couldn't find a better name |
12:22 | <frosch123> | why are they global? they are part of the industry instance |
12:22 | <TrueBrain> | mostly as I hate writing the word persistent, I have to admit :) |
12:22 | <frosch123> | so i would expect "industry" namespace |
12:22 | <TrueBrain> | I guess |
12:22 | <TrueBrain> | felt equally weird |
12:22 | <frosch123> | &industry::memory 123 [] |
12:23 | <frosch123> | &town::memory 123 [] |
12:23 | <TrueBrain> | also considered calling it "static" |
12:23 | <TrueBrain> | well, "memory".. the idea is that you don't need to know the slot |
12:23 | <TrueBrain> | you just give it a name |
12:23 | <TrueBrain> | and the backend will assign it a slot |
12:23 | <frosch123> | "grf::params 12 []" are readonly though |
12:23 | <TrueBrain> | that is a bit the point .. not have to deal with numbers ;) |
12:24 | <TrueBrain> | so "industry:my_variable_name" |
12:24 | <TrueBrain> | guess "persistent:" would match NewGRF specs more |
12:25 | <frosch123> | "persistent" would be for indexed-access again, like "memory" above |
12:25 | <TrueBrain> | "persistent:my_variable_name" |
12:25 | <TrueBrain> | I don't see what you mean? |
12:25 | <frosch123> | the important part is the scope: industry, town, grf |
12:25 | <TrueBrain> | I can type it just fine :) |
12:25 | <frosch123> | "industry::my_variable_name" is different from "town::my_variable_name" |
12:25 | <TrueBrain> | that is true |
12:25 | <frosch123> | or "grf::my_variable_name" |
12:26 | <TrueBrain> | I see you write too much C++, with all those double : :P |
12:26 | <frosch123> | oh, i did not even notice you used single : |
12:26 | <frosch123> | already corrected that when reading |
12:26 | <TrueBrain> | :D |
12:27 | <frosch123> | there was some other thing that used single :, i hated it... was it xml? |
12:27 | <TrueBrain> | most things I know use a single : for scoping |
12:27 | <TrueBrain> | it is only C++ that was like: NAH, one isn't enough |
12:27 | <TrueBrain> | still no clue why they wanted two |
12:28 | <frosch123> | so it gets a different token than : in ?: |
12:28 | <+glx> | maybe because it's easier when use in ternary operator |
12:28 | <frosch123> | old c++ cared about tokens, then they allowed closing two < < with >> |
12:28 | <TrueBrain> | yeah .. I was about to make similar remarks :P |
12:29 | <TrueBrain> | at least it is not Perl, where you can make choices when parsing it :P |
12:29 | <TrueBrain> | but okay, in this RPN spaces define the tokens, so it becomes a bit easier .. no doubts about any of that stuff :) |
12:30 | <TrueBrain> | hmm, your remark does remind me that "openttd:" is also a bad scope |
12:30 | <TrueBrain> | as it can be industry or town too |
12:31 | <frosch123> | "openttd:" would be for vars 00-39 ? |
12:32 | <TrueBrain> | I didn't actually look at things in that much detail |
12:32 | <TrueBrain> | NML doesn't prefix it at all |
12:32 | <TrueBrain> | which was mostly what was frustrating me :D |
12:32 | <frosch123> | there is a TODO item for nml to add prefixes :) |
12:32 | <TrueBrain> | how many times I was like: this name ... who defines it? FIRS? No .. NML? No .. owh, wait, here in FIRS? No .. owh, here in NML? Ah, yes! |
12:32 | <frosch123> | currently NML has this PARENT/SELF thing in every switch, which makes combining them difficult |
12:33 | <frosch123> | TrueBrain: don't mistake NML with pyNML :p |
12:33 | <TrueBrain> | so I mainly wanted to make that a bit more obvious :) |
12:33 | <TrueBrain> | no, when I write FIRS I mean pyNML :P |
12:33 | <TrueBrain> | ${cargo[0]}: (${cargo[1]} * production_level * LOAD_PERM(${industry.perm_storage.base_prod_factor}) * LOAD_TEMP(9)) / (16 * 16 * 100); |
12:34 | <TrueBrain> | best example of how unclear it becomes |
12:34 | <TrueBrain> | ${} is pyNML, production_level is NML, 9 is FIRS |
12:34 | <TrueBrain> | it is like .. yeah ... lets not do that plz :) |
12:36 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:9c7d:d3d1:771d:1d43] has quit [Quit: Quit] |
12:40 | <TrueBrain> | see, ideal I think https://gist.github.com/TrueBrain/0d8d7183c6eee45e5ac90bfa57777e29 works better |
12:40 | <TrueBrain> | I am just not sure I can parse it :D |
12:41 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd |
12:41 | -!- | Gustavo6046 is "realname" on #llvm #openttd |
12:43 | <TrueBrain> | I wonder how FIRS would look .. lets try |
12:44 | <frosch123> | s/min/max :p |
12:47 | <TrueBrain> | how to differentiate between "industry" variables (so "SELF") and "industry" persistent registers? Suggestions? :) |
12:47 | <frosch123> | industry::storage::your_name ? |
12:48 | <frosch123> | though i guess, if you also need names for temporaries... you would end up with industry:persistent:your_name again :p |
12:52 | <andythenorth> | lol yes the templating breaks my brain |
12:52 | <andythenorth> | I really try to avoid looking at it |
12:53 | <andythenorth> | it's better than the edition which used CPP variadic macros in nfo-but-via-renum |
12:53 | <andythenorth> | that was ..... oof |
12:57 | <TrueBrain> | https://gist.github.com/TrueBrain/0d8d7183c6eee45e5ac90bfa57777e29 <- that is how FIRS would look in Javascript, give or take mistakes |
12:58 | <TrueBrain> | just no clue if that is convertible to GRF .. |
12:58 | <TrueBrain> | I know the RPN can be done, or at least, I know for 90% it can |
12:59 | <TrueBrain> | main issue is that it is part templating, part pass-through ... :D |
13:01 | <TrueBrain> | why btw is there no industry cb without using registers but with telling what cargo ? :) |
13:01 | <TrueBrain> | at least, how I read it, I can either only do the first 3 cargoes |
13:01 | <TrueBrain> | or use the register version |
13:01 | <TrueBrain> | it consumes so much registers :P |
13:03 | <frosch123> | the no-register version is pretty useless |
13:03 | <TrueBrain> | exactly! |
13:03 | <frosch123> | when you deliver 1000 input, and the no-register version consumed 5, you have to call the thing 200 times |
13:03 | <TrueBrain> | well, I guess I can use the "again" to only use 1 register .. |
13:04 | <frosch123> | only 256 times until ottd says "grf broken" |
13:04 | <+glx> | ottd says broken on 16bit overflow |
13:04 | <TrueBrain> | frosch123: I don't get that one, sorry .. 1000 input ? 1000 different cargoes? Or 1000 units of cargo? |
13:05 | <+glx> | https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf_industries.cpp#L614 |
13:05 | <frosch123> | 1000 units of cargo |
13:05 | <frosch123> | delivering 1000 units within 256 ticks is not unreasonable |
13:05 | <TrueBrain> | why does it have to call again if you only consume 5? If you set the "again" flag? |
13:06 | <frosch123> | i don't understand your question. sound like "why is there a division operator, if you can just subtract the same amount until you reach zero" |
13:07 | <+glx> | a delivery can be of any numbers, but the callback has fixed values |
13:07 | <TrueBrain> | and I don't understand what you were trying to say :P |
13:07 | <TrueBrain> | so stale-mate! :) |
13:07 | <TrueBrain> | you say: "you have to call the thing 200 times" |
13:07 | <TrueBrain> | I don't get that part |
13:07 | <TrueBrain> | that is what I was asking :P |
13:07 | <TrueBrain> | a politer way of saying: huh? |
13:07 | <TrueBrain> | :) |
13:08 | <+glx> | because you want to consume the 1000 received items |
13:08 | <frosch123> | i mean: a industry-production callback always has to check the amount of cargo delivered, divide/multiply that number with something, and then return the result as output production |
13:09 | <frosch123> | i.e. "output = input / 8" vs "while (input > 8) { input -= 8; output ++; }" |
13:09 | <TrueBrain> | what does that have to do with the register version or not? |
13:09 | <+glx> | register version can dynamically adapt the values |
13:09 | <TrueBrain> | (the reason I ask is because I start to wonder if I am not missing something here :D) |
13:09 | <frosch123> | "output = input / 8" is the register version. the "while" is the non-register version with "again" |
13:10 | <TrueBrain> | I don't follow .. I can always just look at incoming_cargo_waiting not? |
13:10 | <TrueBrain> | and do input / 8 in both cases? |
13:10 | <TrueBrain> | owh, no, okay, I get what you mean |
13:10 | <TrueBrain> | I was thinking in a bit longer switch-statements :D |
13:11 | <+glx> | so instead of repeating 5 input gives 5 output, you can directly do 1000 input gives 1000 output via the registers |
13:12 | <frosch123> | the non-register version is only useful for primary industries, which use prod_level |
13:12 | <frosch123> | i think there is some flag somewhere to multiple the results of the cb with prod_level |
13:12 | <frosch123> | (don't use it :p ) |
13:14 | <TrueBrain> | outputs[cargo.label] = cargo.multiplier * industry.production_level * industry.storage.base_prod_factor * industry.storage.current_production_level / 16 / 16 / 100; |
13:14 | <TrueBrain> | at least it is more clear than the FIRS variant :P |
13:15 | <TrueBrain> | it will be a very small subset of Javascript that can be supported .... but can it be done .. hmm |
13:15 | <TrueBrain> | will it hurt me somewhere :) |
13:16 | <TrueBrain> | signed vs unsigned might be tricky |
13:16 | <frosch123> | yeah, NML users noticed :p |
13:17 | <+glx> | 15bit signed hits very hard |
13:17 | <TrueBrain> | normally I would say: just use signed everywhere, but I am sure there are cases that is not optimal |
13:18 | <frosch123> | as glx said. the problem is that not everything is 32bit, some things are 15bit, and when using 15bit things in 32bit computations, you have to know whether to sign-extend or not |
13:19 | <TrueBrain> | yeah, and the facts that the advanced varact2 has different operators for signed vs unsigned |
13:19 | <TrueBrain> | doesn't make it any easier ;) |
13:19 | <TrueBrain> | when I use the Javascript approach, I have nothing to base that decision on :) |
13:19 | -!- | gelignite [~gelignite@55d4ca9b.access.ecotel.net] has quit [Quit: Stay safe!] |
13:19 | <frosch123> | ah yes, "grf has no strings" is compatible to "everything is a string" :p |
13:20 | <frosch123> | *incompatible |
13:20 | <TrueBrain> | the typelessness is more the issue :) |
13:21 | <+glx> | and procedures can work on full 32bit, but the return value is still 15bit |
13:22 | -!- | J0anJosep [~juanjo@185.242.251.188-ip.operadors.cat] has joined #openttd |
13:22 | -!- | J0anJosep is "Joan Josep" on #openttd |
13:23 | <TrueBrain> | right ... so .. with the RPN I know I can deliver, and I know the footprint will be small |
13:23 | <TrueBrain> | with Javascript .. I am not 100% sure, and I am unsure about the footprint |
13:23 | <TrueBrain> | but .. Javascript would be 10000 times easier to write in for 99% of the users |
13:26 | <andythenorth> | am I the 1%? :D |
13:26 | <TrueBrain> | you writing RPN? That sounds like a disaster :P |
13:26 | <TrueBrain> | sorry :) |
13:26 | <andythenorth> | RPN looks quite appealing |
13:26 | <andythenorth> | I've never done it, but it looks cool |
13:26 | <TrueBrain> | it is really easy to mess up |
13:27 | <frosch123> | but you can transform RPN into a graph |
13:27 | <frosch123> | not so easy with JS |
13:27 | <TrueBrain> | why do we want a graph? |
13:28 | <TrueBrain> | mostly what I like about RPN, that I can stream it. I only need to read it once, and I have the answer at the end. With Javascript I need to build the AST, do reasoning on it, before I can output the result. Will take more CPU etc etc |
13:28 | <frosch123> | i though the idea was: RPN in backend, user draws flow-diagram in frontend, or switches to advanced RPN mode |
13:28 | <TrueBrain> | no, the idea is: use a templated variant, or an advanced mode |
13:28 | <TrueBrain> | both use RPN :) |
13:29 | <TrueBrain> | mainly as I found out that these functions are way too complex for visual languages :P |
13:29 | <TrueBrain> | but I guess you are not wrong .. with an RPN it is always possible to experiment with it |
13:33 | <TrueBrain> | pro for JS, syntax highlighters already exist :P |
13:34 | <frosch123> | not sure you can syntax-highlight in RPN :p |
13:34 | <TrueBrain> | me neither :D |
13:34 | <frosch123> | but you can do something like bracket-highlight |
13:34 | <frosch123> | highlight the child nodes of the operation at the cursor |
13:35 | <frosch123> | preview as graph, preview as infix, ... etc |
13:35 | <TrueBrain> | infix? |
13:36 | <frosch123> | you enter "input 8 / &output =", preview says "output = input / 8" |
13:36 | <TrueBrain> | lol, you flipped the left and right of the = operator from what I did |
13:36 | <TrueBrain> | and it is one thing I kept wondering about while writing the RPN |
13:37 | <frosch123> | oh, my mistake :) |
13:37 | <TrueBrain> | it is a funny problem :) |
13:37 | <TrueBrain> | it happens everywhere |
13:37 | <TrueBrain> | similar with dict lookuips |
13:37 | <TrueBrain> | dict key [] |
13:37 | <TrueBrain> | or key dict [] |
13:38 | <TrueBrain> | okay, decided to drop the & |
13:38 | <TrueBrain> | it is not needed, so don't annoy the user with it |
13:38 | <frosch123> | yay \o/ |
13:39 | <frosch123> | fewer sigils is always better |
13:39 | <TrueBrain> | yeah, really trying to minimize the keywords and operators |
13:39 | <TrueBrain> | too |
13:39 | <TrueBrain> | the one thing that is a problem in both languages .. assigning register slots |
13:40 | <frosch123> | https://xkcd.com/1306/ <- extend with truegrf at the next bottom :) |
13:40 | <TrueBrain> | I need to do loop unrolling I think |
13:40 | <TrueBrain> | so I can do it then, I think |
13:40 | <frosch123> | do you have a use-case for loops? |
13:40 | <TrueBrain> | can I lookup register X, where X is in register Y? |
13:40 | <TrueBrain> | (in NewGRF) |
13:40 | <TrueBrain> | or do they have to be fixed? |
13:41 | <TrueBrain> | FIRS is full of examples of loops |
13:41 | <frosch123> | the 60+x parameter can be a register, so you can address persistent storage via register |
13:41 | <TrueBrain> | but they are all static loops |
13:41 | <frosch123> | but you cannot address regular variables |
13:41 | <TrueBrain> | preprocessor loops? |
13:41 | <TrueBrain> | give them a name :) |
13:41 | <frosch123> | better use functions imo |
13:41 | <TrueBrain> | okay, tnx frosch123 |
13:42 | <TrueBrain> | take https://gist.github.com/TrueBrain/58a388d5e396bba3ae3ec721d3d5fca3#file-truegrf-primary-firs-rpn-L81 as example |
13:42 | <frosch123> | subfunction(0, cct:MAIL); subfunction(1, cct:COAL) is plausible to me |
13:42 | <TrueBrain> | just no way you can do that without a loop, and without going insane :P |
13:42 | <frosch123> | loops are probably work-around for other things |
13:42 | <TrueBrain> | I do not really mind the loops; keeps the code somewhat readable |
13:43 | <TrueBrain> | I just wonder how far to go in supporting them :P |
13:43 | <TrueBrain> | I don't mind if they have to be unrollable by the preprocessor |
13:43 | <TrueBrain> | that is a fine requirements for me |
13:44 | <frosch123> | haha, i like how the loop is unrolled inside the comment :p |
13:44 | <frosch123> | but with a typo |
13:47 | <+glx> | the second 27 is not a typo |
13:49 | <frosch123> | not? |
13:49 | <TrueBrain> | it is the length value |
13:49 | <+glx> | it's the length of the list |
13:49 | <TrueBrain> | it is a stack-based language, so after the values of a list, is an entry to indicate the length of the list |
13:49 | <TrueBrain> | otherwise you can't search the list on the stack :) |
13:52 | <frosch123> | i did not even notice it was a RPN link, i thought it was firs pynml :p |
13:52 | <@DorpsGek> | [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JSS83 |
13:52 | <@DorpsGek> | - Update: Translations from eints (by translators) |
13:52 | <TrueBrain> | I do not know what to think of this :P |
13:54 | <TrueBrain> | https://gist.github.com/TrueBrain/58a388d5e396bba3ae3ec721d3d5fca3 <- RPN |
13:54 | <TrueBrain> | https://gist.github.com/TrueBrain/0d8d7183c6eee45e5ac90bfa57777e29 <- JS |
13:54 | <TrueBrain> | I am still ... in doubt :) |
13:54 | <TrueBrain> | both about equal in length |
13:56 | <TrueBrain> | I guess if I do a proper RPN, the def{ stuff would be like: "def{ .. } name = " |
13:56 | <TrueBrain> | but ... that would make implementations rather complex :P |
13:57 | <TrueBrain> | I did reduce the keywords to "def{", "loop{", switch and call |
13:57 | <TrueBrain> | could change "call" into () |
13:58 | <TrueBrain> | procedure calls accept 1 parameter, not? Hmm .. do I want to allow that .. |
13:58 | <andythenorth> | oh dear |
13:58 | * | andythenorth now working out how to python template RPN or JS :P |
13:59 | <andythenorth> | I already python templated GS :P |
14:00 | <TrueBrain> | a procedure also returns a value |
14:00 | <TrueBrain> | meh |
14:00 | <TrueBrain> | why bother ... |
14:02 | <TrueBrain> | ah, procedure variable is what procedure to execute ofc, not the parameter .. good; saves me from adding any of that :D |
14:05 | -!- | Gustavo6046_ [~Gustavo60@189.6.236.12] has joined #openttd |
14:05 | -!- | Gustavo6046_ is "realname" on #openttd #llvm |
14:06 | <frosch123> | since you mentioned it, i keep on thinking that "index dict []" would be easier to implement... |
14:06 | <frosch123> | index can be an expression, dict never is |
14:06 | <TrueBrain> | implementation wise it really doesn't matter :) |
14:06 | <TrueBrain> | [] just looks at stack-1 and stack-2 |
14:06 | <TrueBrain> | that is it :) |
14:06 | <TrueBrain> | or do you mean: easier to write? |
14:07 | <frosch123> | no, i mean compiling to grf. va2 also is somewhat a RPN thingie |
14:07 | <frosch123> | but you cannot store a dict-address in a grf-register |
14:07 | <frosch123> | so when compiling the "dict []" part becomes a single instruction |
14:07 | <TrueBrain> | no, I need my own stack anyway while parsing the RPN |
14:07 | <frosch123> | while the "index" can be multiple |
14:08 | <TrueBrain> | how I plan to create this, is a simple lexer that looks for spaces |
14:08 | <frosch123> | anyway, i strongly favour the RPN version. |
14:08 | <TrueBrain> | so it first finds, for example "dict", and stores the reference to the dict on the stack |
14:08 | <frosch123> | the JS version is reinventing NML :p |
14:08 | <frosch123> | it's cooler to have a RPN format, that other things can compile to |
14:08 | <TrueBrain> | next it finds "index", stores reference on stack |
14:08 | <TrueBrain> | next it finds "[]", which is an operator |
14:09 | <TrueBrain> | it looks up stack-1 and stack-2 |
14:09 | <TrueBrain> | and outputs GRF based on it |
14:09 | <TrueBrain> | so from a compiling point-of-view, the order is not relevant, I think |
14:10 | <TrueBrain> | if "index" was instead "1 1 +", for example |
14:10 | -!- | Gustavo6046_ [~Gustavo60@189.6.236.12] has quit [] |
14:10 | <TrueBrain> | the + would already resolve stack-1 and stack-2 into a single stack entry again |
14:10 | -!- | Gustavo6046_ [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd |
14:10 | -!- | Gustavo6046_ is "realname" on #llvm #openttd |
14:10 | <TrueBrain> | hmm, and that is a valid point for the RPN .. you can make anything compile to the RPN .. it is harder to make other things compile into Javascript |
14:11 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has quit [Ping timeout: 480 seconds] |
14:11 | <frosch123> | "industry.persistent 1 1 + []" would compile to "1 load_const 1 + load_persistent" |
14:11 | <frosch123> | "1 1 + industry.persistent []" is almost the same as "1 load_const 1 + load_persistent" |
14:12 | <TrueBrain> | currently I am under the assumption "dicts" actually never go to GRF |
14:13 | <TrueBrain> | hmm .. I do would like to support the NewGRF range switches, so you can quickly jump to something based on ranges .. how to call that? "switch"? "[...]" (just some random non-existing operator)? "lookup"? |
14:15 | <frosch123> | i think if-cascade is easier in RPN |
14:15 | <TrueBrain> | well, a loop-if-cascade in that case |
14:15 | <TrueBrain> | for lists |
14:15 | <TrueBrain> | as that is the actual case for me currently :D |
14:16 | <frosch123> | "default result1 range-start1 range-end1 IFRANGE result2 range-start2 range-end2 IFRANGE" |
14:16 | * | Gustavo6046_ double-checks his arsenal of large trouts |
14:16 | <TrueBrain> | yeah, I went for something slightly different there ;) |
14:17 | -!- | Gustavo6046_ [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has quit [Quit: Leaving] |
14:17 | -!- | Gustavo6046_ [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd |
14:17 | -!- | Gustavo6046_ is "realname" on #openttd #llvm |
14:17 | -!- | Gustavo6046_ is now known as Gustavo6046 |
14:17 | <TrueBrain> | mainly what I noticed that "end" is just "start + 1" - 1 |
14:17 | <Gustavo6046> | fixed nickname |
14:18 | <TrueBrain> | so I went with: range1 range2 range3 3 result1 result2 result3 3 value switch |
14:18 | * | Gustavo6046 looks menacingly at andythenorth, holding a large trout |
14:18 | <TrueBrain> | if value is between [range1, range2), it returns result1 |
14:22 | <TrueBrain> | but the simple case in RPN is simple: default result1 range1 value > result2 range2 > result3 range3 > |
14:24 | <Gustavo6046> | what is that weird language? |
14:24 | <Gustavo6046> | it almost looks like a stack based language |
14:24 | <Gustavo6046> | like Forth, kind of |
14:25 | <TrueBrain> | an RPN, yes |
14:26 | <TrueBrain> | right, less keywords is better, so away with "switch" .. just a bit sad frosch123 , that one of the things NewGRF does supply, I won't be using :D |
14:29 | <Gustavo6046> | TrueBrain, I was about to ask what RPN stood for but I realized it's reverse Polish notation |
14:29 | <Gustavo6046> | :D |
14:30 | <supermop_Home> | I still have an rpn HP calculator |
14:32 | <Gustavo6046> | what about un-reverse Polish notation? |
14:32 | <Gustavo6046> | oh wait, that's just Lisp, isn't it |
14:32 | <TrueBrain> | postfix vs prefix languages |
14:32 | <TrueBrain> | both exist, yes :) |
14:33 | <Gustavo6046> | yeah |
14:34 | <Gustavo6046> | C has infix operators but its function calls are kind of like prefix notation |
14:37 | <TrueBrain> | https://gist.github.com/TrueBrain/58a388d5e396bba3ae3ec721d3d5fca3 updated, now with a header that explain the language a bit more. |
14:37 | <TrueBrain> | the only two keywords remaining are "def{" and "loop{" |
14:40 | <TrueBrain> | frosch123: similar, is A B > like "A > B" or "B > A" .. depends on how you look at "stack" :D |
14:40 | <Gustavo6046> | function pointers are fun to play with |
14:40 | <Gustavo6046> | but iirc they get in the way of optimization, right? |
14:44 | <frosch123> | TrueBrain: those are like division |
14:44 | <TrueBrain> | yeah |
14:44 | <frosch123> | so A > B |
14:44 | <TrueBrain> | lets keep the order of operations from left to right, yes :) |
14:44 | <TrueBrain> | no need to hurt us any more than needed :P |
14:45 | <supermop_Home> | andythenorth how do you draw good stonework noise in a way that is reuseable? |
14:46 | <supermop_Home> | or do you redo it for each sprite? |
14:46 | <andythenorth> | supermop_Home I try not to do it :P |
14:48 | <andythenorth> | supermop_Home I would just redraw it each time I think |
14:48 | <supermop_Home> | oof |
14:48 | <supermop_Home> | my walls don't look good |
14:48 | <supermop_Home> | especially lava rock |
14:49 | <Gustavo6046> | TrueBrain, masochism comes in degrees, sometimes we're ok hurting ourselves a little bit, but not any more than that |
14:49 | <Gustavo6046> | lol |
14:49 | <TrueBrain> | still in doubt about [] frosch123 :) Main reason I picked the current order, is becomes of this: "list key [] 1 =" <- if I do it reversed "key list [] 1 =", it is hard for me to see it manipulated "list". |
14:49 | <TrueBrain> | but I think it will be one of those things ... lets make a parser first, and see what works and not after :D |
14:51 | <Gustavo6046> | TrueBrain, ooh |
14:51 | <Gustavo6046> | what if we wrote a simple compiler, that targets that RPN language |
14:51 | -!- | Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd |
14:51 | -!- | Wolf01 is "Wolf01" on #openttd |
14:51 | <TrueBrain> | another one: true false <condition> or false true <condition> .. :D |
14:52 | <TrueBrain> | I went for the first for now |
14:52 | <TrueBrain> | feels more natural |
14:52 | <Gustavo6046> | yeah |
14:54 | <frosch123> | false true <condition> is easier to chain |
14:54 | -!- | gelignite [~gelignite@55d4ca9b.access.ecotel.net] has joined #openttd |
14:54 | -!- | gelignite is "gelignite" on #debian #llvm #openttd |
14:54 | <frosch123> | result3 result2 <condition2> result1 <condition1> |
14:55 | <TrueBrain> | depends on your frame of reference ;) |
14:55 | <TrueBrain> | default result1 range1 value > result2 range2 > result3 range3 > |
14:55 | <frosch123> | though for switches you have to keep the switch-value somewhere |
14:55 | <TrueBrain> | works fine for me :) |
14:58 | <TrueBrain> | hmmm, my if-chain is missing "value" a few times :P |
14:58 | <TrueBrain> | but this again is, I guess, reading from left to right or from right to left :D |
14:58 | <TrueBrain> | it is really funny :) |
14:58 | <TrueBrain> | (to me at least :P) |
14:58 | <TrueBrain> | pretty sure there is no right .. just choices :) |
14:59 | <TrueBrain> | postfix notation is a bit more trivial in these regards, I guess |
14:59 | <TrueBrain> | something like: / 20 10 |
15:00 | <TrueBrain> | or: > value range1 true false |
15:04 | <TrueBrain> | s/postfix/prefix/ |
15:04 | <TrueBrain> | lol |
15:04 | -!- | Wolf01 is now known as Guest10406 |
15:04 | -!- | Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd |
15:04 | -!- | Wolf01 is "Wolf01" on #openttd |
15:06 | -!- | Guest10406 [~wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds] |
15:10 | <TrueBrain> | industry:storage: does have one caveat .. a new version should assign the same variable to the same slot, I guess :P |
15:10 | <TrueBrain> | otherwise things might break a bit :) |
15:10 | -!- | virtualrandomnumber [~Thunderbi@p4ffe31a1.dip0.t-ipconnect.de] has joined #openttd |
15:10 | -!- | virtualrandomnumber is "virtualrandomnumber" on #openttd |
15:11 | -!- | virtualrandomnumber [~Thunderbi@p4ffe31a1.dip0.t-ipconnect.de] has quit [] |
15:11 | <andythenorth> | a new grf version? |
15:11 | <andythenorth> | with a compatible version bump? |
15:12 | <TrueBrain> | FIRS 4.3 and 4.4, those versions, yes |
15:13 | <andythenorth> | breaking compatibility with existing savegames is acceptable |
15:13 | <andythenorth> | same variable same slot is nice, but variable meanings or valid value ranges etc might change |
15:13 | <frosch123> | TrueBrain: the same applies to industry ids, random bits and stuff. i think those "locations" should be defnied when declaring the variable name |
15:13 | <andythenorth> | and we have no migration capability |
15:13 | <frosch123> | i.e. don't use implicit variable declaration |
15:13 | <andythenorth> | the implicit in NML is a complete waste of time |
15:13 | <TrueBrain> | you are both right, I think :) |
15:13 | <TrueBrain> | I expect with TrueGRF people make a lot of small incremental releases |
15:14 | <TrueBrain> | but yeah, I was thinking about explicit variable declaration |
15:14 | <TrueBrain> | also for the type |
15:14 | <andythenorth> | I try to make small incremental releases with grfs, and preserve compatibility wherever possible |
15:14 | <TrueBrain> | that gives two options .. |
15:14 | <andythenorth> | but when it's not possible....it's not possible |
15:14 | <TrueBrain> | I can keep industry:storage: .. |
15:14 | <TrueBrain> | or I can assign a local variable to that |
15:15 | <TrueBrain> | so at the top you have to define something like: supplied_cycles_remaining_cargo industry:storage 29 list |
15:15 | <frosch123> | andythenorth: there is a difference between "you decide when to break stuff", and "a compiler randomly switches things around, so you cannot even reload newgrf in-game, and always have to restart the game" |
15:15 | <TrueBrain> | and: total_delivered local int |
15:16 | <andythenorth> | frosch123 this is the problem with NML magical implicit IDs :) |
15:16 | <frosch123> | yes, they are useless :) |
15:16 | <TrueBrain> | so lets not repeat that for this language |
15:16 | <TrueBrain> | what are we calling it .. |
15:16 | <TrueBrain> | TrueRPN? :P |
15:16 | <frosch123> | just RPN: reverse-polish-newgrf |
15:17 | <TrueBrain> | :D |
15:17 | <TrueBrain> | I like it ;) |
15:17 | <frosch123> | the "polish" sets are known for realism, so reversing that |
15:17 | <TrueBrain> | do I need u32 and u15 |
15:17 | <TrueBrain> | or can I just do u32, and convert where needed? :P |
15:17 | <TrueBrain> | (well, i32 and i15 are more important, ofc) |
15:18 | <frosch123> | u32/i32 are for storage, u15/i15 are function return values |
15:19 | <frosch123> | technically you do not need the 32/15, just U and S |
15:20 | <frosch123> | "def func() -> signed" "def func() -> unsigned" |
15:20 | <TrueBrain> | now for a syntax to define types ... ugh |
15:20 | <TrueBrain> | my functions don't return anything |
15:20 | <TrueBrain> | much easier :P |
15:20 | <TrueBrain> | just use a temp-register |
15:20 | <TrueBrain> | is my answer :D |
15:20 | <TrueBrain> | "num_supplies_delivered 27 list unsigned industry:storage type" |
15:20 | <frosch123> | can you pass the register as output-reference to the function? |
15:20 | <TrueBrain> | that feels a bit icky .. but I guess? |
15:21 | <andythenorth> | do we have enough registers? :P |
15:22 | <andythenorth> | some are reserved |
15:22 | * | andythenorth looks up the troublesome one |
15:23 | <+glx> | andythenorth: there are 256 useable registers (except in NML) |
15:23 | <andythenorth> | 0x100 for vehicles is the one that kills me every time |
15:24 | <andythenorth> | it's reused, which has ... interesting results |
15:24 | <+glx> | but 0x100 is a write only register from newgrf pov |
15:24 | <andythenorth> | yup |
15:25 | <+glx> | with meaning for the caller depending on the callback |
15:25 | <andythenorth> | it's dangerous when using random switch and spritelayers |
15:25 | <andythenorth> | or rather...that's not possible :P |
15:26 | <andythenorth> | I am still worried what happens if TB looks at Iron Horse |
15:26 | <andythenorth> | FIRS is really simple |
15:26 | <frosch123> | the problem with 100 is just that both you and nml use it :) |
15:28 | <andythenorth> | I just stopped using random switch |
15:28 | <andythenorth> | it was the easiest thing |
15:29 | <@peter1138> | Mmm, which path shall we follow today |
15:29 | <andythenorth> | the path of righteousness |
15:30 | <@peter1138> | The path of refusing to believe in callback ID 1 as it's not documented... |
15:34 | <andythenorth> | do newgrf docks use it? :) |
15:40 | <@peter1138> | Didn't get as far as triggers. |
15:41 | <@peter1138> | Besides it would all be done wrong. |
15:42 | <andythenorth> | what isn't :P |
15:46 | <@peter1138> | Surfing With the Alien. |
15:47 | <@peter1138> | 80s guitar indulgence that I'd forgotten about somehow... |
15:59 | -!- | jottyfan [~Thunderbi@dynamic-077-013-004-199.77.13.pool.telefonica.de] has joined #openttd |
15:59 | -!- | jottyfan is "jottyfan" on #openttd |
16:18 | -!- | J0anJosep [~juanjo@185.242.251.188-ip.operadors.cat] has quit [Quit: Konversation terminated!] |
16:25 | <Gustavo6046> | four cities have many many busses and mail trucks going through them in a star of orders (asym cargodist), but this heavily congests the road stations |
16:25 | <Gustavo6046> | what do I do? maybe replacing them with trains is the best course of action? |
16:28 | <FLHerne> | Add links to make it more connected than a star? |
16:28 | <Gustavo6046> | I mean, look at this https://i.imgur.com/ZkP4hzl.jpg |
16:28 | <Gustavo6046> | FLHerne, links? |
16:28 | <Gustavo6046> | Oh wait |
16:28 | <FLHerne> | Trains are good, but you might need a lot of demolition to get into the centre |
16:29 | <Gustavo6046> | is it even necessary to have them transport in a star with cargodist? |
16:29 | <Gustavo6046> | Surely just a loop is enough, right? |
16:29 | <Gustavo6046> | Maybe there are downsides |
16:29 | <FLHerne> | No |
16:29 | <supermop_Home> | turn off breakdowns |
16:29 | <FLHerne> | For cdist, network graphs with bottlenecks are usually bad |
16:30 | <FLHerne> | all-to-all is ideal |
16:30 | <FLHerne> | somewhere in between is probably most practical |
16:32 | <Gustavo6046> | ah |
16:32 | -!- | jottyfan [~Thunderbi@dynamic-077-013-004-199.77.13.pool.telefonica.de] has quit [Quit: jottyfan] |
16:39 | <Gustavo6046> | those orders are something like ABCBDB |
16:40 | <Gustavo6046> | supermop_Home, okay |
16:43 | <Gustavo6046> | It's also that bus/truck stations tend to get clogged, especially if a vehicle is running early |
16:44 | <Gustavo6046> | I would like them to spend the surplus days by going slower than the max speed or something |
16:44 | <Gustavo6046> | maybe adjust the speed if it nears the station and realizes it's still gonna reach before schedule |
16:44 | <supermop_Home> | un fortutately that's not possible |
16:44 | <Gustavo6046> | so it goes a bit slower again |
16:44 | <Gustavo6046> | ah, that's okay :< |
16:44 | <Gustavo6046> | I understand |
16:44 | <supermop_Home> | the best bet is to have them wait somewhere where they don't block a vehicle behind them |
16:45 | <supermop_Home> | but this is hard for most road vehicles |
16:47 | -!- | Webster [~coop-9001@haleakala.openttdcoop.org] has quit [Remote host closed the connection] |
16:48 | -!- | Webster [~coop-9001@haleakala.openttdcoop.org] has joined #openttd |
16:48 | -!- | Webster is "Supybot 0.83.4.1" on #openttd @#openttdcoop.wiki @#coopetition |
16:50 | -!- | Gustavo6046_ [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd |
16:50 | -!- | Gustavo6046_ is "realname" on #openttd #llvm |
16:50 | -!- | andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has quit [Read error: Connection reset by peer] |
16:50 | <Gustavo6046_> | oops |
16:50 | -!- | andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has joined #openttd |
16:50 | -!- | andythenorth is "andythenorth" on #openttd |
16:51 | -!- | Gustavo6046 is now known as Guest10417 |
16:51 | -!- | Gustavo6046_ is now known as Gustavo6046 |
16:51 | <Gustavo6046> | oops |
16:51 | <Gustavo6046> | supermop_Home, yeah, true |
16:52 | -!- | gelignite [~gelignite@55d4ca9b.access.ecotel.net] has quit [Quit: Stay safe!] |
16:53 | <supermop_Home> | https://imgur.com/a/R29AMq6 |
16:53 | <supermop_Home> | generally road stops in series are not much better than a single one |
16:54 | <supermop_Home> | as no vehicle can pass another in the line anyway |
16:54 | <supermop_Home> | in parallel at least, a following RV can choose a different stop |
16:55 | <supermop_Home> | same with a single stop that the rv could enter from either side |
16:55 | -!- | Guest10417 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has quit [Ping timeout: 480 seconds] |
16:56 | <Gustavo6046> | Is there a max length of transfering sequence in a cargodist route? |
16:56 | <Gustavo6046> | Like max number of hops between stations |
16:56 | * | Gustavo6046 hoppy wallaby |
16:56 | <supermop_Home> | in practice, the RV pathfinder seems to cache too much of the vehicles route |
16:56 | <Gustavo6046> | supermop_Home, but yeah, I did realize parallel is often better than serial |
16:56 | <Gustavo6046> | take that silicon valley :P |
16:56 | <supermop_Home> | so a late running vehicle hugs the on time one in front of it |
16:56 | <Gustavo6046> | ah |
16:56 | <supermop_Home> | and follows it into the same stop |
16:56 | <Gustavo6046> | that sounds sweet! they're friends! |
16:57 | <andythenorth> | I think someone tried a full mesh for cdist |
16:57 | <supermop_Home> | as at the time it choses a route into the closest stop, it doesn't know it will be occupied |
16:57 | <andythenorth> | might have been jgr :P |
16:58 | <supermop_Home> | drive-in stops are better for this in therory |
16:58 | <supermop_Home> | theory |
16:58 | <supermop_Home> | as the late RV can leave before the on time one |
16:58 | <supermop_Home> | but 1) you can't use articulated RVs |
17:00 | <Gustavo6046> | ahh |
17:00 | <Gustavo6046> | oooh right |
17:00 | <supermop_Home> | and 2) the time it takes RVs to do the movement in and out of the stop is a huge bottleneck that erases most of the late vehicle's chance to catch up |
17:00 | <Gustavo6046> | because in a drive-through, they have to exit in the same order they enter |
17:00 | <Gustavo6046> | right? |
17:00 | <supermop_Home> | yes |
17:00 | <Gustavo6046> | what if it's a drive-through followed by a drive-in? o.o |
17:00 | <Gustavo6046> | lol |
17:01 | <supermop_Home> | the RVs stop at the drive through then pointlessly turnaround in the drive-in |
17:01 | <Gustavo6046> | oh |
17:01 | <Gustavo6046> | but don't they usually stop at the end, i.e. at the drive-in? |
17:02 | <supermop_Home> | not if they just stopped at the drive through on the way there |
17:02 | <Gustavo6046> | ahh |
17:02 | <Gustavo6046> | hmm |
17:03 | <Gustavo6046> | what if there was a stop type that was a weird Frankenstein, but one way only? a single through lane (you can pick the direction), because the space where the other lane would be is instead parking spots |
17:03 | <Gustavo6046> | so like an expandable drive-in |
17:03 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has quit [Remote host closed the connection] |
17:03 | <Gustavo6046> | you could link two lines of those in opposite directions, kinda like two lanes of one-way railway |
17:03 | <supermop_Home> | if you have one chronically late RV that's just following the one in front with no chance to pass, its best just to manually stop the on-time RV briefly to let the other pass |
17:03 | -!- | WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd |
17:03 | -!- | WormnestAndroid is "WormnestAndroid" on #openttd |
17:03 | <supermop_Home> | Gustavo6046 that's been discussed and eagerly awaited for years |
17:04 | <Gustavo6046> | :O |
17:04 | <Gustavo6046> | I'm not the first one? |
17:04 | <Gustavo6046> | (It sounds balanced because of the one-way thing) |
17:04 | <supermop_Home> | as part of general new road stop and/or airport paradigm |
17:04 | <Gustavo6046> | yayy I think alike to the awesome openttd folks :DDDD |
17:04 | <Gustavo6046> | \o/ |
17:04 | <Gustavo6046> | that does sound like something that would go best in a NewGRF, though |
17:05 | <Gustavo6046> | maybe that kind of thing could be API-ified so it isn't as hardcoded? idk |
17:05 | <supermop_Home> | it would have to be a patch, because the statemachines for vehicle movement in those is hardcoded |
17:06 | <supermop_Home> | this is also why airports that use different runway layouts than standard require a patch |
17:06 | <Gustavo6046> | Ah :( |
17:07 | <Gustavo6046> | how about a patch that makes them patchable by newgrfs or something |
17:07 | <Gustavo6046> | patchception lol |
17:07 | <supermop_Home> | the idea is to instead provide some means to make new movement patterns by other means rather than hardcoded |
17:07 | <supermop_Home> | yes, |
17:07 | <supermop_Home> | someone called rich did some work on it about 10 years ago |
17:07 | <supermop_Home> | but it kind of petered out |
17:09 | <Gustavo6046> | bitrot? |
17:11 | <Gustavo6046> | petered out like in it didn't catch up with openttd development? |
17:12 | <andythenorth> | there was a disagreement |
17:14 | -!- | nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has quit [Ping timeout: 480 seconds] |
17:17 | <supermop_Home> | Gustavo6046 with trains you can do this at the end of the line that lets a late train pass an early one easily: |
17:17 | <supermop_Home> | https://imgur.com/YiHSIh9 |
17:17 | <Gustavo6046> | ah |
17:17 | <supermop_Home> | especially if the there is amble lay-up time |
17:18 | <supermop_Home> | i often schedule trains to wait the time between train on the schedule plus a few days at end of line |
17:19 | <supermop_Home> | that way train 1 doesn't try to leave until train 2 has arrived and cleared the jenction |
17:19 | <Gustavo6046> | ohhh, so if one is coming and another is leaving at the same time, they don't have to wait for one to go through the intersection between station lanes and the two-way rails each time? |
17:19 | <supermop_Home> | junction |
17:19 | <Gustavo6046> | my layout is often like this, basically a roundabout https://i.imgur.com/iWVrxGI.png |
17:19 | <supermop_Home> | basically this is what the subway here does at most end of line terminals |
17:20 | <Gustavo6046> | hmm, what if a train wants to leave from the depot into the railway? |
17:21 | <supermop_Home> | that's pretty uncommon - that depot is just for buying trains and starting them off |
17:21 | -!- | _aD [~quadrant@0001362b.user.oftc.net] has joined #openttd |
17:21 | -!- | _aD is "Adam Piggott" on #openttd |
17:22 | <supermop_Home> | if i wanted to use it for servicing or replacing trains i'd probably design it differently |
17:22 | <Gustavo6046> | oh okay |
17:22 | <Gustavo6046> | how do you maintain the trains? |
17:22 | <Gustavo6046> | or service them, I think that's what maintenance refers to |
17:22 | <Gustavo6046> | oh waitttt |
17:22 | <Gustavo6046> | you disable breakdowdns |
17:22 | <Gustavo6046> | breakdowns* |
17:22 | <Gustavo6046> | I forgot :D |
17:23 | <_aD> | hey now, where's the challenge, when running 10-unit trains, without servicing? :-D |
17:25 | <Gustavo6046> | so, my roundabout station junction design is probably dumb and crapo |
17:25 | <_aD> | but is it beautiful? |
17:27 | <Gustavo6046> | I don't know, I'll let you be the judge of that. I linked a screenshot earlier |
17:28 | <supermop_Home> | https://imgur.com/I7Ae9rO |
17:29 | <supermop_Home> | this lets trains replace or service if needed and is still pretty functional |
17:29 | <supermop_Home> | you can of course add mor platforms or double the line coming into it |
17:30 | <supermop_Home> | again, I've scheduled the trains to wait at the station loading until the next one arrives, but you don't really need to |
17:32 | <Gustavo6046> | ah |
17:32 | <_aD> | oh that's much more svelte than mine :-\ |
17:33 | <Gustavo6046> | it's so simple yet so elegant |
17:33 | <Gustavo6046> | I generally avoid putting depots behind stations, not sure why |
17:33 | <Gustavo6046> | I guess so I can extend the station length if needed? |
17:37 | <_aD> | http://simplypeachy.co.uk/journal/wp-content/uploads/2022/01/Quadruplex-Depot-design.png |
17:38 | <_aD> | pls excuse the non-path signals, don't taze me bro. |
17:38 | <supermop_Home> | i generally like to keep my stations at mines, farms etc as close as possible to simple sidings |
17:38 | <_aD> | Service before loading. |
17:38 | <_aD> | These were for long-distance journeys...them trains were haulin' for a while. |
17:42 | -!- | sla_ro|master [~sla.ro@93.118.46.75] has quit [] |
17:44 | <@DorpsGek> | [OpenTTD/team] frosch123 commented on issue #282: [nb_NO] Translator access request https://git.io/JSDae |
17:44 | <@DorpsGek> | [OpenTTD/team] frosch123 commented on issue #283: [nn_NO] Translator access request https://git.io/JSDaY |
17:50 | -!- | frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn] |
18:04 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has quit [Remote host closed the connection] |
18:14 | -!- | andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has quit [Quit: andythenorth] |
18:27 | -!- | Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd |
18:27 | -!- | Gustavo6046 is "realname" on #llvm #openttd |
18:30 | -!- | Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.] |
18:36 | <TrueBrain> | https://gist.github.com/TrueBrain/58a388d5e396bba3ae3ec721d3d5fca3 <- added type definition .. now tomorrow we try to actually implement this :P |
19:36 | -!- | roadt_ [~roadt@36.5.93.21] has joined #openttd |
19:36 | -!- | roadt_ is "roadt" on #openttd |
19:43 | -!- | roadt__ [~roadt@60.166.72.94] has quit [Ping timeout: 480 seconds] |
21:35 | -!- | Wormnest [~Wormnest@35.136.189.95] has quit [Quit: Leaving] |
21:57 | -!- | glx [~glx@000128ec.user.oftc.net] has quit [Ping timeout: 480 seconds] |
22:03 | -!- | Flygon [~Flygon@2001:44b8:411e:4e00:2062:e0e6:f46e:41a8] has joined #openttd |
22:03 | -!- | Flygon is "Flygon" on #openttd |
22:46 | -!- | D-HUND [~debdog@2a00:79c0:637:2200:7a24:afff:fe8a:d04d] has joined #openttd |
22:46 | -!- | D-HUND is "Wowbagger" on #openttd |
22:49 | -!- | debdog [~debdog@2a00:79c0:617:d600:7a24:afff:fe8a:d04d] has quit [Ping timeout: 480 seconds] |
23:34 | <@DorpsGek> | [OpenTTD/OpenTTD] larryfenn opened pull request #9781: Change: Automatic screenshot numbering https://git.io/JS9P1 |
23:51 | -!- | _aD [~quadrant@0001362b.user.oftc.net] has quit [Quit: leaving] |
--- | Log | closed Thu Jan 06 00:00:17 2022 |