Fork me on GitHub

how widespread is the usage of the transit-python package?


FWIW I use it.


that's widespread enough, thanks 🙂

😆 3

hey folks, is there an all construct in clojure? For determing whether all entries in a list are true?


or anything similar?


@nickt (every? true? list-of-bools) ?


ah! Yes, thank you


Hello, does anybody know decent library to create UI in clojure? quick google got me fn-fx, is it good enough? I really want to use clojure for my school assignment, but i don't want to risk to try something buggy.

Ertugrul Cetin14:09:09

Addition to @U0JUR9FPH, if you want React like virtual dom functionality you could check fork of seesaw (I wrote);

❤️ 3

I've used seesaw for a school assignment. cljfx is the way to go for "real" or "good" apps, but seesaw has a better chance of running on a random JVM

❤️ 3

You might want to check out cljfx and the #cljfx channel


Thank you!


can I log readable data with like I can with pedestal.log ?


ah, logging.readable

Jeff Evans19:09:31

when a macro definition calls a fn, are the arguments evaluated?

Toyam Cox19:09:45

Depends on how you escape-quote

Jeff Evans19:09:58

right, so, if it’s inside a syntax quoted section (i.e. backtick), then it ends up as part of the expansion (not evaluated), so it seems fairly obvious that in that case the fn is not even called at definition time, right?


Correct. Only unquoted (~) forms are evaluated at macroexpansion time. Now when we get into nested quoting/unquoting… :)

Jeff Evans20:09:49

not only unquoted, but also forms appearing before the first backtick, right?

Jeff Evans20:09:34

like if you have something along these lines:

(defmacro something [& rest]
  (let [foo (my-fn (first rest))]

Jeff Evans20:09:59

then my-fn is invoked with the first item from the macro arg list, which is an unevaluated symbol, I believe

Jeff Evans20:09:31

so the real question is, does my-fn receive it as an unevaluated symbol as well? or does it evaluate?

Jan K21:09:30

It can't evaluate, that code happens at macroexpansion time, my-fn receives unevaluated form or symbol or literal, whatever was passed in.

Jeff Evans21:09:23

thank you! when you put it that way, it makes perfect sense


@U0183EZCD0D “not only unquoted, but also forms appearing before the first backtick” Absolutely, and a fun homoiconic trick is to add debug print statements in such code to see what is going on, especially with more elaborate/destructured macro params. Nice learning aid as I was getting up to speed on macrology.

Jeff Evans22:09:25

yeah I have definitely made use of that. glad to hear there isn’t an obvious better way to debug macros 😂

Jeff Evans22:09:52

as in, errors even during macroexpand


Is there an idiomatic way to get the time of how long my program has been active/running?


Yes! in fact, I know this for some insane reasons


it is in RuntimeMXBean


(-> (ManagementFactory/getRuntimeMXBean)


and before you ask I have no clue what an MXBean is

😂 3

Thanks I’ll mess around with this. This looks like what I was trying to achieve, the uptime of the current runtime!


Yeah the "idiomatic" part is just dealing with Duration objects instead of the long for any logic


I see. I’m fairly new to clojure. So I don’t know too much on the java ‘libraries’… Do I need to require a certain namespace to use ManagementFactory?


you need to import the class


are you running in a repl or do you have a file with a ns at the top?


ns at the top


(ns whatever
  (:require [] ...)
  (:import ( ManagementFactory)))


damn didn’t know you can do that! I guess thats one of the beauties of Clojure. So whatever is in the Oracle docs thats java, I can import and use that?


I really appreciate your help tonight! I can move forward and run with this!


yeah, all of clojure maps to the "java metaphysics" in some way


and you can import and use any classes you want


though certain things will be easier than others - "spring-like" stuff with annotations or stuff that reflectively calls constructors can be a pain


I’ve just been using the core library, and its all that I’ve needed so far. But now its a whole new world! lol

Malik Kennedy23:09:42

(time ...) macro for small parts ?flame-graphs? for larger parts? (I havent used flame-graphs myself)