This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-02
Channels
- # adventofcode (153)
- # announcements (29)
- # architecture (6)
- # babashka (5)
- # beginners (197)
- # calva (71)
- # clj-kondo (27)
- # cljfx (4)
- # cljs-dev (33)
- # cljsrn (1)
- # clojure (52)
- # clojure-australia (5)
- # clojure-boston (1)
- # clojure-europe (38)
- # clojure-france (1)
- # clojure-hungary (5)
- # clojure-italy (1)
- # clojure-nl (19)
- # clojure-uk (5)
- # clojurescript (12)
- # conjure (4)
- # core-async (3)
- # cursive (22)
- # datalog (70)
- # datomic (32)
- # deps-new (8)
- # emacs (79)
- # events (2)
- # fulcro (15)
- # graalvm (15)
- # leiningen (2)
- # lsp (5)
- # minecraft (1)
- # nbb (1)
- # off-topic (37)
- # polylith (11)
- # re-frame (9)
- # reagent (1)
- # reitit (3)
- # releases (1)
- # reveal (2)
- # shadow-cljs (35)
- # spacemacs (1)
- # tools-build (4)
- # tools-deps (55)
- # vim (11)
- # xtdb (6)
Hi is there a way to rebind *out*
to a connected nRepl so some [a subset] of my printlns will go to a specific repl instance?
Something like
(binding [*out* ???]
(println "Send me to the Repl pls"))
Not sure what goes into the ???
Some nrepl clients don't seem to support async output at all (the nrepl sending random output whenever)
In this case, messing around w/ IntelliJ (Cursive) nRepl And the program is running as a separate process (started from terminal)
https://github.com/nrepl/nrepl/issues/119 might be helpful.
Interesting!
Heya, for some reason I am unable to create, comment on or subscribe to JIRA issues anymore. It always says "You are not authorized to perform this operation. Please log in." But when I try to do that, I am supposedly already logged in but says on the account selection screen that my logged-in account "doesn't have access to Jira on http://clojure.atlassian.net" (even with a freshly created account). Does anyone know what's up with that?
We only give out jira edit access to people supplying patches (our jira logins are finite). The preferred place for creating and commenting on issues is https://ask.clojure.org
IC, thanks! I guess my only gripe then is how to subscribe to issues I'm interested in - JIRA activity isn't synced to http://ask.clojure.org so subscribing there doesn't do the trick 😕
Discussion should mostly happen on ask and you can get notified about ask issues, don't remember what affordances are there to watch
And I do come back and close the ask issue if we resolve the jira
It's not perfect, admittedly
Ah cool, I guess that covers at least 95% of my desires then 🙂 Yeah, the usual imperfections of real-world infrastructure I suppose, hehe
Not with a single call. You can use the thread-first macro, though:
user=> (-> {:a 1 :b 2} (update :a inc) (update :b dec))
{:a 2, :b 1}
I love the new addition to the reify
docstring in 1.11. I’m currently reading the reduce
doctring and it suffers from the same issue – it explains how the function operates, but not “why”. Would it be helpful to add a one line synopsis? something along the lines of “compute an aggregate result from the values in coll” ?
probably best to ask in #calva
glad to help! I’d recommend looking through the channel list, joining (and then muting) the channels for various libraries you use. it’s a great way to get feedback/help without being overwhelmed by too many notifications lol
For the #calva channel, especially if you mute it, please consider adding a Notification Keyword calva friend. I use that for announcement type messages. Then slack will badge the channel for those messages.
oh that’s excellent, i didn’t realize you did that
I believe you can just
(-> "./input/day2input.txt"
slurp
str/split-lines
(->> (map #(split % #" "))
(map (fn [[x y]] [x (Integer/parseInt y)]))
(into [])))
the thread first will plop it in the first position and the thread last will do the right thing from thereor you can combine the first few
(->> (split-lines (slurp "./input/day2input.txt"))
(map #(split % #" "))
(map (fn [[x y]] [x (Integer/parseInt y)]))
(into []))
(->> (split-lines (slurp "./input/day2input.txt"))
(map #(split % #" "))
(mapv (fn [[x y]] [x (Integer/parseInt y)])))
You can also try the zig-zag operator by @U4VT24ZM3 https://twitter.com/MrEbbinghaus/status/1463188204887150596
What most people overlooked is that I provided an implementation you can use with https://github.com/vlaaad/tweet-def… :-)
user=> (require '[io.github.vlaaad.tweet-def :as tweet])
nil
user=> (tweet/def "")
#'user/↯
(↯
"WTE"
(reverse)
(mapv int)
(update 0 inc)
(map char)
(reverse)
(apply str))
"WTF"
https://twitter.com/MrEbbinghaus/status/1463192005429891076I am wanting learn more about how the basic clojure macros (def, defn, let*, if), etc. are implemented, but haven't been able toe easily find where they are defined, can someone point me in the right direction?
they are mostly implemented in the Compiler as they are special forms
you have to bottom out somewhere - this is the place! :)
for example, see https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6323 - that's let*

the parse method is parsing a let* form, the doEmit is emitting Java bytecode
From the list you mentioned defn
is a relatively simple macro JFYI @diego.vid.eco you can always run (source macro/fn-name)
from the repl to see how functions and macros are implemented in the CLJ language. Though as pointed out def and if, let* are unique axioms of the language.
It also helps if your editor has go-to functionality but I tend to just run (source)
fn from repl.
Thanks @chesslunatic. I was confused because on the source it seems like defn
is declared with def
but now I see that afterwards there is a call to (. (var defn) (setMacro))
which I suppose does some sort of conversion of it to a macro.
a macro is just a function that takes code data and returns data
the flag is what tells the compiler to expand when it analyzes