<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in Libs</title>
<link>https://ask.clojure.org/index.php/qa/other/libs</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Gotcha: core.match &#039;No matching clause&#039; when using shadowed local binding</title>
<link>https://ask.clojure.org/index.php/14522/gotcha-match-matching-clause-using-shadowed-local-binding?show=14523#a14523</link>
<description>&lt;p&gt;It&#039;s a deliberate documented behavior, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.match/wiki/Basic-usage#locals&quot;&gt;https://github.com/clojure/core.match/wiki/Basic-usage#locals&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Normally core.match will bind values to symbols, however it first tries to match against locals.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Changing it would definitely be a breaking change.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14522/gotcha-match-matching-clause-using-shadowed-local-binding?show=14523#a14523</guid>
<pubDate>Fri, 25 Apr 2025 12:50:25 +0000</pubDate>
</item>
<item>
<title>Answered: core.async 1.8 beta1 cached thread pools can grow to hundreds of threads when doing io work</title>
<link>https://ask.clojure.org/index.php/14428/core-async-beta1-cached-thread-pools-hundreds-threads-doing?show=14431#a14431</link>
<description>&lt;p&gt;There&#039;s so much stuff in this example, it&#039;s hard to tell what actual use case you&#039;re trying to think through.  Yes, mechanically it&#039;s possible, but I can&#039;t tell what&#039;s important here or if this is just poorly structured - are you trying to make a point about io-thread or the change in go or the use of them together?&lt;/p&gt;
&lt;p&gt;You&#039;re eagerly spinning task-count number of blocking tasks. Before io-thread, you would have used thread for that, which is no different. (In the future io-thread will be able to utilize JVM virtual threads when available, which will be ideal for this in resource usage.)&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14428/core-async-beta1-cached-thread-pools-hundreds-threads-doing?show=14431#a14431</guid>
<pubDate>Wed, 26 Feb 2025 19:08:01 +0000</pubDate>
</item>
<item>
<title>Answered: Comparison b/w Ragtime and Migratus</title>
<link>https://ask.clojure.org/index.php/9598/comparison-b-w-ragtime-and-migratus?show=14292#a14292</link>
<description>&lt;p&gt;I haven&#039;t used Migratus, but I have been using Ragtime for years on multiple projects, and I haven&#039;t encountered any issues so far. It&#039;s a simple library with a straightforward concept that is very stable and easy to work with and extend. You can use Ragtime for migrating various types of data, similarly to Migratus, although it only supports SQL databases out of the box. For instance, I have implemented Cassandra migrations using Ragtime in a private project. Additionally, with the &lt;code&gt;ragtime-clj&lt;/code&gt; [1] library, you can write migrations using Clojure code [2].&lt;/p&gt;
&lt;p&gt;I don&#039;t understand Mark&#039;s comment about how Ragtime is more involved regarding configuration (maybe I&#039;m missing some advanced things). My typical Ragtime code only requires two calls at application startup: &lt;code&gt;ragtime.repl/migrate&lt;/code&gt; and/or &lt;code&gt;ragtime.repl/rollback&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mariusz-jachimowicz-83/ragtime-clj&quot;&gt;https://github.com/mariusz-jachimowicz-83/ragtime-clj&lt;/a&gt;&lt;br&gt;
[2] &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mariusz-jachimowicz-83/ragtime-clj/blob/master/test/migrations/008_test.clj&quot;&gt;https://github.com/mariusz-jachimowicz-83/ragtime-clj/blob/master/test/migrations/008_test.clj&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9598/comparison-b-w-ragtime-and-migratus?show=14292#a14292</guid>
<pubDate>Sat, 07 Dec 2024 18:07:57 +0000</pubDate>
</item>
<item>
<title>Answered: Guidance on Licensing and Attribution for Ported Clojure Code</title>
<link>https://ask.clojure.org/index.php/14130/guidance-licensing-and-attribution-for-ported-clojure-code?show=14131#a14131</link>
<description>&lt;p&gt;I can&#039;t give you legal advice and really reading the license is the best way to know what you&#039;re supposed to do, but those seem like correct steps.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14130/guidance-licensing-and-attribution-for-ported-clojure-code?show=14131#a14131</guid>
<pubDate>Mon, 23 Sep 2024 21:44:01 +0000</pubDate>
</item>
<item>
<title>Answered: Using the state instantiated by integrant init-key</title>
<link>https://ask.clojure.org/index.php/13447/using-the-state-instantiated-by-integrant-init-key?show=13454#a13454</link>
<description>&lt;p&gt;When you call &lt;code&gt;(ig/init config)&lt;/code&gt;, it calls &lt;code&gt;ig/init-key&lt;/code&gt; in the dependency order of your config map and returns a map where each key is one of the defined init-keys. In your case, it will return &lt;code&gt;{:my-space/my-key #&amp;lt;MyObject…&amp;gt;}&lt;/code&gt;. Depending on how you’ve structured your app, you can put this map into a var or an atom, or you can pass it as an argument to your ring middleware so every request has a reference, etc.&lt;/p&gt;
&lt;p&gt;To call the methods of MyObject, you’d write &lt;code&gt;(.someMethod (:my-space/my-key system))&lt;/code&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13447/using-the-state-instantiated-by-integrant-init-key?show=13454#a13454</guid>
<pubDate>Fri, 10 Nov 2023 13:35:28 +0000</pubDate>
</item>
<item>
<title>Answered: I have created a new language based on Clojure and wondered if someone would like to take a look.</title>
<link>https://ask.clojure.org/index.php/13268/have-created-language-based-clojure-wondered-someone-would?show=13269#a13269</link>
<description>&lt;p&gt;Hi, you might find posting this on &lt;a rel=&quot;nofollow&quot; href=&quot;https://reddit.com/r/clojure&quot;&gt;https://reddit.com/r/clojure&lt;/a&gt; or the Clojurians Slack at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.net&quot;&gt;https://clojurians.net&lt;/a&gt; would be better places to get feedback...&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13268/have-created-language-based-clojure-wondered-someone-would?show=13269#a13269</guid>
<pubDate>Wed, 06 Sep 2023 21:15:11 +0000</pubDate>
</item>
<item>
<title>Answered: [deps] All pulling from http maven repos</title>
<link>https://ask.clojure.org/index.php/12698/deps-all-pulling-from-http-maven-repos?show=12702#a12702</link>
<description>&lt;p&gt;If you or others need this flag, I would be interested in learning about what scenario you have where this is needed.&lt;/p&gt;
&lt;p&gt;One I know of is having an internal Maven proxy (like Nexus) that is http - the recommendation from Nexus is to put that under https as well.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12698/deps-all-pulling-from-http-maven-repos?show=12702#a12702</guid>
<pubDate>Wed, 01 Mar 2023 15:53:13 +0000</pubDate>
</item>
<item>
<title>core.async: Add a function to set thread executor</title>
<link>https://ask.clojure.org/index.php/12692/core-async-add-a-function-to-set-thread-executor</link>
<description>&lt;p&gt;See slack #babashka discussion &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/CLX41ASCS/p1677319666536479&quot;&gt;https://clojurians.slack.com/archives/CLX41ASCS/p1677319666536479&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The use case is setting a virtual thread pool executor with SCI.&lt;br&gt;
In Clojure I could set &lt;code&gt;clojure.core.async.impl.exec.threadpool/thread-pool-executor&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Doing the intern in SCI will not have the desired effect since the pre-compiled functions don&#039;t see the change. &lt;/p&gt;
&lt;p&gt;Clojure.core agents also allow this via &lt;code&gt;set-agent-send-executor!&lt;/code&gt; etc. &lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12692/core-async-add-a-function-to-set-thread-executor</guid>
<pubDate>Sat, 25 Feb 2023 11:21:02 +0000</pubDate>
</item>
<item>
<title>Answered: Can ASYNC-248 be reverted?</title>
<link>https://ask.clojure.org/index.php/12690/can-async-248-be-reverted?show=12691#a12691</link>
<description>&lt;p&gt;Reported as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/ASYNC-249&quot;&gt;https://clojure.atlassian.net/browse/ASYNC-249&lt;/a&gt; &lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12690/can-async-248-be-reverted?show=12691#a12691</guid>
<pubDate>Thu, 23 Feb 2023 23:02:01 +0000</pubDate>
</item>
<item>
<title>Answered: Recommended metrics library</title>
<link>https://ask.clojure.org/index.php/12020/recommended-metrics-library?show=12035#a12035</link>
<description>&lt;p&gt;I&#039;ve been using riemann-clojure-client [1], which ships everything to Riemann [2], for several years. Not extensive like other libraries, but gives you a better control and with a few custom &quot;with-timed-something&quot; macros, it can measure practically anything. Also, don&#039;t forget that JVM (and other Java libraries, like Jetty) already comes with ready JMX metrics; you&#039;d just need to pull them from the application. I use collectd [3] for that.&lt;/p&gt;
&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/riemann/riemann-clojure-client&quot;&gt;https://github.com/riemann/riemann-clojure-client&lt;/a&gt;&lt;br&gt;
[2] &lt;a rel=&quot;nofollow&quot; href=&quot;https://riemann.io&quot;&gt;https://riemann.io&lt;/a&gt;&lt;br&gt;
[3] &lt;a rel=&quot;nofollow&quot; href=&quot;https://collectd.org/&quot;&gt;https://collectd.org/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12020/recommended-metrics-library?show=12035#a12035</guid>
<pubDate>Sun, 03 Jul 2022 07:14:56 +0000</pubDate>
</item>
<item>
<title>Answered: What is the canonical way to share bundles of predicates + generators in clojure spec?</title>
<link>https://ask.clojure.org/index.php/11282/what-canonical-share-bundles-predicates-generators-clojure?show=11283#a11283</link>
<description>&lt;p&gt;I think you&#039;re on the right path for sure. I think maybe a useful intermediate point is that you could def (not s/def) the &lt;code&gt;(s/with-gen local-date local-date-generator)&lt;/code&gt; - that is a spec+custom generator, named in a var. That&#039;s somewhat orthogonal to whether you want to define a named attribute (users of this spec+generator may want to put it on other attributes). Really, they can do either, by referring to spec var or by aliasing to a named attribute you create. The tradeoffs are subtle and may change with spec 2 in the future.&lt;/p&gt;
&lt;p&gt;With respect to bundling multiple things - namespaces are the way to bundle either vars referring to specs, or consolidate the loading of attributes. You may want to separate those two if you want to give users the  maximum flexibility (a namespace for specs+generators, a namespace that defines attributes).&lt;/p&gt;
&lt;p&gt;There&#039;s a lot of options, and a fair amount of &quot;it depends&quot;, so sorry I can&#039;t give more prescriptive advice.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11282/what-canonical-share-bundles-predicates-generators-clojure?show=11283#a11283</guid>
<pubDate>Wed, 17 Nov 2021 17:16:14 +0000</pubDate>
</item>
<item>
<title>Answered: How to do a HTTP request over a unix socket in Clojure</title>
<link>https://ask.clojure.org/index.php/8990/how-to-do-a-http-request-over-a-unix-socket-in-clojure?show=11183#a11183</link>
<description>&lt;p&gt;They say they introduced support for Unix sockets in JDK 16: &lt;a rel=&quot;nofollow&quot; href=&quot;https://openjdk.java.net/jeps/380&quot;&gt;https://openjdk.java.net/jeps/380&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&#039;s a good blog post about them:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://inside.java/2021/02/03/jep380-unix-domain-sockets-channels/&quot;&gt;https://inside.java/2021/02/03/jep380-unix-domain-sockets-channels/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8990/how-to-do-a-http-request-over-a-unix-socket-in-clojure?show=11183#a11183</guid>
<pubDate>Sat, 23 Oct 2021 15:45:41 +0000</pubDate>
</item>
<item>
<title>Answered: Are there plans for official docs (rationale and guide) on datafy / nav?</title>
<link>https://ask.clojure.org/index.php/11032/are-there-plans-for-official-docs-rationale-and-guide-datafy?show=11033#a11033</link>
<description>&lt;p&gt;Yes. Stu’s REBL talk has a pretty good overview for the context.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://youtu.be/c52QhiXsmyI&quot;&gt;https://youtu.be/c52QhiXsmyI&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11032/are-there-plans-for-official-docs-rationale-and-guide-datafy?show=11033#a11033</guid>
<pubDate>Sat, 11 Sep 2021 12:56:19 +0000</pubDate>
</item>
<item>
<title>Answered: instaparse and an s-exp language: how do i deal with comments?</title>
<link>https://ask.clojure.org/index.php/11008/instaparse-and-an-s-exp-language-how-do-i-deal-with-comments?show=11012#a11012</link>
<description>&lt;p&gt;I have been working on an instaparse grammar for lua (eventually writing a little analyzer and optimizing compiler for it).&lt;/p&gt;
&lt;p&gt;I ran into similar issues w.r.t. comments (in-line and block).  I currently have defined comments in the grammar so they parse into the data structure.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/joinr/bpdb/blob/master/src/bpdb/core.clj#L116&quot;&gt;https://github.com/joinr/bpdb/blob/master/src/bpdb/core.clj#L116&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now I have the unfun task of preventing parsing -- (the comment syntax) as two unary -  - operators.  You should have no such problem in sexpr language though.  I am still picking up instaparse, so low mileage.  There are probably better answers.&lt;/p&gt;
&lt;p&gt;Another option that comes to mind is to have a 2 pass parsing; first pass scrapes out comments but retains them for printing, second pass parses the &quot;normal&quot; code.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11008/instaparse-and-an-s-exp-language-how-do-i-deal-with-comments?show=11012#a11012</guid>
<pubDate>Sat, 04 Sep 2021 19:36:30 +0000</pubDate>
</item>
<item>
<title>Answered: Problem with select in schema with namespaced keys of schema with unnamespaced keys</title>
<link>https://ask.clojure.org/index.php/9501/problem-with-select-schema-namespaced-schema-unnamespaced?show=10874#a10874</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2648&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2648&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9501/problem-with-select-schema-namespaced-schema-unnamespaced?show=10874#a10874</guid>
<pubDate>Thu, 29 Jul 2021 00:34:53 +0000</pubDate>
</item>
<item>
<title>Answered: Generic way to (de)serialize arrays using transit</title>
<link>https://ask.clojure.org/index.php/10617/generic-way-to-de-serialize-arrays-using-transit?show=10629#a10629</link>
<description>&lt;p&gt;Transit added support for &lt;code&gt;:default-handler&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/cognitect/transit-clj/commit/972759aed878d354fbd65de3e4525345955e86b4&quot;&gt;https://github.com/cognitect/transit-clj/commit/972759aed878d354fbd65de3e4525345955e86b4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That might solve the issue as you get a change to inspect the value and do something appropriate like serializing or throwing.&lt;/p&gt;
&lt;p&gt;Gist demo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/borkdude/0a99a4f413b509315d54e1c68f861fad&quot;&gt;https://gist.github.com/borkdude/0a99a4f413b509315d54e1c68f861fad&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10617/generic-way-to-de-serialize-arrays-using-transit?show=10629#a10629</guid>
<pubDate>Tue, 18 May 2021 13:33:28 +0000</pubDate>
</item>
<item>
<title>Answered: Is there a way to save a core.logic logic db to a file (non-datomic)?</title>
<link>https://ask.clojure.org/index.php/10220/is-there-a-way-to-save-a-core-logic-logic-db-to-file-non-datomic?show=10226#a10226</link>
<description>&lt;p&gt;Looks like &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/ptaoussanis/nippy&quot;&gt;nippy&lt;/a&gt; works with standard serialization, since the prolog fact db is implemented with clojure types that are already serializable.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns logos.serial
  (:require [taoensso.nippy :as nippy]
            [clojure.core.logic.pldb :as pldb]
            [clojure.core.logic :as log]
            [clojure.java.io]))

