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
;; | |
(ns clojfix.simple) | |
(use 'gloss.core 'gloss.io) | |
(import | |
[java.nio | |
ByteBuffer]) | |
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
(ns dining-service | |
(:use aleph.core) | |
(:use aleph.http) | |
(:use net.cgrand.moustache) | |
) | |
(defn report-handler [response-channel request] | |
(enqueue response-channel | |
{:status 200 | |
:headers {"content-type" "text/plain"} |
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
(ns scratchpad | |
(:use [aleph.core :only (siphon wrap-channel)] | |
[aleph.tcp :only (start-tcp-server)] | |
[aleph.formats :only (channel-buffer->string)])) | |
(defn echo-handler [channel connection-info] | |
(siphon (wrap-channel channel #(str "Response : " (channel-buffer->string %))) channel)) | |
;; Returns function to stop the server | |
(def server (start-tcp-server echo-handler {:port 8080})) |
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
(ns draw-order (:use [penumbra.opengl] [penumbra.window])) | |
(defn- init [state] | |
(enable :depth-test) | |
(ortho-view 0 0 640 480 -1 1) | |
(scale 1 1 -1) | |
state) | |
(defn draw-square [x y w h] | |
(draw-quads |
NewerOlder