Fork me on GitHub

which libraries for SSH client?


We use Apache sshd core

👍 1

It's Java interop


I like (also via interop)

👀 1
👍 1

Hi. What’s the difference between these two lines. Seems they are merely altering the place.


On exception the first leaves the entry in the queue


That’s interesting.


That is what retrying does, if there is an error loading a given namespace, that namespace is left in the queue so it is reloaded again the next time a reload is triggered


I'm looking at the code for timbre (specifically, [this line]( ) and I'm very confused by the &form, where does this thing come from? What is it?


&form (and &env) are available in defmacro,. &form is the actual form


FlowStorm debugger 2.2.99 is out with new features FlowStorm is a Clojure and ClojureScript debugger. Last release (2.2.99) includes a bunch of new features, and fixes : • Browser now support instrumentation/uninstrumentation of vars and namespaces (single and multiple) • Instrumenting from the repl synchronize with the browser (for everything but #trace) • Added a context menu on locals to define vars from values • Added jump to first and last traces on thread controls (useful for exceptions debugging) • Added print-level and print-meta controls on pprint value panels • Improve re-run flow UX • Namespace instrumentation now accepts :verbose? to log known and unknown instrumentation errors details • Added flow-storm.api/uninstrument-forms-for-namespaces to undo instrument-form-for-namespaces instrumentation • Added #rtrace0 ... #rtrace5, like #rtrace but with different flow-ids • Added double clicking on flows functions window to execute show-function-calls If you have any questions or ideas, there is the #flow-storm slack channel now! Github repo : Cheers!


You can also post that in #announcements?


oh yeah, will do it! thanks @U47G49KHQ


Deleted from #clojure since announcement don't belong here. There's also #releases for small/repeated updates to libraries. #announcements is intended for major releases and we encourage folks to only post there once a month at most.


np, sure, didn't knew about that @U04V70XH6


Hi all, does anyone have any experience with a project that is primarily clojure but has some kotlin code mixed in? Think I just don’t understand how to compile kotlin source so that my clojure code can pick it up. This may be a bad idea. Just have a PoC that I am working on and while I could write some Java interop, I’d rather use Kotlin.


This good. I think what I need to figure out is how to use clj build tools to compile kotlin in my local source folder so that I can import it in my clojure code.


One option would be to compile kotlin sources into a jar and include this jar into deps.edn as a local dependency using :local/root


that makes sense. I will check that out. thanks


@U9EAK7JJG or you can add maybe on your deps.edn :paths ["src" "kotlin-classes-folder"] , that should bring all compiled classes into your classpath. I guess that depends on how frequently you are recompiling the kotlin sources


Oh really! Ok that is more of what I was looking for. I'll give that a shot. I didn't think it could be that simple


I know everything you put there will end up in your classpath, but haven't tried it myself


im just getting through some meetings and then ill post back to confirm


There is one problem with both solutions - after recompiling you have to restart your repl to ensure classes are not cached. I don't think there is an easy way to have hot reloading


well just to circle back, I never did find a way to make this completely “just work”. I added the src directory, I manually compiled kotlin files, etc. Cursive even had autocompletion for my kotlin classes. However, I had issues: • I couldn’t access Kotlin files in the repl (even after I compiled them and sent them to target). The URLClassLoader couldn’t find them. • I had some classpath issues getting the Kotlin compiler to see libraries I pulled from deps.edn. I think once I figure out the claspath this can be resolved. Perhaps if I took some time to investigate how Corfield built his java build functionality I can do the same for kotlin.


damn, maybe the easiest then is just pack kotlin classes into a jar and then just reference it with :local/root in deps.edn then. You can create a script to do all that, and will have to restart the repl after changing kotlin files but that should work


or you can go all in and try to figure out the classloaders issues, which sounds like a nightmare


I’m working with c3p0 connection pooling. I want to add a ConnectionCustomizer to monitor the lifecycle of connections. The library wants that to be passed by class name as a property and then it instantiates it. So I’m registering it as "connectionCustomizerClassName" (.getName ConnectionCustomizer) where ConnectionCustomizer is a defrecord implementing the interface. Yet when c3p0 is calling Class.forName( className ).newInstance(); it is throwing a java.lang.ClassNotFoundException: metabase.driver.sql_jdbc.connection.ConnectionCustomizer. I am able to construct a class in this manner: (.newInstance (Class/forName (.getName ConnectionCustomizer))) so I suspect I have a classLoader issue. But I’m not sure how to resolve that issue. Does anyone have any pointers?


you can try setting the context classloader to whatever (clojure.lang,RT/baseLoader) returns


I’m not sure how to do that i guess. Their docs state: > To install a ConnectionCustomizer just implement the interface, make your class accessible to c3p0's ClassLoader, and set the configuration parameter below:


You can set a property contextClassLoaderSource > Must be one of caller, library, or none. Determines how the contextClassLoader (see java.lang.Thread) of c3p0-spawned Threads is determined. If caller, c3p0-spawned Threads (helper threads, java.util.Timer threads) inherit their contextClassLoader from the client Thread that provokes initialization of the pool. I’ve set this to caller explicitly and it still doesn’t seem to work


you then need to use to set the context classloader on thread where c3p0 is called to a classloader where clojure stuff defined dynamically is visible, like the one returned by RT/baseLoader

👀 1

what is the best practise for modelling hierearchical one-parent<->many-children relationships in datomic-likes? we could put the attribute on either side, I see that the guidance is to only put it on one side which makes sense, the few examples I can find seem to always have it on the child. References to good material also appreciated


it's been a while, but if i remember correctly it's easier to put a relation of cardinality one on the children to the parent, than a many from the parent to the children, for the simple reason that in the second case you'd be modelling a many-to-many


Thanks that's a clever answer, a one to many contains l constraint can only be expressed on one side I didn't think of that