IRC logs for #openttd on OFTC at 2019-04-15
            
00:00:00 <pnda> Now it's git push -f
00:00:02 <pnda> ?
00:00:06 <glx> yes
00:00:32 <pnda> fatal: You are not currently on a branch. To push the history leading to the current (detached HEAD) state now, use "git push origin HEAD:<name-of-remote-branch>"
00:00:44 <pnda> Just do that?
00:00:49 <glx> oh git rebase --continue
00:01:01 <nielsm> if it says that you're usually in a bad state
00:01:12 <pnda> ah yes the rebase wasn't finished
00:01:19 <pnda> now force push tho
00:01:27 <nielsm> and should check "git status" to get some hints on why the state is bad
00:01:30 <DorpsGek_II> [OpenTTD/OpenTTD] spnda updated pull request #7480: Fix #6666: brackets in arabic strings https://git.io/fjLdR
00:01:47 <nielsm> ("git status" will tell you if you're in the middle of a rebase, merge, or whatever)
00:02:11 <pnda> Yeah
00:02:37 <glx> if you're on windows there is posh-git for powershell
00:03:04 <glx> a nice extension displaying the state in the prompt
00:03:31 <pnda> Yeah I am on Windows
00:03:34 <pnda> But I like sticking to cmd
00:04:19 <glx> there's also autocompletion for git commands with posh-git
00:11:04 <michi_cc> pnda: If you are more into GUIs, I'd recommend Git Extensions. As usual, there are always some things the command line can do better, but git extensions map quite a lot of the git cmds.
00:11:21 <pnda> I'm mostly into usability
00:11:58 <michi_cc> Well, the graphical repo view is _the_ advantage of any GUI tool.
00:14:00 <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7480: Fix #6666: brackets in arabic strings https://git.io/fjm1a
00:15:01 <DorpsGek_II> [OpenTTD/OpenTTD] spnda commented on pull request #7480: Fix #6666: brackets in arabic strings https://git.io/fjm1r
00:15:51 *** nielsm has quit IRC
00:37:13 <Samu> minor nitpicking
00:37:27 <Samu> aircraft and ships are switched in the finances window
00:37:52 <Samu> at least for me
00:38:18 <Samu> everywhere else, ships come first, aircraft comes last
00:39:58 <Samu> max num of aircraft / ships also switched
00:40:10 <Samu> hmm, looks like it's not everywhere else
00:42:04 <Samu> companies command too
00:42:10 <Samu> well, guess I was wrong
00:43:04 *** arikover has joined #openttd
00:49:04 *** pnda has quit IRC
00:52:53 *** pnda has joined #openttd
00:56:31 *** arikover has quit IRC
00:57:27 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjmMT
01:13:15 <Samu> poof
01:13:31 <pnda> i rly need a new irc client
01:13:34 <pnda> but I want to make my own
01:22:37 <Eddi|zuHause> "make my own"? none of the two dozen existing ones suit your needs?
01:33:06 <Samu> stack overflow is actually not just a website
01:33:26 <Samu> could it be the cause of this crash?
01:34:20 <Samu> corrupted stack?
01:35:15 *** cHawk- has quit IRC
01:39:22 <Samu> reading random answers on what could corrupt a stack: "Throwing an exception inside a destructor is a good candidate. It would mess up the stack unwinding."
01:40:00 <milek7> compile with addresssanitizer?
01:40:13 <milek7> oh, it's on windows
01:53:27 <Samu> got another crash
01:53:32 <Samu> the stack got something now
01:54:45 *** Maarten has quit IRC
01:57:32 <Samu> oops, can't comment, more than 65536 characters
02:01:05 <pnda> Eddi|zuHause, well, most are written in C, which I have no idea of, and I hate all of their GUIs. There's one or two web apps like thelounge which are quite good, but I'd like to make my own.
02:02:42 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjmMb
02:03:58 <pnda> Just a quick question, what's a good loading_speed for a train? Is 38 a lot?
02:05:43 <Eddi|zuHause> i would do something like capacity/4 or so
02:06:55 <Samu> nerf trains
02:08:53 <pnda> huh maybe I have always had my trains load slowly.... Had a few of them at around 10
02:09:06 <pnda> Maybe the complaints on tt-forums were real
02:14:46 <Samu> how to interpret that call stack? https://github.com/OpenTTD/OpenTTD/files/3078010/callstack.txt
02:16:20 <Samu> https://user-images.githubusercontent.com/43006711/56101164-1acd6400-5f19-11e9-8d41-b2a6fbf68f93.png - it got fed up of doing the same thing, it decided to crash?
02:32:12 <glx> looks like a loop in garbage collection
02:32:48 <glx> squirrel probably allocated more memory than available at some point
02:36:25 <glx> AI creates too many and too big arrays I think (but expected with this map size and the number of towns and industries I guess)
02:39:39 *** cHawk has joined #openttd
02:39:42 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjmDm
02:41:32 <Samu> how much memory is available, do you know? I always notice it's around the 4GB mark
02:41:32 *** rocky11384497 has quit IRC
02:41:37 <Samu> that it happens
02:42:14 *** rocky11384497 has joined #openttd
02:44:50 <glx> https://stackoverflow.com/questions/11891593/the-maximum-amount-of-memory-any-single-process-on-windows-can-address
02:44:57 *** pnda has quit IRC
02:45:06 <glx> unlimited unless it's a 32bit exe
02:47:18 <Samu> it was 64bit debug build
02:48:02 <Samu> how much for the virtual machine?
02:48:09 <Samu> squirrel is a virtual machine, i hear
02:48:26 <glx> it's a VM inside openttd
02:51:08 <glx> but visual studio is still 32bit
02:53:21 <Samu> oh :(
02:55:03 <glx> debugger is 64bit
03:00:01 <glx> but in this case I think the stack is the limit
03:27:42 *** Supercheese has quit IRC
03:28:03 *** Supercheese has joined #openttd
03:33:49 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7509: Codechange: replace left QSortT() with std::sort() https://git.io/fjm0B
03:53:15 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7509: Codechange: replace left QSortT() with std::sort() https://git.io/fjm0B
03:56:41 *** HerzogDeXtEr has quit IRC
04:10:22 *** Flygon has joined #openttd
04:18:09 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #7188: Both server and client crash, AI related https://git.io/fh9Ha
04:22:12 <Samu> dang, random deviation and random range occurring when in-game, I set up scripts
04:23:06 <Samu> I'm not sure if that's okay
04:24:10 <Samu> they're not started as random, part of me says that's not okay
04:25:04 <Samu> i've just selected them from a list of available scripts, and their config is already loaded with the parameters randomized
04:25:17 *** Smedles has quit IRC
04:26:23 <Samu> i mean, the script didn't start yet, i still can reset parameters to their defaults
04:27:08 <Samu> I suppose it is okay to randomize in this case, it's just that the behaviour is not consistent with its definition.
04:31:35 *** D-HUND has joined #openttd
04:34:53 *** debdog has quit IRC
04:37:23 *** Smedles has joined #openttd
04:41:28 *** Samu has quit IRC
04:41:49 *** Smedles has quit IRC
04:43:01 *** Smedles has joined #openttd
04:49:12 *** Smedles_ has joined #openttd
04:52:32 *** Smedles has quit IRC
04:57:32 *** Smedles_ has quit IRC
05:37:46 *** glx has quit IRC
06:59:00 *** Supercheese has quit IRC
06:59:21 *** Supercheese has joined #openttd
07:46:02 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fjmSz
08:31:07 *** Smedles has joined #openttd
08:42:42 *** andythenorth has joined #openttd
09:25:56 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7512: Replace SmallStackSafeStackAlloc and AutoFreePtr https://git.io/fjmHe
09:58:52 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjmH2
10:09:46 *** Supercheese has quit IRC
10:37:04 *** andythenorth is now known as Guest284
10:37:04 *** andythenorth has joined #openttd
10:38:55 *** Guest284 has quit IRC
10:40:23 *** andythenorth has quit IRC
11:07:04 <peter1138> Hmm
11:08:04 <Artea> bah
11:08:11 <peter1138> moo?
11:08:15 <Artea> I reinstalled CentOS 7 in VPS
11:08:25 <Artea> is giving me errors compiling UnrealIRCd
11:08:34 <Artea> :(
11:08:45 <Artea> I was so fire up yesterday
11:08:50 <peter1138> Oh
11:08:54 <Artea> thinking I would make my test irc server
11:08:55 <peter1138> Missing dev packages?
11:08:57 <Artea> :(
11:09:17 <Artea> OpenSSL has been a b**** on CentOS 7
11:09:27 <Artea> is using very old version, 1.0.2k
11:10:02 <Artea> and error that gave me, was due to OpenSSL binary not be installed
11:10:04 <peter1138> See the problem is you are using CentOS, not Debian.
11:10:14 <Artea> yes
11:10:26 <peter1138> But you probably want an openssl dev package, not just the binaries.
11:10:27 <Artea> I tried a long time ago
11:10:37 <Artea> and I liked so I sticked with it
11:10:42 <Artea> but was CentOS 6
11:11:00 <peter1138> I looked after a CentOS machine for a while. It was horrible. I Debianed it eventually.
11:11:02 <Artea> I installed openssl-libs
11:11:12 <peter1138> openssl-libs is not dev packages, I would guess.
11:11:26 <peter1138> openssl-devel?
11:11:29 <Artea> it seems like OS don't know OpenSSL is there
11:12:16 <Artea> it's installed too
11:12:30 <Artea> well
11:12:41 <Artea> I will be back later
11:12:50 <peter1138> Come back with Debian ;)
11:12:58 <Artea> or Ubuntu, no ?
11:13:14 <peter1138> Nah, that's just a 3rd rate imposter.
11:13:20 <Artea> lol
11:13:52 <peter1138> Feel free to ignore me about this, I'm just a little bit biased :)
11:14:06 <Artea> nah
11:14:18 <Artea> I dont ignore people for talking and helping me out :)
11:15:24 <Artea> bbl
11:16:58 *** Artea has quit IRC
11:31:28 *** andythenorth has joined #openttd
11:31:53 *** andythenorth has left #openttd
11:35:17 *** Artea has joined #openttd
11:35:21 <Xaroth> Ubuntu is fine
11:35:33 *** Artea is now known as _Artea
11:36:46 <_Artea> Reinstalling the VPS (95%)
11:38:13 <_Artea> I really wanna test out IRC Services under MySQL DB
11:38:31 <_Artea> I miss that so much
11:47:36 <_Artea> YES
11:47:40 <_Artea> it worked
11:47:52 <_Artea> made the SSL cert for UnrealIRCd in CentOS 6
12:10:52 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjm5k
12:19:20 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjm50
12:22:49 <_Artea> peter1138
12:22:58 <_Artea> I installed UnrealIRCd with SSL support :D
12:23:53 <_Artea> now install the rest of the stuff
13:07:19 *** juzza1 has quit IRC
13:10:54 *** juzza1 has joined #openttd
13:13:51 *** gelignite has joined #openttd
13:16:26 *** Corns343434 has joined #openttd
13:22:20 <Corns343434> Patch idea, map Generation creates roads that connect every town together
13:23:40 <Corns343434> Like in transport fever or Simon
13:23:42 <peter1138> "There's a gamescript for that"
13:23:58 <peter1138> But yeah, if you want to make a patch and PR, go for it.
13:24:04 <Corns343434> Simutrans*
13:24:30 <Corns343434> Wait is there actually a game script for it already? I know about the AI that does it kinda
13:24:37 <DorpsGek_II> [OpenTTD/OpenTTD] JGRennison commented on issue #7513: OpenTTD closes itself with no crash dump https://git.io/fjmd8
13:45:39 <peter1138> Not sure, I thought there was.
13:57:06 *** Corns has joined #openttd
13:59:31 *** Corns has left #openttd
14:02:12 *** Corns343434 has quit IRC
14:06:56 *** Artea has joined #openttd
14:19:18 *** _Artea has quit IRC
14:27:44 <Artea> I'm tired
14:28:53 <Artea> but already got stuff sorted out :)
15:08:45 *** Samu has joined #openttd
15:15:41 <Samu> hi
15:21:03 <Artea> hi
15:27:01 <Samu> I've been thinking about this line https://github.com/OpenTTD/OpenTTD/blob/master/src/ai/ai_core.cpp#L319
15:28:05 <Samu> check again in a year can be at times annoying
15:34:08 <Samu> making it checking daily can also be annoying, if the start_date of the next ai is also a big number
15:35:49 <Samu> how to solve... hmmm thinnk
15:36:01 <Xaroth> monthly check?
15:37:45 <Samu> it should check the start_date of the AI once an AI can start and reset the counter
15:42:42 *** nielsm has joined #openttd
15:43:20 <Samu> it should return a special number that is to be treated as "unable to check at the moment"
15:44:06 <Samu> once it gets a value that is not the special number, it then sets the daily countdown
15:55:56 <Samu> _next_competitor_start is a uint
15:56:23 <Samu> GetStartNextTime is a int
15:57:33 <Samu> what will happen if GetStartNextTime returns UINT_MAX?
15:58:10 <Samu> what exactly is returned?
16:00:38 <Samu> -1
16:01:09 *** Flygon has quit IRC
16:04:49 <Samu> -1 is then turned to 1 tick
16:04:51 <Samu> meh
16:05:07 <Samu> can't do that
16:05:10 <Samu> i dont like it
16:08:15 <Samu> @calc 0xffffffff / 74
16:08:15 <DorpsGek> Samu: 58040098.5811
16:19:07 *** Corns has joined #openttd
16:20:40 <Corns> hello update: there is no city-road building gamescript
16:22:48 <Corns> author is on hiatus
16:22:48 <Corns> https://www.tt-forums.net/viewtopic.php?f=65&t=70063
16:25:03 <Samu> http://binaries.openttd.org/bananas/gslibrary/Queue.FibonacciHeap-2-2.tar.gz
16:25:55 <Corns> oh hey thanks :)
16:28:25 <Samu> oh snap, CityConnected is an AI
16:28:33 <Samu> i gave u a GS lib
16:30:03 <Samu> i fail at helping
16:31:48 <Samu> https://bananas.openttd.org/en/ailibrary/ it only lists version 3 :(
16:32:14 <Samu> no idea how to download v2 then
16:32:15 <Corns> oh LOL
16:32:27 <Corns> dw i'm just reverse engineering it for a PR
16:34:20 <Artea> grrrr
16:34:27 <Artea> can't setup sendmail :(
16:34:33 <Artea> I sux configuring VPS
16:37:34 <Samu> oh, INT_MAX is also a thing!
16:37:36 <Samu> cool
16:38:01 <Samu> solves needlessly conversions from int to uint
16:38:11 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fjmxX
16:38:25 <Corns> were you relying on uint = -1
16:40:16 <Samu> if (_next_competitor_start == 0 || _next_competitor_start == (INT_MAX / DAY_TICKS) * DAY_TICKS - 1) {
16:41:15 <Samu> - 1 would make it check daily
16:41:37 <Samu> if (_next_competitor_start == 0 || _next_competitor_start == (INT_MAX / DAY_TICKS) * DAY_TICKS - DAY_TICKS) {
16:41:41 <Samu> maybe this is better
16:41:57 <Samu> oops
16:42:02 <Samu> -1 wouldn't*
16:42:28 *** glx has joined #openttd
16:42:28 *** ChanServ sets mode: +v glx
16:42:42 *** Wormnest has joined #openttd
16:44:18 <Samu> @calc INT_MAX / 74
16:44:18 <DorpsGek> Samu: Error: There's really no reason why you should have underscores or brackets in your mathematical expression. Please remove them.
16:44:33 <Samu> @calc 2147483647 / 74
16:44:33 <DorpsGek> Samu: 29020049.2838
16:44:57 <Samu> @calc 29020049 * 74
16:44:57 <DorpsGek> Samu: 2147483626
16:45:15 <Samu> @calc 21474863626 - 74
16:45:15 <DorpsGek> Samu: 21474863552
16:47:13 <Samu> @calc 2147483626 - 74
16:47:13 <DorpsGek> Samu: 2147483552
16:50:39 <milek7> Artea: why sendmail?
16:50:55 <peter1138> Probably doesn't know any better.
16:51:05 <peter1138> Artea, don't use sendmail, simply.
16:53:19 <Artea> yeah
16:53:25 <Artea> I need a break from VPS now
16:53:27 <Corns> Are commit messages supposed to be typed in present tense?
16:53:36 <Artea> I think I going screw the things up if I continue
16:53:53 <Artea> at least have my IRCd working with SSL
16:54:43 <milek7> use exim or postfix instead of sendmail
16:56:50 <peter1138> postfix++
16:58:45 *** Thedarkb-T60 has joined #openttd
17:00:11 <Artea> yeah
17:00:11 *** Wormnest has quit IRC
17:00:19 <Artea> I was thinking of Postfix
17:00:27 <Artea> but dont know how to config
17:00:35 <Artea> and this CentOS 7
17:00:37 <Artea> GRRRRRRR
17:00:51 <Artea> I like it
17:00:59 <Artea> but is a pain in the backhead
17:01:37 *** Wormnest has joined #openttd
17:23:20 *** WWacko1976-work has quit IRC
17:34:04 *** acklen has quit IRC
17:34:31 <Samu> i need an english expert
17:34:43 <Samu> /* Currently no AI can be started. Return an indefinited number of days. */
17:34:43 <Samu> return INT_MAX / DAY_TICKS;
17:34:51 <Samu> indefinited?
17:35:00 <nielsm> that's not a word
17:35:08 <Samu> unspecified?
17:35:55 <nielsm> infinite, indefinite, undefined
17:35:59 <Samu> unknown? indeterminate? unsettled? unfixed?
17:36:11 <Samu> undefined
17:36:12 <Samu> ok
17:36:31 <nielsm> but undefined is a tricky word
17:36:36 <Samu> undetermined
17:36:49 <nielsm> because in programming context it tends to have a specific meaning
17:37:08 <nielsm> "anything can happen/any value is possible, there is no rule to it"
17:37:30 <nielsm> also is this a sentinel value that will need to be compared against?
17:38:17 <Samu> yes
17:38:54 <Samu> if this value is set, code handles it differently than a real value
17:39:02 <nielsm> if this is a value you'll actually need to check "is it the sentinel value" then make it a defined constant
17:39:54 <nielsm> and if it may need to be transmitted over the network in some way, make sure it does not depend on compiler-defined values such as INT_MAX
17:40:19 <Samu> hmm, can't be INT_MAX then?
17:40:37 <Samu> well, some value higher than 3600
17:40:54 <Samu> or 3600 * DAY_TICKS
17:40:59 <nielsm> it's dangerous to assume that INT_MAX has the same value on any compiler
17:41:01 <Samu> have to check
17:41:03 *** HerzogDeXtEr has joined #openttd
17:42:25 <Samu> max permitted value for start_date is 3600
17:42:35 <Samu> so, anything above that range
17:47:43 <Samu> return AI::START_NEXT_MAX + DAY_TICKS;
17:47:47 <Samu> 3600+74
17:47:52 <Samu> let me see
17:58:41 <Samu> crap, this is already days
17:58:44 <Samu> return AI::START_NEXT_MAX + 1;
17:59:22 <Samu> i was adding 74 days lol
18:01:24 *** Corns has quit IRC
18:04:25 <Samu> does it still warrant a defined constant? I think not
18:04:40 <Samu> if (_next_competitor_start == 0 || _next_competitor_start == AI::START_NEXT_MAX * DAY_TICKS) {
18:04:53 <Samu> return AI::START_NEXT_MAX + 1;
18:04:58 <Samu> that's how it's being used
18:05:25 <Samu> _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS);
18:06:12 <Samu> if (_game_mode != GM_MENU && AI::CanStartNew() && --_next_competitor_start == 0) {
18:06:35 <Samu> it will never reach 0
18:06:51 *** acklen has joined #openttd
18:07:32 <Samu> it won't use the YEARLY check counter
18:07:46 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7514: Scale oil refinery edge distance up by map size https://git.io/fjmhp
18:08:46 <Samu> every 74 ticks it rechecks if there's an AI that can start
18:09:11 <Samu> if there is, it first restarts the counter with that AI's start_date value
18:09:52 <Samu> and now the value is no longer going to be 3600, so, it will reach 0, which is when the company starts
18:10:48 *** Thedarkb1-X40 has joined #openttd
18:11:11 *** Thedarkb1-T60 has joined #openttd
18:13:45 <Samu> what it was doing was: check every 365 * 74 ticks if it could start next AI. And once that counter reached 0, it would try to start an AI, without caring about the start_date
18:14:34 <Samu> if it couldn't start, another 365*74 countdown was started
18:14:48 *** Thedarkb-X40 has quit IRC
18:14:53 *** Thedarkb-T60 has quit IRC
18:18:54 <Artea> that is why AI dont start if start_date = 1 ?
18:21:23 <Samu> it happens when there's no more company slots for AIs to start
18:21:30 <Samu> so, 15 companies
18:22:03 <Samu> if then a company is removed, the counter was not reset
18:22:12 <Samu> it still isn't, but now it's checked daily
18:22:42 <Samu> instead of ... having to wait for the remaining countdown
18:22:53 <Samu> which could be anywhere from 1 to 365 * 74
18:24:09 <Artea> I not sure
18:24:47 <Artea> AIAI = start_date=1
18:24:54 <Artea> isnt by days ?
18:25:13 <Samu> well, there is random deviation
18:25:25 <Samu> can add up to +60 to that
18:25:36 <Samu> it's a bit complex
18:25:58 <Samu> but the problem i'm solving is not that
18:26:31 <Samu> it's only really happening when there's no more room for extra companies
18:30:00 *** sla_ro|master has joined #openttd
18:32:40 <Artea> odd
18:33:54 *** Supercheese has joined #openttd
18:34:49 *** Progman has joined #openttd
18:43:23 <Samu> i'm so bad at comments, i'm gonna need help
18:48:49 <Samu> crap, i submited to master, stupid me
18:48:59 <Samu> how to undo?
18:51:06 <Samu> rebase -i drop ?
18:54:06 <Samu> omg i can't believe i commited the same mistake twice
18:54:08 <Samu> :(
18:54:57 <Artea> :S
18:55:43 <Artea> How to "undo" rebasing commits ?
18:55:53 <nielsm> use the reflog
18:55:55 <glx> only one commit ?
18:56:09 <glx> git reset HEAD^
18:56:20 <glx> keep the changes
18:56:23 <Samu> i went with rebase -i and dropped :(
18:56:27 <nielsm> "git reflog" shows all the commit hashes that have been HEAD so you can reset your branches to one of those
18:56:43 <rubenwardy> git reset --hard HEAD~1
18:56:57 <glx> no --hard removes the changes
18:57:14 <rubenwardy> or soft
18:57:20 <nielsm> uh git reset HEAD^ will just remove the top commit, it won't undo whatever a rebase did
18:57:27 <nielsm> it won't get you dropped commits back
18:57:51 <nielsm> nor will it un-squash commits
18:58:29 <glx> but it's enough if there's only one commit
18:58:51 <nielsm> no because it will just remove the top commit
18:58:55 <nielsm> it won't undo the rebase
18:59:05 <nielsm> it won't restore the old tree
18:59:15 <Samu> i typed git reflog, how to get out of this?
18:59:20 <Samu> ctrl-c ?
18:59:20 <nielsm> q
18:59:22 <Samu> ah
19:00:42 <Eddi|zuHause> the reflog will tell the ID where the rebase started, then use reset with that ID
19:03:28 <nielsm> wtf
19:03:30 <nielsm> 1>------ Build started: Project: version, Configuration: Debug Win32 ------
19:03:30 <nielsm> 1>Error HRESULT E_FAIL has been returned from a call to a COM component.
19:03:35 <nielsm> and then my entire build fails
19:04:02 <Samu> ah, i had that when i updated visual studio
19:04:19 <Samu> i solved it by removing ... uhm... some files
19:04:26 <Samu> forgot where
19:05:39 <Samu> ah,
19:05:40 <Samu> https://stackoverflow.com/questions/4210405/error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component#comment76213388_37725242
19:07:02 <Samu> v16 for me
19:07:05 <Samu> not v15
19:07:47 <nielsm> hmm yeah removing the suo did fix it
19:15:40 *** Wolf01 has joined #openttd
19:16:26 <Wolf01> o/
19:25:01 <V453000> arrived to the end of 55k lines of nuts.nml :D ofc I missed some things ._.
19:25:19 <Eddi|zuHause> why would you go through that manually?
19:29:45 <glx> yeah I got this error too when I upgraded VS2019
19:29:49 <nielsm> he's... nuts?
19:30:07 <glx> Sacro: v15 is 2017
19:31:02 <LordAro> Samu: &
19:31:05 <LordAro> ^
19:32:12 <Samu> hmm?
19:33:15 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #7515: Fix: Really check for start_date once an AI company slot becomes available. https://git.io/fjYeA
19:33:33 <Samu> i fail at explanations
19:33:50 <Samu> descriptions, comments, etc...
19:34:00 <Samu> who can help?
19:36:13 <Samu> basically, if there's no slots, it checks daily, using the interval 3601 - 3600
19:36:24 <Samu> and never reaches 0
19:37:24 <Samu> if it gets a start_date lower than that 3601-3600 interval, then the real countdown starts, using that start_date value. When it reaches 0, it tries to make ai company
19:39:18 <glx> say that in the PR :)
19:40:31 <peter1138> Hmm, cold fnigers
19:41:35 <Samu> i could make it check every tick
19:42:05 <Samu> for now it's checking every 74 ticks
19:42:19 <Samu> which is what truebrain likes
19:43:34 <Samu> _next_competitor_start == (AI::START_NEXT_MAX + 1) * DAY_TICKS - 1 to check every tick
19:45:10 *** HerzogDeXtEr has quit IRC
19:58:22 * peter1138 fudges with road removal/conversion costs.
20:00:59 <peter1138> Heh, AIs running trams all over the place instead of trains.
20:03:04 * peter1138 blasts a bit of Foxtrot for old-times sake.
20:03:09 <peter1138> @seen belugas
20:03:09 <DorpsGek> peter1138: belugas was last seen in #openttd 2 years, 2 weeks, 0 days, 21 hours, 44 minutes, and 37 seconds ago: <Belugas> yeah, a birthday :) a good friend of mine!
20:03:15 <peter1138> :/
20:04:20 * nielsm works on another try at keeping track of squirrel allocations
20:09:13 * peter1138 ponders dinner
20:10:45 <LordAro> peter1138: where's the bike?
20:12:41 <peter1138> At the shop. Gear cable snapped and I cba doing it myself.
20:13:16 <peter1138> These new-fangled brifters and internal cable routing are too much for me :p
20:13:33 <peter1138> I can cope with down-tube friction shifters.
20:15:01 <Samu> cat ! https://www.youtube.com/watch?v=Mo2_q-TLHBQ
20:15:07 <peter1138> WAITING FOR BATTLE
20:15:17 <peter1138> [[epic instrumental-section]]
20:15:26 *** APTX has quit IRC
20:16:31 *** APTX has joined #openttd
20:17:08 <LordAro> peter1138: oh dear
20:17:10 <peter1138> I wonder, should road and tram vehicles be separated in the UI?
20:18:13 <peter1138> Nothing major, I decided to walk instead of drive so I can pig out on more food ;)
20:18:34 <LordAro> :)
20:19:26 <nielsm> https://0x0.st/zNwo.mp4
20:19:34 <nielsm> something happens!
20:19:45 <peter1138> Memory!
20:20:03 <peter1138> Nice work.
20:20:09 *** andythenorth has joined #openttd
20:20:17 <peter1138> Uh oh, this guy again
20:20:30 <nielsm> I'm not sure if it context switches the allocator correctly
20:20:53 <nielsm> but at least it measures something :P
20:22:06 <peter1138> I got as far as simple counting in the console, but had some weird values.
20:24:59 <nielsm> now also featuring GS https://0x0.st/zNwq.mp4
20:25:27 <peter1138> Now run one of Samu's AIs :p
20:25:47 <Samu> ohhh, memory!
20:26:40 <peter1138> I suppose you *could* count the memory used by vehicles etc... but... eh... no.
20:27:16 <peter1138> That's simple anyway, count * sizeof train etc
20:27:30 <nielsm> well yeah
20:27:57 <nielsm> unless we let newgrf allocate arbitrary memory :P
20:28:25 <peter1138> Those varaction chains add up ;)
20:30:42 <V453000> Eddi|zuHause: adding support for 1 cargo to all vehicles :D and let's say the code isn't exactly clean.
20:31:20 <nielsm> https://github.com/OpenTTD/OpenTTD/compare/master...nielsmh:sqmem
20:31:23 <nielsm> there's a branch
20:34:44 <nielsm> make a PR of it yet?
20:35:49 <Artea> damn
20:35:59 <Artea> for who adviced not use sendmail
20:36:08 <Artea> I'm busted
20:36:18 <Artea> seems I need to use it in IRC Services
20:40:45 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7516: Custom allocators for Squirrel https://git.io/fjYfW
20:44:17 <Samu> cool
20:44:24 <Samu> gonna test
20:45:54 <peter1138> Artea, no, you don't need *sendmail*
20:46:29 <Artea> aiiii
20:46:32 <Artea> peter
20:46:52 <Artea> I going need for Anope IRC Services apparently
20:47:00 <milek7> 'sendmail - Postfix to Sendmail compatibility interface'
20:47:10 <Artea> or really learn how to send mails via services
20:47:14 <milek7> The Postfix sendmail(1) command implements the Postfix to Sendmail compatibility interface.
20:48:41 <Artea> milek: I'm building a test irc server
20:48:45 *** circ-user-nH1UG has joined #openttd
20:49:02 <DorpsGek_II> [OpenTTD/OpenTTD] stormcone opened pull request #7517: Fix: Fix typos. https://git.io/fjYf2
20:49:22 <Artea> on services the mail uses sendmail -t
20:49:24 <nielsm> what you need is not the specific software package called "sendmail", what you need is something implementing the correct API that is compatible with sendmail
20:49:48 <Artea> I have no clue what need to do
20:49:54 *** circ-user-nH1UG is now known as supermop_work
20:49:57 <Artea> brb
20:51:25 <peter1138> Ok, that's dinner done.
20:51:29 <peter1138> Now for dessert...
20:51:51 <nielsm> I gave one of my birds a bit of pizza and I think he liked it (but he also wanted to get back to sleepytime)
20:51:51 <Artea> sorry
20:52:02 <Artea> having issues connecting my services to server
20:54:09 <Samu> ewww really slow
20:54:19 <Samu> were u testing with 10k ops?
20:54:25 <Samu> 250k ops too slow now
20:55:33 <Samu> hehe, NoCab eats memory
20:57:49 <nielsm> I did not test with any particular settings, I did not test for performance, I only did smoke testing for "looks not entirely incorrect"
20:59:35 *** crem1 has joined #openttd
21:00:33 * andythenorth ponders desert
21:00:38 <andythenorth> peter1138: what was dinner?
21:00:51 <Samu> waiting for NoCAB to crash/poof openttd
21:00:56 <Samu> unless you fixed that
21:01:08 <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7512: Replace SmallStackSafeStackAlloc and AutoFreePtr https://git.io/fjYfy
21:01:16 *** crem has quit IRC
21:01:16 <peter1138> andythenorth, https://www.instagram.com/p/BwSXYoQH0Wm/
21:01:38 <andythenorth> that's not bad
21:01:45 <andythenorth> square plates improve all food
21:01:59 <peter1138> Yes.
21:02:01 * andythenorth had kebabs
21:02:37 <peter1138> Although it's actually a square cereal bowl. Portion control, and keeps things from falling off :p
21:03:00 <peter1138> Eh, probably a soup bowl, that'd be a lot of cereal.
21:03:39 <peter1138> So road conversion costs, eh?
21:03:54 <peter1138> Can I just make it cost the same as removal & build?
21:04:12 <peter1138> It's not like rails where you can reuse or sell the rails...
21:04:16 <peter1138> Although for trams? Hmm...
21:04:19 <andythenorth> removal and build
21:04:25 <andythenorth> oof trams
21:04:56 <peter1138> The money bug currently is that you get the removal cost... *back*... whoever came up with that idea, I dunno.
21:06:24 <Samu> I agree, nerf trains
21:06:55 <Samu> eh, openttd poofed, when I wasn't here at the desk
21:11:44 <andythenorth> nerf everything
21:14:03 <nielsm> I should derail the valley a bit again some time soon, they apparently fixed my number one complaint now: trees and rocks on the tracks
21:14:09 *** raphikov has joined #openttd
21:14:49 *** Gustavo6046 has quit IRC
21:19:51 <Samu> boom, poofed at 3.38 GB memory
21:26:44 <peter1138> What are you running 32 bit?
21:29:59 <Samu> no
21:30:04 <Samu> 64-bit
21:30:42 <Samu> release x64
21:30:51 <peter1138> nielsm, hmm, any way to do the allocator without the indirection through function pointers?
21:31:24 <nielsm> I doubt it
21:31:28 <peter1138> Really?
21:32:27 <nielsm> well could just remove sqmem.cpp and implement those functions somewhere outside squirrel
21:32:46 <glx> 32 or 64bit, the issue is in the garbage collector I think
21:32:48 <nielsm> and not extend the squirrel api with sq_setallocator at all
21:33:30 <glx> but AI can allocate way too more memory ;)
21:34:24 <glx> *much
21:34:27 <peter1138> nielsm, yeah, nielsm's PR could allow a memory limit per VM.
21:34:36 <nielsm> lol
21:35:31 <nielsm> also need to check how squirrel deals with an allocation failing...
21:35:37 <glx> even in your video, a starting AIAI use twice the memory of the AI started before it
21:35:53 <nielsm> maybe allocation failure needs to be handled by an exception bubbling up through the entire VM?
21:36:30 <milek7> is allocation failure even a thing?
21:36:39 <milek7> or it just oom-kills
21:36:52 <nielsm> if you put each squirrel VM in its own arena it can be a thing
21:37:11 <Samu> i'm imagining 240 nocabs on a 4096x4096 map
21:37:14 <nielsm> where one AI runs out of memory allowed and fails allocating, while the rest of the game is fine
21:37:22 <peter1138> Yeah, return nullptr; might cause breakage :)
21:38:31 <peter1138> Hmm, maybe I should spreadsheet this build/sell/convert cost bullshit.
21:38:52 <peter1138> Oh, I can just printf on init ;)
21:41:40 <Samu> @calc 3.38 * 240
21:41:40 <DorpsGek> Samu: 811.2
21:41:54 <Samu> I need 811 GB of ram
21:43:40 <Samu> maybe one day in the future, 1 TB of ram will be the norm
21:43:52 <glx> Samu: tried to crash with 2 AIs ?
21:44:11 <Samu> no, only with 1
21:44:58 <glx> try with 2, to see if the fails happen on same memory level
21:45:25 <Samu> yesterday I tried 15 NoCABs, turns out I dont have enough ram for it
21:45:29 <Samu> didn't crash
21:45:38 <Samu> but the system was already too slow to cope
21:45:52 <peter1138> glx, I think he's in write-only mode again.
21:46:08 <Samu> Heh, ok let me try 2
21:46:17 <peter1138> Yes, we'll let you do that o_O
21:49:28 <Samu> started
21:50:46 <Samu> i was wondering, just disable the garbage collector
21:50:51 <Samu> fix all problemos!
21:51:26 <glx> no because without it the memory is not reused
21:52:00 *** Thedarkb1-T60 has quit IRC
21:55:16 <Samu> https://imgur.com/LWROsFM
21:55:22 <Samu> almost there
21:55:32 <peter1138> Hmm, well, nothing is negative now.
21:56:11 <peter1138> "SamuPatchPack" ... that's a terrifying idea.
21:56:30 <Samu> it was your idea
21:56:54 <peter1138> I doubt it.
21:57:37 <Samu> strange
21:58:00 <Samu> memory keeps rising in task manager, but over there in openttd it's still 3.18 GB for each
21:58:11 <nielsm> oh well, I delivered some stuff in derail valley without derailing, enjoyed running on clear rails, and then teleported over to old bob's garage and unlocked it
21:58:25 <nielsm> and yes his secret vehicle is not controllable with mouse and keyboard
22:01:15 <peter1138> Heh
22:01:49 <andythenorth> hmm
22:03:40 *** Thedarkb-T60 has joined #openttd
22:04:10 <Samu> interesting, no crash yet
22:04:11 <andythenorth> what was I doing?
22:04:44 <Samu> they reached the point they built vehicles
22:05:00 <Samu> aha, crash
22:05:06 <Samu> spoke too early
22:05:23 <peter1138> andythenorth, deciding how much road should cost to remove.
22:05:42 <peter1138> Should highway cost the same as dirt tracks to remove?
22:05:46 <glx> so same memory level ? more ? less ?
22:06:12 <DorpsGek_II> [OpenTTD/OpenTTD] michicc approved pull request #7517: Fix: Fix typos. https://git.io/fjYJp
22:06:44 <DorpsGek_II> [OpenTTD/OpenTTD] michicc merged pull request #7517: Fix: Fix typos. https://git.io/fjYf2
22:07:14 <andythenorth> peter1138: I usually just level all that crap
22:07:20 <andythenorth> they're not interesting costs
22:07:36 <peter1138> andythenorth, not interesting, but it affects road conversion cost.
22:07:39 <Samu> aha here it is
22:07:40 <Samu> https://imgur.com/zzd4ZWz
22:07:45 <peter1138> andythenorth, which is currently exploitable.
22:07:57 <andythenorth> is it exploitable if they all cost same to remove?
22:08:24 <glx> Samu: but with double memory this time it seems
22:08:24 <peter1138> andythenorth, not really. The exploit is that currently conversion can give you more money than you spent in the first place.
22:08:33 <peter1138> andythenorth, which is obviously wrong.
22:08:55 <andythenorth> if it was left to me, cost to clear would be same in all cases
22:09:06 <peter1138> Well I'm asking you.
22:09:07 <andythenorth> and would just use the default cost to clear road
22:09:12 <andythenorth> as prior to NRT
22:09:19 <peter1138> Yes, and the conversion cost?
22:09:38 <andythenorth> sum of cost of clearing + cost of building
22:09:47 <peter1138> So zero benefit. Okay.
22:09:55 <andythenorth> zero benefit
22:10:32 <andythenorth> tram tracks are slightly awkward, because realism + precedent with trains
22:11:19 <peter1138> It's possible to have different behaviour between roads and trams.
22:11:44 <Samu> gonna try borkai, think it also hoards memory like crazy
22:14:16 <Samu> afk dinner
22:17:00 *** sla_ro|master has quit IRC
22:20:31 <nielsm> gn, I'll do some more with that memory management tomorrow, probably
22:21:45 <peter1138> Byte
22:21:46 <peter1138> -t
22:21:59 <andythenorth> I should probably be doing some newgrf or something
22:22:07 <peter1138> Or testing NRT.
22:22:13 <peter1138> Finding the bugs.
22:23:45 <peter1138> Hmm.
22:24:05 <peter1138> Flat fee for roads, variable for tram tracks.
22:24:53 <peter1138> But never beneficial to build one type and then convert.
22:26:36 <peter1138> Hmm, of course, AIs only ever build original ROAD and ELRL.
22:28:36 *** nielsm has quit IRC
22:32:49 *** Progman has quit IRC
22:38:06 <Artea> yeahhhhh
22:38:15 <Artea> compiling OTTD in VPS :D
22:38:34 <andythenorth> I should make new Road Hog
22:38:38 <andythenorth> to test NRT
22:38:42 <andythenorth> or HEQS or something
22:39:28 <andythenorth> or I should finish Iron Horse, Unsinkable Sam and FIRS
22:39:34 <andythenorth> before wrecking anything new :P
22:40:23 *** arikover has joined #openttd
22:42:52 <andythenorth> any Eddi|zuHause? o_O
22:44:57 <peter1138> I should find my soldering iron.
22:45:15 <andythenorth> you been watching Big Clive again?
22:45:38 <peter1138> Nah.
22:45:55 <peter1138> Building my freezer temperature sensor :p
22:46:33 <peter1138> Hmm, removing tram tracks now returns some money.
22:47:05 <peter1138> Which is kinda odd :/
22:47:39 <peter1138> But at least you never make money now.
22:48:39 <dwfreed> scrap?
22:49:03 <peter1138> Something like that.
22:49:05 <dwfreed> RCT had the same behavior; you'd get some money back from demolishing a ride
22:49:23 <peter1138> Normal rail track already does it.
22:52:33 <peter1138> Oh, silly road types. This one changes visual style based on date.
22:52:34 <peter1138> D'oh.
22:54:37 <Samu> back
22:54:42 <Samu> borkai didn't crash yet
22:54:52 <Samu> it's sitting at 800 MiB
22:56:41 <glx> <@peter1138> Oh, silly road types. This one changes visual style based on date. <-- desync possible no ?
22:57:02 <peter1138> No?
22:57:14 <peter1138> varaction date
22:57:20 <peter1138> Not load date
22:57:24 <glx> ah it's at runtime
23:03:23 *** andythenorth is now known as Guest320
23:03:56 *** andythenorth has joined #openttd
23:03:59 <andythenorth> ouch
23:04:05 <andythenorth> laptop hard crashed :(
23:04:14 <andythenorth> strictly speaking, I did kill -9 the windowserver
23:04:23 <andythenorth> but why should that crash it? :P
23:06:04 *** gelignite has quit IRC
23:06:46 *** Guest320 has quit IRC
23:10:18 <peter1138> Well...
23:17:06 <peter1138> Okay, regression test still passes.
23:17:10 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
23:19:11 *** Wolf01 has quit IRC
23:20:01 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/fjYTR
23:20:36 <peter1138> Oh, I need to rebase due to conflicts... in a comment :p
23:22:14 <andythenorth> oof
23:22:23 <andythenorth> also bed :P
23:22:24 *** andythenorth has quit IRC
23:22:25 <peter1138> Nah, easy fix.
23:22:28 <peter1138> BYE THEN
23:23:45 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
23:51:58 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7512: Replace SmallStackSafeStackAlloc and AutoFreePtr https://git.io/fjYkq
23:52:35 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7512: Replace SmallStackSafeStackAlloc and AutoFreePtr https://git.io/fjYkm
23:52:53 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7512: Replace SmallStackSafeStackAlloc and AutoFreePtr https://git.io/fjmoj
23:57:31 *** Thedarkb1-T60 has joined #openttd
23:57:43 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7515: Fix: Really check for start_date once an AI company slot becomes available. https://git.io/fjYkc
23:58:19 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7510: Emscripten support https://git.io/fjYkl