Fork me on GitHub

I haven't tried it. We're used to SQL so I haven't had much interest in trying datalog-over-JDBC.


I'm mostly interested in it because 1. I'm a SQL neophyte 2. We're writing a GraphQL service, so being able to compose queries easily is going to be important


Cool. Let us know how walkable works out once you've tried it! πŸ™‚


oooh, I generally prefer composable query builders but walkable looks really neat


is there a command in the cli tools to only retrieve dependencies and not start the repl? (it's for running on a build server)


with clj not sure


yes, I mean with clj indeed


ok -Spath seems to work


If I want to have namespaces com.a.b.c, com.a.b.d, and com.a.b.e (etc.), do they have to live in a com/a/b/ directory on the classpath or can I collapse the unnecessarily nested directories, e.g. com.a.b/{c,d,e}.clj? I tried the latter just now and I'm getting the exception below, but I'm not sure if I'm hitting a JVM limitation or just doing something wrong. > Could not locate com/a/b/c__init.class or com/a/b/c.clj on classpath.


the JVM expects the folder hierarchy to match the namespace hierarchy


OK. No way around that, huh? 😞 Thanks for the info.


@lilactown @jeff.terrell that'd be Clojure, not the JVM. look at clojure.core/root-resource, clojure.core/load and of course RT/load

user=> (#'clojure.core/root-resource 'my.great.namespace)

πŸ‘ 4

To be hyper-precise, I've seen Stuart Halloway describe this as "convention" -- you could technically put all code in one big file with (ns name ...) every so often, with namespaces honoring any dependency ordering between them, and call (load-file "filename.clj"). I've never seen anyone do that for anything, and the resource name "convention" is necessary if you use load, require, etc.


As per the JVM, it's the classloader that expects the bytes in a certain spot. For example, if you want to load the class '' the classloader is coded to look in that directory structure. It is, as far as I can tell, a convenience and a convention. You ask the classloader to load a class, it thinks, "Where might I find the bytes for this?"


right, but clojure namespaces can be loaded without using a classloader, via load-string or load-file for example


but once you use require or load, you need the ns file to be in a predictable place based on a classloader


Yes, just pointing out the legacy reasons for the class path structure mirroring the directory structure (for Java).


Hi there, I'm trying to figure our how to reload my code by calling from a file watcher invoked from the repl, but I keep getting java.lang.IllegalStateException: Can't set!: *ns* from non-binding thread. I think this is because the file watcher I'm using (juxt.dirwatch) runs in a different thread and does the callback from there. Is there any way I can force the callback to happen in the repl/caller's own thread?


@jstaab how do you create the thread that is calling refresh?


(defn watch [] (juxt.dirwatch/watch-dir (fn [_] (refresh)) ( "src")))


Then I call (watch) from the repl


It looks like dirwatch uses an agent and send-off, which I'm not really familiar with


@jstaab Try using bound-fn instead of fn in that.

πŸ‘ 4

Nice! I think that did the trick. Thanks!


Has anybody integrated Algolia in a clj application? We have postgres as db