This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-19
Channels
- # announcements (7)
- # aws (4)
- # aws-lambda (1)
- # babashka (19)
- # beginners (60)
- # calva (9)
- # chlorine-clover (3)
- # cider (15)
- # clj-kondo (17)
- # clojure (34)
- # clojure-czech (1)
- # clojure-europe (96)
- # clojure-nl (2)
- # clojure-uk (46)
- # clojurescript (20)
- # css (4)
- # cursive (58)
- # data-science (3)
- # datascript (3)
- # datomic (42)
- # depstar (30)
- # dirac (4)
- # emacs (1)
- # etaoin (5)
- # events (1)
- # figwheel-main (30)
- # fulcro (6)
- # helix (9)
- # jobs (1)
- # lumo (3)
- # malli (27)
- # off-topic (15)
- # pathom (11)
- # programming-beginners (6)
- # reitit (6)
- # rewrite-clj (11)
- # shadow-cljs (14)
- # sql (1)
- # tools-deps (18)
- # utah-clojurians (3)
$
is a convenience macro around process
:
(def config {:output {:format :edn}})
(-> ($ clj-kondo --config ~config --lint "src") :out slurp edn/read-string)
{:findings [], :summary {:error 0, :warning 0, :info 0, :type :summary, :duration 34}}
Just pushed the above to master. Please try it out. Binaries are in #babashka_circleci_builds
Hi, i wanted to use http-kit in babashka.
So i imported [org.httpkit.client :as client]
but now i am recieving … #object[org.httpkit.client$deadlock_guard$reify__14437 0x202e5d90 {:status :pending, :val nil}] #object[org.httpkit.client$deadlock_guard$reify__14437 0x5e587c9f {:status :pending, :val nil}] #object[org.httpkit.client$deadlock_guard$reify__14437 0x9c51ba6 {:status :pending, :val nil}] #object[org.httpkit.client$deadlock_guard$reify__14437 0x98a5229 {:status :pending, :val nil}] #object[org.httpkit.client$deadlock_guard$reify__14437 0x617e2f53 {:status :pending, :val nil}]))
…
for every post request on my localhost:3000/api/…
thanks
are you deref'ing the request?
@jakub.zika-extern Yes, check out http://http-kit.github.io/
I forget to add that using clj-http-kit
works fine.
@jakub.zika-extern You can also use babashka.curl
which is more like clj-http, and shells out to curl
@borkdude i would like to have this code usable in my clj+cljs webapp and in standalone mode like client and i did not find babashka.curl as a lein dependency
@jakub.zika-extern I would be happy to make a lein release for babashka.curl. But you can also use .cljc
with a :bb
reader conditional. But httpkit also just works fine. Just put an @ like @(org.httpkit.client/get ...)
Ok, Thanks. I will try it (and try to find something about a diference between requesting [http-kit] and [org.http-kit.client])
Works like a charm, thanks @borkdude and @ddouglass
Hi, another question 🙂 I see that I can use java.time for various time function but I can not access java.text. My use case.- I have a string in DDMMYYYYHHMMSS pattern that i would like to get into java.time easily and then parse it back into DD-MM-YYYY HH:MM:SS string. How would you do this in BB?
@jakub.zika-extern Can you give an example using java.text
?
import java.text.DateFormat;
import java.util.Date;
import java.text.SimpleDateFormat;
public class Demo {
public static void main(String[] args) throws Exception {
String strTime = "20:15:40";
DateFormat dateFormat = new SimpleDateFormat("hh:mm:ss");
Date d = dateFormat.parse(strTime);
System.out.println("Resultant Date and Time = " + d);
}
}
I do not see any function to load/parse a string in its api
(def fmt (java.time.format.DateTimeFormatter/ofPattern "ddMMyyyy"))
(java.time.LocalDate/parse "01022000" fmt)
https://docs.oracle.com/javase/tutorial/datetime/iso/format.htmlFirst signs of babashka/process usage! https://github.com/borkdude/babashka/issues/575#issuecomment-712460781