Back to Home / #openttd / 2014 / 06 / Prev Day | Next Day
#openttd IRC Logs for 2014-06-08

---Logopened Sun Jun 08 00:00:54 2014
00:10-!-jinks [~jinks@172.245.35.67] has joined #openttd
00:56-!-Eddi|zuHause [~johekr@p5DC67F48.dip0.t-ipconnect.de] has quit []
00:56-!-Eddi|zuHause [~johekr@p5DC67BBE.dip0.t-ipconnect.de] has joined #openttd
01:31-!-sla_ro|master [slamaster@89.137.74.191] has joined #openttd
02:15-!-Hazzard_ [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has quit [Remote host closed the connection]
02:40-!-Progman [~progman@p57A181D0.dip0.t-ipconnect.de] has joined #openttd
02:49-!-Orborde [~oftc-webi@72.14.229.1] has joined #openttd
02:49<Orborde>What mod are most of the public City Builder servers running?
03:01<Supercheese>Perhaps they're using GameScripts?
03:01<Supercheese>https://www.tt-forums.net/viewtopic.php?f=65&t=62868
03:01<Supercheese>and the like
03:06<Orborde>Supercheese: When I googled for city builder, I found that, but I when I ran it, it didn't seem to work the same as most of the multiplayer servers on the internet.
03:07<Supercheese>Well, that may be, I don't play multiplayer
03:07<Supercheese>that was what popped to mind, though
03:22<@planetmaker>there are way more than one city builder script around. The servers might also use scripts which are not publicly available. Some might additionally use modified servers
03:22<@planetmaker>but the easiest way might be to ask the owner of the server
03:35-!-Dan9550 [~dan9550@5.155.dsl.mel.iprimus.net.au] has joined #openttd
03:39-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has joined #openttd
03:52-!-Phreeze [~p@vodsl-9420.vo.lu] has joined #openttd
03:54-!-Orborde [~oftc-webi@72.14.229.1] has quit [Quit: Page closed]
04:23-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
04:28-!-Haube [~michi@77-20-0-12-dynip.superkabel.de] has joined #openttd
04:47-!-HerzogDeXtEr [~flex@i59F6A879.versanet.de] has joined #openttd
04:49-!-Pereba [~UserNick@187.59.174.151] has quit [Quit: AdiIRC is updating to v1.9.3 Beta Build (2014/06/07) 64 Bit]
04:50-!-Pereba [~UserNick@187.59.174.151] has joined #openttd
05:09-!-MJP [~mjp@hq.z77.fr] has joined #openttd
05:14-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has joined #openttd
05:16<andythenorth>moin
05:21-!-Pensacola [~quassel@h220216.upc-h.chello.nl] has quit [Remote host closed the connection]
05:25-!-frosch123 [~frosch@frnk-4d01c1d3.pool.mediaWays.net] has joined #openttd
05:27-!-SylvieLorxu [~sylvie@dslb-094-220-190-096.pools.arcor-ip.net] has joined #openttd
05:27-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has quit [Quit: andythenorth]
05:35-!-Aristide [~quassel@2a01:e35:2eb9:64b0:2c2f:e99a:bbf5:764b] has joined #openttd
05:51-!-HerzogDeXtEr1 [~flex@i59F6C9E2.versanet.de] has joined #openttd
05:51-!-HerzogDeXtEr [~flex@i59F6A879.versanet.de] has quit [Read error: Connection reset by peer]
05:58-!-Alberth [~hat@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
05:58-!-mode/#openttd [+o Alberth] by ChanServ
06:03-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has joined #openttd
06:03-!-KritiK [~Maxim@0001264a.user.oftc.net] has joined #openttd
06:03-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has joined #openttd
06:05<andythenorth>o/
06:06<andythenorth>should nml be rewritten, not-in-python?
06:06<andythenorth>for faster
06:07<@Alberth>I don't know what the slow part actually is
06:07<@Alberth>in my experience, you can guess the cause, but you're always wrong
06:08<Phreeze>that it takes nearly 0.1s to compile? :D
06:08<@Alberth>guessing the cause is a fun game though :p
06:08<andythenorth>Snail: is m4nfo fun to use?
06:09<andythenorth>and is it fast?
06:09<@Alberth>Phreeze: as in, what part of the nml compile is the bottleneck
06:11<@Alberth>andythenorth: I agree something should be done, but I don't know what
06:11*andythenorth wonders if we should use a general purpose pre-processor instead of a scripting language
06:11<@Alberth>rewriting nml from scratch feels like a blunt sledgehammer solution
06:12<@Alberth>have fun with m4 then
06:13<andythenorth>I wonder what the net time would be
06:13<andythenorth>compile time versus programming time
06:14<@Alberth>but 90+% of the nml code is fine, the puzzle is finding what the 10% part is, and how to eliminate that bottleneck
06:14<@Alberth>also, I currently don't have the room to take on another big project
06:15<andythenorth>usually I totally ignore ‘python is slow’ comments
06:15<@Alberth>did you measure the time of all the various stages in a make run?
06:15<Eddi|zuHause>Alberth: in my tests, there were two parts that were extremely slow, first, the ply part that reads in the souzrce, which also uses extremely huge parts of memory, and then the evaluation of (constant) expressions
06:15<andythenorth>because usually my concern is programmer speed, not code execution performance
06:15<andythenorth>much easier (and *much* cheaper) to buy more CPU than buy more good programmers
06:17<@Alberth>Eddi|zuHause: ply builds on re, which requires the entire input string to be in memory
06:17<Eddi|zuHause>the third part that was slow was that the makefile did this stuff twice, for the very questional result of a dependency graph. but afair that was removed...
06:18-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
06:18<Eddi|zuHause>Alberth: but if the entire input string is 4MB, it's not a justification for python to use 1GB of memory
06:18<Wolf01>hello
06:18<@Alberth>hi hi Wolf01
06:19<Eddi|zuHause>this memory consumption is the main reason i split into partial compiles
06:20*andythenorth wonders how much memory is used by FIRS compile
06:21<Eddi|zuHause>just run "top", type ">", and watch while running a compile
06:23<andythenorth>what does > do? I can’t find it in docs
06:23<@Alberth>type 'h' iirc
06:24<andythenorth>anyway, it’s climbed to 1.5GB so far
06:24<@Alberth>real or virtual?
06:24<andythenorth>I’ll have to run it again
06:24<@Alberth>virtual doesn't mean a lot, programs tend to over-allocate memory and never use it
06:25<LordAro>https://docs.python.org/2/library/profile.html ?
06:26<andythenorth>hmm my top doesn’t work like others
06:26<andythenorth>stupid
06:26<@Alberth>Eddi|zuHause: how much space do you have, ie could it be that Python decides not to do garbage collection?
06:26<@Alberth>LordAro: moin, and wrong python for trunk ;)
06:26<andythenorth>seems that sorting processes by memory usage on OS X top is not a documented feature
06:27<LordAro>o/
06:27<LordAro>it's no different :p https://docs.python.org/3.4/library/profile.html
06:27<Eddi|zuHause>">" moves the sort to the next column
06:27<Eddi|zuHause>"<" moves it back
06:27<LordAro>python docs are v nice
06:27<@Alberth>I suggested running some profiling a few days ago too
06:28<andythenorth>Eddi|zuHause: I have some kind of crippled top
06:28<@Alberth>andythenorth: it's called "the BSD version" :)
06:29<andythenorth>urgh
06:29<andythenorth>the OS X UI tool is better, let’s see
06:30<@Alberth>GNU software tends to get expanded with more features than the more traditional BSD software
06:33<Eddi|zuHause>"within the last year, encrypted traffic in europe quadrupled from 1.5% to 6.1% of total"
06:34<Phreeze>which is still not 100%
06:34<andythenorth>Alberth: https://dev.openttdcoop.org/attachments/download/6208/firs_compile_memory.png
06:35<Phreeze>2 errors in that pic
06:35<Phreeze>1) Apple 2) no RAM. RAM starts at 8gigs
06:35<andythenorth>?
06:36<@Alberth>the next question is what's in that memory
06:36<andythenorth>I can sample the process
06:36<andythenorth>but it’s just a crapload of python calls and mallocs :P
06:37<andythenorth>(what else would it be? :P)
06:37<@Alberth>yeah, it needs to be more detailed, as in, how many objects of each class, and total size per class, or so
06:37<andythenorth>wish I knew where yexo’s profiling runs were
06:38<@Alberth>hmm, Python doesn't throw anything away, I think
06:38<andythenorth>is it as simple as wrapping a cprofile call around the nml entry point?
06:38<andythenorth>‘simple’ :P
06:39<@Alberth>at least, I never encountered code that explicitly drops data
06:39<Wolf01>stupid weather, I'm melting :|
06:40<@Alberth>http://paste.openttdcoop.org/show/3410/ like som andy? :)
06:40<@Alberth>s/som/this/
06:41<andythenorth>let’s see
06:41<andythenorth>oh I have nml 2 still
06:41<andythenorth>we don’t want results from old nml I guess
06:42*andythenorth stares into a day of fighting PIL
06:43<@Alberth>oh, doesn't change that much, I guess
06:43<@Alberth>but I don't have a file with results :(
06:43<andythenorth>hmm
06:43<andythenorth>should we just put build a profiling flag into nml?
06:44<andythenorth>-build
06:52-!-gelignite [~gelignite@i528C3082.versanet.de] has joined #openttd
06:54<@Alberth>http://paste.openttdcoop.org/show/3411/ scanner, parser, binary operator, apparently
06:55<@Alberth>ie confirmation of what Eddi already said
06:55<LordAro>aw, i was just doing that :LK
06:55<@Alberth>try another project than firs :)
06:55<@Alberth>never hurts to have a few different projects measured
06:56<@Alberth>I guess if you throw away the graphics cache, the bottleneck will shift
06:57<LordAro>which is another large grf?
06:58<@Alberth>some opengfx+ ?
06:59<@Alberth>landscape is pretty big, but mostly graphics, probably
06:59<andythenorth>can we profile calls instead lex.py?
07:00*andythenorth is a profiling newbie
07:01<LordAro>uh, what was the "AttributeError: 'NoneType' object has no attribute 'days'" issue?
07:02<andythenorth>can we map-reduce it and use multiprocessing? :P
07:02<andythenorth>break into 4k chunks or something
07:06<@Alberth>yes, if you break it at the right point
07:07<andythenorth>hmm
07:08<andythenorth>we have a not-very-strict format that lets authors get started easily
07:08<andythenorth>I wouldn’t have a problem using a stricter format
07:08-!-Haube [~michi@77-20-0-12-dynip.superkabel.de] has quit [Read error: Connection reset by peer]
07:09<andythenorth>what (roughly) does lex.py do?
07:10<andythenorth>I don’t seem to have it in nml src
07:10<@Alberth>splitting the big text-file into elementary things like "number (with a value)", "whitespace", "switch keyword", etc
07:10<@Alberth>scanner.py
07:12-!-Pereba [~UserNick@187.59.174.151] has quit [Read error: Connection reset by peer]
07:14-!-Pereba [~UserNick@187.59.174.151] has joined #openttd
07:15-!-pthagnar [~pthagnar@cpc7-pres17-2-0-cust28.18-3.cable.virginm.net] has quit [Ping timeout: 480 seconds]
07:15-!-oskari89 [oskari89@83-102-63-32.bb.dnainternet.fi] has joined #openttd
07:15*andythenorth is being dense, where is that in nml repo? :)
07:16<@Alberth>oh, sorry, wrong name, it's nml/tokens.py
07:18<andythenorth>:)
07:20-!-tokai|mdlx [~tokai@port-92-195-98-245.dynamic.qsc.de] has joined #openttd
07:25-!-tokai [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
07:27<andythenorth>nml supports includes? :o
07:29<@Alberth>some users like to use cpp, and still have errors reported in the right file ;)
07:30<andythenorth>I should stop concatenating them myself :P
07:33-!-Supercheese [~Superchee@76.178.136.186] has quit [Read error: Connection reset by peer]
07:33-!-Supercheese [~Superchee@76.178.136.186] has joined #openttd
07:37<andythenorth>I’m kind of wondering what % speed up is achieved simply by removing dead lines etc
07:39<@Alberth>use the --nml option?
07:39<@Alberth>that should generate a usable file, without empty line stuff, I think
07:44<@Alberth>http://paste.openttdcoop.org/show/3413/ <- can you try this?
07:44<andythenorth>2 mins
07:45<@Alberth>profiling suggests it speeds up
07:45<@Alberth>but it needs a non-profile run to check
07:46<andythenorth>ok back in 5 mins or
07:46<andythenorth>so
07:46<@Alberth>np
07:46<LordAro>funny how such a simple change can make a difference :)
07:47<LordAro>https://www.youtube.com/watch?v=vh3tuL_DVsE (stolen from reddit, description 'My users this week')
08:05<andythenorth>hard to be sure
08:05<andythenorth>might be ~15s faster
08:06<andythenorth>but I’m not sure if my patched nmlc is the one actually being used
08:08<andythenorth>I can’t figure out if the makefile has a patch to nmlc, or just uses whichever is current
08:09<@Alberth>just run path/to/nmlc --grf=firs.grf firs.nml after generating the nml file one time
08:09<@Alberth>or rather time path/to/nmlc --grf=firs.grf firs.nml
08:12-!-Godde [~quassel@72.79-160-59.customer.lyse.net] has quit [Remote host closed the connection]
08:15*andythenorth runs more runs
08:18-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has quit []
08:20<andythenorth>I think it’s faster in the ~10s range
08:20<andythenorth>hard to tell with just a few runs
08:21<andythenorth>with the patch, it’s around 1m 50s over 3 runs
08:21<andythenorth>without the patch it’s ~2m 0s over 3 runs
08:24<@Alberth>ogfx-landscape shows no change worth mentioning
08:25<@Alberth>it's within the margin of error in measurements
08:25-!-krinn [~krinn@59.54.71.86.rev.sfr.net] has joined #openttd
08:26<@Alberth>ah well, patch won't hurt either
08:27<krinn>hi guys, question: is it safe to assume memcopy(t, s, len); will pad t with \0 when t size > s size ?
08:27<krinn>memcpy (sorry)
08:28<__ln__>no. how would it even know what's the size of t and s?
08:28<krinn>they were define before: just assume values, say size t = 11 and s = 3
08:29<krinn>is then safe to assume t will be fill with s content + \0 upto t size end
08:29<@Alberth>in c/c++?
08:29<krinn>in openttd so i suppose c++ (i sucks at c or ++)
08:29-!-KouDy [~koudy@188.75.190.58] has quit [Read error: Connection reset by peer]
08:29<@Alberth>no, t ands have no length
08:29<__ln__>not only not safe, but completely wrong to assume.
08:30<@Alberth>s/ands/and s/
08:30-!-KouDy [~koudy@188.75.190.58] has joined #openttd
08:30<@Alberth>it copies data that's it
08:30<krinn>review stredup -> http://hg.openttd.org/openttd/trunk.hg/file/cee144c1c1ba/src/string.cpp
08:30<@Alberth>if s and t overlap it will mess up too
08:32<krinn>if last == null it will alloc tmp with (sizeof len+1) and then memcpy(tmp, s, len) so it copy less than the *tmp buffer size by 1 (assuming last char is \0 always)
08:33<@Alberth>Calloc clears memory, yes
08:34<krinn>all fine so? clear == \0 (that's null char in C?)
08:34<@Alberth>but there is still no length associated with data pointers; it all depends on your careful calculation of "len"
08:35<andythenorth>hmm, optimised nml compiles no faster
08:36<@Alberth>it's fine due to Calloc, and strcpy not overwriting the final byte, if that's what you mean
08:36<@Alberth>andythenorth: lex is just a lot of RE calls
08:37<@Alberth>you first do lex + yacc .py, and then everything else, but the first lex+yacc eats a lot of time
08:37<krinn>Alberth, i see now calloc clear memory when assigning it
08:38<andythenorth>Alberth: I never built an understanding of what nml is doing internally - does it then create a huge object representation of all the actions, or does it do something simpler?
08:39<@Alberth>it starts with loading your input file, which it scans and parses (tokens.py and parser.py)
08:39<@Alberth>that gives you an ast (nml/ast/*.py)
08:40<@Alberth>that is checked for errors, and converted to actions (nml/actions/*.py)
08:40<@Alberth>and finally written out to grf/nfo/nml nml/output_*.py
08:41*andythenorth looks
08:41<andythenorth>so there are first class objects for all the actions
08:41*andythenorth is just enquiring out of interest
08:41-!-sla_ro|master [slamaster@89.137.74.191] has quit []
08:42<@Alberth>not sure about the "first class", but yeah, each action in the grf is a ActionZ object before
08:42<andythenorth>hmm
08:42*andythenorth wonders if FIRS can be made faster simply by coding it better
08:43<andythenorth>given that the nml file is 8.6MB
08:44<@Alberth>scanning is roughly linear in the size of the input
08:45<andythenorth>FIRS potentially repeats a lot of item blocks
08:45<andythenorth>the number of some blocks grows ~linearly with the number of economies
08:45<@Alberth>one problem may be that cpp cannot perform calculations
08:46<@Alberth>so expressions get duplicated as text, rather than just the answer
08:50<andythenorth>I wonder if FIRS should be split
08:50<@Alberth>implement partial compile? :)
08:51-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Quit: Leaving]
08:52<andythenorth>I think we all know the limits of my skills :P
08:53-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
08:54-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has joined #openttd
08:55-!-Pikka [~Octomom@d110-32-18-190.rdl800.qld.optusnet.com.au] has joined #openttd
09:05<krinn>what do ~ do on function? (ie : blah::toc then blah::~toc)
09:05<@Alberth>yet you talk about partial compilation
09:05<@Alberth>krinn: I hope blah::~blah then :)
09:06<@Alberth>in that case, it's the desctructor
09:06<@Alberth>*destructor
09:06<krinn>ah ok (i would add google that to not bug any, but seriously ~ would be hard to find)
09:06<andythenorth>I can partial compile the newgrf, resulting in a less complete newgrf :)
09:07<andythenorth>but adding a linker requires comp sci understanding I never got :P
09:07<@Alberth>oh definitely not doable in any short time
09:08<@Alberth>but given the problem is in scanning and parsing, I am not so convinced it adds much
09:08<@Alberth>since your input text doesn't get smaller
09:09<@Alberth>krinn: it's pretty much fundamental in c++ classes, any c++ book will do :)
09:10<krinn>i'm sure, but must be reading a book to find it, but searching for it would get nearly impossible
09:24-!-yorick [~yorick@ip51cd0513.speed.planet.nl] has joined #openttd
09:25<@Alberth>andythenorth: what if a template expansion was added after scanning (relatively easy) or after parsing (more complicated), ie how is the ratio source text / expanded cpp output text ?
09:26<Pikka>andythenorth, which newgrf be these?
09:27<andythenorth>Pikka: all of they
09:27<andythenorth>Alberth: not sure, I don’t really understand the CPP stuff beyond the use of constants
09:28<andythenorth>I’m removing it where it’s worth the effort, leaving it alone otherwise
09:28<Pikka>what are you currently working on, I meant
09:28<Pikka>or are you just putting all your effort into tinkering with the build environment
09:29<@Alberth>andythenorth: cpp just expands #defines. You can also do that after scanning. That would reduce the amount of text that needs to be scanned. I wonder whether it is worth the effort
09:30<andythenorth>Pikka: I got bored of slow
09:30<andythenorth>Alberth: I am -1 to using cpp, making nml support it directly doesn’t float my boat :)
09:31<Pikka>your articulated boat
09:31<andythenorth>if I could actually understand the file format of a newgrf, I’d try writing a linker
09:31<andythenorth>it would be redneck and stupid
09:31<andythenorth>but it can’t be impossible, even for me
09:31<@Alberth>for experimenting, nfo would do fine
09:32<andythenorth>surely it’s just a bunch of bytes followed by more bytes?
09:32<@Alberth>yep
09:32*andythenorth ponders EvilLinker
09:32<andythenorth>randomly changes significant bytes
09:33<@Alberth>pseudo-randomly :)
09:33<andythenorth>hasn’t Eddi already solved most of the nfo-based linker?
09:33<andythenorth>and we’re just studiously ignoring his patch?
09:34<@Alberth>afaik he uses action C to find points in the output to cut
09:35<@Alberth>and with assumptions on available actionIDs, he pastes stuff together again
09:35<@Alberth>which no doubt works for his newgrf, but not in general
09:39<andythenorth>3s for grfcodec to compile FIRS nfo :O
09:39<andythenorth>that’s so fast I’m not sure it’s correct
09:40-!-MTsPony is now known as Guest12976
09:40-!-MTPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has joined #openttd
09:40-!-MTPony is now known as MTsPony
09:40-!-MTPony is "(unknown)" on (unknown)
09:40-!-MTsPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has quit []
09:41-!-Guest12976 [~marctraid@076-010-128-083.dynamic.caiway.nl] has quit []
09:42-!-MTPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has joined #openttd
09:42-!-MTPony is now known as MTsPony
09:42-!-MTPony is "(unknown)" on (unknown)
09:44<@Alberth>compiled c/c++ code is bloody fast :)
09:44<@Alberth>in particular when it isn't doing much
09:46<andythenorth>‘compiled’ is probably too strong a term for nfo -> newgrf?
09:46<andythenorth>encoded
09:46<andythenorth>hmm
09:46<andythenorth>I think I’m going to try a redneck partial compile of my own, like eddi's
09:46<@Alberth>basically you convert "XY " to 1 byte
09:47<andythenorth>currently partial compiles fail in FIRS because some switches check across other industries
09:48<andythenorth>which I wanted to solve anyway
09:49<andythenorth>they are proximity checks, and they’re borked in most economies because they’re not economy specific
09:49<andythenorth>there should be something like tables of incompatible industries in global_constants
09:50<andythenorth>which means some kind of set reduction algorithm that I won’t be clever enough to figure out :P
09:51<V453000>andythenorth: still thinking about making the trading economy scheme I made for you? (:
09:51<V453000>also hi (:
09:54<andythenorth>hi :)
09:57<@planetmaker>hihi
10:02<@Alberth>o/
10:04-!-Dan9550 [~dan9550@5.155.dsl.mel.iprimus.net.au] has quit [Remote host closed the connection]
10:10<andythenorth>ok so the current problem I have with FIRS partial compiles: switches that check distance to other industries, but can’t resolve identifier for those industries becuase they’re not in the nml
10:11<LordAro>don't you just love algorithmic improvements? http://paste.openttdcoop.org/show/3415/ the commented out version would take hours, but the other version takes a couple of seconds :)
10:12<andythenorth>http://newgrf-specs.tt-wiki.net/wiki/NML:Industries#Industry_variables
10:12<andythenorth>hmm
10:12<andythenorth>“industry_type is either the ID of an industry.”
10:12<andythenorth>no “or…”
10:12-!-MTsPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has quit [Remote host closed the connection]
10:12-!-MTsPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has joined #openttd
10:15<andythenorth>I can substitute numeric ID
10:16<andythenorth>that bit of wiki needs a fix :)
10:17<andythenorth>Alberth: so I’ve been assuming the sensible minimum unit for a partial compile is one industry, one house, one vehicle etc
10:17<andythenorth>that assumption may be flawed, dunno yet
10:17<andythenorth>does it sound plausible, or archaic?
10:17<@planetmaker>that's very plausible, andy
10:17<@Alberth>sounds like a good starting point to me
10:18<andythenorth>what about when you want to recompile just the action 14 or such?
10:18<andythenorth>shouldn’t a linker be able to re-compile ‘whatever is in a given source file'
10:18<andythenorth>?
10:18<@Alberth>theoretically, you could recompile a single switch or so
10:19-!-MTsPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has quit [Remote host closed the connection]
10:19<@Alberth>sure, a single NFO sprite would be the smallest sane unit imho
10:19-!-MTsPony [~marctraid@076-010-128-083.dynamic.caiway.nl] has joined #openttd
10:19<@planetmaker>just the action14 could work all on itself. Though it defines parameters to some extend. So... can pull a tain of subsequent needed changes in other parts, when using subsequent IDs
10:19<andythenorth>so I think we need a symbol table
10:19<andythenorth>I can work around that for now
10:19<andythenorth>my compile can get the IDs off _my_ python objects during pre-process
10:20<andythenorth>which is a starting point
10:20<@planetmaker>for the industries. But for the switches and parameters?
10:20<andythenorth>switches I don’t know
10:20<andythenorth>I’m learning by doing :)
10:20<@planetmaker>the latter are the most interesting thing and the limiting factor
10:21<andythenorth>can I substitute numeric IDs in switches?
10:21<andythenorth>with an escape or such?
10:21<@planetmaker>at which level?
10:21<@planetmaker>nml does not allow assignment of numeric IDs to single switches
10:21<@planetmaker>the language. The compiler of course does at some stage
10:21<andythenorth>I’ll ignore it now
10:22<andythenorth>it’s not significant for compiling a complete single industry
10:25-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Quit: Leaving]
10:27<andythenorth>nml - does it suppot action C comments?
10:27<andythenorth>support *
10:30-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
10:32<@Alberth>no, there is a patch in the issue tracker
10:32<@Alberth>imho it doesn't make sense to allow comments in generated code
10:34<andythenorth>ouch
10:34<andythenorth>I have two equally good ways to do something, and I have to choose one :P
10:34<andythenorth>unrelated to comments :)
10:35<@Alberth>if they are equally good, it doesn't matter which you pick
10:35*andythenorth chooses the encapsulated route, even though it means more object crap
10:35<@planetmaker>andythenorth, eddi's nml version allows that - that's basically its only change. But ... it's a bit... well, not universal for sure
10:35<andythenorth>it’s not necessary
10:36<andythenorth>I can stick in spurious trains and split on those
10:36-!-Flygon_ is now known as Flygon
10:36<Flygon>That'd be cool
10:37<Flygon>MUs that can split from eachother at stations to go on seperate routes
10:37<Flygon>'course, running more trains does the same thing
10:37<@Alberth>context is a little different :)
10:39<andythenorth>well it’s ugly :P
10:39<andythenorth>CHECK_INCOMPATIBLE(${industry.get_another_industry('quarry').get_numeric_id()}, 16, CB_RESULT_LOCATION_DISALLOW, ${industry.id}_${industry.get_another_industry('coal_mine').get_numeric_id()})
10:39<@planetmaker>:) *slightly*
10:39<andythenorth>but I can fetch the numeric IDs that way
10:39<andythenorth>I could look them in global_constants too, simpler, but less future-proof
10:40<andythenorth>this means the existing single-industry compile works in all cases (once I’ve moved all industries to use above)
10:41<andythenorth>make TEST_INDUSTRY=lime_kiln
10:42<andythenorth>if I output that as nfo, with something reliable to split on
10:42<andythenorth>then add a step to rejoin and encode the nfo
10:42<andythenorth>then partial compiles -> full newgrf
10:43<andythenorth>if I add a dep check on the front end (I have an ugly one in Iron Horse)
10:43<andythenorth>then that’s a redneck linker
10:44<andythenorth>and once that’s working, I (we?) can use it to find the edge cases and problems with ids
10:58-!-Hazzard [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has joined #openttd
11:01-!-Blaguvest [~Blaguvest@2.110.95.201] has joined #openttd
11:03-!-krinn [~krinn@59.54.71.86.rev.sfr.net] has quit [Quit: later all]
11:12-!-LaPingvino [52aba687@207.192.75.252] has joined #openttd
11:13-!-Jerik [~Jerik@c-68-80-55-194.hsd1.pa.comcast.net] has quit [Quit: Leaving]
11:17<LaPingvino>I'm curious, how many of you are playing with CargoDist options on now?
11:18<LaPingvino>and to date I have only seen some Polish servers with CargoDist on, as well as a CZ server that has CargoDist in the name but not activated...
11:19<@planetmaker>dunno. I would think it's probably more used in single player than in multi player. But... no idea
11:19<@Alberth>I usually do, but it mostly makes transport more complicated rather than more fun
11:19<@planetmaker>you could try making a statistic, LaPingvino by downloading savegames and checking them for the setting and generating statistics from that
11:19-!-Phreeze [~p@vodsl-9420.vo.lu] has quit []
11:19<@planetmaker>tt-forums and our bug tracker might be good places to get an idea :)
11:20<@planetmaker>and the necessary savegames
11:20<LaPingvino>I tend to stick with passenger transport under CargoDist
11:20<LaPingvino>because you keep linking destinations
11:20<@planetmaker>would actually be interesting statistics
11:20*Alberth hardly ever does pax
11:20<@Alberth>too boring
11:20<LaPingvino>whereas in B.Cd. games, you make a route and go on...
11:21<LaPingvino>well, as long as you stick to unconnected goods routes, it will function the same as before, right?
11:21<@planetmaker>yes. but how boring is that?
11:21<LaPingvino>true :P
11:22<LaPingvino>but I just say, if you get it more complicated, it's because you choose to do so ;)
11:22<@Alberth>train sets just aren't designed to handle all kinds of cargoes on the same network
11:22<LaPingvino>that's true... CargoDist works best for passengers and mail. But well, you can turn it on only for those anyway ;)
11:23<andythenorth>I am using CargoDist, using a version Fonso gave me which I am not sure whether it is in trunk or not
11:23<LaPingvino>from 1.4.0 it's in trunk
11:24<LaPingvino>so if you use a custom build, I don't think you're compatible ;)
11:24<@Alberth>trunk is not compatible anyway :)
11:25<@Alberth>except with previous trunk versions
11:25<@planetmaker>:)
11:25-!-gelignite [~gelignite@i528C3082.versanet.de] has quit [Quit: http://bit.ly/nkczDT]
11:25<@planetmaker>well, trunk is also compatible with stable versions :)
11:25<@planetmaker>but it's no bijection
11:25<LaPingvino>ah, I'm one of the two creators of Esperanto Town Names, and I saw a huge number of Downloads... is it normal to download about everything or do some of you actually use it ;) :P
11:25<@planetmaker>both :)
11:25<@Alberth>it is? /me would just love to continue my current game in say 1.0 :p
11:25<LaPingvino>cool :P
11:26<@planetmaker>Alberth, that's the reverse direction :)
11:26<LaPingvino>:D
11:26<LaPingvino>I just downloaded TTO from Abandonia today and created a game to load in to test the compatibility
11:26<@Alberth>:)
11:27<@planetmaker>that *should* work, LaPingvino
11:27<LaPingvino>apart from another name for the bus type, that's effing cool to be possible ;)
11:27<LaPingvino>I know
11:27<LaPingvino>apart from that I had to load it with openttd -g nameofthefile, because it does show but grays out the load button in 1.4.1
11:27<LaPingvino>and doubleclick doesn't work either
11:27<LaPingvino>:(
11:28<LaPingvino>but with openttd -g it works just fine :)
11:28<frosch123>does it give a message why it is greyed out?
11:28<LaPingvino>nope
11:28<LaPingvino>and it doesn't give an error on loading from the command line
11:28<LaPingvino>I can pass the savegame if you wish, so you can test
11:28<LaPingvino>it's really simple
11:30<frosch123>nah, i can reproduct it
11:30<LaPingvino>ah cool :)
11:30<frosch123>apparently noone loads tto/ttd games, resp. has newgrf dev tools enabled :p
11:30<LaPingvino>saves some bytes over the wire ;)
11:30<LaPingvino>it seems so, yes...
11:30<LaPingvino>pity I cannot test it with 1.4.0 any more...
11:31<frosch123>actually you just need to select a different save first :p
11:31<LaPingvino>(I run Arch, always the latest stuff :P)
11:31<LaPingvino>ah srsly?
11:31<LaPingvino>that's it?
11:31<frosch123>once the "load" button is enabled, you can select the ttd game :)
11:31<LaPingvino>so it's probably a very tiny GUI trigger issue...
11:32<LaPingvino>nevertheless good that we triggered it ;)
11:33<LaPingvino>anyway, I'm one of the few that got into TT with the World Editor edition... but cannot find THAT one back any more :(
11:34<LaPingvino>the moment a classmate told me he had TTD, and what was new in there... pure bliss ;)
11:35-!-Blaguvest [~Blaguvest@2.110.95.201] has left #openttd [Leaving...]
11:35<LaPingvino>I discovered the merge of CargoDist because I taught OpenTTD to a friend of mine, and he is very much into realism
11:36<LaPingvino>so after some time, he told me about CargoDist, Shared Orders and Conditional GoTo jumps
11:36<LaPingvino>which is already a completely new way to play
11:36<LaPingvino>the last one is useful together with the first one, actually...
11:37<LaPingvino>anyway, should I file a bug for the TTO load issue?
11:37<LordAro>ew, realism
11:37<LaPingvino>or did frosch123 already file one?
11:37<LaPingvino>hehe LordAro :P
11:38<LordAro>Belugas & V453000 can teach you a thing or 2 about realism ;)
11:38<LaPingvino>the cool thing of TT is that the time goes fast enough to get more types of vehicles over time, but the vehicles go slow enough that they don't fly over the screen ;)
11:39<LaPingvino>ah tell me :P
11:40<LordAro>http://devs.openttd.org/~belugas/texts/realism_in_OpenTTD.txt comes to mind
11:40<LordAro>and http://www.tt-forums.net/viewtopic.php?f=26&t=70234
11:40-!-sla_ro|master [slamaster@89.137.74.191] has joined #openttd
11:43<Pikka>what a pleasant and useful discussion that was
11:43<@Alberth>and the fun part is that non-reality of V and B are not the same either :)
11:45<LaPingvino>love point 4
11:46<LaPingvino>that's why although not as realistic, CargoDist is a better fit than the SimuTrans system of having a destination before you go ;)
11:46-!-Aristide [~quassel@2a01:e35:2eb9:64b0:2c2f:e99a:bbf5:764b] has quit [Remote host closed the connection]
11:48<@Alberth>people will disagree with you :)
11:48<@Alberth>cdist just makes it more difficult for you as player to have more destinations
11:48<@Alberth>ergo, it is an advantage not to spread to different destinations at all
11:49<@Alberth>they want a cdist mode where you are forced to connect to more destinations
11:50<@DorpsGek>Commit by frosch :: r26634 trunk/src/fios_gui.cpp (2014-06-08 15:49:54 UTC)
11:50<@DorpsGek>-Fix: 'Load' button was not properly enabled/disabled for old savegames without NewGRF information.
11:50<frosch123>LaPingvino: no need for a report :)
11:50<@Alberth>or you just don't get enough cargo to make a profit
11:50<@Alberth>a first implementation of this is YACD
11:54<LaPingvino>frosch123: cool :) you just fixed it?
11:54<LaPingvino>Alberth: I know people will disagree, but as long as you can choose between dist and dest, I'm happy ;)
11:54<LaPingvino>and maybe some day dest can be a nice challenge as well
12:03-!-pthagnar [~pthagnar@cpc7-pres17-2-0-cust28.18-3.cable.virginm.net] has joined #openttd
12:03<LaPingvino>I see so much "regearing" in that thread that it drives me curious...
12:04<LaPingvino>but I suppose I shouldn't be? :P
12:06*Alberth never understood the finer points of regearing
12:06<LaPingvino>lol
12:07-!-Progman [~progman@p57A181D0.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
12:08<LaPingvino>is there some reading about it?
12:10-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Quit: Leaving]
12:10<@Alberth>Pikka: ^ ?
12:17<Pikka>where what who how?
12:17<LaPingvino>regearing
12:17<LaPingvino>wanna read more
12:17<Pikka>regearing was a cargo used to refit locomotives, to change their top speed and TE
12:17<Pikka>in NARS2
12:18<Pikka>it was a dreadful idea
12:18<Pikka>breaks a lot of industry sets, breaks full-load orders
12:18<@planetmaker>category: BAD FEATURE [TM]
12:20<LaPingvino>ah okay
12:20<LaPingvino>in other words, double locs is a much better way to get the same? ;)
12:21<Pikka>well, you can achieve sim'lar using passengers and cb36 to set the capacity to 0
12:21<LaPingvino>so you used cargo in an active way instead of passive as it usually is, right?
12:21<@planetmaker>that. Or there are other ways to achieve the same
12:21<Pikka>but it's still a bit of a silly idea and I don't know of anyone else who's done it
12:21<LaPingvino>ah okay
12:34<LaPingvino>frosch123: now that we are on the bug road anyway: I have some (common) input method issues on Linux: dead keys don't work (but accents that are reachable under AltGr do work) and ibus doesn't work for me...)
12:35<LaPingvino>frosch123: do you know if those are reported already?
12:36<frosch123>no idea, everyone uses a no-dead-keys keyboard layout
12:37<frosch123>you can configure capslock to act a compose, if you really need ḟȧṅċẏ characters
12:38<frosch123>it's the best usecase of capslock after all
12:38<frosch123>though i am still searching for a usecase for the win and onctext menu keys
12:39<frosch123>the print screen key, scroll lock and pause at least have *some* use
12:39<frosch123>though i cannot remember using them the last time :)
12:40<LaPingvino>I use xmonad, the winkey is my modifier key
12:41<@Alberth>switching to previous and next desktop
12:41<LaPingvino>context menu key is actually useful sometimes in e.g. xbmc, otherwise that's also a quick choice for me as a compose key
12:41<LaPingvino>you could then put ctrl on the capslock
12:41<LaPingvino>ctrl for emacs users, esc for vi users ;)
12:41<LaPingvino>and actually, ctrl for openttd-players as well, there are some things to do with ctrl-click
12:42<frosch123>Alberth: i have two screens, i do not need to switch desktops :)
12:42<frosch123>i switch screens instead
12:43<frosch123>maybe i should map \ { } on those keys
12:43<frosch123>but i won't actually get used to them likely
12:43<LaPingvino>but yeah, I am 9-lingual, and I usually use portuguese, and with my Dvorak-keyboard dead keys are the common way to type words like ação and Esperanto words.
12:44<LaPingvino>and I can imagine brazilians getting frustrated, as their common keyboard layout has dead keys for the same as well
12:46<LaPingvino>but well, I suppose it does work well on Windows, so most won't complain...
12:47<LaPingvino>and there are more issues with dead keys than only in OpenTTD, unfortunately :(
13:03<andythenorth>hmm
13:03*andythenorth wonders if FIRS has any global action IDs
13:04<andythenorth>probably not
13:04<@planetmaker>sure it does for checking compatibility
13:05<Eddi|zuHause>with "global" you mean feature 08 or something that stays alive for the whole file?
13:05<andythenorth>I mean varaction 2 where the author has explicitly chosen to not redeclare the ID so it can be re-used across multiple industries
13:05<andythenorth>so the latter
13:06<@planetmaker>probably that not
13:06<@planetmaker>though it could be done. e.g. with some location checks
13:06<Eddi|zuHause>in nml you can't explicitly choose varaction2 ids
13:06<Eddi|zuHause>so the first definition and the last use define the lifetime of the ID
13:06<@planetmaker>I wonder whether it would be sane to allow for that. Not sure
13:07<Eddi|zuHause>planetmaker: i see no use case
13:07<@Alberth>writing an industry newgrf against an existing one?
13:07<Eddi|zuHause>planetmaker: unless you want headerless partial compiles
13:07<Eddi|zuHause>Alberth: can't refer to varaction2 of another grf
13:07<@Alberth>kk, "no" thus :)
13:07<Eddi|zuHause>or to industries, for that matter
13:08<andythenorth>mmm, headerless partial compiles...
13:08<@Alberth>andy is descending into the deep slippery paths of partial compilation.... :)
13:09<andythenorth>Eddi|zuHause: I am replicating for myself your solution
13:09<Eddi|zuHause>he heard that it might speed up compike time
13:09<andythenorth>for learning
13:09<Eddi|zuHause>s/k/l/
13:10<andythenorth>I liked the compike version tbh
13:11<LaPingvino>I like the Rob Pike version ;)
13:11<andythenorth>writing foo.nml -> foo.nfo using nmlc is faster than I expected
13:12<andythenorth>I thought it would be ~same as foo.nml -> foo.grf
13:12<andythenorth>give or take 10s
13:12<@Alberth>graphics copying is slow
13:12<@planetmaker>the delta w/o reference timing does not tell me much :)
13:13<Eddi|zuHause>what's a rob pike?
13:14<Eddi|zuHause>andythenorth: for nml->nfo you skip all the pil calls/graphics conversions
13:14<@Alberth>wasn't there a Pike in ST?
13:14<LaPingvino>Rob Pike is one of the designers of UTF-8, and of the Go programming language
13:14<Eddi|zuHause>andythenorth: but those parts are cached, so subsequent calls may not show the same effects
13:14<LaPingvino>he works at Google
13:14<andythenorth>ah
13:14<andythenorth>hmm
13:14<@Alberth>figures, if he invented the Go language :)
13:14<Eddi|zuHause>Alberth: yes, pike is kirks boss
13:15<andythenorth>actually firs.nml -> grf and firs.nml -> nfo are about the same
13:15<andythenorth>cache is primed though
13:15*andythenorth tests more
13:15<Eddi|zuHause>Alberth: not that kirk ever listens to any boss :p
13:16<@Alberth>obviously, he's the star of the show :)
13:16<LaPingvino>hehe :P
13:16<andythenorth>hmm
13:16<andythenorth>3-4s for nml -> nfo or nml -> grf
13:16<LaPingvino>can someone explain me the Citybuilder online games?
13:17<andythenorth>18s for makefile version, with 3s of python pre-processing
13:17<andythenorth>dunno how long the make and cpp bits are taking
13:17<andythenorth>also whether it does more lang processing
13:19<andythenorth>planetmaker: if you’re interested, single industry compile is “time make TEST_INDUSTRY=lime_kiln”
13:19<andythenorth>np if not interested :)
13:21<andythenorth>nml’s nfo output respects the order of items in the original nml source?
13:21<andythenorth>it doesn’t move things around?
13:22<Eddi|zuHause>usually, but it's not guaranteed
13:22<Eddi|zuHause>main reason why my actionC patch wasn't included
13:23<Eddi|zuHause>what does this mean?
13:23<Eddi|zuHause>[NML] src/headers.nfo
13:23<Eddi|zuHause>Illegal character '#' (character code 0x23) at "<command-line>", line 1, column 1
13:23<Eddi|zuHause>make[1]: *** [src/headers.nfo] Fehler 1
13:24<andythenorth>yeah, moving stuff around is a game-over event for splitting on delimiters :(
13:25*andythenorth wonders about teaching nml to compile fragments which are non-valid for a grf
13:25<@planetmaker>andythenorth, that needs no teaching
13:25<andythenorth>orly? o_O
13:25<@planetmaker>just look at nml's regression tests. you can compile grf parts without problem
13:25<@planetmaker>it needs not even be a grf
13:25<andythenorth>so it just does input -> output parsing
13:26<andythenorth>no attempt to sanity check or validate?
13:26<@planetmaker>somewhat
13:26<Eddi|zuHause>andythenorth: problem with that is IDs that need to stay the same over the whole grf, like texts
13:28<andythenorth>yeah, I was just looking at the lang stuff
13:28<@planetmaker>yeah, stringIDs need to be global
13:29<Eddi|zuHause>second problem with that is nmlc "optimizes out" strings that are not used
13:29<Eddi|zuHause>so you need to reference every string in every partial grf
13:30<@planetmaker>Eddi|zuHause, I can imagine to change that by means of a cli parameter
13:30<@planetmaker>default shouldn't change there, but a 'debug' option for that...
13:30-!-Pereba [~UserNick@187.59.174.151] has quit [Quit: AdiIRC is updating to v1.9.3 Beta Build (2014/06/08) 64 Bit]
13:30<Eddi|zuHause>planetmaker: maybe, but it would not simplify CETS significantly
13:31-!-Pereba [~UserNick@187.59.174.151] has joined #openttd
13:31<andythenorth>so splitting output is game-overed
13:31<andythenorth>and outputting only fragments is hard
13:31<andythenorth>the splitting route is ugly anyway
13:32<andythenorth>hmm
13:32<andythenorth>stringIDs need to be global...
13:32<@planetmaker>Eddi|zuHause, no. And it has issues. Some strings would normally not get an ID even (like STR_GRF_NAME etc)
13:32<Eddi|zuHause>andythenorth: it's really not THAT hard, i have "dummy code" that references every string-id and every global action2
13:32<@planetmaker>and the STR_IDs ranges are not necessarily known
13:32<andythenorth>I just wonder how we used to do that ‘hard’ problem in nfo :P
13:33<@planetmaker>especially if you mix features. So that will be somewhat terrible, too. Not 100% sure it can be done actually
13:33<@planetmaker>andythenorth, there we basically would write several grf. And just throw them on top of eachother
13:33<andythenorth>I can’t provide a stringID table to nml?
13:33<Eddi|zuHause>no
13:34<@planetmaker>that probably needs knowledge of the overall code
13:34<@planetmaker>but maybe that can be done separately
13:34<@planetmaker>you know from their context which IDs they are. And maybe that can be cached
13:34<andythenorth>what’s the issue? We want some things that are compile-time determined to become constants?
13:34<@planetmaker>and re-used as long as the string names are unmodified in the lang file(s)
13:35<Eddi|zuHause>http://paste.openttdcoop.org/show/3416/ <-- this is the dummy code, it gets filtered out before combining the final grf, but it will be part of every partial grf.
13:35<Eddi|zuHause>the file is autogenerated
13:36<Eddi|zuHause>the vehicle names are not part of that list, because they do not get string-ids
13:36<andythenorth>Eddi|zuHause: and the problem with that file is…? (I had that kind of thing in mind)
13:36<Eddi|zuHause>andythenorth: no problem.
13:37<Eddi|zuHause>STR_AUTO_<n> are things read from the tracking table, like axle scheme
13:37<Eddi|zuHause>and the other things are strings that get referenced somewhere
13:38<Eddi|zuHause>the generate script collects that data somewhere
13:40*Alberth wonders how difficult it is to generate nfo-like output, with symbolic IDs
13:40<andythenorth>I’m not really following the stringID issue
13:40<andythenorth>we want stringIDs to be constant for all fragments of a grf?
13:41<Eddi|zuHause>andythenorth: yes, like if your industry window pushes a string-id to the text stack, that ID must be known
13:41<@planetmaker>Alberth, that pretty much would already be the 'object file format', no?
13:41<@planetmaker>in some sense at least
13:41-!-LaPingvino [52aba687@0001287a.user.oftc.net] has quit [Quit: http://www.mibbit.com ajax IRC Client]
13:41<@Alberth>it's a form of object file format indeed
13:42<Eddi|zuHause>Alberth: i wondered about generating an NML syntax tree directly, instead of writing out the file for it to be parsed again
13:42<andythenorth>I wondered about that
13:42<andythenorth>but I am not smart enough
13:42<andythenorth>I have objects :P
13:42<andythenorth>then I write them into nml
13:42<andythenorth>then nml slowly writes them into grf
13:43<andythenorth>I considered a python -> nfo compiler
13:43<@Alberth>Eddi|zuHause: given that scanning and parsing is slow, it would help, but where do you store what you need to build?
13:43<andythenorth>but I’m not a good programmer, I’d be slow
13:43<@Alberth>andythenorth: it's called nmlc? :)
13:43<Eddi|zuHause>Alberth: either i pickle it, or i just call nmlc internals directly
13:44<Eddi|zuHause>no idea about the performance of pickle
13:44<Eddi|zuHause>but being implemented in C it might not show the same issues as ply
13:44<@Alberth>how do you know what internals to call in the latter case?
13:44<andythenorth>magic :)
13:44<Eddi|zuHause>Alberth: reading nmlc's code to see what's done after parsing :p
13:45<@DorpsGek>Commit by translators :: r26635 trunk/src/lang/finnish.txt (2014-06-08 17:45:10 UTC)
13:45<@DorpsGek>-Update from WebTranslator v3.0:
13:45<@DorpsGek>finnish - 2 changes by jpx_
13:45<Eddi|zuHause>possibly replacing that parse function with some other input function
13:45<@Alberth>Eddi|zuHause: right, thus the AST -> Action code :)
13:46<@Alberth>a simple approach would be to replace the scanner by a C implementation, but it would break ease of use of nml in the general case
13:46<@Alberth>ease of installation, perhaps is a better word
13:47<Eddi|zuHause>Alberth: if nmlc is constructed anything like they taught me in compiler construction class, the semantical analysis would be next
13:47<@Alberth>I think it is
13:47<@Alberth>nml/ast/*.py is full with checking, and conversion to action/*.py objects
13:48<@Alberth>afaik
13:48<Eddi|zuHause>thingie that takes the bare AST and calculates attributes (like constant evaluation)
13:48<@Alberth>Expression class does evaluation
13:49<Eddi|zuHause>but i was never bored enough to learn the structure of the AST
13:50<andythenorth>here’s how we did text IDs with nfo :P https://dev.openttdcoop.org/projects/heqs/repository/entry/sprites/nfo/ids.pnfo
13:51<@Alberth>are these numbers important other than they should stay the same across all parts of a grf?
13:52<@Alberth>ie can you jumble them up completely the next day, when you build a new grf?
13:52<andythenorth>savegames get a bit sad if you do
13:53<andythenorth>I dunno, changing string IDs used to be the primary cause of crashing ottd
13:53<andythenorth>for me
13:53<andythenorth>but then not everybody changes grfs on a running game like me
13:53<@Alberth>kk, you're building a new grf with a new id if you're precise, when changing stringid numbers
13:54<NGC982>Hi guys.
13:55<@Alberth>o/
13:55<@planetmaker>\o
13:55<andythenorth>Alberth: I’m not sure if it’s actually significant for savegames
13:55<andythenorth>I know the results of changing it on a running game, I assumed I was leaving ottd with bad pointers to existing strings or such
13:56<@planetmaker>that will be a similar result, I think
13:56<andythenorth>I wouldn’t really care about having to manage string IDs
13:57<andythenorth>I’d just make a static table of identifiers (from lang files) to the actual hex IDs
13:57<andythenorth>it’s high on admin though
13:59<andythenorth>pass the location of the table in as a compile time parameter to nmlc
14:00<@planetmaker>hm... like something --with-static-strings and nmlc then reading a string_table.o ?
14:00<andythenorth>yes, that kind of thing
14:01*andythenorth needs to try compiling fragments of nml to see if it’s worth it
14:01<andythenorth>got the kids in the bath right now though ;)
14:01<@planetmaker>there you surely can compile a foam party :P
14:01<andythenorth>or water-on-the-floor-shorts-out-the-electrics party
14:02<andythenorth>again
14:02<andythenorth>RCDs are useful
14:02<andythenorth>lang consumes 4s of an 18s compile right now
14:02<andythenorth>interesting
14:03<@planetmaker>rcd?
14:03<andythenorth>residual current device
14:03<andythenorth>http://en.wikipedia.org/wiki/Residual-current_device
14:03<Eddi|zuHause>there allegedly was an inctance in the 1980s when we were moving to a bigger flat (because abundance of kids), and first they assigned us some unmodernised old buildings, and the first time the kids took a bath, the water leaked through the floor to the downstairs neighbours
14:04<@planetmaker>ah. FI ;)
14:04<Eddi|zuHause>i don't think FI was around back then :p
14:04<andythenorth>hmm
14:05*andythenorth did *not* know that an RCD won’t help you if you bridge the terminals on a light fitting
14:05<andythenorth>which is probably the most common way to get a shock imo :P
14:05<@planetmaker>it can only detect leakage
14:05<@planetmaker>but if you bridge it, there is leakage to the ground. So it will still work
14:06<@planetmaker>*you bridge it by current going through you
14:06<Eddi|zuHause>andythenorth: just shorting out the 2 main wires won't trigger it
14:06<Eddi|zuHause>andythenorth: shorting out a wire with the ground will
14:06<@planetmaker>unless you manage to be in thin air and in contact with nothing else while being the conducting element
14:06<Eddi|zuHause>so if you wear gummy shoes and take a wire in one hand and the other in the other end, you lose
14:07<@planetmaker>the question is what you'll loose :P
14:07<Eddi|zuHause>or tighten?
14:08<Eddi|zuHause>i'm not a doctor, but i'd imagine the heard muscle tightens under electric power
14:08<Eddi|zuHause>*heart
14:08<@planetmaker>possibly. It's a strange feeling to be the bridge from power to ground :P
14:09*planetmaker once tested. I removed the wrong fuse :P
14:10<Eddi|zuHause>i only "tested" cow fences :p
14:11<Eddi|zuHause>it actually sends short impulses rather than constant power
14:13<@planetmaker>yes. That I tested much earlier. Probably between age 4 and 6 :P
14:19<Eddi|zuHause>makes me wonder: were the systems used for cow fences the same in east and west?
14:23<@planetmaker>Eddi|zuHause, there's no need for that. They only serve one meadow at a time
14:23<@planetmaker>but dunno :)
14:24<andythenorth>I found out how grass conducts electricity using a cow fence
14:25<@planetmaker>yeah, quite well :P
14:30-!-Haube [~michi@77-20-0-12-dynip.superkabel.de] has joined #openttd
14:31<andythenorth>planetmaker: so in the regressions, a grf block is still present
14:31<andythenorth>is that optional?
14:31<@planetmaker>andythenorth, in some it is. In some it isn't
14:31<andythenorth>oh
14:32<@planetmaker>some have it to actually test it ingame :)
14:32<andythenorth>bad lucky dip so far :P
14:32<andythenorth>oic
14:32<@planetmaker>well, not during regression, but to allow for it
14:33*andythenorth experiments
14:42<andythenorth>planetmaker: I am testing with Iron Horse as it’s cleaner than FIRS
14:42<andythenorth>it already generates nml files per vehicle in generated/nml
14:43<andythenorth>so far, the following would need constants: strings, parameters, cargo labels
14:43<andythenorth>railtype label seems not to, but maybe because RAIL is a built in constnat
14:43<andythenorth>constant *
14:43<Eddi|zuHause>yes, there is a default RTT
14:44<Eddi|zuHause>if you don't override it
14:47<andythenorth>so we already have a CTT and RTT
14:47<andythenorth>I’d need a string table and a parameters table
14:47<andythenorth>although parameters works on numeric substitution, which I can do without a table
14:49<Eddi|zuHause>i just put the grf block in every partial grf
14:49<Eddi|zuHause>then i split it off in the combining step
14:51<andythenorth>I wanted to avoid the splits
14:51<andythenorth>because they look ugly
14:51<andythenorth>although I can imagine them working ~most of the time
14:52<Eddi|zuHause>but you can't provide the parameter ids without it...
14:52<andythenorth>the ones that are subsituted by numbers?
14:53<Eddi|zuHause>and then you have to change the numbers on every parameter change?
14:53<andythenorth>I just put them in global_constants
14:53<andythenorth>maybe you’ve spotted an issue I haven't
14:54<Eddi|zuHause>maybe it works...
14:54<andythenorth>unless we can do it by analysis, only one way to find out...
14:54<Eddi|zuHause>mostly i don't know what exaclty you're doing
14:54<andythenorth>neither do I yet
14:54<andythenorth>learning by doing...
14:56-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
15:04<andythenorth>hmm
15:04<andythenorth>if I could just give nml a location for a set of extra python modules….
15:05<andythenorth>with a manifest, or standard set of module names
15:05<andythenorth>and then check those for constants
15:05-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds]
15:08-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
15:10-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
15:10-!-mode/#openttd [+v glx] by ChanServ
15:18-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
15:28<andythenorth>python can do conditional imports?
15:29<LordAro>yes, iirc
15:30<@Alberth>sure if foo: import x
15:30<andythenorth>it would need to add to the module search path
15:30<@planetmaker>try: import X; except: something else
15:31<@Alberth>please advice except ImportError: in such cases
15:31<@planetmaker>:)
15:32<Xaroth|Work>what Alberth said
15:34<LordAro>what planetmaker said </rebel>
15:34<Xaroth|Work>lolz
15:35<andythenorth>hmm
15:35<andythenorth>this is one of those ‘everything at once’ hacks :P
15:35<andythenorth>I have to patch nml, and a newgrf
15:36<andythenorth>afaict I effectively want to extend constant_numbers in global_constants.py
15:37<andythenorth>so constant_numbers.append(i) for i in my_constants
15:37<Xaroth|Work>from bla import global_constants
15:37<andythenorth>or zip or whatever the funky python way to do it is
15:37-!-bdavenport [~davenport@aeolus.mindlesstux.com] has quit [Quit: ZNC - http://znc.in]
15:37<Xaroth|Work>global_constants.constant_numbers.extend(my_constants)
15:41<andythenorth>nml patch? o_O
15:45-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
15:46<andythenorth>yay
15:47<andythenorth>so copying my constants into nml’s global_constants works
15:47-!-SylvieLorxu [~sylvie@dslb-094-220-190-096.pools.arcor-ip.net] has quit [Read error: Connection reset by peer]
15:47<andythenorth>so the theory is good
15:49<andythenorth>as does stuffing cargo mappings into cargo_numbers in global_constants
15:49<andythenorth>so that looks plausible
15:52<andythenorth>ho ho Illegal character '#' (character code 0x23) at "generated/nml/box_car_brit_gen_1.nml", line 1, column 0
15:52<andythenorth>doesn’t like the include
15:53<andythenorth>nvm
15:54<@Alberth>use // for comment :)
15:56<andythenorth>hmm
15:56<andythenorth>I assumed includes would be like with cpp
15:56<andythenorth>doesn’t matter, don’t need them
15:57<andythenorth>Alberth: is it plausible / wise to pass the location of a module to nml?
15:57<andythenorth>untrusted input etc :P
15:57<@Alberth>if a user gives it, why not
15:58<andythenorth>I am trying to work out exactly what’s needed
15:58<@Alberth>oh you mean blindly import it?
15:58<andythenorth>yeah that
15:58<andythenorth>blind import
15:58<@Alberth>I would parse it
15:58<andythenorth>the cargo table would be fine in nml format, the existing parse just needs to be given the file I imagine
15:58<@Alberth>ie make it part of the nml input
15:59<andythenorth>I’d like to be able to have input that is dropped from output
15:59<andythenorth>oh
15:59<andythenorth>I just remembered a pattern from elsewhere
15:59<andythenorth>less is a macro language for compiling css
16:00<andythenorth>it has the capability to import files as ‘reference only'
16:00<andythenorth>so all their constants etc are available, but there is no output
16:01<Eddi|zuHause>what you actually want is a difference between declaration and definition
16:01<andythenorth>similarly the chameleon template language has a ‘nocall’ option for functions
16:01<Eddi|zuHause>you want the cargo table defined only once, but declared in many places
16:01<andythenorth>yes
16:01<andythenorth>exactly that
16:04<andythenorth>is it a good interface to declare things like that in the nml file I want to compile?
16:04<andythenorth>like an import directive or such
16:04<andythenorth>or is it better to pass it to nml as a compile-time flag?
16:06<Eddi|zuHause>depends...
16:06<Eddi|zuHause>i'd rather like an import-ish statement
16:07<andythenorth>I find it much more familiar for this kind of problem
16:07<andythenorth>but that’s due to my experience :P
16:07<Eddi|zuHause>the linker will then make sure that the stuff in the included file will only be written out once in the combined grf
16:09<Eddi|zuHause>in other news: http://www.youtube.com/watch?v=w59e20ijOpE
16:09<andythenorth>at the moment, the linker would be andythenorth :P
16:10<andythenorth>this is a redneck hack
16:10<andythenorth>I need to see if I can get the CTT parsed in, but not written out :P
16:11<Eddi|zuHause>well my linker is an awk script embedded into a shell script
16:11<Eddi|zuHause>actually, two awk scripts
16:11<andythenorth>maybe there’s a compiler stage where I can dump in a boolean flag
16:12<andythenorth>the joy of having no idea what you’re doing is not knowing what’s stupid :P
16:12-!-bdavenport [~davenport@aeolus.mindlesstux.com] has joined #openttd
16:13<@Alberth>it's long time ago that I could program like that :)
16:13<andythenorth>there’s a horribly 7-10 year follow up stage
16:13<Eddi|zuHause>just remember, the more joy you feel the more pain i feel watching you :p
16:13<andythenorth>where you know what’s stupid, but not what’s good
16:13<@Alberth>it's a fun mode to be in, but terribly inefficient :)
16:13<andythenorth>Eddi|zuHause: you don’t have kids, right?
16:14<Eddi|zuHause>you're definitely not my kid .p
16:14<@Alberth>:)
16:14<andythenorth>I am probably somewhat too old
16:15<@Alberth>nobody is too old to be a kid, especially here :)
16:15<andythenorth>I’m just trying to imagine Eddi|zuHause watching his kids learn stuff :P
16:16<@Alberth>:D
16:16<andythenorth>it’s very hard being patient with them
16:16<Eddi|zuHause>i don't think that'll be an actual issue
16:19<andythenorth>hmm
16:19<andythenorth>a general purpose import with some kind of ‘no-output’ would be more useful than special casing the cargo table :P
16:20<andythenorth>then for example, industry count variable could be prevented from failing more easily :P
16:20<andythenorth>otoh, parsing too many imports destroys the gain from parsing less stuff
16:25<andythenorth>parsing for constants would be much slower than just providing the relevant python data structures directly?
16:27<Eddi|zuHause>parsing is the same for any kind of output
16:28<Eddi|zuHause>you have to do lexical and syntactic analysis anyway, you maybe can leave out some steps in the semantical analaysis, but most things you have to do as well
16:29<Eddi|zuHause>anyway, the header processing takes a siginificant time for cets, but if you combine it with make -j <n> then you still make a net gain
16:30<andythenorth>so parsing the ctt versus importing equivalent python dict?
16:38-!-frosch123 [~frosch@frnk-4d01c1d3.pool.mediaWays.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:38-!-Snail [~jacopocol@cpe-74-73-132-105.nyc.res.rr.com] has quit [Quit: Snail]
16:42-!-oskari89 [oskari89@83-102-63-32.bb.dnainternet.fi] has quit []
16:45<andythenorth>hmm
16:45<andythenorth>constant_numbers already contains ottd string IDs
16:46<andythenorth>wonder if it’s possible / wise to append grf-specific string IDs
17:02<@Alberth>you definitely want to have checks you're not re-using anything that already exists
17:02<@Alberth>as well as letting nml know it should not use some values for its own string stuff
17:03-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
17:03-!-Alberth [~hat@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
17:04*andythenorth looks for the string stuff
17:05-!-sla_ro|master [slamaster@89.137.74.191] has quit []
17:11*andythenorth looks for a bed
17:11-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has quit [Quit: andythenorth]
17:14-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has joined #openttd
17:15-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has quit [Ping timeout: 480 seconds]
17:15-!-KWKdesign [~KWKdesign@pool-108-52-130-213.phlapa.fios.verizon.net] has joined #openttd
17:15<andythenorth>urgh
17:16<andythenorth>I just invented a system which patches and compiles nml as part of every newgrf compile
17:16<andythenorth>:P
17:16<andythenorth>and it’s moderately plausible
17:16<@planetmaker>uh...
17:16<andythenorth>because obviously modifying the compiler before the compile is wise
17:16<andythenorth>all the best people do it :P
17:17<@planetmaker>well, I can't do that on the CF as it's setup now. I can rather support an nml fork
17:18<@planetmaker>unless... you get a separate checkout of nml, too
17:18<@planetmaker>well...
17:19<andythenorth>do you think this is a sign?
17:20<andythenorth>there might be a better way :P
17:21<@planetmaker>no, I actually think it's a shortcoming of the CF. You should be able to do whatever weired things you want to do
17:21<@planetmaker>without me having to worry :
17:21<andythenorth>ha
17:21<andythenorth>but still, patching nml during the compile is batshit crazy
17:22<LordAro>^
17:23<andythenorth>I might try and extend nml to read additional constants
17:23<andythenorth>passing it a json file seems like a quick route to try
17:24<andythenorth>that should cover named parameters, ctt and rtt
17:25<andythenorth>strings I’m not sure, I read the nml string handling src, but none the wiser on how identifiers are resolved reliably to newgrf string IDs
17:26<Wolf01>'night all
17:26-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
17:28<Eddi|zuHause>i have an nml fork
17:29<Eddi|zuHause>but i'm scared of updating because i can't find a python3-pillow package
17:31<andythenorth>I am scared of updating too, for similar reason
17:31<LordAro>#archmasterrace
17:33<Eddi|zuHause>you should be banned for even thinking of putting those words together
17:34<LordAro>:(
17:34<LordAro>http://pillow.readthedocs.org/en/latest/installation.html#simple-installation
17:35<LordAro>seems easy enough
17:46<@planetmaker>Eddi|zuHause, but if there were no python3-pillow we'd not have been able to do the conversion
17:46<@planetmaker>it's readily available.
17:47<@planetmaker>python3-pillow.x86_64 : Python 3 image processing library
17:47-!-glx is now known as Guest13004
17:47-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
17:47-!-mode/#openttd [+v glx] by ChanServ
17:48<Eddi|zuHause># zypper search python3-pillow
17:48<Eddi|zuHause>No packages found.
17:48<@planetmaker>then pip install it
17:49<Xaroth|Work>most python packages work better when installed through pip tbqfh
17:50<Xaroth|Work>(most distros using outdated versions etc)
17:51<@planetmaker>seems I pip installed it on devzone, too
17:53-!-Guest13004 [~glx@000128ec.user.oftc.net] has quit [Ping timeout: 480 seconds]
18:02-!-gelignite [~gelignite@i528C3082.versanet.de] has joined #openttd
18:02-!-KritiK [~Maxim@0001264a.user.oftc.net] has quit [Quit: Leaving]
18:04<andythenorth>bye
18:04-!-andythenorth [~Andy@cpc10-aztw26-2-0-cust867.18-1.cable.virginm.net] has quit [Quit: andythenorth]
18:30-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
18:42-!-Haube1 [~michi@77-20-0-12-dynip.superkabel.de] has joined #openttd
18:42-!-Haube1 [~michi@77-20-0-12-dynip.superkabel.de] has quit [Read error: Connection reset by peer]
18:44-!-Haube [~michi@77-20-0-12-dynip.superkabel.de] has quit [Ping timeout: 480 seconds]
18:48-!-Progman [~progman@p57A181D0.dip0.t-ipconnect.de] has joined #openttd
18:48-!-Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Quit: Leaving]
19:02-!-iamtakin1iteasy [~Wooga@eientei.org] has quit [Ping timeout: 480 seconds]
19:14-!-Brumi [~quassel@78-131-41-191.pool.digikabel.hu] has quit []
19:15<@planetmaker>qports
19:15<@planetmaker>@ports
19:15<@DorpsGek>planetmaker: OpenTTD uses TCP and UDP port 3979 for server <-> client communication, UDP port 3978 for masterserver (advertise) communication (outbound), and TCP port 3978 for content service, a.k.a. BaNaNaS (outbound)
19:18-!-zeknurn [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has quit [Read error: Connection reset by peer]
19:18-!-gelignite [~gelignite@i528C3082.versanet.de] has quit [Quit: http://bit.ly/nkczDT]
19:20-!-zeknurn [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has joined #openttd
19:30-!-yorick [~yorick@ip51cd0513.speed.planet.nl] has quit [Remote host closed the connection]
19:42-!-luaduck_zzz [~luaduck@0001c465.user.oftc.net] has quit [Quit: OH MY GOD ZNC IS SO FUCKING AWESOME]
19:50-!-theholyduck [~theholydu@172.245.30.36] has quit [Ping timeout: 480 seconds]
19:53-!-luaduck_zzz [~luaduck@0001c465.user.oftc.net] has joined #openttd
19:53-!-luaduck_zzz is now known as luaduck
20:08-!-ccfreak2k [~ccfreak2k@haqua.4chan.fm] has quit [Read error: Operation timed out]
20:09-!-pthagnar [~pthagnar@cpc7-pres17-2-0-cust28.18-3.cable.virginm.net] has quit [Quit: Leaving]
20:30-!-Progman [~progman@p57A181D0.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
20:34-!-Snail [~jacopocol@cpe-74-73-132-105.nyc.res.rr.com] has joined #openttd
20:46-!-ccfreak2k [~ccfreak2k@haqua.4chan.fm] has joined #openttd
21:15-!-MJP [~mjp@hq.z77.fr] has quit [Ping timeout: 480 seconds]
21:16-!-Dan9550 [~dan9550@5.155.dsl.mel.iprimus.net.au] has joined #openttd
21:24-!-Pikka [~Octomom@d110-32-18-190.rdl800.qld.optusnet.com.au] has quit [Read error: Connection reset by peer]
22:02-!-George|2 [~George@185.43.94.91] has joined #openttd
22:02-!-George is now known as Guest13019
22:02-!-George|2 is now known as George
22:02-!-George|2 is "(unknown)" on (unknown)
22:08-!-Guest13019 [~George@185.43.94.91] has quit [Ping timeout: 480 seconds]
22:40-!-glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
22:49-!-HerzogDeXtEr1 [~flex@i59F6C9E2.versanet.de] has quit [Quit: Leaving.]
22:59-!-Hazzard_ [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has joined #openttd
23:06-!-Hazzard [~quassel@c-67-174-253-44.hsd1.ca.comcast.net] has quit [Ping timeout: 480 seconds]
23:11-!-theholyduck [~theholydu@172.245.30.36] has joined #openttd
---Logclosed Mon Jun 09 00:00:53 2014