Fork me on GitHub

Can someone help me with this please: (sigh... Java is so... frustrating)


is the afterNavigateTo method going to be called on a thread where *out* is bound to something so the output of the prn will end up where you can see it?


Hmmm... yeah I haven't thought about that


also am I required to implement all the methods of the abstract class?


depends what you mean by required, the jvm doesn't enforce it, but the java language does, so if you don't you may violate assumptions of people doing java


for that thing to work though, I don't have to, right?


So I thought about what you said about thread, and put (throw (Exception. "shit happens")) there in the function, but it doesn't seem to be called at all


are you wrapping the driver in an event firing webdriver, registing with the event firing webdriver, then manipulating the regular driver?


yeah... but now I'm even more confused. There's an absctract class, there's also an interface, some examples I'm googling using the class, some using interface


damn it Java


double check the question I asked


because if you are doing what I asked if you are doing, then of course it isn't working


sigh... I need more diggin'... maybe I just need to use reify with the interface


nope... that didn't


Oh... I think I got what you're saying... Trying that now


holy... okay... I just missed that thing.. so my clojure code wrapper is correct


I just needed to read Java code a little more carefully


Thank you very much @U0NCTKEV8 Really appreciate your help. I was confused because I never had to extend abstract Java class in Clojure before


and I thought it might be something wrong with my Clojure wrapper


I can't seem to find a 1.10.0-beta5 version of the linux-install script. I'm looking at the version, and the core of the problem is I don't know what xxx would be in, assuming it's actually built somewhere. Is it only built on full release?


I can't even find the template it's built from.


The linux install script probably does Clojure 1.9.0 by default, but then you can run a clj command line that specifies what Clojure version you want to override 1.9.0


e.g. clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta5"}}}'


Alex Miller included that sample command line in his announcement to the clojure Google group for 1.10.0-beta5


hmm. but that means you've already got a clojure installed. I'm trying to build a jdk11 + clj 1.10 image.


If I have to, I'll bootstrap through that way, but I was trying to avoid it.

Alex Miller (Clojure team)03:11:21

The version of Clojure used at your repl depends only on your deps.edn files

Alex Miller (Clojure team)03:11:18

The version of Clojure used to run the program that build your classpath is bundled into clj and is always Clojure 1.9

Alex Miller (Clojure team)03:11:40

That part would run fine with 1.10 too, but 1.10 has not yet been released yet, so...

Alex Miller (Clojure team)03:11:44

This is not a thing that’s provided - if you want it, you’ll have to build it

Alex Miller (Clojure team)03:11:09

Also FYI, #tools-deps is a good place for any future questions about stuff like this


Ok, I'll ask there in the future. but just to clarify, there isn't a ?


I don't know if that URL exists, but there is a 1.10.0-beta5 JAR for Clojure on Maven central, where all Clojure versions are published:

Alex Miller (Clojure team)05:11:41

no, there is no clojure tools built on any 1.10 release, because it’s unnecessary

Alex Miller (Clojure team)05:11:27

the clojure-tools-1.9.0… can be used with any version of Clojure (it just uses Clojure 1.9 internally and is of the same approximate vintage)

Alex Miller (Clojure team)05:11:35

the clojure-tools jar is an uberjar that happens to include Clojure, and lots of other stuff. it is intentionally not published on Maven because publishing uberjars on Maven is imo wrong

Alex Miller (Clojure team)05:11:29

when 1.10 goes GA, I’ll switch over to building the clojure tools with it (and defaulting to it for projects), but there is no rush for that


Ok, so it sounds like the answer for my use case is just run the usual installer, add the config file, and clj -e '(println "hello world")'

Alex Miller (Clojure team)05:11:17

just a deps.edn with {:deps {org.clojure/clojure {:mvn/version "1.10.0-beta5"}}}

Alex Miller (Clojure team)05:11:30

or inline it with clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta5"}}}' -e '(println "hello world")'

Alex Miller (Clojure team)05:11:36

(the classpath for the jvm is being built with Clojure 1.9, but you don’t care. you’re running Clojure 1.10 in the execution jvm)


I've been working on a book about Clojure and Kubernetes, and building up exemplary examples has been, shall we say, interesting.


haven't picked one yet.


any suggestions? I've always had a soft spot for pragmatic.

Alex Miller (Clojure team)05:11:41

well pragprog was great to work with

Alex Miller (Clojure team)05:11:02

I did a bit of work with apress long ago that was … not great

Alex Miller (Clojure team)05:11:37

although it was long enough ago that would prob not use that as relevant info


