X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5 X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox From: karl AT aspodata DOT se To: geda-user AT delorie DOT com Subject: Re: [geda-user] A fileformat library In-reply-to: References: <1512221837 DOT AA25291 AT ivan DOT Harhan DOT ORG> <20151222232230 DOT 12633 DOT qmail AT stuge DOT se> <0F6F1D0F-4F07-48EA-90FE-836EAD4E2354 AT noqsi DOT com> <0FCF3774-F93C-4BFF-BB61-636F75DCCACB AT noqsi DOT com> <20160105182120 DOT 3237F809D79B AT turkos DOT aspodata DOT se> Comments: In-reply-to "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" message dated "Tue, 05 Jan 2016 14:24:40 -0900." Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20160106091006.5F67B809D7A1@turkos.aspodata.se> Date: Wed, 6 Jan 2016 10:10:06 +0100 (CET) X-Virus-Scanned: ClamAV using ClamSMTP Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Britton Kerin: > On Tue, Jan 5, 2016 at 9:21 AM, wrote: > > Britton Kerin: > > > On Sun, Jan 3, 2016 at 6:25 PM, John Doty wrote: > > ... > > > > Although these are good measures, once you adopt them you may start > > asking > > > > yourself why you aren't just using a binary format. The argument for > > text > > > > is that you can glance at a chunk of it and easily tell what's going > > on. > > > > A stronger argument for text is that you can process it with > > text-oriented > > > > tools. > > > But ultimately the reason for wanting to use those text-oriented tools is > > > the same: you can see what you're working on with your own eyes. In > > every > > > other respect binary is better. > > > > I counter that. > > . you have to check a binary file for valid values just as you do for a > > text file You have not commented this point. Any reader, human or program, have to verify its input. Just because you have a binary file you can't just do struct some_struct_type data; read(fd, data, sizeof(struct some_struct_type)) and pretend that data will contain valid values. > > . if your binary file is in some way invalid, you will have a greater > > problem correcting it than a text file > > . discussing why a file is invalid is easier with a text file > > . a binary file might be smaller, but that does not matter much > > . text files are better provided for by version systems (e.g. git) > > . it is easier to write tools that write text than binary, because > > debugging the output is easier > Regarding vcs of text data files for GUI program, it's a stretch to claim > that the fact that they're text makes them much more compatible. The diffs > are only useful for the most trivial of cases. You used the word "better", now are you judging things around "compatible". What do you want ? If you want "compatible", then compatible to what ? I write a sym/fp-generators and I prefer text output; I can check the output both "textually" and "visually". The diffs out the output of thoose generators are valueable when debugging. You might think of gschem and pcb as gui programs, but there is ifrastructure around them which is not gui. Don't think about their files in the same way as a png or jpg, where the fileformats are well entrenched and infrastructure is available. > For it to be really useful > you need a (non-text) diff viewer of some sort. A graphical-diff is provided by http://www.imagemagick.org/Usage/compare/ You can generate png's from sch/pcb files and use that program for graphical-diffs. It would be very useful for regression tests, other projects have been successful at that. > All the rest of the above still boil down to examples of things that are > easier because you can see the data, and therefore manipulate and validate > it more easily. No, validate input and size, is not about "easier to see". But... Why do you want to remove the text format for me ? What are your complaint of having a textual file format ? By dropping the text you loose something, what is the gain of a binary format that outweights that ? > > Also, there is no reason to change a file format unless you change the > > functionality it provides, I have to "side heavily" with John on this. > > If you want to change the file format, you first have to provide some > > goodies that will make people to accept it. And no such "goodie" > > thing has appeared. > A little while back a PhD Stefan Salewski put together a very good start on > a very nice router. IIRC he said 300-400 hours of effort, probably about > $100k worth with overhead in the american market. It's not C (for good > reasons) and currently can't talk to pcb at all. I would like to somehow > arrange things such than efforts like this could maybe get used. In what way does his work relate to a decision about text contra binary file format. > > You might write a library that reads and writes the files and if people > > find it useful, they will start using it, else, it will be just your own > > project. > True. It might be useless but should at least be non-destructive. I thought you are for a fileformat library. I'm I wrong ? But now you say that such a library is useless. Did I get that right ? I think a fileformat library would be useful, but I still would like a textual format for sch/sym/pcb/fp files. Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57