{"id":113,"date":"2009-03-05T18:17:41","date_gmt":"2009-03-06T02:17:41","guid":{"rendered":"http:\/\/sambaker.net\/neattools\/?p=113"},"modified":"2009-03-05T18:17:41","modified_gmt":"2009-03-06T02:17:41","slug":"go-forth-and-subtract","status":"publish","type":"post","link":"https:\/\/sambaker.net\/neattools\/?p=113","title":{"rendered":"Go Forth and Subtract"},"content":{"rendered":"<p>I&#8217;m beginning to think I&#8217;m going to have to restructure my modules again.  Currently my program assumes that all modules can take and make an unlimited number of connections and that they are all of the same type. It&#8217;s automatically handling it all nicely, but in practice NeatTools modules have many different input and output requirements.  Some have multiple outputs of the same kinds, some multiple, each of a different kind.  Some have a fixed number, some have unlimited.  You can see where I&#8217;m going with this.  Currently all modules start out with 0 inputs and outputs on all sides.  When a connection is created it creates one.  What I guess I need to do is start differentiating my modules&#8217; connections. Crap. Any suggestions would be appreciated.<\/p>\n<p>Bottom outputs seem pretty rare, so I&#8217;m ignoring them until I can&#8217;t anymore.  For the modules that need two inputs, like subtractions, I&#8217;ve created two types of &#8220;mom&#8221;s (the arrays that hold the parent connections), mom and topMom.  Which allows the module to tell which inputs are from the top and which are from the left.  This should pretty easily work with division too.<\/p>\n<p>As an interesting difference between my subtraction module and NeatTools&#8217;.  Mine will accept unlimited top and side inputs and sum them before performing the subtraction.<br \/>\n<div id=\"swf9d091\">This movie requires Flash Player 9<\/div>\n<script type=\"text\/javascript\">\n\tswfobject.embedSWF(\"source\/neattools16.swf\", \"swf9d091\", \"400\", \"400\", \"9.0.0\", \"\", {}, {wmode: \"window\", menu: \"false\", quality: \"high\", bgcolor: \"#FFFFFF\", allowScriptAccess: \"always\"}, {});\n<\/script>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m beginning to think I&#8217;m going to have to restructure my modules again. Currently my program assumes that all modules can take and make an unlimited number of connections and that they are all of the same type. It&#8217;s automatically handling it all nicely, but in practice NeatTools modules have many different input and output [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/posts\/113"}],"collection":[{"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":1,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sambaker.net\/neattools\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}