IRC logs for #openttd on OFTC at 2020-04-19
            
00:06:50 *** WormnestAndroid has quit IRC
00:08:03 *** WormnestAndroid has joined #openttd
00:16:51 *** Wormnest has joined #openttd
00:18:12 *** arikover has quit IRC
00:19:22 *** sla_ro|master has quit IRC
00:24:45 *** andythenorth has quit IRC
00:34:15 <DorpsGek_III> [OpenTTD/OpenTTD] tomstorey commented on issue #8066: 1.10.1 crashes on start in OS X 10.12.6 https://git.io/JvA3B
00:36:46 *** nielsm has quit IRC
00:38:02 *** frosch123 has quit IRC
00:56:14 *** Gustavo6046 has quit IRC
00:56:41 *** Gustavo6046 has joined #openttd
01:08:18 *** tokai has joined #openttd
01:08:18 *** ChanServ sets mode: +v tokai
01:15:13 *** tokai|noir has quit IRC
01:53:21 *** gelignite has quit IRC
02:00:35 *** Progman has quit IRC
02:18:01 *** cHawk- has quit IRC
02:18:28 *** cHawk- has joined #openttd
02:20:58 <DorpsGek_III> [OpenTTD/OpenTTD] glx22 updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
02:49:29 *** cHawk_ has joined #openttd
02:55:34 *** cHawk- has quit IRC
03:09:06 *** Flygon has joined #openttd
04:33:30 *** Wormnest has quit IRC
04:34:19 *** debdog has joined #openttd
04:37:46 *** D-HUND has quit IRC
04:50:00 *** Gustavo6046 is now known as Guest22637
04:50:04 *** Gustavo6046 has joined #openttd
04:51:40 *** Guest22637 has quit IRC
05:13:50 *** glx has quit IRC
05:55:05 *** Gustavo6046 has quit IRC
07:17:16 *** sla_ro|master has joined #openttd
08:39:18 *** andythenorth has joined #openttd
08:44:00 <andythenorth> yo
08:54:55 *** snail_UES_ has quit IRC
09:00:44 *** nielsm has joined #openttd
09:03:45 <andythenorth> https://en.wikipedia.org/wiki/Zuiderzee_Works :P
09:03:56 <andythenorth> random reading
09:08:52 *** Gustavo6046 has joined #openttd
09:36:17 *** Progman has joined #openttd
09:57:39 *** Wolf01 has joined #openttd
10:00:44 *** gelignite has joined #openttd
10:16:46 <TrueBrain> hmm .. seems GitHub doesn't support PKCE in OAuth, that is too ba
10:16:46 <TrueBrain> d
10:54:24 *** Samu has joined #openttd
10:54:36 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7924: Feature: Water tiles have a depth https://git.io/JfUcg
10:56:10 <Samu> hello
11:27:06 <Samu> my .Pop() was missing the count check
11:27:35 <Samu> with it, it becomes slightly slower
11:28:34 <Samu> 3982 ticks instead of 3962 ticks for doing the same thing
11:34:26 <TrueBrain> it is like, when you add code, things get slower. It is shocking, really
11:39:11 <Samu> hmm the index _sorter does not exist when the list is empty, im getting errors :(
11:43:20 <Samu> every other queue also errors
11:43:35 <Samu> well then...
11:43:58 <Samu> i must be doing this wrong
11:44:18 <michi_cc> Samu: I updated my branch regardless (rewritten, not a new commit) and now you can use AIPriorityQueue directly for AyStar _queue_class/_open (and yes, I did test it).
11:45:03 <michi_cc> On a small map with your test AI, it is faster, but not by that much. Might still be worthwhile, though.
11:47:59 <Samu> gonna test
11:59:34 <Samu> https://www.tt-forums.net/posting.php?mode=quote&f=65&p=1231144 RailwAI posted some cool stuff to test too
12:14:04 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain opened pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
12:18:01 <Samu> michi_cc, got a crash
12:21:05 <Samu> i must be doing something wrong?
12:25:55 <michi_cc> My glass ball is unfortunately failing.
12:25:58 <Samu> michi_cc, when the script ends running, it crashes openttd
12:26:13 <Samu> did you let the script finish running in your tests?
12:26:56 <Samu> dont try connecting many towns, try about 6 towns
12:27:09 <michi_cc> Okay, let me check.
12:27:45 <Samu> it pathfinds for them all, and at the end... poof
12:28:10 <Samu> something about sq_release
12:28:22 <Samu> https://pastebin.com/BdmnmaNs
12:30:09 <michi_cc> Interesting, didn't happen for me yet.
12:33:51 <michi_cc> Samu: Can't get it to trigger. I get the an OTTD message about AI crashed, but OTTD itself keeps happily running.
12:34:17 <Samu> hmm, then i must be using the thing wrong in AyStar
12:34:24 <Samu> how did you do it
12:34:52 <michi_cc> I just replaced "this._open = this._queue_class();" by "this._open = AIPriorityQueue();"
12:35:12 <Samu> ok, what about the import thing? removed that line?
12:35:39 <michi_cc> I think I didn't delete it, but it should not matter.
12:36:14 <Samu> _queue_class = AIPriorityQueue();
12:36:16 <Samu> this._open = this._queue_class;
12:36:24 <Samu> what i did, probably bad idea, gonna test your way
12:43:22 <michi_cc> Yeah, that would be wrong because this way InitializePath will reuse the old queue and not allocate a new one. Nevertheless, OTTD should still not crash.
12:43:56 <michi_cc> _queue_class = AIPriorityQueue; this._open = this._queue_class(); should work in theory.
12:44:35 <Samu> oh, I see
12:44:54 <Samu> just finished testing, it works
12:45:10 <Samu> 10343 down to 10073 ticks
12:45:35 <Samu> @calc 10073/10343
12:45:35 <DorpsGek> Samu: 0.973895388185
12:45:49 <Samu> it's a nice gain
12:46:32 *** nielsm is now known as Guest22683
12:47:10 <Samu> considering that my .Pop is still missing the count check
12:47:21 <Samu> it would be even better when it has it
12:47:24 *** supermop_Home has quit IRC
12:50:26 *** Guest22683 has quit IRC
12:58:23 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
12:59:02 <DorpsGek_III> [OpenTTD/bananas-frontend-cli] TrueBrain updated pull request #1: Add: a very basic CLI frontend for BaNaNaS API https://git.io/JvjCk
13:14:25 <Samu> 2 more heaps to test :) thx to railwai
13:46:50 *** k-man_ has joined #openttd
13:53:23 *** k-man has quit IRC
14:01:32 *** mcbanhas_ has joined #openttd
14:04:47 *** glx has joined #openttd
14:04:47 *** ChanServ sets mode: +v glx
14:08:05 *** Progman has quit IRC
15:25:02 <Samu> should .Insert return true?
15:25:11 <Samu> fibonacci heap has it return null
15:25:46 <andythenorth> oof
15:25:58 * andythenorth ruins all cargo labels ever
15:29:16 <Samu> Should Insert return true? Fibonacci Heap doesn't have it return anything. All the other libraries have it return true. Does it make a difference?
15:30:01 <Samu> I don't want to cut corners everywhere
15:47:01 *** nielsm has joined #openttd
15:55:08 <Samu> Exists doesn't work
15:55:25 <Samu> can't seem to fix it
15:55:29 <Samu> so i guess i'm removing it
15:55:44 *** kiwi_12 has joined #openttd
15:58:26 <kiwi_12> Hello
15:58:27 *** kiwi_12 has quit IRC
16:07:22 <Samu> hi
16:10:36 <Samu> https://i.imgur.com/FqCuNt2.png :)
16:11:20 <Samu> should Exists exist and return false? what would you do in my situation?
16:11:55 *** kiwi_12 has joined #openttd
16:11:59 <kiwi_12> Hello
16:12:01 <Samu> or just throw("something")
16:16:14 <kiwi_12> I think it would be a good idea to have steeper slopes in certain places, to climb 100 m at a time instead of 50 m. Thus, we could have new difficulties but which could create a new means of transport which would be the cable car. Also, still speaking of terrain, I think it would be good if we could climb a whole block (with stones) to create
16:16:15 <kiwi_12> different levels in a city on a mountain.
16:16:39 <glx> not possible
16:16:42 <kiwi_12> Another thing: in the new version, why can't I use the "Tramway" tool?
16:16:47 <kiwi_12> Why is not possible ?
16:17:03 <kiwi_12> glx
16:18:15 <glx> and for the tramway you need to load a newgrf providing tram vehicles
16:25:55 *** kiwi_12 has quit IRC
16:26:50 *** kiwi_12 has joined #openttd
16:27:21 <kiwi_12> Sorry glx can you re-send your message about the cable car and the terrain ?
16:27:47 <kiwi_12> The software will not support?
16:28:02 <glx> for the tramway you need to load a newgrf providing tram vehicles
16:28:26 <kiwi_12> Yes but no about the tramway ?
16:28:44 <kiwi_12> About the cable car and terrain.
16:30:47 <kiwi_12> Why is not possible about this ?
16:32:22 *** frosch123 has joined #openttd
16:32:28 <Samu> michi_cc, just release a PR about the queue
16:32:32 <Samu> I like it
16:32:45 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 opened pull request #9: Add: upload via tus https://git.io/JfUEG
16:33:07 <TrueBrain> morning frosch123 :) I wrote the login flow .. I implemented OAuth2 PKCE .. I did not implement it for -web yet, as I was wondering if you could give that a look, and see if I implemented it by spec? :D
16:33:09 <Samu> I found out the Exists doesn't really work without complicating the code
16:33:15 <kiwi_12> What is the best NewGRF for tramways ?
16:33:39 <Samu> code that would increase number of ticks needed
16:34:12 <Samu> and your implementation of Exists actually works
16:34:18 <Samu> and everything is faster and functioning
16:35:11 <frosch123> PKCE, pronounced pixy....
16:37:25 <nielsm> kiwi_12: what kind of trams do you want? :)
16:37:39 <nielsm> there's lots of choices and which one you want depends on your playstyle
16:37:45 <michi_cc> Samu: It's not that hard to check which functions Graph.AyStar actually calls.
16:37:45 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain requested changes for pull request #9: Add: upload via tus https://git.io/JfUEC
16:38:05 <TrueBrain> frosch123: it is the oauth flow in case you cannot keep a secret .. secret :)
16:38:29 <TrueBrain> the main difference my PR introduces btw, is that you no longer have a bearer token till you completed authentication. So no more snooping on sessions :D
16:38:49 <kiwi_12> nielsm I would like the one recommended by the developers
16:39:33 <Samu> Graph.AyStar doesn't make use of Exists
16:39:36 <Samu> luckily
16:40:47 <nielsm> kiwi_12 no seriously, do you want trams mixed from all over the world? from some specific country? modern or classic ones? cargo trams or passenger trams?
16:40:47 <Samu> but someone else could have a use for a priorityqueue and needing Exists
16:40:51 <frosch123> TrueBrain: i wondered, whether the api should display a "login via github" page, then clients would redirect to that page, and not get the auth state and code
16:42:01 <nielsm> kiwi_12: eGRVTS v 2.0 has some okay generic trams not from any particular country
16:42:14 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #9: Add: upload via tus https://git.io/JfUE0
16:42:32 <kiwi_12> nielsm Freight AND passengers, from anywhere in the world, as it is for other types of vehicles
16:42:48 <TrueBrain> frosch123: not sure I follow. But check out the new PR, it might be doing what you try to say ;)
16:43:08 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #9: Add: upload via tus https://git.io/JfUE2
16:43:20 <nielsm> the original trains are actually based off england, not just generic
16:43:39 <kiwi_12> ok thanks
16:43:42 <kiwi_12> bye !
16:44:06 *** kiwi_12 has quit IRC
16:44:31 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #9: Add: upload via tus https://git.io/JfUEw
16:44:39 *** Wormnest has joined #openttd
16:58:01 <Samu> @calc 1205/1993
16:58:01 <DorpsGek> Samu: 0.604616156548
16:59:35 <TrueBrain> frosch123: btw, I did not update the API specs yet; I changed the API .. not really nice, but /user/authorize and /user/token follow the OAuth2 PKCE specs. That should help :D
16:59:57 <TrueBrain> will update the specs tonight I guess, if you agree with this solution :D
17:02:06 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #9: Add: upload via tus https://git.io/JfUuU
17:02:48 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #9: Add: upload via tus https://git.io/JfUuT
17:03:10 <frosch123> TrueBrain: you left some TODO in the PR
17:03:18 <TrueBrain> yes, and added it to the wishlist
17:03:31 <TrueBrain> if you agree with this approach, I will implement that tonight
17:03:40 <TrueBrain> didn't want to spend more time on this before checking in :)
17:05:32 <DorpsGek_III> [OpenTTD/bananas-api] frosch123 commented on pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUum
17:06:39 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain commented on pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUuY
17:07:28 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain commented on pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUu3
17:12:34 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
17:14:18 *** Flygon has quit IRC
17:14:51 <TrueBrain> frosch123: and to verbalise the flow, it is now: your web-frontend sends a user to /authorize with some query parameters, that gives a redirect to github, that redirects back to the API, that redirects back to your web-frontend. After that, the web-frontend gives the code is got to the API to validate, and after that you get your access_token. It is a mouth-ful :D
17:16:22 <frosch123> that's almost as if we register the frontend on github
17:16:29 <TrueBrain> it is oauth :)
17:16:38 <TrueBrain> and yes, that was the intention :)
17:16:58 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #9: Add: upload via tus https://git.io/JfUEG
17:17:18 <frosch123> as long as not any client can now tell the api what user it represents :)
17:17:50 <TrueBrain> it already couldn't, so not sure what you mean :)
17:18:12 <TrueBrain> main difference is that the web-frontend now doesn't get the URL to tell the client about, and the access_token is not given till authorization completes
17:19:03 <TrueBrain> well, and the web-frontend now needs a callback URL, and sends the code it gets back to the API .. guess security-wise that is the biggest change :P
17:19:14 <TrueBrain> so no longer a random other website can authenticate against the API
17:20:24 <frosch123> does that still work for the cli?
17:20:28 <TrueBrain> yes
17:20:35 <frosch123> nice :)
17:20:39 <TrueBrain> it needs its own client-id that allows callbacks to localhost
17:20:41 <TrueBrain> that is about it
17:21:06 <TrueBrain> hmm, with your PR, the docker will no longer work
17:21:28 <TrueBrain> the change is not fully trivial :P
17:21:40 <frosch123> ah, yes, i did not update the Dockerfile to install the tus.min.js
17:21:52 <TrueBrain> I think you need a multi-stage Dockerfile to do it cleanly
17:22:03 <TrueBrain> which install the NPM, and only copies tus.min.js to the right folder
17:22:17 <TrueBrain> you know how that works? Or want me to add that to your PR after dinner?
17:22:32 <frosch123> i haven't done that
17:22:37 <frosch123> i would look at website
17:22:45 <frosch123> i think i saw something like that there
17:22:48 <TrueBrain> it is similar, indeed
17:23:02 <frosch123> one docker that builds the website, one that hosts it
17:23:11 <TrueBrain> yup
17:23:16 <TrueBrain> and copy files between them
17:23:18 <TrueBrain> in a single Dockerfile
17:23:26 <frosch123> if you do that, i can address some other todos :)
17:23:26 <TrueBrain> it works surprisingly well :D
17:23:34 <TrueBrain> first I will get some food
17:23:36 <TrueBrain> will do so after
17:23:51 <TrueBrain> owh, and I was going to check if I can make a GitHub issue out of this sentry report ..
17:25:52 <DorpsGek_III> [OpenTTD/bananas-frontend-web] sentry-io[bot] opened issue #10: UndefinedError: 'dict object' has no attribute 'description' https://git.io/JfUu1
17:25:55 <TrueBrain> no clue how this looks
17:26:05 <TrueBrain> surprisingly well
17:27:58 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #9: Add: upload via tus https://git.io/JfUEG
17:37:00 <DorpsGek_III> [OpenTTD/OpenTTD] michicc opened pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUub
17:43:21 <DorpsGek_III> [OpenTTD/OpenTTD] TrueBrain commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUzI
17:47:50 <DorpsGek_III> [OpenTTD/OpenTTD] michicc updated pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUub
17:52:05 <DorpsGek_III> [OpenTTD/OpenTTD] michicc commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUzR
18:05:15 <Samu> I'm renaming Native Heap to Sorted List, so for import it becomes queue.sorted_list
18:05:33 <Samu> still gonna use the same 4 unique characters
18:06:14 <Samu> but the rename might come confusing, hmm i'm undecided about the renaming yet
18:07:15 <Samu> I don't know what's the right thing to do... any help?
18:08:28 *** Progman has joined #openttd
18:21:23 <michi_cc> Unless there are already several AI out there using it, I wouldn't worry about that at all.
18:24:33 <Samu> there's my AI using
18:26:18 <Samu> would bananas accept a version 2 with a different unique 4 characters than the previous version?
18:42:43 <nielsm> hmm... while I'm doing this action 5 feature 0x19 for deep water tiles, should I add something so a set can define multiple alternate tiles for water? to make water tiles less repetitive somehow
18:46:34 <frosch123> in that case use action123, not action5
18:47:11 <Samu> "native heap" leaks memory
18:47:14 <Samu> kinda
18:47:34 <frosch123> action5 is for basic things. advanced things should be defined by addons
18:48:23 <nielsm> frosch123 okay I'm declaring that out of scope :D
18:51:07 <Samu> another advantage to michi_cc solution, memory usage is the lowest of all!
18:51:17 <Samu> all other queues
18:51:36 <TrueBrain> frosch123: upload.js:426 Refused to connect to 'https://api.bananas.staging.openttd.org/new-package/tus/' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
18:51:50 <nielsm> Samu well it does use memory, but memory that Squirrel can't measure entirely
18:53:01 <Samu> it's measuring the queue size
18:53:07 <Samu> https://i.imgur.com/RMHIUVI.png
18:53:19 <Samu> michi_cc's is AI 7
18:53:36 <frosch123> TrueBrain: set --tus-url to https://api.bananas.staging.openttd.org
18:53:41 <Samu> AI5 is the slowest turd out there, Priority Queue 2, disregard it
18:54:05 <frosch123> i messed up, i though i need special action when tus-url is different from frontend-url
18:54:14 <Samu> and my "native heap" EATS memory like nothing :(
18:54:26 <TrueBrain> still no joy
18:54:27 <Samu> it's 4 and 6
18:54:28 <frosch123> but tus-url is acutally always different from frontedn-ul
18:54:36 <nielsm> Samu what I mean is, the std::priority_queue that the C++ object contains does its own allocations and Squirrel isn't aware of those, so there's "hidden" memory usage as far as the memory manager is concerned
18:55:21 <TrueBrain> Refused to connect to 'http://api.bananas.staging.openttd.org/new-package/tus/5b5aa06561d42ceb2a196827b3766fc9' because it violates the following Content Security Policy directive: "connect-src https://api.bananas.staging.openttd.org".
18:55:31 <TrueBrain> http vs https
18:55:32 <TrueBrain> right
18:57:13 <TrueBrain> why on earth is it trying http .. lol
18:57:45 <michi_cc> nielsm: Is there any way to manually add an estimate of that to the statistics?
18:58:19 <TrueBrain> seems the tus-js-client is changing the protocol to the one it is currently on .. ignore the one that is given
18:58:20 <TrueBrain> lol
18:58:30 <TrueBrain> well, that is an issue I don't really care enough about :P
18:58:51 <milek7> std:priority_queue
18:58:58 <milek7> std::priority_queue could be given custom allocator
19:00:10 <nielsm> yeah if you give it a custom allocator that uses the squirrel allocation functions it should count
19:00:54 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #9: Add: upload via tus https://git.io/JfUEG
19:00:56 <TrueBrain> frosch123: there you go :)
19:01:09 <TrueBrain> put my changes in different commits, so you can see if you agree ;)
19:03:17 <frosch123> why .js.map?
19:03:20 <frosch123> isn't that for debugging?
19:03:42 <TrueBrain> it is, somewhat. Browsers tend to open that file when you go to inspect
19:03:49 <TrueBrain> it gives a lot of 404s without it :P
19:03:58 <TrueBrain> and it makes finding bugs a bit easier if they happen in production
19:04:08 <frosch123> well, i guess if the docker skips it
19:04:21 <TrueBrain> no, the Docker ships it :)
19:05:27 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #9: Add: upload via tus https://git.io/JfUEG
19:06:22 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #9: Add: upload via tus https://git.io/JfUaJ
19:06:23 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain approved pull request #9: Add: upload via tus https://git.io/JfUaU
19:07:40 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #9: Add: upload via tus https://git.io/JfUaI
19:09:42 <TrueBrain> guess it is also more likely people will be developing against staging, and not their own API, in general
19:09:45 <TrueBrain> shrug
19:09:46 *** snail_UES_ has joined #openttd
19:14:50 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7924: Feature: Water tiles have a depth https://git.io/JvfWw
19:17:42 <nielsm> frosch123: can I get you to check the first comment in that PR thread if it seems to be complete, or there's any potential issues you can think of?
19:40:20 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
19:40:23 <TrueBrain> frosch123: now with client-id validation ^^ :)
19:40:57 <DorpsGek_III> [OpenTTD/bananas-frontend-cli] TrueBrain updated pull request #1: Add: a very basic CLI frontend for BaNaNaS API https://git.io/JvjCk
19:40:59 <TrueBrain> the one for the frontend is "frontend" :P
19:41:17 <TrueBrain> hmm, "webclient" would be better tbh
19:41:43 <michi_cc> nielsm: Well, I think that actually works, but does seem to cost some real-time performance (probably because the optimizer can remove much less stuff).
19:41:53 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
19:41:57 <frosch123> nielsm: the ship variable should be in the 40+x range. one also has to check which ship callback results (like speed) are cached. in that case the cache needs invalidation, if the depth changes, or otherwise clients desync on join
19:43:58 <frosch123> maybe that depth could even go into var 4A (tracktype, with canal/sea/river in the rr part, and the depth in bits >= 16)
19:45:02 <nielsm> hm there's caching going on with the variables/callbacks?
19:45:26 <frosch123> for trains/rv a lot
19:45:30 <frosch123> no idea for ships
19:45:41 <andythenorth> oops
19:45:48 * andythenorth nearly at the industry limit
19:46:21 <nielsm> andythenorth: https://www.youtube.com/watch?v=9D-QD_HIfjA
19:46:34 <frosch123> nielsm: Ship::UpdateCache() caches PROP_SHIP_SPEED
19:47:09 <frosch123> so, if someone make ship speed depend on depth, you get desyncs
19:47:09 <andythenorth> I suspect it wouldn't be much drama to reassign IDs per economy TBH
19:47:21 <andythenorth> just makes savegames a shit-show when developing :)
19:48:24 <nielsm> frosch123 ouh okay.,.. so maybe ships should cache (and save) the tile depth when they enter the tile, and invalidate the speed cache when they enter a tile
19:51:10 <TrueBrain> frosch123: were you already writing the new oauth in frontend-web, or shall I?
19:51:19 <TrueBrain> (just to avoid us doing both the work :D)
19:54:11 <DorpsGek_III> [OpenTTD/OpenTTD] michicc updated pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUub
19:59:23 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 opened pull request #11: Update TOS https://git.io/JfUVK
19:59:54 *** snail_UES_ has quit IRC
20:00:22 <frosch123> TrueBrain: no, i did not quite understood the details
20:00:32 <TrueBrain> k, no probs, will make some glue
20:00:51 <frosch123> nielsm: trains compare railtypes when moving from one tile to another, and then invalidate caches etc
20:01:36 <frosch123> TrueBrain: i tried to adjust the "repackaging" in the TOS to the new api, but i am not sure about everything
20:01:52 <frosch123> can gh show a diff between two files?
20:04:06 <TrueBrain> make a commit where you copy them first, alter tham in the next
20:04:29 <TrueBrain> and please stop adding things in the frontend-web repo with questions for the API :P
20:04:49 <frosch123> i just write them somewhere, to not forget them :)
20:04:52 <TrueBrain> :D
20:04:59 <TrueBrain> stop committing it, in that case :P
20:05:02 <TrueBrain> (I have a bugs.txt btw :D)
20:05:07 <TrueBrain> for that exact reason
20:05:31 <TrueBrain> ugh, I don't like flask :P It is difficult to read if you have read aiohttp all day
20:06:03 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 merged pull request #9: Add: upload via tus https://git.io/JfUEG
20:06:48 *** snail_UES_ has joined #openttd
20:07:52 <TrueBrain> how do I get the query parameters?
20:08:08 <TrueBrain> owh, request is a singleton
20:08:09 <TrueBrain> right
20:11:22 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #11: Update TOS https://git.io/JfUVK
20:20:11 <DorpsGek_III> [OpenTTD/OpenTTD] michicc updated pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUub
20:21:07 <andythenorth> I need cargo labels for acids
20:21:14 <DorpsGek_III> [OpenTTD/OpenTTD] michicc commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUwR
20:21:18 <andythenorth> Phosphoric, Sulphuric, Hydrochloric
20:21:24 <andythenorth> maybe Nitric, maybe Acetic
20:21:38 <andythenorth> PHAC, SUAC, HYAC?
20:23:21 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain opened pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
20:23:29 <TrueBrain> there we go frosch123
20:25:01 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #11: Update TOS https://git.io/JfUwX
20:26:05 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7924: Feature: Water tiles have a depth https://git.io/JvfWw
20:26:40 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
20:27:17 <TrueBrain> frosch123: we store nowhere which TOS people agree'd to. Or force people to see it at least once. Old BaNaNaS did this. Not sure how we can do this :D
20:28:16 <DorpsGek_III> [OpenTTD/bananas-frontend-web] sentry-io[bot] opened issue #13: RuntimeError: dictionary changed size during iteration https://git.io/JfUw7
20:28:40 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on issue #13: RuntimeError: dictionary changed size during iteration https://git.io/JfUw7
20:29:26 <TrueBrain> frosch123: I guess on the upload page it is sufficient to have a checkbox stating: I have read the TOS and agree with its content ..
20:29:28 <TrueBrain> or something :)
20:30:19 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
20:30:22 <TrueBrain> and I reworked how the developer flow works btw, see last commit in this PR ^^
20:30:28 <TrueBrain> it is now a bit more oauth-like :)
20:31:05 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
20:38:39 <frosch123> TrueBrain: trhe frontend forces ack of the os on *every* upload
20:38:52 <TrueBrain> sorry, what? :D
20:38:52 <frosch123> and we can tell the tos-version by the upload-date
20:38:54 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUrg
20:38:58 <TrueBrain> owh, tos
20:38:58 <TrueBrain> lol
20:39:04 <TrueBrain> sorry, misunderstood :)
20:39:11 <TrueBrain> k, cool :)
20:39:37 <frosch123> anyway, the tos do not differ in any important parts
20:40:32 <TrueBrain> nope; but sadly, that is not how a tos works :P
20:42:14 <Samu> aha nielsm, they get really deep, and they spawn branches
20:43:01 <Samu> unless I'm visioning things wrong...
20:44:02 <Samu> gonna test the memory stuff
20:57:14 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUok
20:57:15 * andythenorth tried doing FIRS New Extreme, but it's blah
20:58:02 <frosch123> TrueBrain: can you add the CRLF->LF to your wishlist?
20:58:07 <TrueBrain> will do
20:58:40 <frosch123> i can't quite remember what ottd does, but i guess there was a reason old bananas did that
20:59:43 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #11: Update TOS https://git.io/JfUVK
21:00:42 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain approved pull request #11: Update TOS https://git.io/JfUoY
21:03:06 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUoc
21:03:45 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUol
21:04:23 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
21:05:26 <Samu> difficult to track peak memory usage
21:06:13 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUo4
21:07:51 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
21:10:44 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUoa
21:13:40 <TrueBrain> frosch123: I am not sure I follow you correctly
21:14:00 <TrueBrain> possibly easier if you just fix the code?
21:14:04 <TrueBrain> you are more known with these details :D
21:14:08 <TrueBrain> (you can push in my branch)
21:15:34 <Samu> framerate window reports 13.5 MiB peak with the new memory tracking
21:15:38 <Samu> 11.8 MiB without
21:16:00 <Samu> still took the exact same number of ticks to complete
21:16:52 <Samu> now i have to compare it against... binary heap
21:16:57 <Samu> or so
21:17:20 <DorpsGek_III> [OpenTTD/bananas-frontend-web] lgtm-com[bot] commented on pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUod
21:17:50 <DorpsGek_III> [OpenTTD/bananas-api] frosch123 commented on pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUoA
21:18:49 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 merged pull request #11: Update TOS https://git.io/JfUVK
21:20:04 <TrueBrain> ty lgtm, that is very wrong what I did there :D
21:20:33 <Samu> binary heap peaked at 13.2 MiB
21:21:03 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
21:22:39 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
21:22:39 <TrueBrain> nicely spotted frosch123 :D oops :)
21:23:39 <DorpsGek_III> [OpenTTD/OpenTTD] michicc commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUKq
21:25:22 <Samu> fibonacci heap peaked at 16.4 MiB
21:26:18 <Samu> "native heap" will be hard to track, but gonna try
21:29:49 <Samu> 114 MiB + the one on AIList, which you say it's not tracked
21:31:28 <Samu> it's constantly pushing nonstop without any removal
21:31:37 <Samu> so... it's kind of expected
21:31:42 <Samu> to be this huge
21:41:20 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
21:41:23 <TrueBrain> and now without broken regression :P
22:02:06 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 opened pull request #14: Fix stuff https://git.io/JfU6O
22:03:46 <frosch123> oh, i missed there is another report meanwhile
22:06:02 <TrueBrain> frosch123: you will pick up your comment about @protected?
22:06:27 <frosch123> yes, i always code depth-first, and it takes some time until the stack rewinds
22:06:38 <TrueBrain> just so I am clear on what I am going to do next :)
22:06:39 <TrueBrain> no rush ;)
22:08:43 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #14: Fix stuff https://git.io/JfU6O
22:08:57 <frosch123> it's funny that i made the same bug in the same place as you did in the api :p
22:10:20 <TrueBrain> yes :D
22:10:24 <TrueBrain> says more about Python tbh
22:10:40 <frosch123> i think it's a python2->3 trap
22:10:53 <frosch123> items() was a copy in py2, but is an iteratable in py3
22:12:22 <frosch123> oh, you do /user/developer now as form instead of json?
22:14:17 <frosch123> hmm, that part is now missing in the frontend
22:14:30 <frosch123> TrueBrain: so, why formdata instead of json?
22:14:41 <TrueBrain> not sure how to answer that question :P
22:15:05 <frosch123> all other api posts are json
22:15:11 <TrueBrain> but yeah, during implementing of the new auth in frontend-web I noticed it doesn't work how I did it
22:15:15 <TrueBrain> so now I did it more oauth-flow
22:15:21 <TrueBrain> yeah, I know; but from an HTML you cannot post JSON
22:15:25 <TrueBrain> so there is not much choice
22:15:52 <frosch123> ah, right, i saw that htmlform in the api pr
22:15:54 <TrueBrain> so in terms of OAuth is now makes a bit more sense: you ask for developer, you get an HTML to identify yourself (well, you can pick your username, but who is counting)
22:16:04 <frosch123> ok, so frontend no longer needs to bother
22:16:13 <TrueBrain> nope; it just says what it wants
22:16:21 <TrueBrain> and no matter what method, it follows the same flow
22:16:24 <TrueBrain> a bit cleaner
22:16:35 <frosch123> we can remove the developer-name from the frontend?
22:16:37 <TrueBrain> in the future, we might want to add an extra page for github too, like: do you want to login, or something
22:16:40 <TrueBrain> yes
22:16:43 <TrueBrain> I will do that
22:17:30 <DorpsGek_III> [OpenTTD/bananas-api] frosch123 approved pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfU6b
22:18:35 <TrueBrain> there we go
22:18:36 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
22:21:29 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain approved pull request #14: Fix stuff https://git.io/JfUiv
22:21:37 <frosch123> when is stuff called "method", and when "audience"?
22:21:45 <TrueBrain> audience is the OAuth2 name
22:21:59 <TrueBrain> so I will rename everything to it, over time
22:22:55 <TrueBrain> but as mentioned, we need more cleanups and renames anyway :P :D
22:29:41 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
22:29:47 <frosch123> TrueBrain: i meant like that
22:30:05 <frosch123> i didn't test stuff yet
22:30:12 <frosch123> i would need to fetch new api and more :)
22:32:06 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 merged pull request #14: Fix stuff https://git.io/JfU6O
22:32:11 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 closed issue #10: UndefinedError: 'dict object' has no attribute 'description' https://git.io/JfUu1
22:32:15 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 closed issue #13: RuntimeError: dictionary changed size during iteration https://git.io/JfUw7
22:35:23 <TrueBrain> frosch123: ah! Yes, that makes sense (that commit)
22:36:12 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain merged pull request #15: Fix: change the login flow to an OAuth2 PKCE flow https://git.io/JfUCA
22:37:43 <TrueBrain> for some reason I have to login twice, not sure what that is about yet (in developer mode)
22:38:58 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
22:39:07 <TrueBrain> k, validated your change works, and fixed the black error
22:39:45 <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 approved pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUio
22:40:31 <TrueBrain> hmm .. sometimes, but not always
22:40:35 <TrueBrain> when I get back to login-callback
22:40:38 <TrueBrain> it redirects me to login
22:41:03 <TrueBrain> owh, 127.0.0.1 vs localhost
22:41:03 <TrueBrain> haha
22:41:04 <TrueBrain> :D
22:45:10 <TrueBrain> right, time to redeploy the API with the correct clients :D
22:45:14 <TrueBrain> see if it also really works ..
22:56:49 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain merged pull request #12: Add: support the new OAuth2 PKCE login-flow https://git.io/JfUwK
23:11:53 <Samu> oh snap, found an unexpected problem with the canal pathfinder
23:13:11 <Samu> can't build bridges over locks. it planned a lock and an aqueduct
23:14:19 <TrueBrain> upload.js:504 Refused to connect to 'http://api.bananas.staging.openttd.org/new-package/tus/970ae284e8113f53d747c46752171bb4' because it violates the following Content Security Policy directive: "connect-src https://api.bananas.staging.openttd.org".
23:14:29 <TrueBrain> frosch123: turns out .... tus-js-client is just bad
23:14:37 <TrueBrain> I have to check out why it keeps on trying to use http over https
23:14:42 <TrueBrain> the Python client had a similar issue
23:14:45 <TrueBrain> I had to patch that
23:14:56 <Samu> since in test mode it does not keep track where it would place locks, when it planned an aqueduct, it passed the placement test :(
23:14:56 <TrueBrain> owh .. this might just be the tusd, now I think about it
23:15:39 <Samu> how am I gonna keep track of "to-be-built" locks
23:15:58 <Samu> or the opposite
23:16:29 <Samu> RIP canal pathfinder
23:18:49 <DorpsGek_III> [OpenTTD/OpenTTD] stormcone updated pull request #7886: Group management enhancements https://git.io/JeAdk
23:20:44 <DorpsGek_III> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements https://git.io/JfUPK
23:24:38 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain opened pull request #16: Add: allow indicate that we are behind a proxy https://git.io/JfUPX
23:24:42 <TrueBrain> okay ... that should fix it
23:24:47 <TrueBrain> frosch123: I think we are getting kinda close here :D
23:26:09 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #16: Add: allow indicate that we are behind a proxy https://git.io/JfUPX
23:26:30 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #16: Add: allow indicate that we are behind a proxy https://git.io/JfUPX
23:26:33 <TrueBrain> you would think I can do this right the first time, not?
23:29:08 <DorpsGek_III> [OpenTTD/bananas-api] frosch123 approved pull request #16: Add: allow indicate that we are behind a proxy https://git.io/JfUPD
23:29:16 *** Wormnest has quit IRC
23:29:33 <frosch123> night for me
23:29:37 *** frosch123 has quit IRC
23:30:50 <Samu> oh man, that lock/aqueduct problem struck me by surprise
23:30:59 <Samu> totally did not expect that
23:32:04 *** Gustavo6046 has quit IRC
23:32:11 *** WormnestAndroid has quit IRC
23:32:19 <Samu> have to think of a solution
23:32:22 *** Samu has quit IRC
23:33:06 *** Gustavo6046 has joined #openttd
23:33:44 *** WormnestAndroid has joined #openttd
23:34:28 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain approved pull request #7: Changes to the page header https://git.io/JfUPx
23:34:47 *** Gustavo6046 has quit IRC
23:35:12 <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain merged pull request #7: Changes to the page header https://git.io/Jfv7W
23:37:26 <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain merged pull request #16: Add: allow indicate that we are behind a proxy https://git.io/JfUPX
23:38:37 *** sla_ro|master has quit IRC
23:39:08 <DorpsGek_III> [OpenTTD/OpenTTD] michicc updated pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUub
23:39:21 *** Gustavo6046 has joined #openttd
23:39:21 <DorpsGek_III> [OpenTTD/bananas-frontend-cli] TrueBrain updated pull request #1: Add: a very basic CLI frontend for BaNaNaS API https://git.io/JvjCk
23:39:46 <DorpsGek_III> [OpenTTD/OpenTTD] michicc commented on pull request #8091: Add: [Script] Native priority queue; useful e.g. for pathfinders. https://git.io/JfUXJ
23:48:30 *** Progman has quit IRC
23:54:23 *** andythenorth has quit IRC
23:54:56 *** andythenorth has joined #openttd
23:57:06 <TrueBrain> frosch123: in case you do backlog reading: https://bananas.staging.openttd.org/ now works; as in, I can upload files and hit validate, etc :D
23:57:07 <TrueBrain> w00p :)
23:57:44 <TrueBrain> now only I need bananas-server PR reviewed, and fix the infrastructure for it, and we can focus on making things pretty :D
23:57:48 <TrueBrain> I love it when things work :D
23:57:50 <TrueBrain> night all
23:58:10 *** WormnestAndroid has quit IRC
23:58:18 *** WormnestAndroid has joined #openttd