This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-01
Channels
- # aleph (2)
- # aws (23)
- # bangalore-clj (1)
- # beginners (99)
- # bristol-clojurians (1)
- # cider (3)
- # circleci (1)
- # clj-kondo (8)
- # cljdoc (4)
- # clojars (1)
- # clojure (47)
- # clojure-india (1)
- # clojure-nl (2)
- # clojure-serbia (3)
- # clojure-spec (2)
- # clojure-uk (17)
- # clojuredesign-podcast (1)
- # clojurescript (20)
- # datascript (1)
- # datomic (1)
- # emacs (1)
- # fulcro (4)
- # pathom (18)
- # ring-swagger (2)
- # shadow-cljs (31)
- # spacemacs (3)
- # tools-deps (10)
- # vscode (1)
I don't think so @christian.gonzalez because the datafied version of the object depends on the needs or capabilities of caller. I want something that works sort of like HTTP's content negotiation where a client specifies via an Accept
header what the response should look like.
Lein scalac is fairly old at this point, but i can't tell if its old "it works don't worry about it" or its old "no longer works and not maintained"
I have no idea, but perhaps it is "works for whatever versions of Scala are compatible enough for your purposes with 2.9?"
which might be no purposes at all, if Scala changed too much between the version you want to write, and 2.9
The README mentions "if you need runtime support". Not sure what that means, precisely, but have you tried without adding that dependency?
or sbt
Not that I know of. Keeping Scala and Clojure source in separate projects is one option, but maybe not what you prefer
After the extremely painful 2.7 -> 2.8 migration, we decided not to migrate to 2.9 and then we rewrote our Scala code to Clojure instead.
but I want that to not be true since I want to add a few scala files to my project without a rewrite
Unrelated, is there a way to make reify dispatch on overloaded method names differently
Does anyone have any suggestions for exploratory data visualization in a large-ish (~40MB with nippy) tree-like data structure? I'm thinking data-frisk-reagent maybe? cider-inspect mostly works, but I'm looking for something I can customize more easily (for example, I know the tree is highly unbalanced and different trees are similar but unbalanced in different ways -- so being able to e.g. show some keys with a bigger font or different color or whatever based on the weight of the data behind them is valuable)
unfortunately most treemap search results appear to be about treemap the data structure not treemap the viz technique 🙂
yep, messing with oz next, just not obvious how to get event streams working (and it feels like I'd mostly want the event management happening in clojure)
I have a LazySeq
(generated by spec-provider
) and I'm trying to transform all the namespaces for symbols in the generated code (`clojure.alpha.spec` -> clojure.spec.alpha
, for Spec2). For some reason postwalk-replace
works, but postwalk
doesn't.
@U8LN9KT2N I think nobody has replied because you didn't include any code showing what you're doing in each case, so there is no way to know why it isn't working. If you look at the code for postwalk-replace you can see it is just calling postwalk.
(defn postwalk-replace
[smap form]
(postwalk (fn [x] (if (contains? smap x) (smap x) x)) form))
@UBRMX7MT7 Yeah, sorry. I got pulled away the other day before I could post the code. Thanks for responding.
I see what you mean. It looks like the str
is consuming the outer sequence while converting it to a string. converting the outer seq to a string.
(walk/postwalk str (seq [1 2 3]))
=> "clojure.lang.LazySeq@13291"
(walk/postwalk #(if (int? %) (str %) %) (seq [1 2 3]))
=> ("1" "2" "3")
Or maybe it's not consuming it, it's just that it is converted to a string and therefore no longer has any children to traverse.
Interesting. My actual case though will be a function that splits apart a namespaced symbol and changes the namespace. I think I can figure out that inner function on my own, but I'm surprised the inner fn affects how poswalk
navigates the sequence.
Also, postwalk-demo
shows that the first element visited isn't the whole collection, it's the first symbol in the first collection, so it's starting at the leaves.
Yes, so it converts the leaves to strings, then converts the sequence of strings to a string.
The fn you're passing isn't an inner fn, it's used for both inner and outer forms.
My inner fn needs to return the argument unchanged in cases where I'm not trying to replace.
It lets you convert the parent forms as well as the children.
Plain walk
gives you control over the recursion, in fact you have to recurse yourself.
Makes sense