← Back to team overview

kicad-developers team mailing list archive

Re: Haskell Library

 

On 2 December 2014 at 07:28, Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxx
> wrote:

> On Mon, Dec 01, 2014 at 08:55:10PM +0000, Kaspar Emanuel wrote:
> > Hey,
> >
> > I released a Haskell library that can parse and write .kicad_mod files.
> >
> > https://hackage.haskell.org/package/kicad-data
> >
> > This can parse and pretty-print all the official libraries from Github.
>
> And I was thinking I was the esoteric programmer using common lisp :D
>
> (too bad, since a backward-compatible small patch could have made the
> sexp files directly loadable from lisp...)
>

What patch would that be? Something to do with dotted lists?

In Haskell, it seems, s-expression based syntaxes are very common as
examples in beginner tutorials so I was very happy to have something
potentially useful, but also feasible, to work on while learning.

One interesting thing, that would be harder to achieve in another language,
is that in my tests I can check that 100s of randomly generated pcbnew
expressions (pad, at, xyz, module.. etc) when written and parsed are the
same as the original (ignoring floating-point errors) so my library is
(almost) proven to be internally consistent.

Follow ups

References