Back to Home / #openttd / 2014 / 07 / Prev Day | Next Day
#openttd IRC Logs for 2014-07-19

---Logopened Sat Jul 19 00:00:59 2014
00:56-!-Eddi|zuHause [~johekr@p5DC670C5.dip0.t-ipconnect.de] has quit []
00:56-!-Eddi|zuHause [~johekr@p5DC6748A.dip0.t-ipconnect.de] has joined #openttd
01:28-!-Flygon_ [~Flygon@147.18.214.218.sta.commander.net.au] has joined #openttd
01:34-!-Flygon [~Flygon@147.18.214.218.sta.commander.net.au] has quit [Ping timeout: 480 seconds]
01:36-!-smb_ [~smb_@199.119.245.122] has joined #openttd
01:51-!-Hazzard [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has quit [Ping timeout: 480 seconds]
01:52-!-LSky` [~LSky@5ED4B2EA.cm-7-5c.dynamic.ziggo.nl] has joined #openttd
02:19-!-shirish_ [~quassel@117.195.109.97] has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
02:20-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has joined #openttd
02:45-!-shirish [~quassel@117.195.109.97] has joined #openttd
02:49-!-HerzogDeXtEr [~flex@88.130.171.0] has joined #openttd
02:50-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
02:50<Wolf01>hello o/
02:55-!-Yotson [~Yotson@2001:980:6ac8:1:3cec:b06c:1c6b:29f1] has joined #openttd
03:02-!-Polleke [~quassel@h220216.upc-h.chello.nl] has joined #openttd
03:04-!-shirish_ [~quassel@59.88.98.197] has joined #openttd
03:06-!-Progman [~progman@p57A1BB79.dip0.t-ipconnect.de] has joined #openttd
03:08-!-bugzee [~bugzee@208.114.86.155] has quit [Read error: Operation timed out]
03:08-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has quit [Ping timeout: 480 seconds]
03:08-!-EyeMWing [~Wing@c-68-33-226-154.hsd1.va.comcast.net] has quit [Read error: Connection reset by peer]
03:10-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has joined #openttd
03:11-!-EyeMWing [~Wing@c-68-33-226-154.hsd1.va.comcast.net] has joined #openttd
03:11-!-shirish [~quassel@0001358e.user.oftc.net] has quit [Ping timeout: 480 seconds]
03:16-!-Polleke [~quassel@h220216.upc-h.chello.nl] has quit [Read error: Operation timed out]
03:17-!-bugzee [~bugzee@208.114.86.155] has joined #openttd
03:48-!-HerzogDeXtEr [~flex@88.130.171.0] has quit [Quit: Leaving.]
04:03-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has quit [Remote host closed the connection]
04:03-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has joined #openttd
04:07-!-smb_ [~smb_@199.119.245.122] has quit [Ping timeout: 480 seconds]
04:08-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has quit [Read error: Connection reset by peer]
04:09-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has joined #openttd
04:18-!-Polleke [~quassel@h220216.upc-h.chello.nl] has joined #openttd
04:20-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has quit [Ping timeout: 480 seconds]
04:27-!-Polleke [~quassel@h220216.upc-h.chello.nl] has quit [Remote host closed the connection]
04:33-!-FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
04:39-!-SylvieLorxu [~sylvie@dhcp-077-251-165-191.chello.nl] has joined #openttd
04:42-!-andythenorth [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has joined #openttd
04:47-!-frosch123 [~frosch@frnk-4d01d786.pool.mediaways.net] has joined #openttd
04:53<andythenorth>o/
05:00<frosch123>hai
05:01<andythenorth>partial compiles :P
05:01<andythenorth>and dep checks
05:02<andythenorth>no point going faster if the result is wrong :P
05:03<andythenorth>can I trust the modification date on a dir to be the date of the last modified file?
05:03<andythenorth>assuming no renames
05:03<andythenorth>or is that only OS X?
05:04<frosch123>no, it only changes if you change the directory entry
05:04<frosch123>modifying files does not change it
05:04<andythenorth>urgh
05:05<frosch123>also it is changed by unrelated files
05:05<andythenorth>that means I have to walk every file in the dir :(
05:05<frosch123>'find' is your friend
05:07<andythenorth>wondering if there’s any problem with using the python equivalent?
05:07<andythenorth>there will be one in os.[something]
05:08-!-MJP [~mjp@hq.z77.fr] has joined #openttd
05:11<andythenorth>hmm
05:11<andythenorth>try / except is kind of deprecated these days?
05:17<andythenorth>L47-54 I’m doing something wrong there
05:17<andythenorth>https://dev.openttdcoop.org/projects/iron-horse/repository/revisions/default/entry/src/render_nml_nfo.py#L45
05:17<andythenorth>it works, but it’s odd
05:18<andythenorth>where are the code police when you need them?
05:18<andythenorth>saturday morning is quiet
05:19*andythenorth removes some if statements
05:22-!-kero [~keikoz@78.250.197.251] has joined #openttd
05:22-!-bdavenport [~davenport@aeolus.mindlesstux.com] has quit [Ping timeout: 480 seconds]
05:30<Xaroth|Work>11:11 < andythenorth> try / except is kind of deprecated these days? << why would that be?
05:33-!-kero [~keikoz@78.250.197.251] has quit [Ping timeout: 480 seconds]
05:35-!-Alberth [~hat@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
05:35-!-mode/#openttd [+o Alberth] by ChanServ
05:36-!-sla_ro|master [slamaster@89.137.74.191] has joined #openttd
05:40<andythenorth>Xaroth|Work: don’t swallow errors
05:40<andythenorth>it’s usually being used by inexperienced coders who don’t then raise on the except
05:48-!-Yotson [~Yotson@2001:980:6ac8:1:3cec:b06c:1c6b:29f1] has quit [Quit: .]
05:49<andythenorth>lo Alberth
05:50<@Alberth>hi hi
05:58-!-kero [~keikoz@78.250.221.235] has joined #openttd
06:10-!-kero [~keikoz@78.250.221.235] has quit [Ping timeout: 480 seconds]
06:11-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has quit [Remote host closed the connection]
06:11-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has joined #openttd
06:24-!-kero [~keikoz@78.250.221.235] has joined #openttd
06:53<Xaroth|Work>andythenorth: exceptions should be swallowed where applicable; it'd be a bit harsh if you had to re-raise every ValueError you get after you int(user_input) ...
06:54<andythenorth>my experience is that using try/except as a conditional block causes errors to be swallowed in production
06:54<andythenorth>10 years ago there was lot of stuff about using try/except for type checking (for example)
06:55<Eddi|zuHause>that's when you catch more than you actually handle in the except
06:55<Eddi|zuHause>then it goes bad
06:55<Eddi|zuHause>like all other language features, it can be used in good and bad ways
07:32-!-Supercheese [~Superchee@76.178.136.186] has quit [Read error: Connection reset by peer]
07:32-!-Supercheese [~Superchee@76.178.136.186] has joined #openttd
07:36*andythenorth needs to fix a bloody auto-replace bug in Iron Horse
07:36<andythenorth>:|
07:38<andythenorth>some vehicle types replace fine
07:38<andythenorth>others don't
07:38<andythenorth>just refuse
07:39<andythenorth>also for some reason passenger cars can be replaced by refrigerated cars :P
07:42-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has quit [Ping timeout: 480 seconds]
07:42-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has joined #openttd
07:43<andythenorth>default cargo PASS on lead unit of articulated consist :P
07:43<andythenorth>shenanigans
07:46<@peter1138>clearly we need cargo ANDY
07:46<andythenorth>ho ho ho
07:49-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has quit [Quit: ZNC - http://znc.in]
08:04<andythenorth>bloody caboose wagons
08:05<andythenorth>I need them to be auto-replaceable
08:05<andythenorth>but they have zero capacity
08:05<andythenorth>it’s a PITA :)
08:09<@Alberth>perhaps this issue? http://www.tt-forums.net/viewtopic.php?p=1126246#p1126246
08:09<andythenorth>nah :)
08:09<@Alberth>kk
08:09<andythenorth>it’s the infamous frosch123 cargo refit diagram
08:09<andythenorth>auto-replace will only work if there’s a valid refit
08:10<andythenorth>and ther refit is determined by capacity + refittability + ???
08:10<andythenorth>sacrificing chickens afaict
08:10<NGC3982>You can be infamous.
08:10<andythenorth>afaict it’s impossible to make a train wagon which is replaceable by ${any other train in the game}
08:12<andythenorth>hmm
08:13<andythenorth>it does work if the caboose is refitted first to appropriate cargo
08:13<andythenorth>so to replace with tanker, first refit oil
08:13<andythenorth>etc
08:13<andythenorth>meh
08:15<andythenorth>if we had consist management, I could ignore this :D
08:16<andythenorth>hmm
08:16<andythenorth>or I just ship the fix I found :P
08:17-!-tommylommykins [~t@ks362631.kimsufi.com] has left #openttd []
08:18-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has quit [Remote host closed the connection]
08:18-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has joined #openttd
08:31<andythenorth>bah not a fix
08:31<andythenorth>boring
08:38-!-luaduck_zzz is now known as luaduck
09:12-!-HerzogDeXtEr [~flex@88.130.171.0] has joined #openttd
09:16-!-kero [~keikoz@78.250.221.235] has quit [Ping timeout: 480 seconds]
09:24<Eddi|zuHause>i think you're trying to make autoreplace do something it never was intended to do. why do that?
09:25<Eddi|zuHause>autoreplace only ever was meant to replace a wagon with the same kind of wagon. so you can only make cabooses be replaced by other cabooses
09:29<andythenorth>I’m trying to do it because otherwise replacing cabooses is a PITA
09:29<andythenorth>maybe cabooses are a PITA full stop
09:31<andythenorth>BAD FEATURE
09:32<@Alberth>it's bad enough that you need an engine that cannot haul coal :p
09:33<@Alberth>such a waste of 1/2 a tile :)
09:41-!-Progman [~progman@p57A1BB79.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
09:47<@peter1138>Just make everything refittable to anything.
09:55<FLHerne>Just have one vehicle, that runs on all tracks, refits to every cargo, and increases max speed/power/capacity based on date :P
09:56<andythenorth>NUTS
09:56<andythenorth>!
09:56<andythenorth>also
09:56<andythenorth>is livery over-ride a thing, and is it in nml?
09:56<andythenorth>or is it bollocks?
09:56<andythenorth>I could implement my own version
09:59<V453000>it is there but I dont think it is useful for anything except maybe some hack with powered wagons
09:59<V453000>you can just change sprites based on vehicle_type_id with a switch
10:02<andythenorth>yair
10:04-!-kero [~keikoz@78.250.199.92] has joined #openttd
10:06<V453000>btw FUCK YES, I managed to cut my sprites in after effects :>
10:06<V453000>no more NML cutting bullshit and overlapping
10:07<V453000>just needed photoshop masks for precision :>
10:13-!-kero_ [~keikoz@78.250.199.92] has joined #openttd
10:14<Eddi|zuHause>aw man, it's not enough anymore that Alberth and V453000 have the same colour and same length, now they're also saying the same kind of stuff...
10:14-!-kero [~keikoz@78.250.199.92] has quit [Ping timeout: 480 seconds]
10:14<V453000>wat
10:14<@Alberth>wta
10:15<@Alberth>V doesn't do 1/2 tiles
10:15<Eddi|zuHause>yes, that part should have made me suspicious :p
10:15<V453000>I just started doing them Alberth :|
10:15<@Alberth>:D
10:16<V453000>https://dl.dropboxusercontent.com/u/20419525/CUT_SCHEME_X.png 1,0 and 0,1 :P
10:16<Eddi|zuHause>tbh, colour trumps everything. length i hardly notice
10:18<@Alberth>ha yes, I wondered about the left of 2,0, but that wouldn't work of course
10:20<Eddi|zuHause>that looks weird, but i guess it has some kind of logic behind it
10:21<Eddi|zuHause>may have strange effects during construction stages
10:21<Eddi|zuHause>as each industrytile may be in a different stage
10:21<V453000>it has a lot of logic, otherwise you would either get overlaps (which I do now and it costs 2x more space) ... or you would have to not define some things
10:21<V453000>ha
10:21<V453000>:D :)
10:23<Eddi|zuHause>sure, but lots of other ways of cutting things would get you this effect
10:24<V453000>mhm :) well I hope this way I chose will be good :P
10:24<Eddi|zuHause>for example doing 1,0 and 2,0 the same way as 3,0
10:24<V453000>hm yeah that is a possibility
10:24<Eddi|zuHause>(that would also easily scale further)
10:25<V453000>yeah I guess that is a good suggestion :)
10:26<V453000>going to do that
10:29<frosch123>hmm, spam getting better again :)
10:40-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
10:45<Eddi|zuHause>if anything is pushing the development of artificial intelligence, it's spam :p
10:51<andythenorth>new Iron Horse
10:51<andythenorth>spam that
10:51<andythenorth>alpha-6 now on bannaanananananns
10:53<V453000>why do you call it alpha when you are going to abandon it before 1.0 anyway? :P
10:53<V453000>:D cruel
10:54<andythenorth>shouldn’t happen to a horse
10:55<andythenorth>take it out and shoot it :P
10:58<V453000>:D
10:58<V453000>ok so no dying announcements
10:59<V453000>now Horsie goes to the salam
10:59<V453000>way to go andythenorth
11:03-!-andythenorth [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has quit [Ping timeout: 480 seconds]
11:03-!-andythenorth [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has joined #openttd
11:04<Eddi|zuHause>horse-salami?
11:04<andythenorth>it’s very unfair, the amount I get trolled
11:04<Eddi|zuHause>what happened to all the horse-lasagna anyway?
11:04*andythenorth never trolls anyone
11:05<V453000>LOL
11:05<andythenorth>LOLWUT
11:06<Eddi|zuHause>is "lolwut" any kind of related to "tollwut"?
11:07<andythenorth>probably
11:07<Eddi|zuHause>(tollwut = rabies)
11:07<V453000>I WIN BITCHES :D https://dl.dropboxusercontent.com/u/20419525/industry_3X_f0000.png
11:07<V453000>404 probably
11:07<Eddi|zuHause>yeah
11:07<Eddi|zuHause>BICHES!
11:07*andythenorth BEACHES!
11:08*andythenorth is bored of typing “make COMPILE_FASTER=True”
11:08<andythenorth>maybe I’ll shorten it :P
11:08<SpComb>make CC=distcc
11:08<SpComb>make CC=distcc -j 9001
11:09<andythenorth>yeah, that assumes I did things properly
11:09<V453000>LOL
11:09<andythenorth>“at least 9,000 threads"
11:09<V453000>shouldnt make better be like default? :P
11:09<andythenorth>no
11:09<andythenorth>the dependency check is totally untrustworthy
11:10<andythenorth>you should only use ‘faster’ when you know it’s safe
11:10<andythenorth>it’s great, this system of mine
11:11<Eddi|zuHause>andythenorth: "export COMPILE_FASTER=True"
11:12<Eddi|zuHause>SpComb: it's over 9000
11:13<andythenorth>and then just flip it when I want to compile better?
11:13<andythenorth>tbh a make clean has the same effect of forcing full compile
11:13<Eddi|zuHause>compile from a different terminal
11:13<Eddi|zuHause>force a full compile with "make -B"
11:14<andythenorth>-B is ?
11:14<andythenorth>I googled it but just got spurious results
11:15<frosch123>man make
11:18<Eddi|zuHause>you can't google for "-B"
11:18<Eddi|zuHause>it means "all results that do not contain B"
11:19<frosch123>since when does google care about what you type exactly?
11:20<Eddi|zuHause>andythenorth: also, i generally type "m[PgUp]" to get the last parameters i typed
11:21<Eddi|zuHause>frosch123: in all likelyhood, it just ignores the bit because it's too short
11:26<@Alberth>!m using the history :)
11:27-!-andythenorth [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has quit [Quit: andythenorth]
11:31<frosch123>! always scares me
11:31<frosch123>sometimes you get something unexpected :)
11:38<@peter1138>event not found
11:38<Eddi|zuHause>i have never figured out what ! does in bash
11:43<@planetmaker>hi ho
11:45<@Alberth>type 'history', !<prefix> searches back in the list, and executes the first matching line
11:46<@Alberth>hi hi
11:47<@Alberth>the scary part is that by default bash saves the history, so if your first command is a !, it executes a line from the previous session
11:48<@Alberth>saving that didn't strike me as a sane idea, so I disabled that very quickly :)
11:50<Eddi|zuHause>i always save history. sometimes i wonder "how did you do this half a year ago?"
11:51<@Alberth>I make "./mk" scripts, or a Makefile to keep that information
11:51-!-Jinassi [~Jinassi@0001ec72.user.oftc.net] has quit []
11:51<@planetmaker>would it make sense to start a library of free textures? Like licensed CC-BY-SA or GPL v2+ (whatever you like)?
11:51<@Alberth>also saves typing the command each time :)
11:51<Eddi|zuHause>Alberth: sometimes i didn't know half a year ago that i would need this again
11:51<@Alberth>planetmaker: wouldn't that exist already?
11:51<@peter1138>I tend to just use ^R to redo something
11:52<@planetmaker>partially it sure exist
11:53<Eddi|zuHause>planetmaker: i'm pretty sure i have seen stuff like "cargo graphics" library
11:53<@planetmaker>I've seen many libraries. Most I've seen have no free licenses
11:53<@planetmaker>but something weired usually
11:53<@planetmaker>like cgtextures
11:54<Eddi|zuHause>i have no particular interest in this stuff currently, anyway
11:55-!-kero_ [~keikoz@78.250.199.92] has quit [Ping timeout: 480 seconds]
11:58-!-andythenorth [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has joined #openttd
12:03-!-bugzee [~bugzee@208.114.86.155] has quit [Quit: Leaving.]
12:10-!-Yotson [~Yotson@92.66.58.22] has joined #openttd
12:18<andythenorth>so how do I call CPP on a bunch of files? :P
12:19<frosch123>%.nml: %.pnml\n\t${CPP} -E -o $@ $<
12:22<andythenorth>yay
12:22<andythenorth>very obvious :)
12:23<andythenorth>so I have a generated/pnml/ dir full of .pnml
12:24<andythenorth>and I need a generated/nml dir full of .nml
12:24<andythenorth>the .nml dir needs creating
12:24-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
12:24<frosch123>generated/nml/%.nml: generated/pnml/%.pnml ....
12:24<andythenorth>do I do this in Makefile, or Makefile.in?
12:25<frosch123>i didn't write your makefiles :)
12:25<andythenorth>I had better go read the Makefile tutorial again
12:25<andythenorth>I just don’t get it
12:29<@peter1138>phew, so hot...
12:29<juzza1>if you are using make-nml, it has the same effect in Makefile and Makefile.in
12:29<juzza1>as the main Makefile just includes Makefile.in
12:29<andythenorth>I have some old outdated and non-supported Makefile
12:30<@planetmaker>hot... yes... 35+°C here
12:30<andythenorth>:o
12:30<@planetmaker>bit cooler inside, luckily
12:33<@peter1138>Merely 24°C here, apparently. Feels scorching though.
12:34<andythenorth>scorchio
12:35<andythenorth>humidity
12:35*andythenorth is in Wales, Wales is hot
12:35<andythenorth>if I do this FIRS compile in python, that’s wrong, yes?
12:38<andythenorth>what does this mean?
12:38<andythenorth>nml: $(GENERATE_PNML)
12:38<andythenorth> $(_E) "[CPP] $(NML_FILE)"
12:38<andythenorth> $(_V) $(CC) -D REPO_REVISION=$(NEWGRF_VERSION) $(CC_FLAGS) -o $(NML_FILE) $(MAIN_SRC_FILE)
12:42<frosch123>_E is most likely a variable for "echo"
12:42<frosch123>i.e. spam
12:42<@planetmaker>target nml depends on target GENERATE_PNML
12:42<frosch123>"_V" is most likely a variable for "verbose output"
12:42<@planetmaker>_E is an alias for echo
12:42-!-Hazzard [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has joined #openttd
12:42<@planetmaker>_V for verbose
12:42<@planetmaker>thus:
12:42<@planetmaker>echo "cpp $NML_FILE"
12:43<@planetmaker>CC -D REPO_REVISION=... $CC_FLAGS -o $NML_FILE $MAIN_SRC_FILE
12:43<@planetmaker>where $NML_FILE is firs.nml
12:43<@planetmaker>MAIN_SRC_FILE is firs.pnml
12:43<@planetmaker>CC_FLAGS something defined above. Like -E --no-c-headers
12:44<@planetmaker>or similar
12:44<andythenorth>and this?
12:44<andythenorth>GENERATE_PNML ?= pnml
12:45<@planetmaker>ignore the ?
12:45<@planetmaker>(?= means: define only if not yet defined)
12:48<@planetmaker>basically: nml: $(GENERATE_PNML) means: generate the nml (as defined below) after you generated the pnml
12:49<andythenorth>so that is what I want to change
12:49<@planetmaker>and the pnml step is what you fill in with your python scripts
12:49-!-kero [~keikoz@78.250.200.34] has joined #openttd
12:49<andythenorth>so afaict, currently the compile depends on firs.pnml
12:50<andythenorth>which then #includes everything else
12:50<andythenorth>instead it needs to call cpp for each pnml file, producing an nml file
12:51<andythenorth>then nmlc needs to render each nml file to nfo
12:51<andythenorth>then the nfo needs concatenating and junk splitting out
12:51<andythenorth>then nforenum and grfcodec need calling
12:53<@planetmaker>easiest is: re-define $GENERATE_NML and $GENERATE_PNML to your own targets. And there define what needs doing
12:53<@planetmaker>and possibly also $GENERATE_GRF as your own
12:53<@planetmaker>then you can keep Makefile unchanged basically (and its build rules will be ignored and the one from Makefile.in will be used
12:56<Eddi|zuHause>andythenorth: if at all possible, only modify Makefile.in. should the makefile ever be updated, it causes the least conflicts
12:56<andythenorth>so how is a -include handled?
12:56<andythenorth>does it just over-write any existing variable definitions, etc
12:56<andythenorth>?
12:57<Eddi|zuHause>yes
12:57<Eddi|zuHause>"-" says "ignore if not exists"
12:57<andythenorth>ok, so it’s like every other include system in the world :P
12:57<@planetmaker>yes, as it's included after Makefile's definitions. Also thus: the $GENERATE_XXX targets. There's XXX=PNML, NML, LANG, GRF iirc.
12:57<Eddi|zuHause>some variables get added to, instead of overwritten
12:58<Eddi|zuHause>you usually see that with "XXX_FLAGS"
12:58<andythenorth>so I can’t find the rules for $GENERATE_NML
12:58<andythenorth>it just resolves to nml
12:59<andythenorth>oh that depends on pnml
12:59<andythenorth>which has no rules
12:59<@planetmaker>yeah
12:59<@planetmaker>but nml has rules
12:59<andythenorth>oh GENERATE_PNML rules are in Makefile.n
12:59<andythenorth>.in *
12:59<@planetmaker>that's your own rules
12:59<@planetmaker>specific for firs
12:59<andythenorth>but that uses the the bizarre .PHONY thing
13:00<@planetmaker>I added generate_pnml only for you :P
13:00<andythenorth>he :)
13:00<@planetmaker>phony means 'is no real file'
13:00<Eddi|zuHause>andythenorth: when something has no rules, it's assumed to be a file existing on the repo
13:00<andythenorth>ok
13:00<Eddi|zuHause>andythenorth: don't use .PHONY
13:01<andythenorth>Eddi|zuHause: https://dev.openttdcoop.org/projects/firs/repository/entry/Makefile.in
13:01<andythenorth>maybe I’m going about this wrong
13:02<@Alberth>unless you use autotools, the filename looks wrong :p
13:02<andythenorth>currently the python stuff renders all industries in one pass
13:02<andythenorth>and header stuff
13:02<andythenorth>it needs to render just a single .pnml file for each call
13:02<andythenorth>how do I pass it the filename?
13:02<andythenorth>if I clean up the existing python, maybe I learn enough make
13:03<@Alberth>sys.argv gives the provided command arguments
13:03<andythenorth>oh I use that already :)
13:03<Eddi|zuHause>andythenorth: you should probably just change that to "firs.pnml"
13:03<andythenorth>Eddi|zuHause: let’s try that....
13:03<@Alberth>there are a few libraries for parsing sys.argv
13:03<Eddi|zuHause>as that is (one of) the files you create in that recipe
13:03*andythenorth has to do something other than stare at $ % ?
13:04<@Alberth>cook me some dinner?
13:05<andythenorth>long distance?
13:05<Eddi|zuHause>sudo cook me some dinner!
13:05<andythenorth>http://www.justeat.nl ?
13:05<andythenorth>http://www.just-eat.com
13:07<andythenorth>hmm
13:07<@Alberth>$% The target member name, when the target is an archive member ... <-- looks like the wrong one
13:07<andythenorth>GENERATE_PNML doesn’t get called http://paste.openttdcoop.org/show/3514/
13:08<@Alberth>$@ is a better target
13:08<andythenorth>makefile tries to straight away call firs.nml
13:08<andythenorth>so no pnml exists
13:08<@Alberth>or no rule to build it
13:09<andythenorth>how will make find it on disk?
13:09<andythenorth>it doesn’t exist yet
13:09*andythenorth remains confused :P
13:11<andythenorth>do I have to give the path to firs.pnml?
13:11<andythenorth>oh I made it work maybe :O
13:11<andythenorth>order of rules is significant?
13:12<Eddi|zuHause># eis eis tonne
13:12<@Alberth>not really, except the first one, as that is the default target
13:13<andythenorth>hrm
13:13<andythenorth>this is copying generated/pnml/firs.pnml to firs.pnml
13:13<andythenorth>looks ugly
13:13*andythenorth waits 3 minutes to see if make completes
13:13<Eddi|zuHause>andythenorth: if firs.nml doesn't first call firs.pnml, then you forgot the dependency
13:14<andythenorth>one tiny step at a time :(
13:14<andythenorth>let’s see if it worked
13:14<andythenorth>so slow
13:14-!-smb_ [~smb_@199.119.245.122] has joined #openttd
13:16<andythenorth>Eddi|zuHause: better? https://dev.openttdcoop.org/projects/firs/repository/revisions/35038ae89eb9/diff/Makefile.in
13:16<@planetmaker>andythenorth, pnml must not depend on firs.pnml
13:16<andythenorth>oh
13:16<@planetmaker>it *generates* firs.pnml
13:16-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has quit [Remote host closed the connection]
13:17<@planetmaker>but as-is, that step is simply skipped if firs.pnml exists
13:17-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has joined #openttd
13:17<@planetmaker>a result never must depend on what it generates
13:17<andythenorth>oh
13:17<andythenorth>I thought I’d made progress :P
13:18<@planetmaker>pnml does not have any dependencies. unless you want to list all your source files
13:18<andythenorth>yeah, I’ve no idea how to do that
13:19<Eddi|zuHause>the generator script should generate these dependencies
13:19<andythenorth>but it needs doing
13:19<Eddi|zuHause>write them into firs.src.dep
13:19*andythenorth is confused why the last commit works at all
13:19<andythenorth>it’s backwards
13:20<Eddi|zuHause>andythenorth: anyway, firs.pnml should be the target, not the dependency
13:20-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
13:20-!-mode/#openttd [+v glx] by ChanServ
13:20<@planetmaker>it worked on CF as firs.pnml did not exist (yet)
13:20<andythenorth>Eddi|zuHause: firs.pnml: pnml
13:20<andythenorth>?
13:20<@planetmaker>no...
13:20<@Alberth>"pnml" is a source file?
13:21<andythenorth>target?
13:21<@planetmaker>pnml is a pseudo-rule. you should not use pnml at all
13:21<Eddi|zuHause>firs.pnml: $(ALL_GENERATOR_PY_FILES)
13:21<@Alberth>andythenorth: target: source-list
13:21<@planetmaker>you should redefine $GENERATE_PNML to something you like
13:21<@planetmaker>GENERATE_PNML = my_pnml_generateor
13:21<@planetmaker>my_pnml_generator: firs.pnml
13:21<@Alberth>planetmaker: $(GENERATE_PNML)
13:21<Eddi|zuHause>planetmaker: that's basically the opposite of what i previously said
13:22<andythenorth>isn’t that ass backwards?
13:22<@planetmaker>firs.pnml:\n\tcall to python script which generates it
13:22<andythenorth>I am reading a tutorial that says outut_file: input_file
13:22-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has joined #openttd
13:22<@planetmaker>Eddi|zuHause, maybe it is. Doesn't make it wrong what I say. But yours ;)
13:22<@planetmaker>though there are many paths to get it going
13:22<andythenorth>so the python script call is already in the rules
13:22<andythenorth>how do I make it instead the input file?
13:23<Eddi|zuHause>planetmaker: PHONY targets are bad, because make cannot figure out whether it should skip them.
13:23<Eddi|zuHause>andythenorth: just add it behind the : as dependency. leave the command in the recipe like it is
13:23<andythenorth>? http://paste.openttdcoop.org/show/3515/
13:24<Eddi|zuHause>no
13:24<@planetmaker>you shouldn't re-define ${GENERATE_PNML}
13:24<Eddi|zuHause>leave all lines in the recipe intact
13:24<Eddi|zuHause>just ADD things
13:24<Eddi|zuHause>do not MOVE things
13:25<andythenorth>hrm
13:25<@planetmaker>revert Makefile
13:25<@planetmaker>in Makefile.in:
13:25<andythenorth>it’s surprising how many of these bad things actually work :P
13:25<@planetmaker>GENERATE_NML = my_nml
13:25<andythenorth>another totally wrong version just compiled the pnml
13:25<@planetmaker>my_nml: ...
13:25<@planetmaker>and start from there to add your own stuff
13:26<@planetmaker>and / or define a new GENERATE_PNML, too
13:26<andythenorth>this apparently works http://paste.openttdcoop.org/show/3516/
13:27<andythenorth>but substituting GENERATE_PNML for pnml does not
13:27<@planetmaker>I wonder that it works. Might be random
13:27<andythenorth>Makefile is unchanged btw
13:27<@planetmaker>GENERATE_PNML = my_pnml
13:28<andythenorth>I’m only doing Makefile.in
13:28<@planetmaker>my_pnml: scripts/preprocess.py
13:28<@planetmaker>...
13:28<@planetmaker>then I would expect it to work and not bork for double declaration :)
13:28<Eddi|zuHause>planetmaker: again. i think phony targets are to be avoided
13:28<Eddi|zuHause>planetmaker: only use targets that are real files
13:28<@planetmaker>ceterum censeo carthaginem esse delendam.
13:28<andythenorth>this works http://paste.openttdcoop.org/show/3517/
13:29<Eddi|zuHause>gesundeit
13:29<Eddi|zuHause>andythenorth: now i would replace all occurances of my_pnml with firs.pnml
13:30<@planetmaker>and eddi wants s/my_pnml/firs.pnml/ - which might also work. But imho doesn't offer much gain
13:30<Eddi|zuHause>planetmaker: it does. it allows make to figure out "this hasn't been changed. skip it"
13:30<andythenorth>I love it when we differ :)
13:30<andythenorth>makes learning much easier
13:31<Eddi|zuHause>it can't do that with a phony target, because there is no timestamp. so phony targets are always forced to execute
13:32<andythenorth>ok so currently I have my own dep checks in python that might negate that issue
13:32<andythenorth>but they should get rmed
13:33-!-pthagnar [~pthagnar@cpc7-pres17-2-0-cust28.18-3.cable.virginm.net] has quit [Quit: Leaving]
13:33<Eddi|zuHause>unrelated: "$(_V)-rm -rf $(NML_FILE)a" <-- what does that do?
13:35<andythenorth>can I stop mv-ing firs.pnml to repo root?
13:35<andythenorth>and just provide the proper path to it instead?
13:35<andythenorth>I don’t actually want it at all in long-term, but one change at a time
13:36-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
13:37-!-Yotson [~Yotson@92.66.58.22] has quit [Quit: .]
13:37-!-kero [~keikoz@78.250.200.34] has quit [Ping timeout: 480 seconds]
13:38-!-trendynick [~trendynic@188.26.254.160] has quit [Ping timeout: 480 seconds]
13:38<Eddi|zuHause>MAIN_SRC_FILE := $(BASE_FILENAME).pnml <-- probably should become generated/firs.pnml
13:38<Eddi|zuHause>but that may cause trouble further down
13:39<andythenorth>can I use that as the dep against the GENERATE_PNML target?
13:39<andythenorth>although there will eventually be no MAIN_SRC_FILE
13:39<Eddi|zuHause>no. it must pass this pathname to nmlc and stuff
13:40<Eddi|zuHause>$(_V) $(CC) -D REPO_REVISION=$(NEWGRF_VERSION) $(CC_FLAGS) -o $(NML_FILE) $(MAIN_SRC_FILE)
13:40<Eddi|zuHause>this line creates firs.nml from firs.pnml
13:41<Eddi|zuHause>you want this to create firs.nml from generated/firs.pnml
13:41<Eddi|zuHause>maybe you also want generated/firs.nml
13:41<Eddi|zuHause>then adjust NML_FILE also
13:41<andythenorth>ok
13:41<andythenorth>I want to end up with generated/firs.nfo
13:41<andythenorth>but that’s a few steps away
13:43<andythenorth>¿ so I add a target for firs.nml depending on generated/pnml/firs.pnml
13:44<@planetmaker>yes
13:45<@DorpsGek>Commit by translators :: r26696 trunk/src/lang/vietnamese.txt (2014-07-19 17:45:13 UTC)
13:45<@DorpsGek>-Update from WebTranslator v3.0:
13:45<@DorpsGek>vietnamese - 11 changes by nglekhoi
13:47-!-andythenorth is now known as Guest3225
13:47-!-andythenorth [~Andy@host31-53-98-216.range31-53.btcentralplus.com] has joined #openttd
13:47<andythenorth>bad wifi
13:51-!-Guest3225 [~Andy@host86-141-169-95.range86-141.btcentralplus.com] has quit [Ping timeout: 480 seconds]
13:55-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has joined #openttd
14:05<Eddi|zuHause>andythenorth: try adding the lines "MAIN_SRC_FILE:=generated/firs.pnml" and "NML_FILE := generated/firs.nml" to Makefile.in
14:05<Eddi|zuHause>see what it does
14:08*andythenorth tries
14:09<andythenorth>oops, /me forgets that make doesn’t know about all the deps
14:12<andythenorth>Eddi|zuHause: seems to work
14:12<andythenorth>might break some other paths
14:12<andythenorth>waiting for nmlc :P
14:13<Eddi|zuHause>hmm... how do i prevent these stupid dogs to fall into the lake and get stuck under a waterlily
14:15<@Alberth>drink the lake :p
14:16<Eddi|zuHause>lake is an infinite water source. can't empty it with buckets
14:17<Eddi|zuHause>also, i need the water to grow crops
14:18<@Alberth>make the dogs want to go elsewhere
14:18<@Alberth>take out the water lily?
14:19<Eddi|zuHause>i can make the dogs "sit", but they will still be pushed around when i walk past them
14:24<andythenorth>Eddi|zuHause: better? http://paste.openttdcoop.org/show/3520/
14:25<Eddi|zuHause>that last line shouldn't be needed
14:26<andythenorth>which last?
14:26<andythenorth>firs.nml?
14:26-!-Afdal [~chatzilla@host-174-45-188-234.chy-wy.client.bresnan.net] has joined #openttd
14:27<Afdal>Would anyone happen to know how the custom sea level %s correlate to the other sea level settings?
14:27<andythenorth>ok I removed firs.nml: generated/pnml/firs.pnml
14:27<andythenorth>still works
14:29<andythenorth>now I want to remove the dependency on firs.pnml, and process each pnml file individually with cpp
14:29<andythenorth>so it will be a % thingy?
14:32<Afdal>like what % is Medium
14:33<Afdal>what % is Low...
14:33<@Alberth>hmm, should be in the source, shouldn't it?
14:33<frosch123>i thought it said in parentheses
14:34-!-MTsPony1 [~marctraid@008-086-128-083.dynamic.caiway.nl] has joined #openttd
14:34-!-MTsPony1 is now known as MTsPony
14:34<frosch123>@calc 400/1024
14:34<@DorpsGek>frosch123: 0.390625
14:34<frosch123>@calc 250/1024
14:34<@DorpsGek>frosch123: 0.244140625
14:34<frosch123>@calc 80/1024
14:34<@DorpsGek>frosch123: 0.078125
14:34<frosch123>@calc 20/1024
14:34<@DorpsGek>frosch123: 0.01953125
14:35<frosch123>so, 2%, 8%, 24% and 39% :)
14:35-!-MTsPony_zzz [~marctraid@008-086-128-083.dynamic.caiway.nl] has quit [Ping timeout: 480 seconds]
14:36<Afdal>those are for sea level?
14:36<Afdal>very low to high?
14:36<frosch123>yes, i hope there are 4 things to choose :)
14:36<Afdal>Thanks a bunch, very helpful
14:37-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
14:39*andythenorth looks at CETS makefile.in
14:39<@Alberth>frosch123: no percentages next to the text afaik
14:39-!-oskari89 [oskari89@83-102-63-32.bb.dnainternet.fi] has joined #openttd
14:46<andythenorth>http://paste.openttdcoop.org/show/3521/
14:46<andythenorth>so I expected "[GENERATE ONML]" to be echoed
14:47<andythenorth>it doesn’t?
14:52-!-trendynick [~trendynic@188.26.254.160] has joined #openttd
14:52<@planetmaker>missing " "
14:52<@planetmaker>for the PNML hm
14:53<@Alberth>based on what? line 13 is just nonsense
14:53<@Alberth>what is %.onml supposed to do?
14:53<@planetmaker>oO
14:54<@Alberth>%<foo> can only be used for making a dependency rule %.o: %.cpp
14:54<@Alberth>why do you think it should reach that file?
14:55<@Alberth>*line
14:55<andythenorth>this is closer http://paste.openttdcoop.org/show/3522/
14:55<andythenorth>I don’t know if it’s correct, but it actually does what I expect
14:56<@planetmaker>he... "Please add new cases to slovak language settings:
14:56<@planetmaker>g (already in system), d, a, l, i "
14:56-!-Afdal [~chatzilla@host-174-45-188-234.chy-wy.client.bresnan.net] has left #openttd []
14:56<@Alberth>what is .onml relative to .pnml?
14:57<@Alberth>line 21 sees it as target to build, while line 10 sees it as source
15:11-!-Alberth [~hat@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
15:30<andythenorth>hmm
15:30<andythenorth>mkdir is complaining that the dir already exists
15:31-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
15:33<andythenorth>fixed
15:34<frosch123>"-p"
15:34<andythenorth>new problem
15:34<andythenorth>make: *** No rule to make target `%.onml', needed by `nml'. Stop.
15:34<andythenorth>http://paste.openttdcoop.org/show/3523/
15:35<andythenorth>%.onml is a target
15:35<andythenorth>I don’t see what I’ve done wrong
15:35<frosch123>you can use % only in patterns
15:35<frosch123>what is GENERATE_PNML ?
15:36<frosch123>shall it be a list of files or something?
15:38<andythenorth>I don’t know
15:38<andythenorth>I don’t understand it tbh
15:38<andythenorth>I’m trying to copy from CETS
15:38<andythenorth>but one step at a time, so I can learn something
15:39<andythenorth>make is like nothing I’ve seen before, and I’ve been coding since I was 6
15:39<andythenorth>which is 30 years :(
15:39<andythenorth>do I have to use make to call cpp?
15:41<@planetmaker>$GENERATE_PNML is the name of the target which generates the pnml file(s)
15:42<@planetmaker>$GENERATE_NML is the name of the target which generates the nml file from the main pnml file
15:42<@planetmaker>$GENERATE_GRF is the name of the target which generates the grf file from the nml file
15:42<andythenorth>I am going to revert this
15:43<andythenorth>copying from CETS is a bad idea if I don’t understand what I’m pasting
15:43<andythenorth>the last commit at least works ok
15:43<andythenorth>I can’t see how to call cpp on all the .pnml files
15:43<andythenorth>can I write a python script to do it?
15:44<@planetmaker>you can do whatever works
15:44<@planetmaker>the CF will call make; make bundle; make bundle_src
15:44<Eddi|zuHause>andythenorth: if your python scripts outputs a deps file, you need a "%.pnml: %.nml" rule
15:44*andythenorth googles for how to invoke CPP
15:44<andythenorth>is a deps file a standard format?
15:45<@planetmaker>sorry. make; make bundle_zip; make bundle_src
15:45<andythenorth>ta
15:45<@planetmaker>a deps file is like a makefile
15:45<@planetmaker>target: dependency
15:45<Eddi|zuHause>deps file has the format: "main_file: other_file(s)"
15:45<@planetmaker>target: dependency2
15:45<@planetmaker>target2: dependency3
15:45<@planetmaker>target2: dependency4
15:45<Eddi|zuHause>main file will be firs.pnml
15:45<@planetmaker>target3: dependency
15:45<@planetmaker>etc
15:45<Eddi|zuHause>and other files all other autogenerated files
15:46<andythenorth>hmm cpp seems to call clang
15:46<Eddi|zuHause>that depends on which compiler you installed
15:46<andythenorth>clang by default here
15:47<andythenorth>I can’t figure out how to concatenate the nml files without python
15:47<andythenorth>I guess shell can do that for me
15:47<Eddi|zuHause>cat file1 file2 file3 > file
15:47<andythenorth>ok
15:48<andythenorth>I can’t use firs.pnml any more for this
15:48<Eddi|zuHause>that's why i used onml
15:48<andythenorth>it will get processed in an order I can’t control and might fail
15:48<andythenorth>I couldn’t see how to make onml a dependency
15:48<Eddi|zuHause>each processing step gets a new file extension
15:48<andythenorth>yes, I liked that
15:49<andythenorth>it made 100% sense
15:49<andythenorth>it fits with the make tutorial I read as well about .o files and such
15:50<Eddi|zuHause>andythenorth: you can only use "%" in a dependency, if the target also contains "%"
15:50-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has joined #openttd
15:50<Eddi|zuHause>so "nml: %.onml" won't work, because "nml" doesn't contain a "%"
15:50<andythenorth>ok
15:50<Eddi|zuHause>the "%" is replaced by the same file base name by make
15:51<andythenorth>and $@ and $< get the filenames?
15:52<Eddi|zuHause>yes
15:52<Aphid>I have a question. When a script calls 'GSTown::SetGrowthRate() to change a town's growth rate from A to B days/house, and the ticker is currently at C houses, where C <= A, what will the ticker be after the action? E.g. if the rate is changed often, what happens, for example?
15:53<andythenorth>so this puzzles me http://paste.openttdcoop.org/show/3524/
15:53<andythenorth>no constant substitution ?
15:53<andythenorth>L9 and L34 are the differences
16:00-!-jjavaholic [~jjavaholi@grahamg63.plus.com] has quit [Quit: Ex-Chat]
16:00-!-jjavaholic [~jjavaholi@grahamg63.plus.com] has joined #openttd
16:01<frosch123>GENERATE_PNML = MAIN_SRC_FILE <- lacks $( )
16:01<frosch123>MAIN_SRC_FILE is a variable, no value
16:01<andythenorth>so /me is being dumb
16:02<andythenorth>that works
16:06-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has quit [Remote host closed the connection]
16:06-!-tycoondemon [~ashnohoe@ip503d7ac1.speed.planet.nl] has joined #openttd
16:09<Aphid>Huh... apparently the speed is one dph slower than indicated, e.g. ' every 3 days' actually means every 4 days.
16:13<frosch123>town growth?
16:13<frosch123>yes, i think there is an fs issue about that
16:13<andythenorth>why is generated/pnml/firs.pnml the MAIN_SRC_FILE
16:13<andythenorth>why isn’t it firs.nml?
16:13<andythenorth>the pnml is just an intermediate
16:14<andythenorth>it doesn’t make any sense for either meaning of src that I understand
16:15<andythenorth>:)
16:16<frosch123>well, it's the same for all languages using $ @ ! and stuff
16:17<frosch123>"understanding them" is equivalent to "being the author"
16:17<frosch123>make, bash, perl, ... :)
16:17<andythenorth>I believe that pm doesn’t like this particular makefile anyway
16:18<andythenorth>I wonder if I’m starting from totally the wrong place
16:18<andythenorth>certainly this isn’t time saving
16:18<andythenorth>and I’m not learning much :)
16:24<@planetmaker>andythenorth, main_src_file is what the *source* has (hence the name).
16:24<@planetmaker>the nml file is not part of the source
16:24<@planetmaker>andythenorth, what I do think is: if you want to understand makefile, disregard mine. Write a small one which works for you
16:25<@planetmaker>without all the boilerplate of the 'standard' newgrf makefile
16:25<andythenorth>I was wondering about that
16:25<@planetmaker>as said, there's three targets which only need to work:
16:25<@planetmaker>make
16:25<@planetmaker>(which will build the grf)
16:25<@planetmaker>it's the first target in the makefile defined
16:26<@planetmaker>bundle_zip. That's expected to create a tar.zip. When unzipped it should be usable by openttd
16:26<@planetmaker>bundle_src. That's supposed to create a source archive from which I can build the grf
16:27<@planetmaker>but you can ignore that all for getting to know how it works
16:28<andythenorth>so (before I quit and go to sleep :P ) - firs.pnml is no source either
16:28<andythenorth>so perhaps I need to fix that?
16:32<andythenorth>that is quite separate to understanding the makefile :)
16:32<andythenorth>problem with project structure
16:38-!-andythenorth [~Andy@host31-53-98-216.range31-53.btcentralplus.com] has quit [Read error: Connection reset by peer]
16:38-!-andythenorth [~Andy@host31-53-98-216.range31-53.btcentralplus.com] has joined #openttd
16:38<@planetmaker>well, in your case it's not. indeed
16:39<@planetmaker>but the naming MAIN_SRC_FILE is not that important. It's just a name for the pnml file
16:39<@planetmaker>could have called it like that
16:39<@planetmaker>MAIN_PNML_FILE
16:40<@planetmaker>that's how it's used
16:40<andythenorth>ok, so that makes sense
16:40<andythenorth>and there won’t be a main pnml file
16:40<andythenorth>there will be a main nfo file I guess
16:41<andythenorth>oh maybe I just figured it out from that
16:41<andythenorth>if there’s a main nfo file, and everything else is deps....
16:41<andythenorth>it just chains back
16:42<andythenorth>target: deps /n rules
16:42<@planetmaker>yeah
16:43<@planetmaker>and that works nicely recursively
16:43<andythenorth>I am biting off quite a lot in one go with this
16:43<@planetmaker>the recursion is the key to makefiles :)
16:43<Aphid>The real thing i wanted to know about town growing is just what happens to the internal 'house ticker', when a script overrides the speed. it works by keeping an internal integer variable (I think it's 16bit) and setting it to your dph to start with. This value is decremented every day. When it is at zero (and decrement would overflow it), it is instead set back to the dph value.
16:43<andythenorth>maybe I write the compile in python, and then convert to make
16:44<andythenorth>the only reason I didn’t do a python compile was that I thought I needed make for cpp
16:44<andythenorth>but cpp is just a program :P
16:44<@planetmaker>yup :)
16:44-!-trendynick [~trendynic@188.26.254.160] has quit [Ping timeout: 480 seconds]
16:45<Aphid>Now if I say set the dph to 10,000 (one house per 30 years), wait 15 years (counter is now at 5,000), and then set the counter to dph to 100, what happens exactly?
16:47<frosch123>Aphid: when changing the speed the relative "growth progress" is preserved
16:47<frosch123>if it was at 2000/5000 and you set the speed to 500, it will go to 200/500
16:47<andythenorth>hrm
16:48<andythenorth>cpp input.file > output.file
16:48<frosch123>"-E"
16:48<andythenorth>can I pipe a string to cpp somehow?
16:48<frosch123>also i prefer "-o output.file" instead of ">"
16:49<frosch123>i guess if you skip all files you can also pipe through it
16:49<@planetmaker>andythenorth, -C -E -nostdinc -x c-header
16:49<@planetmaker>^ CFLAGS
16:49<@planetmaker>CC_FLAGS
16:49*andythenorth tries to find -E in cpp manual
16:49<@planetmaker>it won't work without the -nostdinc -x c-header
16:49<andythenorth>ok
16:50<@planetmaker>at least for gcc >= 4.8 or so
16:50-!-Progman [~progman@p57A1BB79.dip0.t-ipconnect.de] has joined #openttd
16:56<andythenorth>cpp -C -E -nostdinc -x c-header generated/pnml/arable_farm.pnml arable.nml
16:56<andythenorth>clang: error: no input files
16:56<andythenorth>doesn’t like -x
16:58<andythenorth>clang docs suggest it should work
16:58<TinoDidriksen>If in doubt, ask #llvm
16:59<@planetmaker>andythenorth, you didn't provide output
16:59<@planetmaker> clang -C -E -nostdinc -x c-header firs.pnml -o firs.nml
16:59<@planetmaker>missing -o
16:59<@planetmaker>and arguably the error message is in need of being clearer :)
16:59<andythenorth>hmm
17:00<andythenorth> clang -C -E -nostdinc -x c-header generated/pnml/arable_farm.pnml -o arable.nml
17:00<andythenorth>works
17:00<@planetmaker>yup
17:00<andythenorth>cpp -C -E -nostdinc -x c-header generated/pnml/arable_farm.pnml -o arable.nml
17:00<andythenorth>doesn't
17:00<andythenorth>so clang’s support of cpp is defective
17:00<@planetmaker>hu?
17:00<@planetmaker>both works for me
17:00<@planetmaker>whether I use cpp or clang with those arguments
17:00<andythenorth>Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
17:01<@planetmaker>gcc 4.8.3 and clang 3.4
17:01<andythenorth>cpp —version and clang —version return identical for me
17:01<@planetmaker>:D
17:01<andythenorth>I think cpp is just an alias
17:01<@planetmaker>likely
17:02<@planetmaker>it's also when using gcc
17:02<@planetmaker>then it's an alias for gcc
17:03<andythenorth>bit weird that one fails
17:03<andythenorth>also I need to call cpp, not clang
17:03<andythenorth>not everyone has clang :P
17:03<@planetmaker>CF doesn't ;)
17:04<@planetmaker>at least not yet
17:04<andythenorth>gcc works
17:04<andythenorth>I’ll just ignore cpp
17:10<andythenorth>yeah, now I have nml
17:12<Wolf01>'night
17:12-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
17:13<andythenorth>now all I need is nmlc nml->nfo
17:13<andythenorth>then concatenate nfo and teach makefile to call grfcodec
17:13-!-sla_ro|master [slamaster@89.137.74.191] has quit []
17:14*andythenorth throws away the power of make in favour of results :P
17:15<@planetmaker>without make no CF, tho :P
17:15<andythenorth>still make :)
17:16<andythenorth>just not getting tied in knots trying to batch process with make
17:16<andythenorth>I can learn that, but it’s too much change in one go
17:16<@planetmaker>or you can provide all your own build rules in a custom build script. then you can avoid make, too ;)
17:16<andythenorth>I dunno
17:16<andythenorth>I’m worried about dependency checks
17:16<andythenorth>I was hoping make would solve that
17:17<@planetmaker>it can
17:17<andythenorth>I think dep checks are super hard
17:17<@planetmaker>and yes, they are
17:17<andythenorth>there almost needs to be code checking the deps
17:18<@planetmaker>cpp can help with those :P
17:18<@planetmaker>cpp -MMD file -o file.dep
17:18<andythenorth>it probably doesn’t understand python imports etc?
17:18<@planetmaker>it will pickup the includes. But not the graphics
17:18<frosch123>s/.dep/.nml/ ?
17:19<@planetmaker>frosch123, for checking deps? na
17:19<frosch123>doesn't -MMD output to "outfile.file.dep"?
17:19<frosch123>or is that a gnu extension?
17:20<@planetmaker>I don't understand the man page output on -MD :P. It depends on other settings ;)
17:20<@planetmaker> -MD -MD is equivalent to -M -MF file, except that -E is not implied. The driver determines file based on whether an -o option is given. If it is, the driver uses its argument but with a
17:20<@planetmaker> suffix of .d, otherwise it takes the name of the input file, removes any directory components and suffix, and applies a .d suffix.
17:20<@planetmaker> If -MD is used in conjunction with -E, any -o switch is understood to specify the dependency output file, but if used without -E, each -o is understood to specify a target object file.
17:20<@planetmaker> Since -E is not implied, -MD can be used to generate a dependency output file as a side-effect of the compilation process.
17:20<frosch123>be carefule, there are -MM -MD -MMD
17:20<andythenorth>isn’t this specific to C / C++?
17:21<andythenorth>I did do some reading about that a few weeks ago :P
17:21<@planetmaker>-MMD is like -MD except ... :P
17:21<frosch123>andythenorth: it tracks the #include
17:21<frosch123>so, specific to the preprocessor, not to c/c++
17:21<andythenorth>ok so python imports won’t show
17:21<@planetmaker>nope, they won't
17:21<andythenorth>nor python template usage
17:21<andythenorth>nor lang files
17:21<@planetmaker>neither
17:22<@planetmaker>but that's what make solved... %.grf: lang/*.lng
17:22<frosch123>andythenorth: it's not libinterpose :p
17:23<frosch123>though i never figured out, where that lib comes from
17:23<andythenorth>neither did google apparently
17:23<frosch123>there are only myths about it, but i have it at work
17:23<frosch123>possibly it is only a "concept" and someone else implemented it
17:25-!-bugzee [~bugzee@75-106-22-229.cust.wildblue.net] has joined #openttd
17:25<andythenorth>hmm
17:26<andythenorth>so if I write *enough* python scripts to output the lists of deps, make can use those :P
17:26<andythenorth>but then it’s back to my flakey python
17:26<andythenorth>anyway, bed time
17:26<@planetmaker>as long as you use python to write your nml or nfo you have to use that to write the deps
17:26<@planetmaker>and... sleep well :)
17:26<andythenorth>thanks, that was painful, maybe I learnt something :P
17:26<andythenorth>dunno
17:26<andythenorth>tomorrow is a new day :)
17:27-!-andythenorth [~Andy@host31-53-98-216.range31-53.btcentralplus.com] has quit [Quit: andythenorth]
17:32<Aphid>when changing the speed the relative "growth progress" is preserved --> Might be good to add that to the API documentation.
17:47-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has quit [Read error: Connection reset by peer]
17:48-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has joined #openttd
17:48-!-Progman [~progman@p57A1BB79.dip0.t-ipconnect.de] has quit [Ping timeout: 480 seconds]
17:48-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
17:49-!-jinks [~jinks@172.245.35.67] has quit [Quit: ZNC - http://znc.in]
17:50-!-jinks [~jinks@172.245.35.67] has joined #openttd
17:51-!-LSky` [~LSky@5ED4B2EA.cm-7-5c.dynamic.ziggo.nl] has quit []
17:53<Eddi|zuHause>yay, i finished a railway line from my farm to the nearest village
17:58<frosch123>night
17:58-!-frosch123 [~frosch@frnk-4d01d786.pool.mediaways.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
18:08-!-oskari89 [oskari89@83-102-63-32.bb.dnainternet.fi] has quit []
18:44-!-smb_ [~smb_@199.119.245.122] has quit [Ping timeout: 480 seconds]
18:49-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has quit []
18:55-!-smb_ [~smb_@OSH-195-222.onshore.net] has joined #openttd
19:05-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
19:20-!-FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Quit: There's a real world out here!]
19:29-!-Supercheese [~Superchee@76.178.136.186] has quit [Quit: Valete omnes]
19:51-!-smb_ [~smb_@OSH-195-222.onshore.net] has quit [Ping timeout: 480 seconds]
19:55-!-smb_ [~smb_@OSH-195-222.onshore.net] has joined #openttd
20:29-!-SylvieLorxu [~sylvie@dhcp-077-251-165-191.chello.nl] has quit [Remote host closed the connection]
20:56-!-HerzogDeXtEr [~flex@88.130.171.0] has quit [Quit: Leaving.]
21:11-!-smb_ [~smb_@OSH-195-222.onshore.net] has quit [Ping timeout: 480 seconds]
21:15-!-Rarn [~Rarn@0001f26c.user.oftc.net] has joined #openttd
21:15-!-MJP [~mjp@hq.z77.fr] has quit [Ping timeout: 480 seconds]
22:03-!-smb_ [~smb_@199.119.245.122] has joined #openttd
22:05-!-luaduck is now known as luaduck_zzz
22:26-!-glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
22:37-!-tokai|noir [~tokai@00012860.user.oftc.net] has joined #openttd
22:37-!-mode/#openttd [+v tokai|noir] by ChanServ
22:40-!-HerzogDeXtEr [~flex@88.130.171.0] has joined #openttd
22:43-!-tokai|mdlx [~tokai@port-92-195-54-110.dynamic.qsc.de] has quit [Ping timeout: 480 seconds]
22:54-!-smb_ [~smb_@199.119.245.122] has quit [Read error: Connection reset by peer]
23:08-!-shirish_ [~quassel@59.88.98.197] has quit [Remote host closed the connection]
23:30-!-smb_ [~smb_@199.119.245.122] has joined #openttd
23:46-!-HerzogDeXtEr [~flex@88.130.171.0] has quit [Quit: Leaving.]
---Logclosed Sun Jul 20 00:00:01 2014