IRC logs for #openttd on OFTC at 2017-12-18
⏴ go to previous day
00:00:00 <LordAro> although that would be a bit unfriendly towards actual tor users
00:50:23 *** mindlesstux has joined #openttd
00:54:18 *** mindlesstux is now known as Guest652
00:54:45 *** mindlesstux has joined #openttd
01:20:01 <Eddi|zuHause> i think preventing false positives is more important than getting all of them
01:50:35 *** ToffeeYogurtPots has quit IRC
01:50:54 *** ToffeeYogurtPots has joined #openttd
01:56:56 *** LordAro has joined #openttd
02:12:38 *** goodger has joined #openttd
02:50:33 *** Alkel_U3 has joined #openttd
03:00:23 *** ericnoan has joined #openttd
03:05:45 *** luaduck has joined #openttd
04:38:37 *** michi_cc has joined #openttd
04:38:37 *** ChanServ sets mode: +v michi_cc
05:35:47 *** Hazzard has joined #openttd
06:04:37 *** DorpsGek has joined #openttd
06:04:37 *** ChanServ sets mode: +o DorpsGek
06:46:01 *** KenjiE20 has joined #openttd
07:04:27 *** chomwitt has joined #openttd
09:32:50 *** m1cr0man has joined #openttd
10:55:01 *** Progman has joined #openttd
11:17:21 *** Sheogorath has joined #openttd
11:18:32 *** rustyshackleford[m] has quit IRC
11:30:59 *** FLHerne has joined #openttd
12:01:09 *** ToffeeYogurtPots has quit IRC
12:01:23 *** ToffeeYogurtPots has joined #openttd
13:03:12 *** Alberth has joined #openttd
13:03:12 *** ChanServ sets mode: +o Alberth
13:52:49 *** ChanServ sets mode: +o orudge
14:09:19 *** ChanServ sets mode: +v tokai
14:13:19 <planetmaker> Alberth, you're my python standard. Concerning nmlc, would it maybe make sense to integrate something like pcpp, thus have a native preprocessor instead of relying on cpp to include stuff?
14:13:26 <planetmaker> and parse macros (if any)?
14:14:07 <planetmaker> or should that be something newly-developed tailored to nmlc in specific
14:14:07 <LordAro> planetmaker: some would say that if you're having to do such things in python that you're doing it wrong
14:14:58 <planetmaker> LordAro, a shorter toolchain would lower the bar tremendously :)
14:16:02 <Alberth> it's 2.7 so that won't fly, but otherwise, I am very much in favour of killing cpp
14:16:26 *** sim-al2 has joined #openttd
14:16:28 <planetmaker> and possibly using pymake instead of make
14:16:42 <LordAro> 2.7 is your other issue :p
14:16:47 <planetmaker> which is supposedly a full implementation of make in python (both 2 and 3)
14:16:50 <Alberth> whether pcpp is the road is not clear to me (despite the version problem)
14:17:00 <planetmaker> ok, I didn#t chechk the version for pcpp. That's bad
14:17:35 <planetmaker> no, to me neither. I'm not sure it would be good... it's just an idea which recently popped into my mind
14:17:36 <Alberth> I'd prefer a nmlc extension tbh
14:18:12 <Alberth> make isn't that useful for nmlc projecte imho
14:18:30 <Alberth> you run the full build anyway
14:18:45 <planetmaker> well... yes. But something has to run the full build
14:19:12 <Alberth> or even a standard naming convention
14:19:18 <planetmaker> which would be Makefile ;)
14:19:44 <planetmaker> pymake seems to be the way mozilla went
14:19:45 <Alberth> having a Makefile is not the problem, having to use /usr/bin/make is :)
14:19:56 <planetmaker> pymake is a python replacement for /usr/bin/make
14:20:18 <planetmaker> thus could be shipped from the same source, with the same requirements
14:20:45 <Alberth> assuming a grf author has no understanding of make, it's a 2-line script
14:21:12 <Alberth> gcc -E -C blah.pnml ; nmlc blah.nml
14:21:48 <Alberth> anything beyond that implies understanding and editing of the makefile
14:22:14 <Alberth> at which point, having make isn't a major issue anymore, I think
14:24:10 <Alberth> if you rename blah.pnml to blah.main_nml you can find the entry point of the grf as well
14:25:58 <Alberth> the main problem with the cpp macros is that they are much black magic with ## and #macro stuff
14:26:33 <planetmaker> yupp. Yet they are nice ways to generate stuff which one would need to type out every time otherwise
14:26:39 <Alberth> and locally created and erased macros, iirc
14:26:47 <planetmaker> I don't particularily like them obsuring what one is doing either.
14:27:53 <Alberth> I discussed with andy what needed to be changed in nmlc, having local variables was one of them
14:31:33 <__ln__> i'm sure people will stay out of the channel now
14:34:27 <Alberth> we weren't done yet :p
14:35:32 <Alberth> planetmaker: I think march 4 2017, 07:53 am european time
14:35:56 <planetmaker> local variables... but I think you can do that, can't you?
14:36:28 <planetmaker> you need a way to generate names
14:46:22 <Alberth> currently you construct unique names to avoid clashes, since nmlc uses global scoping
14:47:00 <Alberth> but many of the variables are local in nature, only needed for a few related switches
14:48:17 <Alberth> you are as programmer not even interested in the actual name of the variable, eg a compiler could make a name by appending a random number to it??
14:49:39 <Alberth> although it's simpler to connect scopes and assigned variable indices directly together, at least conceptually
14:50:04 <Alberth> as it avoids having to do a lot of usage analysis in the code
14:50:51 <planetmaker> ah, ok, you mean local in that context
14:51:16 <planetmaker> yes, then local names would probably work, too
14:52:04 <planetmaker> the typical thing I think of is a separate naming of a vehicle and related naming of its switches for graphics and various callbacks. or for tile-based stuff for the object/industry and its related ones
14:52:13 <planetmaker> how local are those names?
14:53:02 <planetmaker> but yeah... maybe definition of a scope would solve it
14:53:13 <planetmaker> then each vehicle has a top line like
14:53:44 <planetmaker> scope(my_greatest_engine_ever_with_super_duper_slug_drive)
14:53:55 <planetmaker> item(FEAT_VEH,...) {...}
14:54:14 <planetmaker> scope(my_greatest_engine_new_edition)
14:55:40 <planetmaker> It would require you to structure you code such that things which belong together are grouped together. But... that's ok, I guess :) You cannot have everything anyway
15:00:22 <Alberth> you can give scope a name, and explicitly refer to a variable in such a named scope :p
15:01:19 <Alberth> ie my_greatest_engine_new_edition.switch_result
15:01:45 <Alberth> or my_greatest_engine_new_edition::switch_result in c++-ish
15:01:53 <planetmaker> as it differs between every engine, it needs a different name currently for each
15:01:55 <Alberth> or some other separator
15:02:12 <planetmaker> thus you cannot copy&paste
15:02:36 <Alberth> but I doubt cross-scope names would be used often
15:03:02 *** ToffeeYogurtPots has quit IRC
15:03:13 <Alberth> obviously, I could be wrong :D
15:03:18 <planetmaker> I'm trying to remember... with refit stuff it would be shared among different wagons
15:03:36 *** ToffeeYogurtPots has joined #openttd
15:03:49 <planetmaker> thus all PAX wagons share the same rules, all flatbed ones the same ones and a 3rd rule for tankers, or something like that
15:08:09 *** ToffeeYogurtPots has quit IRC
15:08:46 <Alberth> I don't have the exact proposal in my head (if there even is one), but in principle you can make some variables global if you want
15:09:48 <Alberth> simplest is by declaring them as global, or declaring local variables as local, or by "exporting" a variable (ie making it explicitly switch from local to global), or some other mechanism
15:10:56 <Alberth> plenty of options there that differ in details only
15:12:15 <Alberth> I once tried adding macros iirc, and at pure parser level it wasn't that hard iirc, don't quite remember what broke it :(
15:31:02 *** greeter has joined #openttd
15:36:50 *** Gustavo6046 has joined #openttd
16:32:32 *** Gustavo6046 has joined #openttd
16:51:05 *** ToBeFree has joined #openttd
18:31:30 *** frosch123 has joined #openttd
18:51:19 *** Wormnest has joined #openttd
18:59:48 *** fonsinchen has joined #openttd
19:00:44 *** HerzogDeXtEr has joined #openttd
19:11:18 *** XeryusTC has joined #openttd
19:12:08 *** lastmikoi has joined #openttd
19:14:48 *** planetmaker has joined #openttd
19:14:48 *** ChanServ sets mode: +o planetmaker
19:22:52 *** andythenorth has joined #openttd
19:35:11 *** Prof_Frink has joined #openttd
19:45:40 <Wolf01> Another train derailed, asked my father where: "aeiou.. America"
19:46:20 *** RafiX2 is now known as RafiX
19:52:04 <Samu> Cargo Flow Legend doesn't work on viewport windows. is that intended?
19:52:22 *** andythenorth has joined #openttd
20:07:09 <Alberth> you selected a cargo or a company?
20:08:15 <Alberth> oh, viewport windows, sorry I misread.
20:08:37 <Alberth> Likely it is, as you typically don't have an overview there
20:22:08 *** sla_ro|master has joined #openttd
20:35:24 <V453000> :0 I can use git for devzone?
20:35:50 <V453000> that's kind of tempting as people at work can help me with it :)
20:36:18 <V453000> probably better to keep hg I guess
20:37:29 <frosch123> we have like 2 git projects
20:37:57 <Wolf01> Mmmh... F or not F? I played 11 hours yesterday
20:39:55 <andythenorth> V453000: I was recommended against changing it to git
20:40:03 <andythenorth> last time I asked
20:40:54 <V453000> k :) I already chose mercurial
20:41:05 <V453000> or do I need someone to do the first poke?
20:42:18 <andythenorth> I never figured it out
20:42:25 <andythenorth> there's something has to be done to create repos
20:42:39 <V453000> I always asked pm for it :) I will do the same
20:42:40 <andythenorth> shall we move to github? o_O
20:46:03 <frosch123> V453000: the trick is to not enable the repository in the same step as creating the project
20:46:33 *** cute[m] has joined #openttd
20:46:40 *** Agiri[m] has joined #openttd
21:00:43 <frosch123> now it should create a real one
21:00:57 <frosch123> can take up to 7 minutes or so
21:01:34 <V453000> what do I do after? clone the empty repository with tortoise?
21:01:48 <V453000> sorry I totally forgot, it's been years since I started a repo :D
21:50:34 *** Stimrol has joined #openttd
21:52:15 <V453000> I'm trying to push things but it said no outgoing changesets
21:52:20 <V453000> I did commit a thing though
21:55:13 *** sim-al2 has joined #openttd
21:55:47 <frosch123> i guess tortoise can show some local history of the commits
21:56:01 <frosch123> also, did you use the putty-key?
21:56:52 <V453000> I'm using pageant, that should be from putty, yes
21:57:19 <V453000> does ssh://hg@hg.openttdcoop.org/part look right?
21:57:59 <frosch123> well, then investigate the "what was committed" thing
21:58:25 <V453000> I added a shitload of files
21:58:51 <V453000> it's even saying bundling in the start of pushing
21:59:18 <V453000> I slightly recall I had this kind of problem earlier with RAWR or BRIX or something but I can't remember what exactly was it and how did I fix it
21:59:29 <V453000> I tried to make another test commit and push
21:59:57 <V453000> yeah and eventually No outgoing changesets to ssh://hg@hg.openttdcoop.org/part
22:44:50 *** FLHerne has joined #openttd
22:56:39 <frosch123> bah, i get wot commericals
23:06:00 *** ToffeeYogurtPots has joined #openttd
23:13:29 *** chomwitt has joined #openttd
23:16:49 *** ChanServ sets mode: +v orudge
23:16:49 *** ChanServ sets mode: +v Rubidium
23:16:49 *** ChanServ sets mode: +v DorpsGek
23:16:49 *** ChanServ sets mode: +v planetmaker
23:24:19 *** ToffeeYogurtPots has quit IRC
23:58:49 *** jonty-comp has joined #openttd
continue to next day ⏵