Times are UTC Toggle Colours
00:04:04 <PeterT> Ammler: I have a potential script fro you 00:31:34 *** welshdragoon has quit IRC 00:33:45 *** welshdragon has joined #openttdcoop.devzone 01:57:04 *** welshdragon is now known as welshdragon` 05:38:52 *** planetmaker has joined #openttdcoop.devzone 06:54:24 *** SmatZ has joined #openttdcoop.devzone 06:55:55 *** pm has joined #openttdcoop.devzone 06:56:25 *** tneo has joined #openttdcoop.devzone 07:04:13 *** ODM has joined #openttdcoop.devzone 07:05:01 *** SmatZ has quit IRC 07:05:01 *** tneo has quit IRC 07:05:01 *** pm has quit IRC 07:33:55 *** pm has joined #openttdcoop.devzone 07:35:25 *** tneo has joined #openttdcoop.devzone 07:35:55 *** SmatZ has joined #openttdcoop.devzone 09:14:57 *** planetmaker is now known as Guest2349 09:14:57 *** pm is now known as planetmaker 09:54:51 *** Doorslammer has joined #openttdcoop.devzone 10:20:30 *** ODM has quit IRC 10:25:22 <Doorslammer> Anyone have a location for "New Bridges v0.41"? 10:25:36 <Doorslammer> Searched the forum, it doesn't readily come up 10:27:50 <Doorslammer> Oh, its OK 10:33:01 <Rubidium> grfcrawler? 10:42:49 <Ammler> @wiki GRF_Table 10:42:59 <Webster> GRF Table 7.3 - #openttdcoop Wiki - http://wiki.openttdcoop.org/Special:Search?go=Go&search=GRF_Table 11:04:59 *** KenjiE20 has joined #openttdcoop.devzone 11:50:24 *** welshdragon` is now known as welshdragon 13:33:39 *** ODM has joined #openttdcoop.devzone 14:55:22 *** Seberoth has joined #openttdcoop.devzone 15:22:25 *** frosch123 has joined #openttdcoop.devzone 15:25:21 <Hirundo> Yexo: Shouldn't Variable inherit from Expr? 15:25:46 <Yexo> theoretically yes, but it doesn't matter much 15:27:44 <Hirundo> I know :) Expr doesn't do anything, basically 15:29:05 <Hirundo> Currently I'm working on evaluating expressions compile-time, is that OK? 15:30:54 <Yexo> sure 15:31:22 <Yexo> do you have a plan how to deal with signed/unsigned numbers? 15:33:10 <Hirundo> Good point, I'll test how pythons native functions in operator.xxx do that 15:33:40 <Yexo> I think in python every number is signed, but don't quote me on that 15:34:23 *** Seberoth has quit IRC 15:34:59 <Hirundo> hmm.. unary minus is not (yet) supported? 15:35:06 <Yexo> nope 15:35:39 <Yexo> and you can't just add support for it as it'll break the parser 15:37:18 <Hirundo> at least, it seems print_xxx fails on negatives 15:37:45 <Yexo> that is the easy part 15:38:08 <Yexo> just add if value < 0: value += max_value before the assert line 15:38:43 *** Seberoth has joined #openttdcoop.devzone 16:20:54 <Hirundo> Python seems to handle both > UINT32_MAX and < 0 without problems 16:40:50 *** Pe1erT has joined #openttdcoop.devzone 16:45:05 *** Pe1erT has quit IRC 16:59:10 <Hirundo> I'll commit the print_xxx part 17:06:02 <Yexo> ok 17:15:44 <Hirundo> For the rest, we need to fundamentally decide how to handle signed/unsignedness 17:17:55 <frosch123> is there a problem with doing everything signed and 32bitty? 17:18:39 <Yexo> the problem is how to write nfo from that 17:20:11 <frosch123> sounds like i miss something obvious :s 17:20:38 <Rubidium> frosch123: m4nfo meets python 17:21:57 <Yexo> every time I'm thinking about implementing it I think of several problems, but I can't remember those now :( 17:22:42 <frosch123> you might have trouble with sign-extending variables shorter than 32bit 17:23:55 <Hirundo> If you accept everything as signed, stuff like and-masks may give troubles since you need to go up to 0xFFFFFFFF for those 17:24:15 <Webster> Latest update from devactivity: NFO Meta Language - Revision 51: Codechange: Let print_xxx functions accept negative numbers with... <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/51> || Redmine - Revision 3511: Fixes a test failure with SQLite3 due to transaction fixtures (#5290). <http://dev.openttdcoop.org:81/projects/redmine/repository/revisions/3511> 17:25:09 <Yexo> that shouldn't be a problem 17:25:22 <Yexo> only problem I can think of is variables that use 32bits 17:27:40 <Hirundo> Alternative is to provide duplicate operators where necessary (/, %, min/max), but it's not exactly nice 17:28:20 <Yexo> let's go for everything signed 32 bits then, we can provide the duplicate operators later if necesary 17:46:54 <Hirundo> in signed 32 bit arithmetic, 0xFFFFFFFF is interpreted as -1, or does it give an error? 17:48:52 <Rubidium> -1, assuming 2 complement 18:15:38 *** welshdragon has quit IRC 18:29:02 *** Seberoth has quit IRC 18:44:07 *** Seberoth has joined #openttdcoop.devzone 19:03:03 *** Hirundo has quit IRC 19:05:18 *** Hirundo has joined #openttdcoop.devzone 19:25:28 <Hirundo> Yexo: I narrowed down the parser errors wrt unary minus 19:26:04 <Hirundo> 'switch_range : expression COLON RETURN expression' <- more than one of those places two expressions next to each other, without anything in between 19:26:21 <Yexo> yes, indeed 19:27:16 <Hirundo> I guess this is the reason C requires semicolons everywhere :) 19:27:24 <Yexo> yeah :) 19:28:12 <Hirundo> hmm... how does python do this *tests* 19:28:36 <Yexo> by requiring a newline everywhere? 19:29:19 <Hirundo> Indeed 19:32:51 * Hirundo ponders semicolons 19:35:43 <Yexo> feel free to add that 19:37:02 <Hirundo> I'm studying the parser what consequences that will have everywhere 19:37:25 <Hirundo> How does the cargo table work, do you specify cargo labels like 'PASS' as IDs? 19:41:41 <Yexo> yes 19:42:06 <Hirundo> An then, you reference to cargos by the index in that table 19:43:22 <Rubidium> *cough*action6*cough* :) 19:43:26 <Yexo> for now yes, but later by name 19:44:07 <Yexo> what's with action6? 19:45:00 <Rubidium> that's what "they'll" be whining about that is missing and such 19:45:16 <Rubidium> not that many sane people use it 19:45:32 <Yexo> it's supported in several places, although indirectly 19:46:16 <Yexo> without action6 you can't do things like param[param[10]] 19:46:55 <Rubidium> oh :) using action6 to make some stuff work; nice! 20:27:55 <DJNekkid> what is the usage of action6 btw? 20:33:34 <Hirundo> Its usage in nfo or its implementation in nml? 20:38:11 <Hirundo> Yexo: semicolons coming in.. 20:47:26 <Hirundo> Yexo: Shall I implement proper functionality for unary operators, or stick with -x => (0 - x) for now? 20:47:47 <Yexo> it's easy to implement it properly 20:48:02 <Yexo> just follow the example from the ply docs 20:48:35 <Yexo> so definitely implement properly 20:48:43 <Hirundo> The parser is not the problem, I'm talking about he ast side of things 20:49:23 <Hirundo> t[0] = BinOp(code_to_op[t[1]], ConstantNumeric(0), t[2]) or t[0] = UnaryOp(code_to_op[t[1]], t[2]) 20:50:27 <Yexo> BinOp is probably easiest for now 20:51:06 <Hirundo> OK, then I'm done :) 20:51:14 <Yexo> great :) 20:52:53 <Hirundo> pushed 20:55:59 <Yexo> for varaction2 we need to get a list of all supported variables and their size anyway 20:56:24 <Yexo> should we support the var numbers or should we give each var (or part of var in some cases) a unique name? 20:57:27 <Yexo> or (like currently for properties) both? 20:58:56 <Webster> Latest update from devactivity: NFO Meta Language - Revision 52: Change: Semicolons are now required at the end of declarations a... <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/52> 20:59:24 <Hirundo> My suggestion would be like this *searches example* 21:00:55 <Hirundo> player_type => ((var[43] & 0x00FF0000) >> 16) 21:02:05 <Yexo> I don't fully understand it, what are you going to write in nml? just "player_type"? 21:02:16 <Yexo> or do you need to include that definition too? 21:03:11 <Hirundo> just player_type, and we abstract away the rest 21:03:31 <Yexo> ok :) 21:03:47 <Yexo> so the current VAR suport can be removed from the parser then 21:05:06 <Hirundo> We could leave it in for advanced users, who could use it to boost performance 21:05:25 <Hirundo> by e.g. not accessing the same variable twice, but caching it 21:05:51 <Yexo> not sure how relevant that would be 21:06:43 <Hirundo> Anyways, setting properties by number is possible as well 21:07:50 <Yexo> yes, but only for those properties where a name is defined 21:08:27 <Yexo> train weight for example is 2 byte-sized properties in nfo, I've already abstracted them in a single property 21:08:41 <Yexo> but that means you can't set the byte-sized properties by number anymore 21:09:08 <Hirundo> Because you need to know the size, action0 can only use known properties, but for varact2 there is no such restriction 21:09:48 <Yexo> with the exception that in variables where not all bits are defined the other bits are undefined 21:09:52 <Yexo> so should be masked away 21:09:54 *** Seberoth has quit IRC 21:10:13 <Yexo> you can't guarantee that for unkown variables 21:10:44 <Hirundo> That is the user's responsibility 21:11:04 <Yexo> ok 21:12:11 <Hirundo> Playing a bit of a devil's advocate here... if var[x] becomes a burden, just trash it :) 21:12:33 <Yexo> it's already implemented, so doesn't matter much 21:13:15 <Hirundo> And now for something completely different.... I came across this piece of python: 21:13:19 <Hirundo> w = int( ( w & 0x7fffFFFF ) | -( w & 0x80000000 ) ) 21:13:45 <Hirundo> It truncates to 32 bit signed, apparently that's not trivial in python 21:14:02 <Webster> Latest update from devactivity: NFO Meta Language - Revision 53: Feature: Support the unary minus operator. <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/53> 21:16:38 <frosch123> isn't the "|" too much? 21:18:06 <Rubidium> isn't the -(w & 0x80000000) == 0 ? 21:18:59 <Yexo> Rubidium: no, integers are not limited to 32bits 21:19:16 <Rubidium> are you sure? 21:19:18 <Yexo> yes 21:19:20 <Hirundo> Python does everything in unlimited-size integers if it becomes too big for 32 bit 21:19:31 <Rubidium> ah, okay 21:20:26 <Hirundo> So in order to do compile-time arithmetic, a proper simulation of a 32 bit is needed 21:28:33 <Yexo> ID = expression change is now in without problems 21:29:58 *** frosch123 has quit IRC 21:30:37 <Yexo> the list with action0 properties is part of actions/action0.py, but that's not really the best location I think 21:31:22 <Yexo> would moving the property list to actions/action0properties.py be ok? 21:32:00 <Yexo> and then add action2/action2varlist.py for a list with valid action2 vars? 21:36:39 <Hirundo> go ahead 21:38:23 <Hirundo> In the meantime, I got the compile-time evaluation done, as long as both operands and result are truncated to 32bit everything works like a charm 21:38:56 <Yexo> nice :) 21:39:21 <Yexo> not pushed yet? 21:39:45 <Hirundo> Not yet 21:43:19 <Yexo> are you going to push it or can I commit the property move list first? 21:44:24 <Hirundo> It's done now, I had to rebase to a remote change I had missed 21:44:27 <Webster> Latest update from devactivity: NFO Meta Language - Revision 54: Change: an ID is now an expression <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/54> 21:47:40 <Yexo> Hirundo: aren't there a lot more places whre reduce_expr could be used? 21:47:46 <Hirundo> Yes 21:50:13 <Hirundo> Real-life /me wants some sleep, and I will worry about that tomorrow :) 21:50:34 <Yexo> gn Hirundo 21:50:42 <Hirundo> goodnight 21:59:33 <Webster> Latest update from devactivity: NFO Meta Language - Revision 56: Change: move the action0 property lists to a seperate file <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/56> || NFO Meta Language - Revision 55: Feature: Compile-time evaluation of assignment expressions when ... <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/55> 22:15:42 *** Guest2349 is now known as pm 22:25:01 *** pm has quit IRC 23:00:28 *** ODM has quit IRC 23:09:08 *** KenjiE20 has quit IRC 23:23:28 *** welshdragon has joined #openttdcoop.devzone 23:46:21 <Webster> Latest update from devactivity: NFO Meta Language - Revision 57: Feature: min/max can take more then 2 arguments <http://dev.openttdcoop.org:81/projects/nml/repository/revisions/57>