IRC logs for #openttd on OFTC at 2017-11-02
⏴ go to previous day
00:03:20 <Samu> cargodist allows some really weird stuff
00:03:51 <Samu> i can deliver passengers from an oil rig to itself and make a profit!
00:10:20 <Samu> i was always suspicious of something wrong happening with cargo dist
00:14:23 <Samu> okay so it isn't cargodist bugged, it's something else, grrr must find out
00:17:22 *** Guest8054 is now known as Prof_Frink
00:18:02 *** Prof_Frink is now known as Guest8057
00:21:47 <Samu> the industry itself does not require passengers, but one of the industry tiles accepts passengers
00:23:26 <Samu> the tile is making so that passengers produced by the industry can be delivered to that tile
00:29:18 <Samu> it seems to require 3 stations with transfers going around
01:18:23 *** Guest8057 is now known as Prof_Frink
01:19:02 *** Prof_Frink is now known as Guest8058
02:19:23 *** Guest8058 is now known as Prof_Frink
02:20:02 *** Prof_Frink is now known as Guest8060
02:23:57 *** Mahjong1 has joined #openttd
03:20:23 *** Guest8060 is now known as Prof_Frink
03:20:56 *** Prof_Frink is now known as Guest8063
04:21:24 *** Guest8063 is now known as Prof_Frink
04:21:56 *** Prof_Frink is now known as Guest8067
05:22:24 *** Guest8067 is now known as Prof_Frink
05:22:56 *** Prof_Frink is now known as Guest8070
05:45:34 *** ToffeeYogurtPots has quit IRC
05:46:05 *** ToffeeYogurtPots has joined #openttd
06:09:42 *** sla_ro|master has joined #openttd
06:23:12 *** Guest8070 is now known as Prof_Frink
06:23:45 *** Prof_Frink is now known as Guest8075
07:24:13 *** Guest8075 is now known as Prof_Frink
07:24:45 *** Prof_Frink is now known as Guest8077
07:41:13 *** PressureLine has joined #openttd
07:47:55 <PressureLine> damn slow Czarist trains
07:55:58 *** tokai|noir has joined #openttd
07:55:58 *** ChanServ sets mode: +v tokai|noir
08:25:13 *** Guest8077 is now known as Prof_Frink
08:25:45 *** Prof_Frink is now known as Guest8080
08:30:52 *** ToffeeYogurtPots has quit IRC
09:05:56 *** ToffeeYogurtPots has joined #openttd
09:26:13 *** Guest8080 is now known as Prof_Frink
09:26:45 *** Prof_Frink is now known as Guest8082
09:47:00 *** Progman has joined #openttd
10:05:46 *** mindlesstux has joined #openttd
10:10:21 *** Breckett has joined #openttd
10:23:21 *** mindlesstux has joined #openttd
10:27:14 *** Guest8082 is now known as Prof_Frink
10:27:45 *** Prof_Frink is now known as Guest8086
11:10:01 *** ToBeFree has joined #openttd
11:16:29 *** mindlesstux has joined #openttd
11:28:14 *** Guest8086 is now known as Prof_Frink
11:28:45 *** Prof_Frink is now known as Guest8089
11:29:52 *** andythenorth has joined #openttd
11:30:02 <andythenorth> Talgo train in Spain
11:30:06 *** andythenorth has left #openttd
12:08:23 *** mindlesstux has joined #openttd
12:29:14 *** Guest8089 is now known as Prof_Frink
12:29:46 *** Prof_Frink is now known as Guest8092
13:27:02 *** ToffeeYogurtPots has quit IRC
13:27:45 *** ToffeeYogurtPots has joined #openttd
13:30:15 *** Guest8092 is now known as Prof_Frink
13:30:55 *** Prof_Frink is now known as Guest8095
14:21:31 *** Biolunar has joined #openttd
14:31:15 *** Guest8095 is now known as Prof_Frink
14:31:55 *** Prof_Frink is now known as Guest8100
14:38:34 *** onironauta has joined #openttd
14:43:01 <Wolf01> Sure it's morning somewhere in the world
14:43:28 <__ln__> not if you believe earth is flat
14:47:24 *** ToffeeYogurtPots has quit IRC
14:53:57 *** ToffeeYogurtPots has joined #openttd
15:14:40 *** Gustavo6046 has joined #openttd
15:32:15 *** Guest8100 is now known as Prof_Frink
15:32:55 *** Prof_Frink is now known as Guest8104
15:41:07 *** Breckett has joined #openttd
16:00:01 *** Gustavo6046 has joined #openttd
16:04:54 *** Gustavo6046 has joined #openttd
16:16:37 *** Thedarkb has joined #openttd
16:25:33 *** frosch123 has joined #openttd
16:33:16 *** Guest8104 is now known as Prof_Frink
16:33:55 *** Prof_Frink is now known as Guest8108
16:36:27 <FLHerne> Hey, even the great Gene Ray accepted that it's always morning somewhere
16:42:20 <FLHerne> "You are not allowed to know truth - that in one rotation of Earth, there are:
16:42:28 <FLHerne> * 24 hours in midnight to midnight.
16:42:35 <FLHerne> * 24 hours in sunup to sunup...........
16:42:56 <FLHerne> * 24 hours in midday to midday.....
16:43:10 <FLHerne> * 24 hours in sundown to sundown.
16:43:22 <FLHerne> (IRC formatting can't really do Time Cube justice)
16:44:15 <FLHerne> * 4 days in only 1 Earth rotation...
16:44:24 <FLHerne> * 4 simultaneous years of the seasons.
16:44:55 <Rubidium> except that the earth doesn't do 1 rotation in 24 hours
16:45:19 <FLHerne> * No infinite days within 96 hours.
16:45:52 <FLHerne> * 4 different directions in clockwise.
16:46:16 <FLHerne> * 3 days lost to academic stupidity.
16:47:53 *** Gustavo6046 has joined #openttd
16:48:01 <FLHerne> Rubidium: How dare you?! Teaching that Earth has only 1 day in 1 rotation, is adult poison forced on their children, as in the Jonestown mass murder.
16:48:10 <FLHerne> You shouldn't assert such evil things.
16:56:06 <Samu> I dunno how to ask this of you
16:57:54 <LordAro> Samu: that StationLidt thing you were on a few days ago was a smallvector
16:58:33 <Samu> i'm back to it again, how did u guess
16:58:50 <Samu> bool Include (const T &item) Tests whether a item is present in the vector, and appends it to the end if not.
16:59:22 <Samu> instead of appending it to the end, I insert it somewhere between two other items
17:00:43 <Samu> trying to sort by insertion
17:03:58 <LordAro> QSortT is already a thing
17:04:04 <LordAro> whatever you're trying sounds awful
17:17:56 <LordAro> Samu: hint, exactly the same interface as qsort
17:27:35 *** HerzogDeXtEr has joined #openttd
17:34:16 *** Guest8108 is now known as Prof_Frink
17:34:55 *** Prof_Frink is now known as Guest8111
17:40:20 *** Thedarkb has joined #openttd
17:40:40 *** TheMask96 has joined #openttd
17:45:51 *** oskari89 has joined #openttd
17:57:51 <Samu> LordAro: how do I pass the cargo type in the comparator?
18:01:05 <LordAro> i think you can do something with a comparator "object"
18:01:17 <Samu> static int CDECL CompareCargoRatings(Station * const *a, Station * const *b) { return (*b)->goods[type].rating - (*a)->goods[type].rating; }
18:09:57 <LordAro> sorry, i believe "comparison functor" is the more usual term
18:10:45 <LordAro> essentially you have a class with some state (type), and an operator() overload for the types you're interested in (Station *...)
18:10:51 <LordAro> i *think* that will work
18:11:04 <LordAro> there's an example in src/linkgraph.mcf.cpp, but it's a bit templatedised
18:13:30 <Samu> i feel like copy pasting GSortT and adapt the comparator in it
18:15:12 <supermop> Wolf01: a suggestion to add to grf?
18:15:21 <LordAro> but yes, that will work
18:15:39 <Wolf01> supermop: it might be an interesting theme
18:15:51 <LordAro> Samu: well no, you don't copy that
18:16:48 <LordAro> Samu: if you could use C++11, i'd just say that you should just use a lambda
18:16:58 <LordAro> but alas ottd is not there yet
18:17:28 <Samu> qsort.cpp is a microsoft file :(
18:17:47 <LordAro> qsort.cpp is microsoft's implementation of the POSIX function qsort
18:17:59 <LordAro> it's part of the standard library and no one is suggesting that you even look at that file
18:18:12 <supermop> Wolf01: current project is generating arbitrarily many random gourds for autumnal decoration
18:25:59 <supermop> maybe i'll add some lumpiness
18:26:49 <Cubey> Neat but you've gotta bend the central axis somehow
18:28:26 *** Gustavo6046_ has joined #openttd
18:30:45 <supermop> Cubey: considered it but probably won't
18:31:20 <Cubey> You're in the uncanny valley of gourds!
18:31:27 <supermop> only really long necked gourds really have that, and then they might look like dicks
18:31:38 <supermop> uncanny valley is sort of the point
18:31:46 <Cubey> Ah yeah I guess that would be a problem
18:32:18 <supermop> going to use like 80s graphic patterns for the gourd skin
18:32:28 <Cubey> Some of those bowling pin looking ones just don't look right to me... making them gnarly and lumpy would probably help though
18:33:36 <Cubey> This is neat though, I don't know exactly what it is but it looks like you set up parameters for procedurally generating a 3D model as a graph
18:33:46 <Cubey> And gourds are a great candidate for procedural generation
18:33:54 <supermop> well can add bump or displacement maps when rendering
18:34:43 <supermop> exactly, as they are sort of modular in their growth, despite having a huge diversity of shapes
18:35:21 *** Guest8111 is now known as Prof_Frink
18:35:55 *** Prof_Frink is now known as Guest8112
18:36:01 *** ToffeeYogurtPots has quit IRC
18:36:52 *** Gustavo6046 has joined #openttd
18:36:54 *** ToffeeYogurtPots has joined #openttd
18:40:57 <supermop> hmm seems most decorative gourds have 10 radial segments
18:41:40 <supermop> i sort of expected it to be an even distribution over a range of values
18:44:22 <supermop> also currently in the 'fat' part of the gourd, i have the radius vary randomly, and just discard seed values that do not produce good looking results
18:44:52 <supermop> whereas i should make some rules about what range they can have
18:45:45 <Samu> that's what i got, pseudo-copy of my code
18:46:49 <LordAro> i know what you've got
18:47:28 <Samu> CompareCargoRatings doesn't compile
18:47:38 <Samu> doesn't know the variable type
18:47:54 <LordAro> i understand what's going on, there's no need to repeat it
18:50:48 <Samu> QSortT<Station *>(used_stations.Begin(), used_stations.Length(), CompareCargoRatings "insert variable 'type' somewhere here to pass it to the comparator");
18:52:38 *** ToffeeYogurtPots has quit IRC
18:53:29 *** ToffeeYogurtPots has joined #openttd
18:59:03 <LordAro> Samu: however, i'm not sure there is actually a good solution with <C++11
18:59:19 <LordAro> a global variable would work
18:59:41 <Samu> hmm go easy on me, a global variable, like how :(
19:00:04 <LordAro> as in, declare a variable (CargoType or w/e) outside of a function
19:00:08 <LordAro> and refer to it that way
19:00:17 *** blathijs has joined #openttd
19:00:24 <LordAro> it's not good, but i can't actually think of another way to do it with qsort
19:03:13 <Samu> CargoID this_is_a_global_variable;
19:03:24 *** ToffeeYogurtPots has quit IRC
19:03:28 <Samu> return (*b)->goods[this_is_a_global_variable].rating - (*a)->goods[this_is_a_global_variable].rating;
19:03:42 *** ToffeeYogurtPots has joined #openttd
19:07:07 <Samu> that seems tohave worked
19:09:27 *** Thedarkb has joined #openttd
19:09:42 <Samu_> do i relly have to use QSortT? isn't GSortT better?
19:09:51 <Samu_> at least I understand what it's doing
19:10:12 <LordAro> those are not equivalent :p
19:10:29 <LordAro> qsort is an implementation of quicksort, that is in nearly all cases faster than gnome sort
19:10:40 <LordAro> you should only use GSort if you know that you need to
19:13:03 <as> you know if some servers will organize tournament soon
19:18:58 <Samu> sorry my internet today is doing weird stuff
19:23:54 <Samu> yeah, global variable was just what I needed, thx
19:24:28 <Samu> static CargoID cargotype;
19:26:20 <Samu> not really sure about QSortT vs GSortT, they seem to produce the same result
19:31:32 <LordAro> Samu: of course they produce the same result
19:31:42 <LordAro> what on earth did you expect?
19:31:57 <LordAro> if your sorting is nondeterministic, you have problems
19:32:28 <Samu> the code of qsort looks much larger
19:34:23 *** Gustavo6046 has joined #openttd
19:34:32 <LordAro> Samu: go look up sort algorithms
19:35:06 <Samu> GSortT is about 40 lines, the other is 380 lines of code
19:36:21 *** Guest8112 is now known as Prof_Frink
19:36:55 *** Prof_Frink is now known as Guest8115
19:41:04 <Samu> it's much easier to follow GsortT
19:41:04 <LordAro> i am quite capable of reading source code
19:41:21 <Samu> i dunno, seems too complex to be quicker
19:43:29 <LordAro> you should look inside some other standard library files some time
19:43:46 <LordAro> of course they're complicated, they're highly optimised
19:45:46 <DorpsGek> Commit by translators :: r27930 trunk/src/lang/simplified_chinese.txt (2017-11-02 19:45:39 +0100 )
19:45:48 <DorpsGek> chinese (simplified): 2 changes by yfdyh000
19:55:56 *** andythenorth has joined #openttd
19:59:59 <supermop> ok i think i have it so gourds only vary on 9 variables now
20:00:28 *** gelignite has joined #openttd
20:00:28 <supermop> should be pretty easy to manually look through millions to find 20 or so that look best
20:01:09 <andythenorth> write an AI to do it ;)
20:03:18 <supermop> wife suggested genetic algorithm
20:03:34 <supermop> and grasshopper comes with evolutionary solver
20:03:48 <Samu> anyway, now that I got all stations sorted by rating
20:04:29 <supermop> but hard to define fitness for 'some bumpy, some smooth, basically looking like a variety of gourds'
20:04:53 <supermop> unless you have already trained something on millions of photos of gourds
20:05:10 <supermop> if i had a million photos of gourds, wouldn't need to generate them
20:06:02 <supermop> Samu: want to write an AI to select nice looking autumnal decorative gourds?
20:08:47 <Samu> i don't know how to write an AI
20:12:15 * andythenorth got a new computer
20:12:22 <andythenorth> compile is still super slow though :P
20:16:21 *** Thedarkb has joined #openttd
20:17:25 <andythenorth> should I add tyres? o_O
20:18:25 <ST2> andythenorth: and engines... how do you make vehicles xD
20:18:58 <andythenorth> from the foundry
20:19:18 <andythenorth> I tried 'powertrain components' for a while, was weird, dunno why
20:24:52 *** sla_ro|master has joined #openttd
20:30:33 *** andythenorth has joined #openttd
20:37:21 *** Guest8115 is now known as Prof_Frink
20:37:57 *** Prof_Frink is now known as Guest8120
20:49:30 *** Gustavo6046_ has joined #openttd
21:04:37 *** Gustavo6046 has joined #openttd
21:19:49 *** Gustavo6046 has joined #openttd
21:38:22 *** Guest8120 is now known as Prof_Frink
21:38:57 *** Prof_Frink is now known as Guest8126
22:15:49 *** Gustavo6046_ has joined #openttd
22:30:24 *** andythenorth has joined #openttd
22:39:22 *** Guest8126 is now known as Prof_Frink
22:39:57 *** Prof_Frink is now known as Guest8129
22:52:03 <andythenorth> can I delete Food?
22:52:13 <andythenorth> then I can add Tyres
22:52:43 <Wolf01> Replace it with tyres, deliver tyres to people homes
23:01:42 <frosch123> andythenorth: i wondered whether vehicled bodies should be renamed to sheet metal
23:02:04 <frosch123> wondering about vehicle graphics for it
23:02:18 <andythenorth> they are trucks with blacked out windows :)
23:02:29 <andythenorth> it used to be galvanised steel
23:02:33 <frosch123> also, what cargo has the TE_WATER?
23:03:10 <andythenorth> none currently :P
23:03:23 <andythenorth> TE is probably quite broken in FIRS
23:03:34 <andythenorth> I haven't paid attention to it
23:03:47 <frosch123> so, you already broke tropic
23:03:55 <frosch123> also break arctic by removing food?
23:04:11 <frosch123> vehicles can take the role
23:06:30 <andythenorth> I should unbreak tropic eh :P
23:07:21 <frosch123> anyway, the main argument for/against raising the cargo limit seems to be whether it is good or bad for andy's health
23:11:41 *** ToBeFree has joined #openttd
23:13:04 <andythenorth> I never wish for more
23:13:15 <andythenorth> whereas I often wish for 3 output cargos
23:14:02 <supermop> broke grasshopper with myriads of gourds
23:14:16 <frosch123> ok, 8 input, 8 output? or other numbers?
23:14:29 <frosch123> any other kind of effect?
23:14:29 <andythenorth> 3 input, 3 output
23:15:16 <frosch123> in the past we talked about electricity, but in the end it was not considered good
23:15:29 <andythenorth> V453000 also talked about electricity
23:15:44 <andythenorth> I would do electricity per tile :P
23:15:49 <andythenorth> or per region of tiles
23:15:49 <frosch123> afaik noone used the things that were added to make industries talk between each other
23:16:06 <andythenorth> industries can talk between each other? :o
23:16:27 <frosch123> industries within a town can talk to each other
23:16:35 <andythenorth> I thought it was deleted from spec
23:17:08 <frosch123> town persistent storage was implemented like 5 years ago :p but i do not recall ever being used
23:17:12 <andythenorth> maybe I looked in wrong places in docs
23:17:21 <andythenorth> I looked recently, I had silly ideas
23:18:43 <andythenorth> ok, so it does exist
23:18:52 * andythenorth might have to revisit silly ideas
23:19:43 <andythenorth> means electricity and gas are possible
23:40:22 *** Guest8129 is now known as Prof_Frink
23:40:57 *** Prof_Frink is now known as Guest8135
23:54:57 *** Thedarkb has joined #openttd
23:55:47 <Samu> how do I iterate backwards? :(
continue to next day ⏵