Config
Log for #openttd on 10th January 2012:
Times are UTC Toggle Colours
00:10:52  *** Zuu [~Zuu@h-114-141.a98.priv.bahnhof.se] has quit [Ping timeout: 480 seconds]
00:28:37  *** mahmoud [~KEM@ALyon-158-1-63-162.w90-29.abo.wanadoo.fr] has quit [Ping timeout: 480 seconds]
01:20:19  *** mahmoud [~KEM@ALyon-158-1-63-162.w90-29.abo.wanadoo.fr] has joined #openttd
01:34:45  *** DDR [~DDR@142.179.78.88] has joined #openttd
01:38:37  *** Lakie [~Lakie@host81-141-98-103.wlms-broadband.com] has joined #openttd
01:38:45  *** pugi [~pugi@host-091-097-041-150.ewe-ip-backbone.de] has quit [Read error: Connection reset by peer]
01:40:41  *** Lakie [~Lakie@host81-141-98-103.wlms-broadband.com] has quit []
02:00:14  *** Rezt [~Rezt@81-178-198-172.dsl.pipex.com] has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
02:36:46  *** DDR [~DDR@142.179.78.88] has quit [Quit: In democracy it's your vote that counts; In feudalism it's your count that votes.   - Mogens Jallberg]
02:55:24  *** Elukka [~Elukka@78-27-90-104.bb.dnainternet.fi] has joined #openttd
04:11:28  *** KouDy [~KouDy@188.75.190.58] has joined #openttd
04:15:15  *** Eddi|zuHause [~johekr@p54B7426B.dip.t-dialin.net] has quit [Remote host closed the connection]
04:15:31  *** Eddi|zuHause [~johekr@p54B7426B.dip.t-dialin.net] has joined #openttd
04:21:44  *** glx [glx@2a01:e35:2f59:c7c0:890e:40e1:faf7:3635] has quit [Quit: bye]
04:34:33  *** pjpe [ade6a119@ircip3.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
04:34:42  *** pjpe [ade6a119@ircip2.mibbit.com] has joined #openttd
04:41:38  *** Snail_ [~jacopocol@CPE78cd8e5ccf20-CM78cd8e5ccf1d.cpe.net.cable.rogers.com] has quit [Ping timeout: 480 seconds]
04:46:48  <__ln__> morgen
04:47:56  *** pjpe [ade6a119@ircip2.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
04:49:14  *** pjpe [ade6a119@ircip2.mibbit.com] has joined #openttd
05:09:37  *** Adambean [~AdamR@82.hosts.reece-eu.net] has joined #openttd
05:11:46  *** Snail_ [~jacopocol@CPE78cd8e5ccf20-CM78cd8e5ccf1d.cpe.net.cable.rogers.com] has joined #openttd
05:14:14  *** Snail_ [~jacopocol@CPE78cd8e5ccf20-CM78cd8e5ccf1d.cpe.net.cable.rogers.com] has quit []
05:25:54  *** DDR [~chatzilla@142.179.78.88] has joined #openttd
05:26:23  *** fjb|tab [~frank@p5DDFE2C5.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
05:37:17  *** Adambean [~AdamR@82.hosts.reece-eu.net] has quit [Quit: Gone fishing]
05:56:03  *** Eddi|zuHause [~johekr@p54B7426B.dip.t-dialin.net] has quit [Remote host closed the connection]
05:56:17  *** Eddi|zuHause [~johekr@p54B73B2C.dip.t-dialin.net] has joined #openttd
06:06:14  *** kkb110_ [~kkb110@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has quit [Quit: Leaving]
06:07:52  *** kkb110_ [~kkb110@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has joined #openttd
06:38:25  *** Prof_Frink [~proffrink@5e06d2be.bb.sky.com] has quit [Ping timeout: 480 seconds]
06:44:18  *** JVassie [~James@2.25.209.230] has joined #openttd
06:50:32  *** HerzogDeXtEr1 [~Flex@i59F6B35A.versanet.de] has quit [Read error: Connection reset by peer]
07:06:20  <Elukka> jesus
07:06:23  <Elukka> i got some brawa wagons
07:06:35  <Elukka> the spare parts list of the humble G10 covered goods wagon has 32 items
07:09:13  *** JVassie [~James@2.25.209.230] has quit [Ping timeout: 480 seconds]
07:10:17  *** DDR_ [~DDR@142.179.78.88] has joined #openttd
07:15:11  *** MJP [~TdlQ@hq.z77.fr] has joined #openttd
07:26:29  *** TGYoshi [~TGYoshi@86.81.146.146] has joined #openttd
07:36:17  *** fjb|tab [~frank@87.148.21.106] has joined #openttd
07:40:46  *** Twofish [~Twofish@box80-64-205-146.static.sdsl.no] has joined #openttd
07:45:08  *** sla_ro|master [~slaco@95.76.26.172] has joined #openttd
07:50:21  *** sla_ro|master [~slaco@95.76.26.172] has quit [Quit: Sla Mutant Co-Op for Renegade - coming back soon]
07:56:10  *** sla_ro|master [~slaco@95.76.26.172] has joined #openttd
08:05:40  *** kkb110_ [~kkb110@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has quit [Ping timeout: 480 seconds]
08:13:20  *** Progman [~progman@p57A1ACAC.dip.t-dialin.net] has joined #openttd
08:18:34  *** snack2 [~nn@dsl-prvbrasgw1-fe05dc00-37.dhcp.inet.fi] has joined #openttd
08:18:59  *** Progman_ [~progman@p57A1B2CF.dip.t-dialin.net] has joined #openttd
08:21:20  *** DayDreamer [~DayDreame@ip-86-49-59-25.net.upcbroadband.cz] has joined #openttd
08:22:06  *** DayDreamer [~DayDreame@ip-86-49-59-25.net.upcbroadband.cz] has left #openttd []
08:24:22  *** Progman [~progman@p57A1ACAC.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
08:24:27  *** Progman_ is now known as Progman
08:27:27  *** andythenorth [~Andy@host86-169-180-203.range86-169.btcentralplus.com] has joined #openttd
08:32:28  <andythenorth> morning
08:38:50  * andythenorth has a wtf
08:38:51  <andythenorth> http://paste.openttdcoop.org/show/915/
08:39:01  <andythenorth> the two code fragments are in two different files in my build
08:39:09  <andythenorth> (I am unifying them)
08:42:02  <Noldo> switch the macro into const global
08:42:28  *** MJP [~TdlQ@hq.z77.fr] has quit [Ping timeout: 480 seconds]
08:50:58  *** kkb110_ [~kkb110@cpe-69-203-124-125.nyc.res.rr.com] has joined #openttd
08:55:26  <appe_> morning people :)
08:59:24  <andythenorth> how do I switch CPP to const global?
08:59:30  <andythenorth> I have googled for it, but no dice
09:07:30  <andythenorth> meh
09:07:32  <andythenorth> solved
09:09:53  <peter1138> cpp to const global? huh?
09:10:43  <andythenorth> yeah but no
09:11:02  <andythenorth> probably very useful - for a different problem :P
09:11:31  <andythenorth> I solved the wtf problem (failed to save a file) :P
09:11:48  * andythenorth is concluding nml beats nfo
09:15:18  <Noldo> :)
09:17:26  <andythenorth> can nml go faster?
09:21:00  *** Neon [~Neon@dslb-094-219-020-078.pools.arcor-ip.net] has joined #openttd
09:22:17  <andythenorth> shame there's no flashing green in the colour cycle
09:22:24  <andythenorth> (port + starboard lights on ships...)
09:22:34  <andythenorth> ship lights don't flash irl, but meh
09:26:14  *** pjpe [ade6a119@ircip2.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
09:29:02  <peter1138> you can animate that yourself
09:29:07  <peter1138> if you want to waste sprites :)
09:31:08  <andythenorth> yeah
09:31:14  <andythenorth> I considered it
09:31:16  <andythenorth> briefly
09:31:23  <andythenorth> for a small number of ticks :P
09:31:33  * andythenorth is trying to learn CPP meanwhile
09:32:19  <andythenorth> I need to concatenate a string from: 1 sub-string, 2 macros (also happen to be strings)
09:32:22  <andythenorth> e.g. switch_cb_cargo_subtype_text_drawbar_truck_1_trailer
09:32:55  <andythenorth> from switch_cb_cargo_subtype_text_[TRUCKTYPE]_[THIS_NUM_TRAILERS]_trailer
09:34:22  <andythenorth> otherwise I am condemned to endless #ifdef :P
09:34:31  <andythenorth> of #if ==
09:42:15  <andythenorth> probably I need ##
09:56:10  *** andythenorth [~Andy@host86-169-180-203.range86-169.btcentralplus.com] has quit [Quit: andythenorth]
10:11:33  *** DDR_ [~DDR@142.179.78.88] has quit [Quit: In democracy it's your vote that counts; In feudalism it's your count that votes.   - Mogens Jallberg]
10:15:14  *** mouseym [~clum@host-92-3-239-85.as43234.net] has quit [Quit: Lost terminal]
10:35:25  *** DDR [~chatzilla@142.179.78.88] has quit [Ping timeout: 480 seconds]
11:08:26  *** pugi [~pugi@host-091-097-080-054.ewe-ip-backbone.de] has joined #openttd
11:18:32  *** Eddi|zuHause [~johekr@p54B73B2C.dip.t-dialin.net] has quit [Remote host closed the connection]
11:18:48  *** Eddi|zuHause [~johekr@p54B73B2C.dip.t-dialin.net] has joined #openttd
11:24:32  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has joined #openttd
11:26:09  <andythenorth> so I have this which works fine: #define THIS_VEH_ID(...)          __VA_ARGS__ ## veh_hackler_BB
11:26:23  <andythenorth> is __VA_ARGS__ a CPP keyword, or just a convention?
11:29:07  *** Markavian` [~Markavian@j616s.co.uk] has joined #openttd
11:36:00  *** Markavian [~Markavian@j616s.co.uk] has quit [Ping timeout: 480 seconds]
11:49:35  * andythenorth lmgtfy andythenorth
11:53:17  *** tokai|mdlx [~tokai@port-92-195-66-224.dynamic.qsc.de] has joined #openttd
11:59:31  *** tokai|noir [~tokai@port-92-195-79-88.dynamic.qsc.de] has quit [Ping timeout: 480 seconds]
11:59:45  <__ln__> anyone need a job? (C++)
12:03:35  <TrueBrain> depends what it pays :P
12:08:59  <__ln__> not terribly much
12:34:19  <TrueBrain> too bad :P
12:59:51  <rasco> http://b.asset.soup.io/asset/2772/5499_45b3_480.png
13:02:33  <andythenorth> meh
13:02:41  * andythenorth gives up on CPP
13:09:23  <TrueBrain> you mean C++? :)
13:10:54  *** TomyLobo2 [~foo@p549463C7.dip.t-dialin.net] has joined #openttd
13:12:06  *** fjb|tab is now known as Guest23570
13:12:07  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has joined #openttd
13:14:10  <andythenorth> I mean CPP :)
13:14:25  <TrueBrain> wtf is CPP?
13:14:36  <Eddi|zuHause> the C-Preprocessor
13:14:53  *** Guest23570 [~frank@87.148.21.106] has quit [Ping timeout: 480 seconds]
13:14:57  <TrueBrain> never heard that being cut off to CPP before
13:15:24  <peter1138> TrueBrain, n00b ;)
13:16:03  <andythenorth> this would explain why I keep confusing people with my questions
13:16:10  <andythenorth> I don't know it as anything except CPP :P
13:16:21  <andythenorth> also...I can't figure out how to expand then concatenate
13:16:21  <TrueBrain> and I know nobody who uses CPP for that :P
13:16:43  *** TomyLobo [~foo@p54946469.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
13:16:43  *** TomyLobo2 is now known as TomyLobo
13:17:24  <TrueBrain> also makes me wonder why on earth you want to use it ..
13:17:27  <TrueBrain> use sed or somethng :P
13:17:44  <andythenorth> meh
13:17:55  <andythenorth> I'm trying to replace working code that other people don't like the look of
13:18:01  <andythenorth> my code works just fine
13:18:11  <andythenorth> but it seems it's not a sensible way to do it
13:18:39  <TrueBrain> so you are seriously using a compiler to only preprocess a file, and use the output for something totally different, or?
13:18:45  <andythenorth> yup
13:18:54  <andythenorth> using sed would mean extending the makefile format
13:18:57  <TrueBrain> what a solution ... lolz
13:19:04  <TrueBrain> for OpenTTD we just use awk for that :P
13:19:36  <TrueBrain> hell, even Python I could understand
13:19:40  <TrueBrain> but a preprocessor .... :P
13:19:53  <TrueBrain> that is using something for something, it is not build to be used on :P
13:20:14  <andythenorth> does it work though? :P
13:20:37  <TrueBrain> it is like using a garbage truck to open your beer ...
13:20:59  <andythenorth> feel free to provide a new makefile framework :)
13:21:14  <TrueBrain> that would require me to know what the fuck you are using in the first place :P
13:21:34  <TrueBrain> but I give you this: an original solution :P
13:21:38  <Eddi|zuHause> TrueBrain: i don't think that was part of "1001 ways to open a beer"
13:21:54  <blathijs> 14:16:22 < andythenorth> also...I can't figure out how to expand then concatenate <-- You mean like DEFINE1 ## DEFINE2 ?
13:21:56  <TrueBrain> it is totally unique for me :)
13:22:05  <TrueBrain> Eddi|zuHause: my point
13:22:09  <TrueBrain> Eddi|zuHause: even they wouldn't consider it :P
13:22:46  <andythenorth> blathijs: like that yes
13:23:07  <andythenorth> TrueBrain: http://dev.openttdcoop.org/projects/newgrf-makefile
13:23:22  <TrueBrain> I guess it is also the reason I couldn't place your CPP term, as nobody uses it like that :P :P :D
13:23:46  <TrueBrain> who came up with this solution, if I can ask? (seriously just curious)
13:23:49  * andythenorth shrug
13:23:59  <Eddi|zuHause> TrueBrain: it was actually used for NFO preprocessing for years now
13:24:15  <andythenorth> I guess we got bored of writing 'The C pre-processor' every time :P
13:24:24  <TrueBrain> bringing a tank to a cock-fight, is how it feels to me :P
13:24:31  * blathijs knew CPP as well
13:24:43  <blathijs> it's actually a fine way to do stuff, if you need exactly what CPP provides
13:24:47  <andythenorth> actual lol at TrueBrain
13:25:05  <TrueBrain> blathijs: overkill comes to mind
13:25:14  <TrueBrain> overcomplicated solution to things we have much nicer and cleaner solutions to :P
13:25:25  <TrueBrain> abusing systems for what they are not intended :)
13:25:30  <TrueBrain> but, as with everything: if it works, it works :)
13:25:36  <andythenorth> well it somewhat works
13:25:52  <andythenorth> I can no longer work on FIRS code
13:26:00  <andythenorth> as the CPP is too complex for me to read
13:26:21  <andythenorth> but limiting use to object macros works genius
13:26:23  <blathijs> TrueBrain: Actually, if you need conditional inclusion and defines, CPP is not overkill but a perfect fit. And even though it's not really meant for non-C files, it's probably better than reinventing the tool and/or format :-)
13:26:42  <TrueBrain> blathijs: "a perfect fit"? really?
13:27:04  <andythenorth> hmm
13:27:07  <blathijs> I might be overlooking complexities of CPP, of course ;-)
13:27:15  <TrueBrain> just might :P
13:27:22  <TrueBrain> and the fact you depend on a compiler for something that doesn't compile :P
13:27:38  <TrueBrain> like writing a book with CPP :P
13:27:38  * andythenorth has spent 3 hours trying to write equivalent of: "foo_string_" + bar_var "_more_foo"
13:27:46  <andythenorth> to get a concatenation with a couple of vars
13:27:55  <andythenorth> so maybe it's not the best shaped tool
13:28:20  <blathijs> TrueBrain: Isn't cpp really just a separate executable? It used to be in the old days, I think
13:28:30  <TrueBrain> I have a (big) meeting in 15; when I come back I will look at that url andythenorth, I am curious how it is used :)
13:28:39  <TrueBrain> blathijs: how would that executable be called?
13:28:57  <Eddi|zuHause> andythenorth: how about you show us your code-snippet?
13:30:27  <andythenorth> 1 min
13:30:35  <blathijs> TrueBrain: cpp?
13:31:17  <blathijs> Seems it isn't, though
13:31:25  <TrueBrain> exists on my system; just unclear what it is :P
13:31:34  <TrueBrain> ah, the preprocessor indeed
13:31:58  <blathijs> it is? It does have a "Only preprocess, don't compile or link"-option according to cpp --help
13:32:23  <TrueBrain> cpp (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5
13:32:27  <TrueBrain> help says it is the C Preprocessor
13:32:58  <TrueBrain> I am seriously surprised someone would want to use it for non-C :P
13:33:03  <blathijs> :-)
13:33:04  <TrueBrain> one creative solution :)
13:33:07  <andythenorth> Eddi|zuHause: http://paste.openttdcoop.org/show/919/
13:33:09  <TrueBrain> overkill, but creative :)
13:33:27  <andythenorth> it certainly made nfo a lot easier when I first switched
13:33:38  <TrueBrain> doesn't nml solve it btw?
13:34:20  <TrueBrain> andythenorth: sure, I can see it improves such code; to me only, it is far from the right tool :P It doesn't mean it doesn't help/work :)
13:34:37  <TrueBrain> every tool has its domain; and every tool can be used outside that domain
13:34:47  <TrueBrain> and, I guess, there is a first for everything :)
13:35:21  <Eddi|zuHause> TrueBrain: the original goal was to provide #include and #define functionality for grfcodec
13:35:42  <TrueBrain> Eddi|zuHause: the lazy solution I guess; effective thou
13:36:06  *** Snail_ [~jacopocol@CPE78cd8e5ccf20-CM78cd8e5ccf1d.cpe.net.cable.rogers.com] has joined #openttd
13:36:10  <andythenorth> the original goal worked really well
13:36:56  <TrueBrain> I just wonder .. doesn't NML supply means for this?
13:37:19  <TrueBrain> mind you: I never looked in any NML / GRF / NFO code what-so-ever :P
13:37:30  <Eddi|zuHause> no... they were too lazy to impleement, because this method was well established by then
13:37:42  <andythenorth> take a guess http://dev.openttdcoop.org/projects/firs/repository/entry/sprites/nml/industries/aluminium_plant.pnml
13:39:14  <blathijs> TrueBrain: One can wonder: Why should NML provide it if C doesn't even provide it itself? ;-p
13:39:49  <TrueBrain> blathijs: and we all know that C Preprocessor is so limited, it often causes issues in what you want to do :P
13:39:55  <TrueBrain> even more when we talk about string manipulation
13:40:06  <TrueBrain> with a language like NML, easier solutions are available
13:40:19  <andythenorth> it also litters the code with stuff that looks like function calls
13:40:26  <andythenorth> ...because they're cpp function calls :P
13:40:34  <andythenorth> confuses my brain
13:40:47  <andythenorth> replacing constants is trivial
13:40:53  <andythenorth> using includes - most sane languages do that
13:41:06  <andythenorth> two kinds of function call in your language - that's a headache
13:41:31  <andythenorth> language / source code /s
13:41:53  <Eddi|zuHause> andythenorth: you need the (...) in the #define only if you use __VA_ARGS__
13:41:54  <TrueBrain> reading the last URL, I understand perfectly what line by line means, and yet I have no clue what the fuck it does :D:D :)
13:42:24  <andythenorth> you'd have to expand a lot of macros to make any sense of it
13:42:37  <TrueBrain> 353
13:42:38  <TrueBrain> CHECK_INCOMPATIBLE  (aluminium_plant, 56, CB_RESULT_LOCATION_DISALLOW, return CB_RESULT_LOCATION_ALLOW)
13:42:40  <andythenorth> Eddi|zuHause: do I need the parentheses
13:42:40  <TrueBrain> 354
13:42:40  <Eddi|zuHause> that, of course, has nothing to do with your problem
13:42:41  <TrueBrain> CHECK_INCOMPATIBLE  (bauxite_mine,    16, CB_RESULT_LOCATION_DISALLOW, THIS_ID(aluminium_plant))
13:42:43  <TrueBrain> why does the first 'return', the second not :P
13:42:44  <TrueBrain> stuff like that :)
13:43:01  <blathijs> TrueBrain: I guess that using a preprocessor is actually a sign of insufficient abstraction capabilities in the language, though ;-p
13:43:05  <andythenorth> TrueBrain: I have no idea
13:43:11  <andythenorth> this is why I can no longer work on FIRS code :)
13:43:20  <andythenorth> however others work on it for me ;)
13:43:33  <TrueBrain> blathijs: I guess that is a good guess :)
13:43:43  <TrueBrain> I wonder if NML doesn't support temporary variables, like consts
13:43:52  <andythenorth> NML also provides some magic builtins
13:44:18  <andythenorth> so you have to grep your source for "is it a define?", and have NML docs open all the time
13:44:37  <TrueBrain> I totally understand your point andythenorth :)
13:44:50  <andythenorth> NML *is* better than nfo
13:44:55  <andythenorth> but I vastly prefer nfo
13:45:03  <TrueBrain> why?
13:45:05  <TrueBrain> (curious)
13:45:08  <andythenorth> because it's just bytes
13:45:10  <Eddi|zuHause> "the devil you know"
13:45:18  <andythenorth> there's no magic
13:45:27  <TrueBrain> hehe
13:45:36  <TrueBrain> right, meeting time; back in a few hours :(
13:45:42  <andythenorth> it's probably about 4x faster to write code in nml
13:45:47  <andythenorth> but I don't trust it at all
13:46:14  <peter1138> trust?
13:46:51  <andythenorth> I wouldn't leave my kids alone with it for definite :P
13:47:50  <Eddi|zuHause> andythenorth: you need () only if the macro definition contains (...)
13:48:30  <Eddi|zuHause> so if you #define FOO(...), then you need to do FOO(), if you #define FOO, then you only need FOO
13:49:33  <andythenorth> but it's not going to expand THIS_NUM_TRAILERS whatever I do, is it?
13:49:47  <andythenorth> it treats that as a literal string
13:50:48  <andythenorth> (I don't mean a string literal) :P
13:50:53  <Eddi|zuHause> andythenorth: what i think is you need to do #define FOO(num) xxx_ ## num ## _yyy, and then do FOO(NUM)
13:51:11  <andythenorth> let's see
13:51:14  <andythenorth> I think I tried that already
13:51:17  <andythenorth> but I'll try again
13:51:43  *** Snail_ [~jacopocol@CPE78cd8e5ccf20-CM78cd8e5ccf1d.cpe.net.cable.rogers.com] has quit [Quit: Snail_]
13:52:21  <andythenorth> yep, still treats THIS_NUM_TRAILERS as a string
13:52:24  <andythenorth> won't expand it
13:53:18  <Eddi|zuHause> hm... arguments should be expanded first...
13:55:10  * andythenorth wonders when to give up and keep using #if blocks :)
13:55:49  *** Andrei [5f4dc1df@ircip1.mibbit.com] has joined #openttd
13:55:54  <andythenorth> other than ugliness and scalability and maintainability, and verbosity, what's wrong with this?  http://paste.openttdcoop.org/show/920/
13:55:56  <Andrei> Hello
13:56:01  <Andrei> Someone around?
13:56:12  <andythenorth> @seen someone
13:56:12  <DorpsGek> andythenorth: someone was last seen in #openttd 1 year, 12 weeks, 1 day, 20 hours, 15 minutes, and 49 seconds ago: <Someone> indeed
13:56:34  <Andrei> :))
13:56:41  <Andrei> @seen
13:56:41  <DorpsGek> Andrei: seen [<channel>] <nick>
13:56:55  <Andrei> @seen #openttd
13:56:55  <DorpsGek> Andrei: seen [<channel>] <nick>
13:57:44  *** Andrei [5f4dc1df@ircip1.mibbit.com] has quit []
13:59:47  <andythenorth> I could create a lot of branching switches with nml, using CPP to insert a value via advanced varact 2 constant
13:59:57  <andythenorth> but I don't see any gain there
14:00:33  <Eddi|zuHause> well... i can't help you ther, at this point i use python to generate such constants
14:01:37  <Eddi|zuHause> file.write('#define VEH_ID(...) %s_%s_%s ## __VA_ARGS__\n'%(comp, ident, sl_index))
14:02:58  <andythenorth> woah :)
14:03:06  <andythenorth> that's um...readable ;)
14:03:26  <andythenorth> you can't ditch the cpp at that point, and use python directly?
14:03:39  <Eddi|zuHause> i still need include functionality
14:03:55  <Eddi|zuHause> and i can pass this value to "custom.pnml" files
14:04:39  <Eddi|zuHause> it still has its uses
14:09:52  *** supermop [~daniel_er@rrcs-72-43-171-87.nyc.biz.rr.com] has joined #openttd
14:31:38  *** Adambean [~AdamR@82.hosts.reece-eu.net] has joined #openttd
14:33:44  <Belugas> hello
14:36:12  *** Twofish [~Twofish@box80-64-205-146.static.sdsl.no] has quit [Quit: Leaving]
14:41:47  <welshdragon> http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
14:45:20  *** Devroush [~dennis@178-119-153-135.access.telenet.be] has joined #openttd
14:48:36  *** supermop [~daniel_er@rrcs-72-43-171-87.nyc.biz.rr.com] has quit [Remote host closed the connection]
14:53:04  *** fjb|tab is now known as Guest23582
14:53:04  *** Guest23582 [~frank@p5DDFDF42.dip.t-dialin.net] has quit [Read error: Connection reset by peer]
14:53:05  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has joined #openttd
15:05:28  <lugo> hi
15:06:18  <lugo> is it possible to display server settings to clients when they connect?
15:07:18  <lugo> something along the lines: say "Min active players:'$min_active_players'"
15:07:38  <Eddi|zuHause> use the admin port?
15:08:14  <Eddi|zuHause> finally port autopilot to connect to the admin port? :)
15:13:26  <lugo> so there's no quick and easy way i guess..
15:14:37  <Eddi|zuHause> well, there will be a quick and easy way, if you do the hard work first :)
15:20:41  <michi_cc> andythenorth: Can you paste a complete stand-alone example of your CPP problem? One thing I noticed in your first paste is that CPP will not replace "1..THIS_NUM_TRAILERS", because of C tokenozation rules, "1 .. THIS_NUM_TRAILERS" on the other hand will be replaced (and NML hopefully accepts it as well)
15:29:14  *** Lakie [~Lakie@host81-141-98-103.wlms-broadband.com] has joined #openttd
15:32:41  *** snack2 [~nn@dsl-prvbrasgw1-fe05dc00-37.dhcp.inet.fi] has quit []
15:57:23  *** HerzogDeXtEr [~Flex@i59F6B35A.versanet.de] has joined #openttd
16:01:37  *** supermop [~daniel_er@rrcs-72-43-171-87.nyc.biz.rr.com] has joined #openttd
16:07:35  *** mouseym [~clum@host-92-3-230-253.as43234.net] has joined #openttd
16:26:01  *** Prof_Frink [~proffrink@5e06d2be.bb.sky.com] has joined #openttd
16:58:53  <Eddi|zuHause> http://imgur.com/enGEF
17:15:47  <andythenorth> michi_cc: how complete?  It might be easier to just look at BANDIT source? :)
17:16:06  <andythenorth> http://dev.openttdcoop.org/projects/bandit/repository
17:18:04  <michi_cc> andythenorth: Complete enough to to see what fails. If you can tell where in BANDIT to look...
17:19:11  <andythenorth> I scrapped my attempt, but I'm trying to replace l11-l30 here: http://dev.openttdcoop.org/projects/bandit/repository/entry/sprites/nml/templates/template_truck_with_trailers_item.tnml
17:19:24  <andythenorth> it works but is...inelegant :P
17:22:02  <andythenorth> it would be elegant to concatenate the identifier for the switch
17:22:18  <andythenorth> but irl, I could just keep adding #if :P
17:25:33  *** MagisterQuis [~Adium@c-71-206-9-241.hsd1.md.comcast.net] has quit [Ping timeout: 480 seconds]
17:26:20  *** MJP [~TdlQ@hq.z77.fr] has joined #openttd
17:28:15  <michi_cc> andythenorth: http://paste.openttdcoop.org/show/921/
17:29:00  <TrueBrain> blathijs: michi_cc just gave a good example why using CPP is not the tool in this case :D It uses invalid C to parse :D:D
17:29:02  <michi_cc> andythenorth: Bascially to make such constructs work you have to use *two* macros and only do the token pasting in the second macro and just pass it through in the first.
17:29:54  <michi_cc> TrueBrain: Where is that invalid C? Note that CPP does not care about C grammer, *only* about C tokenizing rules.
17:30:05  <TrueBrain> michi_cc: my point exactly :)
17:30:37  <Eddi|zuHause> not getting the point...
17:31:49  <michi_cc> The moment I would replace "THIS_SUBTYPE_TEXT_CB_ID" by e.g. "int THIS_SUBTYPE_TEXT_CB_ID;" it would be perfectly alright C.
17:31:54  <TrueBrain> NML is not a subset of the C language, as shown with 1..THIS_NUM_TRAILERS :)
17:32:42  <Eddi|zuHause> how's that a reason? :)
17:33:04  *** glx [glx@2a01:e35:2f59:c7c0:4104:4bfa:ebea:fd79] has joined #openttd
17:33:07  *** mode/#openttd [+v glx] by ChanServ
17:33:13  <TrueBrain> depends for what you are looking a reason Eddi|zuHause
17:33:15  <TrueBrain> lol
17:33:43  <TrueBrain> michi_cc: to bring a bit of context, earlier I was surprised people were actively using CPP, and blathijs and I got to talk if this was a good tool for the job, as it was efficient
17:34:05  <TrueBrain> but given that NML in fact does not follow the lexer-rules of C, there is clearly places where it breaks
17:34:45  <TrueBrain> which still makes me wonder, even if CPP was used for NFO, why NML doesnt implement its own version of it
17:35:02  <TrueBrain> wouldn't that simplify the work for authors?
17:35:26  *** dageek [~dageek@2001:8b0:ff85:0:223:32ff:fec9:1f10] has joined #openttd
17:35:32  <michi_cc> andythenorth: To explain a bit more, you need that indirection because in my example CPP will replace "THIS_SUBTYPE_TEXT_CB_ID" with "THIS_SUBTYPE_TEXT_CB_ID_(THIS_NUM_TRAILERS)", which in turn is expanded to "PASTE(switch_cb_cargo_subtype_text_drawbar_truck_, THIS_NUM_TRAILERS, _trailer)".
17:35:58  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has quit [Read error: Connection reset by peer]
17:36:45  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has joined #openttd
17:36:51  <Eddi|zuHause> michi_cc: why does this work, but writing PASTE(blah) directly not?
17:37:00  <TrueBrain> [18:31] <michi_cc> The moment I would replace "THIS_SUBTYPE_TEXT_CB_ID" by e.g. "int THIS_SUBTYPE_TEXT_CB_ID;" it would be perfectly alright C. <- how does that fix the invalid 1..THIS_NUM_TRAILERS ? That is still invalid C, not?
17:37:42  <michi_cc> andythenorth: If that second macro would already do the token pasting (i.e. the a ## b ## c) you can see that the second token is still THIS_NUM_TRAILERS, as macro expansion happens after token pasting. But thanks to the indirection the line is further expanded to "PASTE(switch_cb_cargo_subtype_text_drawbar_truck_, 2, _trailer)" which then in turn is expanded using PASTE to "switch_cb_cargo_subtype_text_drawbar_truck_2_trailer".
17:38:30  <michi_cc> Eddi|zuHause: Because the ## operator is executed *before* the token is expanded if it is itself a define.
17:38:48  <Eddi|zuHause> weird
17:39:49  <michi_cc> Yes. It is indeed not really obvious, but the result of the fact that in translating C, tokenization is phase 3 while macro expansion is phase 4.
17:41:45  <andythenorth> michi_cc: just feeding the toddler, but will look at your paste asap :)
17:43:40  *** |Jeroen| [~jeroen@d5152B25B.access.telenet.be] has joined #openttd
17:45:15  <andythenorth> how hard is it to write a simple macro processor?
17:45:23  <andythenorth> out of interest
17:45:39  *** dageek [~dageek@2001:8b0:ff85:0:223:32ff:fec9:1f10] has left #openttd []
17:45:50  <andythenorth> maybe that's the wrong question
17:47:04  <TrueBrain> andythenorth: depends on your "simple"
17:47:07  <TrueBrain> and on your demands
17:47:15  <andythenorth> michi_cc so to also substitute the type of truck, I'd do "#define PASTE(a, b, c, d) a ## b ## c ##d" and also pass TRUCK_TYPE or such?
17:47:19  <TrueBrain> CPP is efficient, so it truly depends on what you want :)
17:47:39  <andythenorth> define constants, include files, concatenate strings
17:47:50  <andythenorth> I've often wanted maths, but always found a way around it
17:48:09  <andythenorth> nml appears to be able to evaluate maths inline to some extent anyway
17:48:31  <andythenorth> the strings are primarily to create identifiers in nml
17:49:05  <andythenorth> currently I use things like #define THIS_VEH_ID(...)          __VA_ARGS__ ## veh_hackler_BB
17:49:35  <andythenorth> but I find that very unintuitive - others' mileage may vary
17:49:48  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has quit [Read error: Connection reset by peer]
17:52:12  *** fjb|tab [~frank@p5DDFDF42.dip.t-dialin.net] has joined #openttd
17:52:55  <Xaroth> TrueBrain: they should just use xml :) :)
17:53:17  <TrueBrain> XML, the goto solution for all problems
17:53:20  <Xaroth> \o/
17:56:34  *** Chris_Booth [~chatzilla@client-86-31-5-205.midd.adsl.virginmedia.com] has joined #openttd
17:57:45  <andythenorth> :m
17:58:04  <Eddi|zuHause> the facepalm smilie :)
17:58:11  <andythenorth> yeah, XML concatenates strings really well
17:58:35  <andythenorth> and it's really easy to read, what with all those nodes and crap
17:59:05  <Xaroth> oh, easy to read.. python! :P
17:59:05  <Eddi|zuHause> andythenorth: you will probably want "switch_blah_ ## b ## _ ## c ## _trailer" or somesuch
17:59:17  *** supermop [~daniel_er@rrcs-72-43-171-87.nyc.biz.rr.com] has quit [Quit: supermop]
17:59:31  <andythenorth> yup
17:59:40  <andythenorth> XML + TAL might work :P
18:00:00  <andythenorth> http://en.wikipedia.org/wiki/Template_Attribute_Language
18:00:16  <andythenorth> but it would contain about 200% more markup than is needed
18:00:36  <andythenorth> but at least I could view it in my browser :P
18:00:45  <Eddi|zuHause> yay!
18:00:50  <Eddi|zuHause> that's the killer feature!
18:00:52  <Eddi|zuHause> want!
18:01:27  <Xaroth> on-error if an error occurs, this attribute works like the content tag.
18:01:34  <Xaroth> that almost sounds like 'on error resume next'
18:02:49  <Eddi|zuHause> bah google is useless...
18:03:14  <Xaroth> mind my ignorance, but what, exactly, is the expected output of this 'tool' ?
18:03:47  <andythenorth> the one we're inventing?
18:03:49  <andythenorth> or TAL?
18:03:50  <Eddi|zuHause> i wanted to search whether anybody ever did a "phone mobile", but google insists of showing me all results for "mobile phone"
18:04:09  <Xaroth> the one you're inventing
18:04:26  <andythenorth> it templates NML
18:04:34  <andythenorth> or replaces it :P
18:04:38  <andythenorth> replacing it seems foolhardy
18:04:39  <andythenorth> :D
18:05:15  <Xaroth> which is basically a new newgrf creator thingie
18:05:35  <andythenorth> yarp
18:05:43  <andythenorth> so forget XML as it's stupid
18:06:02  <andythenorth> the neat thing about TAL is that (in the python implementation of it) you can write python in the template
18:06:07  <andythenorth> *restricted python
18:06:15  * andythenorth wonders if NML does that
18:06:20  <Xaroth> why not just use python instead?
18:06:50  <andythenorth> instead of NML?
18:06:56  <Xaroth> instead of TAL
18:07:09  <andythenorth> hmm
18:07:19  * andythenorth is perhaps being confusing :)
18:07:41  <Xaroth> quite so.
18:07:45  <andythenorth> I don't propose TAL for this, I just like its ability to execute python ;)
18:08:00  * Xaroth shrugs
18:08:01  <andythenorth> if NML could execute python while compiling, I could use that....
18:08:06  <andythenorth> maybe it can
18:08:12  * andythenorth should read the NML docs more
18:08:13  <Eddi|zuHause> "inline python" :p
18:08:32  <andythenorth> meh
18:08:34  <Eddi|zuHause> maybe it has an unguarded "eval()" that you can abuse :p
18:08:35  <andythenorth> eval()
18:08:49  <andythenorth> very dangerous in web apps ;)
18:11:02  <Eddi|zuHause> in case you need a debug interface :)
18:12:22  <andythenorth> replace="python: 'foo'"
18:12:23  <andythenorth> etc
18:16:15  *** MagisterQuis [~Adium@c-71-206-9-241.hsd1.md.comcast.net] has joined #openttd
18:16:38  <Eddi|zuHause> soon we need to build deep thought to compile cets
18:18:29  *** frosch123 [~frosch@frnk-590d5e87.pool.mediaWays.net] has joined #openttd
18:20:49  *** FLHerne [~francis_h@dsl-217-155-24-22.zen.co.uk] has joined #openttd
18:21:51  <michi_cc> andythenorth: Yes. Bascially, every time you want to use ## with something that already is a #define, you need to pass it through two macros (e.g. #define A(x) B(x); #define B(x) dummy ## x).
18:22:26  * frosch123 wonders whether tt-forums has a my-little-pony thread somewhere in the off-topic
18:22:46  * Eddi|zuHause wouldn't know
18:23:29  <frosch123> http://pics.nase-bohren.de/ponies-vampires.jpg <- just reminded me how popular that stuff actually is
18:25:28  *** TheMask96 [~martijn@gluttony.vhost.ne2000.nl] has quit [Ping timeout: 480 seconds]
18:25:48  *** Elukka [~Elukka@78-27-90-104.bb.dnainternet.fi] has quit []
18:29:09  *** TheMask96 [~martijn@lust.vhost.ne2000.nl] has joined #openttd
18:30:55  *** snack2 [~nn@dsl-prvbrasgw1-fe05dc00-37.dhcp.inet.fi] has joined #openttd
18:33:33  *** retro|cz [~retro@106.142.broadband6.iol.cz] has joined #openttd
18:33:35  <retro|cz> Hello
18:33:38  *** neli [micha@1-213.ftth.onsbrabantnet.nl] has quit [Ping timeout: 480 seconds]
18:33:59  <retro|cz> Anyone here interested into bug report ?
18:34:01  <retro|cz> With fix ?
18:35:19  <frosch123> bug reports with fixes included are always nice
18:35:41  <retro|cz> frosch123, I'm not sure if it is local bug
18:35:46  <retro|cz> or I should send patch
18:35:54  <retro|cz> I have compilation error in last nightly.
18:36:08  <retro|cz> one include in screenshot.cpp is missing
18:36:08  <frosch123> which os/compiler?
18:36:09  <retro|cz> probably
18:36:12  <retro|cz> gcc
18:36:16  <retro|cz> linux 64gbit
18:36:18  <retro|cz> bit
18:37:01  <frosch123> i think you are too late :)
18:37:05  <frosch123> @commit 23784
18:37:05  <DorpsGek> frosch123: Commit by truebrain :: r23784 trunk/src/screenshot.cpp (2012-01-09 23:04:03 UTC)
18:37:06  <DorpsGek> frosch123: -Revert (r23740): compiling without libpng failed to include a correct header
18:37:32  <retro|cz> https://github.com/blackberry/OpenTTD/blob/master/src/screenshot.cpp#L13
18:37:33  <retro|cz> is missing
18:37:40  <retro|cz> should i send patch ?
18:37:49  <retro|cz> When I readd this line, it compiles fine
18:38:06  <Terkhen> hello
18:38:09  <frosch123> it was already fixed 19 hours ago
18:38:20  <retro|cz> frosch123, ohh, so my build isn't last
18:38:24  <retro|cz> so thanks frosch123
18:38:50  <retro|cz> problem solved
18:39:43  *** fonsinchen [~fonsinche@brln-4db80af6.pool.mediaWays.net] has joined #openttd
18:42:19  *** Chris_Booth [~chatzilla@client-86-31-5-205.midd.adsl.virginmedia.com] has quit [Quit: ChatZilla 0.9.88 [Firefox 10.0/20120104111456]]
18:45:53  <CIA-1> OpenTTD: translators * r23785 /trunk/src/lang/ (9 files): (log message trimmed)
18:45:53  <CIA-1> OpenTTD: -Update from WebTranslator v3.0:
18:45:53  <CIA-1> OpenTTD: croatian - 6 changes by VoyagerOne
18:45:53  <CIA-1> OpenTTD: czech - 12 changes by TheLamer
18:45:53  <CIA-1> OpenTTD: dutch - 6 changes by habell
18:45:55  <CIA-1> OpenTTD: english_US - 6 changes by Rubidium
18:45:55  <CIA-1> OpenTTD: finnish - 7 changes by jpx_
18:53:12  *** Wolf01 [~wolf01@host101-141-dynamic.31-79-r.retail.telecomitalia.it] has joined #openttd
18:53:56  <Wolf01> hoi
18:56:29  <Terkhen> hoi Wolf01
18:56:51  *** Alberth [~hat@a82-95-164-127.adsl.xs4all.nl] has joined #openttd
18:56:54  *** mode/#openttd [+o Alberth] by ChanServ
18:59:38  <Wolf01> hello Alberth
18:59:47  <Alberth> hi
19:06:46  *** HerzogDeXtEr1 [~Flex@i59F6C428.versanet.de] has joined #openttd
19:10:57  *** |Jeroen| [~jeroen@d5152B25B.access.telenet.be] has quit [Quit: oO]
19:11:19  *** Brianetta [~brian@188-220-91-30.zone11.bethere.co.uk] has joined #openttd
19:12:57  *** HerzogDeXtEr [~Flex@i59F6B35A.versanet.de] has quit [Ping timeout: 480 seconds]
19:33:07  <Belugas> hello Wolf01! and Terkhen! and Alberth!  and Rubidium! and... etc...
19:33:26  <Alberth> hello Belugas
19:33:46  *** Jogio [~5080aabd@101.haydn.openttdcoop.org] has joined #openttd
19:34:11  <Jogio> good evening
19:41:33  <Alberth> o/
19:41:33  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has quit [Read error: Connection reset by peer]
19:42:02  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has joined #openttd
19:43:22  *** andythenorth is now known as Guest23601
19:43:22  *** Guest23601 [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has quit [Read error: Connection reset by peer]
19:43:23  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has joined #openttd
19:56:20  *** neli [micha@1-213.ftth.onsbrabantnet.nl] has joined #openttd
19:56:27  *** KritiK [~Maxim@93-80-80-172.broadband.corbina.ru] has joined #openttd
20:14:23  *** Jogio [~5080aabd@101.haydn.openttdcoop.org] has quit [Quit: Page closed]
20:25:24  *** brendan10211 [~brendan10@cpe-069-134-169-113.nc.res.rr.com] has joined #openttd
20:29:51  *** pjpe [ade6a119@ircip1.mibbit.com] has joined #openttd
20:30:06  <andythenorth> michi_cc: thanks for the cpp - it works
20:30:13  <andythenorth> I'll see if I can adapt it to other cases
20:30:26  <andythenorth> I kind of get it
20:30:46  <andythenorth> for reasons I can't explain, it reminds me of calling ''.join() in python :P
20:36:27  * andythenorth wonders if the source file for an include can be defined by a macro
20:36:32  <andythenorth> one way to test....
20:38:32  *** brendan10211 [~brendan10@cpe-069-134-169-113.nc.res.rr.com] has quit [Read error: Operation timed out]
20:39:11  <Alberth> http://gcc.gnu.org/onlinedocs/cpp/Computed-Includes.html#Computed-Includes <-- andythenorth
20:39:54  <andythenorth> should work then
20:39:56  <andythenorth> :)
20:45:27  <andythenorth> hmm
20:45:34  <andythenorth> CPP has some interesting opinions about _
20:46:17  <andythenorth> in function names
20:52:41  *** brendan10211 [~brendan10@cpe-069-134-169-113.nc.res.rr.com] has joined #openttd
20:54:01  <frosch123> anyone uses stop-depot orders?
20:55:25  *** Westie [~westie@icarus.typefish.co.uk] has quit [Ping timeout: 480 seconds]
20:57:35  <Eddi|zuHause> it was my feature request :)
20:57:56  <frosch123> but you are not using service orders
20:58:10  <Eddi|zuHause> not usually
20:58:28  <Eddi|zuHause> occasionally for autoreplace
20:58:53  <frosch123> question, shall stop-order disable automatic servicing of a vehicle, or only the normal depot and service orders?
20:59:33  <Eddi|zuHause> hm... difficult
20:59:56  <frosch123> the question is, what behaviour is more useful, or less surprising to the user :p
20:59:57  <Eddi|zuHause> i think the former for consistency, but explicitly document it
21:01:36  <andythenorth> hmm
21:01:58  <andythenorth> I can't figure out how to concatenate a name for an include using double quotes
21:02:29  <frosch123> #define a "bla
21:02:33  <frosch123> #define b blub"
21:02:37  <andythenorth> I can do it with angle brackets, but then the path fails :P
21:02:48  <frosch123> #define concat(a, b) a##b
21:02:58  *** neli [micha@1-213.ftth.onsbrabantnet.nl] has quit [Ping timeout: 480 seconds]
21:02:59  <frosch123> #include concat(a,b)
21:03:00  <frosch123> ?
21:03:37  <andythenorth> http://paste.openttdcoop.org/show/922/
21:03:50  <andythenorth> error: #include expects "FILENAME" or <FILENAME>
21:04:29  <frosch123> add a #define quote(bla) #bla
21:04:41  <frosch123> hmm, no
21:04:58  *** Progman [~progman@p57A1B2CF.dip.t-dialin.net] has quit [Remote host closed the connection]
21:05:03  <andythenorth> gah
21:05:04  <andythenorth> I'm close
21:05:11  <andythenorth> this one would actually be a valid case for #if
21:05:24  <frosch123> does s/a ## b ## c/#a##b##c/ work?
21:05:28  <andythenorth> but I can't check #if TRUCK_TYPE == string
21:05:49  <andythenorth> seems cpp can only evaluate numbers
21:05:56  <frosch123> (the # in the front should make it quoted)
21:07:25  <andythenorth> where am I adding the #?
21:07:38  <frosch123> in the CONCATENATE_IDENTIFIER_
21:07:45  <andythenorth> oh yes
21:07:47  <frosch123> it must be at the end of the call-chain
21:08:44  *** Brianetta [~brian@188-220-91-30.zone11.bethere.co.uk] has quit [Quit: TschÌß]
21:08:53  <andythenorth> error: pasting ""../templates/trailer_callbacks/capacity_cb_trailers_"" and "fifth_wheel_truck" does not give a valid preprocessing token
21:09:36  <frosch123> don't quote your arguments
21:10:17  *** fonsinchen [~fonsinche@brln-4db80af6.pool.mediaWays.net] has quit [Remote host closed the connection]
21:10:30  <frosch123> hmm, let's actually look at the specs :p
21:11:12  <frosch123> pages 304-308
21:13:34  <andythenorth> cpp online docs?
21:13:45  <andythenorth> http://gcc.gnu.org/onlinedocs/cpp/Computed-Includes.html#Computed-Includes
21:13:54  <frosch123> c++98 specs
21:16:31  <frosch123> haha, it contanis exactly your usecase as example :p
21:17:01  <frosch123> the correct solution is the one i dismissed earlier.
21:17:06  <andythenorth> google is not my friend :(
21:17:08  <frosch123> #define quote(bla) #bla
21:17:37  <SpComb> don't quote me bro
21:18:06  <frosch123> #include quote(THIS_CAPACITY_TEMPLATE_NAME)
21:18:07  <andythenorth> so I need an extra define?
21:18:46  *** JVassie [~James@2.25.209.230] has joined #openttd
21:19:21  <frosch123> http://paste.openttdcoop.org/show/923/
21:21:40  <brendan10211> hrrm
21:22:01  <andythenorth> hmm
21:22:10  <andythenorth> so the #include line also calls
21:22:15  <andythenorth> rather than expecting a constant
21:22:19  <brendan10211> ooh, css
21:22:38  <brendan10211> wait
21:22:38  <brendan10211> no
21:22:40  <brendan10211> sorry
21:22:42  <brendan10211> what is it
21:24:20  <andythenorth> hmm
21:24:23  <andythenorth> ow
21:25:18  <frosch123> brendan10211: it's a quote from ISO/IEC 14882:1998(E)
21:28:35  * andythenorth is reading a cpp tutorial that says "you should generally avoid macros when possible"
21:28:35  <andythenorth> :P
21:29:20  <SpComb> it is probably correct
21:30:24  <brendan10211> oh
21:30:25  <brendan10211> ok
21:30:29  <SpComb> #include quote(concat(foo/,bar))
21:30:34  <SpComb> might that work?
21:34:34  <Wolf01> 'night all
21:34:42  *** Wolf01 [~wolf01@host101-141-dynamic.31-79-r.retail.telecomitalia.it] has quit [Quit: Once again the world is quick to bury me.]
21:35:42  <SpComb> given an xquote
21:37:35  <andythenorth> maybe there's a better way
21:37:41  <andythenorth> currently I'm stumped though :P
21:38:05  <andythenorth> the specs aren't really helping me :)
21:38:38  <frosch123> you only have to add the QUOTE to you current file, don't you?
21:40:54  <andythenorth> it's not calling
21:41:08  *** MagisterQuis1 [~Adium@c-71-206-9-241.hsd1.md.comcast.net] has joined #openttd
21:41:59  <andythenorth> http://paste.openttdcoop.org/show/924/
21:42:06  <frosch123> http://paste.openttdcoop.org/show/925/
21:43:09  <andythenorth> frosch123: expands to THIS_CAPACITY_TEMPLATE_NAME
21:43:31  <andythenorth> I got the same result with my attempt :)
21:44:04  <andythenorth> probably this is a bad way to do this :)
21:45:57  <frosch123> http://paste.openttdcoop.org/show/926/ <- ah, like in the specs example you really need two levels of quote :p
21:46:56  <andythenorth> error: pasting "capacity_cb_trailers_" and ""THIS_TRUCK_TYPE"" does not give a valid preprocessing token
21:47:05  <andythenorth> :)
21:47:11  <frosch123> it works for me
21:47:21  <frosch123> what do you define THIS_TUCK_TYPE to?
21:47:48  *** MagisterQuis [~Adium@c-71-206-9-241.hsd1.md.comcast.net] has quit [Ping timeout: 480 seconds]
21:47:59  <andythenorth> it's either drawbar_truck or fifth_wheel_truck
21:48:05  <andythenorth> it's probably numeric in your version of the repo
21:49:04  <frosch123> oh, you need to remove the # from CALL_TEMPLATE_NAME_CONCATENATER_
21:49:32  <frosch123> http://paste.openttdcoop.org/show/927/
21:50:23  <andythenorth> hmm
21:50:30  <andythenorth> wonder why it's now passing 4 args when 3 are expected
21:52:09  <andythenorth> doesn't like the "s.tnml" much
21:55:46  <brendan10211> http://winhelp2002.mvps.org/hosts.htm
21:56:20  *** mouseym [~clum@host-92-3-230-253.as43234.net] has quit [Quit: Lost terminal]
21:57:40  <brendan10211> ^
21:57:41  <brendan10211> |
21:57:42  <brendan10211> epic
21:58:20  *** neli [micha@154-238.ftth.onsbrabantnet.nl] has joined #openttd
21:59:40  *** Chris_Booth [~chatzilla@client-86-31-5-205.midd.adsl.virginmedia.com] has joined #openttd
22:00:33  <Eddi|zuHause> am i reading this right that devzone takes 14 minutes to build CETS?
22:01:51  <Terkhen> good night
22:03:19  <brendan10211> night
22:06:50  <andythenorth> frosch123: \o/
22:06:52  <andythenorth> eventually :)
22:07:59  <frosch123> :p
22:09:31  <andythenorth> what a large number of LOC to do something quite simple :)
22:10:43  *** Neon [~Neon@dslb-094-219-020-078.pools.arcor-ip.net] has quit [Quit: Python is way too complicated... I prefer doing it quickly in C.]
22:13:46  *** Lakie [~Lakie@host81-141-98-103.wlms-broadband.com] has quit [Quit: Sleep.]
22:22:03  *** Chris_Booth [~chatzilla@client-86-31-5-205.midd.adsl.virginmedia.com] has quit [Quit: ChatZilla 0.9.88 [Firefox 10.0/20120104111456]]
22:22:46  <brendan10211> :P
22:28:13  *** snack2 [~nn@dsl-prvbrasgw1-fe05dc00-37.dhcp.inet.fi] has quit []
22:39:22  <andythenorth> good night
22:39:23  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has quit [Quit: andythenorth]
22:39:41  *** FLHerne [~francis_h@dsl-217-155-24-22.zen.co.uk] has left #openttd []
22:40:04  *** Alberth [~hat@a82-95-164-127.adsl.xs4all.nl] has left #openttd []
22:41:22  *** MJP [~TdlQ@hq.z77.fr] has quit [Ping timeout: 480 seconds]
22:51:06  *** Rezt [~Rezt@81-178-198-172.dsl.pipex.com] has joined #openttd
22:51:32  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has joined #openttd
22:53:24  *** andythenorth [~Andy@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has quit []
22:53:31  *** KouDy [~KouDy@188.75.190.58] has quit [Quit: Leaving.]
22:54:14  *** DDR [~DDR@142.179.78.88] has joined #openttd
23:01:01  *** TGYoshi [~TGYoshi@86.81.146.146] has quit [Quit: Popidopidopido]
23:01:50  *** KritiK [~Maxim@93-80-80-172.broadband.corbina.ru] has quit [Quit: Leaving]
23:05:38  *** pjpe [ade6a119@ircip1.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
23:11:45  <frosch123> night
23:11:48  *** frosch123 [~frosch@frnk-590d5e87.pool.mediaWays.net] has quit [Remote host closed the connection]
23:18:47  *** Brianetta [~brian@188-220-91-30.zone11.bethere.co.uk] has joined #openttd
23:22:23  <appe_> im having trouble setting up a normal server on windows 7
23:22:36  <appe_> ports are forwarded, server started, lan games work.
23:22:42  <appe_> wan game doesnt.
23:23:08  <appe_> firewall is completely turned of, and when i try to connect it gives me "server closed"
23:23:12  <appe_> any ideas what i can try?
23:29:22  <glx> can you see your server on servers.openttd.org ?
23:30:39  <glx> do you see it in ingame list ?
23:31:36  <appe_> let's see
23:33:50  <planetmaker> and what about the firewall of your modem / router?
23:34:09  <planetmaker> with respect to incoming and packet types udp and tcp?
23:34:13  <glx> planetmaker: that was the next point ;)
23:34:19  <planetmaker> I know :-)
23:34:23  <planetmaker> that you know
23:34:24  <appe_> i cant see it in the list no.
23:34:46  <appe_> and, i have forwarded the two ports
23:34:52  <appe_> both udp+tcp
23:35:11  <planetmaker> it's usually one of the two firewalls people usually have. Or they only forward one packet type but disallow the other or so
23:35:22  *** DDR [~DDR@142.179.78.88] has quit [Quit: In democracy it's your vote that counts; In feudalism it's your count that votes.   - Mogens Jallberg]
23:35:52  *** JVassie [~James@2.25.209.230] has quit [Ping timeout: 480 seconds]
23:35:53  *** Devroush [~dennis@178-119-153-135.access.telenet.be] has quit []
23:35:55  <planetmaker> and your cfg tells openttd to also use the two ports you forward, yes?
23:36:36  <appe_> yes, i just re-checked it
23:36:40  <appe_> re-trying.
23:36:57  <planetmaker> well. you can always check servers.openttd.org
23:37:03  <planetmaker> if it shows there, it should work
23:37:04  <Eddi|zuHause> anyone ever considered implementing distinction in the content download for "not installed" vs. "installed, but outdated" and "not installed, to be installed" vs. "outdated, to be upgraded"
23:37:16  <appe_> 83.227.118.129
23:37:20  <appe_> on 3979
23:38:11  <appe_> its a simple win7 os, no firewall enables (nor AV).
23:38:20  <planetmaker> Eddi|zuHause: yes
23:38:32  <planetmaker> you can "select upgrades"
23:38:40  <Eddi|zuHause> planetmaker: i mean visually
23:38:51  *** DDR [~chatzilla@142.179.78.88] has joined #openttd
23:38:58  <Eddi|zuHause> as in the icons (green blob vs. checkbox)
23:39:40  <appe_> hm
23:39:41  <appe_> bah!
23:40:14  <Eddi|zuHause> planetmaker: like: "outdated" -> yellow blob, "outdated, to be upgraded" -> yellow blob with green check
23:40:19  <appe_> :(
23:40:41  <glx> appe_: start it with -d net1
23:40:52  <appe_> where?
23:41:02  <Eddi|zuHause> appe_: from the command line
23:41:11  <appe_> oh, i should say, im starting the server dedicated
23:41:28  <glx> then it already have -d net1 :)
23:41:33  <Eddi|zuHause> that should enable -d net=2 automatically
23:41:38  <appe_> yes, not "net1" though
23:41:44  <appe_> i only used "-D"
23:41:54  <Eddi|zuHause> -D implies -d net=2
23:41:55  <appe_> in the ..shortcut
23:41:57  <appe_> ah, ok
23:42:18  <glx> so you should see lines saying "advertising..."
23:42:27  <appe_> in the cmd window?
23:42:29  <appe_> let's see
23:42:47  <Eddi|zuHause> you can select and copy everything in the cmd window
23:43:00  <appe_> apparently not
23:43:04  <appe_> bah, hold on
23:43:35  *** kkb110__ [~kkb110@cpe-69-203-124-125.nyc.res.rr.com] has joined #openttd
23:43:46  <Xaroth> don't paste here -_-
23:43:53  <Xaroth> dump it on pastebin or so
23:43:57  *** kkb110_ [~kkb110@cpe-69-203-124-125.nyc.res.rr.com] has quit [Remote host closed the connection]
23:43:57  *** kkb110__ [~kkb110@cpe-69-203-124-125.nyc.res.rr.com] has quit [Read error: Connection reset by peer]
23:44:05  <appe_> there we are
23:44:06  <Xaroth> DorpsGek doesn't like people pasting crap
23:44:09  <appe_> yes, of course.
23:44:26  *** kkb110_ [~kkb110@cpe-69-203-124-125.nyc.res.rr.com] has joined #openttd
23:44:34  <appe_> http://pastebin.com/3Ze34Wsn
23:45:00  <Xaroth> netstat -ano ?
23:45:11  <appe_> ?
23:45:13  <Eddi|zuHause> there's nothing about advertising there
23:45:14  <Xaroth> does it list a port 3979 in the list
23:45:23  <appe_> oh, let's see
23:45:29  <Xaroth> Eddi|zuHause: that fix is easy :P
23:46:25  <glx> appe_: how is server_advertise in openttd.cfg ?
23:46:31  <appe_> Xaroth: i find "listening" on 0.0.0.0:3979
23:46:35  <appe_> let's see
23:46:36  <Xaroth> appe_: open your openttd.cfg
23:46:41  <appe_> what is the default value?
23:46:43  <Xaroth> and check for lan_internet (tell us its value)
23:46:50  <appe_> lan_internet is "0"
23:46:53  <appe_> and unchanged.
23:46:56  <glx> Xaroth: totally unrelated ;)
23:47:14  <Xaroth> glx: just comparing to my 'working' config
23:47:21  <Xaroth> which has lan_internet 1
23:47:22  <appe_> oooh.
23:47:24  <Xaroth> don't care if it's related or not
23:47:25  <glx> lan_internet is for the client
23:47:26  *** sla_ro|master [~slaco@95.76.26.172] has quit [Quit: Sla Mutant Co-Op for Renegade - coming back soon]
23:47:27  <appe_> server advertise is "false"
23:47:31  <Xaroth> appe_: bingo
23:47:46  <appe_> i guess ill change that to "true"? :)
23:47:50  <glx> yup
23:47:53  <Xaroth> correct
23:47:57  <appe_> but
23:47:58  <appe_> hold on
23:48:14  <appe_> the feature name imply that it should still work, if i have the ip?
23:48:22  <glx> yes
23:48:24  <planetmaker> yes. But no one will know
23:48:32  <appe_> well, that wont do the trick, then.
23:48:41  <glx> but it's easier to check setup that way
23:48:41  <planetmaker> without advertisement that is
23:48:47  <appe_> im logging in remotely on a work computer, trying to connect to my own server.
23:48:49  <appe_> ah, ok.
23:48:52  <appe_> let's see then.
23:49:38  <appe_> well, it's on now.
23:49:49  <brendan10211> hrrmm
23:50:01  <appe_> wanna have a go? 83.227.118.129
23:50:03  <appe_> :)
23:50:11  <appe_> oh, wait
23:50:18  <appe_> server window talking 'bout advertising
23:50:25  <glx> so now you gave [udp] advertising to master server
23:51:45  <appe_> ah, let's see, it gave me a message: "we are not receiving the acknowledgement from the server ../.. please allow udp and tcp packets to port 3979"
23:52:01  <appe_> alright, so something fishy is up with my router, it seems.
23:53:36  <appe_> oh, wait what
23:54:01  <Xaroth> port forwarding :)
23:54:16  <Xaroth> port 3979 both tcp and udp should forward to the machine you're running it on
23:54:33  <appe_> sweet jesus, it works.
23:54:59  <appe_> the problem was me - trying to port forward a range in a one-number port forward feature
23:55:03  <appe_> with ddwrt
23:55:06  <appe_> thats sloppy networking for you
23:55:13  <appe_> cheers, thanks a bunch :)
23:55:36  <glx> once advertising works you are free to disable it :)
23:58:21  <appe_> indeed
23:58:26  <appe_> you saved my night <3.

Powered by YARRSTE version: svn-trunk