Config
Log for #openttd on 5th October 2018:
Times are UTC Toggle Colours
00:00:29  <Samu> https://wiki.openttd.org/Game_mechanics#Delivery_payment_rates this wiki is wrong then
00:02:09  <ST2> it's a wiki, edit it ^^
00:02:26  <Samu> Early Delivery Time (days) and Late Delivery Time (days) are all to be *2.5
00:04:11  <Samu> @calc 1/2.5
00:04:11  <DorpsGek> Samu: 0.4
00:04:21  <Samu> oh, nevermind
00:08:27  <Samu> Distance is measured between the name-labeled tiles of the stations, not from the industries or by vehicle distance traveled. It is computed by adding the differences in x and y tiles (manhattan distance), not straight-line distance.
00:18:13  <Samu> for every 185 ticks, the transported cargo ages and transit_days++ happens
00:18:28  <Samu> so misleading to call it transit_days
00:26:01  <Samu> let me think. I have 2 trains transporting the same cargo from the same origin at O(0,0). Train A goes from O(0,0) to A(25,25). Train B goes from O(0,0) to B(50,0).
00:26:48  <Samu> Train A takes 30 days to travel. Train B takes 20 days to travel.
00:27:45  <Samu> How to make the profit of Train B to match that of Train A over the same period of time?
00:28:02  *** hph^ has quit IRC
00:28:46  *** hph^ has joined #openttd
00:34:08  <Samu> Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type)
00:34:53  <Samu> with DistanceManhattan, uint dist = 50
00:35:59  <Samu> transit_days is, for Train A, 30/2.5 = 12
00:36:15  <Samu> transit_days is, for Train B, 20/2.5 = 8
00:36:33  <Samu> pieces, let's assume 30 pieces
00:36:37  <Samu> same cargo
00:41:41  <Samu> assuming the cargo value didn't decay for both trains, the income per delivery is 30 * 50 = 1500
00:41:47  *** rocky11384497 has quit IRC
00:44:57  <Samu> per year, Train A would make 1500 * 365 / 30 = 18250
00:45:27  <Samu> per year, Train B would make 1500 * 365 / 20 = 27375
00:46:19  <Samu> the goal is to make Train B profit the same as Train A
00:46:58  <ST2> how can you make 1500 * 365 / 20
00:47:02  <ST2> equal to 1500 * 365 / 30
00:47:15  <ST2> ?
00:47:28  <Samu> that is what I'm trying to come up with
00:47:38  <Samu> that is the question
00:48:08  <ST2> really?! notice the "365 / 30" and "365 / 20"
00:48:42  <Samu> the distance has to be measured differently
00:49:22  <ST2> so, why payements must be the same?
00:50:23  <ST2> oh well, you may continue ^^
00:52:39  <Samu> 30 * 50 * 365 / 30 = 30 * x * 365 / 20
00:52:45  <Samu> what is the x?
00:56:47  <ST2> you're really bad at math
00:57:10  <ST2> 18250 = 547,5 * x
00:57:25  <ST2> x= 18250/547,5
01:00:06  <Samu> @calc 18250/547.5
01:00:06  <DorpsGek> Samu: 33.3333333333
01:00:10  <ST2> wait, you were really not getting there?! or was a rethorical question?
01:00:35  <ST2> man, I used my computer calculator for it
01:00:35  <Samu> 33.3333 is the value I'm looking for :)
01:00:40  <ST2> why spam here?
01:02:14  <Samu> looks like the value I was expecting (37.5) was wrong
01:02:21  <ST2> man, I used my computer calculator for it
01:02:23  <ST2> why spam here?
01:02:33  <Samu> i'm thinking, not spamming
01:02:41  <ST2> is that a hard question for you?
01:02:57  <ST2> (oh crap, made another question :|)
01:03:28  <ST2> (window logo key + R) -> calc
01:03:31  <ST2> ENTER
01:03:38  <ST2> there is a calculator
01:05:29  <Samu> Must come up with a formula that makes distance from O to A = 50 and distance from O to B = 33.3333
01:05:57  <ST2> and I just gave you a way to YOUR computer calculator
01:06:18  <Samu> I have it open, too
01:06:24  <ST2> and O (letter) is not 0 (number)
01:06:40  <Samu> O for Origin
01:06:58  <ST2> and A is Astination?
01:07:20  <Samu> Destination A
01:07:32  <ST2> so, why not call it D
01:07:43  <Samu> there's Destination B
01:07:59  <ST2> as Origin B
01:08:35  <Samu> oh, i made a mistake
01:08:44  *** Supercheese has joined #openttd
01:08:46  <Samu> O to A = 33.333 and O to B = 50
01:08:53  <ST2> will take a while till you cover the whole alphabet
01:10:07  <Samu> actually i made various mistakes already, grr :(
01:13:15  <Samu> Train A goes from O(0,0) to A(50,0) and takes 30 days. Train B goes from O(0,0) to B(25,25) and takes 20 days.
01:13:58  <Samu> using DistanceManhattan, the distance OA = 50, and OB = 50
01:14:55  <ST2> calculate O(0,0) to A(50,0) and O(0,0) to B(25,25) for 20 and 30 days
01:15:03  <ST2> is the value equal?
01:15:28  *** WWacko1976-work has joined #openttd
01:16:45  <Samu> I need to figure how to make OA = 50, and OB = 33.3333 using the same formula for the distance
01:17:23  <ST2> bird distance?
01:17:41  <Samu> no, it can't be distancemanhattan
01:17:44  <ST2> because looks like pitagoras theorem
01:17:52  <Samu> it can't be that either
01:20:02  <Samu> I was convinced this was it: 3 * min(dx, dy) / 2 + |dx-dy|
01:21:27  <Samu> but this gets me OB = 37.5
01:24:20  <Samu> @calc 3 * min(abs(25 - 0), abs(25 - 0)) / 2 + abs(abs(25 - 0) - abs(25 - 0))
01:24:20  <DorpsGek> Samu: 37.5
01:24:57  <Samu> and no, windows calculator can't do this
01:25:42  <ST2> windows apps -> scientific calculator
01:25:51  <ST2> there's lots of them free
01:26:12  <ST2> and yes, those can do it
01:28:12  <Samu> @calc 3 * min(abs(50 - 0), abs(0 - 0)) / 2 + abs(abs(50 - 0) - abs(0 - 0))
01:28:12  <DorpsGek> Samu: 50
01:29:17  *** hph^ has quit IRC
01:29:57  *** hph^ has joined #openttd
01:33:39  *** KouDy has quit IRC
01:34:42  <Samu> 4 * min(dx, dy) / 3 + |dx-dy|
01:34:54  <Samu> it's funny, _dp_ was right all long
01:35:17  <Samu> and I was wrong, utterly convinced myself I was right, and I wasn't
01:35:32  <Samu> forgive me _dp_
01:36:37  <Samu> @calc 4 * min(abs(50 - 0), abs(0 - 0)) / 3 + abs(abs(50 - 0) - abs(0 - 0))
01:36:37  <DorpsGek> Samu: 50
01:36:53  <Samu> @calc 4 * min(abs(25 - 0), abs(25 - 0)) / 3 + abs(abs(25 - 0) - abs(25 - 0))
01:36:53  <DorpsGek> Samu: 33.3333333333
01:37:01  <Samu> yep... _dp_
01:37:06  <Samu> u're the man
01:37:09  <ST2> sadly _dp_ isn't on, same as CM servers (he's owner)
01:37:12  <Samu> if u ever get to read this
01:37:35  <Samu> https://www.tt-forums.net/viewtopic.php?p=1175673#p1175673
01:37:52  <Samu> there's his formula
01:40:16  <ST2> yup, he was right in 2016, same as today
01:41:13  <ST2> he grabbed the work of LL servers that tried to fix somethings, and even Nova after
01:41:32  <ST2> guess people are quitting when hitting devs wall
01:42:25  <Samu> i gotta go sleep. see you later
01:42:41  *** Samu has quit IRC
01:49:51  <ST2> and I guess the repercussion of openttdcoop have 1 player, for only 1 hour(!) last week
02:00:30  *** KouDy has joined #openttd
02:14:32  *** snail_UES_ has joined #openttd
02:17:59  *** Flygon has joined #openttd
02:32:32  *** hph^ has quit IRC
03:10:36  *** haudrauf has quit IRC
03:11:34  *** haudrauf has joined #openttd
03:57:38  *** Supercheese has quit IRC
03:58:42  *** glx has quit IRC
04:11:27  *** snail_UES_ has quit IRC
05:39:47  *** Wacko1976 has quit IRC
05:41:31  *** Lejving__ has quit IRC
06:44:35  *** nielsm has joined #openttd
06:49:16  *** yellyFish has quit IRC
06:55:56  *** hph^ has joined #openttd
07:19:29  *** Wacko1976 has joined #openttd
07:21:37  *** Thedarkb-T60 has joined #openttd
07:36:52  *** Thedarkb-T60 has quit IRC
07:46:26  *** hph^ has quit IRC
08:31:15  *** Wacko1976 has quit IRC
08:41:08  *** Laedek has quit IRC
09:19:51  *** iSoSyS has joined #openttd
09:36:46  *** Samu has joined #openttd
09:52:58  <Samu> @calc 4 * min(abs(3088 - 4088), abs(1003 - 4)) / 3 + abs(abs(3088 - 4088) - abs(1003 - 4))
09:52:58  <DorpsGek> Samu: 1333
09:54:39  <Samu> @calc 4 * min(abs(4087 - 4087), abs(16 - 2015)) / 3 + abs(abs(4087 - 4087) - abs(16 - 2015))
09:54:39  <DorpsGek> Samu: 1999
09:58:23  <Samu> 30 * 1999 * 365 / 594 = 30 * x * 365 / 396
09:59:37  <Samu> @calc (30 * 1999 * 365 / 594) / (30 * 365 / 396)
09:59:37  <DorpsGek> Samu: 1332.66666667
10:51:58  *** iSoSyS has quit IRC
10:59:02  *** Stimrol has quit IRC
11:00:33  *** Stimrol has joined #openttd
11:36:19  *** sla_ro|master has joined #openttd
12:41:38  *** iSoSyS has joined #openttd
12:50:24  *** snail_UES_ has joined #openttd
12:55:37  *** wodencafe has quit IRC
13:04:18  *** snail_UES_ has quit IRC
13:07:36  *** Samu has quit IRC
13:12:37  *** Samu has joined #openttd
13:26:13  <Samu> lol
13:26:17  <Samu> CPU                 (v5) - bankrupted 04-2049
13:26:29  <Samu> a few months away from 100 years
13:26:39  <Samu> really tough luck
13:35:40  *** synchris has joined #openttd
13:36:22  *** sim-al2 has quit IRC
13:46:03  *** APTX has quit IRC
13:46:28  *** APTX has joined #openttd
13:56:18  *** sla_ro|master has quit IRC
14:22:32  <Samu> LordAro: hi, are you around? Am trying to do what you asked me https://github.com/OpenTTD/OpenTTD/pull/6925#issuecomment-426815471
14:22:54  <Samu> may need help
14:28:12  <LordAro> Samu: wait 3ish hours
14:28:25  <LordAro> but by all means try yourself :p
14:30:05  <Samu> ok, cya later
14:35:29  *** Wormnest has joined #openttd
14:41:19  *** iSoSyS has quit IRC
14:56:19  <dihedral> hey hey
14:57:02  <Samu> hi
15:00:22  *** TheMask96 has quit IRC
15:02:02  *** TheMask96 has joined #openttd
15:06:26  *** haudrauf has quit IRC
15:07:25  *** haudrauf has joined #openttd
15:23:51  <Samu> is it normaliZe or normaliSe ?
15:23:57  <Samu> who's english enough to know?
15:24:35  <ST2> https://translate.google.pt/#pt/en/normalizar
15:24:46  <nielsm> do you want to write british or american english?
15:25:07  <nielsm> british tends to prefer S spellings and american tends to prefer Z spellings
15:25:33  *** Flygon has quit IRC
15:25:35  *** HerzogDeXtEr has joined #openttd
15:25:40  <nielsm> (chris sawyer is from england so transport tycoon is originally british english)
15:27:00  <Samu> ok with S then
15:27:30  <nielsm> and the main translation file (english.txt) for ottd is also british english
15:43:05  <Samu> uint DistanceTransportedGoodsIncome(TileIndex, TileIndex); ///< Normalised distance which makes diagonal and straight directions equally profitable
15:43:09  <Samu> good english?
15:44:13  <nielsm> probably fine
15:45:10  *** Thedarkb-T60 has joined #openttd
15:51:22  <Samu> in the end... this distance still feels insufficient due to cargo aging
15:51:39  <Samu> diagonal distances will still benefit from it
15:51:54  <Samu> but not as blatantly as before
15:52:06  *** HerzogDeXtEr1 has joined #openttd
15:52:58  *** yellyFish has joined #openttd
15:53:27  <Samu> not ready for a pull request :(
15:57:30  <Samu> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:DistanceTransportedGoodsIncome
15:57:36  *** HerzogDeXtEr has quit IRC
15:58:46  *** Thedarkb-T60 has quit IRC
16:00:33  <nielsm> but why is it even a problem? I know the TT map doesn't exactly follow euclidian geometry but I think most players would still expect the pythagorean theorem to hold
16:19:39  <Eddi|zuHause> uhm what? the pythagorean theorem is the first thing that goes out the window with non-euclidean geometry
16:20:18  *** asdasdasdadagsd has joined #openttd
16:24:11  <Eddi|zuHause> in particular, you need a norm (a distance calculation with an orgin point) that fulfills the parallelogram equation https://en.wikipedia.org/wiki/Parallelogram_law
16:24:54  <Eddi|zuHause> which is pretty much hopeless if you're not using the euclidean norm
16:38:45  *** Progman has joined #openttd
16:45:02  *** sla_ro|master has joined #openttd
16:50:42  <Samu> git rebase -i "what goes here?"
16:50:59  <nielsm> not necessarily anything
16:51:05  <nielsm> git rebase -i master
16:51:09  <nielsm> is usually a good bet
16:51:36  <nielsm> not giving a rebase target makes git take a guess, which is usually where it last diverges from another branch
16:55:53  <Samu> When you save and exit the editor, Git rewinds you back to the last commit in that list and drops you on the command line with the following message:
16:56:06  <Samu> https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
16:56:12  <Samu> how am I doing edits?
16:56:43  <nielsm> with your regular editor
16:56:56  <Samu> visual studio?
16:57:00  <nielsm> yes
16:57:19  <nielsm> I assume you're talking about the "edit" action
16:57:26  <Samu> but how do I get to that point in history?
16:57:33  <Samu> how to make the directory
16:57:41  <Samu> erm, confused
16:57:56  <Samu> do I switch to a temporary branch?
16:58:00  <nielsm> no
16:58:06  <nielsm> you type the command
16:58:11  <nielsm> git rebase -i master
16:58:28  <nielsm> git opens a text editor in your console where you are asked to set up what you want to change
16:58:42  <nielsm> by listing all the commits in history between the rebase target (master) and now
16:58:50  <Samu> https://imgur.com/gWjBzEB
16:58:55  *** Gja has joined #openttd
16:59:08  <Samu> i have that in the editor, am about to exit
16:59:12  <nielsm> each line in the file has a command, a revision hash, and a commit message
16:59:37  <nielsm> yes you save (ctrl+o, enter) and exit (ctrl+x)
16:59:48  <nielsm> then git begins the actions you specified
17:00:07  <nielsm> takes the first four revisions as-is (because you gave the "pick" command)
17:00:22  <nielsm> applies the fifth (first "edit") and then it drops you at the commandline
17:00:24  *** rocky11384497 has joined #openttd
17:00:36  <nielsm> telling you that you can now begin editing the files as normal
17:00:50  <nielsm> then you make your additional code changes (with visual studio or whatever)
17:00:52  <nielsm> save
17:01:01  <nielsm> compile to test that you didn't make any mistakes
17:01:18  <nielsm> and when you're sure you've made the changes for that one revision, you use the command:
17:01:34  <nielsm> git add changedfile1.cpp changedfile2.h
17:01:42  <nielsm> (whatever filenames you changed)
17:01:43  *** Gja has quit IRC
17:01:44  <nielsm> and then:
17:01:48  <nielsm> git commit --amend
17:02:10  <nielsm> that modifies the commit you originally had at that point
17:02:10  <Samu> uh, that's complicated
17:02:16  <Samu> add files?
17:02:21  <Samu> i can't overwrite?
17:02:38  <nielsm> "git add" means "prepare the changes in these files to be committed"
17:03:00  <nielsm> (technically, add the changes to the git index)
17:03:57  <Samu> the guide is telling me to use --amend
17:04:07  <nielsm> that's for commit
17:04:49  <Samu> ok
17:04:53  <Samu> let's try
17:04:56  <nielsm> the basic git workflow for committing changes is that you first use "git add" to stage the changes, then you use "git commit" to actually create a new revision
17:05:46  <nielsm> if you mess up, git also has a fancy feature called "git reflog", which tells you all previous revision hashes you've touched, and will let you recover from big mistakes
17:06:01  <Samu> I prefer the recycle bin
17:06:10  <Samu> and get repository again
17:06:15  <nielsm> just never delete your working tree, if you make a mistake rebasing you can recover with the reflog
17:09:01  <Samu> stupid visual studio sometimes creates some temporary files I have to right click ignore
17:09:41  *** frosch123 has joined #openttd
17:10:16  <Samu> according to visual studio I am in a (no branch)
17:10:25  <Samu> i suppose this is where I want to be?
17:10:39  <nielsm> yes
17:12:02  <Samu> GitHub Desktop says I'm on a Detached HEAD
17:12:30  <Eddi|zuHause> i'm probably "doing it wrong", but i tend to do "git commit -a" and skip the "add" step...
17:13:38  <Samu> visual studio is building
17:13:51  <nielsm> I'm a control freak so I always add manually :P
17:14:02  <nielsm> and do "git status" and "git diff" way too often
17:14:02  <LordAro> ^ paranoia about adding the wrong thing
17:14:33  <Samu> built, it runs
17:14:47  <Eddi|zuHause> means your changes are not elementary enough, and you're retroactively trying to separate them
17:15:54  <Samu> ok, i got a 1 changed file
17:16:08  <Samu> let me reread
17:17:09  <Samu> git add src/aircraft_cmd.cpp ?
17:17:15  <Samu> or \
17:17:21  <Samu> I dunno what Git Bash uses
17:17:27  <nielsm> / is fine
17:18:24  <nielsm> you can use / path separator most places in windows, really
17:18:51  <Samu> ok, it was added, not really sure what happened, no message at all
17:18:58  <Samu> but i presume it was added
17:19:21  <nielsm> "git status" will tell you what files are in the index
17:19:40  <nielsm> (and it should also remind you that you are in the middle of an interactive rebase)
17:20:22  <Samu> uhm, i see this https://imgur.com/ipGZIqQ
17:20:50  <nielsm> yep
17:21:01  <nielsm> that means the changes were staged
17:21:21  <nielsm> you can also use "git diff --cached" to see a full diff of what will be committed before doing it
17:21:34  <nielsm> but you're ready to "git commit --amend" now
17:21:58  <nielsm> it'll then let you edit the commit message, but if you don't have any changes to it just exit the editor to do the amend
17:22:10  <Eddi|zuHause> <nielsm> you can use / path separator most places in windows, really <-- except in places where windows cmd programs assume / means the start of a parameter (where linux uses - or --)
17:23:08  <nielsm> yes
17:23:31  <nielsm> and if for whatever reason you're into raw NT paths it won't work there either :P
17:25:15  <Samu> https://imgur.com/0OdN5sE
17:25:18  <Samu> one step at a time
17:25:44  <Eddi|zuHause> oh i pity the poor soul who degrades that far :p
17:26:01  <Samu> interesting, that was not what I expected to see
17:28:14  <nielsm> the original changes of the commit you're altering are already committed
17:28:23  <nielsm> so you're only seeing your changes to it
17:28:37  <nielsm> when you commit --amend it'll merge the two changesets
17:29:04  <Samu> aha, i see
17:29:15  *** andythenorth has joined #openttd
17:29:40  <Samu> now git rebase --continue?
17:30:43  <nielsm> yes
17:30:48  <nielsm> after the amend is done
17:31:25  <Samu> yep, i'm on the next one, visual studio again
17:32:09  <Samu> github desktop is really useful here
17:33:22  <Samu> or i could just look at this https://github.com/OpenTTD/OpenTTD/pull/6925/commits/c7741c6f1fe0131480bb7419b5d26b1f19f08842
17:34:43  <andythenorth> yo
17:36:41  <andythenorth> I assume I can't return CB_NO_RESULT when using sprite compositing in nml?
17:37:16  <andythenorth> action 2 always has to resolve to a realsprite?
17:37:50  <Samu> can I use git commit --amend --no-edit
17:37:53  <nielsm> I can't answer that question
17:38:05  <nielsm> Samu: probably yes
17:38:08  <andythenorth> nielsm: mine or samu's :P
17:38:17  <nielsm> andythenorth yours was the no-answer one :)
17:38:21  <andythenorth> that's ok :)
17:38:29  <andythenorth> I've been around newgrf for 10 years, I should know :P
17:38:35  <andythenorth> quak
17:38:44  <nielsm> instead, you can have a short birb video https://0x0.st/sgrg.webm
17:39:04  <andythenorth> nice birbs
17:39:28  <nielsm> right until they aren't nice!!
17:39:33  <andythenorth> they look really happy
17:39:37  <andythenorth> due to the shape of their face
17:39:45  <andythenorth> even when they're fighting
17:40:55  <Samu> oh, number 8 file is another
17:41:25  <frosch123> andythenorth: you need a spritegroup with zero sets, not sure whether CB_FAILED would do that; but CB_NO_RESULT is definitely incorrect
17:41:27  <Samu> src/vehicle.cpp
17:42:58  <andythenorth> frosch123: currently I just resolve to a realsprite with empty blue boxes
17:43:06  <andythenorth> which absolutely works, just seems inefficient :)
17:46:26  <Eddi|zuHause> i seem to have misplaced the "A","B" and "C" parts of my movie archives
17:47:07  <andythenorth> there is a smart reply to that
17:47:10  <andythenorth> but I didn't think of it
17:49:26  <frosch123> andythenorth: "spriteset(empty) {}" and "return empty" may work
17:50:00  *** triolus has quit IRC
17:50:12  <Eddi|zuHause> what exactly does CB_FAILED resolve to anyway?
17:50:50  <frosch123> Eddi|zuHause: i can see, all of alf gone is bad; but what is important about C?
17:51:22  <Eddi|zuHause> frosch123: it's not that bad, only movie archive, not series archive
17:51:24  *** gelignite has joined #openttd
17:51:29  <Samu> the end!
17:51:50  <Samu> pull origin
17:51:51  <Samu> ?
17:51:52  <Samu> or
17:52:01  <Samu> the last command to use is how?
17:52:32  <Samu> oh i dont want to pull, i want to push with force
17:52:33  <nielsm> after all actions in your interactive rebase are done, you're done ;)
17:52:46  <nielsm> yes, force push to your fork on github
17:53:05  <Samu> git push --force ?
17:53:07  <nielsm> github automatically updates the PR with the changed commits
17:53:13  <nielsm> yes
17:53:41  <Samu> ok, done
17:54:07  <Eddi|zuHause> random question: what qualifies 4/3 as a "good" approximation of sqrt(2)?
17:54:32  *** glx has joined #openttd
17:54:32  *** ChanServ sets mode: +v glx
17:59:30  <frosch123> Eddi|zuHause: it's better than 3/2 and less complicated than 7/5? and it has a power of two somewhere
18:00:02  <andythenorth> frosch123: spriteset(empty) {} trips a syntax error :)
18:00:03  <andythenorth> Syntax error, unexpected token "}"
18:00:22  <andythenorth> this isn't a very interesting issue to solve :)
18:00:25  <frosch123> if you add a [] between the {} ?
18:00:43  <frosch123> so you have a complete collection of all parentheses types?
18:01:01  <frosch123> and only weird languages do < >
18:01:24  <andythenorth> no syntax error
18:01:30  <nielsm> :<
18:01:33  <andythenorth> but broken sprites (the classic question mark)
18:01:47  <frosch123> aw
18:03:16  <andythenorth> empty png is fine :)
18:03:29  <andythenorth> I am finding good uses for sprite compositing
18:03:35  <Samu> 4/3 is because 256/192
18:03:49  <andythenorth> but when use of layers is conditional, it can be a bit fiddly to handle
18:04:08  <andythenorth> it's all worked nicely though now
18:04:09  <Eddi|zuHause> "good" as in "clever, but next year we're calling it BAD FEATURE" or actually good?
18:04:16  <andythenorth> hmm
18:04:24  <LordAro> Samu: yay!
18:04:32  <andythenorth> good as in, efficient on not repeating hand-drawn sprites needlessly
18:04:36  <andythenorth> maintenance + quality good
18:04:45  <andythenorth> but actually the compile to achieve it is quite convoluted
18:04:57  <andythenorth> it strings together 4 different subsytems :P
18:05:02  <Samu> hi
18:05:03  <Eddi|zuHause> i'd have said "sustainable", but https://xkcd.com/1007/
18:05:17  <andythenorth> :P
18:06:47  <Eddi|zuHause> (well, i'd question the validity of a "linear" extrapolation in that graph)
18:08:06  <Samu> https://farm.openttd.org/jenkins/blue/organizations/jenkins/OpenTTD%2FOpenTTD/detail/PR-6925/11/pipeline/
18:08:15  <Samu> this thing is funny to watch
18:08:35  <Samu> your compilers are utterly slow
18:08:46  <Samu> or at least visual studio do it faster
18:08:49  <LordAro> it's probably got less cores than you
18:09:00  <LordAro> and it does it completely from scratch
18:10:49  <Samu> cocoa_m.cpp
18:10:53  <Samu> not my fault
18:13:03  <andythenorth> most of our production VMs are much slower than our developer laptops
18:13:20  <andythenorth> (at work)
18:13:59  <andythenorth> oof hg is not git, again
18:14:29  <andythenorth> one day I'll get around to switching
18:15:04  <Samu> 1m38s to build
18:15:07  <Samu> here
18:15:41  <Samu> ah, a warning
18:15:43  <Samu> Severity	Code	Description	Project	File	Line	Suppression State Warning	C4267	'argument': conversion from 'size_t' to 'uint', possible loss of data	openttd	D:\OpenTTD\OpenTTD GitHub\OpenTTD\src\tunnelbridge_cmd.cpp	719
18:17:21  <LordAro> is that code you've edited?
18:17:24  <LordAro> if not, ignore it
18:17:50  <Samu> no, i didn't edit
18:18:17  <Samu> _cleared_object_areas[coa_index].first_tile = old_first_tile;
18:18:32  <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/tunnelbridge_cmd.cpp#L719
18:18:39  <Samu> it's official code
18:23:32  <Samu> it's complaining about coa_index
18:24:00  <Samu> size_t coa_index = coa - _cleared_object_areas.Begin();
18:25:42  <LordAro> ah yeah, SmallVector uses unit as an indexing type
18:26:10  <LordAro> that'll get fixed by #6817, if it ever gets finished
18:26:23  <LordAro> uses uint*
18:29:24  <andythenorth> Eddi|zuHause: so pantographs must vary by position in consist? :P
18:29:49  <Eddi|zuHause> depends on your definition of "must"
18:29:57  *** triolus has joined #openttd
18:30:02  <andythenorth> it's not hard to add a few more switches
18:30:23  <Eddi|zuHause> it would be a nice detail
18:30:39  <Eddi|zuHause> that 99% of the players never notice
18:30:41  <andythenorth> what was the pattern?
18:30:50  <andythenorth> assume A and B pantographs
18:30:52  <andythenorth> and up/down
18:31:08  <Eddi|zuHause> 1 engine: aB
18:31:15  <Eddi|zuHause> 2 engines: AbaB
18:31:37  <Eddi|zuHause> more engines: (Ab)*bA
18:31:42  <Eddi|zuHause> err
18:31:45  <Eddi|zuHause> more engines: (Ab)*aB
18:32:11  <andythenorth> so is it actually: if last in consist aB else Ab ?
18:32:31  <Eddi|zuHause> seems so
18:32:38  <andythenorth> pretty trivial then
18:32:52  <Eddi|zuHause> next is detecting what constitutes an "engine"
18:33:49  <andythenorth> I was going to rely on same ID
18:34:07  <andythenorth> there aren't enough twin-pantograph electric engines to worry about combinations
18:34:35  <andythenorth> oof, USA has different procedure :P http://www.railpictures.net/photo/672778/
18:34:42  <andythenorth> that is a co-incidental find
18:35:10  <andythenorth> they are single pantograph though
18:35:46  <Eddi|zuHause> well i'm more surprised that they actually have electric freight trains at all
18:36:48  <andythenorth> it's not common
18:37:15  <Eddi|zuHause> anyway, if nml supported procedure calls, the "what constitutes an engine" check could be a use case for that
18:38:10  <andythenorth> within horse, I can just do it by ID
18:38:17  <andythenorth> I already do other things
18:38:21  <andythenorth> similar
18:39:45  <Eddi|zuHause> i suppose "position in same-id chain" is enough for most actual use cases
18:52:58  *** Wolf01 has joined #openttd
18:53:03  <Wolf01> o/
18:56:21  <andythenorth> hi Wolf01
18:57:55  <andythenorth> ha ha
18:58:02  <andythenorth> I intended to link this seriously
18:58:09  <andythenorth> but the XKCD :P
18:58:10  <andythenorth> http://ivory.idyll.org/blog/2018-oss-framework-cpr.html
19:03:04  *** Gja has joined #openttd
19:10:33  *** ToBeFree has joined #openttd
19:11:16  *** Gja has quit IRC
19:21:18  <andythenorth> quite a bit of this around eh https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/
19:21:25  <andythenorth> https://thenewstack.io/darker-side-open-source/
19:21:34  <andythenorth> seems to be a topic in my twitter at least
19:24:21  *** GroovyNoodle has joined #openttd
19:26:45  <andythenorth> this is worth a read https://www.jeffgeerling.com/blog/2016/why-i-close-prs-oss-project-maintainer-notes
19:30:36  *** rocky11384497 has quit IRC
19:35:04  <peter1138> hello
19:36:24  <andythenorth> ooh
19:36:28  <andythenorth> it's peter1138
19:36:44  <LordAro> omg
19:37:00  <LordAro> speaking of OSS devs getting burnt out, peter1138 should review some PRs
19:37:32  <LordAro> (much hugs to all devs)
19:38:27  <andythenorth> we should have a 'probably fine' branch
19:38:42  <andythenorth> which is the feeder to stable
19:38:50  <peter1138> I could maintain a branch in my github "fork" but... then I'd need to maintain it.
19:38:54  <andythenorth> yair
19:39:02  <LordAro> andythenorth: that's supposed to be master
19:39:13  <andythenorth> I could maintain a branch, but I've been programming for 35 years, and I'm still not good
19:39:16  <LordAro> unfortunately, the lack of nightlies has meant testing has rather dried up
19:39:25  <andythenorth> still, at least I'm working on it :P
19:40:17  <andythenorth> samu has rekt the PR count :(
19:40:21  <andythenorth> we were winning
19:40:23  <andythenorth> https://github.com/OpenTTD/OpenTTD/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+-label%3A%22waiting-on-author%22+
19:43:03  *** ToBeFree is now known as Guest646
19:43:03  *** ToBeFree has joined #openttd
19:45:34  <LordAro> andythenorth: good reads, thanks for sharing
19:46:07  <andythenorth> lot of guilt in OSS
19:46:12  <andythenorth> or potential guilt
19:46:24  <andythenorth> better to have fun
19:46:55  <andythenorth> I was thinking about just closing PRs that go nowhere after 3 months
19:47:00  <andythenorth> 'sorry you were unlucky'
19:47:20  <andythenorth> OTOH my toys are out of the pram that NRT has died :P
19:47:25  <andythenorth> go figure :P
19:48:20  <LordAro> :(
19:49:13  <peter1138> Does it merge yet?
19:49:43  <andythenorth> Wolf01 ? o_O
19:50:01  <LordAro> the PR doesn't
19:50:12  <LordAro> andythenorth's branch tho :p
19:50:22  <peter1138> So it needs rebasing.
19:51:32  <LordAro> oh yeah, map bits have moved around
19:52:47  <peter1138> https://github.com/PeterN/OpenTTD/commits/nrt-block-rebased
19:52:51  <peter1138> Was the last thing I did for that.
19:53:18  <peter1138> So it's rebased to after the map bits got moved.
19:53:42  <LordAro> that's probably what's needed
19:53:58  <peter1138> And then patched to move its own bits :)
19:54:09  <LordAro> andythenorth: shove peter1138's branch on top of yours
19:54:33  <andythenorth> didn't I do all that already?
19:54:34  <peter1138> I dunno if anything else has happened in the past 2 months.
19:54:41  <peter1138> I dunno.
19:55:07  <LordAro> i just tried to rebase, and ran into map bit issues, so i guess not
19:55:14  <andythenorth> https://github.com/andythenorth/OpenTTD/tree/nrt-block
19:55:17  <peter1138> No, you didn't.
19:55:25  <andythenorth> June 24th
19:55:33  <peter1138> Check my link!
19:55:42  <peter1138> I updated at the end of July.
19:55:46  <andythenorth> was I away? :P
19:55:48  <andythenorth> I missed that
19:56:10  *** Wormnest has quit IRC
19:56:30  <peter1138> It ws 4 minutes ago.
19:56:39  <andythenorth> nah I mean in July :)
19:56:47  <andythenorth> I'd have updated the PR if I'd noticed
19:56:49  <peter1138> Oh, I dunno. I did paste it at the time.
19:57:02  <peter1138> Probably.
19:57:36  <andythenorth> oof so before I fuck up the git
19:57:41  <andythenorth> what exactly do I need to do?
19:57:50  <andythenorth> otherwise I end up just deleting All Things
19:58:24  <LordAro> git checkout peter nrt-block-rebase; git push -f andy nrt-block
19:58:34  <LordAro> replace remote names as appropriate
19:59:21  <andythenorth> will that replace changes you made here LordAro? https://github.com/andythenorth/OpenTTD/commit/061771da1cc76b14e512226f43129dc041c68234
19:59:38  <andythenorth> I squashed some extra commits into "Feature: Add NotRoadTypes (NRT)"
19:59:44  <andythenorth> don't know what, because history :P
19:59:56  * LordAro does not remember making any changes to NRT
20:00:02  <LordAro> but yes
20:00:45  <andythenorth> diff against here probably tells https://github.com/PeterN/OpenTTD/commit/5fa0bdfbcb3f173574a82f851e94d57f80facf22
20:01:29  <LordAro> prob
20:02:51  <andythenorth> I'm not just going to bin them off, they probably fixed something :P
20:04:08  <andythenorth> Wolf01: what failed when you tried to rebase NRT?
20:04:19  <LordAro> hmm
20:04:27  <LordAro> if it helps, nrt-block-rebased also fails to rebase :p
20:04:49  <peter1138> Figures.
20:05:03  <peter1138> There were a couple of fixes after I guess.
20:05:03  <LordAro> landscape_grid.html
20:05:08  <andythenorth> can we just fix that, declare peter1138 is much better programmer than me, then merge his branch?
20:05:10  <andythenorth> :P
20:05:23  <LordAro> (and saveload.cpp, but that's just the version number)
20:14:50  * andythenorth invents a new railtype
20:15:00  <andythenorth> that can be modified by vehicles passing over it
20:15:16  <andythenorth> for silly hax
20:19:42  *** Wacko1976 has joined #openttd
20:23:11  *** sim-al2 has joined #openttd
20:27:13  *** gelignite has quit IRC
20:59:55  <andythenorth> oof sleep
20:59:57  *** andythenorth has left #openttd
21:07:17  *** iSoSyS has joined #openttd
21:28:49  *** hph^ has joined #openttd
21:29:28  <Samu> ur feelings about this: https://www.tt-forums.net/viewtopic.php?p=1194252#p1194252
21:29:50  <Samu> pondering if i create a pull request
21:31:09  *** sla_ro|master has quit IRC
21:31:16  <LordAro> Samu: i like it
21:31:19  <LordAro> not sure about b) though
21:31:20  <nielsm> +1
21:31:33  <LordAro> giving users the ability to do things wrong...
21:31:51  <LordAro> though i think special casing it would be worse
21:36:44  <Samu> ok
21:37:18  <Samu> currently helicopters can only be replaced with helicopters
21:37:55  <Samu> so... hmm yeah
21:38:30  <Samu> i think autoreplace code handles this well enough
21:39:49  <Samu> there's CanVehicleUseStation checks somewhere in there, so it fails the autoreplace
21:40:33  <LordAro> sounds fine then
21:41:47  <Samu> my code isn't perfect, i am using magic numbers in a situation
21:41:54  <Samu> dunno how to solve it
21:42:19  <Samu> +			case 0: // All aircraft types
21:42:26  <Samu> +			case 1: // Same aircraft type
21:42:33  <Samu> +			case 2: // Helicopter
21:42:35  <Samu> etc
21:43:52  <LordAro> enum, probably
21:44:10  <LordAro> or some existing aircraft type thing
21:44:54  <Samu> let me create a branch on my repository with this code
21:44:57  <Samu> brb
21:47:37  *** Guest646 has quit IRC
21:48:33  <peter1138> Hmm, X-Plane ran out of memory. I have 32GB...
21:55:14  <Samu> ok, https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:autoreplace-aircraft-type-dropdown
21:57:36  <LordAro> peter1138: did you try to load the entire plane?
21:58:30  <LordAro> Samu: you could reuse the STR_ constants
21:58:34  <LordAro> instead of 0..4
22:00:24  <Samu> ok, let me try
22:03:32  *** chomwitt has joined #openttd
22:07:00  <Samu> ugh, i dont think it's gonna work
22:08:17  <Samu> STR_REPLACE_ALL_AIRCRAFT_TYPES = 0xBD3
22:08:23  <Samu> @calc 0xBD3
22:08:23  <DorpsGek> Samu: 3027
22:08:29  <Samu> nooo, should be 0
22:09:55  <nielsm> are the strings in order in the translation file?
22:10:16  <nielsm> because you can just offset them with + or - in the code based on the first then
22:11:29  <Samu> yes
22:11:33  <Samu> they are in order
22:11:51  <Samu> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:autoreplace-aircraft-type-dropdown#diff-29f4ff9371a58379f5491e1cfa6a9d64
22:13:57  *** Wacko1976 has quit IRC
22:15:59  <LordAro> Samu: ...why did you expect it to be 0?
22:16:03  <LordAro> why does it matter?
22:18:07  <Samu> the StringID 3027 should be case 0, 3028 -> 1, 3029 -> 2, 3030 -> 3, 3031 -> 4
22:18:17  *** nielsm has quit IRC
22:18:54  <LordAro> right, so use the first to offset them all
22:19:09  <LordAro> it's quite commonly done - you can see the "must be in this order" comments in the lang file
22:19:46  <Samu> i really need the value to be 0
22:19:50  <LordAro> "...need to be in this order"
22:19:56  <Samu> and the string really needs to be what it is
22:20:03  <Samu> i'm confused
22:20:44  <LordAro> sel_air_type - STR_REPLACE_ALL_AIRCRAFT_TYPES
22:20:50  <LordAro> 0..4
22:21:33  <Samu> sel_air_type ranges from 0 to 4
22:21:51  *** hph^ has quit IRC
22:21:52  <Samu> 0 - 3027 = -3027
22:21:53  <Samu> sounds wrong
22:22:03  <Samu> case -3027 :(
22:23:08  <LordAro> instead of using 0..4, use STR_REPLACE_ALL_AIRCRAFT_TYPES..STR_REPLACE_LARGE_AEROPLANE
22:23:09  *** GroovyNoodle has quit IRC
22:23:38  <Samu> ah
22:23:50  <Samu> got it, let me try
22:25:43  <Samu> switch (this->sel_air_type + STR_REPLACE_ALL_AIRCRAFT_TYPES) {
22:25:50  <Samu> I think you meant a +
22:27:15  <Samu> yep, it works
22:27:22  <Samu> thx
22:27:27  <LordAro> i was expecting sel_air_type to have the 3028+ values
22:27:31  <LordAro> but yeah, that works too
22:28:23  <Samu> it's a selector
22:28:34  <Samu> uhm from a dropdown
22:28:37  <Samu> lel
22:28:53  <Samu> i should stop stating the obvious
22:29:15  <Samu> selection 0 -> all aircraft types
22:30:57  <Samu> the reason I can't start from 3027
22:31:04  <Samu> is because this->GetWidget<NWidgetCore>(WID_RV_AIRCRAFT_TYPE_DROPDOWN)->widget_data = _autoreplace_aircraft_type_dropdown[sel_air_type];
22:31:18  <Samu> I use it inside [sel_air_type]
22:32:20  <LordAro> there are a few ways of doing it, if it works, that's probabl yfine
22:36:20  <Samu> now, the issue about point B
22:38:41  <Samu> using pikka savegame :p
22:38:42  <Samu> https://imgur.com/Kv0ZGiU
22:38:54  <Samu> so i tried to replace helicopter with a airbus
22:39:12  <Samu> the heli does visit the hangar, and silently fails to be replaced
22:39:20  <Samu> no message is displayed
22:39:26  <Samu> what do you think about that
22:39:42  *** hph^ has joined #openttd
22:39:46  <LordAro> hrm
22:40:11  <LordAro> isn't there a message when vehicles fail to replace for other reasons (money, etc) ?
22:40:38  <LordAro> consistency is probably more important
22:40:40  <Samu> there would be, if the hangar was of an airport
22:41:09  <Samu> in this case, the airbus is not even available in helistation hangar
22:41:54  <Samu> let me try with airport
22:44:14  <Samu> https://imgur.com/3OPjn9c
22:45:01  <Samu> the vehicle that can't go to all stations is not the helicopter, but the airbus
22:45:09  <Samu> kinda confusing
22:48:02  <Samu> maybe instead of vehicle, it could say engine
22:48:23  <Samu> or I dunno
22:48:49  *** frosch123 has quit IRC
22:50:22  <Samu> or go back to what it was before
22:50:30  <Samu> helicopters only replaced with helicopters
22:50:57  <Samu> but that would defeat the point of this patch :(
22:51:07  <Samu> pretty much
22:53:26  *** synchris has quit IRC
22:56:08  *** Progman has quit IRC
23:16:38  *** Wolf01 has quit IRC
23:20:32  *** iSoSyS has quit IRC
23:45:22  *** hph^ has quit IRC

Powered by YARRSTE version: svn-trunk