Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-09 Thread Lorenzo Marcantonio
On Fri, May 09, 2014 at 07:48:13AM +0200, Lorenzo Marcantonio wrote: Storing a whole sexp would be done with the DOM model or something similar (DOM is not exactly the best way to handle a sexp, but at least it's already done:P) Clarification: the best way to handle sexps is the cons cell,

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-09 Thread Javier Serrano
On Fri, May 9, 2014 at 12:10 AM, Rick Walker wal...@omnisterra.com wrote: Kicad is currently a moving target. The team doesn't provide stable builds and the whole system is liable to blow up at any time. It is even worse if one uses the cloud-based libraries which are under dynamic mutation.

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-09 Thread Dick Hollenbeck
Kicad is currently a moving target. The team doesn't provide stable builds and the whole system is liable to blow up at any time. Yep, that is by choice. This is where the users get to pay me by being testers. That way I can actually use the software. Because when I cannot use the

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-09 Thread John Beard
On 08/05/14 20:44, Dick Hollenbeck wrote: On 05/08/2014 02:18 PM, Dick Hollenbeck wrote: On 05/08/2014 01:31 PM, John Beard wrote: On 08/05/14 15:53, Dick Hollenbeck wrote: Submit a patch. Hope it gets accepted. Since your interest is limited to the *.kicad_mod file. You can use the

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-09 Thread Maciej Sumiński
On 05/09/2014 08:44 PM, John Beard wrote: Is there existing infrastructure for benchmarking, for example any used when designing the current parser? It was not used for when designing the current parser, but you may find useful include/profile.h. Have a look at common/view/view.cpp for an

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/06/2014 05:41 PM, Cirilo Bernardo wrote: - Original Message - From: John Beard john.j.be...@gmail.com To: Kicad Developers kicad-developers@lists.launchpad.net Cc: Sent: Wednesday, May 7, 2014 4:28 AM Subject: [Kicad-developers] Forward-compatibility in s-expression

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
Just keep those fields, that would allows the program to load ANY legacy part without breaking the bank. There is no bank. That's exactly what I mean - older versions of KiCad should be able to ignore, but retain, unknown data. This sentence has two concepts in it. One is fools gold,

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread John Beard
On 08/05/14 15:53, Dick Hollenbeck wrote: That's exactly what I mean - older versions of KiCad should be able to ignore, but retain, unknown data. This sentence has two concepts in it. One is fools gold, the other is poorly expressed. 1) An older kicad should load a data file that is

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 07:31:47PM +0100, John Beard wrote: it will show you what it can. You'd be annoyed if it didn't, it would be like Flash needing the latest version to watch your video, without the excuse that is necessary to implement the latest and greatest DRM fad. Uhm... doesn't

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 02:12 PM, Lorenzo Marcantonio wrote: On Thu, May 08, 2014 at 07:31:47PM +0100, John Beard wrote: it will show you what it can. You'd be annoyed if it didn't, it would be like Flash needing the latest version to watch your video, without the excuse that is necessary to implement

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 01:31 PM, John Beard wrote: On 08/05/14 15:53, Dick Hollenbeck wrote: That's exactly what I mean - older versions of KiCad should be able to ignore, but retain, unknown data. This sentence has two concepts in it. One is fools gold, the other is poorly expressed. 1) An

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 02:17:37PM -0500, Dick Hollenbeck wrote: You have an Unbelievable ability to confuse an issue. The discussion was about grammar, and you introduce syntax into the conversation. He started with a problem, proposed a change to the grammar, the change is difficult to do

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread John Beard
On 07/05/14 07:19, Lorenzo Marcantonio wrote: On Wed, May 07, 2014 at 12:48:22AM +0100, John Beard wrote: I would have thought this would exactly be done at the end of tokenisation More or less, that's the idea :D There are various ways to do this but all depends on the flexibility

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 02:18 PM, Dick Hollenbeck wrote: On 05/08/2014 01:31 PM, John Beard wrote: On 08/05/14 15:53, Dick Hollenbeck wrote: That's exactly what I mean - older versions of KiCad should be able to ignore, but retain, unknown data. This sentence has two concepts in it. One is fools

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread John Beard
On 08/05/14 20:12, Lorenzo Marcantonio wrote: On Thu, May 08, 2014 at 07:31:47PM +0100, John Beard wrote: it will show you what it can. You'd be annoyed if it didn't, it would be like Flash needing the latest version to watch your video, without the excuse that is necessary to implement the

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 02:44 PM, Dick Hollenbeck wrote: On 05/08/2014 02:18 PM, Dick Hollenbeck wrote: On 05/08/2014 01:31 PM, John Beard wrote: On 08/05/14 15:53, Dick Hollenbeck wrote: That's exactly what I mean - older versions of KiCad should be able to ignore, but retain, unknown data. This

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 02:44:58PM -0500, Dick Hollenbeck wrote: Please include comparative benchmarks with your patch submission. If there's no appreciable performance hit, then you have a chance getting the patch accepted. Are we *really* interested in the performance of file read/write

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 03:06 PM, Lorenzo Marcantonio wrote: On Thu, May 08, 2014 at 02:44:58PM -0500, Dick Hollenbeck wrote: Please include comparative benchmarks with your patch submission. If there's no appreciable performance hit, then you have a chance getting the patch accepted. Are we

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 03:46:15PM -0500, Dick Hollenbeck wrote: I think for the guy who does not trim down his fp-lib-table to an interesting subset, may soon be trying to load a lot of footprints, maybe even unknowingly. Aren't footprints loaded on demand? IIRC that was one of the reason

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
This is already drifting off topic. The patch submitter has to make a case of pros and cons. Ultimately it will be Wayne's decision since it's his code. I am actually trying to give the OP the information he needs to know as to whether it is worth his time pursuing this. He also knows that I

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Cirilo Bernardo
- Original Message - From: John Beard john.j.be...@gmail.com To: kicad-developers@lists.launchpad.net Cc: Sent: Friday, May 9, 2014 5:42 AM Subject: Re: [Kicad-developers] Forward-compatibility in s-expression formats On 07/05/14 07:19, Lorenzo Marcantonio wrote: On Wed, May 07

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Dick Hollenbeck
On 05/08/2014 05:10 PM, Rick Walker wrote: Hi Dick, it because I don't care if my old software does not load new footprints. (I type $ make, and I can load the new footprints.) I know you are a code developer and have the highly idiosyncratic kicad build process finely balanced at

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Rick Walker
Hi Dick, I guess if I was on commission I would try and talk you out of your decision. I didn't make any decision. I still use kicad for my own consulting work. I just couldn't get the team at Corning to stick with it. I tried to talk them out of the decision. I'm hopeful someday to

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 03:15:20PM -0700, Cirilo Bernardo wrote: The question is: what is really needed and how can it be implemented? Storing a whole sexp would be done with the DOM model or something similar (DOM is not exactly the best way to handle a sexp, but at least it's already done:P)

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-08 Thread Lorenzo Marcantonio
On Thu, May 08, 2014 at 03:10:48PM -0700, Rick Walker wrote: it because I don't care if my old software does not load new footprints. (I type $ make, and I can load the new footprints.) I know you are a code developer and have the highly idiosyncratic kicad build process finely balanced

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-07 Thread Lorenzo Marcantonio
On Wed, May 07, 2014 at 12:48:22AM +0100, John Beard wrote: I would have thought this would exactly be done at the end of tokenisation - this is when the current parser says erk, i expected one of 'fp_line', 'pad', , I give up now, no footprint for you. Instead, what it could do is go,

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-07 Thread Lorenzo Marcantonio
On Wed, May 07, 2014 at 12:36:18AM +0100, John Beard wrote: I support user-definable keys, and I quite like the CSS approach to this, where the extension keys start with -prefix, eg -moz-hyphens. Or the HTML DOM where data elements look like data-something, and are ignored by everything that

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-07 Thread Lorenzo Marcantonio
On Wed, May 07, 2014 at 12:44:05AM +0100, John Beard wrote: Then again, if you ever come across a data type that we didn't have the foresight to include at the start, you'd have to munge it into a string or other primitive to express it, or you're back to square one. That's why *real* sexps

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-07 Thread Lorenzo Marcantonio
On Tue, May 06, 2014 at 03:41:51PM -0700, Cirilo Bernardo wrote: I was thinking of the same sort of mechanism; after all, it's been done numerous times before (including for example the PostScript and PDF specifications). On an extreme, ASN.1 has an explicit mark for the point where to add

[Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread John Beard
I think it would be a good idea to allow unknown fields in the s-expression formats so that an older KiCad doesn't choke on things it doesn't understand, and doesn't need to. For example, I was thinking that it might be helpful to add a field to the footprint format: part_reference, which would

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread Lorenzo Marcantonio
On Tue, May 06, 2014 at 07:28:22PM +0100, John Beard wrote: I think it would be a good idea to allow unknown fields in the s-expression formats so that an older KiCad doesn't choke on things it doesn't understand, and doesn't need to. Good luck convincing Dick on this :D Jokes aside, the

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread Jean-Paul Louis
Why not collect all the field of any part being loaded, and consider all the fields that are not known as “user defined fields”? I would not agree to have a part_reference to be the combination of two of my user fields that are Supplier1 and PN_Supplier1, Supplier2 and PN_Supplier2, etc.. Just

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread Tomasz Wlostowski
On 06.05.2014 20:28, John Beard wrote: I think it would be a good idea to allow unknown fields in the s-expression formats so that an older KiCad doesn't choke on things it doesn't understand, and doesn't need to. For example, I was thinking that it might be helpful to add a field to the

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread Cirilo Bernardo
- Original Message - From: John Beard john.j.be...@gmail.com To: Kicad Developers kicad-developers@lists.launchpad.net Cc: Sent: Wednesday, May 7, 2014 4:28 AM Subject: [Kicad-developers] Forward-compatibility in s-expression formats I think it would be a good idea to allow

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread John Beard
On 06/05/14 21:47, Jean-Paul Louis wrote: Why not collect all the field of any part being loaded, and consider all the fields that are not known as “user defined fields”? In future you may want you use a word for a new field, and you don't really want to stomp on some poor sap who thought he

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread John Beard
On 06/05/14 23:18, Tomasz Wlostowski wrote: How about about adding a generic attribute set for each part, stored as a list of type-name-value entries: (part xxx (attribute simulation_model (string .cir) ) (attribute part_reference_farnell (int 123456 ) ) ) Such scheme would not

Re: [Kicad-developers] Forward-compatibility in s-expression formats

2014-05-06 Thread John Beard
On 06/05/14 21:47, Lorenzo Marcantonio wrote: That said, I think that *if* the sexp reader can traverse automatically a generic sexp (without having a grammar, only tokenising) we could decide that it could 'skip' each subexpression starting with an unknown token. Maybe with warnings:D I