IRC logs for #openttd on OFTC at 2020-04-17
            
00:01:00 *** sla_ro|master has quit IRC
00:07:30 *** Wolf01 has quit IRC
00:25:56 *** nielsm has joined #openttd
01:13:31 *** rotterdxm has quit IRC
01:43:02 *** gelignite has quit IRC
01:46:54 *** k-man_ has joined #openttd
01:53:28 *** k-man has quit IRC
02:30:14 *** Smedles has quit IRC
02:31:28 *** Smedles has joined #openttd
03:43:21 *** Flygon has joined #openttd
04:20:18 *** adikt has quit IRC
04:21:54 *** adikt has joined #openttd
04:24:51 *** glx has quit IRC
04:36:57 *** debdog has joined #openttd
04:40:21 *** D-HUND has quit IRC
05:23:26 *** Wormnest has quit IRC
05:54:41 <DorpsGek_III> [OpenTTD/OpenTTD] lanurmi commented on issue #8088: More than 327 Finnish cities or towns cannot be created. https://git.io/JfvNr
05:57:56 *** Smedles has quit IRC
05:59:09 *** Smedles has joined #openttd
06:08:19 *** Wormnest has joined #openttd
06:34:24 *** snail_UES_ has quit IRC
08:01:39 *** Gustavo6046_ has joined #openttd
08:03:18 *** Gustavo6046 has quit IRC
08:29:41 *** andythenorth has joined #openttd
08:37:41 <DorpsGek_III> [OpenTTD/bananas-frontend-web] auge8472 commented on pull request #7: Changes to the page header https://git.io/JffNM
08:47:12 *** sla_ro|master has joined #openttd
08:53:57 <andythenorth> o/
09:15:17 *** rotterdxm has joined #openttd
09:58:43 <DorpsGek_III> [OpenTTD/OpenTTD] giordy commented on issue #7525: Autorenew vehicle option to Basic settings https://git.io/fjOmN
09:59:18 <DorpsGek_III> [OpenTTD/OpenTTD] giordy commented on pull request #7729: Add: Allow autoreplace with same model vehicle https://git.io/JfJvU
10:10:14 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on issue #8088: More than 327 Finnish cities or towns cannot be created. https://git.io/JfvNr
10:22:29 *** cHawk- has joined #openttd
10:24:11 *** cHawk has quit IRC
10:52:40 *** WormnestAndroid has quit IRC
10:52:53 *** WormnestAndroid has joined #openttd
10:56:54 *** Artea has quit IRC
11:36:55 *** Wolf01 has joined #openttd
11:48:59 *** Samu has joined #openttd
11:59:52 *** gelignite has joined #openttd
12:24:41 *** rotterdxm has quit IRC
12:25:00 *** rotterdxm has joined #openttd
12:46:33 *** supermop_Home has quit IRC
13:02:53 *** arikover has joined #openttd
13:03:53 *** rotterdxm has quit IRC
13:35:40 *** tokai has joined #openttd
13:35:40 *** ChanServ sets mode: +v tokai
13:42:26 *** tokai|noir has quit IRC
13:49:23 *** arikover has quit IRC
13:59:10 <TrueBrain> andythenorth : orudge has no time to check with a notary; how about you? :p (see my gist about legal entity)
13:59:46 * andythenorth reads the gist again
14:00:47 <orudge> Happy if somebody can get formal advice
14:00:56 <orudge> With 3 kids at home just now it's just not something I have time to do I'm afraid!
14:01:12 <orudge> The actual company admin though is minimal, for that I can speak from experience, and it is very inexpensive here
14:01:24 <orudge> But now, lunch
14:03:08 <andythenorth> I commented briefly
14:03:53 <andythenorth> I have earned myself a 44 hour working week, not bad when Monday was a holiday, must go, I will be back later
14:14:48 *** mindlesstux6 has joined #openttd
14:27:06 <planetmaker> enjoy your weekend then :)
14:36:51 <peter1138> Yes, my beer arrived :D
14:37:10 <peter1138> Admittedly about 2x the supermarket price, but hey...
14:45:41 *** gelignite has quit IRC
15:06:39 <TrueBrain> andythenorth : in that case, forget I asked plz :)
15:06:58 <andythenorth> Tl;DR stichting
15:17:10 *** snail_UES_ has joined #openttd
15:22:34 *** gelignite has joined #openttd
15:23:35 *** supermop_Home_ has joined #openttd
15:30:33 <TrueBrain> Yeah, seems to be either short term do UK or do more longterm in NL. The NL variant has more protection in terms of legislation meaning there is always a board of 3, meaning we can also do donations via it, trademark, etc. Basically it would live forever :) UK would be the way of least resistance. But I will write this out some more, so we know what we are picking etc.
15:37:31 <nielsm> checked again, a limited liability company in denmark is able to form without capital requirements, it just needs to conduct business furthering the financial interests of the owners. so it could mean that a company performing certificate duties and app store publication would need to take a "consulting fee" if formed in denmark, but I don't think there's any lower limit on the turnover in
15:37:31 <nielsm> the company
15:42:17 <Eddi|zuHause> "conduct business furthering the financial interests of the owners." <-- i don't like the sound of that
15:43:25 <Eddi|zuHause> plus, if "they" ever decide to acutally sue for infringement, that "limited liability" will probably kick you hard
15:43:34 <TrueBrain> tnx nielsm ; it is funny to me how every countries does the same, but SLIGHTLY different :D
15:46:11 <andythenorth> wouldn't limited liability be preferrable?
15:46:26 <andythenorth> in UK law LL is vastly preferrable
15:56:01 *** andythenorth has quit IRC
15:57:19 *** Flygon has quit IRC
15:58:09 <Samu> my ship depots are blocking less, but still blocking
16:24:52 <Samu> i think i made it! no more ship depots blocking
16:57:19 <supermop_Home_> incorporate as a shady corporation in Delaware?
17:09:42 *** andythenorth has joined #openttd
17:17:42 <andythenorth> dev appreciation here https://www.tt-forums.net/viewtopic.php?p=1230955#p1230955
17:31:38 *** kouett has quit IRC
17:50:02 * andythenorth has finished work now
17:50:08 <andythenorth> can we talk about trains and stuff?
18:06:23 <Eddi|zuHause> what about trains or stuff would be worth talking about?
18:21:48 *** glx has joined #openttd
18:21:48 *** ChanServ sets mode: +v glx
18:24:49 <Wolf01> Ok, I'm done, I can't work anymore today
18:30:31 *** gelignite has quit IRC
18:41:35 <TrueBrain> updated the gist with what I gathered from each country :)
18:56:48 <Samu> dayum, the pathfinder is outsmarting me
18:56:53 *** luaduck has quit IRC
19:01:05 * andythenorth looks for issues to close
19:02:37 *** kouett has joined #openttd
19:04:23 *** frosch123 has joined #openttd
19:04:54 <Samu> https://imgur.com/a/ZbRFXxO looks like a bug
19:05:09 <Samu> but it isn't
19:05:45 *** WormnestAndroid has quit IRC
19:06:02 *** WormnestAndroid has joined #openttd
19:06:05 <Samu> if it build the lock in the middle, the rivers would become disconnected to the meaningless left side river tile
19:07:47 <Samu> https://i.imgur.com/IEmTOdX.png river becomes disconnected if it did this, lol
19:08:05 <LordAro> check your rambling, Samu
19:08:44 * andythenorth writes a comment, deletes it
19:09:55 <LordAro> // andythenorth
19:10:04 <Samu> so it builds like this https://i.imgur.com/Qvck68Y.png
19:10:33 <Samu> just wanted to share LordAro :(
19:10:58 <LordAro> Samu: sharing is good, needlessly spreading it over 3 images and 6 lines is a bit much
19:14:22 <andythenorth> I was going to comment about auto-replace, then I realised I was adding nothing :)
19:15:00 *** luaduck has joined #openttd
19:25:38 *** gelignite has joined #openttd
19:40:52 <TrueBrain> frosch123: uwsgi is possibly not a way to go .. turns out uwsgi creates different processes to serve the requests
19:40:57 <TrueBrain> kinda kills your sessions :D
19:41:02 <TrueBrain> means we have to put that in a database
19:41:10 <TrueBrain> still looking into it, btw .. meh
19:43:22 <frosch123> isn't there a limit to process the amount
19:43:37 <frosch123> otherwise, i guess we can run the regular flask server
19:43:54 <TrueBrain> you can limit to 1
19:43:55 <frosch123> i think the "nor for production" is about that single-threadedness
19:43:59 <TrueBrain> but that has the same issue as a regular flask server
19:44:04 <TrueBrain> it can only handle 1 request at the time
19:44:18 <TrueBrain> which means that while it is waiting on the API
19:44:19 <TrueBrain> it stalls
19:44:21 <TrueBrain> everything
19:44:37 <TrueBrain> aiohttp avoids this, by allowing other requests while stalling on net I/O
19:44:41 <TrueBrain> which is the most common I/O :)
19:45:02 <frosch123> well, there is another option
19:45:17 <dwfreed> flask sessions are completely contained within the cookie given to the client
19:45:18 <frosch123> we can make it stateless by storing all information in signed cookies
19:45:30 <frosch123> yes, what dwfreed says :p
19:45:36 <dwfreed> you don't even need to do anything special, that's just how they're implemented
19:45:38 <TrueBrain> well, he says we are doing it, which is untrue ;)
19:45:49 <DorpsGek_III> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JfJ4P
19:45:49 <DorpsGek_III> - Update: Translations from eints (by translators)
19:45:54 <frosch123> just that i avoided that, since i don't use magic if i do not have to
19:46:07 <TrueBrain> the other step we can make is port it to aiohttp
19:46:11 <frosch123> TrueBrain: i specifically avoided using it :p
19:46:11 <TrueBrain> is nearly trivial
19:46:16 <TrueBrain> some minor syntax difference
19:46:19 <TrueBrain> :D
19:46:43 <TrueBrain> switching to aiohttp means we can make the full app async
19:46:45 <frosch123> there are two global states i use. flask.request and @afterthisrequest
19:47:12 <TrueBrain> I assume the templates are jinja2?
19:47:21 <frosch123> yes
19:47:47 <TrueBrain> so those are the two routes, I think
19:48:10 <frosch123> with escaping enabled (which for some insane reason is not the default for jinja2)
19:49:06 <frosch123> anyway, does uwsgi handle multiple requests by starting multiple processes? or can the same pythno instance handle multiple reqeuest?
19:49:25 <TrueBrain> both :D A flask process can handle multiple request, just one by one
19:49:36 <TrueBrain> uwsgi starts multiple processes, and distributes the requests
19:50:02 <TrueBrain> what I like about aiohttp, is that it makes everything simpler (no nginx or uwsgi)
19:50:07 <TrueBrain> what I like about flask, is that we already have it :D
19:50:10 <frosch123> another option is to leave that for future
19:50:26 <TrueBrain> and use "flask run" for now?
19:50:36 <TrueBrain> works for me
19:50:42 <frosch123> yes, only authors use the frontend
19:50:55 <TrueBrain> the blocking will be annoying
19:50:59 <TrueBrain> but I agree, given the deadline, no prio
19:51:07 <frosch123> can nginx cache the non-authorized sites?
19:51:23 <TrueBrain> if we add caching, it will be in the AWS infra
19:51:30 <TrueBrain> lot easier :D
19:51:42 <frosch123> ok :)
19:51:49 <TrueBrain> (I like simple Dockerfiles :P)
19:51:49 <dwfreed> ***do not*** run aiohttp on port 80/443 directly
19:52:27 <TrueBrain> okay, in that case I have most of the Docker-work done .. just need to add GitHub actions, and enable the deployment to AWS
19:52:37 <TrueBrain> dwfreed: I am kinda waiting for another sentence; those broad statements are not really useful :D
19:53:35 <TrueBrain> as for port 443, I think the statement: never run port 443 from a docker, is a valid statement :)
19:53:56 <TrueBrain> unless you REALLY know what you are doing :D
19:54:01 <TrueBrain> (nginx-ingress, traefik, ..)
19:54:02 <dwfreed> apache and nginx have gone through extensive validation that their untrusted input handling isn't terrible
19:54:12 <dwfreed> aiohttp cannot say the same
19:54:20 <TrueBrain> ah; that is what you were aiming for
19:54:29 <TrueBrain> I would even say that holds for most httpds in Python
19:54:48 <TrueBrain> well, it has been a while since a heavty CVE came by on requests
19:54:50 <TrueBrain> or urllib
19:54:56 <TrueBrain> but only a matter of time, I am sure :D
19:55:02 <dwfreed> if aiohttpd is your app server, fine, but always front it with a regular http server
19:55:18 <TrueBrain> dwfreed: how about the AWS CloudFront? And AWS ALB? Are those sufficient ? :P
19:55:27 <TrueBrain> (we are kinda not new to the scene here ;) :D)
19:55:28 <dwfreed> imo, no
19:55:45 <TrueBrain> OpenTTD has always had frontend webservers that .. are slightly more hardened than your average
19:55:46 <dwfreed> other perks: your http server can serve the static content directly, no need to touch python at all
19:56:22 <TrueBrain> dwfreed: if those are broad statements, agreed. If they are aimed at OpenTTD .. guess you never checked the OpenTTD infra :)
19:56:42 <dwfreed> nginx is significantly faster at serving static content than anything python
19:57:01 <TrueBrain> that is, in the most broad sense, not true. In the average case, it is :)
19:57:20 <TrueBrain> I remember trying to pipe 400 MiB files through nginx in the default config .. that was a horrible experience :D
19:57:48 <TrueBrain> but okay, those blank statements are not helping the current issue :)
19:58:11 <TrueBrain> frosch123: okay, this seems to work. So we run flask for now. I add it to the wishlist to improve :D
19:58:22 <TrueBrain> one thing that stalls heavily, is publishing
19:58:26 <TrueBrain> takes ~5 seconds or so
19:58:40 <TrueBrain> but .. what are the odds two BaNaNaS managers are active at the same time :P
19:59:14 <andythenorth> 1.1
19:59:47 <andythenorth> alternately, support 1 and wait for complaints
20:00:08 <TrueBrain> for launch, I am really fine with it tbh
20:00:15 <TrueBrain> we need to get it done more than anything else
20:00:32 <frosch123> coop eints was blocked for 3 minute every day at 17:45, noone complained :)
20:01:28 <TrueBrain> well, given there are pretty strict health-checks on these servers, I kinda want to solve it
20:01:30 <TrueBrain> but FOCUS :D
20:01:47 <TrueBrain> which reminds me .. is there a healthz endpoint already ..
20:02:01 <frosch123> no, unless flask has one by default
20:02:10 <TrueBrain> hope not :D
20:02:33 <frosch123> also i had a question. is the uuid you assign to files the id from tus? or do you make up your own id?
20:02:41 <TrueBrain> tus generates those
20:02:53 <TrueBrain> why?
20:03:16 <frosch123> i figured i need to dynhtml the "delete file" button after uploading one
20:03:36 <TrueBrain> haha, yes
20:03:38 <frosch123> so the js needs to know the id for deleting
20:03:44 <TrueBrain> you got tus-javascript to work?
20:03:48 *** Gustavo6046_ has quit IRC
20:04:04 <frosch123> i learned npm yesterday and managed to load it
20:04:12 <frosch123> i want to finish using it today
20:04:13 *** Gustavo6046_ has joined #openttd
20:04:17 <TrueBrain> :D
20:04:19 <TrueBrain> and never touch it again? :P
20:04:56 <frosch123> likely :)
20:05:13 <frosch123> "apt-get install npm" was funny
20:05:34 <frosch123> ~5 MB in ~250 packages
20:06:24 <TrueBrain> "funny", he says
20:06:36 <TrueBrain> but wasn't there a variant that didn't need the npm bla? Hmm
20:07:09 <frosch123> it's just a build-dep
20:07:12 <frosch123> does it matter?
20:07:33 <frosch123> the runtime gets a single .min.js
20:08:34 <frosch123> though, i guess that's only a theory until it actually works
20:08:34 <TrueBrain> good
20:08:36 <TrueBrain> no, that is fine
20:08:46 <TrueBrain> Docker can have multiple buildsteps
20:08:55 <TrueBrain> but I would hate for npm to be on the production docker :)
20:09:16 <TrueBrain> okay ... one last thing .. I need to disable the 200 log lines .. I just want it to show non-2NN
20:11:42 <TrueBrain> okay, I embedded Sentry, Dockerfile, github actions .. now all I need to do is get the AWS infra ready to start this, and it should be good to go :D
20:12:40 <frosch123> TrueBrain: https://stackoverflow.com/questions/14888799/disable-console-messages-in-flask-server
20:12:43 <TrueBrain> and that, that is a job for tomorrow :D
20:14:02 <TrueBrain> frosch123: awh, that doesn't log errors :(
20:15:06 <frosch123> huh, i expected setting the logging level to error would do just that
20:15:52 <TrueBrain> seems "500" errors are at INFO level :D
20:16:34 <frosch123> https://flask.palletsprojects.com/en/1.0.x/logging/ <- then it seems to be more work
20:16:36 <TrueBrain> seems INFO is doing the trick
20:17:37 <TrueBrain> no, it is not
20:17:37 <TrueBrain> hmm
20:18:00 <TrueBrain> well, otherwise I can disable it and trust Sentry informs me of issues
20:18:46 <frosch123> i added logging of non-200 api calls via the same flask loger
20:19:22 <frosch123> app.logger.warning("API failed: {}".format(r.text)) <- those are warning level
20:20:03 <TrueBrain> yeah; it uses the default logging from Python
20:20:06 <TrueBrain> so that is good :)
20:20:34 <frosch123> i guess we can set the logger to WARNING, and add some @app.after_request to add another warning for non-200 responses
20:20:35 <TrueBrain> we do need to rescope some try/excepts btw :D Some also catch programmer errors :)
20:20:46 <TrueBrain> sneaky, but I like how you think :D
20:21:13 <frosch123> i had some trouble with some API calls returning empty text, instead of json
20:21:40 <frosch123> and since i did not wanted to distinguish api calls, i just cought the exceptions and discarded them :)
20:21:49 <TrueBrain> yeah .. that is fine by me
20:21:54 <TrueBrain> but you have another try/except around that
20:22:04 <TrueBrain> :D
20:22:17 <TrueBrain> pretty sure most of our Python code needs more work .. but that is not for now
20:22:24 <TrueBrain> get-it-to-work-first-improve-after
20:22:35 <TrueBrain> right, tomorrow I will make sure this all runs on staging :)
20:23:00 *** Progman has joined #openttd
20:23:34 <frosch123> yes, if 200 json() throws, it's ok. if 401 json throws, it's not.
20:25:07 <TrueBrain> basically, with sentry, you want to get as much exceptions as possible for which you did not program :)
20:25:22 <TrueBrain> so the fewer try/except, especially with Exception, the better :)
20:25:46 <TrueBrain> I found several bugs in the API already that way :P
20:26:02 <TrueBrain> the one I haven't fixed: timeout of sessions can cause a "dictionary changed size during iteration"
20:26:11 <TrueBrain> I was sure that was no longer possible in Python .. I was wrong :P
20:27:49 <frosch123> i am too much of a c++ programmer to even imagine that would work somewhere
20:48:37 *** Artea has joined #openttd
21:20:41 <andythenorth> oof
21:20:46 * andythenorth should stop ebaying
21:21:48 <frosch123> selling lego?
21:22:25 <andythenorth> buying trains
21:22:29 <andythenorth> I do need to sell Lego
21:22:31 <peter1138> Beer o'clock
21:23:57 <peter1138> Ok, that white stilton is quite nice.
21:24:33 <andythenorth> Wolf01 what shall I sell?
21:24:53 <andythenorth> this needs to go https://assets.catawiki.nl/assets/2019/11/20/3/a/6/3a661752-5e8d-4b3d-978c-56e80f04a914.jpg
21:26:51 <andythenorth> maybe this too https://images-na.ssl-images-amazon.com/images/I/71Mbxk8gU9L._AC_SL1280_.jpg
21:27:04 <andythenorth> and this https://www.lego.com/cdn/cs/set/assets/bltfedfac395674c3cb/42039.jpg?fit=bounds&format=jpg&quality=80&auto=webp&width=528&height=528&dpr=1
21:27:09 <andythenorth> so much space they take up
21:28:41 <FLHerne> andythenorth: https://www.wildflowerfinder.org.uk/
21:29:23 <andythenorth> that's quite the website
21:30:48 <FLHerne> Besides needing three paragraphs explaining how to adjust your browser, it's quite nice :P
21:32:58 <andythenorth> it's like 1998 called
21:35:58 <FLHerne> The best thing is the note rejoicing that in 2019 Safari added support for some behaviour of frames
21:37:42 <FLHerne> Plenty of old websites still online, but still updated with attention to modern browser 'support'?
21:40:12 <Wolf01> <andythenorth> this needs to go https://assets.catawiki.nl/assets/2019/11/20/3/a/6/3a661752-5e8d-4b3d-978c-56e80f04a914.jpg <- I would buy this (I already have the other 2) but I don't have space too
21:43:10 *** frosch123 has quit IRC
21:47:16 *** k-man__ has joined #openttd
21:53:53 *** k-man_ has quit IRC
22:28:16 <supermop_Home_> beer here too
22:35:31 <DorpsGek_III> [OpenTTD/OpenTTD] agentw4b commented on issue #8077: Toll https://git.io/JvhZE
22:38:16 *** syr has quit IRC
22:38:41 *** syr has joined #openttd
23:17:31 <supermop_Home_> now that i am old, it's all session ales
23:25:28 <peter1138> I had just the one.
23:26:12 <peter1138> And it was only a 1/3rd of a litre.
23:34:43 *** gnu_jj has joined #openttd
23:37:36 *** gnu_jj__ has quit IRC
23:37:46 * LordAro has broken out the whisky
23:37:50 <LordAro> i ran out of beer
23:38:04 <andythenorth> how about some methanol? https://www.essentialchemicalindustry.org/chemicals/methanol.html
23:38:11 * andythenorth working on FIRS though
23:38:26 <LordAro> methanol bad, ethanol good
23:39:57 <andythenorth> best not confused
23:40:54 <andythenorth> maybe we should increase the cargo limit :P
23:40:55 <andythenorth> https://firs-test-1.s3.eu-west-2.amazonaws.com/firs-new-extreme/docs/html/economies.html#better_living_through_chemistry
23:40:59 <Samu> I made a topic about Native Heap
23:41:27 <Samu> https://www.tt-forums.net/viewtopic.php?f=65&t=86939&p=1231071#p1231071 - thoughts welcome there
23:41:32 <Samu> cyas good night
23:42:11 <supermop_Home_> i want to play chemicaltown
23:42:29 <andythenorth> I haven't even tried a game yet
23:42:34 <andythenorth> it's very early days :)
23:45:36 <andythenorth> some commodity chemicals need pipelines :P
23:46:10 <andythenorth> notably methane, syngas, ethylene
23:48:09 *** Samu has quit IRC
23:50:58 *** sla_ro|master has quit IRC