Mercurial > coderloop
view src/web_ship.clj @ 0:307a81e46071 tip
initial committ
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 18 Oct 2011 01:17:49 -0700 |
parents | |
children |
line wrap: on
line source
1 (ns coderloop.web-ship2 (:use rlm.shell-inspect)3 (:use [clojure.contrib.duck-streams :as ds :only []]))6 ;;screw this ----8 (defn sail9 ([]10 (ds/slurp*11 (str "http://localhost:3000/ship/sail")))12 ([host]13 (ds/slurp*14 (str "http://localhost:3000/ship/sail?host=" host))))16 (comment -- this is the solution18 WBL*| start19 WB|L* move L20 *WB|L sail back21 B|*WL move W22 LB*|W move L23 L|*WB move B24 *L|WB sail back25 |*WBL move L27 )29 ;; translate into code32 (def B "bsd")33 (def L "linux")34 (def W "windows")37 (if (command-line?)38 (do39 (sail L)40 (sail)41 (sail W)42 (sail L)43 (sail B)44 (sail)45 (sail L)46 (System/exit 0)))