Config
Log for #openttd on 4th October 2019:
Times are UTC Toggle Colours
00:05:44  *** DorpsGek_III has quit IRC
00:05:50  *** Pikka has joined #openttd
00:09:25  *** HerzogDeXtEr has quit IRC
00:27:27  *** Thedarkb1-X40 has quit IRC
01:03:10  <Pikka> hmmmmmmmmmmm
01:03:23  <Pikka> who, if anyone, is maintaining grfcodec these days? ;)
01:04:47  <glx> well it's on github
01:05:26  <Pikka> oh, it is too :)
01:15:34  *** Flygon has joined #openttd
01:16:24  *** glx_ has joined #openttd
01:16:24  *** glx is now known as Guest4070
01:16:24  *** glx_ is now known as glx
01:22:56  *** Guest4070 has quit IRC
02:25:01  *** glx has quit IRC
03:47:09  *** Wormnest__ has quit IRC
03:55:20  *** Soni has quit IRC
03:57:02  *** Soni has joined #openttd
04:33:23  *** sla_ro|master has joined #openttd
05:29:32  <Pikka> css for industry window extra text!
05:54:05  *** cHawk- has quit IRC
06:08:08  *** nielsm has quit IRC
06:14:11  *** cHawk has joined #openttd
06:38:23  *** andythenorth has joined #openttd
06:38:25  <andythenorth> yo
06:40:25  <andythenorth> Pikka industries done? :)
06:40:56  <Pikka> pretty much!
06:41:15  <andythenorth> copy-paste
06:41:20  <andythenorth> are there chickens?
06:41:26  <Pikka> I got a first placeholder in and set up the extra window text, so...
06:41:41  <Pikka> no chickens. Vegetarian newgrf!
06:41:55  <andythenorth> 0F 0C 00 0A 10 FF FF
06:43:01  <andythenorth> did a thing https://www.tt-forums.net/viewtopic.php?f=26&t=41607&p=1225818#p1225818
06:43:06  <andythenorth> I don't like gaps in industries
06:43:25  <andythenorth> but I need a lot of separate stations
06:43:54  <Pikka> << 1a 20 \d16	+ ... nfo's come a long way ;)
06:44:20  <Pikka> fancy
06:44:33  <andythenorth> add a constant pre-processor and you can also use real words :P
06:44:49  <Pikka> that's crazy talk :)
06:44:56  <andythenorth> HEQS
06:46:37  <andythenorth> really don't like industry gaps though, looks like 2 separate industries :P
06:46:49  <andythenorth> oof
06:47:51  <Pikka> true
06:47:59  <Pikka> especially if you cluster similar industries sometimes
06:48:16  <andythenorth> which I do :P
06:48:57  * andythenorth deletes that code
06:49:02  <andythenorth> no gaps
07:08:01  <Pikka> https://i.imgur.com/Wj9Pols.png
07:08:32  <Pikka> so, industries have mini gs-like "goals" to increase production (or in some cases do other things), is good?
07:09:44  *** HerzogDeXtEr has joined #openttd
07:11:05  <Pikka> along with the limited resources and more complicated feedback chains, trying to make building routes a little less fire-and-forget. Stockpile limits are gone, though, no-one liked those. ;)
07:23:48  <andythenorth> I did the first few games
07:24:04  <andythenorth> it's interesting for a bit to have to find another destination
07:24:39  <andythenorth> it does wear out though :)
07:24:54  <andythenorth> let me know how the level up mechanic goes :)
07:24:59  <andythenorth> been considering it for FIRS
07:30:37  <Pikka> I will. Particularly for gses like silicon valley, I thought it would be nice to have some production increase mechanics other than just expanding the network, innit.
07:31:31  <Pikka> and feedback loops... coalmine feeds powerplant, powerplant powers factory, goods boost coal production, etc
07:34:10  <andythenorth> you doing town registers?
07:34:34  <Pikka> that's the plan. Seems to work well for the houses :)
07:36:09  <andythenorth> such register
07:36:19  <Pikka> wow
07:36:30  <andythenorth> maybe one day FIRS Electricity Edition
07:36:39  * andythenorth got distracted by 16 cargo industries
07:37:01  <andythenorth> very cargoflow
07:37:04  <andythenorth> such in-out
07:37:10  <Pikka> yes
07:37:16  <Pikka> and totally doable in NFO as it turns out
07:37:25  <Pikka> even though grfcodec doesn't like it :)
07:38:11  <andythenorth> is it angry?
07:38:16  <andythenorth> 16 cargos was tested with it :)
07:39:04  <Pikka> it just doesn't know about the properties, or the production callback version. Or anything since 2016 :)
07:44:48  <andythenorth> containers have gone big in straya
07:44:51  <andythenorth> forums says
07:46:21  <Pikka> ew, containers
07:47:32  <andythenorth> I should do more
07:47:48  <Pikka> are they fun to do?
07:49:51  <andythenorth> err
07:49:54  <andythenorth> for a bit yes
07:51:07  <andythenorth> the code makes 300 types of container from 33 templates
07:51:15  <andythenorth> quite lolz
07:55:41  *** WormnestAndroid has quit IRC
08:00:59  *** WormnestAndroid has joined #openttd
08:11:21  <andythenorth> oof, bigger station catchments?
08:11:31  <andythenorth> can't get enough stations around industries
08:11:43  *** Samu has joined #openttd
08:17:00  <Pikka> one for each cargo?
08:17:36  <andythenorth> pretty much
08:19:07  <andythenorth> https://dev.openttdcoop.org/attachments/download/9502/station_catchment_2.png
08:19:34  <andythenorth> one dropoff for all cargos, but pickup needs split
08:19:46  <andythenorth> for routing, cdist and station cargo display reasons
08:21:03  <andythenorth> oh that screenshot has a problem
08:21:06  <andythenorth> no zellepins
08:37:34  *** andythenorth has quit IRC
08:55:09  *** WormnestAndroid has quit IRC
09:01:08  *** andythenorth has joined #openttd
09:08:31  <Pikka> yes
09:09:21  *** WormnestAndroid has joined #openttd
09:20:59  *** Arveen has quit IRC
09:26:45  *** Etua has joined #openttd
09:39:31  *** Samu has quit IRC
09:57:21  *** tokai|noir has joined #openttd
09:57:21  *** ChanServ sets mode: +v tokai|noir
10:04:01  *** tokai has quit IRC
10:07:32  *** Pikka has quit IRC
10:12:39  *** Arveen has joined #openttd
12:30:54  *** Etua has quit IRC
13:23:11  *** nielsm has joined #openttd
13:35:41  <supermop_work> hello
13:37:07  <andythenorth> yo
13:42:08  <nielsm> yollo
13:56:40  <andythenorth> nielsm: was it you who suggested making smaller block layouts for industries, and repeating them in different configurations? o_O
13:56:58  <nielsm> yes
13:57:14  <andythenorth> I'm going to try it compile-side in newgrf
13:57:59  <andythenorth> I can make an (x, y) tile transposer for sub-layouts
13:58:01  <nielsm> generating a large number of layouts from smaller elements?
13:58:04  <andythenorth> yes
13:58:08  <nielsm> yeah might be interesting
13:58:14  <andythenorth> probably negatively affects compile time
13:58:18  <andythenorth> but I think it's interesting
13:58:36  <nielsm> I don't think ottd is tested with industries with a large number of layouts
14:03:29  * andythenorth considers
14:03:32  <andythenorth> 4 coast directions
14:03:39  <andythenorth> 4 layouts for each
14:03:46  <andythenorth> not too bad
14:12:12  <peter1138> Was it lunch?
14:12:25  <peter1138> Was it NewGRF docks?
14:12:32  <peter1138> Or some kinda of state machine.
14:44:05  *** Wormnest__ has joined #openttd
14:48:39  *** Flygon has quit IRC
14:53:40  <andythenorth> well
14:53:48  <andythenorth> there was lunch
14:53:55  <andythenorth> docks on flat ground would be nice
14:54:01  <andythenorth> docks on water maybe also
14:54:18  * andythenorth considers the canal hack for that though
14:54:40  <andythenorth> maybe I'm ass backwards
14:54:48  <andythenorth> the dock's always on water, no?
14:54:49  <andythenorth> silly andythenorth
14:59:50  <peter1138> Don't be silly.
15:00:25  <andythenorth> I should go back to GDPR and stuff
15:00:33  <andythenorth> :P
15:00:49  *** Samu has joined #openttd
15:14:30  *** Etua has joined #openttd
15:14:56  *** Progman has joined #openttd
15:25:27  *** Etua has quit IRC
15:32:32  *** Etua has joined #openttd
15:32:40  *** frosch123 has joined #openttd
15:32:45  *** Etua has quit IRC
15:47:01  <nielsm> andythenorth: https://wiki.openttd.org/User:Nielsmh/Industry_procedural_layouts
15:47:10  <nielsm> there's something I wrote just now
16:02:40  <andythenorth> nielsm: looks interesting, I am about to go afk
16:03:39  <andythenorth> BIAB :)
16:03:40  *** andythenorth has left #openttd
17:17:52  *** Kitrana has joined #openttd
17:20:37  <Kitrana> so question about station ratings. it says it the percentage is rating/255 does that mean that if your station rating is 255 that you are getting 1% of the cargo?
17:23:12  <_dp_> Kitrana, 255 is 100%
17:26:12  <nielsm> one percent is 0.01
17:26:20  <nielsm> hundred percent is 1.00
17:26:34  <Kitrana> thanks
17:42:44  *** glx has joined #openttd
17:42:44  *** ChanServ sets mode: +v glx
17:45:47  *** DorpsGek_III has joined #openttd
17:45:48  <DorpsGek_III> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JecxB
17:45:49  <DorpsGek_III>   - Update: Translations from eints (by translators)
17:51:50  *** Wolf01 has joined #openttd
18:03:28  *** gelignite has joined #openttd
18:10:31  <nielsm> okay let's see how much this explodes
18:10:37  *** andythenorth has joined #openttd
18:12:05  <andythenorth> nielsm: the distance between sub-layouts is delegated to OpenTTD? o_O
18:12:19  <nielsm> maybe
18:13:37  <nielsm> hmm https://0x0.st/zwbk.png
18:14:20  <andythenorth> on the one hand I feel this can already be done in newgrf spec
18:14:33  <andythenorth> especially if I write a python layout generator
18:14:36  <andythenorth> on the other hand
18:15:05  <andythenorth> it's a lot of work for every industry, and FIRS has 88 industries
18:15:18  <andythenorth> and not every newgrf author can write a layout generator
18:15:47  <andythenorth> and compile time
18:16:01  <nielsm> and resulting bloat
18:16:29  <andythenorth> possibly this approach would even reduce current layout definitions
18:17:35  <andythenorth> related https://www.tt-forums.net/viewtopic.php?f=26&t=41607&start=4460#p1225818
18:17:58  <andythenorth> I'm trying to figure out bigger industries, because https://dev.openttdcoop.org/attachments/download/9502/station_catchment_2.png
18:18:13  <andythenorth> with 4 or 5 output cargos, I need 4 or 5 pickup stations :D
18:18:31  <nielsm> heh
18:19:42  <nielsm> yeah if e.g. a port like that had the main building on a shoreline, and then a bunch of auxillary buildings on the land behind it, it'd be easier to catch with more stations
18:20:15  <andythenorth> yes
18:20:32  <andythenorth> I tried that though, something is problematic with having buildings on water and on land
18:20:37  <andythenorth> I can't get it to build at all
18:20:52  <andythenorth> I didn't read the spec properly for 'build on water' yet :P
18:21:32  <andythenorth> prop 1A bit 2
18:21:54  <nielsm> right now I'm trying to "clean up" the industry tile layout code to use C++ containers instead of raw pointers and implicit arrays
18:22:02  <andythenorth> housekeeping :)
18:22:11  * andythenorth explores industry_cmd.cpp
18:22:23  <andythenorth> I've spent more time in that file than all the rest of openttd src combined :P
18:22:25  <nielsm> seems to "almost work", except I got a memory allocator bugcheck error on exit
18:22:37  <nielsm> so something might have attempted to free() memory belonging to a std::vector
18:24:29  <andythenorth> L1438, seems that if industry sets water check, tile needs to be flat and water
18:24:29  <nielsm> now to test whether it can load and place some FIRS, ECS, or other industries :D
18:24:37  <andythenorth> wonder how I'm doing coast slopes :P
18:25:34  <andythenorth> heh, not sure I'll ever learn to read C++ fluidly :)
18:25:58  <nielsm> line 1453
18:26:33  <Eddi|zuHause> coast slopes are tiles that are water and not flat
18:26:42  <andythenorth> yes
18:26:58  <andythenorth> ok so if the industry water flag is set, non-water tiles aren't possible
18:27:04  <Eddi|zuHause> well, they could be river slopes
18:27:18  <andythenorth> hah there is a FIRS bug someone showed me with that
18:27:23  <andythenorth> can't remember the case
18:27:42  <andythenorth> but there's a configuration with a lake behind a coast, that causes ports to be build facing inland
18:27:43  <Eddi|zuHause> there's a water class you probably can check
18:27:51  <nielsm> this does not look like a map with FIRS... https://0x0.st/zwbC.jpg
18:28:04  <andythenorth> that is not a recent FIRS :)
18:28:30  <nielsm> every industry is an iron ore mine
18:28:51  <nielsm> it does actually have the FIRS logic, it's just there are no other industry types built
18:29:00  <Eddi|zuHause> clustering going overboard?
18:30:34  <nielsm> nope, just every other industry type fails with no reason
18:30:43  <nielsm> "cannot construct this industry here..." and nothing more
18:31:56  *** microman has joined #openttd
18:33:22  *** m1cr0m4n has quit IRC
18:35:09  *** Kitrana has quit IRC
18:35:43  *** Kitrana has joined #openttd
18:37:14  <nielsm> okay looks like most industry types get zero layouts, so I made an oops in the newgrf parsing code
18:41:06  *** Kitrana1 has joined #openttd
18:41:27  <nielsm> aaaahhhhh
18:41:31  <nielsm> silly mistake
18:43:27  <nielsm> was validating the layouts wrong so every layout got rejected
18:43:46  *** Kitrana has quit IRC
18:45:09  *** Kitrana has joined #openttd
18:45:23  <nielsm> and I know what's going wrong with the memory allocators
18:47:06  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
18:49:48  <nielsm> LordAro: merge conflicts in known-bugs.txt
18:50:01  <LordAro> but i rebased onto master...
18:50:17  <nielsm> you left merge conflict text in
18:50:19  <Eddi|zuHause> you didn't properly update master?
18:50:30  <LordAro> oh
18:50:31  <LordAro> lol.
18:50:37  <LordAro> it only told me about changelog!
18:50:53  <LordAro> CONFLICT (content): Merge conflict in known-bugs.txt
18:50:54  <LordAro> oh wait
18:50:58  <LordAro> i just didn't read it
18:51:44  *** Kitrana2 has joined #openttd
18:52:11  *** Kitrana1 has quit IRC
18:52:32  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
18:55:11  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
18:56:34  *** Kitrana has quit IRC
19:04:14  <nielsm> inline auto _Unfancy(_Ptrty _Ptr) { // converts from a fancy pointer to a plain pointer
19:04:16  <Kitrana2> what exactly does current useage in vehicle lists mean?
19:04:38  <nielsm> Kitrana2: average full-ness out of total capacity
19:04:46  <nielsm> cargo capacity
19:05:35  <Kitrana2> ah
19:05:45  <Kitrana2> i can;t ever seem to get mine above 50 for boats
19:06:09  <nielsm> if they're going full one way and empty the other, about 50% usage sounds right
19:06:56  <Kitrana2> thanks
19:18:15  <nielsm> ugh all this memset and memcpy is making std containers unhappy
19:18:58  <nielsm> this looks much more like it yes: https://0x0.st/zwcA.jpg
19:20:59  <andythenorth> such a retro FIRS :)
19:21:05  <andythenorth> also \o/
19:21:19  <nielsm> gotta start with something simple!
19:23:32  <nielsm> now let's try with ECS
19:23:46  <nielsm> :( https://0x0.st/zwca.png
19:25:01  <glx> ECS has many silly requirements
19:25:14  <glx> worse being tourist centers
19:25:21  <glx> *worst
19:25:33  <nielsm> yeah I see some bauxite mines here that fit to specific slopes
19:31:11  <andythenorth> there was an idea about industries terraforming specific slope configurations
19:31:15  <andythenorth> but I think it's overkill :)
19:37:19  *** WormnestAndroid has quit IRC
19:37:49  *** WormnestAndroid has joined #openttd
19:39:17  <LordAro> nielsm: that does not seem like a nice function
19:46:23  <nielsm> microsoft STL is not very nice
19:48:11  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh opened pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
19:51:48  <glx> haha I like the last sentence :)
19:54:42  <nielsm> it seems ECS agricultural is the one causing problems
19:56:06  <nielsm> but may/may not relate to the missing industry name in "failed to place" errors
19:58:46  <glx> some newgrf can provide incorrect string args, we added checks for some of them but it's hard to be complete
20:09:46  <glx> maybe similar to https://github.com/OpenTTD/OpenTTD/pull/7419 but for industries name
20:10:31  <nielsm> it happens even with default industries
20:10:40  <nielsm> e.g. forests on arctic maps without snow
20:12:29  *** Wormnest__ has quit IRC
20:21:35  <nielsm> okay the (undefined string) problem seems to be probably not related to my changes
20:22:01  <glx> launched msvc to try :)
20:22:03  <nielsm> since with the arctic forest, I can trace it first formats the string correct twice, then a third time does it wrong
20:22:27  <nielsm> and I'm not sure I understand why it needs to format the same string three times or more for a single use
20:22:42  <glx> just need arctic with no snow ?
20:22:58  <nielsm> yeah arctic and not hilly
20:23:38  <glx> I think one of the format call is to determine the string size
20:23:57  <glx> there's one for the actual drawing too
20:24:36  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
20:25:33  <glx> I should clean my newgrf dir someday, starting openttd is so slow
20:25:48  <nielsm> yep same bug in master
20:25:52  <nielsm> (undefined string)
20:25:57  <nielsm> haha yes
20:28:22  <glx> yeah (undefined string) without crash
20:29:50  <Eddi|zuHause> "also works [...] when it doesn't crash". tautologies are being tautological today.
20:30:25  <nielsm> Eddi|zuHause: it could produce errors that are not crash errors
20:30:29  <nielsm> or other incorrect behaviour
20:32:54  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCe8
20:33:00  *** sla_ro|master has quit IRC
20:58:37  <glx> in the console the error message is correct
20:59:41  <glx> the param disparition seems to happen at error_gui.cpp:423
21:01:17  <glx> hmm a recent change happened it this file IIRC
21:03:04  <glx> anyway ErrorMessageData::ErrorMessageData(const ErrorMessageData &data) feels really wrong
21:04:36  <LordAro> looks like a copy constructor to me
21:05:00  <glx> yes but parameters are not properly copied
21:05:04  <LordAro> ah
21:05:20  <LordAro> i plead ignorance
21:05:33  <glx> not your fault
21:05:51  <glx>         if (this->strings[i] != nullptr) {
21:05:51  <glx>             this->strings[i] = stredup(this->strings[i]);
21:05:51  <glx>             this->decode_params[i] = (size_t)this->strings[i];
21:05:51  <glx>         }
21:06:01  <glx> I think I found it :)
21:06:14  <LordAro> ah
21:06:15  <LordAro> lol
21:06:22  <Eddi|zuHause> uh, what?
21:08:45  <glx> let's try with a little codechange
21:20:00  <glx> hmm seems it's finaly related to your change LordAro
21:22:23  <LordAro> it did seem familiar
21:24:09  *** WormnestAndroid has quit IRC
21:24:13  *** WormnestAndroid has joined #openttd
21:25:50  <DorpsGek_III> [OpenTTD/OpenTTD] glx22 opened pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvZ
21:26:03  <glx> was easy :)
21:27:05  <LordAro> glx: shouldn't the line in the loop be removed as well?
21:27:18  <glx> no because it updates the pointer
21:27:23  <glx> in the arg list
21:27:36  <LordAro> oh i see
21:27:52  <glx> I first misunderstood that part too :)
21:28:35  <LordAro> it's a bit weird
21:28:42  <LordAro> maybe a comment :)
21:29:10  <glx> the string system is weird ;)
21:29:19  <LordAro> very much so
21:30:15  <glx> but raw strings are stored in strings[] and accessed as decode_params
21:30:24  <nielsm> glx, perhaps use MemCpyT<> instead?
21:30:26  <glx> like other params
21:30:37  <nielsm> or even just assign it in the initializer list?
21:31:52  <glx> hmm looks like this has been discussed in the previous commit too :)
21:31:57  <nielsm> since it's an array and not a pointer, this->decode_params = data.decode_params; ought to work I think
21:32:14  *** WormnestAndroid has quit IRC
21:33:52  *** WormnestAndroid has joined #openttd
21:40:08  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro approved pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvK
21:40:41  <glx> nielsm: would be nice if it worked, but it doesn't
21:41:10  <nielsm> :(
21:41:13  <glx> it's a C-style array
21:42:19  <DorpsGek_III> [OpenTTD/OpenTTD] glx22 merged pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvZ
21:42:52  <glx> now you can test in your branch :)
21:45:50  <nielsm> fixes (hides?) the ecs agr vector crash too
21:46:14  <nielsm> I should run with extra grf debugging enabled to see if that callback failure logs something else somewhere
21:46:22  <LordAro> error: no match for 'operator<' (operand types are 'std::_Rb_tree_const_iterator<unsigned int>' and 'std::set<unsigned int>::iterator' {aka 'std::_Rb_tree_const_iterator<unsigned int>'})
21:46:29  <LordAro> i love C++
21:46:30  <LordAro> *twitches*
21:47:46  * andythenorth must to sleep :P
21:47:47  <andythenorth> bye
21:47:48  *** andythenorth has quit IRC
21:49:14  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
21:49:34  <glx> maybe ECS agr vector generates a custom error message, and as params were not passed...
21:50:16  <nielsm> maybe yes
21:50:29  <nielsm> it was crashing on attempting to utf8 decode a nullptr
21:50:51  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvy
21:55:25  *** firewire1394 has joined #openttd
21:56:22  <nielsm> sometimes I want a !< operator
21:56:50  <glx> >=
21:56:53  <nielsm> just a different way of spelling >= but sometimes expressing the bounds check better
21:57:22  <nielsm> if (i !< lengthof(thing)) ...
21:57:46  <nielsm> if (!(i < lengthof(thing))) ...
21:59:08  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvd
22:00:35  *** Samu has quit IRC
22:00:43  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvN
22:02:06  *** Compu has joined #openttd
22:03:45  *** Progman has quit IRC
22:05:09  <LordAro> nielsm: of course technically, there could be a difference between operator< & operator>=
22:05:10  <glx> indeed newgrf can return custom errors, that can be displayed during DoCommand()
22:08:06  <nielsm> LordAro oh yes, someone might have defined >= as a "funnel operator"
22:08:21  *** Arveen has quit IRC
22:09:12  <nielsm> and <= might be the "bowl and faucet" operator
22:09:22  <LordAro> lol
22:11:56  <nielsm> also need to find a way to define -!- as the "broken minus" operator
22:12:46  <nielsm> or maybe you could call it a closed valve operator
22:13:05  <nielsm> -*- would be the turn valve operator
22:14:18  <LordAro> hmm
22:17:14  <LordAro> nielsm: https://godbolt.org/z/1kaTlZ
22:21:10  *** gelignite has quit IRC
22:23:27  *** nielsm is now known as Guest4138
22:24:16  *** nielsm has joined #openttd
22:24:22  *** Guest4138 has quit IRC
22:25:10  <Eddi|zuHause> then what's the ^.^ operator?
22:25:32  <Eddi|zuHause> or the =^^= operator?
22:25:48  <frosch123> we already had the elvis operator this week
22:25:52  <nielsm> I don't think those are possible syntax
22:26:32  <LordAro> alas, the '.' cannot be overridden
22:28:13  <nielsm> and there is no prefix or suffix unary operator=
22:28:30  <LordAro> ^-^ is possible though
22:29:15  <LordAro> ah, no, must be binary
22:29:51  <frosch123> at some point there was a patch/suggestion to add "%" for mirroring roadbits
22:30:02  <frosch123> luckily it was rejected
22:30:26  *** Arveen has joined #openttd
22:32:25  <nielsm> bool operator >= (std::vector<CargoPacket> &cargo, Industry &ind) { /* deliver cargo to industry */ }
22:32:49  <LordAro> :D
22:32:56  <LordAro> (also oh god no)
22:32:58  <Eddi|zuHause> wouldn't >> be more fitting for that?
22:33:18  <LordAro> would be more in keeping with the STL
22:33:21  <nielsm> no the cargo needs to go through a funnel
22:33:39  <LordAro> :D
22:35:10  <nielsm> the main issue with the interrobang operator is that you need a colon somewhere later
22:36:40  <nielsm> and I can't think of a good use for it
22:37:47  <Eddi|zuHause> ?! or !?
22:37:53  <nielsm> ?!
22:37:59  <nielsm> you can't place a ! before a ?
22:38:25  <nielsm> vehicle == nullptr?! a : b
22:39:24  <nielsm> vehicle == nullptr?! haha :D
22:39:45  <nielsm> for appropriate declarations of haha and D
22:45:08  *** firewire1394 has quit IRC
22:45:14  *** Wolf01 has quit IRC
22:45:30  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
22:45:52  <frosch123> oh, did i already rant about c++20 adding "october/5/2019" for setting dates in source
22:46:53  <nielsm> yeah uh... that's dumb
22:57:44  <glx> yeah and using the silly order
22:57:57  <glx> mdy is the worse
22:58:36  <nielsm> it's just to allow suffixless numbers to be used
22:59:16  <nielsm> when you start with a constant that represents a month you can overload operator / to create a yearless date
23:00:01  <nielsm> 2019Y-10M-5D
23:00:05  <nielsm> how about that
23:00:25  <frosch123> how often do you need fixed dates in the source? date(y, m, d) would suffice
23:00:33  <nielsm> (I forget if that's the possible syntax or if you need the _ before the suffix)
23:00:50  <nielsm> yeah it seems a very pointless exercise all in all
23:01:09  <LordAro> https://godbolt.org/z/DM3kjs this is definitely getting silly now
23:01:25  <nielsm> a dumb trick being codified into the standard library, like std::vector<bool>
23:02:26  <LordAro> nielsm: you don't *need* it, but literals starting without a _ are reserved for the STL
23:02:36  <LordAro> unless you turn that warning off, of course
23:02:39  <milek7> 2019Y-10M-5D looks like subtraction
23:05:23  <LordAro> the above godbolt link requires gcc trunk, and clang just falls over entirely
23:05:48  <LordAro> i'm not entirely sure who's parsing x² correctly...
23:07:43  * glx is trying to understand what is <=> operator usage
23:08:29  <frosch123> when you want to distinguish <, == and >
23:08:38  <frosch123> and comparing twice is too expensive
23:09:02  <LordAro> old c-style -1, 0, 1
23:09:07  <frosch123> LordAro: i am still wondering what x² is doing exactly
23:09:11  <LordAro> essentially
23:09:22  <LordAro> frosch123: i was trying to make a square operator
23:09:26  <LordAro> works in gcc
23:09:51  <frosch123> well, i understand the 56² and "sqrt(7)"²
23:10:05  <frosch123> but what is x² in a declaration
23:10:09  <glx> oh <=> is like the C compare style
23:10:22  <LordAro> frosch123: that was a different attempt
23:10:45  <LordAro> that's probably a variable name
23:10:48  <LordAro> probably.
23:11:08  <glx> or x = 9²
23:11:15  <frosch123> oh, right, unicode variable names
23:12:13  <LordAro> seems like my ² only works with literals
23:12:40  <glx> unicode variable names will be fun with all the unicode spaces :)
23:13:22  <frosch123> nothing commit-hooks can't fix :p
23:13:54  <glx> let's replace _ with NBSP in names :)
23:15:44  <frosch123> i am more worried about compile-time debuggers, when they actually add metaclasses
23:17:41  <nielsm> wow look at the time
23:17:42  <nielsm> gn
23:17:46  *** nielsm has quit IRC
23:18:15  <glx> oh the new keywords will probably break some existing programs
23:19:07  <glx> I can see "concept" and "requires" as existing variable names in some source code
23:19:19  <frosch123> they are no global keywords
23:19:39  <frosch123> they are only special in the place where they can be used
23:19:54  <glx> ha like override
23:19:56  <LordAro> be nice if they went all in and used yield and await instead of co_yield & co_await
23:20:00  <LordAro> which is ugly as hell
23:20:17  <glx> it's to mark coroutines I guess
23:23:58  <frosch123> LordAro: #define yield co_yield
23:24:12  <LordAro> probable
23:24:19  <LordAro> same as _Bool :p
23:27:52  *** tokai has joined #openttd
23:27:52  *** ChanServ sets mode: +v tokai
23:34:41  *** tokai|noir has quit IRC
23:47:42  *** frosch123 has quit IRC

Powered by YARRSTE version: svn-trunk