IRC logs for #openttd on OFTC at 2017-12-29
            
00:00:33 <m3henry> I've been tightening up SmallVector<T,S> and I've noticed that the rationale stated in the file "Simple vector class that allows allocating an item without the need to copy this->data needlessly." isn't something it does, and the only advantage it has over std::vector is the ability to set the allocation policy.
00:06:18 <Samu> hi
00:06:43 <m3henry> 'lo
00:14:54 *** andythenorth has quit IRC
00:17:54 *** Thedarkb has quit IRC
00:19:45 *** Eddi|zuHause has joined #openttd
00:25:55 *** Thedarkb has joined #openttd
00:26:43 <m3henry> G'day
00:54:57 *** Wormnest has quit IRC
00:56:19 *** Flygon has joined #openttd
01:01:59 *** m3henry_ has joined #openttd
01:04:44 *** m3henry_ has quit IRC
01:07:28 *** m3henry has quit IRC
01:10:55 *** Thedarkb has quit IRC
01:16:01 *** Thedarkb has joined #openttd
01:28:02 *** Samu has quit IRC
01:41:01 *** ToBeFree has joined #openttd
01:54:48 *** ToBeFree has joined #openttd
01:56:21 *** Progman has quit IRC
02:36:20 *** Gja has quit IRC
02:39:50 *** Eddi|zuHause has quit IRC
02:41:32 *** Eddi|zuHause has joined #openttd
02:44:51 *** muffe has joined #openttd
02:57:42 *** Gustavo6046 has quit IRC
03:11:55 *** ATMunn has joined #openttd
03:12:05 *** Guest625 has quit IRC
03:12:28 *** ATMunn is now known as Guest685
03:47:52 *** glx has quit IRC
05:16:06 *** HerzogDeXtEr has joined #openttd
05:23:03 *** HerzogDeXtEr1 has quit IRC
06:09:11 *** PressureLine has joined #openttd
06:09:40 <PressureLine> <3 drinking on a weekday
08:10:27 *** sim-al2 has quit IRC
08:15:41 *** sla_ro|master has joined #openttd
09:00:34 *** andythenorth has joined #openttd
09:56:26 *** tokai|noir has joined #openttd
09:56:26 *** ChanServ sets mode: +v tokai|noir
10:03:23 *** tokai has quit IRC
10:38:02 <andythenorth> o/
10:44:25 *** Progman has joined #openttd
10:54:54 *** Progman has quit IRC
10:56:34 *** Progman has joined #openttd
11:04:43 <PressureLine> o/
11:11:16 <crem> \o
11:13:18 *** andythenorth has quit IRC
11:18:55 *** PressureLine has quit IRC
11:19:25 *** Borg has joined #openttd
11:19:28 <Borg> hoi....
11:19:34 <Borg> any GS gurus around?
11:19:49 <Borg> I need to understand how I can check for specific industry.. in IndustryList
11:19:59 <Borg> is it possible at all?
11:20:23 *** yorick has joined #openttd
11:29:57 *** andythenorth has joined #openttd
11:38:14 *** iSoSyS has joined #openttd
11:55:32 <Borg> heeeeeelp
11:55:40 <Borg> I cant wrap myself in that GS....
12:05:09 *** Celestar has quit IRC
12:09:04 *** Celestar has joined #openttd
12:17:05 *** Celestar has quit IRC
12:18:18 *** m3henry has joined #openttd
12:18:42 <m3henry> G'day
12:27:43 *** Celestar has joined #openttd
12:37:27 * Borg cries
12:38:22 <Borg> luicky... standard lame debugging options.. works in GS too
12:49:28 *** iSoSyS has quit IRC
13:07:17 *** heffer has quit IRC
13:32:35 *** Alberth has joined #openttd
13:32:35 *** ChanServ sets mode: +o Alberth
13:35:05 <m3henry> G'day Alberth
13:35:17 <Alberth> hi hi
13:35:48 <andythenorth> hi Alberth
13:35:57 <Alberth> hi andy
13:38:51 <m3henry> I've been looking at SmallVector<T, S> some more and I've noticed some potential issues
13:40:46 <m3henry> The destructor requires that the contained type is trivially destructible to be safely called at any time, however there are uses of Smallvector which contain non-trivially destructible types
13:41:57 <m3henry> ErasePreservingOrder(uint, uint) requires that the contained type is trivially movable (which is fortunately the case for all uses of that method)
13:43:14 <Alberth> never seen that function :)
13:44:40 <m3henry> Putting a static_assertion on the container for std::is_trivially_destructible<T>::value would be one option, but breaks some uses, alternatively, ensuring the destructor for all remaining elements would prevent a potential resource leak
13:44:57 *** sla_ro|master has quit IRC
13:45:10 <m3henry> Alternatively there is std::vector
13:46:45 <m3henry> Not entirely sure what be the best option
13:49:19 <Alberth> don't know about is_trivially_destructible at all
13:52:06 <m3henry> is_trivially_destructible means that the underlying memory can be deallocated without calling the destructor
13:52:38 <m3henry> for the particular type T
13:53:34 *** Gustavo6046 has joined #openttd
13:53:46 <LordAro> Alberth: brace yourself, you're entering the world of template metaprogramming :)
13:53:49 <Alberth> I would say that switching to standard constructs is more useful than trying to make custom constructs safer
13:54:35 <Rubidium> except that I remember getting away from such a construct because it slowed some highly used function (in drawing IIRC) down by a few factors
13:54:58 <Rubidium> just because it kept copying memory around like crazy
13:55:02 <m3henry> http://en.cppreference.com/w/cpp/types/is_destructible
13:55:30 *** m3henry has quit IRC
13:55:58 *** m3henry has joined #openttd
13:56:15 <Alberth> you got the comment by Rubidium ?
13:57:08 <m3henry> Incase my previous message didn't arrive: http://en.cppreference.com/w/cpp/types/is_destructible
13:57:19 <m3henry> nop
13:57:42 <Alberth> (13:54:35) Rubidium: except that I remember getting away from such a construct because it slowed some highly used function (in drawing IIRC) down by a few factors
13:57:42 <Alberth> (13:54:58) Rubidium: just because it kept copying memory around like crazy
14:00:59 <m3henry> Ah yes, ErasePreservingOrder is never used anywhere in the project
14:01:12 <m3henry> oh no, it is, in the last compiled file
14:01:15 <m3henry> :v
14:02:04 <m3henry> But RefitOptions are trivially move assignable, so there's no issue with its use there
14:02:13 *** Gja has joined #openttd
14:05:50 <m3henry> The rationale stated in the file description for SmallVector seems a little odd "Simple vector class that allows allocating an item without the need to copy this->data needlessly."
14:07:23 <m3henry> Is that referring to The allocation policy S being set large enough so that reallocations are unlikely
14:10:53 *** Thedarkb has quit IRC
14:14:16 *** roidal has joined #openttd
14:15:42 <Alberth> you are aware that the project runs since 2004, and lots of people have contributed code, and left again, right?
14:15:53 <m3henry> Yes
14:16:22 <m3henry> I'm just willing to put in a few hundred hours to make it easier for future developers to modify the project
14:16:23 <Alberth> ie, no idea, I studied the SmallVector interface two times or so, and that's it
14:16:49 <Alberth> you already know way more than I do
14:17:10 <andythenorth> definitely more than I do :)
14:17:19 <Alberth> but you may want to start with the more harmless uses
14:18:11 <Rubidium> m3henry: IIRC it was that you first allocate the memory on stack and then copy that to the vector, instead of just getting a pointer from the stack with the memory address to write the data to
14:19:28 <Rubidium> but to be brutally honest, it's all vague and fuzzy as it's quite a while ago for me
14:20:01 <m3henry> Aha
14:21:16 <m3henry> But yeah, I'd rather not start proposing large changes to the project without first talking about it to gain an idea of what solutions would be most acceptable
14:23:22 <Rubidium> it might also be that the code that used that is gone by now, but I have no clue
14:23:53 <m3henry> It's heavily used it would seem
14:28:45 <Borg> m3henry: thats kinda strange what u say
14:29:12 <m3henry> Huh?
14:29:50 <Borg> m3henry: delete value <- this is not trival dealloc... destructor will be called if necessary
14:30:07 <Borg> but.. I might be wrong ;) I got rusty in C++
14:31:23 <m3henry> Ah, the implementation of SmallVector<T,S> uses malloc()/free() rather than new/delete
14:31:54 <Borg> w00t? :)
14:32:15 *** Thedarkb has joined #openttd
14:32:17 *** mindlesstux has quit IRC
14:32:26 <Borg> nice abomination mix I see here ;) mixing malloc() vs new is bad
14:32:38 *** iSoSyS has joined #openttd
14:32:50 *** mindlesstux has joined #openttd
14:32:52 <Alberth> c++ also has malloc :p
14:33:05 <Borg> of course it has.. but as I said.. mixing those 2 is bad idea
14:33:22 <Alberth> but it's a 300K program converted from C to modern C to C++ in a deade
14:33:24 <m3henry> free doesn't do any destruction of objects deallocated by a call to it, it just makes the memory available to the heap
14:33:36 <Borg> Alberth: ahh :) didnt know it...
14:33:42 <Borg> m3henry: I know
14:33:55 <Borg> Alberth: well.. git grep -F malloc
14:33:57 <Borg> is your friend :D
14:34:06 <m3henry> delete and delete[] destroy the object[s] and then make the memory available to the heap
14:34:25 <Alberth> I know it uses malloc, and I don't see the problem, as long as you use it consistently
14:34:49 <Alberth> and are aware of the differences, of course
14:35:03 <m3henry> I was clarifying for Borg
14:35:30 <Borg> m3henry: thank you :) but no need to.. I know the basics
14:35:46 <Alberth> I agree you wouldn't write it in mixed new and malloc if you write a new program, but 300K lines isn't easily converted
14:35:57 <Borg> Alberth: indeed
14:36:34 <Alberth> and there is code in there that hasn't been touched in ages
14:36:38 <Borg> anyway! OpenTTD time.. time to play w/ my very first simple GS!
14:37:37 <m3henry> And with smart pointers and containers, using new is rarely warrented
14:42:12 <m3henry> I suppose what I'm really asking is, should I invest time in tightening up SmallVector, or moving instances to use std::vector?
14:42:22 <LordAro> Alberth: from machine code to C, as well
14:43:01 <Alberth> making new obsolete is relatively recent
14:43:09 <Alberth> LordAro: fair enough :)
14:43:28 <Alberth> I'd start with the non-time critical cases
14:43:53 <LordAro> Alberth: bits of openrct2 looked far too familiar to refute ottd's origins anymore
14:44:33 <Alberth> afaik the decoders used openttd as source of inspiration
14:44:44 <m3henry> That sounds like move to std::vector then
14:44:57 <Alberth> so it would be logical to see bits of openttd in it
14:44:58 <LordAro> m3henry: the latter, imo
14:45:25 <Alberth> m3henry: for the non-time critical cases, I see no objection to a move to std::vector, do you?
14:45:51 *** sim-al2 has joined #openttd
14:46:04 <Alberth> no idea how many would remain then
14:46:47 <m3henry> Between std::vector and std::array, custom contiguous containers seem moot
14:47:33 <m3henry> I have no idea how many tens of thousands of hours have gone into ensuring they are optimized and as tight as possible
14:54:28 <LordAro> technically, it depends on your usecase
14:54:38 <LordAro> but i'd imagine ottd covers none of those :)
14:54:48 *** m3henry has quit IRC
14:56:55 *** m3henry has joined #openttd
14:58:14 *** Celestar has quit IRC
15:11:54 *** Celestar has joined #openttd
15:13:17 *** Samu has joined #openttd
15:18:06 *** m3henry_ has joined #openttd
15:20:29 *** debdog has quit IRC
15:23:41 *** debdog has joined #openttd
15:24:14 *** m3henry has quit IRC
15:43:09 *** m3henry_ has quit IRC
15:43:43 *** m3henry_ has joined #openttd
15:47:48 *** debdog has quit IRC
15:48:44 <Borg> guys, is that me.. or I cannot find rag_signals_density in config options in GUI anymore?
15:48:57 <Borg> drag_signals_density I mean
15:49:28 <Eddi|zuHause> in the signal gui, probably?
15:50:34 *** debdog has joined #openttd
15:51:19 <Borg> ohh indeed
15:51:23 <Borg> thx
15:54:00 *** iSoSyS has quit IRC
15:54:21 *** iSoSyS has joined #openttd
15:59:52 *** sim-al2 has quit IRC
16:03:26 *** andythenorth has quit IRC
16:17:39 *** andythenorth has joined #openttd
16:33:09 *** Flygon has quit IRC
16:39:33 *** andythenorth has quit IRC
16:45:09 <Borg> hmmm
16:45:13 <Borg> why this doesnt work in GS:
16:45:15 <Borg> local tab;
16:45:18 <Borg> tab["xx"]=1
16:48:37 <Borg> ahh found it..
16:48:42 <m3henry_> GS?
16:49:07 *** Gustavo6046 has quit IRC
16:50:08 <Borg> GameScript
16:50:13 <Borg> its tab.xx <- 1;
16:50:16 <Borg> ugggly syntax ;)
16:51:46 <Borg> or not...
16:51:50 <Borg> holy fuck..
16:55:45 *** andythenorth has joined #openttd
16:56:39 <Borg> okey, works
16:58:41 <Alberth> difference between entry creation and assignment of existing entry
16:58:47 <Alberth> and yeah, it's ugly :)
17:00:43 <Borg> loooks good.. GRF works.. GS works :)
17:00:44 <andythenorth> FIRS 3 was 900 commits so far
17:00:47 <Borg> no... need to find players ;)
17:00:52 <andythenorth> whatever that means
17:10:58 <andythenorth> should I release FIRS 3?
17:11:00 *** Wormnest has joined #openttd
17:12:36 *** m3henry_ has quit IRC
17:13:28 *** m3henry_ has joined #openttd
17:18:22 *** RafiX has joined #openttd
17:28:43 *** m3henry_ has quit IRC
17:29:18 *** m3henry_ has joined #openttd
17:29:58 <andythenorth> so is that tacit consent?
17:30:03 <andythenorth> or tacit refusal? :P
17:30:54 *** heffer has joined #openttd
17:44:35 *** Gustavo6046 has joined #openttd
17:46:12 <Borg> who here said.. that stockpiling is.. bad... ?
17:46:16 <Borg> ;)
17:48:40 <andythenorth> me
17:48:50 <andythenorth> I have...opinions :P
17:49:01 <Borg> of course :)
17:49:06 <Borg> I kinda like it..
17:49:14 <Borg> kinda? nah.. I love it ;]
17:49:22 <Borg> makes production smoother..
17:49:33 <Borg> Of course it depends on GRF I guess
17:49:57 <Borg> Ive done my own stuff here.. and Prod Industries adjust production smoothly.. based on transported ratio + stockpiles
17:50:19 <Borg> so no cry when u start chain from source.. ;) not much is gonna be wasted
17:50:26 <supermop> andy prefers the stockpile a few tiles away to give an excuse for various vehicles to carry the stuff around the industry?
17:50:47 <Borg> ;)
17:51:04 <andythenorth> is it stockpiling + rejection?
17:51:10 <andythenorth> (acceptance limits)
17:51:13 <Borg> yeah
17:51:15 <andythenorth> or just a fixed processing rate?
17:51:27 <Borg> stockpiling + rejection.. and processing rate is not fixed
17:51:33 <Borg> it adjust itself
17:51:38 <andythenorth> yeah I dislike stuff that messes up the network :D
17:51:43 <andythenorth> and make GS goals impossible
17:52:11 <Borg> hmmm..
17:52:33 <Alberth> make 3.0.0 before next year!
17:52:39 <Borg> I wonder how it can interferre with GS goals..
17:52:53 <andythenorth> I did try cargo rejection in FIRS, but it was quickly removed :)
17:53:06 <Borg> andythenorth: why? :) complains?
17:53:11 <Borg> also.. I use temporary cargo reject...
17:53:16 <Alberth> "give factory X lots of cargo in little time"
17:53:18 <Borg> so.. its dumped.. but no payment ;D
17:53:44 <Borg> so.. its funny to see how overloaded factory gives u no profit or even costs! if you have transfers
17:53:53 <Alberth> "make X money by bringing cargo to Y factory in little time"
17:54:10 <Borg> Alberth: ahh :)
17:54:18 <andythenorth> so it doesn't stop accepting at station?
17:54:24 <Borg> andythenorth: nope.
17:54:29 <andythenorth> better
17:54:36 *** m3henry_ has quit IRC
17:54:39 <andythenorth> stopping acceptance messes with cdist
17:54:43 <andythenorth> and AIs
17:55:03 <Borg> yeah.. also would be annoying to me.. to get info that cargo is not accepted w/o serious reason
17:55:11 *** m3henry_ has joined #openttd
17:55:26 <Alberth> I'd just introduce a delay in giving output, process "current waiting input / 10" and give that as output
17:55:58 <Alberth> means you get what you provide, but not instantly
17:56:07 <Borg> Alberth: nah.. cargo drop is instant
17:56:15 <Borg> cargo output is not... so it should not mess w/ simple target
17:56:19 <Alberth> cargo drop is, cargo output is not
17:56:30 <Borg> yep.. so if you have cargo output GS.. then yes
17:56:32 <Borg> it can mess with it
17:56:42 <andythenorth> it's not a problem
17:56:49 <andythenorth> my prejudices aren't golden rules :P
17:57:01 <Alberth> it can't, GS has no influence on output of industries
17:57:28 <Alberth> we fork andy, and change him :)
17:57:49 <Alberth> hmm, perhaps better fork firs 3 :p
18:05:44 <m3henry_> If I wish to submit a fix which closes an issue, should I request closure of the issue after adding the patch in a comment?
18:06:09 *** andythenorth has quit IRC
18:09:30 *** iSoSyS has quit IRC
18:10:27 <Alberth> just mention that it fixes the issue
18:40:42 *** RafiX has quit IRC
18:44:14 <Borg> damn..
18:44:22 <Borg> I reduced distance between signals to 6 tiles...
18:44:29 <Borg> looks and plays better.. but I feel... bad.
18:47:01 <Alberth> openttd is not a simulation of reality :)
18:47:30 <Borg> I know.. but still ;)
18:47:40 <m3henry_> Fair enough, I was just wondering if I'd missed something when fixing FS#6642
18:47:53 <Borg> but anything below that.. is profanation. imo..
18:49:13 <Alberth> slightly longer than the train length seems best to me, but others disagree :)
18:49:52 <Borg> well.. in my case its not an option ;D as I can have 14 tiles long trains here and there
18:49:55 <Borg> I used 8 tiles distance
18:50:03 <Borg> but on curves. calcs were annoying
18:50:19 <Borg> w/6 are much better to perfome.. counting to 5.. and next semaphore
18:51:16 <LordAro> @fs 6642
18:51:16 <DorpsGek> LordAro: http://bugs.openttd.org/task/6642
18:52:00 <LordAro> m3henry_: looks fine, you just have to get someone to notice now
18:55:46 <m3henry_> If it gets left along for a week I'll prod <insert name to prod>
18:56:14 *** iSoSyS has joined #openttd
19:01:29 <LordAro> m3henry_: why wait? Alberth is right here? :p
19:01:54 <Alberth> he is?
19:04:02 <m3henry_> *Falls off chair*
19:06:15 * m3henry_ checks if this is the cmd for this
19:09:03 *** Wolf01 has joined #openttd
19:09:22 <Wolf01> o/
19:10:26 <Alberth> o/
19:11:08 *** glx has joined #openttd
19:11:08 *** ChanServ sets mode: +v glx
19:19:02 *** mindlesstux has quit IRC
19:19:58 *** mindlesstux has joined #openttd
19:45:39 *** andythenorth has joined #openttd
20:04:33 *** roidal has quit IRC
20:18:02 *** m3henry_ has quit IRC
20:25:10 * Wolf01 is counting lego parts from the last order
20:27:55 *** sla_ro|master has joined #openttd
20:30:52 *** Borg has quit IRC
20:41:28 <Alberth> 1, 2, 3, many
20:41:35 *** Alberth has left #openttd
20:57:25 *** RafiX has joined #openttd
21:00:29 *** iSoSyS has quit IRC
21:11:47 *** Gustavo6046 has quit IRC
21:13:37 *** Gustavo6046 has joined #openttd
21:20:24 *** iSoSyS has joined #openttd
21:48:07 <Wolf01> Yes, many
21:48:43 <Wolf01> Just finished counting
21:49:49 <Wolf01> I miss 1 really common part (a technic pin, 39 instead of 40, I needed 27 of them) but I have 1 more of the new quarter round tiles :P
21:50:50 <RafiX> lego?
21:51:00 <glx> what else ? ;)
22:13:14 *** Thedarkb has quit IRC
22:13:14 *** iSoSyS has quit IRC
22:19:39 *** Breckett has joined #openttd
22:29:48 *** sim-al2 has joined #openttd
22:41:09 *** supermop has quit IRC
22:42:19 <Wolf01> It seem I started a constructive discussion for NRT in the forum
22:43:31 <Samu> bah, my poe character died
22:43:44 <Samu> time to play openttd
22:52:32 *** sla_ro|master has quit IRC
22:54:43 *** Breckett has quit IRC
23:00:15 *** Cubey has joined #openttd
23:04:51 *** Guest722 has joined #openttd
23:05:22 <Guest722> hi
23:06:25 <Guest722> question: I'm playing UK v3 scenario with Japanse v3.3 trainset but I don't have multi-carriages for the Shenkansen
23:06:44 <Guest722> how can I fix this?
23:07:22 <Guest722> I tried the trainset add-on but that had version 3.1 orso and gives a conflict
23:07:31 *** Thedarkb has joined #openttd
23:09:21 *** Guest722 is now known as pietje
23:15:57 *** Gustavo6046 has quit IRC
23:18:58 *** Gustavo6046 has joined #openttd
23:20:13 *** Gustavo6046 has quit IRC
23:22:47 *** Gustavo6046 has joined #openttd
23:23:47 *** ZexaronS has joined #openttd
23:27:18 <pietje> has anyone played the UK v3.04a4 scenario? Which trainset works the best?
23:39:02 *** andythenorth has quit IRC
23:46:13 *** mindlesstux has quit IRC
23:46:52 *** mindlesstux has joined #openttd
23:50:38 *** mindlesstux has quit IRC
23:51:23 *** mindlesstux has joined #openttd