(defn freeze-to! [o target &amp;amp; {:keys [compressor] :or {compressor nippy/lz4hc-compressor}}]
  (with-open [buff (clojure.java.io/output-stream target)
              dos (java.io.DataOutputStream. buff)]
    (nippy/freeze-to-out! dos  o)))

(defn thaw-from! [target &amp;amp; {:keys [compressor] :or {compressor nippy/lz4hc-compressor}}]
  (with-open [fis (clojure.java.io/input-stream target)
              dis (java.io.DataInputStream. fis)]
    (nippy/thaw-from-in! dis )))

(pldb/db-rel man p)
(pldb/db-rel woman p)
(pldb/db-rel likes p1 p2)
(pldb/db-rel fun p)

(def facts0
  (pldb/db
   [man &#039;Bob]
   [man &#039;John]
   [man &#039;Ricky]

   [woman &#039;Mary]
   [woman &#039;Martha]
   [woman &#039;Lucy]

   [likes &#039;Bob &#039;Mary]
   [likes &#039;John &#039;Martha]
   [likes &#039;Ricky &#039;Lucy]))


(def facts1 (-&amp;gt; facts0 (pldb/db-fact fun &#039;Lucy)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Querying and testing:    &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn simple-query [db]
  (pldb/with-db db
    (log/run* [q]
      (log/fresh [x y]
        (fun y)
        (likes x y)
        (log/== q [x y])))))

;;logos.serial&amp;gt;(simple-query facts1)
;;([Ricky Lucy])

(freeze-to! facts1 &quot;facts.lz4&quot;)
(def facts-thawed (thaw-from! &quot;facts.lz4&quot;))

;;logos.serial&amp;gt;(= facts1 facts-thawed)
;;logos.serial&amp;gt; (simple-query facts-thawed)
;;([Ricky Lucy])
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10220/is-there-a-way-to-save-a-core-logic-logic-db-to-file-non-datomic?show=10226#a10226</guid>
<pubDate>Sun, 21 Feb 2021 14:42:19 +0000</pubDate>
</item>
<item>
<title>Answered: The state of art of reading Microsoft Word docx document?</title>
<link>https://ask.clojure.org/index.php/10097/the-state-of-art-of-reading-microsoft-word-docx-document?show=10100#a10100</link>
<description>&lt;p&gt;I&#039;ve used the Apache POI library directly via Java interop and that worked fine for everything I needed. &lt;a rel=&quot;nofollow&quot; href=&quot;https://poi.apache.org/&quot;&gt;https://poi.apache.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I built some wrappers around the tiny bits of that that I used to make it more palatable for my needs.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10097/the-state-of-art-of-reading-microsoft-word-docx-document?show=10100#a10100</guid>
<pubDate>Tue, 26 Jan 2021 18:42:54 +0000</pubDate>
</item>
<item>
<title>Answered: Duct framework</title>
<link>https://ask.clojure.org/index.php/8855/duct-framework?show=9680#a9680</link>
<description>&lt;p&gt;Looks like the answer is yes, via Aleph or HTTP-Kit: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/duct-framework/duct/issues/101&quot;&gt;https://github.com/duct-framework/duct/issues/101&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8855/duct-framework?show=9680#a9680</guid>
<pubDate>Fri, 02 Oct 2020 23:43:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to produce CSS using Garden</title>
<link>https://ask.clojure.org/index.php/9607/how-to-produce-css-using-garden?show=9614#a9614</link>
<description>&lt;pre&gt;&lt;code&gt;(css [(garden.selectors/&amp;gt; :.block-main :header) 
  {:height &quot;100px&quot;}
  {:padding &quot;32px&quot;}
  {:margin &#039;0}])
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9607/how-to-produce-css-using-garden?show=9614#a9614</guid>
<pubDate>Fri, 18 Sep 2020 10:03:12 +0000</pubDate>
</item>
<item>
<title>Answered: How to configure libpython-clj with your project on windows?</title>
<link>https://ask.clojure.org/index.php/9408/how-to-configure-libpython-clj-with-your-project-on-windows?show=9409#a9409</link>
<description>&lt;p&gt;I think at the moment,  anaconda will work / is,supported.&lt;br&gt;
I was looking at patching in support for vanilla widows python installations, but got diverted.&lt;/p&gt;
&lt;p&gt;Since this is library specific, and the library is under active development, I recommend posting as an issue on the libpython-clj github repo.  Also, principal authors and maintainers are very active and responsive on the clojurians zulip, clojurians.zulipchat.com .  There is a dedicated libpython dev topic there.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9408/how-to-configure-libpython-clj-with-your-project-on-windows?show=9409#a9409</guid>
<pubDate>Wed, 24 Jun 2020 09:21:22 +0000</pubDate>
</item>
<item>
<title>Answered: Wrapping Datascript query in a function?</title>
<link>https://ask.clojure.org/index.php/9337/wrapping-datascript-query-in-a-function?show=9338#a9338</link>
<description>&lt;p&gt;There is no link between &lt;code&gt;id-passed&lt;/code&gt; function argument and &lt;code&gt;?id-passed&lt;/code&gt; symbol in a query, you need to specify that &lt;code&gt;?id-passed&lt;/code&gt; is a query argument and pass it to a query:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn content-find
  [id-passed]
  (ds/q &#039;[:find ?block-text
          :in $ ?id-passed
          :where
          [?id :block/id ?id-passed]
          [?id :block/content ?block-text]]
        @conn id-passed))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9337/wrapping-datascript-query-in-a-function?show=9338#a9338</guid>
<pubDate>Sat, 30 May 2020 10:59:50 +0000</pubDate>
</item>
<item>
<title>Answered: with ring-clojure,how do i config to set the default sava directory of tempfile</title>
<link>https://ask.clojure.org/index.php/9160/with-ring-clojure-how-config-default-sava-directory-tempfile?show=9316#a9316</link>
<description>&lt;p&gt;Here is the function it uses for &lt;code&gt;:store&lt;/code&gt; by default:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/ring-clojure/ring/blob/95e4ca25d5b98c45f927b32b5c3c85c21c999d96/ring-core/src/ring/middleware/multipart_params/temp_file.clj#L46-L72&quot;&gt;https://github.com/ring-clojure/ring/blob/95e4ca25d5b98c45f927b32b5c3c85c21c999d96/ring-core/src/ring/middleware/multipart_params/temp_file.clj#L46-L72&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Perhaps that gives you a good starting point for implementing your own.&lt;/p&gt;
&lt;p&gt;The docs you linked in this case are actually quite good, they explain what the function needs to be pretty well.&lt;/p&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9160/with-ring-clojure-how-config-default-sava-directory-tempfile?show=9316#a9316</guid>
<pubDate>Wed, 20 May 2020 23:26:58 +0000</pubDate>
</item>
<item>
<title>Answered: Problem in production when removing wrap-reload</title>
<link>https://ask.clojure.org/index.php/9262/problem-in-production-when-removing-wrap-reload?show=9299#a9299</link>
<description>&lt;p&gt;It&#039;s very hard to tell based on just that information. It&#039;s much easier to debug problems like this in an interactive context such as the Clojurians Slack where folks can ask you for additional information and ask you to try things out in real-time.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com&quot;&gt;https://clojurians.slack.com&lt;/a&gt; -- self-signup: &lt;a rel=&quot;nofollow&quot; href=&quot;http://clojurians.net&quot;&gt;http://clojurians.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I would say that you definitely do &lt;strong&gt;not&lt;/strong&gt; want to run &lt;code&gt;wrap-reload&lt;/code&gt; in production.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9262/problem-in-production-when-removing-wrap-reload?show=9299#a9299</guid>
<pubDate>Wed, 13 May 2020 15:37:18 +0000</pubDate>
</item>
<item>
<title>Answered: Next.jdbc plan row realization</title>
<link>https://ask.clojure.org/index.php/9120/next-jdbc-plan-row-realization?show=9121#a9121</link>
<description>&lt;p&gt;If you just want the entire result set as a vector of hash maps, use &lt;code&gt;execute!&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you need to stream a (large) result set lazily from the database, you must use &lt;code&gt;plan&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you want the rows as actual hash maps when reducing a &lt;code&gt;plan&lt;/code&gt;, you have two choices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Call &lt;code&gt;rs/datafiable-row&lt;/code&gt; on each row to fully realize that row as Clojure data and then process it, &lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;select-keys&lt;/code&gt; on each row with a list of columns you need.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you perform any action on a row that requires it to be realized as a Clojure data structure, then &lt;code&gt;rs/datafiable-row&lt;/code&gt; will automatically be called. &lt;code&gt;(keys row)&lt;/code&gt; will call &lt;code&gt;seq&lt;/code&gt; under the hood and that will force full realization.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;select-keys&lt;/code&gt; will &lt;em&gt;not&lt;/em&gt; realize the row because individual entries can be pulled from the underlying &lt;code&gt;ResultSet&lt;/code&gt; directly (&lt;code&gt;.entryAt&lt;/code&gt; is called since the &lt;code&gt;ResultSet&lt;/code&gt; is wrapped in &lt;code&gt;Associative&lt;/code&gt;). You can also &lt;code&gt;get&lt;/code&gt; individual columns by name without realizing the whole row (&lt;code&gt;(:col row)&lt;/code&gt; or &lt;code&gt;(get row :row)&lt;/code&gt; both work).&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9120/next-jdbc-plan-row-realization?show=9121#a9121</guid>
<pubDate>Wed, 26 Feb 2020 17:47:35 +0000</pubDate>
</item>
<item>
<title>Answered: Best way to write a unix(y) tool with Clojure ?</title>
<link>https://ask.clojure.org/index.php/9084/best-way-to-write-a-unix-y-tool-with-clojure?show=9085#a9085</link>
<description>&lt;p&gt;Some libraries to do conversion between json and Clojure data are &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/data.json&quot;&gt;data.json&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/dakrone/cheshire&quot;&gt;Cheshire&lt;/a&gt;. Another option is the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/borkdude/jet&quot;&gt;jet&lt;/a&gt; tool.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9084/best-way-to-write-a-unix-y-tool-with-clojure?show=9085#a9085</guid>
<pubDate>Mon, 10 Feb 2020 03:16:43 +0000</pubDate>
</item>
<item>
<title>Answered: What is your Clojure and ClojureScript Stack!</title>
<link>https://ask.clojure.org/index.php/8280/what-is-your-clojure-and-clojurescript-stack?show=8987#a8987</link>
<description>&lt;p&gt;For my current project I&#039;m using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fulcro 3&lt;/li&gt;
&lt;li&gt;Pathom&lt;/li&gt;
&lt;li&gt;Datomic&lt;/li&gt;
&lt;li&gt;Pedestal&lt;/li&gt;
&lt;li&gt;Lacinia&lt;/li&gt;
&lt;li&gt;Deps.edn&lt;/li&gt;
&lt;li&gt;Shadow-CLJS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The server has two graph API endpoints: &lt;br&gt;
&lt;code&gt;/api&lt;/code&gt; is read/write EQL [1], handled by Pathom resolvers&lt;br&gt;
&lt;code&gt;/grapqhl&lt;/code&gt; is read-only GraphQL, handled by Lacinia resolvers &lt;br&gt;
both of which are auto-generated from a single EDN definition.&lt;/p&gt;
&lt;p&gt;As great as Lacinia is at making GraphQL easy in Clojure, I&#039;ve enjoyed so much more working with the EQL API via Fulcro and Pathom.  &lt;/p&gt;
&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://edn-query-language.org/eql/1.0.0/what-is-eql.html&quot;&gt;https://edn-query-language.org/eql/1.0.0/what-is-eql.html&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8280/what-is-your-clojure-and-clojurescript-stack?show=8987#a8987</guid>
<pubDate>Sat, 04 Jan 2020 06:52:01 +0000</pubDate>
</item>
<item>
<title>Answered: Is there anyone doing websockets with datomic ion  on aws</title>
<link>https://ask.clojure.org/index.php/8303/is-there-anyone-doing-websockets-with-datomic-ion-on-aws?show=8911#a8911</link>
<description>&lt;p&gt;This is an old thread now, but it&#039;s the only one that came up when I searched for Ions + websockets, so I&#039;m posting a link for the benefit of others with this question.&lt;/p&gt;
&lt;p&gt;There&#039;s a great answer in the Datomic forum:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/websockets-from-ions/1255&quot;&gt;https://forum.datomic.com/t/websockets-from-ions/1255&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8303/is-there-anyone-doing-websockets-with-datomic-ion-on-aws?show=8911#a8911</guid>
<pubDate>Wed, 27 Nov 2019 16:11:11 +0000</pubDate>
</item>
<item>
<title>Answered: Slow creation of aws-api client in lambda</title>
<link>https://ask.clojure.org/index.php/8863/slow-creation-of-aws-api-client-in-lambda?show=8906#a8906</link>
<description>&lt;p&gt;I have been seeing the same thing. There seems to be a significant overhead in creating a the client for the first time in AWS Lambda environment and using it to execute a request. And this overhead doesn&#039;t seem to be related to Lambda cold start time.&lt;/p&gt;
&lt;p&gt;For example using 512M memory for lambda creating S3 client and executing 1 metadata fetch takes about 13 seconds. For comparison doing the same thing with aws-java-sdk (v1)  in clojure takes about 11-12 second and same thing with nodejs lambda takes less than a second. Increasing Lambda memory size will make things work much faster.&lt;/p&gt;
&lt;p&gt;I have a test setup where the third invocation of the lambda creates the client and executes S3 request. Invocations before that do nothing.&lt;br&gt;
1. invocation of the lambda is the cold start and it does nothing, and it is slow (e.g 4 seconds)&lt;br&gt;
2. invocation of the lambda is a warm start and it does nothing =&amp;gt; fast (e.g 0.002 seconds)&lt;br&gt;
3. invocation is a warm start and creates the client for the first time =&amp;gt;  slow (e.g 13 seconds)&lt;br&gt;
4. invocation and following invocations =&amp;gt; fast (e.g 0.8 seconds)&lt;/p&gt;
&lt;p&gt;When running as a AWS Lambda the credentials are available as environment variables so accessing them should be fast.&lt;/p&gt;
&lt;p&gt;AWS published &lt;code&gt;java11&lt;/code&gt; runtime for Lambdas a few days ago, but using it doesn&#039;t seem to affect the execution time that much.&lt;/p&gt;
&lt;p&gt;All my code is AOT compiled.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8863/slow-creation-of-aws-api-client-in-lambda?show=8906#a8906</guid>
<pubDate>Tue, 26 Nov 2019 20:40:53 +0000</pubDate>
</item>
<item>
<title>Answered: Unmatched paren in Reitit example</title>
<link>https://ask.clojure.org/index.php/8875/unmatched-paren-in-reitit-example?show=8892#a8892</link>
<description>&lt;p&gt;Try an extra &lt;code&gt;]&lt;/code&gt; to close the vector on line 70 (the line with &lt;code&gt;:body {:total (- x y)}})}}]]]&lt;/code&gt; ). And, yeah, as @alexmiller says, best to file an issue with reitit.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8875/unmatched-paren-in-reitit-example?show=8892#a8892</guid>
<pubDate>Sun, 24 Nov 2019 18:43:06 +0000</pubDate>
</item>
<item>
<title>Answered: Encoding floats with transit-cljs</title>
<link>https://ask.clojure.org/index.php/8713/encoding-floats-with-transit-cljs?show=8714#a8714</link>
<description>&lt;p&gt;Just trying to restate your question a bit, I believe you are asking, is there some way for transit-cljs (or really transit-js) to forcibly encode the Javascript number 200.0 as transit ground type &quot;floating point decimal&quot;? (This isn&#039;t really a transit-format question, as transit itself does have the capability to represent both fixed and arbitrary precision integers and floats. So, this is really a language specific encoder question.)&lt;/p&gt;
&lt;p&gt;I think the answer is no (but I am not an expert in the js side of this world). transit-js/transit-cljs only encode as transit ground types i (integer, signed 64 bit) or f (arbitrary precision decimal). I don&#039;t know, but I would guess this is because it&#039;s difficult to tell whether a number is representable as a floating point decimal.&lt;/p&gt;
&lt;p&gt;Presumably it&#039;s possible to allow you to force such a thing, but I think the best place to have that discussion is probably in either &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/cognitect/transit-js/issues&quot;&gt;https://github.com/cognitect/transit-js/issues&lt;/a&gt; or &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/cognitect/transit-cljs/issues&quot;&gt;https://github.com/cognitect/transit-cljs/issues&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8713/encoding-floats-with-transit-cljs?show=8714#a8714</guid>
<pubDate>Sat, 12 Oct 2019 16:23:59 +0000</pubDate>
</item>
<item>
<title>Answered: Redirection with Ring forcing GET</title>
<link>https://ask.clojure.org/index.php/8629/redirection-with-ring-forcing-get?show=8630#a8630</link>
<description>&lt;p&gt;You&#039;ll need to share at least some of the code that doesn&#039;t work.&lt;/p&gt;
&lt;p&gt;We use &lt;code&gt;ring.util.response/redirect&lt;/code&gt; all the time at work to redirect from handlers that process &lt;code&gt;POST&lt;/code&gt; requests to new URLs that are &lt;code&gt;GET&lt;/code&gt;s -- that&#039;s pretty much the definition of how a redirect works since it produces a &lt;code&gt;Location:&lt;/code&gt; header which the browser then uses to &lt;code&gt;GET&lt;/code&gt; the specified URL.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8629/redirection-with-ring-forcing-get?show=8630#a8630</guid>
<pubDate>Fri, 20 Sep 2019 18:29:04 +0000</pubDate>
</item>
<item>
<title>Answered: How to store secrets in datomic cloud</title>
<link>https://ask.clojure.org/index.php/8554/how-to-store-secrets-in-datomic-cloud?show=8557#a8557</link>
<description>&lt;p&gt;Check out parameter store: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/ions/ions-reference.html#parameters&quot;&gt;https://docs.datomic.com/cloud/ions/ions-reference.html#parameters&lt;/a&gt;&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8554/how-to-store-secrets-in-datomic-cloud?show=8557#a8557</guid>
<pubDate>Fri, 06 Sep 2019 10:58:10 +0000</pubDate>
</item>
<item>
<title>Answered: Retrieve S3 Object from a Lambda</title>
<link>https://ask.clojure.org/index.php/8363/retrieve-s3-object-from-a-lambda?show=8368#a8368</link>
<description>&lt;p&gt;I have seen this error before (not in this context) and I dimly recall it to be something with changes in the JDK making something reflective, something like that. What JDK version is being used in the Lambda?&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8363/retrieve-s3-object-from-a-lambda?show=8368#a8368</guid>
<pubDate>Wed, 07 Aug 2019 17:32:01 +0000</pubDate>
</item>
<item>
<title>Answered: congomongo v0.5.2 connection timeout settings</title>
<link>https://ask.clojure.org/index.php/8357/congomongo-v0-5-2-connection-timeout-settings?show=8365#a8365</link>
<description>&lt;p&gt;You should be able to use &lt;code&gt;mongo-options&lt;/code&gt; to build a &lt;code&gt;MongoClientOptions&lt;/code&gt; object and then pass that to &lt;code&gt;make-connection&lt;/code&gt; -- and &lt;code&gt;mongo-options&lt;/code&gt; will accept options as keywords that correspond to methods on the &lt;code&gt;MongoClientOptions.Builder&lt;/code&gt; class.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8357/congomongo-v0-5-2-connection-timeout-settings?show=8365#a8365</guid>
<pubDate>Wed, 07 Aug 2019 16:51:44 +0000</pubDate>
</item>
<item>
<title>Answered: Clojurescript Calendar</title>
<link>https://ask.clojure.org/index.php/8330/clojurescript-calendar?show=8359#a8359</link>
<description>&lt;p&gt;I&#039;m not sure, I&#039;m positive npm would have one though&lt;br&gt;
My advice is to look for something that is RFC 5545 compliant&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8330/clojurescript-calendar?show=8359#a8359</guid>
<pubDate>Wed, 07 Aug 2019 10:26:35 +0000</pubDate>
</item>
</channel>
</rss>