The original "The Pragmatic Programmer" got me to think of this as more than something I just stumbled into.


part of what got me on this kick was sitting down to update my clj+k8s tutorial.


If you are taking suggestions for the next steps, I am curious about 7. Istio example 🙂 Oh and if you have experience with the Gateway I’d be curious to hear about it too! ( )


Let me see what I can do. When I was first working on this, Istio was in heavy flux, so I was waiting for it to calm down.

simple_smile 4

Also, PSA, there's work going on with docker-clojure:


What is the easiest way to add Clojure (or CLJS) as a scripting language on top of a C/Rust application? People often embed Lua as a scripting language. I would like to use Clojure or CLJS as the scripting part.


You could embed v8 into rust. Then use cljs-in-cljs to compile provided code and run it on the v8 engine.


spec question: I have activated instrument in my test ns and now I’m getting a bunch of Unable to construct gen errors


however, I don’t want to generate anything, I just want to validate the args of my specced functions


is this possible?


I’m testing existing libraries (e.g. onyx) against clojure 1.10.0-beta5 and seeing Call to clojure.core/ns did not conform to spec exceptions. 1. Has something in Clojure 1.10.x fundamentally changed where existing import statements won’t work? e.g. (:import [java.nio.ByteOrder]) vs (:import java.nio.ByteOrder) 2. Or, is this just a question of enforcing new best-practices by default and we can change this build-failure to a warning only via some build flag?

Alex Miller (Clojure team)14:11:29

this is wrong and has never actually had any effect: (:import [java.nio.ByteOrder])

Alex Miller (Clojure team)14:11:12

either (:import java.nio.ByteOrder) or (:import [java.nio ByteOrder]) are correct

Alex Miller (Clojure team)14:11:52

you should report anything like this to the lib maintainer so they can fix


fair enough, it’s actually been reported already -


I actually fixed the namespaces locally, but then it failed because a transitive dependency also had similar problems.

Jakub Holý (HolyJak)16:11:13

Hi! Can you recommend any videos (Screencasts?) that exemplify REPL-driven development, to wow my colleagues? (the flapping birds talk is awesome but aged, and cljs-focused) Thank you!!!

Bobby Towers17:11:33

Den of Clojure: Build Your Own Logic Engine with Timothy Baldridge

❤️ 8

Hello all! Java 11 has a nice feature to eval .java files. Example command: *java will compile and execute single java file. I need to load from git a single java file and execute it from Clojure code in runtime. Any advice, how to do it?


Of course, I can run it as shell (separate process), but I need to load java clases and run them in my runtime, like clojure code.


(cracks fingers) welp


AFAIK clojure has no special superpowers when it comes to compiling class files, so you might have to shell out to that new command. After you have compiled class files you should be able to use import or clojure.lang.DynamicClassLoader to load them into your process


There is an example of using the DynamicClassLoader in the docs for import Your biggest problem will probably be (mumblemumble something classpaths mumble mumble), but it should be solveable. Curious as to what you are planning to use on the fly class compiling for though


thanks for advices! they are helpful. we are building a metadata system and we need to load data transformation code from local git or nexus. so data will be transformed on the fly, based on meta data description.


Hi all! So I am trying to figure things out with the Java interop. I have an instance of a Java class on which I want to call its "add" method each time for a collection. Normally in pure clojure I would just use map and be on my way, but I need to maintain the state of the instance, to get the right result will all the elements added in. What would be the best approach here? An atom for keeping the state perhaps? If anybody got some pointers on this or an example it would be much appreciated!


You don't need an atom. Your java object is already mutable.


You probably just want something like:

(doseq [e coll]
  (.add myJavaObj e))


If you prefer a map like syntax, you can also use run!

(run! #(.add myJavaObj %) coll))


(let [javaObj (java.util.ArrayList.)]
  (run! #(.add javaObj %) [1 2 3 4]) javaObj)

=> [1 2 3 4]


Can someone show me the right way to reference a lib on a local drive from deps.edn? That's supported out of the box, right?


@ag you are interested in the :local/root feature


@ag Note that it only takes absolute paths.


Thank you, is it described anywhere? Sorry my google is... slow this Saturday... a lot of smoke here in SF Bay because of wildfires


Thank you Mike!


Wait, are you using the Internet via transmission of smoke signals, and in the SF Bay area? Yeah, you are hosed 🙂


@ag You can always try TCP/IP over avian carriers


And it looks like the people working on Wi-Fi standard 802.11ac already thought of the connection between that name and "avian carriers". Of course: