5 ms·
I have been learning Racket to make a footprint editor for KiCAD. KiCAD is a software for creating electronics PCBs and a footprint is a drawing of the PCB laye
by kasbah 10y ago
I have been learning Racket to make a footprint editor for KiCAD. KiCAD is a software for creating electronics PCBs and a footprint is a drawing of the PCB layers for a landing pattern for a particular electronic component. https://github.com/kasbah/footwork https://github.com/kasbah/footwork
The idea is pretty much a sketch-n-sketch approach to footprint editing. https://ravichugh.github.io/sketch-n-sketch/index.html https://ravichugh.github.io/sketch-n-sketch/index.html
Choosing Racket for this application was a no brainer as it demands data-code intermingling with an s-expression based format and redefining the language to suite the application. Racket also has excellent GUI library that allowed me to get a graphics pane and a text-editor GUI up very quickly.
The APIs that Racket libraries provide seem a bit like quantity over quality to me. I dread having to sift though the docs for the functions I actually need. On the one hand every function is thoroughly documented on the other the descriptions are often seeped in the jargon surrounding the language.
For instance, this may be a stupid beginner mistake, but I couldn't work out how to make `send` and `apply` work together. Coming from Haskell I assumed there would be straight forward way to compose these things. Instead I had to resort to use the `send/apply` function and there seem to be a lot of these special purpose functions all over the place that are trying to anticipate your usage rather than providing composable primitives.
- dmux 10y agoYour comment about quantity over quality rings true for me. I wish there was a simple page in their docs that organized all the functions in a more readable format. Is there a function discovery feature as there is with Ruby?
- samth 10y agoWhich "function discovery feature" do you mean? That sounds like something that would be nice to add. The documentation page includes all the functions available in all the libraries you have installed (locally) or that are available in packages (on docs.racket-lang.org) so a single-page list would probably be a little overwhelming.