This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-17
Channels
- # announcements (2)
- # aws (44)
- # beginners (96)
- # calva (10)
- # cider (7)
- # cljdoc (5)
- # cljsrn (2)
- # clojure (38)
- # clojure-dev (19)
- # clojure-europe (6)
- # clojure-italy (16)
- # clojure-nl (10)
- # clojure-norway (44)
- # clojure-spec (7)
- # clojure-uk (74)
- # clojurescript (133)
- # cloverage (1)
- # cursive (54)
- # datomic (78)
- # duct (11)
- # graalvm (5)
- # instaparse (4)
- # joker (3)
- # kaocha (5)
- # nrepl (2)
- # off-topic (10)
- # pathom (56)
- # pedestal (1)
- # reagent (7)
- # reitit (17)
- # shadow-cljs (144)
- # slack-help (2)
- # sql (35)
- # testing (5)
- # tools-deps (22)
- # vim (22)
- # xtdb (11)
Hi folks! Could you recommend a decent Clojure project with good code, where you could learn by reading the code? I mean, documentation is ok, but in practice, there is a lot of tricks and various "meta" knowledge, like: project structure, initialization code, configuration, logging, tests, docstrings, code conventions, idioms and tricks. To me, the best way to learn these things is by example, that is, to read some good code. So I'm seeking for a project with clean code that I could just browse and learn there. Any suggestions?
i really like https://github.com/clojure/clojure/blob/master/src/clj/clojure/java/io.clj
A JDBC-related question: When I pass a Timestamp as a parameter into a query, I get it back as a string:
["select ?" (new java.sql.Timestamp 1571300133993)]
({:?column? "2019-10-17 11:15:33.993000+03"})
Actually, I’ve figured out using PGObject
:
(doto (new PGobject)
(.setType "timestamp")
(.setValue "2019-10-17 11:25:29.299563+03"
but I don’t like the idea to covert it to a string manually.Something like https://github.com/akvo/akvo-lumen/blob/develop/backend/src/akvo/lumen/postgres.clj#L120 ?
@U1WAUKQ3E what about ["select cast(? as timestamp) as q" (new java.sql.Timestamp 1571300133993)]
I would imagine due to how hard it is to represent PI. Easy on paper but with 64 bits you can only get close to PI. And the sine of close to PI is not zero
Have a look at the Javadoc @nhlx2 - you are only guaranteed a result within 1 ulp of the actual result
I need to call this constructor from Clojure: https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/ListItemDataProvider.java#L38
I have a vec of CSLItemData
. I convert them to an array using (into-array CSLItemData the-vec)
and pass that to the constructor. but I still get a reflection warning. how to avoid it?
got it:
(ListItemDataProvider. ^"[Lde.undercouch.citeproc.csl.CSLItemData;" item-datas)
Easiest would be type hinting vec as a java.util.list and not bothering with the array
Are there alternative ways of doing for's matrix of arguments? Obviously I can use it to just create a vector and pass that wherever, but I was wondering if there was another function which provided some alternative approach? In particular I'm using this with reduce.
Starting to work with seesaw and was wondering if there was some documented set of things i would need to do to make a swing component "behave" with it
but all of that seems to be very much "private" in the sense that how to impl them is opaque (at least to me)
Anyone got an idea if there is something in Java/Clojure updates that would break https://github.com/Raynes/bultitude ?