From 1cc8b1c1220eb644d1ac5e8f9afad4631474e6d4 Mon Sep 17 00:00:00 2001
From: Jake Read <jake.read@cba.mit.edu>
Date: Tue, 19 Nov 2019 18:26:54 -0500
Subject: [PATCH] shuffle step one, lisc

---
 bootstrap.js                                  |  14 +++
 cf.js                                         |  16 +++
 filesys.js                                    |  14 ++-
 gogetter.js                                   |  12 ++
 helpers.js                                    |  15 ++-
 hunks/{pipes => comm}/devicepipe.js           |  12 +-
 hunks/{pipes/vfptc.js => comm/serialport.js}  |  10 +-
 hunks/{pipes => comm}/websocketclient.js      |  10 +-
 hunks/hunks.js                                |  14 +++
 hunks/image/displayimagedata.js               |  14 +++
 hunks/image/distanceTransform.js              |  13 +++
 hunks/image/edgeDetect.js                     |  13 +++
 hunks/image/multipleOffsets.js                |  15 ++-
 hunks/image/offset.js                         |  13 +++
 hunks/image/orientEdges.js                    |  13 +++
 hunks/image/readpng.js                        |  13 +++
 hunks/image/renderVectors.js                  |  13 +++
 hunks/image/thresholdrgba.js                  |  13 +++
 hunks/image/vectorize.js                      |  10 +-
 hunks/interface/array.js                      |   8 +-
 hunks/interface/arrowpad.js                   |  10 +-
 hunks/interface/button.js                     |   8 +-
 hunks/interface/int32.js                      |  10 +-
 hunks/interface/number.js                     |   8 +-
 hunks/interface/string.js                     |  10 +-
 hunks/interface/threejs_ghost.js              |   9 ++
 hunks/interface/toggle.js                     |  10 +-
 hunks/link.js                                 |  11 +-
 hunks/manager.js                              |  14 ++-
 hunks/math/absolutevalue.js                   |  34 ++++++
 hunks/math/booleaninversion.js                |  11 +-
 hunks/{primitive => math}/counter.js          |  11 +-
 ...reteconverter.js => discreteconversion.js} |   8 ++
 hunks/{primitive => math}/increment.js        |  10 +-
 hunks/math/plusequals.js                      |  51 ---------
 hunks/math/positivevalueof.js                 |  35 ------
 hunks/opencv/clipbycolor.js                   |  12 ++
 hunks/opencv/contourcenters.js                |  12 ++
 hunks/opencv/ocvwebcam.js                     |   8 +-
 hunks/pipes/pipetemplate.js                   | 103 ------------------
 hunks/statemachines/dex.js                    |  10 +-
 hunks/statemachines/srm20.js                  |   9 --
 hunks/template.js                             |  11 +-
 hunks/view.js                                 |  16 +--
 index.html                                    |   4 +-
 {view => libs}/d3.js                          |   0
 {view => libs}/jquery.min.js                  |   0
 processes/devicepipe.js                       |  10 +-
 processes/vfpts.js                            |   8 ++
 scratch.js                                    |  23 ----
 .../depricated}/simplestep.js                 |   6 -
 {hunks => scratch}/incomplete/opencsv.js      |   0
 view/divtools.js                              |  78 +++++++------
 view/fconstant.js                             |   9 +-
 view/fexample.js                              |  12 ++
 view/fjiggle.js                               |   7 ++
 view/flink.js                                 |  14 +++
 view/frect.js                                 |  16 ++-
 view/vbzt.js                                  |  15 +++
 view/vcontextmenu.js                          |  12 ++
 view/vdef.js                                  |  12 ++
 view/vdom.js                                  |  12 ++
 view/vfloater.js                              |  12 +-
 view/vfloop.js                                |  14 ++-
 view/vmsg.js                                  |  14 +++
 view/vptch.js                                 |  12 ++
 view/vtoplevel.js                             |  12 ++
 67 files changed, 689 insertions(+), 299 deletions(-)
 rename hunks/{pipes => comm}/devicepipe.js (92%)
 rename hunks/{pipes/vfptc.js => comm/serialport.js} (91%)
 rename hunks/{pipes => comm}/websocketclient.js (90%)
 create mode 100644 hunks/math/absolutevalue.js
 rename hunks/{primitive => math}/counter.js (71%)
 rename hunks/math/{discreteconverter.js => discreteconversion.js} (64%)
 rename hunks/{primitive => math}/increment.js (60%)
 delete mode 100644 hunks/math/plusequals.js
 delete mode 100644 hunks/math/positivevalueof.js
 delete mode 100644 hunks/pipes/pipetemplate.js
 delete mode 100644 hunks/statemachines/srm20.js
 rename {view => libs}/d3.js (100%)
 rename {view => libs}/jquery.min.js (100%)
 delete mode 100644 scratch.js
 rename {hunks/statemachines => scratch/depricated}/simplestep.js (98%)
 rename {hunks => scratch}/incomplete/opencsv.js (100%)

