This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-06
Channels
- # announcements (1)
- # beginners (147)
- # boot (9)
- # calva (28)
- # cider (3)
- # circleci (18)
- # cljdoc (54)
- # cljs-dev (55)
- # cljsrn (22)
- # clojure (179)
- # clojure-canada (9)
- # clojure-dev (74)
- # clojure-europe (1)
- # clojure-italy (15)
- # clojure-nl (7)
- # clojure-spec (30)
- # clojure-uk (55)
- # clojurescript (65)
- # core-async (15)
- # cursive (12)
- # datomic (16)
- # events (4)
- # fulcro (25)
- # graalvm (3)
- # joker (2)
- # kaocha (15)
- # keechma (94)
- # off-topic (12)
- # qlkit (2)
- # re-frame (15)
- # reagent (11)
- # reitit (29)
- # remote-jobs (15)
- # rewrite-clj (16)
- # shadow-cljs (73)
- # spacemacs (151)
- # sql (3)
- # tools-deps (11)
- # unrepl (19)
- # vim (35)
mΓ₯ning
morning!
morning
we do a lot of pythong programming here (for ML/AI stuff) so having that bridge to Clojure would be a nice way to get more adoption of clojure going
very weird, because normally you cant use defn
in 4Clojure as it gives an error, you have to use fn
instead
@dharrigan - That does__ look very interesting... We have a similar dynamic; Data Science Team is all Python...
Does anyone know of a very very simple command line http server that listens to any request (be it GET, POST, PUT, PATCH...) on any path, /foo, /foo/bar, /wibble/wobble/snarf and simply echos out the request to the command line? I don't need it to do anything else....
use ring & compojure? probably ten mins to get working
you just want something that puts a server socket onto port 8080,accepts connections and dumps out all incoming trafffic, interpreting as UTF-8 string?
(def f2 (future
(with-open [ss (ServerSocket. 8084)]
(mapv (fn [^Socket cs]
(try
(let [br (BufferedReader. (jio/reader (.getInputStream cs)))]
(loop [l "--connected---"]
(when l (println l)
(recur (.readLine br)))))
(finally (.close cs))))
(repeatedly 2 #(.accept ss))))))
sorta thing?I'm sure that can be polished alot
I can point a webbrowser at
and see stuff
nc -l 8084
tiresome after a while π There are examples where you can while it in a shell, but I really didn't want to think hard
Morning
And goodnight π