Log for #openttd on 18th April 2020:
Times are UTC Toggle Colours
00:17:40  *** WormnestAndroid has quit IRC
00:17:45  *** WormnestAndroid has joined #openttd
01:24:35  *** Wormnest has joined #openttd
01:52:59  *** Smedles has quit IRC
01:53:53  *** Smedles has joined #openttd
02:35:39  *** D-HUND has joined #openttd
02:39:06  *** debdog has quit IRC
02:44:23  *** Flygon has joined #openttd
02:58:40  *** Eddi|zuHause2 has joined #openttd
03:01:00  *** glx has quit IRC
03:03:27  *** Eddi|zuHause has quit IRC
03:32:15  *** Wormnest has quit IRC
04:42:33  *** Gustavo6046 has quit IRC
05:56:25  *** snail_UES_ has quit IRC
06:16:57  *** Progman has joined #openttd
06:57:00  *** supermop_Home_ has quit IRC
07:11:19  *** andythenorth has joined #openttd
07:38:58  <andythenorth> hey we could buy a formaldehyde plant
08:02:28  *** Lejving has quit IRC
08:04:17  *** Eddi|zuHause2 is now known as Eddi|zuHause
08:31:19  *** Wolf01 has joined #openttd
08:32:09  *** sla_ro|master has joined #openttd
08:47:52  *** Gustavo6046 has joined #openttd
09:06:42  *** WormnestAndroid has quit IRC
09:06:54  *** WormnestAndroid has joined #openttd
09:43:19  *** blvckhvze has joined #openttd
09:46:54  *** blvckhvze has quit IRC
10:06:33  *** andythenorth has quit IRC
10:07:08  *** andythenorth has joined #openttd
10:23:53  *** Samu has joined #openttd
10:46:19  <Samu> hi
10:47:39  <TrueBrain> <- bootstrap version is online; now let me make it auto-deploy :D
10:49:37  <andythenorth> \o/
10:50:53  <Samu> oh snap, it's not a heap
10:53:14  <Samu> the harm is already done, I can't just rename it
11:05:40  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain opened pull request #8: Add: dockerize this repository and make sure that it can run on AWS
11:06:00  <TrueBrain> there we go, that should be it .. after that it should auto-deploy and everything :)
11:11:29  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain opened pull request #12: Fix: cleaning up usersessions could modify the list while iterating
11:20:05  <DorpsGek_III> [OpenTTD/OpenTTD] buynov commented on issue #8066: 1.10.1 crashes on start in OS X 10.12.6
11:21:38  <LordAro> TrueBrain: nice!
11:22:48  <DorpsGek_III> [OpenTTD/bananas-api] LordAro approved pull request #12: Fix: cleaning up usersessions could modify the list while iterating
11:23:05  <DorpsGek_III> [OpenTTD/bananas-api] LordAro approved pull request #11: Change: update the wishlist with what was found in bananas-frontend-web
11:23:26  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain merged pull request #12: Fix: cleaning up usersessions could modify the list while iterating
11:23:37  <TrueBrain> out-of-date, DOH
11:24:06  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #8: Add: dockerize this repository and make sure that it can run on AWS
11:24:48  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain dismissed a review for pull request #11: Change: update the wishlist with what was found in bananas-frontend-web
11:24:49  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #11: Change: update the wishlist with what was found in bananas-frontend-web
11:25:45  <DorpsGek_III> [OpenTTD/bananas-frontend-web] LordAro commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
11:27:27  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
11:27:53  *** crem has quit IRC
11:32:24  <DorpsGek_III> [OpenTTD/bananas-frontend-web] lgtm-com[bot] commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
11:33:42  <TrueBrain> I found a bug in LGTM :D
11:33:48  <LordAro> heh
11:34:39  <DorpsGek_III> [OpenTTD/bananas-frontend-cli] LordAro commented on pull request #1: Add: a very basic CLI frontend for BaNaNaS API
11:36:08  <TrueBrain> I am going to fix it nevertheless :)
11:36:15  <TrueBrain> bananas-api is with 0 alerts in LGTM .. I am shocked
11:36:43  <TrueBrain> hmm .. no, I think i cannot fix the LGTM comments :P
11:37:35  <DorpsGek_III> [OpenTTD/binaries-redirect] LordAro approved pull request #1: Add: first version of binaries-redirect
11:38:49  <LordAro> TrueBrain: that's an amusing edgecase
11:39:17  <DorpsGek_III> [OpenTTD/bananas-frontend-cli] TrueBrain updated pull request #1: Add: a very basic CLI frontend for BaNaNaS API
11:40:06  <LordAro> i guess in theory it could cause issues if your import path was completely messed up
11:40:19  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain commented on pull request #1: Add: first version of binaries-redirect
11:41:01  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain commented on pull request #1: Add: first version of binaries-redirect
11:41:06  <DorpsGek_III> [OpenTTD/binaries-redirect] LordAro commented on pull request #1: Add: first version of binaries-redirect
11:41:09  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain merged pull request #1: Add: first version of binaries-redirect
11:41:28  <TrueBrain> LordAro: yeah, I opted out of the ^ stuff
11:41:33  <TrueBrain> just because .. UGH
11:41:34  <TrueBrain> :P
11:42:22  <TrueBrain> owh, I didn't add auto-deploy scripts to that repository
11:42:22  <TrueBrain> ugh
11:42:28  <TrueBrain> on the todo list
11:44:42  <TrueBrain> LordAro: sounds more to me that LGTM is still considering Python2 behaviour, where this indeed would be plain wrong
11:45:28  <LordAro> mm
11:45:48  <LordAro> possibly worth renaming to something else anyway?
11:45:58  <LordAro> i guess it could cause some confusion
11:46:04  <LordAro> or whatever
11:46:14  <TrueBrain> meh; I used the same in a few other repositories
11:46:23  <TrueBrain> I rather keep it consistent for now; but yeah, I will give it a look later
11:46:36  <TrueBrain> (as in, when BaNaNaS is deployed in production, later)
11:46:45  <TrueBrain> the repos need a bit more of cleanup anyway
11:47:16  <TrueBrain> I guess this case could also be solved by doing "from import ..."
11:47:41  <TrueBrain> but I am planning on moving this common stuff to a common library, and publish that on pypi tbh
11:47:46  <TrueBrain> just a "click-openttd" :P
11:47:53  <TrueBrain> I am now copy/pasting so much code between repos
11:47:55  <TrueBrain> it is bad
11:48:19  <LordAro> need a openttd-py repo :)
11:48:37  <TrueBrain> same with the API schema .. also has 2,possibly 3, implementations now
11:48:47  <TrueBrain> so if you don't mind, lets keep those things for after
11:49:05  <TrueBrain> (I have a hard time staying focused on solving the problem at hand, and not get distracted by making this pretty :P)
11:49:36  <LordAro> :)
11:49:58  <TrueBrain> this for me is bikeshedding :D Me enabling LGTM already was :P
11:53:34  <andythenorth> FOCUS TrueBrain :D
11:53:42  * andythenorth goes back to wikipedia
11:53:50  <andythenorth> my daily contribution is made
11:54:23  <michi_cc> andythenorth: Made an offer for one of those chemical plants yet? :p
11:54:36  <andythenorth> choosing what kind of tycoon I want to be
11:54:37  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain opened pull request #2: Fix: the name of the deployment is BinariesRedirect
11:54:48  <andythenorth> Titanium Dioxide tycoon?
11:54:57  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain created new tag: 0.0.0
11:54:57  <andythenorth> Sulphuric Acid tycoon?
11:54:59  <DorpsGek_III> [OpenTTD/binaries-redirect] LordAro approved pull request #2: Fix: the name of the deployment is BinariesRedirect
11:55:01  <TrueBrain> ignore that tag plz
11:55:18  * LordAro studies the tag intensely
11:55:39  * andythenorth adds it to wikipedia
11:56:39  <DorpsGek_III> [OpenTTD/binaries-redirect] TrueBrain merged pull request #2: Fix: the name of the deployment is BinariesRedirect
11:57:05  <TrueBrain> turns out I already added the auto-deploy .. I did not know I did
11:59:16  <TrueBrain> LordAro: tnx for the bunch of reviews. Think I fixed all your comments, let me know if I missed any :)
12:00:12  <TrueBrain> owh, the OpenGFX nightly is failing btw. It is missing a 'apt update', and it will install a new GIMP .. hope it doesn't break anything :D
12:00:45  <TrueBrain> Your request exceeds one of the limits for this account. Remove one or more existing items and try again. Learn more
12:00:45  <TrueBrain> Cannot exceed quota for PoliciesPerUser: 10
12:00:50  <TrueBrain> Some AWS limits are just bullshit
12:08:39  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
12:08:49  *** Gustavo6046 has quit IRC
12:09:14  *** Gustavo6046 has joined #openttd
12:09:39  <DorpsGek_III> [OpenTTD/OpenTTD] embeddedt commented on issue #8066: 1.10.1 crashes on start in OS X 10.12.6
12:27:49  *** Smedles has quit IRC
12:29:03  *** Smedles has joined #openttd
12:35:53  *** crem has joined #openttd
12:57:05  *** Progman has quit IRC
14:00:41  <DorpsGek_III> [OpenTTD/OpenTTD] magnus-forsberg opened issue #8090: Game crashes on launch on OS X
14:05:44  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on issue #8090: Game crashes on launch on OS X
14:05:45  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh closed issue #8090: Game crashes on launch on OS X
14:08:40  *** glx has joined #openttd
14:08:40  *** ChanServ sets mode: +v glx
14:16:48  <Samu> glx, do you remember that convert.exe file you used to give me, I used it to generate script logs. it doesn't seem to be generating logs, it only gets generated on exit
14:17:43  <Samu> during a server, it's only able to log player join and player leave, but not any log the ais generate
14:17:49  <glx> totally unrelated, that's how windows manages console output
14:18:33  <Samu> openttd.exe -D -c D:\OpenTTD\Core1\openttdCore1.cfg  1>>D:\OpenTTD\Core1\openttdCore1log.txt 2>&1
14:18:40  <Samu> is this still correct?
14:19:18  <glx> yes, but don't try to read the file before exit, it will be empty
14:19:58  <Samu> why not, it used to work like that
14:20:15  <glx> because windows probably changed stuff
14:21:41  <Samu> it's only able to log player join/leave before exit
14:22:23  <glx> maybe ai debug level is too low
14:22:56  <Samu> it's set to 9
14:23:39  <Samu> debuglevel net=1
14:23:39  <Samu> debuglevel script=9
14:27:10  <Samu> I just typed "help" in the server, and the help text appeared on the .txt log file
14:27:32  <Samu> something is working, but not the way I want
14:32:57  *** Wormnest has joined #openttd
14:34:49  <Samu> remind me what 2>&1 is doing
14:35:28  <LordAro> Samu: redirecting stderr (2) to stdout (1)
14:36:11  <glx> oh and I think the redirection must be done before redirecting to the file
14:36:25  <glx> so 2>&1 >file
14:37:20  <LordAro> glx: i find "sometimes" it works after, sometimes it doesn't
14:37:24  <LordAro> probably depends on the shell
14:37:33  <glx> or is it the opposite, I never remember but there's a comment in regression scripts
14:38:19  <glx> ' 2>&1 must be after >tmp.regression, else stderr is not redirected to the file
14:38:27  <glx> so after :)
14:38:46  <Samu> oh, right, i should look at how regression is doing it
14:48:37  <Samu> gonna try weird stuff
14:48:43  <Samu> 3 >&1
14:49:54  <Samu> it logged something
14:50:07  <Samu> "
14:50:07  <Samu> D:\OpenTTD\Core1>exit
14:50:07  <Samu> " that's the thing I typed to exit the server
14:54:22  <Samu> grr, can't get it to do what I want
14:57:42  <Samu> it only writes the log on the .txt file on exit, bah, disappointing
14:58:06  <Samu> oh well, better than nothing
15:04:45  <Samu> aha, managed to get it working! I had to build openttd myself
15:04:52  <Samu> then run the convert.exe
15:05:04  <Samu> the openttd from the installer doesn't work
15:29:34  *** Flygon has quit IRC
15:47:27  *** k-man has joined #openttd
15:53:58  *** k-man__ has quit IRC
16:00:53  *** Samu_ has joined #openttd
16:02:39  <DorpsGek_III> [OpenTTD/OpenTTD] glx22 updated pull request #7270: Introduce CMake (and removing all other project-related code)
16:07:21  *** crem has quit IRC
16:07:41  *** Samu has quit IRC
16:07:49  *** crem has joined #openttd
16:10:34  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #8: Add: dockerize this repository and make sure that it can run on AWS
16:10:44  *** frosch123 has joined #openttd
16:13:46  <TrueBrain> sweet, the new BaNaNaS frontend now correctly reports to sentry :D
16:14:15  <frosch123> does anyone actually know javascript?
16:14:26  <TrueBrain> there are people who claim as such
16:14:27  <TrueBrain> :D
16:14:49  <frosch123> turns out I don't :p
16:14:53  <TrueBrain> frosch123: the frontend is deployed on staging now. And we still have to fix the "description" bug (template assume it is mandatory, while it is optional :D)
16:14:59  <TrueBrain> something I can help with?
16:16:03  <TrueBrain> I have to say, I am really happy with the GitHub login flow
16:16:14  <TrueBrain> now I am authenticated, I only have to press "Manager", and it logs me in
16:16:17  <TrueBrain> no questions asked
16:16:33  <TrueBrain> on the other hand, it is a bit weird it doesn't ask me anything :D
16:16:59  <frosch123> there is a query parameter for the auth url to force reauthentication :)
16:17:27  <TrueBrain> this does make it silky smooth
16:17:35  <TrueBrain> but we will have to keep an eye on it, how people experience it
16:18:08  <frosch123> anyway: if i declare a variable in one <script>, apparently it is not visible in some other <script>
16:18:09  <TrueBrain> hmm .. I should be able to make sentry create issues on github .. let me see ..
16:18:25  <frosch123> i thought everything was global in js
16:18:27  <TrueBrain> depending what the content of that script is, that is correct
16:18:30  <TrueBrain> it is
16:18:40  <TrueBrain> but most people start their javascript in a way that makes it not
16:18:43  <TrueBrain> (it creates a local scope)
16:19:17  <TrueBrain> as they found out it is a terrible idea to have everything in the same scope :D
16:19:49  <FLHerne> frosch123: I did once, but now it changes every year :P
16:20:05  <FLHerne> (and even if the language doesn't, the framework du jour does)
16:20:43  <frosch123> also, turns out npm created a nodejs package, which is apparently a different thing to what webbrowsers run
16:20:45  <TrueBrain> writing in typescript removes many of these hurdles, lucky enough .. but .. it is learning a whole new language :P
16:20:48  <frosch123> it uses "require" and stuff
16:21:04  <TrueBrain> haha, you really fell into thisone didn't you? :D
16:21:19  <TrueBrain> <- you used thisone?
16:21:20  <frosch123> so, i still have no idea how to get a tus.js
16:21:25  <frosch123> yes
16:22:40  <TrueBrain> you have the dist/tus.js ?
16:23:05  <frosch123> npm created one, but it contains "require"
16:24:26  <TrueBrain> bit annoying it is not in their release packages tbh
16:24:50  <frosch123> anyway, no idea how to debug my variable issues
16:25:05  <frosch123> i thought i could implement this tus stuff with google and stackoverlfow
16:25:08  <frosch123> but i am lost :)
16:25:10  <TrueBrain> :D
16:25:19  <TrueBrain> sadly, I am not of much help, other than me trying it myself :P
16:25:40  <TrueBrain> lol .. why did it just download Chromium .. tus is silly
16:26:07  <TrueBrain> in my dist/tus.js, there is "require", but it is created first
16:26:23  <TrueBrain> I did: git clone; cd tus-js-client; npm install; npm run build
16:26:28  <DorpsGek_III> [OpenTTD/OpenTTD] glx22 updated pull request #7270: Introduce CMake (and removing all other project-related code)
16:26:47  <TrueBrain> with that javascript file, you can use the Example snippet in their README
16:27:16  <TrueBrain> something like: <script src="dist/tus.js"></script><script>var upload = new tus.Upload(...);</script>
16:27:35  <glx> the joy of using npm ?
16:28:00  <TrueBrain> nothing wrong with npm tbh
16:28:04  <TrueBrain> their README is just a bit ... euhm ..
16:28:11  <TrueBrain> well, they assume a lot of things :D
16:28:19  <DorpsGek_III> [OpenTTD/bananas-frontend-web] lgtm-com[bot] commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
16:28:30  <TrueBrain> yes LGTM, I know, and I am still ignoring you
16:28:47  <glx> at least the bot is working
16:29:11  <frosch123> <- that's what i have
16:29:15  <glx> and it's not as spamy as the deps one
16:29:20  <frosch123> but it fails with very basic problems :)
16:30:00  <TrueBrain> you npm-ified the repo too? Bold :D
16:31:04  <TrueBrain> okay, I get why you do it this way; not a bad idea :)
16:31:43  <frosch123> you seem to assume i knew what i was doing :p
16:31:54  <TrueBrain> despite that, this is not a bad idea :D
16:33:08  <TrueBrain> first, I am going to see if I can get LGTM to shut up about this warning .. I have an idea how to solve it
16:33:13  <TrueBrain> after .. I am going to check your code :D
16:38:14  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #8: Add: dockerize this repository and make sure that it can run on AWS
16:38:20  <TrueBrain> we will see if this solves it
16:41:52  <frosch123> you removed the logging of failed api reqursts? are you logging them somewhere else?
16:42:07  <TrueBrain> it was not logging of FAILED API requests
16:42:09  <frosch123> oh, nvm
16:42:12  <TrueBrain> I removed the logging of ALL API requests :D
16:42:24  <frosch123> yes, i do not know my code :)
16:42:25  <TrueBrain> the logs were filling up rather quickly :D
16:42:28  <TrueBrain> :P
16:42:31  <TrueBrain> does any of us, really?
16:43:48  <TrueBrain> "Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-BLA'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback."
16:43:54  <TrueBrain> that I get when I run your branch
16:46:42  <frosch123> yes, that's something that needs adjusting in template()
16:46:43  <TrueBrain> you have a typo on line 67 in uploader.js
16:46:55  <TrueBrain> it is not "upload", but "upload_instance"
16:46:58  <TrueBrain> see the line above
16:47:05  <DorpsGek_III> [OpenTTD/bananas-frontend-web] lgtm-com[bot] commented on pull request #8: Add: dockerize this repository and make sure that it can run on AWS
16:47:07  <TrueBrain> after that I hit more CORS
16:47:09  <TrueBrain> but it works otherwise
16:47:26  <frosch123> for me it complanied that "filelist" is unknown
16:48:10  <TrueBrain> so you got further
16:48:20  <TrueBrain> how do I bypass CORS ..
16:49:27  <TrueBrain> or do you mean on line 29 already?
16:49:48  <TrueBrain> as it complained about filelist, but that was because of the error earlier
16:49:54  <frosch123> i saw the message about the csp, but it did not stop it from giving more errors when i select files
16:50:04  <frosch123> yes 29
16:50:06  <TrueBrain> yes .... but that makes total sense of course
16:50:14  <TrueBrain> I mean ... you should know better; start with the first error :D
16:50:19  <TrueBrain> your inline script is refused to execute
16:50:23  <TrueBrain> so of course filelist is undefined :)
16:50:30  <TrueBrain> I disabled line 26 in
16:50:36  <frosch123> the inline script is refused?
16:50:39  <TrueBrain> that fixes CSP :P
16:50:42  <TrueBrain> that is what the error says :)
16:50:49  <TrueBrain> "Refused to execute inline script"
16:50:52  <frosch123> oh, ... i thought it would affect loading stuff from extern
16:51:17  <frosch123> ok, your error is more explicit than mine
16:51:26  <TrueBrain> I am using Chrome :P
16:51:43  <frosch123> i thought ff was the webdev-ide
16:51:53  <frosch123> did that change in the last years?
16:51:55  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain updated pull request #8: Add: dockerize this repository and make sure that it can run on AWS
16:52:02  <TrueBrain> I am pretty sure the jury is still not out on that
16:52:26  <TrueBrain> I am giving up on the LGTM warning for now. Something to fix another time :D
16:52:52  <frosch123> did you fix the flake issues?
16:52:59  <TrueBrain> I removed my commit
16:53:07  <TrueBrain> so, indirectly, I did :D
16:53:15  <TrueBrain> LGTM things "import click" and "import .click" are the same thing
16:53:17  <TrueBrain> it is not :P
16:53:28  <TrueBrain> but it only complains in frontend-web .. not in api
16:53:30  <TrueBrain> which is weird :P
16:53:37  <TrueBrain> but I am going to fix this completely differently anyway, so meh
16:53:46  <TrueBrain> first, we make it work
16:53:48  <TrueBrain> after, we make it pretty :)
16:54:09  <TrueBrain> not sure how to solve the CORS issue .. in production, it is all on the same URL
16:54:15  <TrueBrain> it is only locally, that we have two different ports
16:54:53  <frosch123> how do you tell the docker to run github auth?
16:55:01  <frosch123> or does staging run developer?
16:55:24  <TrueBrain> staging runs github
16:55:39  <TrueBrain> and to run github yourself, you need to make an oauth app
16:56:13  <frosch123> i am just asking because of the CMD in the dockerfile
16:56:28  <TrueBrain> I overrule the CMD in AWS
16:56:38  <TrueBrain> I made the Docker do devy-stuff
16:56:57  <TrueBrain> hoping that would help :D
16:57:15  <TrueBrain> owh, you meant with bananas-frontend-web btw, sorry, you were looking at the PR ofc :)
16:57:25  <TrueBrain> so yeah, on the AWS deployment the CMD is totally different
16:57:29  <TrueBrain> this is just meant to run locally
16:58:12  <frosch123> ok, i thought i would find something about that in the .yml
16:59:02  *** supermop_Home has joined #openttd
16:59:43  <TrueBrain> no, it is all inside the infra itself
16:59:53  <TrueBrain> in AWS you define a Task Definition with these things in there
16:59:59  <TrueBrain> the GitHub Actions only trigger a redeployment
17:02:03  <DorpsGek_III> [OpenTTD/bananas-frontend-web] frosch123 approved pull request #8: Add: dockerize this repository and make sure that it can run on AWS
17:03:20  <TrueBrain> okay, got your stuff to work, somewhat
17:03:39  <TrueBrain> now the authentication fails
17:03:46  <TrueBrain> but I expected that looking at the code :D
17:04:16  <frosch123> you mean the missing headers?
17:04:22  <DorpsGek_III> [OpenTTD/bananas-frontend-web] TrueBrain merged pull request #8: Add: dockerize this repository and make sure that it can run on AWS
17:04:29  <TrueBrain> yeah
17:04:36  <frosch123> i stored them in some variables, but did not use them yet
17:04:46  <TrueBrain> indeed :) That is why I was expecting it to fail ;)
17:04:50  <TrueBrain> but I get a nice 401 back now
17:04:55  <TrueBrain> CORS is solved by tus
17:04:59  <TrueBrain> it returns the right headers
17:05:09  <TrueBrain> so I disabled the CSP header
17:05:17  <TrueBrain> changed the tus_url to: tus_url="http://localhost:1080/new-package/tus/",
17:05:23  <TrueBrain> -    upload.start();
17:05:23  <TrueBrain> +    upload_instance.start();
17:05:27  <TrueBrain> and your code works
17:05:34  <TrueBrain> so you didn't so bad :P Most issues were not javascript related :)
17:08:12  <frosch123> so the tus.js actually works?
17:08:15  <TrueBrain> yes
17:09:40  *** gelignite has joined #openttd
17:10:39  *** Progman has joined #openttd
17:11:11  <TrueBrain> seems the main next thing to solve is how to send the authentication token too
17:11:46  <frosch123> isn't it tus.headers = ...
17:12:14  <TrueBrain> dunno :)
17:12:20  <TrueBrain> you want to fiddle with this some more?
17:12:21  <frosch123> anyway, i hoped i could contain the api token in the python, but now i have to exploit it to the client
17:12:33  <TrueBrain> yeah, I knew that was going to happen
17:12:36  <TrueBrain> not sure if we can avoid it
17:12:55  <TrueBrain> I have been thinking if the tus-authentication shouldn't be done differently or something
17:12:57  <TrueBrain> but .. I dunno
17:12:57  <frosch123> next i will make some food
17:13:05  <TrueBrain> enjoy your food :)
17:13:07  <frosch123> so you have 45min without me at least :)
17:13:26  <TrueBrain> nah; I am looking into getting the bananas-server run on AWS
17:13:32  <TrueBrain> mainly, also via IPv6 :P
17:14:16  <andythenorth> food!
17:14:45  <TrueBrain> and indeed frosch123 , you can set 'headers'
17:18:19  <TrueBrain> but back to CORS being a bitch :P
17:18:36  <andythenorth> supermop_Home you here? :)
17:18:36  <TrueBrain> "Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response."
17:19:04  <andythenorth> oof before CORS there used to be an origin policy in Flash swf
17:19:12  <andythenorth> so we all just set it to * everywhere
17:19:18  <andythenorth> the old internet was more lolz
17:21:59  <TrueBrain> yeah, tusd correctly sets things very narrow
17:22:06  <TrueBrain> and I added "Authorization" to the list
17:22:11  <TrueBrain> tusd doesn't allow me to modify the list
17:22:12  <TrueBrain> ugh
17:22:59  <TrueBrain> I suspect we also have to support authorization via other means :D
17:24:27  <TrueBrain> and it is only an issue for development, ironicly
17:27:21  <TrueBrain> ah, of course, this was this recent thing where localhost was now also in CORS scope
17:27:49  <TrueBrain> tusd says: put a proxy in front of it, not my problem
17:27:57  <TrueBrain> but .. yeah ... for a development setup, you kinda want to avoid that :D
17:40:32  <TrueBrain> frosch123: found a few more bugs in the frontend: if your upload token expire, you get a weird error page. And if your session expires, the frontend doesn't recover
17:40:34  <TrueBrain> two things worth fixing :D
17:40:46  <TrueBrain> I am modifying the API for this to work btw
17:43:00  <TrueBrain> okay; now it seems to work. Well, minus the javascript errors that happen when the upload succeeded. Like update_status() not existing :D
17:49:27  <TrueBrain> frosch123:
17:49:46  <TrueBrain> euh .. let me try that again
17:50:08  <TrueBrain>
17:51:41  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain opened pull request #13: Add: allow setting Authorization / Upload-Token in Metadata for tus-c…
17:52:27  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain merged pull request #11: Change: update the wishlist with what was found in bananas-frontend-web
17:52:48  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #13: Add: allow setting Authorization / Upload-Token in Metadata for tus-clients
17:58:35  <frosch123> TrueBrain: do we actually need authentication for tusd? isn't the upload_token enough of a secret?
17:58:50  <TrueBrain> check the PR ;)
17:58:52  <TrueBrain> same issue :)
17:59:07  <TrueBrain> so yes, that would be enough, but no, that doesn't solve anything :)
17:59:31  <TrueBrain> hmm, my PR doesn't work. Ugh, euhmmmm
17:59:55  <frosch123> oh, i mixed up upload_token and file_uuid :p
18:00:03  <TrueBrain> yes, you did :)
18:00:21  <TrueBrain> no, this PR is not going to work .. tusd does something I did not expect
18:00:23  <TrueBrain> euhmmmm
18:00:58  <TrueBrain> I need to think about this .. this is more tricky than I expected
18:01:31  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain commented on pull request #13: Add: allow setting Authorization / Upload-Token in Metadata for tus-clients
18:01:31  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain closed pull request #13: Add: allow setting Authorization / Upload-Token in Metadata for tus-clients
18:01:41  <TrueBrain> you can still use it to continue your work on the uploader btw
18:01:47  <TrueBrain> for small files, it should work
18:01:48  <TrueBrain> I think
18:01:54  <TrueBrain> hmm .. no
18:01:55  <TrueBrain> ugh
18:02:02  <frosch123> TrueBrain: wouldn't it solve to not have to expose the api-token to the client?
18:02:24  <TrueBrain> there are two things to that: 1) only if that is considered a problem ;)
18:02:37  <TrueBrain> 2) it would increase the complexity of the API by a lot
18:02:47  <TrueBrain> so by the: build first, improve later
18:02:59  <TrueBrain> :D
18:03:24  <TrueBrain> the API is now very simple: either it is a public endpoint, or you need the authentication header
18:03:27  <frosch123> about 1) with the api-token you have access to everything. so it's along the line of csrf
18:03:54  <TrueBrain> you can also write your own client to upload stuff on the API. So what is the issue there? :)
18:04:26  <TrueBrain> I guess it does bring up a point btw .. we trust ANY client atm
18:04:35  <TrueBrain> s/client/frontend
18:04:58  <TrueBrain> so in terms of CSRF, that might already be somewhat of an issue :P
18:05:00  <frosch123> the problem is if someone steals your api-token
18:05:23  <TrueBrain> you kinda already can, because GitHub doesn't ask for approval
18:05:26  <TrueBrain> re-approval?
18:05:43  <TrueBrain> if you get what I mean
18:05:45  <frosch123> yes, but the frontend does
18:05:58  <frosch123> frontend has csrf tokens
18:06:45  <TrueBrain> I don't disagree that showing the api-token could be an issue, but it made me realise more we have a bigger one: any frontend can get the api-token
18:06:57  <TrueBrain> if you authenticated once, anyone can :)
18:07:48  <frosch123> hmm, i see
18:08:08  <frosch123> but that is not solveable if you want a console client :)
18:09:12  <TrueBrain> so we need to do several things, I think: first of all, whitelist redirect_urls
18:09:20  <TrueBrain> I already knew that was coming, so I guess that is fine
18:09:50  <TrueBrain> that solves randomly leaking of the API token
18:09:59  <TrueBrain> next, I guess, we need to make GitHub always ask: is this okay to login
18:10:13  <TrueBrain> but given we return the location header, anyone can modify this
18:10:17  <TrueBrain> so that is not really a protection against anything
18:10:27  <TrueBrain> for the CLI .. we need to think up something for that too
18:10:53  <TrueBrain> but most of all, we need to rethink tus :D
18:11:09  <TrueBrain> as besides the api-token, this CORS is a pita :D
18:11:22  <TrueBrain> what we are doing is simply not really nice :P
18:12:20  <TrueBrain> (you talk to a webfrontend, and you have to upload your files somewhere else, basically :P)
18:12:44  <TrueBrain> the CORS is also going to hit in production, I realised; as the APi is on another domain
18:14:40  <frosch123> hmm, is can we tunnel the tus data through the frontend somehow?
18:14:51  <TrueBrain> I really wanted to avoid that tbh
18:19:11  <TrueBrain> what I wanted to prevent, which tusd allows by default, that anyone can upload any file to it
18:20:27  <TrueBrain> but given the upload-token only exists for ~15 minutes
18:20:39  <TrueBrain> I guess it is safe to assume abuse based on that is highly unlikely
18:20:57  <TrueBrain> worst case, someone uploads a file, and someone replaces that with something else
18:21:04  <TrueBrain> it remains user-input, so from our perspective, nothing really changed
18:21:32  <TrueBrain> the only thing that might be an issue, is integrity of the files
18:21:41  <TrueBrain> I guess the chances on that are ... too low to worry about
18:22:11  <TrueBrain> it remains dirty :P
18:22:23  <frosch123> the upload-token is not guessable in advancwe
18:22:33  <TrueBrain> it really is not, no :)
18:22:46  <TrueBrain> so it is as secure as the api-token
18:23:23  <TrueBrain> I see three options: 1), tunnel tus through the frontend, 2) make tus only require upload-token, or 3) make whole of "new-package" only require upload-token (and no longer authorization)
18:23:33  <TrueBrain> 1) is ugh, from a performance point-of-view
18:23:41  <TrueBrain> 3) is the cleanest, but makes a bit of a weird API, I guess
18:23:47  <TrueBrain> 2) is a bit the solution in-between
18:24:48  *** Samu has joined #openttd
18:25:15  <frosch123> i like 2, since then at least the /new-package/publish uses the normal flow
18:27:21  <frosch123> so... i don't get this csp thing. it seems to generally disallow inline scripts... but how do i get tokens into the js then...
18:27:41  <frosch123> should i add hidden html elements like <input hidden>, which the js extracts from the dom again?
18:27:44  <TrueBrain> what we normally do, is make a HTML tag that is hidden with data attributes
18:27:52  <TrueBrain> so yeah
18:28:01  <TrueBrain> <input ... data-token="" data-bla="">
18:28:06  <TrueBrain> as that is not dynamic ;)
18:28:31  <frosch123> can i use custom attributes?
18:28:41  <TrueBrain> data-NNN
18:28:41  <frosch123> your "data-bla" suggets that
18:28:41  <TrueBrain> yes
18:28:51  <TrueBrain> data-* is ... not a custom attribute, yet it is
18:28:56  <TrueBrain> it is basically part of the spec :P
18:29:01  <frosch123> :o
18:29:10  <frosch123> noqa
18:29:11  <TrueBrain>
18:29:24  <TrueBrain> IE5.5 :D
18:29:56  *** snail_UES_ has joined #openttd
18:30:21  <frosch123> is that a magic version?
18:30:29  <TrueBrain> no, it is just really old
18:30:39  *** Samu_ has quit IRC
18:31:51  <andythenorth> wasn't that mac only?
18:32:04  * andythenorth recently deleted some IE 6 stylesheets
18:32:51  <frosch123> does edge actually add something to chrome? or does it just replace google with bing?
18:33:04  <frosch123> edge reminds me about the old aol browsers
18:33:16  <frosch123> which essentially replaced the ie logo with an aol one
18:34:26  <TrueBrain> frosch123: re: api-token: if we would to make a rich frontend, it would also know the api-token btw
18:34:37  <TrueBrain> as it would be a wrapper around the API
18:34:53  <TrueBrain> (just something that pop'd to mind)
18:38:26  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain opened pull request #14: Add: tus-endpoint now only needs upload-token and moved to Metadata
18:38:38  <TrueBrain> with ^^ tus only needs upload-token in the metadata
18:39:16  <TrueBrain> please test :D
18:42:31  <DorpsGek_III> [OpenTTD/bananas-frontend-cli] TrueBrain updated pull request #1: Add: a very basic CLI frontend for BaNaNaS API
18:42:39  <TrueBrain> for now, I am fine with this
18:42:40  <frosch123> you pass a file_uuid to get_Session_by_token, right? but then get_session expects an api-token?
18:42:51  <TrueBrain> not file-uuid
18:42:53  <TrueBrain> upload-token
18:43:29  <frosch123> yes, upload-token, but that is still no api-token
18:43:40  <TrueBrain> file-uuid returns a blob of metadata via tus. In this metadata is the upload-token. With the upload-token I lookup the user. With the user and upload-token, I look up the session
18:44:30  <TrueBrain> not sure what you are aiming at :) api-token is only used now for protected endpoints (and not tus), and handled in another part of the server
18:45:01  <frosch123> you didn't run flake
18:45:06  <TrueBrain> mind you, there is some very poorly wording in the API: get_session has nothing to do with api-token :)
18:45:20  <TrueBrain> I did run flake :o
18:45:40  <TrueBrain> it returns nothing here :op
18:45:48  <TrueBrain> owh, regression_runner
18:45:49  <TrueBrain> lol
18:45:50  <frosch123> if _sessions[user.full_id]["token"] != token: <- i don't get that line
18:46:05  <frosch123> is there only one upload-token per user-session?
18:46:14  <TrueBrain> 1 user can only have 1 active upload, yes
18:46:38  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain updated pull request #14: Add: tus-endpoint now only needs upload-token and moved to Metadata
18:47:16  <TrueBrain> I should add some types in that repository, that would help :)
18:47:54  <TrueBrain> and that check, honestly, is completely unneeded. It is just a safety check if I wrote correct code :P
18:48:16  <TrueBrain> accidently it wouldpick up users doing weird shit
18:49:02  <TrueBrain> but this is basically why I suggested 3) above. The "user" part is totally unneeded here now
18:49:11  <frosch123> i think it's a valid use-case that a user uploads two packages during one session
18:49:16  <frosch123> so at least they should not get mixed
18:49:28  <TrueBrain> you mix up the word "session" here, I think
18:49:36  <TrueBrain> you can upload as many packages during a user-session as you like
18:49:42  <TrueBrain> you can only upload 1 package at the time
18:49:51  <TrueBrain> the uploading of a package is called "session"
18:50:03  <TrueBrain> (as the API didn't had user-sessions for a long long time)
18:50:08  <frosch123> ok, so session is per upload-token, not per api-token
18:50:12  <TrueBrain> yes
18:50:16  <TrueBrain> that I tried to tell earlier :D
18:50:28  <TrueBrain> I promise, this repository will be rewritten to be more readable ;)
18:50:45  <TrueBrain> as user-session vs session is just stupid :P
18:51:13  <TrueBrain> but yes, and an upload-token is deleted after publish (or after timeout)
18:51:32  <nielsm> hm water with depth, if graphics should be able to make transitions between depth levels should that be handled as water edges (like canals and rivers) or as alternate tile sprites (via callback)
18:51:36  <frosch123> good :)
18:51:45  <TrueBrain> I hope it now makes a bit of sense :P
18:51:57  <TrueBrain> normally I refactor this ealier; but I try to keep a focus on the goal here :D
18:54:23  <frosch123> is chunk_size something i should set in the front-end? i left it with whatever the default is
18:54:31  <TrueBrain> fine by me
18:54:43  <DorpsGek_III> [OpenTTD/bananas-api] frosch123 approved pull request #14: Add: tus-endpoint now only needs upload-token and moved to Metadata
18:55:07  <TrueBrain> I think we need to tune it over time, as I think it is ~4MB somewhere, that most proxies allow
18:55:16  <TrueBrain> but .. for now .. what-ever the default is .. fine by me
18:55:23  <TrueBrain> the python implementation has infinite, as default
18:55:26  <TrueBrain> that failed quickly :D
18:55:46  <TrueBrain> so you will notice soon or later what happens when I try to upload OpenGFX :D
18:56:48  <DorpsGek_III> [OpenTTD/bananas-api] TrueBrain merged pull request #14: Add: tus-endpoint now only needs upload-token and moved to Metadata
18:57:01  <TrueBrain> right .. that means you only need to solve CSP :D
18:57:22  <frosch123> i am trying to adjust that storing data in the dom is "normal"
19:01:01  *** cHawk- has quit IRC
19:01:36  *** cHawk- has joined #openttd
19:01:59  <TrueBrain> :D
19:02:03  <Samu> omg i uploaded stuff wrong to bananas, i disappoint myself
19:02:10  <Samu> now i can't delete it
19:03:33  <Samu> can i ask you to delete the last version of LuDiAI AfterFix? the one with 16? I was supposed to write v16
19:03:52  <Samu> doesn't let me edit :(
19:19:49  <nielsm> problem with depth transitions: it can require up to 240 variations for just one edge
19:20:26  <nielsm> and if you also want to take 5 neighboring tiles into account rather than just 1 neighboring tile, just lol
19:20:40  <michi_cc> Samu: Want to test some stuff?
19:21:57  <Samu> hmm what's to test
19:22:08  <michi_cc> I whipped up some real native queue:
19:22:19  <andythenorth> so how to do methane / natural gas cargo?
19:22:36  <michi_cc> Please note that I did NOT test it in any form. It compiles, it might not work from squirrel at all.
19:23:22  <andythenorth> methane mostly goes in pipelines
19:23:22  <nielsm> andythenorth, prefilled pressure tanks that get loaded on flat cars?
19:23:30  <andythenorth> there is LNG in tankers, but it's rare
19:24:10  <andythenorth> frosch123 try this: 'storing data in the dom is wrong but normal'
19:24:17  <andythenorth> I had to make peace with it
19:24:47  <andythenorth> also 'lol namespaces' can hit you sooner than you expect if you use 3rd party plug ins :D
19:25:16  <Samu> hmm
19:25:32  <Samu> not sure what to do with a .patch file
19:25:37  <Samu> does visual studio read that
19:25:50  <nielsm> no
19:25:58  <nielsm> commandline: git patch foo.patch
19:26:06  <Samu> oh
19:26:08  <nielsm> sorry
19:26:12  <nielsm> commandline: git apply foo.patch
19:26:37  <nielsm> "git diff" generates a patch, "git apply" applies a patch
19:28:54  <nielsm> ughh... now I think I have made the changes to support depth slope sprites, now I need to make a newgrf that does it
19:29:56  <michi_cc> I pushed in to the branch script_native_queue on as well.
19:29:58  <nielsm> lol
19:30:01  *** cHawk- has quit IRC
19:30:10  <frosch123> wtf... i uses dashes in data-* and in js they show up in camelcase?
19:30:12  <nielsm> not quite as intended
19:30:41  *** cHawk- has joined #openttd
19:30:59  <TrueBrain> frosch123: MAGIC :D
19:31:00  <nielsm> ah figured out my mistake
19:31:12  <TrueBrain> there is much more to that, but data- attributes are fun :)
19:33:19  <Samu> ah, better than patch file
19:34:40  <nielsm> at work I developed a callcenter wallboard reporting on current queue status, configured by writing a <table><thead> with the columns you want and some data about how to format each of them, then the js generates the tbody from the data downloaded as a json dump
19:35:02  <nielsm> it feels like a neat way configure an application like that
19:38:34  *** arikover has joined #openttd
19:39:12  <nielsm> hmm... actually how do I best allow a water tile callback to query the depth of neighboring tiles,
19:39:28  <nielsm> there's 8 neighbors and each requires 4 bits, so could technically pack it all into 32 bits
19:39:33  <nielsm> but that sounds like a bad idea
19:40:09  <andythenorth> is it food time?
19:40:22  <frosch123> nielsm: check nearbytileinfo
19:40:35  <frosch123> it exists for all the advaned features like industries and houses
19:40:38  <frosch123> objects, ...
19:41:28  <nielsm> and 0x60 variables should also work for water features without any extra magic added?
19:41:35  <frosch123> GetNearbyTile()
19:41:36  <nielsm> they don't have any yet
19:42:04  <frosch123> nielsm: we did not add any complex variables for tiles that appear in mass, to disencourage complex grfs
19:42:16  <frosch123> but there is nothing preventing adding
19:42:42  <nielsm> yeah I'm also not sure if it will be a misfeature to allow depth slopes
19:42:46  <nielsm> since there's so many possible variations
19:43:12  <frosch123> i think anything more complex than snow density is too much
19:44:04  <frosch123> if you can create some fake-slope, so that smooth-snow-transitions work, it's good .)
19:46:36  <nielsm> yeah I'll just revert this, it's a misfeature
19:46:50  <nielsm> ottd is not a high fidelity graphics game
19:47:49  <nielsm> we can reconsider adding some kind of automatic fading between ground tiles when a GPU-accelerated video driver happens
19:49:12  <andythenorth> oof FIRS chemicals economy
19:49:26  <andythenorth> probably should be too detailed on petrochemicals :P
19:50:09  <andythenorth> propene and propylene and all that jass
19:50:21  <andythenorth> all just pipelines or tankers
19:50:40  <andythenorth> should / shouldn't /s
19:51:01  <andythenorth> phenols, pthalates, BTX, benzen, acetone
19:51:07  <andythenorth> all just seems 1 step too far
19:51:42  <andythenorth> petrochemical refining is very mysterious to me
19:51:46  <nielsm> spacefaring economy?
19:51:54  <andythenorth> everything seems to be steam cracked or whatever, then just recombined
19:51:59  *** adikt- has joined #openttd
19:52:09  <nielsm> you can have a gigantic rocket launch pad
19:52:17  <andythenorth> hydrogen peroxide
19:52:46  <andythenorth> I guess there's a difference between mixtures and compounds?
19:52:57  * andythenorth should have paid attention in school
19:53:01  *** cHawk- has quit IRC
19:53:06  <andythenorth> doesn't Eddi|zuHause do chemicals?
19:53:13  <michi_cc> You could add at least a billion different catalysts in there :)
19:53:31  *** cHawk- has joined #openttd
19:53:34  *** Wormnest has quit IRC
19:53:35  <Eddi|zuHause> could you precisise the question?
19:54:01  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7924: Feature: Water tiles have a depth
19:54:19  *** adikt has quit IRC
19:54:34  <frosch123> andythenorth: look up a 12th grade school program? and add the receipts they discuss?
19:55:17  <nielsm> frosch123: depth level transitions is kind of pointless with this, right?
19:55:27  <andythenorth> precisise is good wood
19:55:29  <nielsm> already very fine grained transitions
19:55:59  <andythenorth> to put my question another way, are we doing pipelines? o_O
19:56:05  * andythenorth suspects the answer is known
19:57:29  <frosch123> ugh... how do i escape names in querySelector?
19:57:38  <frosch123> is there a better solution that querySelector?
19:58:15  <Samu> did you create this queue in just 1 day?
19:58:36  <Samu> you work fast!
19:58:38  <frosch123> nielsm: there is some magic with water ground tiles. when industries draw the plain water sprite, ottd replaces it with the river/canal/... etc
19:58:46  <nielsm> Samu I imagine that has taken an hour or two to implement, it's really simple
19:58:51  <frosch123> so you can also catch that case and call the water-depth magic
19:59:48  <michi_cc> More like 10 minutes coding after one hour of remembering how the script stuff worked again :p
20:00:16  <nielsm> frosch123 ah yeah I found that now
20:02:57  <Samu> super fast!
20:03:29  <andythenorth> oof, which is better for FIRS (a) ship methane and similar gases in vehicles as we don't have pipelines (b) use slightly-realistic-but-non-standard cargos like LNG or LPG (c) play tanks
20:03:33  <andythenorth> ??
20:03:49  *** WormnestAndroid has quit IRC
20:04:21  *** WormnestAndroid has joined #openttd
20:08:53  <frosch123> andythenorth: only few industries get their supplies via pipeline
20:09:01  <frosch123> most gases are transported liquified
20:10:16  <andythenorth> methane is the only challenging one for FIRS imho
20:10:28  <andythenorth> mostly I'd choose the cargos that have most interesting vehicles where I can
20:10:39  <andythenorth> need methane for Haber-Bosch ammonia plant
20:11:20  <andythenorth> could do it as a primary :P
20:14:00  <nielsm> okay let's make GetWaterDepth also check the industry on a tile just
20:15:02  <Samu> hmm it's complaining. parameter 1 has an invalid type 'instance' ; expected 'integer'
20:15:04  <Samu> on Insert
20:16:27  <Samu> this._open.Insert(new_path, new_path.GetCost() + this._estimate_callback(this._pf_instance, node[0], node[1], goals))
20:16:32  <Samu> new_path is a class
20:16:42  <Samu> it has 5 parameters
20:17:20  <frosch123> andythenorth: cow farm?
20:17:31  <andythenorth> methane hydrates?
20:17:40  <andythenorth> bio-digestor?
20:18:02  <frosch123> it's said that cows are a major source of methane in the atmosphere
20:18:05  <andythenorth> and sheep
20:18:11  <nielsm> this looks good!
20:18:22  <andythenorth> I could do 'green' chemistry economy, solar -> hydrogen
20:19:05  <andythenorth> I noticed an oops in Steeltown last week, the 'Engine Plant' assumes internal combustion engines
20:19:10  <andythenorth> that will look odd in 5 years
20:19:30  <frosch123> it won't :p
20:20:01  <michi_cc> Samu: Well, I guess I'd have to figure out how a squirrel instance arrives on the C++ stide.
20:20:01  <Samu> hmm, let me link
20:20:20  <andythenorth> frosch123 is not electrified :P
20:20:27  <andythenorth> electro-frog!
20:20:37  <frosch123> electrified cars are for rich people, not for masses
20:20:37  <nielsm> even better example:
20:21:12  <Samu> this is what new_path is:
20:21:12  <frosch123> and you are safe from alternative chemical fuels for another 25 years probably
20:21:28  <Samu> a structure of some kind of path
20:21:55  <andythenorth> India has mandated all new vehicles must be electric by 2030
20:22:19  <andythenorth> unfortunately they are also planning to dig up most of the coal in Queensland to power their grid
20:22:48  <andythenorth>
20:23:55  <supermop_Home> long tailpipe is still better than nothing
20:26:03  <frosch123> andythenorth:
20:26:26  <michi_cc> Samu: It would work as the _sorter in your native queue, as that is also only storing a numeric index. I might actually be just as efficient, but some of the code from my patch is then useless and might slow down a bit.
20:26:28  <frosch123> at least germany would need more than double the electric network to supply vehicles with power
20:26:42  <frosch123> even more if you want to replace heating
20:27:22  <frosch123> and germany needs 30 years to build one airport, so how long will it take to build a second electric network :p
20:27:24  <Samu> i must be doing this wrong i guess
20:27:42  <nielsm> guess FIRS doesn't work well with it..
20:28:37  <andythenorth> frosch123 it will be a really GOOD airport when it's done though? :P
20:30:43  <nielsm> well somewhat better if I change baseset to opengfx instead of original used with an opengfx-styled depth water grf
20:30:43  <nielsm>
20:30:51  <michi_cc> Samu: No, it simply doesn't work with generic Squirrel-defined types right now. And I'm not totally sure if the C++ interface can really handle passing arbitrary types as parameters.
20:31:49  <andythenorth> nielsm FIRS is...adjustable :P
20:32:31  <supermop_Home> nielsm marningworth sandbank looks a little deed for dredging!
20:32:47  <andythenorth> supermop_Home !
20:32:54  <supermop_Home> the water looks nice
20:32:57  <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7924: Feature: Water tiles have a depth
20:33:17  <andythenorth> should FIRS chemicaltown be more about the chemicals, or more about the advanced modern consumer civilisation that results? :P
20:33:25  <supermop_Home> ooh  hmm
20:33:27  <andythenorth> i.e. am I doing more acetone, or more cheese?
20:33:37  <nielsm> lol
20:33:46  <supermop_Home> cheese product?
20:33:47  <andythenorth> bearing in mind that delivering to towns is frankly dull as fuck :)
20:34:13  <supermop_Home> temperate basic is Cornish yarg, chemicaltown is kraft singles?
20:34:23  <andythenorth> 8 tile trains dumping cargo into 1 tile shops
20:34:31  <andythenorth> FIRS Cheese
20:34:37  <andythenorth> maybe just CHEESE?
20:34:41  <andythenorth> bacronym that?
20:34:44  <frosch123> TrueBrain: any idea about tus.js:1410 ?
20:34:51  <supermop_Home> andythenorth there is value is industries that are nice set dressing for a modern passesnger network game
20:35:06  <frosch123> the "eval" is blocked by the csp, but it is inside a try-catch
20:35:13  <frosch123> is that try-catch supposed to catch the csp?
20:35:38  <TrueBrain> shrug no clue
20:35:45  <supermop_Home> i guess i thought of chemicaltown as shiny white and grey industries with lots of pipes and boxy buildings
20:35:49  <michi_cc> Samu: Something like on the Squirrel side might work. Please not that Native_Heap::Exists (and most likely also is in your Native.Queue thing), as it would have to search _queue for the item.
20:36:11  <supermop_Home> whereas steeltown is rusty red and black piles and brick
20:36:35  <andythenorth> steeltown is animated slag :D
20:37:02  <andythenorth> I wondered if chemicaltown is endless tank farms :P
20:37:03  <supermop_Home> i think its not so much about the chemicals
20:37:36  <supermop_Home> i like the idea of it beings about GOODs that are more than just GOODs
20:37:40  <andythenorth> the actual name is Better Living Through Chemistry
20:37:46  <andythenorth> which implies goods and food
20:38:03  <supermop_Home> yeah you made me listen to that album yesterday after talking about it here
20:38:08  <andythenorth> I did make a town cargos economy, but I deleted it, it was really bad
20:38:17  <andythenorth> bakeries and so on
20:38:18  <supermop_Home> it makes me think of sequencers and drum machines?
20:38:27  <Samu> alright, gonna test that
20:38:39  <Samu> i suspected that was the problem
20:38:44  <michi_cc> Samu: Got the script that generated the error somewhere? I really don't want to figure out how the squirrel programming.
20:39:48  <supermop_Home> ABS + Silicon -> synthesizer factory, Vinyl +paper -> pressing plant
20:40:35  <andythenorth> :)
20:40:36  <Samu> michi_cc, i got it working
20:40:41  <supermop_Home> grain + sugar -> Smirnoff ice bottler
20:40:58  <TrueBrain> frosch123: // if node.js and NOT React Native, we use Buffer
20:41:00  <supermop_Home> 1998town economy
20:41:04  <TrueBrain> so .. we use neither .. so I guess it is fine?
20:41:08  <andythenorth> 808 economy
20:41:12  <andythenorth> 808 State
20:41:17  <andythenorth> Blue Monday economy
20:41:26  <Samu> I've uploaded the AI that tests native heap, the one I made, on the forum
20:41:32  <andythenorth> KLF Economy :D
20:41:38  <supermop_Home> Leeds Basic
20:41:39  * andythenorth has now won and should go to bed
20:41:40  <Samu> but not this
20:42:23  <Samu> i'm doing a race native heap vs native priority queue
20:42:33  <supermop_Home> i wonder what that skate shop i used to go to in Harrogate was called
20:42:36  <frosch123> oh, CORS is set on the tusd side?
20:42:51  <frosch123> i thought the frontend would define what it's script may talk to
20:43:07  <Samu> @calc 3477/3497
20:43:07  <DorpsGek> Samu: 0.994280812125
20:43:19  <Samu> well, very minimal gain to your queue
20:43:28  <michi_cc> Samu: If you're doing it with the squirrel adapter code, a part of the queue itself is unnecessary and will slow it down just a bit.
20:43:45  <Samu> yes, i had to use the adapter code
20:44:30  <supermop_Home> does an industry know what year it was born?
20:44:37  <supermop_Home> oops built
20:45:17  <michi_cc> Anyway, a small difference is not that surprising, as the algorithms itself boil down to the same thing: An array and a sort function, it's just that the C++ priority queue has a sorted optimized for  this and not the generic sorter from the AIList.
20:46:10  <andythenorth> supermop_Home yes
20:47:21  <frosch123> TrueBrain: did you figure out a way to display CORS in tusd?
20:48:27  <michi_cc> Samu: I've pushed a commit to my branch that removes the now unnecessary code, but don't expect much of a difference.
20:48:47  <TrueBrain> do an OPTIONS to the endpoint
20:48:51  <TrueBrain> and it will be in the header :)
20:49:33  <michi_cc> I'd assume that most of the spent time is in the squirrel code and not on the C++ side.
20:49:56  <TrueBrain> frosch123: or if you want to look at code
20:50:10  <TrueBrain> hmm, that is not the right one I think ..
20:50:49  <TrueBrain> weird, Authorization is there .. but it was denied
20:50:50  <TrueBrain> owh well :P
20:51:08  <TrueBrain>
20:51:09  <TrueBrain> ah
20:51:11  <michi_cc> Samu: BTW, you should compare Release version of OTTD, the Debug STL is significantly slower in Visual Studio.
20:51:13  <frosch123> header.Set("Access-Control-Allow-Origin", origin) <- hmm, why does that not do what i think?
20:51:25  <TrueBrain> in that case, I am going to put Authorization back I think .. hmm ..
20:51:30  *** syr has quit IRC
20:51:37  <TrueBrain> I know VERY little about CORS, so .. I cannot really help you there :)
20:51:53  *** syr has joined #openttd
20:52:32  <frosch123> time to renable that http logger plugin
20:54:25  <frosch123> ah, the debugger shows the stuff as well
20:54:51  <frosch123> and i had a typo in the tus-url :p
20:56:02  <frosch123> "(response code: 400, response text: {"message": "Upload-Metadata header is invalid"} )" <- next level of errors :)
20:58:47  <nielsm> connecting to random multiplayer servers...
20:58:57  <nielsm> reveals fascinating constructions
20:59:56  <frosch123> 2020-04-18 20:59:17 INFO [18/Apr/2020:20:59:17 +0000] "POST /new-package/tusd-internal HTTP/1.1" 400 214 "-" "Go-http-client/1.1" <- TrueBrain: the api prints that, is that a problem?
21:00:08  <Samu> it's the release version
21:00:21  <TrueBrain> frosch123: I don't understand the question
21:00:59  <frosch123> the frontend now can reach tusd, but tusd reports some error, and also the api docker prints that message
21:01:14  <frosch123> i want to know whether the problem is with the frontend, or with the api, or with tusd
21:01:29  <TrueBrain> you can see that in the return value of that request
21:01:34  <TrueBrain> you are using the network inspector of the browser?
21:01:48  <frosch123> my paste is from the docker console
21:02:00  <TrueBrain> I understand that; but the network console of your browser also shows you the return value
21:02:11  <TrueBrain> the browser initated the connection :)
21:02:22  <frosch123> yes, that i pasted at 22:56
21:02:57  <TrueBrain> that means it couldn't parse the Upload-Metadata header :) So either it is unexpected, missing, or there is a coding error :)
21:03:03  <TrueBrain> I did test it with the tus-js-client, and it did work
21:03:10  <TrueBrain> so I need more information ;) You can see the request-header in your browser
21:03:15  <michi_cc> Samu: Then I'd say it was a nice OTTD code exercise, but making a real PR out of it is probably not worth it.
21:03:17  <TrueBrain> is Upload-Metadata in it?
21:03:53  <frosch123> Upload-Metadata: upload-token ODg1YWNhZGU0MzJkZjZmZmZjMjk1N2M3M2QzYzM4MmQ=,filename MDQuc2F2,filetype
21:03:56  <frosch123> looks plausible to me
21:04:01  <Samu> why did you change Exists to false? :o
21:04:52  <TrueBrain> it ends with "filetype"
21:04:52  <TrueBrain> ?
21:04:59  <TrueBrain> as that is not by tus-spec :D
21:05:04  <TrueBrain> it should have a space and a value :P
21:05:10  <michi_cc> Samu: Because it is wrong (and your implementation in your native queue, too).
21:05:11  <TrueBrain> anyway, please don't send filetype .. it is unneeded :)
21:05:24  <Samu> michi_cc, the new code seems to fail
21:05:25  <frosch123> i got that from the tus example...
21:05:33  <TrueBrain> yeah; and we are not using it :)
21:05:34  <frosch123> and .sav is probably unknown to the browser
21:05:49  <Samu> returns no path, nothing is queued i guess
21:05:56  <frosch123> the upload-token is correct, i decoded it
21:06:08  *** arikover has quit IRC
21:06:24  <Samu> how am I supposed to test now? with the adapter code still?
21:06:25  <michi_cc> Well, "return _sorter.HasItem(item);" is wrong, too, because you don't in fact store the item in your AIList.
21:06:27  *** arikover has joined #openttd
21:06:36  <TrueBrain> if it really ends with "filetype", and nothing more, that is not correct. But try removing that line from your javascript, and it most likely works ;)
21:07:34  <frosch123> oi, it works...
21:07:38  <TrueBrain> \o/
21:07:51  <Samu> I see, well, may have to fix it somehow
21:08:21  <frosch123> Could not recognise this file; possibly the extension is wrong? <- the api does not recognise .sav?
21:08:29  <TrueBrain> nope
21:08:31  <TrueBrain> never did
21:08:31  <frosch123> oh right... it should be .scn
21:08:33  <TrueBrain> never will? :D
21:08:34  <TrueBrain> :D
21:09:35  <Samu> _queue.push(item); the item is here then, hmm how to find items in an array?
21:09:48  <frosch123> debian-10.1.0-i386-netinst.iso <- Could not recognise this file; possibly the extension is wrong?  :)
21:10:01  <frosch123> it accepts all shit :)
21:10:54  <frosch123> so it roughly works, let's make it slightly more pretty
21:11:39  <frosch123> hmm, no, let's first figure out this CSP stuff
21:12:53  <TrueBrain> :D Nice work frosch123  :)
21:13:14  <Samu>
21:13:17  <Samu> ah, here it is
21:16:34  <frosch123> ok... so "self" is quoted, but urls are not
21:22:23  *** Westie has quit IRC
21:23:12  <Samu> 	local value = _queue.find(item);
21:23:12  <Samu> 	return value != null;
21:23:21  <Samu> testing this, not sure how though
21:27:47  <Samu> the index Exists does not exist. now that was funny
21:30:41  <TrueBrain> frosch123: okay, the current way I implemented the authentication is wrong. Will fix; won't have that much impact tbh :)
21:30:51  <TrueBrain> but fixes my issue ;)
21:35:30  <Samu> nielsm, what should I name the Native Heap, which is not a Native Heap
21:35:42  <Samu> i'm about to upload version 2, and i got time to rename it
21:43:55  <nielsm> SortedListQueue or something
21:48:56  <Samu> what's the Peek() time operation?
21:49:03  <Samu> seems to be missing
21:49:32  <nielsm> that's looking at the next element that would be taken from the queue?
21:49:50  <Samu> yes
21:50:33  <nielsm> well as _dp_ pointed out the complexity I gave in that post is actually all wrong
21:50:48  <nielsm> since you're using the sorted items and not sorted indexes
21:50:59  <nielsm> so it invokes the map-of-set reverse
21:51:00  <Samu> oh :/
21:52:08  <nielsm> still, if most of the items in the queue have distinct priority (cost?) values then it should be mostly correct
21:52:29  <nielsm> since that would make most buckets be a set of one member, which is just constant time
21:52:33  <_dp_> also idk how it works in squirrel but endlessly growing array can't be good
21:53:30  <_dp_> even if complexity is technically constant on average
21:55:05  <Samu>
21:55:14  <Samu> the .push is on the array
21:55:27  <Samu> the .AddItem is on the AIList
21:56:01  <Samu> the item that is pushed is a class Aystar.Path
21:56:50  *** Wolf01 has quit IRC
21:57:13  <Samu> guess i better finish this tomorrow, it's still quite confusing
21:57:24  *** Samu has quit IRC
22:06:50  *** WormnestAndroid has quit IRC
22:08:03  *** WormnestAndroid has joined #openttd
22:16:51  *** Wormnest has joined #openttd
22:18:12  *** arikover has quit IRC
22:19:22  *** sla_ro|master has quit IRC
22:24:45  *** andythenorth has quit IRC
22:34:15  <DorpsGek_III> [OpenTTD/OpenTTD] tomstorey commented on issue #8066: 1.10.1 crashes on start in OS X 10.12.6
22:36:46  *** nielsm has quit IRC
22:38:02  *** frosch123 has quit IRC
22:56:14  *** Gustavo6046 has quit IRC
22:56:41  *** Gustavo6046 has joined #openttd
23:08:18  *** tokai has joined #openttd
23:08:18  *** ChanServ sets mode: +v tokai
23:15:13  *** tokai|noir has quit IRC
23:53:21  *** gelignite has quit IRC

Powered by YARRSTE version: svn-trunk