IRC logs for #openttd on OFTC at 2017-06-30
⏴ go to previous day
00:18:57 <supermop> no way to return switch_a + switch_b as a result of switch_c
00:29:04 <Wolf01> Is it possible to have functions?
00:34:07 <supermop> i can't figure out how
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: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:52 <Wolf01> But you might need a lot of variables
00:46:41 <Wolf01> Yeah, that's what I meant back when I talked about having closures in nml
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: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:04:22 <Eddi|zuHause> the value_function and param_function is what's missing
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:44:11 *** supermop has joined #openttd
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
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:34:47 *** Supercheese has joined #openttd
05:18:04 *** OsteHovel has joined #openttd
05:19:56 *** Smedles has joined #openttd
05:40:07 *** Smedles has joined #openttd
06:01:57 *** sla_ro|master has joined #openttd
09:19:39 *** Hiddenfunstuff has joined #openttd
10:04:42 *** Hiddenfunstuff has quit IRC
10:13:48 *** Defaultti has joined #openttd
10:58:25 *** FLHerne has joined #openttd
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:37:46 *** TheMask96 has joined #openttd
13:12:25 *** FLHerne has joined #openttd
14:26:15 *** chomwitt has joined #openttd
14:54:00 *** Smedles has joined #openttd
15:22:37 *** Maraxus has joined #openttd
16:05:26 *** TheMask96 has joined #openttd
16:48:55 *** Alberth has joined #openttd
16:48:55 *** ChanServ sets mode: +o Alberth
16:58:31 <Wolf01> Mmmh IT security courses cost a lot :|
17:02:15 *** JacobD88 has joined #openttd
17:07:54 *** Wormnest has joined #openttd
17:22:06 *** FLHerne has joined #openttd
17:52:44 *** Deactivated has joined #openttd
17:58:02 *** Progman has joined #openttd
19:27:08 <supermop> hard to make old buses look good
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:54:36 <supermop> andy: jitneys for 1910s buses?
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: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:45:12 *** TheHawk has joined #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:55:57 *** chomwitt has joined #openttd
22:03:27 *** HerzogDeXtEr has joined #openttd
22:36:49 *** FLHerne has joined #openttd
22:37:13 *** sim-al2 has joined #openttd
23:16:30 *** JacobD88 has joined #openttd
23:50:43 *** gelignite has joined #openttd
continue to next day ⏵