IRC logs for #openttd on OFTC at 2016-04-16
            
00:08:06 *** Ketsuban has joined #openttd
00:20:04 *** liq3 has joined #openttd
00:22:17 *** liq3 has quit IRC
00:30:24 *** Hiddenfunstuff has quit IRC
00:33:20 *** gelignite has quit IRC
00:41:44 *** Clockworker_ has joined #openttd
00:41:44 *** Clockworker has quit IRC
00:44:42 *** smoke_fumus has joined #openttd
00:51:38 *** Clockworker has joined #openttd
00:58:04 *** Clockworker_ has quit IRC
01:04:41 *** Wormnest has quit IRC
01:17:57 *** tokai|noir has joined #openttd
01:17:57 *** ChanServ sets mode: +v tokai|noir
01:18:42 *** FLHerne_ has quit IRC
01:24:44 *** tokai has quit IRC
01:36:13 <Samu> I have nearly duplicated the save thread functions
01:37:01 <Samu> needs more testing though
01:39:06 <Samu> ok, the idea i have is: the first save thread will handle manual saving and sending maps to clients
01:39:18 <Samu> the second thread is exclusively for autosaves
01:42:20 <Samu> perhaps it should be arranged differently
01:42:25 <Samu> have to thing better
01:42:28 <Samu> think*
01:43:24 <Samu> an exclusive thread of sending map to client while the other is for autosave and manual save
02:02:04 *** Snail has joined #openttd
02:15:15 *** Quatroking has quit IRC
02:29:59 *** tycoondemon has joined #openttd
02:31:57 *** Samu has quit IRC
02:50:58 *** tycoondemon has quit IRC
03:17:16 *** Ketsuban has quit IRC
03:25:44 *** glx has quit IRC
03:33:56 *** Wolf01 has quit IRC
04:31:02 *** tycoondemon has joined #openttd
04:35:03 <Flygon> I do wonder how older Victorians, and current day Finns, handle reading about VR all the time
04:35:07 <Flygon> VR this. VR that.
04:35:34 <Flygon> The articles mean Virtual Reality
04:36:18 <Flygon> But Victorians see it as Victorian Railways, and Finns as... well, their own VR railways too :D
04:47:47 <Eddi|zuHause> you mean like whenever people talk about SC2 i think of sim city 2000?
04:48:18 <Eddi|zuHause> that state lasts about 2 seconds...
05:37:30 *** Pikka has joined #openttd
05:44:38 *** HerzogDeXtEr1 has quit IRC
05:54:24 *** Snail has quit IRC
06:02:30 *** JacobD88 has joined #openttd
06:02:39 *** JacobD88 has quit IRC
06:53:10 *** Clockworker_ has joined #openttd
07:00:33 *** Clockworker has quit IRC
07:02:10 *** Clockworker has joined #openttd
07:08:54 *** Clockworker_ has quit IRC
07:25:50 *** sla_ro|master has joined #openttd
07:33:36 *** MonkeyDronez has joined #openttd
07:42:13 *** sim-al2 has quit IRC
07:58:55 *** Arveen has joined #openttd
08:07:58 *** Progman has joined #openttd
08:18:32 *** Supercheese has joined #openttd
08:25:29 *** Gjax has quit IRC
08:27:23 *** Gjax has joined #openttd
08:39:04 *** Ketsuban has joined #openttd
08:39:31 *** _johannes has joined #openttd
09:00:27 <_johannes> hi
09:08:04 *** _johannes has quit IRC
09:33:19 *** Hiddenfunstuff has joined #openttd
09:38:38 *** Supercheese has quit IRC
09:57:34 *** Mucht has joined #openttd
09:58:47 *** johannes__ has joined #openttd
10:12:41 <peter1138> i don't think there are many victorians around today
10:12:56 *** Samu has joined #openttd
10:13:14 <peter1138> ah, the last one died last year
10:14:06 <johannes__> is openttd_main() the entry point for all operating systems?
10:25:37 *** frosch123 has joined #openttd
10:30:33 *** sla_ro|master has quit IRC
10:37:47 *** Gjax has quit IRC
10:46:34 *** andythenorth has joined #openttd
10:47:45 <andythenorth> o/
10:48:47 *** gelignite has joined #openttd
11:06:58 *** andythenorth has quit IRC
11:26:39 *** andythenorth has joined #openttd
11:27:43 *** Alberth has joined #openttd
11:27:43 *** ChanServ sets mode: +o Alberth
11:27:53 <Alberth> moin
11:28:31 <frosch123> hoi
11:30:22 <andythenorth> o/
11:41:06 <johannes__> hi
11:41:22 <johannes__> does someone know if openttd_main() is the entry point for all operating systems?
11:42:28 <johannes__> I mean, does it "finally" get called by all OS?
11:42:51 <frosch123> i would hope so
11:43:07 <johannes__> :D
11:54:41 *** andythenorth has quit IRC
11:59:19 *** andythenorth has joined #openttd
12:08:49 <Samu> I have a question about the Write function here https://git.openttd.org/?p=trunk.git;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=35aa952c36ca59f3daa5800aced0125c1f1ec0f0#l2515
12:09:03 <Samu> There are many Writers
12:09:25 <Samu> void FileWriter::Write(byte * buf, size_t size)
12:09:29 <Samu> void LZMASaveFilter::Write(byte * buf, size_t size)
12:09:33 <Samu> void LZOSaveFilter::Write(byte * buf, size_t size)
12:09:37 <Samu> void NoCompSaveFilter::Write(byte * buf, size_t size)
12:09:42 <Samu> void PacketWriter::Write(byte * buf, size_t size)
12:09:46 <Samu> void ZlibSaveFilter::Write(byte * buf, size_t size)
12:10:27 <Samu> how does that function know which write function will be used?
12:14:48 <Alberth> code doesn't say?
12:15:42 <Samu> i want to create another SaveFileToDisk function to deal exclusively with PacketWriter only
12:15:56 <Samu> but that Write over there is confusing me
12:17:58 <Samu> I'm duplicating all the save thread related functions to have one thread entirely dedicated for the network
12:18:34 <Samu> it's confusing me
12:19:52 <Samu> i only want to deal with PacketWriter if I am understanding this part right, I don't want to duplicate the others
12:20:40 <Samu> but maybe i'm understanding it wrong
12:20:46 <Alberth> duplicating large amounts of code is a bad direction no matter what
12:21:02 * andythenorth ponders
12:21:08 <Alberth> I never studied the save code in detail
12:21:30 <Alberth> but somewhere _sl.tf must be set, would be my guess
12:24:32 <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?
12:26:51 <Alberth> the latter
12:27:00 <Alberth> trains do not look ahead to next orders
12:28:29 <monsted> that sounds like bad station design :)
12:36:10 <johannes__> ah ok I had a two way railway line where the directions changed in a station
12:36:27 <johannes__> the trains always took the wrong track...
12:41:40 *** oskari89 has joined #openttd
12:42:59 *** Wolf01 has joined #openttd
12:43:47 <Wolf01> o/
12:54:55 *** tycoondemon has quit IRC
12:56:18 <Alberth> o/
12:59:59 *** tycoondemon has joined #openttd
13:03:28 * Wolf01 ended up playing factorio 'til 3.30 again this night :|
13:09:32 *** Wolf03 has joined #openttd
13:09:32 *** Wolf01 is now known as Guest690
13:09:32 *** Wolf03 is now known as Wolf01
13:10:13 *** HerzogDeXtEr has joined #openttd
13:11:27 <frosch123> he, i didn't know two-way signals even existed
13:12:02 <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
13:12:35 *** tycoondemon has quit IRC
13:12:51 <Wolf01> bah, I'm moving the entire refinery, boring
13:13:42 <frosch123> it needs some tectonic technology to move ground :)
13:13:59 *** Guest690 has quit IRC
13:14:31 <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)
13:15:31 <frosch123> haha, yeah, if you find a long pipe in my factory, it's most likely lubricant
13:17:53 *** Gjax has joined #openttd
13:19:05 *** tycoondemon has joined #openttd
13:20:33 <Wolf01> I can't wait for the 0.13, I really need the blueprint book
13:20:45 <Wolf01> I have 2 rows of blueprints in the inventory
13:23:55 *** Ketsuban has quit IRC
13:25:57 *** Flygon has quit IRC
13:29:04 *** Flygon has joined #openttd
13:30:18 <planetmaker> o/
13:30:23 <Wolf01> o/
13:37:22 <Alberth> o/
13:47:08 <johannes__> would it be ok to add *pdf to openttd's gitignore?
13:47:17 <johannes__> I meant *.pdf
13:48:30 <johannes__> the reason I ask because I work with an exporter which creates PDF files, and I usually work in the source tree
13:48:57 <johannes__> I know it's a stupid reason to do this just for one person, but are we ever going to commit PDF files?
13:50:02 <Alberth> given that git is a distributed VCS, I see no objection adding that to your setup
13:50:19 <Alberth> ie why would it need to be in the central repo?
13:52:34 <johannes__> Alberth: where could I put it otherwise?
13:53:14 <Alberth> how would I know, i hate git sufficiently not to know such things
13:53:39 <johannes__> :)
13:53:45 <johannes__> what do you prefer as a VCS?
13:53:52 <Alberth> but it's a disitributed VCS, I would expect people can have their own setup, or it's more broken than I think
13:54:38 <Alberth> oh, svn or hg, or so
13:56:02 <johannes__> "projects/openttd_vs100.vcxproj"
13:56:08 <johannes__> is this file auto-generated?
13:56:15 <Alberth> yep
13:56:20 <johannes__> ok
13:56:32 <Alberth> euhm, "auto" as in "run a script" :)
13:56:39 <johannes__> why is it under VCS then?
13:57:00 <Alberth> save people the trouble generating it?
13:57:12 <johannes__> that's not much trouble saved :P
13:57:26 <Alberth> at least, that's the usual reason to save generated files in vcs
13:57:42 <johannes__> ok, how do I regenerate it?
13:58:37 <Alberth> projects/generate or projects/generate.vbs
13:59:55 <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
14:00:40 <johannes__> how do I tell projects/generate that this header is not meant to be compiled into OpenTTD?
14:01:29 <Alberth> don't put foreign files into openttd?
14:02:33 <johannes__> ok, but that one exporter shares some files with openttd
14:03:10 <johannes__> so should I really put the exporter into an extra repo and then do something like "make PATH_TO_OPENTTD=../openttd" ?
14:04:31 <johannes__> or should we, instead, offer a "src/external_tools" ?
14:11:31 <Alberth> you could look at how eg strgen works there
14:22:44 *** tycoondemon has quit IRC
14:24:29 <johannes__> hmm it's listed in ./projects/strgen_vs100.vcxproj.filters
14:24:36 <planetmaker> johannes__, add it to *your* global .gitignore
14:25:08 <johannes__> planetmaker: I could, but what if I'll make another repository where PDF files are stored?
14:25:30 <planetmaker> you ignore all pdf except those which you explicitly track
14:25:37 <planetmaker> tracked files are never ignored
14:25:42 <johannes__> what I rather need would be a second .gitignore in the source tree, but I think that's not possible
14:26:04 <Alberth> that sounds weird for a DVCS
14:26:33 <johannes__> planetmaker: would be a solution, though I might then forget to commit PDF files
14:27:07 <Alberth> ignore the precise path?
14:27:32 <Alberth> unless you name all your PDF files the same :)
14:28:52 <johannes__> you mean the absolute system path?
14:29:31 <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???
14:30:16 <Alberth> ie add ".eclipse-something" because a developer uses eclipse???
14:31:03 <Alberth> or "vcs-studio-whatever" because someone is using visual studio?
14:32:16 <johannes__> I'm not sure what you mean, but it does not sound like a good solution ;)
14:32:38 <Alberth> and nobody in the entire DVCS community stumbled upon this problem, and figured out a solution?
14:33:00 <johannes__> I think I'll just make a "work" subfolder in my openttd directory, where I add my own .gitignore
14:36:53 <planetmaker> though I wonder: why do you have PDFs in the OpenTTD dir?
14:41:01 <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
14:41:35 <johannes__> planetmaker: they just came from the railroad network graph exporter, just outfiles that should not be checked in
14:44:49 <frosch123> Wolf01: i hate logistic robots :) i only use them for chest<->character transport
14:45:59 <Wolf01> I use them on all the new outposts and I started to convert the main base too
14:48:02 *** Gjax has quit IRC
14:58:21 <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?
15:00:48 <frosch123> likely there isn't. but using a good coding style always helps :p
15:03:10 *** andythenorth has quit IRC
15:10:26 *** andythenorth has joined #openttd
15:11:02 <Samu> I cant do this :(
15:12:01 <Samu> i thought this would be simple
15:12:14 <Samu> duplicating code is turning into hell
15:13:00 <andythenorth> Samu: it’s never simple :D
15:14:17 <Samu> i need to undestand the structure currently in place
15:14:34 <Samu> especially the _sl part
15:15:18 <Samu> and this part is basically the whole point of saveload.cpp
15:15:47 <andythenorth> will andythenorth play openttd?
15:15:54 <andythenorth> or download the factorio demo again?
15:16:35 <Samu> i need a second dumper to copy the game state into there
15:17:38 <Samu> the pointers or whatever must know which dumper to write to
15:18:04 <Samu> i dont want it to create a second dumper only to have it write to the first _(
15:18:13 <Samu> how do I make this happen
15:25:16 <frosch123> andythenorth: buy more lego?
15:25:35 <andythenorth> frosch123 lego is currently for selling not buying :)
15:25:59 <Wolf01> wrong answer
15:27:29 <frosch123> the world is changing :p
15:28:06 <andythenorth> once lego is sold, lego can be bought
15:28:18 <andythenorth> it’s some kind of rain/sun, ying/yang thing
15:28:29 <andythenorth> all must be balanced
15:29:46 * andythenorth bbl etc
15:29:47 *** andythenorth has quit IRC
15:33:34 *** tycoondemon has joined #openttd
15:36:34 *** oskari89 has quit IRC
15:37:19 *** sim-al2 has joined #openttd
15:42:07 <Samu> some comments in the code is funny
15:42:11 <Samu> * Do something of which I have no idea what it is :P
15:43:38 <Samu> it is calculating an autolength for a stub chunk handler i think
15:49:00 *** tycoondemon has quit IRC
15:53:10 *** Quatroking has joined #openttd
15:55:04 <michi_cc> johannes__: There's also .git/info/excludes as a repo-specific, but non-tracked ignore file.
16:00:57 *** Ketsuban has joined #openttd
16:13:31 *** tycoondemon has joined #openttd
16:18:23 <Samu> bah, what i didn't want to do is what I have to do
16:18:32 <Samu> deal with all the chunks
16:18:43 <Samu> how many chunks are there in a save? 50?
16:20:08 <Samu> there's even chunks inside chunks
16:23:08 *** Gjax has joined #openttd
16:27:37 *** Pikka has quit IRC
16:43:45 <Samu> i give up, too confusing for me
16:43:48 <Samu> t.t
16:45:34 *** tycoondemon has quit IRC
16:47:58 <Samu> i dont want to edit all and every chunk to make this work :(
16:48:19 <Samu> so, i'm stopping for now
16:53:04 <frosch123> don't touch the chunks :)
16:53:23 <frosch123> autosave works by first saving an uncompressed save into a memory buffer
16:53:38 <frosch123> compression and writing to disk can then happen in parallel while the game advances
16:54:29 <frosch123> it sounds like you try to make the chunks while the game advances, but that won't work
16:54:39 <frosch123> you cannot make a snapshot of a moving source
17:01:59 *** tycoondemon has joined #openttd
17:09:05 <johannes__> michi_cc: Many thanks, that worked
17:09:32 <johannes__> Btw: How close are you guys looking at the coding guidelines if one submits a patch?
17:09:54 <Alberth> very close :)
17:09:56 <johannes__> I recall comitting for the Qt community, they were criticizing every single brace that was wrong :P
17:10:04 *** tycoondemon has quit IRC
17:10:13 <johannes__> are you also looking at every single brace? :D
17:10:18 <Alberth> yes
17:10:19 <frosch123> if it fails with whitespace, chances are high i won't even look at it
17:10:35 <frosch123> (as in tabs vs spaces)
17:11:52 <johannes__> e.g. I saw tons of "if (x) y;" in the code, though the guidelines say "if (x) { <newline> y; <newline> }"
17:12:50 <frosch123> yeah, sometimes the guideline is wrong :p
17:13:18 *** tycoondemon has joined #openttd
17:13:50 <Wolf01> the guideline is never wrong
17:13:57 <frosch123> both "if (x) y;" and "if (x) {\ny;\n}" are fine. but "if (x)\ny;" is not
17:15:32 <Samu> frosch123: I was trying to find a way to have 2 dumps in memory
17:15:42 <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"
17:16:28 <Samu> and have 2 writers working, 1 for each dump
17:16:46 <Samu> but I can't manage to create 2 dumps :8
17:16:50 <frosch123> Wolf01: while it is true that some coding styles try to prevent newbie-errors. ottd's style does not
17:17:23 <frosch123> Samu: don't try to create the dumps in parallel
17:17:31 <frosch123> just store the result in different places
17:19:08 <frosch123> Samu: split SaveLoadParams into what is used for the Dumper, and another part which is used for compression
17:19:36 <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
17:22:40 *** andythenorth has joined #openttd
17:23:57 <Wolf01> andy, did you already purchase the maze?
17:24:14 *** zeknurn has quit IRC
17:25:13 <Samu> so, your idea is to re-use the dumper currently active, and prevent it from being deleted by the first writer?
17:26:08 <andythenorth> Wolf01: ?
17:27:04 <Wolf01> http://shop.lego.com/en-GB/Maze-21305?_requestid=3172978
17:27:27 <johannes__> frosch123: when should a file start with /* $Id$ */ ?
17:29:31 <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
17:30:18 <andythenorth> Wolf01: ha we have a wooden maze like that, it’s a very annoying puzzle
17:30:22 <Alberth> johannes__: always, to get the revision in the file
17:30:23 <andythenorth> won’t be buying that :)
17:30:39 <Wolf01> I have a wooden one too :)
17:30:39 <johannes__> Alberth: ok
17:31:11 <johannes__> Alberth: even if the file is only part of an external utility?
17:32:13 <Alberth> you want to add files to the repo that cannot be used?
17:32:33 <Alberth> what does the project want with those?
17:34:12 <Wolf01> https://www.youtube.com/watch?v=PbaD2-2Ktwc the bgm reminds me of train fever
17:35:44 <johannes__> Alberth: I don't tknow, should external tools be built/shipped with the core?
17:38:28 <Eddi|zuHause> Wolf01: i don't quite see the connection
17:38:39 <Wolf01> about at 2 minutes
17:39:04 <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
17:39:32 <Alberth> or a desktop or a compiler or a debugger, and so on
17:40:06 *** MonkeyDronez has quit IRC
17:40:39 <Alberth> at least until we make an OpenTTD OS :)
17:41:55 <Wolf01> just ship it with dos and enough drivers to use expanded memory, sound and networking
17:42:25 <sim-al2> Isn't expanded memory on DOS like 1 Mb instead of 640 kb?
17:43:18 <Wolf01> it's just to load drivers and left all the possible ram to the application
17:43:31 <Wolf01> leave
17:43:52 <Eddi|zuHause> sim-al2: there was expanded and extended memory, but i don't remember which was which
17:44:49 <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)
17:44:55 <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
17:45:12 <sim-al2> I don't miss Win 98's weirdness much tbh
17:45:16 <Eddi|zuHause> err... not MB, kB
17:45:47 <Alberth> when memory was counted in sane quantities :p
17:46:32 <Eddi|zuHause> i have 12GB. and then there are 32bit processes that run out of their 4GB range
17:46:32 <Wolf01> yes, it's extended, not expansed, my fault
17:46:40 *** zeknurn has joined #openttd
17:46:44 <Wolf01> *expanded
17:46:47 *** Sylf has quit IRC
17:47:44 <sim-al2> I did use a school computer with Win 3.1 on it, rather interesting interface
17:47:58 <Wolf01> I started using computers with win 3.1
17:48:24 <johannes__> Alberth: what I write is a tool which converts dumps (that you can create with openttd) into pdf files
17:48:28 <Eddi|zuHause> when i started to get into computers, we had DOS 5.0
17:48:31 <Wolf01> or better, I started from dos, because playing with windows wasn't really possible
17:48:36 <johannes__> Alberth: should that be shipped with openttd or not?
17:48:57 <Eddi|zuHause> that was before they screwed everything up with DOS 6.xx
17:49:17 <Eddi|zuHause> after which we switched to Novell DOS 7
17:49:22 *** Defaultti has quit IRC
17:49:45 <Eddi|zuHause> which was a slight problem for games which relied on microsoft bugs...
17:50:45 *** andythenorth has quit IRC
17:51:50 <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.
17:52:04 <sim-al2> I did like how MacOS 7, 8, and 9 look really similar
17:52:27 <johannes__> Alberth: it's binary dump, a human could not infer much of these numbers anyways
17:52:34 <sim-al2> At least until you went to load a program up, or start Netscape Navigator...
17:53:06 <johannes__> Alberth: also, the converter needs many arguments, and I don't want to add them to the openttd argument list
17:53:50 <Alberth> say I want a different format than pdf
17:54:06 <Alberth> how do I do that?
17:54:20 <Alberth> bla --> pdf sounds so very closed
17:54:35 <johannes__> it's actually binary-dump -> .dot -> PDF
17:54:54 <johannes__> however, there will be an argument to the tool to make binary-dump -> tikz -> PDF
17:55:08 <Alberth> right, so it produces a graph?
17:55:19 <Alberth> you can write a graph as text, right?
17:55:24 <johannes__> yes
17:55:32 <johannes__> .dot is a text format
17:55:37 <Alberth> I know
17:55:48 <Alberth> I wonder if .dot is the right solution here
17:56:07 <johannes__> it's not :)
17:56:25 <johannes__> I just use it temporarily, because it's easy
17:56:32 <Alberth> I am not wondering about quality, just openness
17:56:56 <johannes__> the future way will be to use tikz
17:57:10 <johannes__> tikz allows more nice features
17:57:26 <Alberth> in my view, openttd should write the data in an open format where people can write their own programs for further processing
17:58:11 <Alberth> I think your needs would be better served with keeping that processing separate from openttd
17:58:19 <johannes__> the format of the binary dump is open (and easy to understand)
17:58:24 <Alberth> eg a project at the devzone
17:58:38 <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
17:59:40 <johannes__> Alberth: I don't see the point, since the binary dump could be used by any other script, so they are completely open
18:00:03 <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
18:00:32 <Eddi|zuHause> XML!
18:00:38 <Samu> 1 structure for the dumper
18:00:58 <Samu> 1 structure for the compression, but the compression accesses the same code the dumper also accesses :(
18:01:39 * johannes__ disagrees
18:01:45 <Samu> ok :(
18:01:57 <johannes__> not to you Samu :)
18:02:36 <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
18:02:42 <Alberth> how is a binary format easy to understand, and the same data in text is not?
18:02:50 <johannes__> like e.g.: is there a space before the number, is there a new tag...
18:02:50 *** andythenorth has joined #openttd
18:02:56 <Alberth> most people do not use C
18:03:05 <Alberth> python, lua, java, c#
18:03:10 <Alberth> etc etc
18:03:34 <Alberth> fread/fwrite will fail horribly at different endian systems
18:03:35 <johannes__> Alberth: for me, as I program in C, it was by far the easiest to simply dump the data binary
18:04:11 <Alberth> fwrite(&myint) vs fprintf(.. myint) ?
18:04:34 <johannes__> well what do you propose, XML, or just the numbers space separated?
18:04:50 <Eddi|zuHause> csv?
18:04:51 <Alberth> the latter
18:05:09 <andythenorth> json
18:05:14 <Alberth> yaml
18:05:19 <andythenorth> json is the new xml
18:05:24 <Alberth> depends on what data you have
18:05:36 <andythenorth> nah, like xml, you should use it even if not appropriate
18:05:37 <Alberth> yaml is a superset of json :)
18:05:56 <andythenorth> the weird thing about json is that it’s koolaid that works
18:06:04 <johannes__> see here: https://github.com/JohannesLorenz/OpenTTD/blob/master/src/railnet/common.h
18:06:05 <Eddi|zuHause> put json into xml!
18:06:10 <andythenorth> it’s actually completely functional and usable
18:06:15 <johannes__> that's the data I need to serialize
18:06:29 <andythenorth> proving that a javascript stopped clock still tells the right time once a day
18:06:45 <johannes__> I just serialize one "struct railnet_file_info"
18:06:51 <andythenorth> meanwhile http://classicprogrammerpaintings.tumblr.com/
18:07:41 *** Sylf has joined #openttd
18:07:45 <Alberth> json would work, by the looks of it
18:07:52 <Eddi|zuHause> johannes__: sounds like the perfect usecase for some format that supports dicts...
18:08:40 <johannes__> Let's make a competition
18:08:51 <johannes__> Everyone can submit a version equivalent to my C code
18:09:08 <johannes__> the one with the fewest linces of code wins
18:09:14 <andythenorth> wtf are “agile programming languages”?
18:09:19 * andythenorth reading yaml spec
18:09:26 <Alberth> oh, that's easy, just write everything at one line :p
18:09:26 *** Snail has joined #openttd
18:09:32 <johannes__> :P
18:09:55 <johannes__> ok, the version with the smallest code which is still human readable
18:10:01 <Eddi|zuHause> i haven't played code golf in ages :p
18:10:06 <Samu> explain me what the code is doing here please https://git.openttd.org/?p=trunk.git;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=35aa952c36ca59f3daa5800aced0125c1f1ec0f0#l2504
18:10:09 <andythenorth> oic http://radio-weblogs.com/0102677/2003/04/04.html
18:10:44 <Samu> _sl.sf->Write((byte*)hdr, sizeof(hdr));
18:10:47 <Samu> what is this line doing
18:11:13 <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
18:11:19 <Eddi|zuHause> andythenorth: just what i expected. a pointless buzzword
18:11:40 <Eddi|zuHause> definition by example.
18:11:41 <Alberth> Samu: random guess, it write the header
18:11:48 <johannes__> Yes but your code must also be able to read the code
18:12:04 <johannes__> or read the dump/text-file
18:12:15 <johannes__> read + write
18:12:21 <andythenorth> someone missed the memo on “agile is many things, but it’s not specific tools” :P
18:12:37 <Samu> _sl.sf = fmt->init_write(_sl.sf, compression);
18:13:40 <andythenorth> also, this, I wish to avoid http://behaviourdriven.org/BehaviourDrivenDevelopment
18:13:41 <Alberth> johannes__: and you're afraid there is no json library for an arbitrary language? http://json.org/ bottom of the page
18:13:45 <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
18:14:00 <johannes__> Alberth: I'm not
18:14:24 <johannes__> Alberth: I just think it will produce much larger code than a bunch of fwrite/fread
18:14:41 <andythenorth> hmm
18:14:48 <andythenorth> maybe I should port eints to Bootstrap 3
18:14:49 <Eddi|zuHause> andythenorth: my buzzometer just exploded
18:15:04 <andythenorth> Eddi|zuHause: I had to hit a panic button
18:15:20 <andythenorth> there is something in there somewhere about software contracts
18:15:39 <andythenorth> and ‘Business and Technology must use the same language’
18:16:27 <Eddi|zuHause> that's a perfect plan to ensure that neither side understands what they're talking about :p
18:16:31 <johannes__> If we make this a coding golf, I guess the language must be in C ?
18:16:58 <Samu> hum... :(
18:17:03 * andythenorth is glad he doesn’t work in a proper software business
18:17:12 <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
18:17:17 <Samu> i don't understand what frosch123 meant with split the parameters
18:17:29 <Samu> i dont know what is to be splited
18:17:30 <Alberth> how is replacing fwrite() by a bunch of printf() much larger in code?
18:18:04 <Alberth> or are you talking at the reading side?
18:18:09 <Samu> how do i find what the Dumper uses?
18:18:21 <Samu> so confusing
18:18:24 <johannes__> for the writing thing, I guess it's not much harder
18:18:32 <johannes__> yes, for the reading thing...
18:18:36 <Alberth> Python: import json; data = json.load('blah_file') done
18:19:00 <frosch123> Samu: only SaveFileToDisk runs in a thread
18:19:30 <frosch123> remove everything that SaveFileToDisk needs from _sl, and put it into a structure that is passed to SaveFileToDisk
18:19:39 <johannes__> Alberth: you're saying write the data with C, but import with Python?
18:19:51 <Samu> so that's what I was attempting to do
18:20:02 <Samu> I had a _sm structure
18:20:16 <Samu> but ended up having to deal with chunks somehow
18:20:18 <frosch123> in the end you will likely have the Dumper ni both structures
18:20:27 <Alberth> johannes__: they're two different programs with a common file format, why would the read need to be in the same language?
18:20:31 <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
18:20:40 <frosch123> first you do the dump, then you transfer the dumper to the other structure and start the thread
18:20:44 <Alberth> also, find a C library for json
18:21:32 <Alberth> json.org only has 21 available
18:22:00 <johannes__> Alberth: that doesn't count, the json library has many lines of code :P
18:22:09 <Samu> _sm structure was however, an entire copy of _sl
18:22:21 <Samu> i don't know how to distinguish what's needed for the dump
18:22:33 <Alberth> right, and you write the dot -> pdf convertor from the ground up too?
18:22:44 <Alberth> or the C runtime library?
18:23:25 <Alberth> most likely, most linucs have a libjson by default already
18:23:29 <johannes__> Alberth: it maybe doable with json, but then everyone will need an additional dependency (a jason library)
18:23:48 <johannes__> How is it more freedom/openness then if you force people to use a json library?
18:23:51 <Alberth> no, python json is in the standard library
18:24:08 <johannes__> C/C++ json is not
18:24:12 *** Arveen has quit IRC
18:24:18 <_dp_> working with json in C is painful, it completely lacks necessary types
18:24:52 <Alberth> johannes__: why do you think only C is a viable language for programming ?
18:25:14 <johannes__> Alberth: I don't think, but you also have to think about C/C++ programmers...
18:25:46 <johannes__> has bash json by default?
18:25:55 <johannes__> it's not built-in I guess
18:26:06 <_dp_> though even in C I'd still prefer to work with json then some custom bs format
18:26:10 <frosch123> Samu: comment out SaveFileToDisk, then remove members from _sl until it no longer compiles :p
18:26:14 <Alberth> bash? that's a command processor
18:26:27 <Alberth> aka shell
18:26:39 <Alberth> unless you type commands in json :p
18:26:41 <Samu> hmm ok let's see what happens
18:27:01 * andythenorth is perplexed :)
18:27:04 <johannes__> you can use bash with scripts, and then it's a language, too
18:27:34 <Alberth> well, if you insist, json is an open documented format, go ahead, write a json parser in bash
18:27:40 <johannes__> next thing is perl... I guess you can install a module, but do you have it by default?
18:28:03 <Alberth> I have perl, but not by choice
18:28:18 <Alberth> some programs at my machine think they need it :(
18:29:10 <johannes__> I think it's optional: http://search.cpan.org/dist/JSON/
18:29:52 <johannes__> and JAVA also has no JSON by default...
18:30:18 *** HerzogDeXtEr1 has joined #openttd
18:30:30 <Alberth> it's a text format, open and documented, if you want you can write a json library yourself
18:30:53 <johannes__> yes, but that takes much more time than writing a few fread calls :P
18:31:07 <johannes__> (and these are more LOCs than)
18:31:48 <andythenorth> well
18:31:54 <Alberth> oh dear, maybe you shouldn't have started hacking openttd at all, that would have saved sooo much time
18:32:06 * andythenorth considers playing OpenTTD
18:32:20 <andythenorth> I have saved a lot of time by not working on NotRoadTypes this week
18:32:21 <johannes__> at least boost has a json library...
18:32:22 <Alberth> sounds more productive andy :)
18:33:30 * andythenorth is diligently deleting browser bookmarks
18:36:14 *** HerzogDeXtEr has quit IRC
18:41:47 <johannes__> can I add boost as a dependency to openttd? It would only be needed for the (optional) json dumper then
18:42:40 <frosch123> openttd does not bundle any tools
18:42:44 <frosch123> they are all separate
18:43:11 <johannes__> the dumper is inside a video driver
18:43:16 <johannes__> it must be in the core
18:43:47 <Alberth> just printf() json text
18:44:32 <frosch123> openttd sends json between admin port and game scripts
18:44:50 <frosch123> json is not unknown to ottd
18:45:07 <V453000> I sinned :D did first digging into factorio mods ... just edited existing one, but ...
18:45:18 <V453000> in compare to NML, this is ultra convenient and easy
18:45:24 <johannes__> I see...
18:45:35 <Alberth> :O V :D
18:45:45 <frosch123> V453000: did you add diagonal belts? :p
18:46:10 <V453000> https://forums.factorio.com/viewtopic.php?f=87&t=13082&start=20#p149353
18:49:56 <Alberth> factorio modding wide open !
18:51:44 <frosch123> V453000: no slugs
18:52:02 <frosch123> all highest tier equipment should involve slugs
18:52:31 <frosch123> slugs are tier 2 lubricant
18:53:52 *** andythenorth has quit IRC
18:56:51 <Wolf01> also transportable
18:58:17 <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
18:59:25 <Samu> arf, i can't do this
18:59:52 <Samu> the dump needs everything from SaveLoadParams
18:59:59 <Samu> except the bool error
19:00:48 <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)
19:01:00 <Wolf01> s/of/about
19:01:12 <V453000> fixed in .13
19:01:17 <Wolf01> good
19:01:18 <V453000> GG
19:01:42 *** Clockworker_ has joined #openttd
19:01:42 *** Clockworker has quit IRC
19:07:53 *** glx has joined #openttd
19:07:53 *** ChanServ sets mode: +v glx
19:09:29 *** Arveen has joined #openttd
19:20:07 *** andythenorth has joined #openttd
19:27:18 <andythenorth> FIRS does not have lubricant
19:27:20 <andythenorth> maybe it should
19:27:23 <Samu> sorry, i can't do this
19:27:25 <andythenorth> or muolluscs
19:27:26 <Samu> better stop
19:27:28 <andythenorth> molluscs *
19:29:55 <Samu> you have already told me what to do, but I can't figure out, it's time to give up :(
19:31:19 <Samu> the dumper and the compressor work together, i can't figure a way to split them
19:36:50 <Samu> the problem starts even before the chunks are in memory
19:37:00 <Alberth> supplies are lubricant?
19:37:33 <Samu> DoSave function is giving me a headache, :o
19:37:52 <Alberth> yes, openttd code is complicated
19:38:08 <Alberth> it's not the best way to learn programming
19:38:41 *** Sacro has quit IRC
19:38:54 <Alberth> or even not good as first program to hack in
19:39:56 *** Sacro has joined #openttd
19:44:38 * andythenorth is learning to program with openttd :)
19:44:44 <andythenorth> maybe
19:45:45 <DorpsGek> Commit by translators :: r27540 trunk/src/lang/hebrew.txt (2016-04-16 19:45:37 +0200 )
19:45:46 <DorpsGek> -Update from Eints:
19:45:47 <DorpsGek> hebrew: 40 changes by dnd_man
20:17:09 *** smoke_fumus has quit IRC
20:30:53 *** qwebirc48165 has joined #openttd
20:36:02 <qwebirc48165> Hi, I've got a question about newgfx: The downloads section of openttd.org points to version 0.5.2, but bundles.openttdcoop.org 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?
20:36:54 <Alberth> ^ planetmaker
20:37:39 <Alberth> (not at all certain he'll show up any time soon, but he'll read it at some time)
20:38:20 <qwebirc48165> The ingame 'check online content' function wants to update to 0.5.2 from 0.5.4 as well.
20:39:05 <Alberth> so it seems uploaded to bananas (the online content system) at least
20:39:46 <qwebirc48165> @Alberth: No, it wants to 'update' to the older version
20:40:15 <Alberth> hmm, silly thing :p
20:40:48 <Alberth> but in general, it should be safe to use the latest version that you can find
20:41:31 <Alberth> changes are quite small, normally, you'll hardly notice them :)
20:43:10 <Alberth> check the changelog otherwise
20:44:04 <andythenorth> is cat
20:45:01 <Alberth> probably
20:46:58 * andythenorth makes more UI library
20:47:20 <andythenorth> probably 48 hours work in this since Tuesday :D
20:47:24 *** FLHerne has joined #openttd
20:47:45 <andythenorth> + the thinking when asleep :D
20:49:36 *** Ketsuban has quit IRC
20:57:06 *** Wormnest has joined #openttd
20:57:29 <Alberth> sleeping and still working :)
20:58:14 *** zeknurn` has joined #openttd
20:59:28 <Samu> well, i had another goal
21:00:34 <Samu> the lzo "unexpected end of chunk" - how to deal with this, it only happens on the release x64 build
21:00:48 <Samu> debug x64 and all the others work fine
21:02:46 *** Snail has quit IRC
21:02:57 <Samu> it fails to load the first chunk, GLOG and then just says broken savegame, which isn't true
21:03:10 <Samu> it's not broken, it loads on the other builds
21:03:11 *** zeknurn has quit IRC
21:03:11 *** zeknurn` is now known as zeknurn
21:05:34 <Samu> if i can fix the lzo, i'll use the lzo filter instead of zlib
21:05:37 *** Snail has joined #openttd
21:05:47 <Samu> it's even faster
21:06:40 <frosch123> you can try run them with valgrind, assuming you use an os suitable for software development
21:07:05 <frosch123> alternatively you can add tons of printf/couts and compare the output of debug/release build
21:07:22 <frosch123> and try to figure out where they diverge
21:08:21 *** andythenorth has quit IRC
21:08:23 *** aard has joined #openttd
21:09:00 <Samu> windows 10
21:09:39 <frosch123> so you do not even have a tool to compare text output :p
21:11:30 *** Snail has quit IRC
21:30:13 <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?
21:31:15 <johannes__> any ctrl+click or something?
21:31:20 <frosch123> search for templated-based-autoreplace on the forums
21:36:12 <johannes__> the patch never made it into the game, right?
22:10:29 *** frosch123 has quit IRC
22:16:46 *** FLHerne has quit IRC
22:17:10 *** FLHerne has joined #openttd
22:29:30 *** johannes__ has quit IRC
22:40:31 *** Arveen has quit IRC
22:41:18 *** aard has quit IRC
22:43:47 *** andythenorth has joined #openttd
22:44:16 *** Alberth has left #openttd
22:44:23 *** andythenorth has left #openttd
22:45:52 *** sla_ro|master has joined #openttd
22:52:43 *** qwebirc48165 has quit IRC
22:59:18 *** Defaultti has joined #openttd
23:03:07 *** aard has joined #openttd
23:03:54 *** Defaultti has quit IRC
23:09:51 *** Defaultti has joined #openttd
23:16:49 *** tycoondemon has quit IRC
23:29:35 *** sla_ro|master has quit IRC
23:37:20 *** supermop has joined #openttd
23:46:56 *** Supercheese has joined #openttd
23:48:20 <Samu> some variables are being writen as int8, some others are byte, i wonder if it makes a difference
23:57:46 *** Wormnest has quit IRC