This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require("coffee-script/register"); | |
| required = require("./required.coffee"); | |
| _ = require("lodash"); | |
| // require("underscore") will now work in every module | |
| required("underscore", _); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name (java.lang.String) (RW) | |
| The name of the object | |
| current-level-buffers (java.lang.Integer) (RO) | |
| Current number of buffers in the queue | |
| current-level-bytes (java.lang.Integer) (RO) | |
| Current amount of data in the queue (bytes) | |
| current-level-time (java.lang.Long) (RO) | |
| Current amount of data in the queue (in ns) | |
| max-size-buffers (java.lang.Integer) (RW) | |
| Max. number of buffers in the queue (0=disable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use 'clojure.core.logic) | |
| (use 'clojure.core.logic.protocols) | |
| (defn pluso [t1 t2 s] | |
| (fn goal [a] | |
| (let [args (map (partial walk a) [t1 t2 s]) | |
| fresh? (map lvar? args) | |
| ground? (map not fresh?) | |
| [t1 t2 s] args] | |
| (cond |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn pluso [t1 t2 s] | |
| (fn goal [a] | |
| (let [args (map (partial walk a) [t1 t2 s]) | |
| fresh? (map lvar? args) | |
| ground? (map not fresh?)] | |
| (cond | |
| (= [true true true] ground?) (if (= s (+ t1 t2)) a nil) | |
| (= [true true false] ground?) (unify a s (+ t1 t2)) | |
| (= [true false true] ground?) (unify a t2 (- s t1)) | |
| (= [false true true] ground?) (unify a t1 (- s t2)) |