daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Aug 13th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (import
  2.   '(java.net Socket)
  3.   '(java.io PrintWriter BufferedReader InputStreamReader))
  4.  
  5. (defn connect [nick host port]
  6.   (let [sock (new Socket host port)
  7.         out (new PrintWriter (. sock getOutputStream) true)
  8.         in (new BufferedReader (new InputStreamReader (. sock getInputStream)))]
  9.     (loop [msg ""]
  10.       (if (. sock isConnected)
  11.         (do
  12.           (println msg)
  13.           (recur (. in readLine)))
  14.         (false)))))
  15.  
  16. (connect "Clojjy" "irc.strictfp.com" 6667)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top