IRC logs for #openttd on OFTC at 2023-03-11
β΄ go to previous day
00:17:17 *** sla_ro|master has quit IRC ()
00:33:19 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
01:48:31 *** lobstarooo__ has quit IRC (Remote host closed the connection)
02:09:15 *** Tirili has quit IRC (Quit: Leaving)
02:37:28 *** Wormnest has quit IRC (Quit: Leaving)
03:24:56 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:56:18 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
05:57:59 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
05:58:01 *** WormnestAndroid has joined #openttd
06:12:35 <pickpacket> petern: did you do the work on the UI resizing for 13.0? Itβs amazing!
08:32:55 *** sla_ro|master has joined #openttd
08:39:38 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
08:41:55 *** WormnestAndroid has joined #openttd
08:46:45 *** D-HUND is now known as debdog
08:49:58 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
08:51:55 *** NekoMaster has joined #openttd
08:51:55 <NekoMaster> Just will features into existance, that'll worK π
08:58:50 <andythenorth> wonder how much memory story book uses
09:05:54 <andythenorth> distraction time
09:06:01 <andythenorth> redo the website? π
09:06:42 <Brickblock1> does look cool but feels weird
09:10:37 <andythenorth> it's not a readable font
10:38:29 *** HerzogDeXtEr has joined #openttd
10:56:45 *** WormnestAndroid has joined #openttd
11:19:58 <andythenorth> anyone know why squirrel convention is to declare class methods outside of the class declaration?
11:20:58 <andythenorth> this file shows both ways, but the second route with `::` seems to be the recommended way
11:22:54 <andythenorth> also why functions are declared
11:23:09 <andythenorth> `function foo() {
11:23:33 <andythenorth> I hate not know what's correct π
11:30:34 <LordAro> that's just a style choice?
11:30:48 <LordAro> i very much hope squirrel doesn't care where the opening brace is
11:32:10 <andythenorth> squirrel doesn't care
11:32:20 <andythenorth> to the extent that the squirrel 2 docs just mix up styles
11:32:30 <andythenorth> it's kind of weird and regressive dropping back into this type of world
11:32:38 <andythenorth> I thought style was a done deal by now
11:33:44 <andythenorth> even js has JavaScript Standard Style
11:34:45 <andythenorth> I think the same near-OCD that makes it easy for me to draw pixels
11:34:52 <andythenorth> makes this impossible for me to solve π
11:35:55 <andythenorth> some of the squirrel 2 docs and most of AI libs etc use this style that looks like nothing else I've ever seen
11:35:58 <andythenorth> and is visually ugly
11:36:13 <andythenorth> whereas modern squirrel (the electric imp squirrel 3 fork) looks like normal programming
11:36:31 <andythenorth> but I don't know who was corret
11:39:23 <andythenorth> because using the rules from a fork of a different version of the language
11:39:26 <andythenorth> makes complete sense?
11:43:36 <pickpacket> How do I enable the story book?
11:44:53 <andythenorth> are you writing a GS?
11:55:57 *** APTX has quit IRC (Quit: Farewell)
12:09:12 <petern> andythenorth: Use TTD's small font instead
12:10:02 <petern> Pickpacket, yes I did. Thank you π
12:10:47 <petern> andythenorth: It was 20 mph avg and then traffic thwarted me π¦
12:21:00 <andythenorth> when function names should be lower camelCase
12:21:10 <pickpacket> andythenorth: no, just playing
12:21:19 <andythenorth> how do I lowerCamelCase single word function names?
12:21:27 <andythenorth> e.g. `function curate() {}`
12:23:39 <andythenorth> do I extend it to something like `function runCurate() {}` ?
12:23:55 <andythenorth> what happened to that standard that used to exist for names including types?
12:24:18 <andythenorth> e.g. `local localVarRadius`
12:24:36 <andythenorth> or `local arrayNames = []`
12:24:57 <purple> single word lower case has been standard whenever I have seen lowerCamelCase. no need to add extra words
12:24:58 <andythenorth> `function funcMakeRed () P{`
12:25:12 <petern> andythenorth: It was bad
12:25:25 <andythenorth> it was mandated style for Flash 3 I think
12:25:33 <andythenorth> maybe that was just in a magazine I read
12:25:42 <andythenorth> remember learning to programme from magazines?
12:26:47 <andythenorth> when we replace squirrel, what am I writing in?
12:27:04 <andythenorth> I assume, if it's WASM, it will be javascript
12:27:20 <andythenorth> maybe I can just use js formatting rules
12:29:24 <purple> is it the intention of the squirrel replacement to compile into WASM?
12:30:25 <andythenorth> idea / intention
12:30:53 <andythenorth> 'intention' is maybe a bit over-committing π
12:33:06 <purple> i think if WASM was a potential idea, you would want to lean more towards something compiled and without a runtime, like rust or c++, so you don't have to ship the runtime along with the squirrel replacement
12:33:40 <andythenorth> why does OpenTTD use _ in variable names, not camelcase?
12:33:57 <purple> it indicates global vars
12:34:34 <andythenorth> seems we use it for all vars
12:34:57 <andythenorth> and we use UpperCamelCase for method names
12:35:00 <purple> oh snake case, sorry I thought you meant as a prefix
12:35:23 <andythenorth> maybe there's a C++ standard
12:35:58 <glx[d]> The most important is being consistent in the naming style
12:37:54 <andythenorth> Squirrel is basically a single person project I think?
12:38:08 <andythenorth> so it hasn't been able to sort this stuff out
12:39:00 <purple> why was squirrel originally chosen at the time, out of interest (if anyone knows)
12:41:56 <andythenorth> I should really get tested for some kind of OCD
12:42:20 <andythenorth> NoGO API docs use snake case parameter names
12:42:28 <andythenorth> but GS convention is lowerCamelCase
12:42:35 <glx[d]> C++ like syntax and not too hard to embed
12:42:38 <andythenorth> stuff like this just trips me right up
12:42:51 <andythenorth> like...why do I have to switch constantly
12:43:01 <andythenorth> why read a docs method, then have to reformat the parameter names?
12:43:13 <andythenorth> maybe I ask chatGPT, my new therapist
12:43:49 <glx[d]> I don't think there's a GS coding style
12:44:21 <glx[d]> Usually when writing test GS I follow openttd style
12:45:45 *** gelignite has joined #openttd
12:49:18 <andythenorth> so did frosch and alberth I think
13:05:32 <petern> How would you know about that?
13:06:14 <petern> LordAro, also mostly Zone 4 today, I'm gonna ache :/
13:07:59 <andythenorth> petern: I just guessed, using my 6th sense
13:11:11 <andythenorth> and why extend class methods outside of the declaration?
13:11:53 <petern> If the declaration is in a header file, you may not want all the code for that class inside a header.
13:12:56 <andythenorth> ok so it's a way to keep classes sparse?
13:13:00 <andythenorth> then extend later?
13:14:40 <petern> It's a "C++ is a bit shit" situation.
13:15:04 <petern> You need it in a header file to expose it elsewhere, but you don't want all your code in a header file.
13:17:11 <Xarick> CivilAI got a weird crash
13:18:51 <andythenorth> do I need to mimic that pattern in Squirrel?
13:19:01 <andythenorth> it seems to be normal, but it's....odd
13:19:14 <petern> You can do what you like, nobody else is going to look.
13:20:05 <andythenorth> wonder if chatGPT would say the same
13:23:18 <andythenorth> `If the performance environment is unknown, it's difficult to make a recommendation on whether to use inline or virtual functions. However, in general, it's a good idea to use inline functions sparingly and only for small, frequently called functions. Overuse of inline functions can lead to code bloat and decreased performance.
13:23:18 <andythenorth> In any case, you can always start with inline functions and switch to virtual functions later if needed.`
13:24:01 <petern> Ah suggesting that inline or virtual are the only two choices.
13:26:39 <Xarick> can't provide a savegame, because it's a custom openttd build π¦
13:28:58 <andythenorth> petern: well I asked it which
13:30:52 <andythenorth> wonder if I can get it to say "why do you think there are only two choices?"
13:32:18 <andythenorth> ok it's teaching me about static methods
13:32:22 <andythenorth> and getter / setter
13:33:39 <andythenorth> ok so for pixel fonts for OpenTTD, it's recommending these:
13:34:48 <Xarick> i cant know the first error with this kind of logs
13:34:53 <petern> I may have eaten that lunch too fast. *burp*
13:38:17 <petern> That's a lot of squares.
13:38:27 <Xarick> omg civilai code has a terrible identation style
13:38:33 <andythenorth> it is a lot of squares
13:38:41 <petern> I wonder why Firefox is not loading that font.
13:38:50 <glx[d]> Xarick: easy it's an infinite recursion
13:39:21 <glx[d]> And you have a probable stack overflow
13:39:38 <Xarick> the last INSTANCE has a dir variable
13:39:51 <andythenorth> it did some internet
13:40:44 <andythenorth> ok time to learn how Squirrel subclasse
13:42:57 <Xarick> VSCode was useful for something at last!
13:43:12 <Xarick> performed auto format on civilai code style
13:43:20 <Xarick> now i can read this code
13:43:52 <andythenorth> `class BigTrain {
13:43:52 <andythenorth> constructor(color) {
13:43:52 <andythenorth> this.color = color;
13:43:54 <andythenorth> // define base class methods here
13:43:56 <andythenorth> // code to move the train
13:43:58 <andythenorth> class BigTrainRed extends BigTrain {
13:44:02 <andythenorth> // define subclass methods here
13:44:04 <andythenorth> // code to stop the red train
13:44:08 <andythenorth> I asked it to teach me
13:45:16 *** gelignite has quit IRC (Quit: Stay safe!)
13:45:50 <andythenorth> from a basic prompt, it also showed me how to make a green train, and that I would want move and stop methods
13:46:19 <andythenorth> reflecting back the entire written text of a culture on demand seems to work well
13:48:14 <Xarick> looks like infinite recursion, but i got a 't' and a 'dir' as the last variables logged, so it crashed somewhere else
13:49:08 <andythenorth> close, but not winning
13:50:10 <andythenorth> lol I asked it to try again using NoGO API
13:50:29 <andythenorth> it seems to think I want a C++ module called NOGO
13:50:49 <andythenorth> `To use this script, save it to a file with a .gs extension, and load it into OpenTTD using the in-game console with the command gs_load <filename>.`
14:01:24 <Xarick> function CivilAI::CheckJunction(t, dir) {
14:01:34 <Xarick> this is where it crashed
14:02:02 <Xarick> or at least it's what it was logged last
14:04:15 <Xarick> the issue seems to be that civilai got confused with a junction
14:04:20 <Xarick> it's from another company
14:12:49 *** sla_ro|master has quit IRC ()
15:01:47 <andythenorth> ok so `};` for classes, but `
15:02:11 <andythenorth> but on their own line in both cases
16:08:43 *** sla_ro|master has joined #openttd
16:59:49 *** lobstarooo__ has joined #openttd
17:04:40 <petern> Damn, lost all motivation in Minecraft again.
17:06:06 *** lobstarooo has joined #openttd
17:07:52 *** lobstarooo__ has quit IRC (Ping timeout: 480 seconds)
17:07:56 *** lobstarooo is now known as lobstarooo__
17:12:08 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:13:25 <andythenorth> I am watching TV
17:13:38 <andythenorth> obvs not football tho
17:14:00 *** WormnestAndroid has joined #openttd
17:14:02 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:14:09 *** WormnestAndroid has joined #openttd
17:14:13 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:14:55 *** WormnestAndroid has joined #openttd
17:16:55 *** Wormnest has joined #openttd
17:23:47 *** ChanServ sets mode: +v tokai
17:27:15 <TallTyler> Thanks. I'll work on copying the documentation over
17:29:24 <TallTyler> Any thoughts on an early 14.0 release, so players can get their hands on NewGRF Roadstops?
17:30:40 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
17:38:41 <petern> We've not done 13.1 yet...
17:43:45 *** Wolf01 is now known as Guest7388
17:49:52 *** Guest7388 has quit IRC (Ping timeout: 480 seconds)
17:54:27 <petern> If "early" means more frequently than a year, than yeah π
18:00:09 <andythenorth> Any thoughts on an early 13.1 release, so players can get their hands on engine name callback?
18:00:28 <andythenorth> iirc michi said we were slacking and should get releasing
18:00:55 <TallTyler> If we release 14.0 early enough we can do that instead of 13.1 π
18:01:06 <TallTyler> But yeah, that should probably take priority
18:01:52 <FLHerne> Have any distros shipped 13?
18:01:58 <dP> don't think new callback is a minor release material :p
18:02:32 <andythenorth> we overthink releases π
18:02:38 <andythenorth> oh yeah, multiplayer servers though
18:02:47 <FLHerne> They ought to update to 13.1, but wouldn't to a feature release
18:03:31 <dP> meanwhile I'm still merging π
18:03:49 <dP> on that note, how the heck did I manage to corrupt std::string π
18:04:07 <FLHerne> Back compat mode, where the client can emulate any older version to work with older servers :p
18:04:30 <FLHerne> I'm sure that wouldn't be a maintenance nightmare or anything
18:07:59 <dP> dP: oh, apparently having no return in a function returning string does that
18:08:09 <dP> why the heck did that even compile...
18:13:54 <petern> That... is more like I remember it... actually quite convincing.
18:14:39 <petern> Actually the mask is a bit wrong. Hmm.
18:27:39 <petern> All these old DOS games I used to play when I was 12-13... no idea how to now :/
18:28:56 <petern> The cursor was still flashing over there π
18:42:06 <DorpsGek> - Update: Translations from eints (by translators)
18:47:34 <andythenorth> do I really have to write GetFoo() for every class attribute in a squirrel class?
18:47:56 <andythenorth> recommended best practice, apparently classes shouldn't expose internals except via Get/Set methods
19:09:24 <TallTyler> Didn't realize you'd already solved that π
19:10:01 <TrueBrain> ever since michi made a second version .. I tend to not like having more than one version in the wild π
19:10:45 <TallTyler> Yeah, I went all the way back to the pinned explanation I got for 13.0-beta2
19:14:48 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:47:04 *** sla_ro|master has quit IRC ()
20:08:34 <andythenorth> wonder how json-ish squirrel tables are
20:08:42 <andythenorth> can I just json.dumps from python? :p
20:12:36 <andythenorth> not as trivially as I hoped π
20:24:03 <andythenorth> this is supposed to be valid, in squirrel 3 at least
20:24:05 <andythenorth> `local cabbage = {"foo": "bar", "ham": "eggs"};`
20:26:13 <glx[d]> that's in one example in the 2.2 doc
20:26:49 <andythenorth> yeah looks like the json format isn't in squirrel 2
20:27:06 <glx[d]> b=function(a) { return a+1; }
20:27:30 <andythenorth> it's not worth using json then reparsing it
20:27:34 <glx[d]> (yeah you can put anything in tables)
20:27:36 <andythenorth> I might as well just template it
20:27:52 <glx[d]> and that's why classes are tables
20:28:02 <andythenorth> yes, I read about that π
20:29:21 <andythenorth> if json was valid, I could populate tables from python really easily
20:30:19 <glx[d]> there's also ```local a=
20:31:12 <andythenorth> that's interesting syntax π
20:33:24 <glx[d]> accessed via a[1], but on previous examples you can do `test.a` or `test["a"]`
20:34:24 <andythenorth> so the table syntax maybe got extended in squirrel 3
20:35:55 <glx[d]> a table is used to manage all variables
20:36:30 <andythenorth> is a discord shortcut also π
20:39:58 <andythenorth> considering writing a python method to dump classes out into squirrel
20:40:04 <andythenorth> like a repr or something
20:40:12 <andythenorth> or even just parse dir() and reformat it
20:40:30 <andythenorth> recursing over the class properties
20:40:40 <andythenorth> probably over-engineering π
21:20:35 <TrueBrain> frosch: you comment on the first is rather ambiguous .... still no clue which to follow .. the current, or the GUI π
21:21:59 <frosch> are you refering to the climates?
21:23:13 <frosch> openttd uses "ARCTIC" as identifier in the source, and "sub-arctic" in english.txt
21:23:22 <frosch> bananas should be consistent with that
21:23:32 <frosch> show "sub-arctic" on the website and in "tags"
21:23:32 <TrueBrain> you keep being completely ambiguous π
21:23:50 <TrueBrain> now that is more clear π
21:23:54 <TrueBrain> read back your comment, it is funny π
21:27:48 <frosch> i am not drunk, are you? :p
21:28:59 <TrueBrain> "Yes, the GUI should use the same terms" .. "GUI" is rather .. unspecified. So you can read it: in-game has to use the same terms, as in, it currently is wrong, or the website should read the same terms π
21:29:49 <TrueBrain> it is rather uncommon to refer to a website as GUI π
21:30:47 <frosch> fine, i thought browsers are just gui engines
21:31:06 <TrueBrain> one can argue TUIs are GUIs these days too π
21:31:18 <TrueBrain> it was just funny, as I still wasn't sure to go left or right π
21:31:29 *** XarothBrook has joined #openttd
21:31:29 <XarothBrook> I used to arrange my vacations via TUI.
21:31:37 <TrueBrain> a space in the name is annoying, so it will be sub-tropical, I guess
21:32:40 <frosch> xaroth used to travel with a mining corporation π
21:32:49 <andythenorth> maybe I should write a json to squirrel 2 table parser
21:33:02 <frosch> TrueBrain: yes, english.txt also uses a dash
21:33:23 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
21:33:24 <andythenorth> parser? reformatter? renderer?
21:33:32 <TrueBrain> frosch: good, that settles it
21:33:41 <TrueBrain> I still like that CoPilot was: Tropical, not Tropic
21:33:48 <TrueBrain> it kept correcting the internal name π
21:35:58 <andythenorth> ach I'll just make a python dict, and template that to squirrel
21:53:13 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:00:09 *** WormnestAndroid has joined #openttd
22:01:13 *** lobstarooo has joined #openttd
22:08:11 *** lobstarooo__ has quit IRC (Ping timeout: 480 seconds)
22:08:18 *** lobstarooo is now known as lobstarooo__
22:19:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:23:29 *** Wormnest has joined #openttd
22:29:06 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:12:40 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:16:43 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
23:53:39 *** Wormnest has joined #openttd
continue to next day β΅