Fork me on GitHub
Jacob O'Bryant02:04:58

I went for a long time in vim just using the % key to jump between matching delimiters and generally editing forms manually. (described it here: Now I also use vim-sexp which adds some paredit-like features.

👍 4
David Pham06:04:14

What kind of tool/logging method do you use to monitor heap size consumption of your Clojure/JVM process?


At, I find this: > (set! (. instance-expr instanceFieldName-symbol) expr) > (set! (. Classname-symbol staticFieldName-symbol) expr) > Assignment special form. > > When the first operand is a field member access form, the assignment is to the corresponding field. If it is an instance field, the instance expr will be evaluated, then the expr. I am not quite following the second case there...

Alex Miller (Clojure team)12:04:25

The second case is setting a static field


Thanks. I was a bit unclear with my question, though. I mean the second case in the paragraph below: > If it is an instance field, the instance expr will be evaluated, then the expr.


I wonder what that second sentence in the paragraph means. 😃

Alex Miller (Clojure team)12:04:04

If you’re setting an instance field, it first evaluates the instance expression, then the value expression. It’s just what it says, so doesn’t seem unclear to me.

Alex Miller (Clojure team)13:04:41

user=> (def p (java.awt.Point. 1 1))
user=> (set! (. p x) 10)
In this example, it's just saying that p will be evaluated, then 10


Thanks! So then maybe it is the first sentence I don't get. I'll reread the docs up to that sentence and see what I have missed.

Alex Miller (Clojure team)14:04:59

I think the first sentence is talking about the second case, and the second sentence is talking about the first case

Alex Miller (Clojure team)14:04:17

or maybe the first sentence is trying to distinguish from invocation which has since been split apart, not actually sure


you mean the classname case?


I mean If it is an instance field, the instance expr will be evaluated, then the expr.


Not sure if it should be interpreted as referring to the classname case, even. ¯\(ツ)


i find the text confusing as well. overall though i think the purpose of the doc is to explain interop. for this case, the point has to do with how one uses set! in these situations. the second sentence of the paragraph starting "When" does not make sense if applied to the class case because there is no "instance expr" that would apply. so i think it's reasonable to deduce we are talking about the first set! form there. the first sentence does seem like it could apply to either though.


ime, this type of doc is sometimes a brain dump of someone who has the implementation in mind. it could be that reading and looking for DOT, AssignExpr, analyze, etc. might give some insight, though that may take some time.


i already spent some minutes there but my stack is currently not so spacious to take it all in 🙂


I don't seem to understand why putting it inside of a str makes it print out the lazy sequence instead of the expected "(2 1 :b :a)" . or how to get the expected result because doall doesn't seem to work either


str delegates to Java's Object.toString() (the right overload override). It will not force the lazy sequence.


I thought doall would fix that though? isn't it supposed to walk through the list and make it eager?


(see 3rd example)


Ah, you ran it with doall too. Did not expand the snippet.


You apply doall to the result of str


it's a no-op, of course, since the result of str is not a lazy seq


in the 3rd example i apply it to the result of remove


in the 4th i apply it to the whole thing just in case


doall does not convert the lazy seq to a list.


It is still a lazy seq. There is no overload override for .toString() in LazySeq that will print out the contents.


But when you dump the contents of the laze seq into a real collection like list or a vector, it will work as you expect it to.


I guess I just thought that it had a .toString implementation because it printed out into the console correctly


gotcha! That helped thanks a lot!


That's the Object.toString() getting hit. Prints the type followed by the memory location I believe.


Sorry, the last part is the hashCode.


But the hashCode() implementation of Object just returns the memory address, so I was right.


That might be a bit too advanced for me to use anytime soon 😅


> But the hashCode() implementation of `Object` just returns the memory address, so I was right. That's JVM implementation specific.


Yes, I was not advocating its use. Noone should parse the output of .toString() for whatever purpose.


apply list seems to work, although I'd still like to understand why.


LazySeq is not the same as a list (or a vector). The last two are real collections.

Michael J Dorian13:04:35

Is there a way to check what type of record a specific record is an instance of?

Michael J Dorian13:04:00

Aha, I found it. type! I was looking at instance? to no avail

Alex Miller (Clojure team)14:04:35

you probably want class actually

Michael J Dorian14:04:31

Ah, cool. They seem to give the same output, what's the difference?

Timur Latypoff20:04:49

If I am not mistaken, class returns an object's underlying Java class, whereas type takes into account Clojure's dynamic custom type hierarchies, if you define or use them. Take a look here: and its "SEE ALSO" section.


Hi. Just found two active Clojure forums (maintained by cognitect) and (don’t know who is behind it). Question: wouldn’t our community benefit on having only one strong forum? meanwhile which one should I use? (don’t want to start a flamewar)


ClojureVerse is more for discussions, is for Q/A style and reporting bugs or feature request

👍 4

thanks @U0K064KQV I will try to have that in mind.

Alex Miller (Clojure team)17:04:53

People like different stuff and have created a variety of forums, such is the internet


Or use Go lang if I don't want to learn a dozen different 3 year old libraries before I can figure out which one can be used for my goals? : )

👎 16

@U0VQ4N5EE That seems like unnecessary snark and is not an appropriate response.


I am sorry, I was not handed a book about what is appropriate here, if you let me know where these rules are rest assured that I will do my best to follow them to the letter. I also do not understand what snark is, will have to look it up in the dictionary, but I did not indented to incite emotions I merely wanted to highlight the inherent blindness in this community towards the extraordinary amount of work that it requires to join it.

👎 12

ok so… it’s more an “aesthetic” thing.


Is there a way to exclude transient dependencies from all dependencies in deps.edn?

Alex Miller (Clojure team)20:04:11

no, that's not available right now - you can supply exclusions on a per-dep basis


@include is more of a StackOverflow kind of thing -- and it's how feature requests and bug reports can move from community submission to JIRA and action by core/Contrib maintainers. is more of a general discussion forum, where folks announce and discuss projects or have a back and forth about process/architecture/etc.


@seancorfield great. thanks for your enlightenment. I think (as newbie) I will stick with the general discussion forum for a while 🙂

Jun Yoo19:04:11

Hello all! I was trying to go through some of the clojure tutorials and got stuck here Problem is that when I run the code with REPL, I am getting the following error. Anyone have an idea of what's going wrong with my setup? I had followed the setup up as instructed as far as I know

user=> Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (


are you using java 9? does it work with java 8?

Jun Yoo19:04:23

looks like i'm running java 13. I'll try downgrading!

Jun Yoo19:04:15

Okay that worked! thanks for the help!

😁 4

Does anybody use VSCode and clojureVScode or clover plugins? Would like to output eval results back to connected REPL not the built in VSCode output window which has no colours or pretty print


If you do not get an answer here, there are #vscode and #calva channels that might help


Recently renamed to just #calva


Thanks. A bit of evidence that my memory isn't fooling me all of the time 🙂


(I only found they'd renamed it when I tried to type it in 🙂 )


@grierson I think Calva has superceded both of those VS Code packages -- it's getting a lot of active development and there's a #calva channel for it.