John M. Newman III
- [email protected]
- Baltimore, Md 21201
2004 US Army Signals; 2010 DHS Cybersecurity; 2015 Entrepreneur; 2017 EdTech
| ### Keybase proof | |
| I hereby claim: | |
| * I am johnmn3 on github. | |
| * I am doxos (https://keybase.io/doxos) on keybase. | |
| * I have a public key ASBr630q7JTso41c2LRl_rmzt1TnVDTiOVPK-jjQaoJv-wo | |
| To claim this, I am signing this object: |
John M. Newman III
2004 US Army Signals; 2010 DHS Cybersecurity; 2015 Entrepreneur; 2017 EdTech
In a terminal, try:
clojure -Sdeps '{:deps {github-johnmn3/cljws {:git/url "https://gist.github.com/johnmn3/a845f2bf67ad877d957bccd7f9cefe8c" :sha "4559f6d93509da4023c4df25965ddde004566b95"}}}' -m cljws chat-server localhost 8899
Then, in another terminal, try:
clojure -Sdeps '{:deps {github-johnmn3/cljws {:git/url "https://gist.github.com/johnmn3/a845f2bf67ad877d957bccd7f9cefe8c" :sha "4559f6d93509da4023c4df25965ddde004566b95"}}}' -m cljws client ws://localhost:8899
Repeat the last step in as many terminals as you like in order to add clients to the chat server.
| (defn end-padded-partition [size acoll] | |
| (loop [new-coll [], coll acoll)] | |
| (if (empty? coll) | |
| new-coll | |
| (recur | |
| (let [next-stuff (vec (take size coll)) | |
| padding-size (- size (count next-stuff)) | |
| padding (rand-bytes padding-size)] | |
| (if (zero? padding-size) | |
| (conj new-coll next-stuff) |
| ;;=> [0 1 0 1 0 1 0 1] | |
| ;; [[0 0 0 0] [1 1 1 1]] | |
| (defn uninterleave | |
| ([asq] (unzip asq [] [])) | |
| ([asq acum bcum] | |
| (if (nil? (seq asq)) | |
| [acum bcum] | |
| (recur (rest (rest asq)) (conj acum (first asq)) (conj bcum (first (rest asq))))))) |