IRC logs for #openttd on OFTC at 2020-03-02
            
00:15:41 *** nielsm has quit IRC
00:17:57 *** andythenorth has quit IRC
00:35:01 *** Samu has quit IRC
01:04:32 *** glx has quit IRC
01:07:16 *** glx has joined #openttd
01:07:16 *** ChanServ sets mode: +v glx
01:10:49 *** Flygon has joined #openttd
01:52:24 *** HerzogDeXtEr has quit IRC
02:04:58 *** Wormnest__ has quit IRC
02:08:48 *** Wormnest__ has joined #openttd
02:24:35 *** cHawk- has quit IRC
04:29:06 *** glx has quit IRC
04:37:03 *** D-HUND has joined #openttd
04:40:24 *** debdog has quit IRC
04:41:23 *** Wormnest__ has quit IRC
08:05:28 *** andythenorth has joined #openttd
08:46:17 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on issue #8029: Black screen on SDL2-enabled OpenTTD, Sway and SDL_VIDEODRIVER=wayland https://git.io/Jv23P
08:49:47 *** andythenorth has quit IRC
09:01:41 *** Eddi|zuHause has quit IRC
09:02:25 *** Eddi|zuHause has joined #openttd
09:05:02 *** andythenorth has joined #openttd
09:25:27 *** Smedles has quit IRC
09:27:42 *** Smedles has joined #openttd
09:35:59 <andythenorth> oh this is what I was supposed to be doing :P https://github.com/OpenTTD/nml/issues/46#issuecomment-592964792
09:36:10 <andythenorth> that explains the lurking sense of guilt all weekend :P
10:10:14 *** Smedles has quit IRC
10:11:29 *** Smedles has joined #openttd
10:34:55 *** andythenorth has quit IRC
10:35:04 *** tokai|noir has joined #openttd
10:35:04 *** ChanServ sets mode: +v tokai|noir
10:41:59 *** tokai has quit IRC
11:21:38 *** andythenorth has joined #openttd
13:01:59 *** sla_ro|master has joined #openttd
14:09:18 <DorpsGek_III> [OpenTTD/nml] planetmaker merged pull request #92: Fix 62cab41: Random switch support for NRT https://git.io/Jvgr2
14:09:57 <DorpsGek_III> [OpenTTD/nml] planetmaker merged pull request #91: Fix #90, e9429c89: Generated procedure calls where not properly marked https://git.io/JvEoV
14:09:58 <DorpsGek_III> [OpenTTD/nml] planetmaker closed issue #90: Length callback for vehicles doesn't accept switches https://git.io/JvEaM
15:00:00 *** syr has quit IRC
15:00:28 *** syr has joined #openttd
15:09:03 *** gelignite has joined #openttd
15:39:40 *** spnda has joined #openttd
16:00:34 *** andythenorth has quit IRC
16:09:03 *** andythenorth has joined #openttd
16:13:00 *** gelignite has quit IRC
16:15:37 *** Samu has joined #openttd
16:20:54 *** nielsm has joined #openttd
16:27:31 *** Flygon has quit IRC
16:37:32 <Samu> hi
16:56:20 *** sla_ro|master has quit IRC
17:35:27 *** gelignite has joined #openttd
17:40:12 *** Wormnest__ has joined #openttd
17:43:16 *** HerzogDeXtEr has joined #openttd
17:54:10 *** tokai has joined #openttd
17:54:10 *** ChanServ sets mode: +v tokai
18:00:49 *** tokai|noir has quit IRC
18:52:24 <Samu> yesterday you guys were discussing about a savegame bump
18:53:05 <Samu> was it #8021? <frosch123> TrueBrain: lordaro rejected a pr that would bump savegame, but maybe that was just an easy excuse
18:53:20 <Samu> i edited it so that it's no longer needed to savegame bump
18:54:27 <LordAro> no there was another PR
18:54:29 <LordAro> wasn't yours
19:17:12 *** glx has joined #openttd
19:17:12 *** ChanServ sets mode: +v glx
19:20:31 *** blathijs has quit IRC
19:22:32 <DorpsGek_III> [OpenTTD/OpenTTD] msikma commented on issue #7644: Mysteriously poor performance on macOS https://git.io/fjii3
19:24:54 *** blathijs has joined #openttd
19:30:13 *** WormnestAndroid has quit IRC
19:41:50 *** andythenorth has quit IRC
19:42:21 *** andythenorth has joined #openttd
19:43:20 *** frosch123 has joined #openttd
19:47:40 *** andythenorth has quit IRC
20:06:02 *** Wolf01 has joined #openttd
20:11:10 *** sla_ro|master has joined #openttd
20:20:43 *** andythenorth has joined #openttd
20:24:15 *** Progman has joined #openttd
20:36:36 *** andythenorth has quit IRC
21:12:45 <TrueBrain> frosch123: it is expected that GRFs in a Base Graphics don't have a grfid, except 1?
21:13:08 <glx> yes, base is a special case
21:13:28 <TrueBrain> k, tnx
21:14:11 <frosch123> the "except 1" is the "extra" one
21:14:23 <TrueBrain> yeah
21:14:52 <glx> https://newgrf-specs.tt-wiki.net/wiki/Action8#GRFID
21:14:53 <frosch123> it also starts with 0xFF "OT"
21:15:19 <TrueBrain> NewGRF OpenGFX-0.3.2/ogfxe_extra.grf:
21:15:19 <TrueBrain> grfid: 22302719
21:15:58 <TrueBrain> @base 10 16 22302719
21:15:58 <DorpsGek> TrueBrain: 1544FFF
21:16:16 <TrueBrain> owh, and flipped, ofc .. because .. why not :P
21:16:25 <glx> 32bit LE
21:16:57 <TrueBrain> pretty sure it is read as LE, but .. chars we read are in BE
21:17:02 <TrueBrain> it is confusing as fuck :P
21:17:13 <frosch123> it's more confusing in ottd
21:17:27 <frosch123> ottd flips all grfids on load, so they look right when printed as be in debugger
21:17:28 <TrueBrain> 'ABCD' is a BE format, so to speak :P
21:17:43 <TrueBrain> (in C)
21:18:17 <LordAro> it's implementation defined, technically
21:18:38 <LordAro> but everyone does it the same way
21:18:58 <TrueBrain> grfid: b'\x01TO\xff'
21:19:04 <TrueBrain> k, at least that is a bit easier to read
21:19:12 <TrueBrain> (and that the order is flipped is correct :D)
21:20:27 <TrueBrain> as OGFX is 5846474f ..
21:20:31 <TrueBrain> THIS IS SO CONFUSING :P
21:20:58 <TrueBrain> btw, frosch123 , do not know if you noticed this about the BaNaNaS GitHub
21:21:07 <TrueBrain> but from the C-perspective, the unique-ids are flipped
21:21:12 <TrueBrain> I can, strictly seen, "fix" that
21:21:15 <TrueBrain> but that would make it wrong, ofc
21:21:44 <TrueBrain> (I basically made everything LE)
21:26:00 <frosch123> ottd does the same
21:26:14 <frosch123> probably bananas does it because ottd does
21:26:32 <TrueBrain> well, the wire wants an LE uint32
21:26:39 <TrueBrain> so from there I just kept everything LE
21:26:54 <TrueBrain> so when reading the entry from disk, I convert the BE to LE
21:27:07 <TrueBrain> it feels like OpenTTD does this wrong
21:27:10 <TrueBrain> and it should flip it
21:27:16 <TrueBrain> and we can just send the BE over the wire, but what-ever
21:27:22 <TrueBrain> it is just one confusing mess now :P
21:27:45 <frosch123> hmm, maybe ottd does it differently in different places
21:28:41 <TrueBrain> hmm .. looking more at it, I am still heavily confused :P
21:29:03 <frosch123> ottd does a BSWAP32 in every printf
21:29:29 <frosch123> so it reads it as uint32 from the file, and swaps it whenever displaying it to the user
21:29:37 <TrueBrain> if I receive an unique_id from the cliept, I have to byte-swap it, but when sending, I do not .. I am not sure anymore what is what :P
21:29:53 *** andythenorth has joined #openttd
21:30:44 <TrueBrain> pretty sure I am doing something wrong :P
21:31:05 <TrueBrain> owh, when sending I byte-swap it again too
21:31:19 <TrueBrain> so basically, if I byte-swap everything on disk "it looks pretty"
21:31:20 <TrueBrain> :P
21:32:15 <TrueBrain> we have known this for 10+ years, but using this char-trick is just a very bad idea :P
21:33:10 <TrueBrain> NewGRF OpenGFX-0.3.2/ogfxe_extra.grf:
21:33:10 <TrueBrain> grfid: b'\xffOT\x01'
21:33:11 <TrueBrain> fine by me
21:33:16 <LordAro> could probably pretty easily make a constexpr function to apply a BSWAP equivalent everywhere
21:33:22 <frosch123> ottd network code also swaps everything, because it sends in network order
21:33:39 <TrueBrain> ah, ofc .. one thing we did do right
21:33:44 <TrueBrain> but there might my confusion come from :D
21:34:55 *** frosch123 has quit IRC
21:37:50 *** frosch123 has joined #openttd
21:37:59 <TrueBrain> wb
21:38:09 <TrueBrain> I would get angry too about all this byte-swapping :D
21:38:23 <andythenorth> yo
21:38:31 <frosch123> my router is too crappy
21:39:00 <andythenorth> are we all well?
21:40:55 <frosch123> i rarely need flour
21:48:44 <andythenorth> alls well that ends well
21:48:51 *** spnda has quit IRC
21:48:59 <andythenorth> I have daylength problems again https://www.tt-forums.net/viewtopic.php?p=1229617#p1229617
21:49:03 <andythenorth> it's getting a bit tedious
21:49:58 <andythenorth> can we merge daylength?
21:50:08 <andythenorth> then I can stop explaining that it doesn't exist
21:50:32 <glx> but it doesn't exist
21:50:56 <frosch123> andythenorth: are you extremely upset with tt-f?
21:51:31 <frosch123> andythenorth: anyway, link them to the basecost grf
21:52:07 <frosch123> maybe the basecost grf should be renamed to "daylength fixes"
21:54:00 <TrueBrain> "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 13: invalid start byte" <- oh-oh .... I never like to see that error :P
21:56:14 <andythenorth> daylength fixes :D
21:56:20 <Samu> which iron horse version is latest? I wanna try it
21:56:22 <andythenorth> does it also fix industry production?
21:56:40 <andythenorth> Samu: the one with the highest version number
21:56:59 <Samu> 7.7 ?
21:57:23 <andythenorth> really?
21:57:29 <andythenorth> is that a fork?
21:58:05 <TrueBrain> how many versions of CityBuilder are there? Holy crap :D
21:58:36 <andythenorth> 117?
21:58:49 <Samu> there's a 2.4.0, a 1.9.1, a 7.7 and a 0.1
21:58:50 <TrueBrain> okay ... MOST people used UTF-8 for their NUT files ...
21:58:52 <TrueBrain> 1 person did not
21:58:55 <TrueBrain> not looking at you Samu
21:58:58 <TrueBrain> but yeah, looking at you
21:59:07 <Samu> what did i do?
21:59:46 <Samu> i have no idea what's utf-8
21:59:55 <Samu> i used notepad++
21:59:56 <TrueBrain> frosch123: should we refuse files that are not utf-8 encoded? Correct it? Or leave it as it is?
22:00:01 <TrueBrain> it is only a small percentage of the uploads
22:00:07 <TrueBrain> (.nut files)
22:00:44 <TrueBrain> @base 16 10 a9
22:00:44 <DorpsGek> TrueBrain: 169
22:00:54 <Samu> how do I check for UTF-8 in notepad++
22:01:15 <glx> bottom right of the window
22:01:40 <TrueBrain> pound-sign is the issue, lol, the irony
22:01:47 <glx> by default it shows ANSI
22:01:52 <frosch123> win10 still defaults to ansi in editors
22:01:58 <TrueBrain> really? Holy crap ..
22:02:09 <TrueBrain> how does OpenTTD read nut-files ..
22:02:39 <frosch123> yeah, i did not use windows for 11 years. but i use it in my new job. holy crap did windows not progress at all
22:03:06 <frosch123> the previous years i wondered why they started with vs code to compete with their own msvc...
22:03:13 <frosch123> until i used msvc...
22:03:23 <TrueBrain> :D
22:03:39 <andythenorth> I thought Windows was all fixed now?
22:03:48 <frosch123> eclipse is slow sometimes, but boy does it have more features and a more sane interface
22:03:53 <andythenorth> many many many Mac users have considered switching
22:04:03 <andythenorth> as the Mac is not currently in a winning state
22:04:08 <Samu> brb installing 7.zip, can't extract tars atm
22:04:29 <frosch123> andythenorth: windows added wsl
22:04:47 *** sla_ro|master has quit IRC
22:04:52 <frosch123> first as an reimplementation of the kernel api, now they want to run a real kernel as vm, so they can run linux dockers
22:04:52 <TrueBrain> OpenTTD looks at the first two bytes to decide UTF-8 or ASCII (well, seems it is latin-1)
22:05:09 <frosch123> next obvious step is running windows as vm in linux, and then deprecate the nt kernel
22:05:11 <glx> it reads the BOM I guess
22:05:36 <TrueBrain> what is BOM
22:05:38 <frosch123> TrueBrain: i am quite sure ottd ignores the bom
22:05:45 <TrueBrain> https://github.com/OpenTTD/OpenTTD/blob/master/src/script/squirrel.cpp#L593
22:05:52 <TrueBrain> you are wrong frosch123 :P
22:06:32 <TrueBrain> okay, so if OpenTTD uses that, so should I :)
22:06:57 <frosch123> ah, right, squirrel did
22:07:05 <LordAro> oh hey, it's that bit of the code
22:07:24 <frosch123> yeah, there was some major bug there last year
22:07:28 <frosch123> can't remember what though
22:07:34 <andythenorth> Samu: to answer your question, Horse 2.4.0
22:07:38 <LordAro> wasn't major
22:07:41 <andythenorth> it's quite interesting that it's really not obvious
22:07:57 <Samu> cool, ty
22:07:57 <LordAro> i think it was utf-8 + BOM + exactly power of 2 length file
22:08:09 <andythenorth> judging by forums + reddit, content seems to be incredibly hard to understand
22:08:19 <LordAro> https://github.com/OpenTTD/OpenTTD/issues/6969#issuecomment-439226782 yup
22:08:52 <TrueBrain> LordAro: sweet :D
22:09:03 <Samu> TrueBrain, ludiai has UTF-8 on all files here
22:09:10 <Samu> ludiai afterfix
22:09:17 <frosch123> andythenorth: you should be happy about that. everyone who does not manage to download firs, does not ask you about firs
22:09:19 <Samu> is it some other script?
22:09:27 <frosch123> you should welcome a strong prefilter
22:09:39 <andythenorth> that is certainly a view :)
22:11:24 <glx> andythenorth: I reopend nml#46, there's still missing doc updates :)
22:11:32 <andythenorth> yes
22:11:33 <andythenorth> oof :)
22:12:58 <Samu> ah, i found 2 ANSI nut files
22:13:03 <Samu> Company Value GS v4
22:13:57 <frosch123> TrueBrain: i guess converting encoding of scripts does change the md5sum, so no option :)
22:14:06 <TrueBrain> frosch123: I mean at upload :)
22:14:09 <TrueBrain> but I like this BOM, works for me
22:14:17 <TrueBrain> never knew it existed :D
22:14:20 <TrueBrain> learn-something-new-every-day
22:14:26 <frosch123> i think it's a ms idea
22:14:53 <glx> there's also UTF-16 BOM IIRC :)
22:15:12 <milek7> BOM is only for UTF-16
22:15:16 <frosch123> a lot of software breaks when boms are present
22:15:25 <milek7> in UTF-8 it is some stupid microsoft idea
22:15:36 <Samu> description = "Target company value (in thousand £)",
22:15:51 <Samu> xA3, not £
22:15:56 <Samu> is that the issue?
22:16:54 <TrueBrain> 15 lines of code to handle the BOM correctly, lolz
22:16:59 <TrueBrain> okay, that works
22:18:15 <TrueBrain> musa has no supported for Base Sounds and Base Music, LAME
22:19:07 <frosch123> really? but yeah, i can imagine noone would notice
22:19:37 <TrueBrain> we have 2 Base Sounds :P
22:20:04 <glx> including nosound ?
22:20:10 <TrueBrain> yes
22:20:57 <frosch123> i guess we never blacklisted the original graphics/sound, but people are likely not skilled enough to upload them
22:21:10 <TrueBrain> you would be correct!
22:21:19 <TrueBrain> we also don't really have a sane way to blacklist that tbh :)
22:21:36 <TrueBrain> well, the XOR of md5s
22:21:38 <TrueBrain> but ..
22:21:47 <TrueBrain> 1 more or less file, and tada
22:23:09 <TrueBrain> okay, I can detect the script-type (AI/GS) and short-name in all uploads
22:23:33 <TrueBrain> now their md5
22:24:17 <TrueBrain> well, not tonight :P
22:24:31 <Samu> I have changed encoding to UTF-8, but is this gonna work? look at that black 3 characters thingy https://i.imgur.com/GxjrJrL.png
22:24:31 <TrueBrain> slow but steady wins the race and blabla
22:24:55 <milek7> wrong button
22:25:09 <milek7> you need to use convert function, not just change it
22:25:25 <Samu> me?
22:25:31 <milek7> yes
22:26:04 <glx> anyway no need to change encoding, openttd supports it
22:26:43 <TrueBrain> glx: it thinks it is doing ASCII, but it really is doing either extended ASCII or latin-1, still not sure .. does the font accept that correctly? :D
22:27:20 <glx> at worse it should show '?'
22:28:00 <frosch123> TrueBrain: can you detect scripts which fail to set a proper iso date?
22:28:03 <TrueBrain> that is not "supports it" :D I am really not sure, but I agree with you, it should be fine :)
22:28:05 <frosch123> and ban every author who tries
22:28:12 <Samu> UTF-8 broke it! https://i.imgur.com/T6JoTdR.png
22:28:15 <TrueBrain> frosch123: I guess I can. Why? :D
22:28:18 <Samu> now looks bad ingame
22:28:34 <frosch123> see the last screenshot
22:28:48 <TrueBrain> gotcha!
22:28:50 <milek7> Samu: open original file
22:28:51 <frosch123> well, second last
22:29:01 <milek7> and use encoding->convert to utf8
22:29:01 <Samu> the original file is in ANSI
22:29:09 <Samu> ah, ok let me try
22:29:25 <TrueBrain> frosch123: but yeah, I was planning to do some sanity checks on all uploads, and give suggestions
22:29:29 <glx> Samu: because you need to replace xA3 with £ after changing encoding
22:29:38 <TrueBrain> this is one of them .. I would agree with: please use YYYY-MM-DD as date format, or something
22:29:55 <frosch123> TrueBrain: some scripts include files in info.nut, similar to rev.cpp
22:30:42 <TrueBrain> BaNaNaS never allowed uploading of entries where the short-name could not be read .. but yeah, for other fields people can use tricks, I guess :)
22:30:45 <TrueBrain> too bad :P
22:30:50 <TrueBrain> not going to write a nut-parser in Python :D
22:30:52 <frosch123> so i considered writing a py-squirrel c-extension module to read the real info.nut, like ottd does
22:31:24 <TrueBrain> well, you seem to fancy writing these things, so maybe next weekend this just appears on a gist or something? :D :D :D
22:31:41 <Samu> still looks broken, like in last ss
22:32:05 <Samu> £
22:32:29 <TrueBrain> open as ANSI, do what milek7 told you, ???, profit
22:32:29 <glx> means your file is wrong
22:32:57 <glx> else it's utf8 without bom
22:33:23 <TrueBrain> no no, he opened the ANSI file as UTF-8, converted it to UTF-8, breaking it even further :P
22:33:37 <Samu> I did what milek7 told me
22:33:45 <Samu> i opened ANSI file
22:35:34 <Samu> gonna try the 3 black thingy
22:35:48 *** arikover has joined #openttd
22:35:56 <milek7> ah, "convert to utf-8-bom"
22:36:22 <glx> squirrel needs bom, without it it assumes ASCII
22:37:01 <milek7> they must have changed naming in notepad++, previously it defaulted to bom and now it's other way around
22:37:39 <Samu> can't save with the black characters, i dont get it
22:38:38 <TrueBrain> Samu: glx already told you, forget about all this
22:38:42 <LordAro> racist text editor
22:38:57 <Samu> gonna try UTF8BOM
22:39:11 <glx> you can't save because the file is not modified :)
22:39:41 *** frosch123 has quit IRC
22:39:56 <Samu> aha, UTF-8-BOM works!
22:40:08 <Samu> shows correctly in game
22:40:25 <LordAro> that's mildly disappointing
22:41:39 <Samu> UTF-8 still shows £
22:42:19 <glx> yes because £ is utf8 for £
22:42:31 <glx> and it's read as ascii
22:43:19 <glx> as said above, squirrel needs bom :)
22:45:20 <Samu> what are you going to do about it? do I need to release a fix?
22:45:37 <Samu> it's either ANSI or UTF-8-BOM, UTF-8 didn't work
22:45:43 <glx> you don't need to do anything
22:45:56 <LordAro> at absolute worst it just corrupts some debug messages
22:46:01 <LordAro> it's not exactly a huge issue
22:46:34 <TrueBrain> (mumbles softly: sorry rest of #openttd :P)
22:53:25 <Eddi|zuHause> TrueBrain: if the chat reads like half of a conversation that doesn't make sense, it can only mean one thing... :p
22:54:36 <TrueBrain> Eddi|zuHause: hahaha :D
23:12:23 *** Samu has quit IRC
23:22:03 *** Progman has quit IRC
23:22:47 *** arikover has quit IRC
23:22:59 *** Wolf01 has quit IRC
23:34:14 *** andythenorth has left #openttd
23:38:24 *** nielsm has quit IRC
23:56:44 *** HerzogDeXtEr has quit IRC