rlm@0: (ns coderloop.web-ship rlm@0: (:use rlm.shell-inspect) rlm@0: (:use [clojure.contrib.duck-streams :as ds :only []])) rlm@0: rlm@0: rlm@0: ;;screw this ---- rlm@0: rlm@0: (defn sail rlm@0: ([] rlm@0: (ds/slurp* rlm@0: (str "http://localhost:3000/ship/sail"))) rlm@0: ([host] rlm@0: (ds/slurp* rlm@0: (str "http://localhost:3000/ship/sail?host=" host)))) rlm@0: rlm@0: (comment -- this is the solution rlm@0: rlm@0: WBL*| start rlm@0: WB|L* move L rlm@0: *WB|L sail back rlm@0: B|*WL move W rlm@0: LB*|W move L rlm@0: L|*WB move B rlm@0: *L|WB sail back rlm@0: |*WBL move L rlm@0: rlm@0: ) rlm@0: rlm@0: ;; translate into code rlm@0: rlm@0: rlm@0: (def B "bsd") rlm@0: (def L "linux") rlm@0: (def W "windows") rlm@0: rlm@0: rlm@0: (if (command-line?) rlm@0: (do rlm@0: (sail L) rlm@0: (sail) rlm@0: (sail W) rlm@0: (sail L) rlm@0: (sail B) rlm@0: (sail) rlm@0: (sail L) rlm@0: (System/exit 0))) rlm@0: rlm@0: rlm@0: rlm@0: