Back to Home / #openttd / 2012 / 01 / Prev Day | Next Day
#openttd IRC Logs for 2012-01-10

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