IRC logs for #openttd on OFTC at 2017-06-30
            
00:14:30 *** FLHerne has quit IRC
00:18:13 <supermop> ugh
00:18:57 <supermop> no way to return switch_a + switch_b as a result of switch_c
00:26:03 <Wolf01> :(
00:29:04 <Wolf01> Is it possible to have functions?
00:34:07 <supermop> i can't figure out how
00:34:27 <supermop> https://newgrf-specs.tt-wiki.net/wiki/NML:Switch
00:34:51 <Wolf01> I'm reading the docs, but I feel it a lot limited... it's like trying to do something with just JSON
00:37:48 *** mikegrb has quit IRC
00:38:10 <supermop> as a test
00:38:12 <supermop> switch (FEAT_ROADVEHS, SELF, switch_power_ht4, build_year ) { 0..2030: 220; 2031..2045: 225; 2046..2060: 230; 2061..5000000: (switch_power_ht1 + switch_power_ht2); default: 220;
00:39:02 <supermop> nmlc gives an error "Binary operator requires both operands to be integers or floats"
00:39:24 <supermop> so it wont let you do math where the value is a switch
00:40:16 <Wolf01> Yeah, they are identifiers
00:40:40 <Wolf01> The switches must be evaluated first, that's why I asked for a function
00:41:57 <Wolf01> I don't think you can either store a value into a variable
00:42:10 <supermop> if i want a function x + y + z, idk how to have a switch set the value of x
00:43:54 <supermop> yeah, nor can i figure out a way to store the result of a switch as as store_temp
00:44:00 <Eddi|zuHause> it's not really possible in NML
00:44:03 <Wolf01> Uhm, STORE_TEMP?
00:44:52 <Wolf01> But you might need a lot of variables
00:45:10 <Wolf01> https://newgrf-specs.tt-wiki.net/wiki/NML:Builtin_functions
00:45:30 <Eddi|zuHause> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2#Variable <-- you need Var 7E, but this is not implemented in NML
00:46:41 <Wolf01> Yeah, that's what I meant back when I talked about having closures in nml
00:46:43 *** Wormnest has quit IRC
00:47:57 <supermop> oh well
00:48:05 <Eddi|zuHause> i vaguely remember trying to implement this once, but i got stuck trying to convince the compiler that a switch is a valid number to use as parameter
00:51:43 <Wolf01> The compiler compiles nml into nfo?
00:53:59 <Eddi|zuHause> sort of
00:55:02 <Eddi|zuHause> nml is a "high level language", nfo is at the "assembler" stage, and there's a "machine code" level below that
00:55:21 <Eddi|zuHause> typically nmlc directly outputs this "machine code", but it can also generate nfo
00:56:28 <Wolf01> Mmh, the topic in the forum is pretty old
01:00:08 <Eddi|zuHause> well, it should be "simple", you "just" need var[0x7E, shift, mask, blah], and teach it to accept a switch as "blah" by resolving the switch id
01:00:43 <Wolf01> Yes, that's what I thought, but "how" (in the compiler)
01:00:50 <Eddi|zuHause> and then add syntax sugar by calling it "CALL(blah)"
01:01:33 <Wolf01> Or for shortness [blah]
01:03:32 <Eddi|zuHause> i have no idea how "complete" this was: https://paste.openttdcoop.org/pitysbpfe
01:04:22 <Eddi|zuHause> the value_function and param_function is what's missing
01:08:36 <Eddi|zuHause> i also found this "improved"(?) version https://paste.openttdcoop.org/pdwqozgkm
01:09:17 <Wolf01> I was about to suggest to use a lambda function
01:09:44 <Wolf01> But I'm not so used to python :P
01:10:47 <Eddi|zuHause> i have no idea whether this actually worked
01:14:55 <Wolf01> I use *a lot* of anonymous functions in my code, the are really convenient
01:17:03 <Wolf01> Like when you need to filter a list on different values, or to make something do something else you didn't think about in first place
01:17:14 <Wolf01> Oe event driven architecture :P
01:22:26 <Eddi|zuHause> yes, i do know how to use lambda :p
01:23:16 <Eddi|zuHause> my professor spent a lot of time teaching us pure lambda calculus :p
01:24:57 <Wolf01> I learned it on javascript at work :P
01:25:54 <Eddi|zuHause> that is totally crazy, you just have a basic syntax, and then start recreating peano arithmetics from scratch
01:39:57 *** mikegrb has joined #openttd
01:43:54 *** supermop has quit IRC
01:44:11 *** supermop has joined #openttd
01:57:38 *** Flygon has joined #openttd
02:35:23 <Wolf01> 'night
02:35:26 *** Wolf01 has quit IRC
03:09:54 *** bwn has quit IRC
03:20:58 *** bwn has joined #openttd
03:31:19 <argoneus> huh
03:31:25 <argoneus> I didn't know raw opengl was this simple
03:31:34 <argoneus> I always thought it was 500 lines of code to draw a square
03:48:37 *** cHawk has joined #openttd
04:18:21 <Flygon> Yeah, heh.
04:18:30 <Flygon> The most basic of commands are very very simple.
04:18:38 <Flygon> Of course, it's a 25 year old standard...
04:18:42 <Flygon> Kluge accumulates.
04:34:47 *** Supercheese has joined #openttd
04:44:51 *** glx has quit IRC
05:06:26 *** APTX has quit IRC
05:07:37 *** APTX has joined #openttd
05:15:40 *** Smedles has quit IRC
05:17:52 *** OsteHovel has quit IRC
05:18:04 *** OsteHovel has joined #openttd
05:19:56 *** Smedles has joined #openttd
05:34:51 *** Smedles has quit IRC
05:40:07 *** Smedles has joined #openttd
06:01:57 *** sla_ro|master has joined #openttd
06:15:50 *** Snail has joined #openttd
06:32:57 *** chomwitt has quit IRC
07:00:37 *** Mek_ has quit IRC
07:14:17 *** Mek has joined #openttd
07:17:28 *** Snail has quit IRC
07:18:44 *** Cubey has quit IRC
07:28:35 *** sla_ro|master has quit IRC
09:19:39 *** Hiddenfunstuff has joined #openttd
10:04:42 *** Hiddenfunstuff has quit IRC
10:06:02 *** Supercheese has quit IRC
10:12:38 *** Defaultti has quit IRC
10:13:48 *** Defaultti has joined #openttd
10:58:25 *** FLHerne has joined #openttd
11:01:44 *** Wolf01 has joined #openttd
11:02:25 <Wolf01> o/
11:23:40 <Wolf01> Mmmh, there's something strange in F today... seems like italian
12:00:20 *** chomwitt has joined #openttd
12:13:38 *** JacobD88 has joined #openttd
12:32:17 *** TheMask96 has quit IRC
12:32:24 *** Compu has quit IRC
12:34:16 *** chomwitt has quit IRC
12:34:52 *** Compu has joined #openttd
12:37:46 *** TheMask96 has joined #openttd
12:54:44 *** nast has joined #openttd
12:58:47 *** nast has left #openttd
13:12:05 *** FLHerne has quit IRC
13:12:25 *** FLHerne has joined #openttd
13:49:26 *** Gja has joined #openttd
14:26:15 *** chomwitt has joined #openttd
14:32:29 *** Smedles has quit IRC
14:43:06 *** JacobD88 has quit IRC
14:54:00 *** Smedles has joined #openttd
15:22:37 *** Maraxus has joined #openttd
15:52:44 *** Maraxus has quit IRC
16:00:05 *** sim-al2 has quit IRC
16:05:17 *** TheMask96 has quit IRC
16:05:26 *** TheMask96 has joined #openttd
16:17:14 *** TheIJ has quit IRC
16:18:22 *** TheIJ has joined #openttd
16:46:01 *** Gja has quit IRC
16:48:55 *** Alberth has joined #openttd
16:48:55 *** ChanServ sets mode: +o Alberth
16:49:09 <Alberth> o/
16:49:20 <crem> \o
16:55:59 <Wolf01> o/
16:58:31 <Wolf01> Mmmh IT security courses cost a lot :|
17:00:46 *** Gja has joined #openttd
17:01:50 <supermop> yo
17:02:15 *** JacobD88 has joined #openttd
17:07:54 *** Wormnest has joined #openttd
17:12:25 *** JacobD88 has quit IRC
17:21:45 *** FLHerne has quit IRC
17:22:06 *** FLHerne has joined #openttd
17:27:37 *** Flygon has quit IRC
17:52:44 *** Deactivated has joined #openttd
17:58:02 *** Progman has joined #openttd
18:20:28 *** Deactivated has quit IRC
18:42:11 *** chomwitt has quit IRC
18:51:59 *** tokai|noir has quit IRC
19:13:56 *** cHawk has quit IRC
19:23:28 *** FLHerne has quit IRC
19:27:08 <supermop> hard to make old buses look good
19:28:01 <Wolf01> This looks good https://i0.wp.com/farm5.staticflickr.com/4262/34811925223_555ae23ca9_z.jpg?resize=625%2C507&ssl=1
19:28:14 *** cHawk has joined #openttd
19:30:02 *** sla_ro|master has joined #openttd
19:39:11 <supermop> no double deck buses in this grf
19:42:05 <supermop> too much splitting of hairs once you start dividing buses up into city bus, articulated city bus, double deck bus, long distance coach
19:43:37 <supermop> idk if anyone wants to decide between tile density, cargo decay, load speed, etc
19:43:45 *** andythenorth has joined #openttd
19:43:48 <supermop> in addition to capacity and speed
19:44:29 <supermop> two types of bus per era is about all anyone cares about
19:44:45 <supermop> if they need more finesse they can use trains or trams
19:48:56 <andythenorth> hi
19:50:45 <supermop> speak of the devil
19:50:50 <Alberth> o/
19:54:36 <supermop> andy: jitneys for 1910s buses?
19:54:40 *** Cubey has joined #openttd
19:54:58 <supermop> idk if i want an open hop-on platform at the back or not
19:55:07 <supermop> could composite one on randomly
19:55:36 <supermop> also not sure if i want the passenger compartment of steam bus to be same as for jitney
20:01:49 <andythenorth> such buses
20:04:21 <andythenorth> so is there OpenTTD?
20:13:37 <supermop> i haven't played it recently
20:13:49 <supermop> be a dear and test my trucks will you
20:14:25 <supermop> my heads too far up my ass with them to make objective decisions on balancing
20:41:08 <andythenorth> possibly later :)
20:41:11 <andythenorth> chores to do
20:41:16 <andythenorth> and bedtime
20:45:12 *** TheHawk has joined #openttd
20:51:11 *** cHawk has quit IRC
20:57:11 *** TheHawk has quit IRC
21:18:19 *** cHawk has joined #openttd
21:41:39 *** Alberth has left #openttd
21:47:22 <andythenorth> supermop: balancing…you can’t win it by worrying at it
21:47:29 <andythenorth> try something, then play 3 varied test games
21:47:34 <andythenorth> then worry about it
21:51:01 <andythenorth> supermop: moprv or trolleybi
21:51:02 <andythenorth> ?
21:55:57 *** chomwitt has joined #openttd
22:03:27 *** HerzogDeXtEr has joined #openttd
22:30:09 <andythenorth> hmm
22:36:49 *** FLHerne has joined #openttd
22:37:13 *** sim-al2 has joined #openttd
22:43:21 *** andythenorth has quit IRC
22:47:00 <supermop_home> moprv
23:05:56 *** Progman has quit IRC
23:16:30 *** JacobD88 has joined #openttd
23:41:28 *** sla_ro|master has quit IRC
23:49:33 *** JacobD88 has quit IRC
23:50:43 *** gelignite has joined #openttd