Log for #openttd on 29th July 2018:
Times are UTC Toggle Colours
00:03:53  *** keoz has joined #openttd
00:20:36  *** virtualrandomnumber has quit IRC
00:41:26  *** chomwitt has quit IRC
01:54:51  *** keoz has quit IRC
02:10:27  *** Mazur has quit IRC
02:18:54  *** Mazur has joined #openttd
03:09:23  *** Supercheese has quit IRC
03:09:45  *** Supercheese has joined #openttd
03:20:40  *** glx has quit IRC
03:34:30  *** Supercheese has quit IRC
03:43:26  *** haudrauf has quit IRC
03:44:45  *** haudrauf has joined #openttd
04:44:04  *** Alberth has joined #openttd
04:44:04  *** ChanServ sets mode: +o Alberth
05:18:13  *** keoz has joined #openttd
05:33:52  *** FLHerne has quit IRC
05:34:46  *** FLHerne has joined #openttd
05:48:07  *** rp4k has joined #openttd
05:49:09  <rp4k> hello is there an easy way to apply a patch for ottd1.8.0 on windows? me and my friend would like this chatbox patch we found on the forums.
05:49:23  <rp4k>
06:03:47  <Alberth> as soon as you patch, it is not 1.8.0 any more
06:04:26  <Alberth> which means you cannot play a multi-player game with other unpatched 1.8.0 versions
06:05:13  <Alberth> but patching involves getting the source code, getting a compiler, applying the patch to the source code, and compile everything
06:06:13  <Alberth> not terribly complicated, but setting it all up takes time and effort
06:07:58  <rp4k> and what makes it even worse is i run the server off my synology server/docker/contianer
06:08:04  <rp4k> not worth the headache
06:08:20  <rp4k> network_chat_box_width_pct = 40
06:08:21  <rp4k> network_chat_box_height = 5
06:08:21  <rp4k> network_chat_timeout = 180
06:08:26  <Alberth> oh, 2008 i see
06:08:40  <rp4k> these things in settings worked just fine
06:08:47  <Alberth> likely the patch doesn't apply cleanly
06:09:02  <rp4k> we just wanted something easy for us to use to open chat window to see what we had said
06:09:10  <Alberth> which means you have to manually merge it into the source code
06:09:11  <rp4k> but pushing ~ also does this i guess
06:09:45  <Alberth> I typically keep a chat open in another window
06:10:12  <Alberth> ie another application
06:11:56  <Alberth>  you saw this remark?
06:11:57  <rp4k> what application
06:12:56  <Alberth> just a regular chat application, whatever you have
06:14:04  <Alberth> but I have 4 virtual desktops with windows of various applications
06:20:34  *** andythenorth has joined #openttd
06:21:43  <Alberth> it looks like you will have to rewrite the entire window code of that patch
06:22:11  <Alberth> since the window system was rewritten between 2009 and 2011 or so
06:22:14  <Alberth> hi andy
06:22:23  <andythenorth> lo
06:22:48  <andythenorth> seems I msised a lot
06:22:54  <andythenorth> so nml is now xml, right?
06:22:55  <andythenorth> :P
06:23:57  <Alberth> yep
06:24:32  <Alberth> we pondered about xxml, but didn't decide yet
06:25:06  <andythenorth> I wondered about blockchain
06:27:14  <Alberth> I know the word, and its connection to crypto stuff, but how? no clue
06:27:31  <andythenorth> well
06:27:42  <andythenorth> blockchain is a very important tool
06:27:51  <andythenorth> like XML
06:28:04  <Alberth> ah, that makes sense
06:28:11  <andythenorth> its main benefit is the ease with which it extracts money from investors
06:28:27  <andythenorth> if we want to modernise openttd, we should probably consider it
06:28:35  <Alberth> :o  I thought bitcoin did that, or am I too late for that?
06:28:46  <andythenorth> oh you can just start your own coin offering
06:28:48  <andythenorth> it's fine
06:29:00  <andythenorth> then people send you BTC or paypal real $
06:29:05  <andythenorth> then you just abscond with it
06:29:30  <Alberth> sounds good
06:29:42  <andythenorth>
06:30:03  * andythenorth reading about merkle trees
06:30:56  <Alberth> nice
06:39:49  *** nielsm has joined #openttd
06:42:19  <andythenorth> moin nielsm
06:43:14  <nielsm> morning
06:45:18  <Alberth>  macro processor thingie
06:45:35  <Alberth> planetmaker: ^
06:54:50  <andythenorth> Alberth: does that use a new syntax, or the CPP syntax? o_O
06:55:10  <andythenorth> I did read the code first :)
06:55:19  <andythenorth> but not very well
06:55:22  <nielsm> some examples would be nice ;)
06:56:47  <Alberth> it uses new syntax, the readme explains it, although in a very technical manner
06:57:56  <planetmaker> it's somewhat new syntax. But close enough IMHO that 99% can be adopted quickly enough
07:00:11  <Alberth>  some random ogfx+airports code adapted for py-xpd
07:00:13  <planetmaker> rp4k, I suggest to use a client connected to the admin interface to store the ingame chat for longer. Or to open the console of your OpenTTD client
07:00:57  <andythenorth> ok so macros with params
07:01:10  <andythenorth> wonder if I could drop chameleon? o_O
07:01:19  <Alberth> basically #include -> include;   #define -> define ... endmacro  and  remove the \
07:01:38  <Alberth> yes, macros with params, like cpp  :p
07:01:44  <andythenorth> now it just needs loops, string replacement, and the ability to call arbitrary python :D
07:01:54  <andythenorth> oh and conditionals
07:02:08  * andythenorth is probably not the target audience
07:02:34  <Alberth> I think that macro processor already exists, it's called 'python'
07:02:42  <planetmaker> :)
07:03:01  <planetmaker> andythenorth, string replacements is basically one application of 'define'
07:03:02  <Alberth> you may have heard of it :p
07:07:26  <andythenorth> dunno how anyone else writes nml :)
07:07:28  <andythenorth>
07:07:36  <andythenorth> they all seem to do it without loops
07:08:04  <andythenorth> loops are the most basic concept in programming, or at least the first one I learnt
07:08:26  <andythenorth> 10 print [swearwords]
07:08:29  <andythenorth> 20 goto 10
07:08:35  <andythenorth> basically the first program
07:08:57  <Alberth> looping is applying a template 20 times, or 20 includes
07:09:11  <Alberth> once for every thing
07:09:15  <andythenorth> do(20) {loop}
07:09:34  <andythenorth> I am not trying to persuade you to add them :)
07:09:36  <andythenorth> just talking
07:09:43  <Alberth> you make one more step, and have the various slight variations all bundled into one template
07:10:09  <Alberth> so you need to go left or right depending on the variation you generate
07:10:48  <andythenorth> with (vehicle_ids) { template(vehicle_id) }
07:11:05  * andythenorth back to pixels :P
07:11:22  <Alberth> pixel1(); pixel2(); pixel3();  ... :)
07:11:30  <andythenorth> loops with a single parameter are very bad long term
07:11:52  <andythenorth> and params scale horribly
07:11:57  <Alberth> there is a sweet spot somewhere in the middle
07:12:09  <andythenorth> much easier to have a data structure in scope, like....a python class :P
07:12:25  <Alberth> not using templates is bad, trying to squash all complexity into a single template doesn't work either
07:12:46  <andythenorth> the nice thing about using it 20 times
07:12:58  <andythenorth> is there's no separate step to define the vehicle/industry etc
07:13:23  <andythenorth> whereas I have split the configuration step (python files) from the templates (chameleon)
07:13:54  <andythenorth> arguably just calling template_name(parameters) is more direct
07:14:24  <andythenorth> I have a lot more glue in the middle
07:14:41  <andythenorth> Horse sprites: 55% complete
07:14:48  <Alberth> it's a matter of scaling, you can generate several economies all with the same templates
07:15:05  <Alberth> and easily edit/change them
07:15:26  <Alberth> that comes with the cost of clean separation of things
07:15:52  <Alberth> all new horses?
07:16:05  <Alberth> or do you re-use old horses too?
07:18:00  <andythenorth> all new pretty much
07:18:07  <andythenorth> everything at least tweaked, or totally redrawn
07:19:48  <Alberth> yummy!
07:20:33  <andythenorth> Alberth: I forget, did we rewrite nml to use scopes? o_O
07:20:56  * LordAro decides not to go cycling today :(
07:21:11  <Alberth> not that I am aware of, andy
07:21:19  <andythenorth> I think we'd remember that
07:21:37  <Alberth> think so too
07:21:52  <Alberth> no good weather outside LordAro ?
07:21:59  <LordAro> indeed
07:22:00  <LordAro> much wet
07:23:56  <Alberth> :o  it's beautifully sunny, but also with some clouds here, looks like a day for a nice walk
07:23:57  <Alberth> wouldn't you get wet on the inside otherwise?
07:24:30  <LordAro> haha, yes
07:24:39  <LordAro> but there's a point at which you're just having another shower
07:24:44  <LordAro> for 2.5 hours
07:25:54  <Alberth> hmm, bit long eh?
07:27:46  *** Progman has joined #openttd
07:42:26  *** dvim has quit IRC
08:31:49  <planetmaker> andythenorth, there's no scopes in NML so far. As far as I know / remember
08:32:21  <andythenorth> there aren't :)
08:36:22  <Alberth> it came up in a discussion once, we both consider it a good idea :)
08:43:08  <andythenorth> the main appeal for me was partial compiles
08:43:16  <andythenorth> there might be other ways to achieve that
08:43:21  <andythenorth> my solutions are often crude
08:43:40  <andythenorth> scopes is a rudimentary way of being able to link at the end
08:47:35  <Alberth> it's more to avoid so many unique variables
08:48:01  <Alberth> with the messy  bla ## bla  glue hacks in cpp
08:49:21  *** Progman has quit IRC
08:55:52  <andythenorth> and less boilerplate declaring IDs
08:56:04  <andythenorth> oh and less time in the compile resolving varaction 2 IDs
08:56:11  <andythenorth> [unproven]
08:59:21  <nielsm>   hmmmmmm
08:59:28  <Alberth> I'll make a new station nml :p
09:00:07  <andythenorth> nielsm: not resolving strings for non-default cargos?
09:00:11  * andythenorth pure guessing, no clue
09:00:22  <nielsm> yeah, I have no idea what I'm doing here
09:00:29  <Alberth> not enough lines was my guess
09:00:39  <andythenorth> nielsm: have you got a test grf?
09:00:40  <nielsm> it's also not using the right cargoes
09:01:49  <nielsm> oh, I know why that is now
09:03:09  <nielsm> broke the cargo translation table with a dumb mistake
09:07:13  <Alberth> do smart mistakes exist?
09:10:43  *** chomwitt has joined #openttd
09:13:36  <Alberth> bbl
09:13:37  *** Alberth has left #openttd
10:03:38  *** Wormnest has joined #openttd
10:32:37  *** chomwitt has quit IRC
10:36:01  *** frosch123 has joined #openttd
11:04:24  *** chomwitt has joined #openttd
12:17:06  *** Alberth has joined #openttd
12:17:06  *** ChanServ sets mode: +o Alberth
13:01:18  <andythenorth> well
13:05:18  <nielsm>
13:05:21  <nielsm> not quite right...
13:08:08  *** Kippers has joined #openttd
13:15:08  <andythenorth> not bad though eh
13:15:29  <andythenorth> tells me that I rarely want to use more than 4 :P
13:17:17  <andythenorth> it has one really nice benefit for FIRS though
13:17:21  <nielsm> actual problem seems to be that town houses that should accept more cargoes are not
13:17:38  <andythenorth> I can consolidate the ports to just 1 or 2 types, instead of 3 or 4
13:17:45  <andythenorth> it will make for much more playable maps
13:19:29  <Kippers> How do I generate a new string table? Trying to add the new russian ruble to the game, but I'm unsure how to declare the game options string
13:20:01  <nielsm> the makefile (or visual studio project) automatically does that if you modify english.txt
13:20:32  <Alberth> usually with strgen, not sure if that program is downloadable
13:20:32  <Kippers> Ok, I'll give it a shot
13:20:40  <nielsm> so step 1 modify english.txt to add new strings, recompile, step 2 use new string constants in code, recompile
13:20:48  <nielsm> and step 3 make translations
13:21:23  <Kippers> Ah, better cut out my code snippet then
13:22:12  <nielsm> well you might get a compile failure the first time
13:22:31  <nielsm> but it shouldn't really hurt to begin using the new strings before strgen'ing them for english base
13:22:53  <nielsm> (just compile once more when the new headers are generated too)
13:25:22  *** masse has quit IRC
13:26:55  <Kippers> By the way, what is the text encoding for OTTD? I'd like to add the cyrillic characters for the ruble while I'm at it
13:27:21  <nielsm> utf8
13:27:26  <Kippers> Ok
13:27:57  <nielsm> don't expect cyrillinc to show correctly for players using bitmap fonts (the default for english)
13:27:59  <nielsm> -n
13:30:00  <Kippers> So I shouldn't add a cyrillic postfix?
13:30:58  <nielsm> not for the base english no
13:31:22  <nielsm> unless you also add some supplement characters to the base grf files
13:32:29  <Kippers> Welp, "rub" postfix it is
13:34:35  <Kippers> Now that I've added the string constants in the english set, how do I add the translations?
13:34:48  <Kippers> Just a recompile?
13:35:19  <Kippers> Or do I have to manually add the string for every language?
13:35:38  <nielsm> it's okay to leave other translations without the new string
13:35:52  <nielsm> the eints web translator handles that correctly
13:36:45  <Kippers> So I just need to commit after having added the string to the english set, right?
13:37:15  <nielsm> yep
13:37:53  <Kippers> I'll go mess with git then
13:50:11  <planetmaker> Kippers, translations are entirely handled by the translations system. No translations shall be changed via code commits
13:52:06  <planetmaker> Only add the new string in default english language file
13:58:42  <Kippers> Good, because that's what I did
13:58:43  <nielsm> ah that looks right:
13:59:07  <nielsm> (confusing, but not wrong)
13:59:25  <nielsm> (need to figure out what the little squares at the bottom are)
14:00:15  <Alberth> vertical connections aren't entirely centered between the industries, are they?
14:00:30  <Kippers> I also made a pull request with my mediocre git abilities
14:00:44  <Alberth> maybe they never were, I don't remember :p
14:10:34  *** Kippers has quit IRC
14:27:39  *** Kippers has joined #openttd
14:28:56  <planetmaker> nielsm, increasing the cargo acceptance and production numbers per industry?
14:29:03  <nielsm> planetmaker yep
14:29:09  <planetmaker> <3 :)
14:29:23  <nielsm> "almost working", so only the hard work left
14:29:41  <planetmaker> hehe. nasty 80:20 rule :)
14:30:04  <nielsm> someone needs to extend NMLC to support the new properties and callbacks
14:30:23  <planetmaker> for your new cargo capabilities?
14:30:25  <nielsm> and make something more advanced than I can figure out how to hack up in nfo
14:30:30  <nielsm> yeah
14:31:02  <planetmaker> andythenorth, will be your friend for (ab)using all the cargoes you throw at him ;)
14:31:18  <nielsm> I know, he's already drooling :P
14:41:01  *** sim-al2 has quit IRC
14:43:42  <planetmaker> Kippers, can you explain to me: what's the difference between the rubel and the new rubel? There's a difference in the conversion to the game currency... but actually different to what I'd expect (things get more expensive instead of cheaper, while in reality 3 zeroes got cut off)
14:50:22  <andythenorth> is nml in openttd github yet? o_O
14:52:02  <planetmaker> didn't seem so
14:52:47  <andythenorth> it looked close though
14:57:57  <Kippers> planetmaker, I looked up the conversion factor for GBP to RUB, and used that in the exchange rate. I just assumed that was how it was supposed to work. Did I mess it up?
15:00:48  <planetmaker> no, that's how it works... though iirc usually the conversion at 1950 is used - which arguably is difficult - and is of limited value as exchange rates may vary wildly as time progresses
15:01:24  <planetmaker> I rather wonder whether it shouldn't work like the Euro: the RUR is transformed to the RUB at the given date
15:02:16  <Kippers> I didn't mess with converting old ruble to new ruble at a certain date, though I wondered if I should
15:02:29  <Kippers> Maybe that's the next thing I'll get my hands dirty with
15:02:58  <Kippers> Seems like a decent beginner issue
15:03:19  <planetmaker> was the RUR the currency used in the Soviet union, too? How did it go with the currencies of the other former Soviet states?
15:03:40  <Kippers> IIRC they used the SUR
15:04:05  <Kippers> Dunno about the rest of the eastern bloc
15:07:00  <planetmaker> they had their own currencies - if they were not part of the SU.
15:08:13  <Kippers> So Yugoslavia and the like
15:08:31  <Kippers> Though they were never really soviet to begin with
15:09:47  <planetmaker> wiki suggests that for Russia there was no new currency when the SU fell apart. Just differently-looking bills and coins, but no reform with different exchange rates or so
15:10:36  <Kippers> Maybe they used potato as currency
15:11:18  <Kippers> Anyway, should I update the old ruble conversion value to match a more modern value, or is it irrelevant?
15:11:19  <planetmaker> Using Rubel is older than the potatoe is known in Europe ;)
15:11:58  <Kippers> Before then, it was merely a slavic dream
15:11:59  <frosch123> Kippers: some newgrf try to assign the historical prices to vehicle
15:12:18  <frosch123> changing currency conversions has no effect other than upsetting those people :)
15:12:24  <Kippers> Fair enough
15:12:36  <Kippers> I'll not mess with it then
15:15:15  <Alberth> 0 * 4 165.000000 19.000000 0.000000 0.000000     haha, nice sprites :p
15:16:13  <frosch123> i think you overdid it with the floating spec
15:17:02  <michi_cc> Ladies and Gentlemen, please have a close look at (where's our announce bot, TB? :p)
15:19:10  <planetmaker> \o/
15:27:16  <nielsm> frosch123: so if following your idea, you'd add a flag on the industry that indicates "all tiles accepts all input cargo types", which is tested in the IndustryTileAccepts function, and if set all cargos from the industry are automatically added
15:27:37  <nielsm> then you can keep using prop 0A 0B 0C on industry tiles to add extra accpted cargos for some tiles
15:28:16  <nielsm> and maybe extend those properties so the acceptance amount is taken as a signed value (when the "all tiles accept everything" flag is set) so you can instead subtract acceptance from some tiles
15:28:26  <nielsm> and not add any more properties or callbacks on industry tiles at all?
15:29:34  <frosch123> i meant a flag for the tile, not for the industry
15:29:42  <frosch123> all other options are left open
15:31:31  <frosch123> one could also add an optional property like the new industry property 25 to list all accepted cargos of a cargo, which would still duplicate thoe from the industry...
15:32:24  <frosch123> anyway, my concern is mainly about the tile callbacks. they multiply the cpu resources by the number of tiles of an industry (so like 20x-40x) without adding any functionality)
15:32:46  <nielsm> I did add industry tile prop 13 which lists all accepted properties for the tile
15:33:00  <nielsm> in variable length format
15:33:17  <frosch123> yes, something like that
15:33:39  <nielsm>
15:33:43  <nielsm> my test nfo
15:34:35  <frosch123> i hope you did not count the bytes manually :)
15:34:50  <nielsm> approximated and let grfcodec do that :)
15:35:08  <frosch123> usually peoply just write "-1 * -1"
15:35:09  <nielsm> I can't find anything about a syntax that lets it calculate lengths for me
15:35:36  <frosch123> nfo syntax is a bit of a mess :p those values are just ignored
15:35:42  <frosch123> just like the "do not modify" :p
15:49:57  <nielsm> a slightly improved nfo format with macros, but nothing as "understanding" as nml, could be useful
15:50:18  <frosch123> m4nfo :p
16:18:05  <peter1138> Nobody understands m4.
16:19:41  <Alberth> it's not that difficult, just lots of quotes :p
16:20:44  <frosch123> they thought lisp is hard to read because of all the ( ), so they used ` ยด instead
16:23:27  <Alberth> something like that :)
16:24:49  <Alberth> could use tcl, also has lots of quotes, since everything is a string
16:25:29  <frosch123> i think it has way more \ than quotes
16:26:02  <frosch123> they say, c beginners randomly add * and & until it compiles
16:26:18  <frosch123> when i use tcl, i usually have to incrementally add more \
16:26:44  <Alberth> oh, didn't use tcl for long, basically until I found Python 1.5.2 :p
16:28:58  <frosch123> what was the main change for python1 -> 2?
16:32:32  <frosch123> hmm... i thought unicode is one of the main features of python3 (strings vs bytes)... but it is also listed for python 2 vs 1 :p
16:32:59  <nielsm> python3 made unicode the default
16:33:11  <nielsm> python2 might have made it possible
16:39:55  <Alberth> from what I remember, the main change was a better class system
16:41:02  <Alberth> python3 has the string/bytes distinction enforced, you have to go through a codec from external to internal and vice versa
16:41:21  <frosch123> i expected you to say "list comprehension"
16:41:21  <Alberth> python2 had unicode, but it was all string
16:42:10  <Alberth> in that case, generators :)
16:43:01  <Alberth> where values are computed on the fly, at the moment they are needed
16:44:39  <Alberth> so no large intermediate lists that are passed around between functions, but a generator object
16:44:51  <Alberth> ie "yield" statement
16:47:51  <Alberth> list comprehension wasn't new to me, I already encountered it in a functional programming language :)
16:48:06  <frosch123> <- most irritating is the text on sourceforge
16:48:46  <Alberth> I also already implemented list comprehensions in a language as graduation project :)
16:54:33  <Alberth> back then, sourceforge was useful :)
18:17:45  <nielsm> hmm... what the little stubs look like if I revert the change that makes the industry chain window small again:
18:18:05  <nielsm> rather interesting they bottom align
18:18:59  <Alberth> you can analyze the max number of connections
18:19:53  <Alberth> what if you made the lines smaller?
18:20:11  <nielsm> that's the other option, just scaling them down
18:20:32  <nielsm> but you still want them large enough to hit with a mouse (or a fat finger groping the screen)
18:20:33  <Alberth> I made them this big as it looks good, and you can easily click them, but if you make the name clickable instead or so
18:21:01  <Alberth> or some rectangle somewhere
18:21:21  <Alberth> hmm, a row at the bottom?
18:21:36  <Alberth> non-scrolled :p
18:21:59  <Alberth> you have at most 32 cargoes
18:26:23  <frosch123> 64 :)
18:27:12  <frosch123> i wonder when people will request more palette colors
18:28:01  <nielsm> here's another solution failure I tried:
18:29:04  <nielsm> there's at most 16 connected bars of cargo in each "connection column", and each edge of an industry has at most 16 connections
18:29:32  <nielsm> but there could be up to all 64 different cargoes represented on a single display of this, via the stubs
18:30:18  <nielsm> it needs to place the stubs in the empty slots on each industry, starting from the top
18:36:12  *** keoz has quit IRC
18:52:06  *** Supercheese has joined #openttd
19:06:19  <Alberth> click on the industry, and the row display the industry input/output?
19:07:38  <nielsm> "don't draw non-participating cargoes" is also a potential solution :P
19:08:51  <Alberth> you can click them to change cargo you display currently :p
19:10:22  <frosch123> is there some way to blame the grf? :p
19:13:04  <nielsm> don't think so, the cargo order gets shuffled around during the graph construction!
19:14:22  <andythenorth> I am not convinced we need the stubgs
19:14:24  <andythenorth> stubs *
19:14:46  <andythenorth> they're nice, but I didn't realise what they did until I read ^^^^
19:16:53  <Alberth> functionality hidden in plain sight :p
19:17:06  <Alberth> I agree it could use a hover text
19:18:29  <nielsm> unrelated,
19:22:26  <Alberth> nice picture
19:26:31  <planetmaker> is it picture time? :D
19:26:47  <frosch123> run!
19:27:14  <nielsm> is there ever a time on the internet where it's inappropriate to post pictures of animals?
19:27:24  <nielsm> (especially pets)
19:28:32  <planetmaker> probably :)
19:28:35  *** keoz has joined #openttd
20:12:23  *** glx has joined #openttd
20:12:23  *** ChanServ sets mode: +v glx
20:16:53  *** Alberth has left #openttd
20:23:59  *** Kippers has quit IRC
20:32:01  *** sim-al2 has joined #openttd
20:37:59  *** Kippers has joined #openttd
20:59:18  *** frosch123 has quit IRC
21:10:05  *** Kippers has quit IRC
21:10:39  *** Supercheese has quit IRC
21:11:01  *** Supercheese has joined #openttd
21:26:17  *** andythenorth has left #openttd
22:08:29  *** Wormnest has quit IRC
22:32:31  *** nielsm has quit IRC
23:51:17  *** chomwitt has quit IRC

Powered by YARRSTE version: svn-trunk