Back to Home / #openttd / 2016 / 04 / Prev Day | Next Day
#openttd IRC Logs for 2016-04-16

---Logopened Sat Apr 16 00:00:30 2016
00:02-!-JacobD88 [] has joined #openttd
00:02-!-JacobD88 [] has quit []
00:53-!-Clockworker_ [] has joined #openttd
01:00-!-Clockworker [] has quit [Ping timeout: 480 seconds]
01:02-!-Clockworker [Clockworke@] has joined #openttd
01:08-!-Clockworker_ [] has quit [Ping timeout: 480 seconds]
01:25-!-sla_ro|master [slamaster@] has joined #openttd
01:33-!-MonkeyDronez [~Monkey@] has joined #openttd
01:42-!-sim-al2 [] has quit [Ping timeout: 480 seconds]
01:58-!-Arveen [] has joined #openttd
02:07-!-Progman [] has joined #openttd
02:18-!-Supercheese [] has joined #openttd
02:25-!-Gjax [] has quit [Ping timeout: 480 seconds]
02:27-!-Gjax [] has joined #openttd
02:39-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:614f:f546:4423:155b] has joined #openttd
02:39-!-_johannes [] has joined #openttd
03:08-!-_johannes [] has quit [Quit: Lost terminal]
03:33-!-Hiddenfunstuff [] has joined #openttd
03:38-!-Supercheese [] has quit [Quit: Valete omnes]
03:57-!-Mucht [] has joined #openttd
03:58-!-johannes__ [] has joined #openttd
04:12<@peter1138>i don't think there are many victorians around today
04:12-!-Samu [] has joined #openttd
04:13<@peter1138>ah, the last one died last year
04:14<johannes__>is openttd_main() the entry point for all operating systems?
04:25-!-frosch123 [] has joined #openttd
04:30-!-sla_ro|master [slamaster@] has quit []
04:37-!-Gjax [] has quit [Read error: Connection reset by peer]
04:46-!-andythenorth [] has joined #openttd
04:48-!-gelignite [] has joined #openttd
05:06-!-andythenorth [] has quit [Ping timeout: 480 seconds]
05:26-!-andythenorth [] has joined #openttd
05:27-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
05:27-!-mode/#openttd [+o Alberth] by ChanServ
05:41<johannes__>does someone know if openttd_main() is the entry point for all operating systems?
05:42<johannes__>I mean, does it "finally" get called by all OS?
05:42<frosch123>i would hope so
05:54-!-andythenorth [] has quit [Quit: andythenorth]
05:59-!-andythenorth [] has joined #openttd
06:08<Samu>I have a question about the Write function here;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=35aa952c36ca59f3daa5800aced0125c1f1ec0f0#l2515
06:09<Samu>There are many Writers
06:09<Samu>void FileWriter::Write(byte * buf, size_t size)
06:09<Samu>void LZMASaveFilter::Write(byte * buf, size_t size)
06:09<Samu>void LZOSaveFilter::Write(byte * buf, size_t size)
06:09<Samu>void NoCompSaveFilter::Write(byte * buf, size_t size)
06:09<Samu>void PacketWriter::Write(byte * buf, size_t size)
06:09<Samu>void ZlibSaveFilter::Write(byte * buf, size_t size)
06:10<Samu>how does that function know which write function will be used?
06:14<@Alberth>code doesn't say?
06:15<Samu>i want to create another SaveFileToDisk function to deal exclusively with PacketWriter only
06:15<Samu>but that Write over there is confusing me
06:17<Samu>I'm duplicating all the save thread related functions to have one thread entirely dedicated for the network
06:18<Samu>it's confusing me
06:19<Samu>i only want to deal with PacketWriter if I am understanding this part right, I don't want to duplicate the others
06:20<Samu>but maybe i'm understanding it wrong
06:20<@Alberth>duplicating large amounts of code is a bad direction no matter what
06:21*andythenorth ponders
06:21<@Alberth>I never studied the save code in detail
06:21<@Alberth>but somewhere must be set, would be my guess
06:24<johannes__>dumb question: A trains must first visit station A, than B. if it enters station A, and only one track of A leads to B, does it take that track, or might it also take the wrong one?
06:26<@Alberth>the latter
06:27<@Alberth>trains do not look ahead to next orders
06:28<monsted>that sounds like bad station design :)
06:36<johannes__>ah ok I had a two way railway line where the directions changed in a station
06:36<johannes__>the trains always took the wrong track...
06:41-!-oskari89 [] has joined #openttd
06:42-!-Wolf01 [] has joined #openttd
06:54-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
06:59-!-tycoondemon [] has joined #openttd
07:03*Wolf01 ended up playing factorio 'til 3.30 again this night :|
07:09-!-Wolf03 [] has joined #openttd
07:09-!-Wolf01 is now known as Guest690
07:09-!-Wolf03 is now known as Wolf01
07:10-!-HerzogDeXtEr [] has joined #openttd
07:11<frosch123>he, i didn't know two-way signals even existed
07:12<frosch123>i tried building them in my first train game, but they did not appear to work, so i assumed there are only one-way ones :p
07:12-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
07:12<Wolf01>bah, I'm moving the entire refinery, boring
07:13<frosch123>it needs some tectonic technology to move ground :)
07:13-!-Guest690 [] has quit [Ping timeout: 480 seconds]
07:14<Wolf01>also I wanted to move the engines production plant but it requires lubricant, which can only be transported with pipes (I don't want to install the mod for barrels)
07:15<frosch123>haha, yeah, if you find a long pipe in my factory, it's most likely lubricant
07:17-!-Gjax [] has joined #openttd
07:19-!-tycoondemon [] has joined #openttd
07:20<Wolf01>I can't wait for the 0.13, I really need the blueprint book
07:20<Wolf01>I have 2 rows of blueprints in the inventory
07:23-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:614f:f546:4423:155b] has quit [Quit: Leaving]
07:25-!-Flygon [] has quit [Read error: Connection reset by peer]
07:29-!-Flygon [] has joined #openttd
07:47<johannes__>would it be ok to add *pdf to openttd's gitignore?
07:47<johannes__>I meant *.pdf
07:48<johannes__>the reason I ask because I work with an exporter which creates PDF files, and I usually work in the source tree
07:48<johannes__>I know it's a stupid reason to do this just for one person, but are we ever going to commit PDF files?
07:50<@Alberth>given that git is a distributed VCS, I see no objection adding that to your setup
07:50<@Alberth>ie why would it need to be in the central repo?
07:52<johannes__>Alberth: where could I put it otherwise?
07:53<@Alberth>how would I know, i hate git sufficiently not to know such things
07:53<johannes__>what do you prefer as a VCS?
07:53<@Alberth>but it's a disitributed VCS, I would expect people can have their own setup, or it's more broken than I think
07:54<@Alberth>oh, svn or hg, or so
07:56<johannes__>is this file auto-generated?
07:56<@Alberth>euhm, "auto" as in "run a script" :)
07:56<johannes__>why is it under VCS then?
07:57<@Alberth>save people the trouble generating it?
07:57<johannes__>that's not much trouble saved :P
07:57<@Alberth>at least, that's the usual reason to save generated files in vcs
07:57<johannes__>ok, how do I regenerate it?
07:58<@Alberth>projects/generate or projects/generate.vbs
07:59<johannes__>ok, it told me that a header was missing in the source.list... however, this header is only used for an external tool I created
08:00<johannes__>how do I tell projects/generate that this header is not meant to be compiled into OpenTTD?
08:01<@Alberth>don't put foreign files into openttd?
08:02<johannes__>ok, but that one exporter shares some files with openttd
08:03<johannes__>so should I really put the exporter into an extra repo and then do something like "make PATH_TO_OPENTTD=../openttd" ?
08:04<johannes__>or should we, instead, offer a "src/external_tools" ?
08:11<@Alberth>you could look at how eg strgen works there
08:22-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
08:24<johannes__>hmm it's listed in ./projects/strgen_vs100.vcxproj.filters
08:24<@planetmaker>johannes__, add it to *your* global .gitignore
08:25<johannes__>planetmaker: I could, but what if I'll make another repository where PDF files are stored?
08:25<@planetmaker>you ignore all pdf except those which you explicitly track
08:25<@planetmaker>tracked files are never ignored
08:25<johannes__>what I rather need would be a second .gitignore in the source tree, but I think that's not possible
08:26<@Alberth>that sounds weird for a DVCS
08:26<johannes__>planetmaker: would be a solution, though I might then forget to commit PDF files
08:27<@Alberth>ignore the precise path?
08:27<@Alberth>unless you name all your PDF files the same :)
08:28<johannes__>you mean the absolute system path?
08:29<@Alberth>but it's still weird; it means the central repo would need to have ignored files for all IDEs that dump data in the directory???
08:30<@Alberth>ie add ".eclipse-something" because a developer uses eclipse???
08:31<@Alberth>or "vcs-studio-whatever" because someone is using visual studio?
08:32<johannes__>I'm not sure what you mean, but it does not sound like a good solution ;)
08:32<@Alberth>and nobody in the entire DVCS community stumbled upon this problem, and figured out a solution?
08:33<johannes__>I think I'll just make a "work" subfolder in my openttd directory, where I add my own .gitignore
08:36<@planetmaker>though I wonder: why do you have PDFs in the OpenTTD dir?
08:41<Wolf01>frosch123, how do you split the stuff with logistic robots? I mean, I have some passive providers at a central station, and I would like to have a cache after some distance, the cache should be a provider too, but if it's a provider it can't be a requester
08:41<johannes__>planetmaker: they just came from the railroad network graph exporter, just outfiles that should not be checked in
08:44<frosch123>Wolf01: i hate logistic robots :) i only use them for chest<->character transport
08:45<Wolf01>I use them on all the new outposts and I started to convert the main base too
08:48-!-Gjax [] has quit [Quit: Leaving]
08:58<johannes__>If you write an external tool, which is located in the openttd source tree, is there a need to follow the openttd coding conventions?
09:00<frosch123>likely there isn't. but using a good coding style always helps :p
09:03-!-andythenorth [] has quit [Quit: andythenorth]
09:10-!-andythenorth [] has joined #openttd
09:11<Samu>I cant do this :(
09:12<Samu>i thought this would be simple
09:12<Samu>duplicating code is turning into hell
09:13<andythenorth>Samu: it’s never simple :D
09:14<Samu>i need to undestand the structure currently in place
09:14<Samu>especially the _sl part
09:15<Samu>and this part is basically the whole point of saveload.cpp
09:15<andythenorth>will andythenorth play openttd?
09:15<andythenorth>or download the factorio demo again?
09:16<Samu>i need a second dumper to copy the game state into there
09:17<Samu>the pointers or whatever must know which dumper to write to
09:18<Samu>i dont want it to create a second dumper only to have it write to the first _(
09:18<Samu>how do I make this happen
09:25<frosch123>andythenorth: buy more lego?
09:25<andythenorth>frosch123 lego is currently for selling not buying :)
09:25<Wolf01>wrong answer
09:27<frosch123>the world is changing :p
09:28<andythenorth>once lego is sold, lego can be bought
09:28<andythenorth>it’s some kind of rain/sun, ying/yang thing
09:28<andythenorth>all must be balanced
09:29*andythenorth bbl etc
09:29-!-andythenorth [] has quit [Quit: andythenorth]
09:33-!-tycoondemon [] has joined #openttd
09:36-!-oskari89 [] has quit []
09:37-!-sim-al2 [] has joined #openttd
09:42<Samu>some comments in the code is funny
09:42<Samu>* Do something of which I have no idea what it is :P
09:43<Samu>it is calculating an autolength for a stub chunk handler i think
09:49-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
09:53-!-Quatroking [] has joined #openttd
09:55<+michi_cc>johannes__: There's also .git/info/excludes as a repo-specific, but non-tracked ignore file.
10:00-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:1967:77b8:b688:9e34] has joined #openttd
10:13-!-tycoondemon [] has joined #openttd
10:18<Samu>bah, what i didn't want to do is what I have to do
10:18<Samu>deal with all the chunks
10:18<Samu>how many chunks are there in a save? 50?
10:20<Samu>there's even chunks inside chunks
10:23-!-Gjax [] has joined #openttd
10:27-!-Pikka [~Octomom@] has quit [Read error: Connection reset by peer]
10:43<Samu>i give up, too confusing for me
10:45-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
10:47<Samu>i dont want to edit all and every chunk to make this work :(
10:48<Samu>so, i'm stopping for now
10:53<frosch123>don't touch the chunks :)
10:53<frosch123>autosave works by first saving an uncompressed save into a memory buffer
10:53<frosch123>compression and writing to disk can then happen in parallel while the game advances
10:54<frosch123>it sounds like you try to make the chunks while the game advances, but that won't work
10:54<frosch123>you cannot make a snapshot of a moving source
11:01-!-tycoondemon [] has joined #openttd
11:09<johannes__>michi_cc: Many thanks, that worked
11:09<johannes__>Btw: How close are you guys looking at the coding guidelines if one submits a patch?
11:09<@Alberth>very close :)
11:09<johannes__>I recall comitting for the Qt community, they were criticizing every single brace that was wrong :P
11:10-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
11:10<johannes__>are you also looking at every single brace? :D
11:10<frosch123>if it fails with whitespace, chances are high i won't even look at it
11:10<frosch123>(as in tabs vs spaces)
11:11<johannes__>e.g. I saw tons of "if (x) y;" in the code, though the guidelines say "if (x) { <newline> y; <newline> }"
11:12<frosch123>yeah, sometimes the guideline is wrong :p
11:13-!-tycoondemon [] has joined #openttd
11:13<Wolf01>the guideline is never wrong
11:13<frosch123>both "if (x) y;" and "if (x) {\ny;\n}" are fine. but "if (x)\ny;" is not
11:15<Samu>frosch123: I was trying to find a way to have 2 dumps in memory
11:15<Wolf01>also conditionals without braces have a high chance of obfuscation, this is not the case but I've seen people writing everything on one line (multiple statements) and then bitch because "one statement is always executed even if the condition is false"
11:16<Samu>and have 2 writers working, 1 for each dump
11:16<Samu>but I can't manage to create 2 dumps :8
11:16<frosch123>Wolf01: while it is true that some coding styles try to prevent newbie-errors. ottd's style does not
11:17<frosch123>Samu: don't try to create the dumps in parallel
11:17<frosch123>just store the result in different places
11:19<frosch123>Samu: split SaveLoadParams into what is used for the Dumper, and another part which is used for compression
11:19<frosch123>MemoryDumper *dumper; <- this is already a pointer, you can just transfer it to the other structure when the dump is done, and you can start compression
11:22-!-andythenorth [] has joined #openttd
11:23<Wolf01>andy, did you already purchase the maze?
11:24-!-zeknurn [] has quit [Ping timeout: 480 seconds]
11:25<Samu>so, your idea is to re-use the dumper currently active, and prevent it from being deleted by the first writer?
11:26<andythenorth>Wolf01: ?
11:27<johannes__>frosch123: when should a file start with /* $Id$ */ ?
11:29<Wolf01>ha! I just found that the vip points have the same value with different currency, I have 130€ and £130, which obviously is not the same
11:30<andythenorth>Wolf01: ha we have a wooden maze like that, it’s a very annoying puzzle
11:30<@Alberth>johannes__: always, to get the revision in the file
11:30<andythenorth>won’t be buying that :)
11:30<Wolf01>I have a wooden one too :)
11:30<johannes__>Alberth: ok
11:31<johannes__>Alberth: even if the file is only part of an external utility?
11:32<@Alberth>you want to add files to the repo that cannot be used?
11:32<@Alberth>what does the project want with those?
11:34<Wolf01> the bgm reminds me of train fever
11:35<johannes__>Alberth: I don't tknow, should external tools be built/shipped with the core?
11:38<Eddi|zuHause>Wolf01: i don't quite see the connection
11:38<Wolf01>about at 2 minutes
11:39<@Alberth>I have absolutely no idea what you're doing or trying to do. At that question in the general sense, my answer would be no, just like it doesn't ship with an OS
11:39<@Alberth>or a desktop or a compiler or a debugger, and so on
11:40-!-MonkeyDronez [~Monkey@] has quit [Quit: Leaving]
11:40<@Alberth>at least until we make an OpenTTD OS :)
11:41<Wolf01>just ship it with dos and enough drivers to use expanded memory, sound and networking
11:42<sim-al2>Isn't expanded memory on DOS like 1 Mb instead of 640 kb?
11:43<Wolf01>it's just to load drivers and left all the possible ram to the application
11:43<Eddi|zuHause>sim-al2: there was expanded and extended memory, but i don't remember which was which
11:44<sim-al2>Oh ok, my first computer was a Windows 98 machine with at least 64 Mb of RAM (Not 100% sure on that, might have been more)
11:44<Eddi|zuHause>sim-al2: but in general, most of the 640-1024MB range was reserved for the OS, and the parts after that could be used again
11:45<sim-al2>I don't miss Win 98's weirdness much tbh
11:45<Eddi|zuHause>err... not MB, kB
11:45<@Alberth>when memory was counted in sane quantities :p
11:46<Eddi|zuHause>i have 12GB. and then there are 32bit processes that run out of their 4GB range
11:46<Wolf01>yes, it's extended, not expansed, my fault
11:46-!-zeknurn [] has joined #openttd
11:46-!-Sylf [] has quit [Remote host closed the connection]
11:47<sim-al2>I did use a school computer with Win 3.1 on it, rather interesting interface
11:47<Wolf01>I started using computers with win 3.1
11:48<johannes__>Alberth: what I write is a tool which converts dumps (that you can create with openttd) into pdf files
11:48<Eddi|zuHause>when i started to get into computers, we had DOS 5.0
11:48<Wolf01>or better, I started from dos, because playing with windows wasn't really possible
11:48<johannes__>Alberth: should that be shipped with openttd or not?
11:48<Eddi|zuHause>that was before they screwed everything up with DOS 6.xx
11:49<Eddi|zuHause>after which we switched to Novell DOS 7
11:49-!-Defaultti [] has quit [Quit: Quitting.]
11:49<Eddi|zuHause>which was a slight problem for games which relied on microsoft bugs...
11:50-!-andythenorth [] has quit [Quit: andythenorth]
11:51<@Alberth>johannes__: I would say the dump should be text (in an as simple format as possible), so anyone can write a program. Your program then becomes one of the options.
11:52<sim-al2>I did like how MacOS 7, 8, and 9 look really similar
11:52<johannes__>Alberth: it's binary dump, a human could not infer much of these numbers anyways
11:52<sim-al2>At least until you went to load a program up, or start Netscape Navigator...
11:53<johannes__>Alberth: also, the converter needs many arguments, and I don't want to add them to the openttd argument list
11:53<@Alberth>say I want a different format than pdf
11:54<@Alberth>how do I do that?
11:54<@Alberth>bla --> pdf sounds so very closed
11:54<johannes__>it's actually binary-dump -> .dot -> PDF
11:54<johannes__>however, there will be an argument to the tool to make binary-dump -> tikz -> PDF
11:55<@Alberth>right, so it produces a graph?
11:55<@Alberth>you can write a graph as text, right?
11:55<johannes__>.dot is a text format
11:55<@Alberth>I know
11:55<@Alberth>I wonder if .dot is the right solution here
11:56<johannes__>it's not :)
11:56<johannes__>I just use it temporarily, because it's easy
11:56<@Alberth>I am not wondering about quality, just openness
11:56<johannes__>the future way will be to use tikz
11:57<johannes__>tikz allows more nice features
11:57<@Alberth>in my view, openttd should write the data in an open format where people can write their own programs for further processing
11:58<@Alberth>I think your needs would be better served with keeping that processing separate from openttd
11:58<johannes__>the format of the binary dump is open (and easy to understand)
11:58<@Alberth>eg a project at the devzone
11:58<Samu>frosch123: how do I [16:19] <frosch123> Samu: split SaveLoadParams into what is used for the Dumper, and another part which is used for compression, sorry for being noob
11:59<johannes__>Alberth: I don't see the point, since the binary dump could be used by any other script, so they are completely open
12:00<@Alberth>yeah, my main worry is that number of people that can write a program that reads a file with ascii numbers is >>> than number of people that can write a program that reads binary values
12:00<Samu>1 structure for the dumper
12:00<Samu>1 structure for the compression, but the compression accesses the same code the dumper also accesses :(
12:01*johannes__ disagrees
12:01<Samu>ok :(
12:01<johannes__>not to you Samu :)
12:02<johannes__>Alberth: binary number serializing is just a bunch of fread/fwrite calls in C, for XML/whitespace you have to do a lot of syntax parsing
12:02<@Alberth>how is a binary format easy to understand, and the same data in text is not?
12:02<johannes__>like e.g.: is there a space before the number, is there a new tag...
12:02-!-andythenorth [] has joined #openttd
12:02<@Alberth>most people do not use C
12:03<@Alberth>python, lua, java, c#
12:03<@Alberth>etc etc
12:03<@Alberth>fread/fwrite will fail horribly at different endian systems
12:03<johannes__>Alberth: for me, as I program in C, it was by far the easiest to simply dump the data binary
12:04<@Alberth>fwrite(&myint) vs fprintf(.. myint) ?
12:04<johannes__>well what do you propose, XML, or just the numbers space separated?
12:04<@Alberth>the latter
12:05<andythenorth>json is the new xml
12:05<@Alberth>depends on what data you have
12:05<andythenorth>nah, like xml, you should use it even if not appropriate
12:05<@Alberth>yaml is a superset of json :)
12:05<andythenorth>the weird thing about json is that it’s koolaid that works
12:06<johannes__>see here:
12:06<Eddi|zuHause>put json into xml!
12:06<andythenorth>it’s actually completely functional and usable
12:06<johannes__>that's the data I need to serialize
12:06<andythenorth>proving that a javascript stopped clock still tells the right time once a day
12:06<johannes__>I just serialize one "struct railnet_file_info"
12:07-!-Sylf [] has joined #openttd
12:07<@Alberth>json would work, by the looks of it
12:07<Eddi|zuHause>johannes__: sounds like the perfect usecase for some format that supports dicts...
12:08<johannes__>Let's make a competition
12:08<johannes__>Everyone can submit a version equivalent to my C code
12:09<johannes__>the one with the fewest linces of code wins
12:09<andythenorth>wtf are “agile programming languages”?
12:09*andythenorth reading yaml spec
12:09<@Alberth>oh, that's easy, just write everything at one line :p
12:09-!-Snail [] has joined #openttd
12:09<johannes__>ok, the version with the smallest code which is still human readable
12:10<Eddi|zuHause>i haven't played code golf in ages :p
12:10<Samu>explain me what the code is doing here please;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=35aa952c36ca59f3daa5800aced0125c1f1ec0f0#l2504
12:10<Samu>_sl.sf->Write((byte*)hdr, sizeof(hdr));
12:10<Samu>what is this line doing
12:11<@Alberth>the fact that you produce json doesn't mean you need to have a json library for encoding, the output must just match the json syntax, so just some printfs will do the trick
12:11<Eddi|zuHause>andythenorth: just what i expected. a pointless buzzword
12:11<Eddi|zuHause>definition by example.
12:11<@Alberth>Samu: random guess, it write the header
12:11<johannes__>Yes but your code must also be able to read the code
12:12<johannes__>or read the dump/text-file
12:12<johannes__>read + write
12:12<andythenorth>someone missed the memo on “agile is many things, but it’s not specific tools” :P
12:12<Samu> _sl.sf = fmt->init_write(_sl.sf, compression);
12:13<andythenorth>also, this, I wish to avoid
12:13<@Alberth>johannes__: and you're afraid there is no json library for an arbitrary language? bottom of the page
12:13<Eddi|zuHause>andythenorth: it's the perfect way to have a word to mean exactly what you want it to mean, and flame everybody who doesn't have the exact same interpretation
12:14<johannes__>Alberth: I'm not
12:14<johannes__>Alberth: I just think it will produce much larger code than a bunch of fwrite/fread
12:14<andythenorth>maybe I should port eints to Bootstrap 3
12:14<Eddi|zuHause>andythenorth: my buzzometer just exploded
12:15<andythenorth>Eddi|zuHause: I had to hit a panic button
12:15<andythenorth>there is something in there somewhere about software contracts
12:15<andythenorth>and ‘Business and Technology must use the same language’
12:16<Eddi|zuHause>that's a perfect plan to ensure that neither side understands what they're talking about :p
12:16<johannes__>If we make this a coding golf, I guess the language must be in C ?
12:16<Samu>hum... :(
12:17*andythenorth is glad he doesn’t work in a proper software business
12:17<johannes__>even if you use another language, the openttd core is in C, so the code must show how to easily use the C data
12:17<Samu>i don't understand what frosch123 meant with split the parameters
12:17<Samu>i dont know what is to be splited
12:17<@Alberth>how is replacing fwrite() by a bunch of printf() much larger in code?
12:18<@Alberth>or are you talking at the reading side?
12:18<Samu>how do i find what the Dumper uses?
12:18<Samu>so confusing
12:18<johannes__>for the writing thing, I guess it's not much harder
12:18<johannes__>yes, for the reading thing...
12:18<@Alberth>Python: import json; data = json.load('blah_file') done
12:19<frosch123>Samu: only SaveFileToDisk runs in a thread
12:19<frosch123>remove everything that SaveFileToDisk needs from _sl, and put it into a structure that is passed to SaveFileToDisk
12:19<johannes__>Alberth: you're saying write the data with C, but import with Python?
12:19<Samu>so that's what I was attempting to do
12:20<Samu>I had a _sm structure
12:20<Samu>but ended up having to deal with chunks somehow
12:20<frosch123>in the end you will likely have the Dumper ni both structures
12:20<@Alberth>johannes__: they're two different programs with a common file format, why would the read need to be in the same language?
12:20<Eddi|zuHause>johannes__: i think what he's saying is that other people that might want to write a different visualization module might write that in python
12:20<frosch123>first you do the dump, then you transfer the dumper to the other structure and start the thread
12:20<@Alberth>also, find a C library for json
12:21<@Alberth> only has 21 available
12:22<johannes__>Alberth: that doesn't count, the json library has many lines of code :P
12:22<Samu>_sm structure was however, an entire copy of _sl
12:22<Samu>i don't know how to distinguish what's needed for the dump
12:22<@Alberth>right, and you write the dot -> pdf convertor from the ground up too?
12:22<@Alberth>or the C runtime library?
12:23<@Alberth>most likely, most linucs have a libjson by default already
12:23<johannes__>Alberth: it maybe doable with json, but then everyone will need an additional dependency (a jason library)
12:23<johannes__>How is it more freedom/openness then if you force people to use a json library?
12:23<@Alberth>no, python json is in the standard library
12:24<johannes__>C/C++ json is not
12:24-!-Arveen [] has quit [Quit: Nettalk6 -]
12:24<_dp_>working with json in C is painful, it completely lacks necessary types
12:24<@Alberth>johannes__: why do you think only C is a viable language for programming ?
12:25<johannes__>Alberth: I don't think, but you also have to think about C/C++ programmers...
12:26<johannes__>has bash json by default?
12:26<johannes__>it's not built-in I guess
12:26<_dp_>though even in C I'd still prefer to work with json then some custom bs format
12:26<frosch123>Samu: comment out SaveFileToDisk, then remove members from _sl until it no longer compiles :p
12:26<@Alberth>bash? that's a command processor
12:26<@Alberth>aka shell
12:26<@Alberth>unless you type commands in json :p
12:26<Samu>hmm ok let's see what happens
12:27*andythenorth is perplexed :)
12:27<johannes__>you can use bash with scripts, and then it's a language, too
12:27<@Alberth>well, if you insist, json is an open documented format, go ahead, write a json parser in bash
12:27<johannes__>next thing is perl... I guess you can install a module, but do you have it by default?
12:28<@Alberth>I have perl, but not by choice
12:28<@Alberth>some programs at my machine think they need it :(
12:29<johannes__>I think it's optional:
12:29<johannes__>and JAVA also has no JSON by default...
12:30-!-HerzogDeXtEr1 [] has joined #openttd
12:30<@Alberth>it's a text format, open and documented, if you want you can write a json library yourself
12:30<johannes__>yes, but that takes much more time than writing a few fread calls :P
12:31<johannes__>(and these are more LOCs than)
12:31<@Alberth>oh dear, maybe you shouldn't have started hacking openttd at all, that would have saved sooo much time
12:32*andythenorth considers playing OpenTTD
12:32<andythenorth>I have saved a lot of time by not working on NotRoadTypes this week
12:32<johannes__>at least boost has a json library...
12:32<@Alberth>sounds more productive andy :)
12:33*andythenorth is diligently deleting browser bookmarks
12:36-!-HerzogDeXtEr [] has quit [Ping timeout: 480 seconds]
12:41<johannes__>can I add boost as a dependency to openttd? It would only be needed for the (optional) json dumper then
12:42<frosch123>openttd does not bundle any tools
12:42<frosch123>they are all separate
12:43<johannes__>the dumper is inside a video driver
12:43<johannes__>it must be in the core
12:43<@Alberth>just printf() json text
12:44<frosch123>openttd sends json between admin port and game scripts
12:44<frosch123>json is not unknown to ottd
12:45<V453000>I sinned :D did first digging into factorio mods ... just edited existing one, but ...
12:45<V453000>in compare to NML, this is ultra convenient and easy
12:45<johannes__>I see...
12:45<@Alberth>:O V :D
12:45<frosch123>V453000: did you add diagonal belts? :p
12:49<@Alberth>factorio modding wide open !
12:51<frosch123>V453000: no slugs
12:52<frosch123>all highest tier equipment should involve slugs
12:52<frosch123>slugs are tier 2 lubricant
12:53-!-andythenorth [] has quit [Quit: andythenorth]
12:56<Wolf01>also transportable
12:58<Wolf01>also why not a solar panel which works at night with the reflexed heat of the greenhouse effect? more you pollute, more energy you get
12:59<Samu>arf, i can't do this
12:59<Samu>the dump needs everything from SaveLoadParams
12:59<Samu>except the bool error
13:00<Wolf01>V453000, could you answer about my question of the signals? (signals in gui 2 lights, placed 3 lights; chain signals in gui 3 lights, placed 1 light)
13:01<V453000>fixed in .13
13:01-!-Clockworker_ [Clockworke@] has joined #openttd
13:01-!-Clockworker [Clockworke@] has quit [Read error: Connection reset by peer]
13:07-!-glx [] has joined #openttd
13:07-!-mode/#openttd [+v glx] by ChanServ
13:09-!-Arveen [] has joined #openttd
13:20-!-andythenorth [] has joined #openttd
13:27<andythenorth>FIRS does not have lubricant
13:27<andythenorth>maybe it should
13:27<Samu>sorry, i can't do this
13:27<andythenorth>or muolluscs
13:27<Samu>better stop
13:27<andythenorth>molluscs *
13:29<Samu>you have already told me what to do, but I can't figure out, it's time to give up :(
13:31<Samu>the dumper and the compressor work together, i can't figure a way to split them
13:36<Samu>the problem starts even before the chunks are in memory
13:37<@Alberth>supplies are lubricant?
13:37<Samu>DoSave function is giving me a headache, :o
13:37<@Alberth>yes, openttd code is complicated
13:38<@Alberth>it's not the best way to learn programming
13:38-!-Sacro [] has quit [Quit: leaving]
13:38<@Alberth>or even not good as first program to hack in
13:39-!-Sacro [] has joined #openttd
13:44*andythenorth is learning to program with openttd :)
13:45<@DorpsGek>Commit by translators :: r27540 trunk/src/lang/hebrew.txt (2016-04-16 19:45:37 +0200 )
13:45<@DorpsGek>-Update from Eints:
13:45<@DorpsGek>hebrew: 40 changes by dnd_man
14:17-!-smoke_fumus [~smoke_fum@] has quit [Ping timeout: 480 seconds]
14:30-!-qwebirc48165 [] has joined #openttd
14:36<qwebirc48165>Hi, I've got a question about newgfx: The downloads section of points to version 0.5.2, but has version 0.5.4. which is used by the corresponding arch linux package. Did someone forget to update the main page or is this done deliberately?
14:36<@Alberth>^ planetmaker
14:37<@Alberth>(not at all certain he'll show up any time soon, but he'll read it at some time)
14:38<qwebirc48165>The ingame 'check online content' function wants to update to 0.5.2 from 0.5.4 as well.
14:39<@Alberth>so it seems uploaded to bananas (the online content system) at least
14:39<qwebirc48165>@Alberth: No, it wants to 'update' to the older version
14:40<@Alberth>hmm, silly thing :p
14:40<@Alberth>but in general, it should be safe to use the latest version that you can find
14:41<@Alberth>changes are quite small, normally, you'll hardly notice them :)
14:43<@Alberth>check the changelog otherwise
14:44<andythenorth>is cat
14:46*andythenorth makes more UI library
14:47<andythenorth>probably 48 hours work in this since Tuesday :D
14:47-!-FLHerne [] has joined #openttd
14:47<andythenorth>+ the thinking when asleep :D
14:49-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:1967:77b8:b688:9e34] has quit [Quit: Leaving]
14:57-!-Wormnest [] has joined #openttd
14:57<@Alberth>sleeping and still working :)
14:58-!-zeknurn` [] has joined #openttd
14:59<Samu>well, i had another goal
15:00<Samu>the lzo "unexpected end of chunk" - how to deal with this, it only happens on the release x64 build
15:00<Samu>debug x64 and all the others work fine
15:02-!-Snail [] has quit [Quit: Snail]
15:02<Samu>it fails to load the first chunk, GLOG and then just says broken savegame, which isn't true
15:03<Samu>it's not broken, it loads on the other builds
15:03-!-zeknurn [] has quit [Ping timeout: 480 seconds]
15:03-!-zeknurn` is now known as zeknurn
15:05<Samu>if i can fix the lzo, i'll use the lzo filter instead of zlib
15:05-!-Snail [] has joined #openttd
15:05<Samu>it's even faster
15:06<frosch123>you can try run them with valgrind, assuming you use an os suitable for software development
15:07<frosch123>alternatively you can add tons of printf/couts and compare the output of debug/release build
15:07<frosch123>and try to figure out where they diverge
15:08-!-andythenorth [] has quit [Ping timeout: 480 seconds]
15:08-!-aard [] has joined #openttd
15:09<Samu>windows 10
15:09<frosch123>so you do not even have a tool to compare text output :p
15:11-!-Snail [] has quit [Quit: Snail]
15:30<johannes__>is there any tool to say: all trains of that group / that shared order list should have three passenger waggons and two post waggons?
15:31<johannes__>any ctrl+click or something?
15:31<frosch123>search for templated-based-autoreplace on the forums
15:36<johannes__>the patch never made it into the game, right?
16:10-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:16-!-FLHerne [] has quit [Quit: There's a real world out here!]
16:17-!-FLHerne [] has joined #openttd
16:29-!-johannes__ [] has quit [Quit: leaving]
16:40-!-Arveen [] has quit [Quit: Nettalk6 -]
16:41-!-aard [] has quit [Ping timeout: 480 seconds]
16:43-!-andythenorth [] has joined #openttd
16:44-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
16:44-!-andythenorth [] has left #openttd []
16:45-!-sla_ro|master [slamaster@] has joined #openttd
16:52-!-qwebirc48165 [] has quit [Quit: Page closed]
16:59-!-Defaultti [] has joined #openttd
17:03-!-aard [] has joined #openttd
17:03-!-Defaultti [] has quit []
17:09-!-Defaultti [] has joined #openttd
17:16-!-tycoondemon [] has quit [Ping timeout: 480 seconds]
17:29-!-sla_ro|master [slamaster@] has quit []
17:37-!-supermop [] has joined #openttd
17:46-!-Supercheese [] has joined #openttd
17:48<Samu>some variables are being writen as int8, some others are byte, i wonder if it makes a difference
17:57-!-Wormnest [] has quit [Quit: Leaving]
18:10-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:a407:e9be:afb3:515] has joined #openttd
18:11<@peter1138>signed vs unsigned
18:12<Samu>ok i think i found the chunk that causes problems for lzo
18:12<Samu>it's MAPT
18:12<Samu>can't be 100% sure though
18:18<Samu>i was checking two visual studios side by side, one with debug x64, the other with release x64
18:19<Samu>debug went through MAP5 and beyond
18:19<Samu>MAPT is before MAP5, and i don't recall release x64 doing anything after MAPT
18:20<Samu>what could this all mean'
18:20<Samu>i noticed they were following different code paths
18:20<Samu>but eventually were turning the same values anyway, up until there
18:21<Samu>some values were optimized, can't see them
18:29-!-FLHerne [] has quit [Quit: There's a real world out here!]
18:42<Samu>when a bool, like _sl.autosaveinprogress isn't assigned a value, what does it default to?
18:42<Samu>true? or false?
18:44-!-gelignite [] has quit [Quit:]
18:46<Samu>struct SaveLoadParams { bla; bla; bla; etc; bool autosaveinprogress; };
18:46<Samu>static SaveLoadParams _sl;
18:49-!-aard [] has quit [Read error: Connection reset by peer]
18:56-!-Hiddenfunstuff [] has quit [Quit: HydraIRC -> <- Would you like to know more?]
18:59-!-Sacro [] has quit [Remote host closed the connection]
19:18-!-tokai [] has joined #openttd
19:18-!-mode/#openttd [+v tokai] by ChanServ
19:18<@planetmaker>Samu, it's undefined behaviour and might be platform and/or compiler-dependent.
19:24-!-tokai|noir [] has quit [Ping timeout: 480 seconds]
19:24-!-Progman [] has quit [Remote host closed the connection]
19:26-!-Gjax_ [] has joined #openttd
19:26-!-Gjax [] has quit [Read error: Connection reset by peer]
20:00-!-ABCRic [~ABCRic@] has quit [Ping timeout: 480 seconds]
20:19-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
20:32-!-Clockworker [Clockworke@] has joined #openttd
20:35-!-Clockworker_ [Clockworke@] has quit [Read error: Connection reset by peer]
20:35-!-Clockworker_ [Clockworke@] has joined #openttd
20:36-!-Clockworker [Clockworke@] has quit [Read error: Connection reset by peer]
20:40-!-Samu [] has quit [Quit: Page closed]
20:51-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:a407:e9be:afb3:515] has quit [Quit: Leaving]
20:56-!-Quatroking [] has quit [Read error: Connection reset by peer]
21:12-!-liq3 [] has joined #openttd
21:13-!-liq3 [] has quit []
21:50-!-Snail [] has joined #openttd
22:32-!-tycoondemon [] has joined #openttd
---Logclosed Sun Apr 17 00:00:31 2016