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
| : fizz? ( n -- ? ) | |
| 3 mod 0 = ; | |
| : buzz? ( n -- ? ) | |
| 5 mod 0 = ; | |
| : fizzbuzz? ( n -- ? ) |
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
| (asdf:oos 'asdf:load-op :contextl) | |
| (in-package :contextl-user) | |
| (defclass grouped-layer (standard-layer-class) ()) | |
| (defgeneric group-root (layer)) | |
| (defgeneric default-layer (layer)) | |
| (define-layered-method adjoin-layer-using-class |
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
| ;; | |
| ;;(in-package :3d-engine) | |
| (in-package :cl-user) | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; INIT | |
| ;;(pushnew "/home/malune/.sbcl/systems/" asdf:*central-registry*) | |
| ;; | |
| (asdf:operate 'asdf:load-op :cl-glut) | |
| (asdf:operate 'asdf:load-op :split-sequence) |
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
| USING: assocs byte-arrays.hex io io.binary io.encodings.binary | |
| io.sockets kernel sequences ; | |
| IN: riak | |
| ! ---------------------------------------------------------------------------- | |
| CONSTANT: rpb-ping-req HEX{ 00 00 00 01 01 } | |
| : decode-ping-response ( -- n ) | |
| 0 ; |
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
| USING: io io.encodings.binary io.sockets byte-arrays.hex ; | |
| IN: riak | |
| ! ---------------------------------------------------------------------------- | |
| CONSTANT: rpb-ping-req HEX{ 00 00 00 01 01 } | |
| CONSTANT: rpb-ping-resp HEX{ 00 00 00 01 02 } | |
| CONSTANT: rpb-get-client-id-req HEX{ 00 00 00 01 03 } | |
| CONSTANT: rpb-get-client-id-resp HEX{ 00 00 00 07 04 0A 04 01 65 01 B5 } | |
| : request ( req -- resp ) |
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
| USING: csv grouping io io.encodings.utf8 io.files namespaces sequences | |
| ; | |
| IN: csv-test | |
| ! --------------------------------------------------------------------------- | |
| : sample-data ( data -- ) | |
| utf8 file-lines 4 group output-stream get write-csv ; |
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
| ;;-------------------------------------------------------------------- | |
| ;;-- Types | |
| ;; slot-number type | |
| (defun within-slot-number-rangep (n) | |
| (not (or (< n 0) (> n 255)))) | |
| (deftype slot-number () | |
| `(and fixnum (satisfies within-slot-number-rangep))) |
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
| etate@etate-K61IC:~/snap-extension-riak-example$ mkdir config | |
| etate@etate-K61IC:~/snap-extension-riak-example$ touch config/site-key.txt | |
| etate@etate-K61IC:~/snap-extension-riak-example$ snap-extension-riak-example -p 8080 | |
| Initializing Heist/Impl... done. | |
| Initializing Session/CookieSession... done. | |
| Initializing Riak/Riak... done. | |
| Initializing Timer/Timer... done. | |
| Listening on http://0.0.0.0: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
| {-# LANGUAGE OverloadedStrings #-} | |
| module MapReduce ( | |
| queryGetMany | |
| , queryGetBucket | |
| , queryAuthUsers | |
| , queryAuthPToken | |
| ) where | |
| import Data.Aeson | |
| import Data.Aeson.Types |
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
| ;;-- abstract state machine model | |
| ;; types | |
| defclass state | |
| defclass input | |
| def transition (state input) | |
| documentation: "Transition from a state to another state" | |
| defmacro defstate { ?:name } => |