This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (8)
- # babashka (73)
- # beginners (126)
- # calva (8)
- # cider (5)
- # circleci (2)
- # clara (9)
- # clj-kondo (4)
- # cljdoc (18)
- # cljfx (49)
- # clojure (51)
- # clojure-australia (3)
- # clojure-europe (41)
- # clojure-france (1)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-russia (1)
- # clojure-uk (16)
- # clojurescript (14)
- # conjure (4)
- # cursive (5)
- # data-science (7)
- # datascript (1)
- # datavis (1)
- # datomic (13)
- # defnpodcast (2)
- # emacs (4)
- # events (2)
- # figwheel-main (7)
- # graalvm (23)
- # hoplon (2)
- # jobs (1)
- # meander (15)
- # numerical-computing (1)
- # off-topic (35)
- # pedestal (5)
- # portkey (5)
- # re-frame (19)
- # reagent (9)
- # reitit (14)
- # releases (1)
- # shadow-cljs (28)
- # sql (4)
- # tools-deps (5)
- # xtdb (7)
hey folks, is there an
all construct in clojure? For determing whether all entries in a list are true?
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.
Addition to @U0JUR9FPH, if you want React like virtual dom functionality you could check fork of seesaw (I wrote); https://github.com/ertugrulcetin/seesaw
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
https://github.com/cljfx/cljfx see also #cljfx
You might want to check out cljfx and the #cljfx channel
can I log readable data with clojure.tools.logging like I can with pedestal.log ?
when a macro definition calls a
fn, are the arguments evaluated?
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… :)
not only unquoted, but also forms appearing before the first backtick, right?
like if you have something along these lines:
(defmacro something [& rest] (let [foo (my-fn (first rest))] ...
my-fn is invoked with the first item from the macro arg list, which is an unevaluated symbol, I believe
so the real question is, does
my-fn receive it as an unevaluated symbol as well? or does it evaluate?
It can't evaluate, that code happens at macroexpansion time, my-fn receives unevaluated form or symbol or literal, whatever was passed in.
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.
yeah I have definitely made use of that. glad to hear there isn’t an obvious better way to debug macros 😂
as in, errors even during
Is there an idiomatic way to get the time of how long my program has been active/running?
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
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?
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
(time ...) macro for small parts ?flame-graphs? for larger parts? (I havent used flame-graphs myself)