Fork me on GitHub

hi guys, is there any good lib to generate elasticsearch mappings from datomic schema ? thanks


you can avoid docker redoing stuff from scratch by not doing stuff from scratch, create an image or whatever it is called from the current state of your project and use that instead of whatever base you are currently using


does anyone have an opinion on when to instrument a function with clojure.spec and when to add :pre assertions?


im having trouble deciding which to use


if I’m dispatching a multimethod on a vector, e.g. (defmulti foo (fn [a b] [a b])) , can I specify a default value for one of the elements in defmethod ?


say I wanted to write a (defmethod foo [:a :default] [a b]) that would dispatch on all invocations for which the first argument is :a


Is there anyone who would like to help a poor soul wrestling with SOAP?


@anmonteiro i can't check it but can you write a signature like (defmethod foo [:a _ ] (blah blah ...))


I’ll declare my dispatch vectors with [:foo :default] and in the default implementation, I’ll get-method for [a :default]


Would it be obnoxious to have lein figwheel clean the :target-path after someone changes the :dependencies in their project.clj?


Hello all, there is a library to work with OpenNMS, for monitoring platforms. So to use the instance of it in java we have to :

WSManEndpoint endpoint = new WSManEndpoint.Builder("")
I saw the source code that is like :
... public class WSManEndpoint
  private final URL url;
  private final String username;
  private final String password;
  private final boolean gssAuth;
  private final boolean strictSSL;
  private final WSManVersion serverVersion;
  private final Integer maxElements;
  private final Integer maxEnvelopeSize;
  private final Integer connectionTimeout;
  private final Integer receiveTimeout;
  private WSManEndpoint(Builder builder)
    this.url = builder.url;
    this.username = builder.username;
    this.password = builder.password;
    this.gssAuth = builder.gssAuth;
    this.strictSSL = builder.strictSSL;
    this.serverVersion = builder.serverVersion;
    this.maxElements = builder.maxElements;
    this.maxEnvelopeSize = builder.maxEnvelopeSize;
    this.connectionTimeout = builder.connectionTimeout;
    this.receiveTimeout = builder.receiveTimeout;
  public static class Builder
    private final URL url;
    private boolean strictSSL = true;
    private String username;
    private String password;
    private boolean gssAuth = false;
    private WSManVersion serverVersion = WSManVersion.WSMAN_1_2;
    private Integer maxElements;
    private Integer maxEnvelopeSize;
    private Integer connectionTimeout;
    private Integer receiveTimeout;
    public Builder(String url)
      throws MalformedURLException
    { ...
So, I trying to use it with:
(ns delldrac.core
  (:import (org.opennms.core.wsman WSManClient WSManConstants WSManEndpoint WSManVersion))

  (.. (WSManEndpoint.Builder. "")
    (withServerVersion WSManVersion/WSMAN_1_0)
    (withStrictSSL false)

clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: WSManEndpoint.Builder, compiling:(C:\Trabalho\delldrac\src\clj\delldrac\core.clj:21:7)
What I´m doing wrong?


It's WSManEndpoint$Builder, I guess.


It has to be imported explicitly though, it doesn't just get imported because it's nested in the already imported one. /cc @fabrao


humm, using like this

(:import (org.opennms.core.wsman WSManClient WSManConstants WSManEndpoint WSManEndpoint$Builder WSManVersion))
works. Sorry about my newbe question 😞


clojure has a number of features that generally get referred to as "java interop"


the problem is, the interop stuff with clojure is really for interop with the jvm, not with java the language


and it is not always obvious to people that there is a difference between what happens on the jvm, and features in the java language, and who knows what and where those differences are


java the langauge varargs, inner classes, generics, and I am sure others I am forgetting, are all places where the jvm differs from java the lanaguage


and in those places, clojure "java interop" exposes what the jvm does, not what java the language does


so for each one of those: varargs get handled as a trailing array param, inner classes become Foo$InnerBar, generic params become Object...


since java the language is an existence proof that java's interpretation can exist on the jvm, all we need is someone to write some crazy macros that implement java the language's view on top of clojure's built in jvm view


(defmacro as-if-java [& body] ...)


(defmacro as-if-scala [& body] ...)