Skip to content

Instantly share code, notes, and snippets.

app [0, 80]
device [1, 80, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
app [0, 102]
device [2, 102, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
app [2, 85, 8, 4]
device [62, 85, 0, 0, 0, 0, 0, 4, 96, 4, 97, 109, 97, 122, 111, 110, 46, 99,
SUBSYSTEM=="usb", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="hid", MODE="0660", GROUP="plugdev"
app [0, 206]
device [24, 207, 28, 109, 49, 116, 31, 105, 182, 185, 111, 9, 228, 247, 184, 80, 103, 41, 134, 85, 161, 248, 211, 190, 28, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
device [1, 206, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
...
app [24, 205, 126, 95, 137, 8, 8, 73, 51, 79, 162, 123, 173, 255, 14, 54, 29, 174, 217, 190, 85, 85, 63, 204, 176, 179]
device [1, 205, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
...
@kasbah
kasbah / canvas.rkt
Last active February 21, 2016 16:49
#lang racket/gui
(define frame (new frame%
[label "Example"]
[width 300]
[height 300]))
(define black (make-color 0 0 0))
(new canvas% [parent frame]
{
"configHash": 3703766225,
"persistifyArgs": {
"cache": {
"/home/ubuntu/kitnic/build/.temp/boards/github.com/kitnic/Bus_Pirate/info.json": {
"source": "{\"id\":\"github.com/kitnic/Bus_Pirate\",\"description\":\"The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff.\",\"site\":\"http://dangerousprototypes.com/docs/Bus_Pirate\",\"bom\":[{\"reference\":\"C1-C6\",\"quantity\":6,\"description\":\"\",\"partNumbers\":[\"Kemet C0603C104K5RACTU\"],\"retailers\":{\"Digikey\":\"399-5089-1-ND\",\"Mouser\":\"80C0603C104K5R\",\"RS\":\"7738601\",\"Newark\":\"72J5992\",\"Farnell\":\"1288255\"},\"row\":11},{\"reference\":\"C7,C8,C9\",\"quantity\":3,\"description\":\"\",\"partNumbers\":[\"Kemet C0603C105Z8VACTU\"],\"retailers\":{\"Digikey\":\"399-3216-1-ND\",\"Mouser\":\"80C0603C105Z8V\",\"RS\":\"5158479\",\"Newark\":\"84K8389\",\"Farnell\":\"2522398\"},\"row\":11},{\"reference\":\"C10,C11\",\"quantity\":2,\"description\":\"\",\"partNumbers\":[\"Sprague 293D106X0010A2TE3\",\"Vishay 293D1
#lang racket/gui
(define mv (new frame% [label "gui"]))
(define buffer (new canvas% [parent mv]))
(send mv create-status-line)
(send mv show #t)
require: unknown module
module name: #<resolved-module-path:'#%builtin>
context...:
/usr/share/racket/collects/racket/private/pre-base.rkt: [traversing imports]
/usr/share/racket/collects/racket/private/base.rkt: [traversing imports]
/usr/share/racket/collects/syntax/module-reader.rkt: [traversing imports]
(submod /usr/share/racket/collects/racket/main.rkt reader): [traversing imports
#lang typed/racket/gui
(require/typed
racket/sandbox
[make-evaluator
(->*
(Symbol)
(#:requires (List String))
(-> String Any))])

Footwork is an experimental KiCAD footprint (text) editor written in Racket. Footwork takes advantage of Lisp's code-data equivalence to offer a unique approach to PCB design: KiCAD's footprint format becomes a domain specific language embedded in the Racket programming language.

  • The interface is text-first allowing users to make arbitrary edits: their needs need not be anticipated by the user interface
  • Users still immediately see the effects of their edits through a graphical preview
  • Users can use a fully featured general purpose programming languages to generate and modify footprints
  • Traditional (mouse based) manipulation is being added as calls to scripting
  • Racket's Rosette language, an interface to SMT solvers, offers the exciting opportunity to make use of cutting edge techniques in programming synthesis for design automation

https://github.com/monostable/footwork

--- before.svg 2016-12-31 18:12:20.648539920 +0000
+++ after.svg 2016-12-31 18:12:27.276539685 +0000
@@ -371,7 +371,7 @@
<use xlink:href="#Bk4eIZtfQHx_pad-10" x="3445" y="1270"/>
<use xlink:href="#Bk4eIZtfQHx_pad-10" x="3445" y="2370"/>
<use xlink:href="#Bk4eIZtfQHx_pad-10" x="1445" y="2970"/>
- <path d="M 1585 2984 1585 2956 M 1685 2956 1685 2984 M 1785 2984 1785 2956 M 1885 2956 1885 2984 M 1985 2984 1985 2956 M 2085 2956 2085 2984 M 2185 2984 2185 2956 M 2285 2956 2285 2984 M 2385 2984 2385 2956 M 2485 2956 2485 2984 M 2645 2984 2645 2956 M 2745 2956 2745 2984 M 2845 2984 2845 2956 M 2945 2956 2945 2984 M 3045 2984 3045 2956 M 3145 2956 3145 2984 M 3245 2984 3245 2956 M 3345 2956 3345 2984 M 3320 1779 3320 1751 M 3220 1751 3220 1779 M 3120 1779 3120 1751 M 3020 1751 3020 1779 M 2920 1779 2920 1751 M 2820 1751 2820 1779 M 2720 1779 2720 1751 M 2620 1751 2620 1779 M 2520 1779 2520 1751 M 2420 1751 2420 1779 M 2320 1779 2320 1751 M 2220 1751 2220 1779 M 2120 1779 2120 1751 M 2020 175