diff --git a/bootstrap.js b/bootstrap.js
index b9ed113..98c8533 100644
--- a/bootstrap.js
+++ b/bootstrap.js
@@ -1,3 +1,17 @@
+/*
+bootstrap.js
+
+client-side bootup of dataflow environment, and views into 
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // IDDE sends msgs to manager, does display etc
 // starts with a native manager
 
diff --git a/cf.js b/cf.js
index e8281eb..992e386 100644
--- a/cf.js
+++ b/cf.js
@@ -1,3 +1,19 @@
+/*
+cf.js
+
+entry point to start cuttlefish server
+serves files as if a static server, handles requests
+to write new contexts and systems to server-side memory 
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // new year new bootstrap
 
 const express = require('express')
diff --git a/filesys.js b/filesys.js
index dd0f42f..1ae15d7 100644
--- a/filesys.js
+++ b/filesys.js
@@ -1,4 +1,16 @@
-// do file management
+/*
+filesys.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
+// server-side file management, just a brief wrap on node fs 
 
 const fs = require('fs')
 
diff --git a/gogetter.js b/gogetter.js
index ed9427b..48b0454 100644
--- a/gogetter.js
+++ b/gogetter.js
@@ -1,3 +1,15 @@
+/*
+gogetter.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // fs abstraction for sys
 
 function GoGetter() {
diff --git a/helpers.js b/helpers.js
index ce5128a..e6783f6 100644
--- a/helpers.js
+++ b/helpers.js
@@ -1,3 +1,17 @@
+/*
+helpers.js
+
+utility for paths
+
+Jake Read at the Center for Bits and Atoms with Leo McElroy, Neil Gershenfeld
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 const pipe = (first, ...more) => more.reduce((acc,curr) => (...arguments) => curr(acc(...arguments)) , first);
 
 const offsetHelper = (distances, offset, width, height) => {
@@ -807,4 +821,3 @@ const vectorizeHelper = (imageRGBA, vectorFit = 1, sort = true) => {
 };
 
 const test = () => console.log("import is working");
-
diff --git a/hunks/pipes/devicepipe.js b/hunks/comm/devicepipe.js
similarity index 92%
rename from hunks/pipes/devicepipe.js
rename to hunks/comm/devicepipe.js
index 5ea4e65..85af29b 100644
--- a/hunks/pipes/devicepipe.js
+++ b/hunks/comm/devicepipe.js
@@ -1,10 +1,16 @@
 /*
+comm/devicepipe.js
 
-pipe transport for an fs.write, appropriate for linux-2-machines
+pipe transport for an fs.write, appropriate for linux-2-machines, clientside
 
-*/
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
-//
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
 
 import {
   Hunkify,
diff --git a/hunks/pipes/vfptc.js b/hunks/comm/serialport.js
similarity index 91%
rename from hunks/pipes/vfptc.js
rename to hunks/comm/serialport.js
index 5712241..1c92a56 100644
--- a/hunks/pipes/vfptc.js
+++ b/hunks/comm/serialport.js
@@ -1,7 +1,15 @@
 /*
+comm/devicepipe.js
 
-very fast ~~picket ship~~ pipe transport (client)
+transport to ah serialport on the server side
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 // OK: this is nice and should serve for a demo,
diff --git a/hunks/pipes/websocketclient.js b/hunks/comm/websocketclient.js
similarity index 90%
rename from hunks/pipes/websocketclient.js
rename to hunks/comm/websocketclient.js
index 2e7788d..a39f1c9 100644
--- a/hunks/pipes/websocketclient.js
+++ b/hunks/comm/websocketclient.js
@@ -1,7 +1,15 @@
 /*
+comm/websocketclient.js
 
-line input
+pipe to remote websocket server
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/hunks.js b/hunks/hunks.js
index d03de2e..5db28cd 100644
--- a/hunks/hunks.js
+++ b/hunks/hunks.js
@@ -1,3 +1,17 @@
+/*
+hunks/hunks.js
+
+boilerplate js for hunks,
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 /* ---------------------------    ---------------------------- */
 /* ------------------------ HUNKITUP ------------------------- */
 /* ---------------------------    ---------------------------- */
diff --git a/hunks/image/displayimagedata.js b/hunks/image/displayimagedata.js
index deb9e31..e326c73 100644
--- a/hunks/image/displayimagedata.js
+++ b/hunks/image/displayimagedata.js
@@ -1,3 +1,17 @@
+/*
+hunks/image/displayImageData.js
+
+render imageData into a canvas in the DOM
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import { Hunkify, Input, Output, State } from "../hunks.js";
 
 import { html, svg, render } from "https://unpkg.com/lit-html?module";
diff --git a/hunks/image/distanceTransform.js b/hunks/image/distanceTransform.js
index 317d6a1..3667a50 100644
--- a/hunks/image/distanceTransform.js
+++ b/hunks/image/distanceTransform.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/distanceTransform.js
+
+find distance to nearest pixel 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/edgeDetect.js b/hunks/image/edgeDetect.js
index 4fdc38d..e235f74 100644
--- a/hunks/image/edgeDetect.js
+++ b/hunks/image/edgeDetect.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/edgeDetect.js
+
+find edges 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/multipleOffsets.js b/hunks/image/multipleOffsets.js
index ff235bb..9d5540f 100644
--- a/hunks/image/multipleOffsets.js
+++ b/hunks/image/multipleOffsets.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/multipleOffsets.js
+
+write multiple offsets from distance field 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
@@ -58,7 +71,7 @@ export default function MultipleOffsets() {
     if (imageIn.io() && !vectors.io()) {
       function work() {
         //imports pipe, edgeDetectHelper, orientEdgesHelper, vectorizeHelper; could be a good idea to break these into different files
-        self.importScripts("http://localhost:8080/helpers.js"); 
+        self.importScripts("http://localhost:8080/helpers.js");
 
         self.onmessage = function(e) {
 
diff --git a/hunks/image/offset.js b/hunks/image/offset.js
index 2c0d8dc..bdd7412 100644
--- a/hunks/image/offset.js
+++ b/hunks/image/offset.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/offset.js
+
+walk along distance field 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/orientEdges.js b/hunks/image/orientEdges.js
index 535a985..9d05570 100644
--- a/hunks/image/orientEdges.js
+++ b/hunks/image/orientEdges.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/orientEdges.js
+
+edges -> nsew 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/readpng.js b/hunks/image/readpng.js
index c71825d..590f0e9 100644
--- a/hunks/image/readpng.js
+++ b/hunks/image/readpng.js
@@ -1,3 +1,16 @@
+/*
+hunks/image/readpng.js
+
+gather PNG image from the aether 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
 /* hunk template */
 
 // these are ES6 modules
diff --git a/hunks/image/renderVectors.js b/hunks/image/renderVectors.js
index dba71f2..9ba1f5d 100644
--- a/hunks/image/renderVectors.js
+++ b/hunks/image/renderVectors.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/renderVectors.js
+
+display vectors 
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/thresholdrgba.js b/hunks/image/thresholdrgba.js
index 93fdb4a..a20923a 100644
--- a/hunks/image/thresholdrgba.js
+++ b/hunks/image/thresholdrgba.js
@@ -1,4 +1,17 @@
 /*
+hunks/image/thresholdRGBA.js
+
+threshold an image
+
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+/*
 
 hunk template
 
diff --git a/hunks/image/vectorize.js b/hunks/image/vectorize.js
index 0c2c125..f92e510 100644
--- a/hunks/image/vectorize.js
+++ b/hunks/image/vectorize.js
@@ -1,7 +1,15 @@
 /*
+hunks/image/vectorize.js
 
-hunk template
+write vectors from distance field 
 
+Jake Read at the Center for Bits and Atoms with Neil Gershenfeld and Leo McElroy
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 // these are ES6 modules
diff --git a/hunks/interface/array.js b/hunks/interface/array.js
index 20557d3..4612d10 100644
--- a/hunks/interface/array.js
+++ b/hunks/interface/array.js
@@ -1,7 +1,13 @@
 /*
+hunks/interface/array.js
 
-number input
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/interface/arrowpad.js b/hunks/interface/arrowpad.js
index 7b9b2da..8b3c083 100644
--- a/hunks/interface/arrowpad.js
+++ b/hunks/interface/arrowpad.js
@@ -1,7 +1,15 @@
 /*
+hunks/interface/arrowpad.js
 
-arrowpad pressure, for maching jogging (probably)
+arrowpad pressure
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/interface/button.js b/hunks/interface/button.js
index 5dd7174..ecbd767 100644
--- a/hunks/interface/button.js
+++ b/hunks/interface/button.js
@@ -1,7 +1,13 @@
 /*
+hunks/interface/button.js
 
-contact
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import { Hunkify, Input, Output, State } from '../hunks.js'
diff --git a/hunks/interface/int32.js b/hunks/interface/int32.js
index bd35be9..eb1f153 100644
--- a/hunks/interface/int32.js
+++ b/hunks/interface/int32.js
@@ -1,7 +1,15 @@
 /*
+hunks/interface/int32.js
 
-number input
+used in early debugging for shipping types to embedded contexts 
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/interface/number.js b/hunks/interface/number.js
index 8dd5aca..0ff5488 100644
--- a/hunks/interface/number.js
+++ b/hunks/interface/number.js
@@ -1,7 +1,13 @@
 /*
+hunks/interface/number.js
 
-number input
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/interface/string.js b/hunks/interface/string.js
index a1a04a6..2548b01 100644
--- a/hunks/interface/string.js
+++ b/hunks/interface/string.js
@@ -1,7 +1,15 @@
 /*
+hunks/interface/string.js
 
-line input
+user line input
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import { Hunkify, Input, Output, State } from '../hunks.js'
diff --git a/hunks/interface/threejs_ghost.js b/hunks/interface/threejs_ghost.js
index ee4ebdc..d4cfa3b 100644
--- a/hunks/interface/threejs_ghost.js
+++ b/hunks/interface/threejs_ghost.js
@@ -1,7 +1,16 @@
 /*
+hunks/interface/threejs_ghost.js
 
 takes array for point, draws history of segements in tail
+a-la snake, but you can never win or loose
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/interface/toggle.js b/hunks/interface/toggle.js
index a9bc6a9..d276be1 100644
--- a/hunks/interface/toggle.js
+++ b/hunks/interface/toggle.js
@@ -1,7 +1,15 @@
 /*
+hunks/interface/toggle.js
 
 tow-gel
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import { Hunkify, Input, Output, State } from '../hunks.js'
@@ -39,6 +47,6 @@ export default function Toggle() {
     }
 
     this.loop = () => {
-        // ... nah 
+        // ... nah
     }
 }
diff --git a/hunks/link.js b/hunks/link.js
index 9b6dac1..c63057a 100644
--- a/hunks/link.js
+++ b/hunks/link.js
@@ -1,9 +1,18 @@
 /*
+hunks/link.js
 
-hookup,
+encapsulate external dataflow environments in local abstraction
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
+
 // HEADER
 import {
   Hunkify,
diff --git a/hunks/manager.js b/hunks/manager.js
index fcbdb26..6b40e36 100644
--- a/hunks/manager.js
+++ b/hunks/manager.js
@@ -1,4 +1,16 @@
-// heart of the fish ...
+/*
+hunks/manager.js
+
+heart of the fish...
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
 
 import {
   Hunkify,
diff --git a/hunks/math/absolutevalue.js b/hunks/math/absolutevalue.js
new file mode 100644
index 0000000..823181a
--- /dev/null
+++ b/hunks/math/absolutevalue.js
@@ -0,0 +1,34 @@
+/*
+hunks/math/absolutevalue.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
+
+import {
+  Hunkify,
+  Input,
+  Output,
+  State
+} from '../hunks.js'
+
+function AbsoluteValueOf(){
+  Hunkify(this)
+
+  let inp = this.input('number', 'og')
+  let out = this.output('number', 'abs')
+
+  this.loop = () => {
+    if(inp.io() && !(out.io())){
+      out.put(Math.abs(inp.get()))
+    }
+  }
+}
+
+export default AbsoluteValueOf
diff --git a/hunks/math/booleaninversion.js b/hunks/math/booleaninversion.js
index ba6cf1e..17a760d 100644
--- a/hunks/math/booleaninversion.js
+++ b/hunks/math/booleaninversion.js
@@ -1,9 +1,18 @@
 /*
+hunks/math/booleaninversion.js
 
-bit flippen
+bit flipper 
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
+
 import {
   Hunkify,
   Input,
diff --git a/hunks/primitive/counter.js b/hunks/math/counter.js
similarity index 71%
rename from hunks/primitive/counter.js
rename to hunks/math/counter.js
index 53d20d7..abfe39f 100644
--- a/hunks/primitive/counter.js
+++ b/hunks/math/counter.js
@@ -1,9 +1,18 @@
 /*
+hunks/math/counter.js
 
-on event, += 1 or -= 1
+on input, internal value += 1 or -= 1
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
+
 import {
   Hunkify,
   Input,
diff --git a/hunks/math/discreteconverter.js b/hunks/math/discreteconversion.js
similarity index 64%
rename from hunks/math/discreteconverter.js
rename to hunks/math/discreteconversion.js
index d4c669e..a9d94d5 100644
--- a/hunks/math/discreteconverter.js
+++ b/hunks/math/discreteconversion.js
@@ -1,7 +1,15 @@
 /*
+hunks/math/discreteconversion.js
 
 convert to floats, respect discretion
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/primitive/increment.js b/hunks/math/increment.js
similarity index 60%
rename from hunks/primitive/increment.js
rename to hunks/math/increment.js
index 06accd0..bb2eb1a 100644
--- a/hunks/primitive/increment.js
+++ b/hunks/math/increment.js
@@ -1,7 +1,15 @@
 /*
+hunks/math/increment.js
 
-stores num, increments by input, outputs num
+increments some value by input values,
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/hunks/math/plusequals.js b/hunks/math/plusequals.js
deleted file mode 100644
index 7a092d7..0000000
--- a/hunks/math/plusequals.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-
-output += input
-
-*/
-
-import {
-  Hunkify,
-  Input,
-  Output,
-  State
-} from '../hunks.js'
-
-export default function PlusEquals() {
-  Hunkify(this)
-
-  let internalValue = 0
-  let hasUpdate = false
-
-  let resetLine = new Input('boolean', 'reset', this)
-  let input = new Input('number', 'plus', this)
-  this.inputs.push(resetLine, input)
-
-  let output = new Output('number', 'equals', this)
-  this.outputs.push(output)
-
-  let reset = new State('boolean', 'reset', false)
-  reset.onChange = (value) => {
-    internalValue = 0
-  }
-  this.states.push(reset)
-
-  this.init = () => {
-    //
-  }
-
-  this.loop = () => {
-    if(resetLine.io()){
-      resetLine.get()
-      internalValue = 0
-    }
-    if(input.io()){
-      internalValue += input.get()
-      hasUpdate = true
-    }
-    if(!output.io() && hasUpdate){
-      output.put(internalValue)
-      hasUpdate = false
-    }
-  }
-}
diff --git a/hunks/math/positivevalueof.js b/hunks/math/positivevalueof.js
deleted file mode 100644
index 560f335..0000000
--- a/hunks/math/positivevalueof.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-
-the graph, it's shaped like a V
-
-*/
-
-import {
-  Hunkify,
-  Input,
-  Output,
-  State
-} from '../hunks.js'
-
-function PositiveValueOf(){
-  Hunkify(this)
-
-  let inp = new Input('number', 'og', this)
-  this.inputs.push(inp)
-
-  let out = new Output('number', 'abs', this)
-  this.outputs.push(out)
-
-  this.loop = () => {
-    if(inp.io() && !(out.io())){
-      let val = inp.get()
-      if(val > 0){
-        out.put(val)
-      } else {
-        out.put(val * -1)
-      }
-    }
-  }
-}
-
-export default PositiveValueOf
diff --git a/hunks/opencv/clipbycolor.js b/hunks/opencv/clipbycolor.js
index 98e7192..a6f9f1f 100644
--- a/hunks/opencv/clipbycolor.js
+++ b/hunks/opencv/clipbycolor.js
@@ -1,3 +1,15 @@
+/*
+hunks/opencv/clipbycolor.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import {
   Hunkify,
   Input,
diff --git a/hunks/opencv/contourcenters.js b/hunks/opencv/contourcenters.js
index 02f5459..4d157f0 100644
--- a/hunks/opencv/contourcenters.js
+++ b/hunks/opencv/contourcenters.js
@@ -1,3 +1,15 @@
+/*
+hunks/opencv/contourcenters.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import {
   Hunkify,
   Input,
diff --git a/hunks/opencv/ocvwebcam.js b/hunks/opencv/ocvwebcam.js
index 2fa1dd2..665d92e 100644
--- a/hunks/opencv/ocvwebcam.js
+++ b/hunks/opencv/ocvwebcam.js
@@ -1,7 +1,13 @@
 /*
+hunks/opencv/ocvwebcam.js
 
-hunk template
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 // these are ES6 modules
diff --git a/hunks/pipes/pipetemplate.js b/hunks/pipes/pipetemplate.js
deleted file mode 100644
index c2bad80..0000000
--- a/hunks/pipes/pipetemplate.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-
-pipes are websocket-having devices that commune with our server,
-this is a scratch / example of one such object
-
-*/
-
-import {
-  Hunkify,
-  Input,
-  Output,
-  State
-} from '../hunks.js'
-
-const STATUS_OPENING = 'opening...'
-const STATUS_OPEN = 'open'
-const STATUS_CLOSED = 'closed'
-const STATUS_ERROR = 'error'
-
-export default function Pipe() {
-  Hunkify(this)
-  let debug = false
-
-  let statusMessage = new State('string', 'status', STATUS_CLOSED)
-  let retryButton = new State('boolean', 'retry', false)
-  let echoButton = new State('boolean', 'echo', false)
-  this.states.push(statusMessage, retryButton, echoButton)
-  retryButton.onChange = (value) => {
-    startWsConnection()
-  }
-  echoButton.onChange = (value) => {
-    send(JSON.stringify({type: 'echo'}))
-  }
-
-  // coming merge of init and onload, however:
-  this.init = () => {
-    // force closed at startup; else program state can make us confused,
-    statusMessage.set(STATUS_CLOSED)
-    startWsConnection()
-  }
-
-  let ws = {}
-
-  let startWsConnection = () => {
-    // only attempt reconnect if we're not already opening, or opened
-    if (statusMessage.value === STATUS_OPEN || statusMessage.value === STATUS_OPENING) return
-    // ask the server to instantiate the reciprocal process,
-    statusMessage.set(STATUS_OPENING)
-    jQuery.get('pipeHookup/pipetemplate.js', (data) => {
-      if (data.startup) {
-        console.log('serverside launched, starting client')
-        console.log(data)
-        // have data.ip and data.port
-        ws = new WebSocket(`ws://${data.ip}:${data.port}`)
-        ws.onopen = (evt) => {
-          if (debug) console.log(this.name, 'opens')
-          statusMessage.set(STATUS_OPEN)
-        }
-        ws.onerror = (err) => {
-          if (debug) console.log(this.name, 'error', err)
-          statusMessage.set(STATUS_ERROR)
-        }
-        ws.onclose = (evt) => {
-          if (debug) console.log(this.name, 'closes')
-          statusMessage.set(STATUS_CLOSED)
-        }
-        ws.onmessage = (msg) => {
-          if (debug) console.log(this.name, 'recvs', msg)
-          recv(msg)
-        }
-      } else {
-        console.log('pipe received non-startup response from server')
-        statusMessage.set(STATUS_ERROR)
-      }
-    })
-  }
-
-  // write ur handler,
-  let recv = (msg) => {
-    let data = JSON.parse(msg.data)
-    console.log('pipe template recvs in placeholder', data)
-  }
-
-  // send wrapper
-  let send = (msg) => {
-    if (ws && ws.readyState === 1) {
-      ws.send(msg)
-      return true
-    } else {
-      console.error('attempt to send on a closed ws')
-      return false
-    }
-  }
-
-  this.loop = () => {
-    // handle your io
-  }
-
-  // rm this
-  this.onDelete = () => {
-    if(ws) ws.close()
-  }
-}
diff --git a/hunks/statemachines/dex.js b/hunks/statemachines/dex.js
index 22105aa..bb1913d 100644
--- a/hunks/statemachines/dex.js
+++ b/hunks/statemachines/dex.js
@@ -1,4 +1,5 @@
 /*
+hunks/statemachines/dex
 
 purpose built statemachine for the https://gitlab.cba.mit.edu/jakeread/displacementexercise
 aka DEX
@@ -6,11 +7,18 @@ aka king gripper
 aka the big beefy boi
 etc
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 /*
 
-loadcell readings:
+loadcell readings (for calibration)
 0g: 25
 100g: 14854
 200g: 29649
diff --git a/hunks/statemachines/srm20.js b/hunks/statemachines/srm20.js
deleted file mode 100644
index 34de2e9..0000000
--- a/hunks/statemachines/srm20.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-
-SRM20 interface, over a device server
-
-*/
-
-// OK:
-// take some path input, write it as a file, send to modela...
-// also, will have to take those paths [seg][i][x-y-z]
diff --git a/hunks/template.js b/hunks/template.js
index f814219..67c6165 100644
--- a/hunks/template.js
+++ b/hunks/template.js
@@ -1,9 +1,18 @@
 /*
+hunks/template.js
 
-hunk template
+example of ahn hunk
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
+
 // these are ES6 modules
 import {
   Hunkify,
diff --git a/hunks/view.js b/hunks/view.js
index 78bd4fb..b5dff0e 100644
--- a/hunks/view.js
+++ b/hunks/view.js
@@ -1,15 +1,15 @@
 /*
+hunks/view.js
 
-VIEW
+scope!
 
- - scrape to manager,
- - manager gogetter ... and then, hello click
- - and then, nicely:
- - also - link for flowcontrol when downstream non-conn ? the init-over-link question? a few states ...
- - div structure ... ? open something up just barely, to test node and scraper
- - beer 2 celly
- - div structure: the div(div) scaling unfuckery
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
 
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 import {
diff --git a/index.html b/index.html
index a35e702..d43b286 100644
--- a/index.html
+++ b/index.html
@@ -12,8 +12,8 @@
 <body>
     <link href="style.css" rel="stylesheet">
     <link href="asset/emoji.css" rel="stylesheet">
-    <script src="view/jquery.min.js"></script>
-    <script src="view/d3.js"></script>
+    <script src="libs/jquery.min.js"></script>
+    <script src="libs/d3.js"></script>
     <script src="libs/math.js" type="text/javascript"></script>
     <script type="module" src="bootstrap.js"></script>
 
diff --git a/view/d3.js b/libs/d3.js
similarity index 100%
rename from view/d3.js
rename to libs/d3.js
diff --git a/view/jquery.min.js b/libs/jquery.min.js
similarity index 100%
rename from view/jquery.min.js
rename to libs/jquery.min.js
diff --git a/processes/devicepipe.js b/processes/devicepipe.js
index 72991c1..bbb23e5 100644
--- a/processes/devicepipe.js
+++ b/processes/devicepipe.js
@@ -1,7 +1,15 @@
 /*
+processes/devicepipe.js
 
-browser -> filesys
+establishes link to server-side devices, unix style 
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 const WebSocketServer = require('ws').Server
diff --git a/processes/vfpts.js b/processes/vfpts.js
index 51f84d9..d2a8b0c 100644
--- a/processes/vfpts.js
+++ b/processes/vfpts.js
@@ -1,7 +1,15 @@
 /*
+processes/vfpts.js
 
 very fast ~~picket ship~~ pipe transport (server)
 
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
 */
 
 const WebSocketServer = require('ws').Server
diff --git a/scratch.js b/scratch.js
deleted file mode 100644
index 693d7ae..0000000
--- a/scratch.js
+++ /dev/null
@@ -1,23 +0,0 @@
-let uint8 = new Uint8Array(24)
-console.log(uint8)
-
-// let msg = {}
-//
-// if(msg.isAck){
-//   console.log('eval tru')
-// } else {
-//   console.log('eval false')
-// }
-//
-// let msgs = new Array()
-// if(msgs[1]){
-//   console.log('array evals tru')
-// } else {
-//   console.log('array evals false')
-// }
-//
-// let str = "a string"
-// console.log(str)
-// let strang = str
-// strang = "another string"
-// console.log(str)
diff --git a/hunks/statemachines/simplestep.js b/scratch/depricated/simplestep.js
similarity index 98%
rename from hunks/statemachines/simplestep.js
rename to scratch/depricated/simplestep.js
index 6407b2c..46e6c1a 100644
--- a/hunks/statemachines/simplestep.js
+++ b/scratch/depricated/simplestep.js
@@ -1,9 +1,3 @@
-/*
-
-hunk template
-
-*/
-
 // these are ES6 modules
 import {
   Hunkify,
diff --git a/hunks/incomplete/opencsv.js b/scratch/incomplete/opencsv.js
similarity index 100%
rename from hunks/incomplete/opencsv.js
rename to scratch/incomplete/opencsv.js
diff --git a/view/divtools.js b/view/divtools.js
index 002b45d..d27d2b8 100644
--- a/view/divtools.js
+++ b/view/divtools.js
@@ -1,12 +1,24 @@
+/*
+view/divtools.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import * as BZ from './vbzt.js'
 
-// I forsee genuine instantiation and state here ... 
-// or a roll into view 
+// I forsee genuine instantiation and state here ...
+// or a roll into view
 
 let port
 
 function init(dom, prt) {
-    port = prt 
+    port = prt
     console.log('DT INIT with dom', dom, 'and port', port)
     BZ.init(dom)
 }
@@ -58,7 +70,7 @@ function readXY(div){
 function writeDefDom(def, parentdom, debug) {
     // debug
     if (debug) console.log('writing for def', def)
-    // a div to locate it 
+    // a div to locate it
     let de = document.createElement('div')
     $(de).addClass('block').attr('id', def.id)
 
@@ -71,16 +83,16 @@ function writeDefDom(def, parentdom, debug) {
         evt.preventDefault()
         evt.stopPropagation()
 
-        // stop the D3 sim 
+        // stop the D3 sim
         // halting ... we don't have access to that here
-        // we need to roll this into view 
-        // save it for post-link world 
+        // we need to roll this into view
+        // save it for post-link world
 
         //offsetX = evt.clientX - domElem.getBoundingClientRect().left
         //offsetY = evt.clientY - domElem.getBoundingClientRect().top
 
         function domElemMouseMove(evt) {
-            // TRANSFORMS here to move div about on drag 
+            // TRANSFORMS here to move div about on drag
             evt.preventDefault()
             evt.stopPropagation()
             let ct = readTransform(de)
@@ -88,12 +100,12 @@ function writeDefDom(def, parentdom, debug) {
             ct.y += evt.movementY
             writeTransform(de, ct)
             drawLinks(parentdom)
-            // TODO rewrite redraw 
+            // TODO rewrite redraw
             //redrawLinks()
         }
 
         function rmOnMouseUp(evt) {
-            // would do save of position state here 
+            // would do save of position state here
             // TODO /\
             document.removeEventListener('mousemove', domElemMouseMove)
             document.removeEventListener('mouseup', rmOnMouseUp)
@@ -134,27 +146,27 @@ function writeDefDom(def, parentdom, debug) {
 }
 
 // PORTS (inputs and outputs) are <li> objects with unique IDs,
-// outputs hold a list of the unique id's they are connected to, for drawing 
-// beziers with 
+// outputs hold a list of the unique id's they are connected to, for drawing
+// beziers with
 // we're close, just
 /*
     - write message to manager
-    - receive newlink messages from manager 
-    - something for deleting links ? 
-    - f it all and get to the link link 
+    - receive newlink messages from manager
+    - something for deleting links ?
+    - f it all and get to the link link
 */
 function writePortDom(port, parent, inout, bigdom, debug) {
     if (false) console.log('port dom', port, parent.id, inout)
     let dom = $('<li>' + port.name + '</li>').addClass(inout).get(0)
     dom.id = parent.id + '_' + inout + '_' + port.name
     // this goes in so that we can handily draw links
-    dom.connectedTo = new Array() 
-    // let ... in is OK for zero-length arrays, but for ... of throws errors 
+    dom.connectedTo = new Array()
+    // let ... in is OK for zero-length arrays, but for ... of throws errors
     for(let conn in port.connections){
         let cn = port.connections[conn]
         dom.connectedTo.push('#' + cn.parentid + '_' + 'input' + '_' + cn.input)
     }
-    // messy global for the potential floater 
+    // messy global for the potential floater
     let floater = {}
     // the events
     function evtDrag(drag) {
@@ -164,25 +176,25 @@ function writePortDom(port, parent, inout, bigdom, debug) {
         writeTransform(floater, cp)
         drawLinks(bigdom)
     }
-    // startup the floater 
+    // startup the floater
     dom.addEventListener('mousedown', (down) => {
         console.log('MOUSEDOWN for', port.type, port.name, down)
-        // get the location to make the floater, 
+        // get the location to make the floater,
         let cp = BZ.getRightHandle(dom, bigdom.subscale)
         floater = $('<div>').attr('id', 'floater').append(port.type).get(0)
         floater.style.zIndex = '1'
         bigdom.appendChild(floater)
         // 'hookup' our floater and its berth
         dom.connectedTo.push('#floater')
-        // init out floater position, and put it in the dom 
-        writeTransform(floater, { 
-            s: bigdom.subscale, 
-            x: cp.x - 80 * bigdom.subscale, 
+        // init out floater position, and put it in the dom
+        writeTransform(floater, {
+            s: bigdom.subscale,
+            x: cp.x - 80 * bigdom.subscale,
             y: cp.y - (floater.clientHeight / 2) * bigdom.subscale
         })
-        // do relative moves 
+        // do relative moves
         bigdom.addEventListener('mousemove', evtDrag)
-        // and delete / act when mouse comes up 
+        // and delete / act when mouse comes up
         bigdom.addEventListener('mouseup', function evtUp(up) {
             console.log('MOUSEUP ON', up.target.id)
             // recall name and parent id from id
@@ -200,7 +212,7 @@ function writePortDom(port, parent, inout, bigdom, debug) {
             }
             writeMsg(msg)
             // do things to conn, then
-            // cleanup 
+            // cleanup
             bigdom.removeEventListener('mouseup', evtUp)
             bigdom.removeEventListener('mousemove', evtDrag)
             dom.connectedTo.splice(dom.connectedTo.indexOf('#floater'), 1)
@@ -249,7 +261,7 @@ function writeStateDom(state, parent) {
 
         default:
 
-            // + note on nonrec type 
+            // + note on nonrec type
             break
     }
     return dom
@@ -281,20 +293,20 @@ function writeMsg(msg){
 function drawLinks(dom) {
     // from within the div
     let outputs = $(dom).children('.block').children('.outputs').children('.output')
-    // clear all links 
+    // clear all links
     BZ.clear(dom)
     // and draw new ones
     for (let output of outputs) {
-        // finding the children to hookup to 
+        // finding the children to hookup to
         for(let conn in output.connectedTo){
             let hookup = $(dom).find(output.connectedTo[conn])
             if(hookup.length !== 1){
-                // this can happen when a dependent is not loaded yet 
+                // this can happen when a dependent is not loaded yet
                 console.log('missing connection')
             } else {
                 let hk = hookup.get(0)
                 let head = BZ.getRightHandle(output, dom.subscale)
-                let tail 
+                let tail
                 if(hk.id === 'floater'){
                     tail = BZ.getFloaterHandle(hk, dom.subscale)
                 } else {
@@ -314,4 +326,4 @@ export {
     writeTransform,
     writeDefDom,
     drawLinks
-}
\ No newline at end of file
+}
diff --git a/view/fconstant.js b/view/fconstant.js
index 037952b..c8e9cc6 100644
--- a/view/fconstant.js
+++ b/view/fconstant.js
@@ -1,5 +1,12 @@
+/*
+view/fconstant.js
+
+D3 utility, not mine
+*/
+
+
 // constant: a fn' wrpper for a value,
-// because chained accessors ... 
+// because chained accessors ...
 
 export default function(x) {
   return function() {
diff --git a/view/fexample.js b/view/fexample.js
index 6c4cd73..d7a86e7 100644
--- a/view/fexample.js
+++ b/view/fexample.js
@@ -1,3 +1,15 @@
+/*
+view/fexample.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // this is a custom d3 force, written as an es6 module like the lord intended
 // an experiment,
 // also: jake learns how the pros write js (?)
diff --git a/view/fjiggle.js b/view/fjiggle.js
index de46cff..e40c6bd 100644
--- a/view/fjiggle.js
+++ b/view/fjiggle.js
@@ -1,3 +1,10 @@
+/*
+view/fjiggle.js
+
+D3 utility, not mine 
+*/
+
+
 export default function() {
   return (Math.random() - 0.5) * 1e-6;
 }
diff --git a/view/flink.js b/view/flink.js
index 34895f8..83389de 100644
--- a/view/flink.js
+++ b/view/flink.js
@@ -1,3 +1,17 @@
+/*
+view/flink.js
+
+D3 custom force for def-to-def links 
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import constant from "./fconstant.js";
 import jiggle from "./fjiggle.js";
 
diff --git a/view/frect.js b/view/frect.js
index da715ff..2fa90ab 100644
--- a/view/frect.js
+++ b/view/frect.js
@@ -1,3 +1,17 @@
+/*
+view/frect.js
+
+D3 custom force for rectangular collisions, needs work 
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 import constant from "./fconstant.js";
 import jiggle from "./fjiggle.js";
 
@@ -103,7 +117,7 @@ export default function(radius) {
         }
         return
       } // end if-data
-      return updated 
+      return updated
     } // end apply()
   }
 
diff --git a/view/vbzt.js b/view/vbzt.js
index fcb6898..de1d730 100644
--- a/view/vbzt.js
+++ b/view/vbzt.js
@@ -1,3 +1,18 @@
+/*
+view/vbzt.js
+
+bezier drawing
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
+
 /* ---------------------------        ---------------------------- */
 /* ----------------------- DRAWING BEZIERS ----------------------- */
 /* ---------------------------        ---------------------------- */
diff --git a/view/vcontextmenu.js b/view/vcontextmenu.js
index 6265834..34b4d6e 100644
--- a/view/vcontextmenu.js
+++ b/view/vcontextmenu.js
@@ -1,3 +1,15 @@
+/*
+view/vcontextmenu.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // writes the context (right-click) menu ...
 
 function cfContextMenu(evt, view, dt) {
diff --git a/view/vdef.js b/view/vdef.js
index 2a34270..0192da1 100644
--- a/view/vdef.js
+++ b/view/vdef.js
@@ -1,3 +1,15 @@
+/*
+view/vdef.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // a def is not a hunk, it's a definition of a hunk - the mirror image
 
 import {
diff --git a/view/vdom.js b/view/vdom.js
index 11339df..36aa27c 100644
--- a/view/vdom.js
+++ b/view/vdom.js
@@ -1,3 +1,15 @@
+/*
+view/vdom.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // ay
 
 function DomTools(View) {
diff --git a/view/vfloater.js b/view/vfloater.js
index 643d7bf..547f062 100644
--- a/view/vfloater.js
+++ b/view/vfloater.js
@@ -1,4 +1,14 @@
-// ui divs / doms / and tigers
+/*
+view/vfloater.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
 
 import DomTools from './vdom.js'
 
diff --git a/view/vfloop.js b/view/vfloop.js
index 69361ac..e108190 100644
--- a/view/vfloop.js
+++ b/view/vfloop.js
@@ -1,4 +1,16 @@
-// force loop for the dom div document world
+/*
+view/vfloop.js
+
+force loop for the dom div document world
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
 
 import frect from './frect.js'
 import flink from './flink.js'
diff --git a/view/vmsg.js b/view/vmsg.js
index f49eebf..7acd75c 100644
--- a/view/vmsg.js
+++ b/view/vmsg.js
@@ -1,3 +1,17 @@
+/*
+view/vmsg.js
+
+largely unused appendage
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // micro html console
 
 function MessageBox(View) {
diff --git a/view/vptch.js b/view/vptch.js
index 0d85ef0..033c87d 100644
--- a/view/vptch.js
+++ b/view/vptch.js
@@ -1,3 +1,15 @@
+/*
+view/vptch.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // patches are programs that are *incomplete without you*
 
 import GoGetter from '../../gogetter.js'
diff --git a/view/vtoplevel.js b/view/vtoplevel.js
index c1b3e5b..9cbeed7 100644
--- a/view/vtoplevel.js
+++ b/view/vtoplevel.js
@@ -1,3 +1,15 @@
+/*
+view/vtoplevel.js
+
+Jake Read at the Center for Bits and Atoms
+(c) Massachusetts Institute of Technology 2019
+
+This work may be reproduced, modified, distributed, performed, and
+displayed for any purpose, but must acknowledge the squidworks and cuttlefish projects.
+Copyright is retained and must be preserved. The work is provided as is;
+no warranty is provided, and users accept all liability.
+*/
+
 // just this fn...
 
 import cfContextMenu from './vcontextmenu.js'
-- 
GitLab