This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-16
Channels
- # beginners (81)
- # calva (6)
- # cider (21)
- # clj-kondo (2)
- # clojure (62)
- # clojure-austin (3)
- # clojure-europe (3)
- # clojure-italy (20)
- # clojure-nl (39)
- # clojure-russia (4)
- # clojure-spec (19)
- # clojure-uk (23)
- # clojurescript (76)
- # cursive (6)
- # data-science (9)
- # datomic (12)
- # defnpodcast (1)
- # figwheel-main (3)
- # fulcro (8)
- # jackdaw (5)
- # jobs (1)
- # jobs-discuss (18)
- # joker (1)
- # leiningen (2)
- # liberator (2)
- # off-topic (148)
- # onyx (5)
- # pedestal (39)
- # planck (7)
- # re-frame (5)
- # reagent (3)
- # reitit (37)
- # shadow-cljs (165)
- # tools-deps (1)
- # yada (19)
Looking for Clojure-scriptable 3D/physics environments. Know about Arcadia and #quil but want to know what else is out there. Big plus if a world/system can be created entirely in code, ideally all Clojure/script.
Hi @lspector . I don't have the answer but wonder if Zulip would be a good place to ask. (Do I remember that you used to to ABM modeling in Clojure? I've been working on a little library to make it easier to use MASON in Clojure.)
Would someone be willing to post a pointer to instructions for deploying to Clojars with Leiningen without signing? I'm sure the info is there somewhere, but the lein
help on this is not very clear to me give what I don't know, and the docs on the web seem to focus on signing. I may be overlooking the crucial bit ....
@mars0i You'll need something like
:repositories {"clojars" {:url "" :sign-releases false}}
in your project.clj
file.(or your ~/.lein/profiles.clj
file)
@deleted-user you can do (let [{:keys [painter novelist]} artist-map] ...)
You only need the form you showed if you want to rename the matches (as you did with writer
)
I pretty much always use the :keys
form -- I just the other day used the long form because I was renaming a substructure match.
Because you normal bind symbol
to expression
.
So destructuring binds symbol
s to keyword
selections from the right hand side expression.
another reason is that the destructuring form is a hash-map, and you can't have a hash map that uses the same key multiple times there are valid reasons to destructure on the same key twice in one destructure
@seancorfield great--thanks much. I wasn't even sure what config file I should be looking at.
what’s idiomatic way to deduplicate messages from one channel into another within some window of X messages?
Would anybody know why I'm getting this error message getting the Client for Datomic cloud
Unable to resolve entry point, make sure you have the correct version of com.datomic/client on your classpath
try #datomic channel?
@mars0i Just looked into Zulip but not sure how to get started and find where you're suggesting I ask about this. Pointers? Clojure-scripted MASON might indeed be useful for me, especially if it could really all be done from Clojure.
If anyone else has pointers to Clojure/script-scriptable environments for 3D simulations/physics, beyond Arcadia and #quil, I'd love to hear about them!
Have you looked at https://github.com/oakes/play-cljc ?
(Successor to https://github.com/oakes/play-clj)
@lspector searching on Zulip yields results from streams you're subscribed to. Searching for 'quil' yields results from the following streams for me: clojure-stl (https://clojurians.zulipchat.com/#narrow/stream/152255-clojure-stl), data-science (https://clojurians.zulipchat.com/#narrow/stream/151924-data-science) and the slack-archive (https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive)
Hello! Any tips how to stop symbol included inside from being fully qualified? See
`` (let [s 'hello] (defn ~s [] nil))
`` produces (defn myns.core/hello [] nil)
Thank you!
Are the macro characters processed from left to right/outer to inner?
sorry, didn't want to say symbols, I mean the tilde and apostrophe and others
still not sure I completely understand the question, but syntax quotes and other symbols operate the same as any other clojure form
another way of thinking about it: '(foo bar)
is the same thing as (quote (foo bar))
All of them operate on the next read form
@lspector, well there are a bunch of data science people hanging out on Zulip lately, mostly in the data science section, but posting elsewhere. What you're asking about isn't data science per se, I suppose, but there may be some overlap, and if nothing else, the data science people are interested in graphical representations such as quil. Yes, you can do everything in MASON from Clojure, although there have to be parts that smell of Java. More soon.
Also, I haven't done anything with 3D MASON. It's possible that my library has some 2D bias, but I don't think so. If so, I'll fix it.
Spec question: Say that I have a graph of nodes and edges modelled as a map with those keys. Now lets say that I want to spec that all nodes are connected. I can write a predicate is-connected?
that takes the entire graph, and says whether it is connected yes or no. But for large graphs, that will be hard to track down. Is there a way to also be able to spec it in such a way that I can also explain which node was not connected?
Example: {:nodes [:a :b :c :d] :edges [[:c :d]]}
is invalid because :a
and :b
are non-connected
Right, in reality I am interested in their degree, I am however struggling with writing a spec that is evaluated for each node with the graph as “context”. There is no way to determine the degree of a node without knowing to which other nodes it is connected to.
you are really just in the land of writing a function I think
spec is not going to help you with this problem much
there is not currently a way for predicates to give a more precise answer than valid/invalid
Yes, you should write a predicate that test whether the graph is connected and use it in your spec for the whole graph. If it is not you can write another functions that will return the potential "culprits".
explain can potentially tell you a more detailed reason why
or a set of "problems"
I can attach a custom explanation, right? Because saying that it failed is-connected?
is the thing that I am trying to avoid
or… I want to be more specific than that
But you don't have to do this inside spec. You can detect that the graph is not connected by applying your spec and in a second time call a function that will identify the subgraphs.
I'm not sure that spec is giving you any value in what you're describing over just writing functions
right, yeah I just wanted to add it to the other things being checked with specs, but maybe I indeed shouldn’t. Such that checking with s/valid?
gives you the “entire” picture. I’ll hammock over that, thanks as always!
Has anyone had issues using scroll
from clojurewerkz/elastisch API pointing to ES version 6.4.2? This method works fine for ES 5.x.
are you implementing infinite scroll?
I wrote those from scratch in JS. Saving the position on the page and loading it…. is a deal breaker in terms of UX. I don’t like infinite scroll for that reason.
Infinite scroll does not add value to UX… You could just write an ajax pagination if you want a better user experience. If you are just trying to save the user from needing to refresh a web page/
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
Why can’t you just query the search page by page… instead of setting a scroll timeout parameter?
Solr/ElasticSearch should be able to paginate your search
it sounds like scroll is for clients that cannot keep track of the same search url
@UGQJZ4QNR thanks for your response! I am not trying to implement anything UX related- I simply want to retrieve all the data from a given index which is too much data to fetch at once (more than 10K records). I can definitely look into pagination instead. clojurewerks.elasticsch
did a good job with scroll-seq
in that it was very simple to retrieve all data with one call so I was hoping to use it in in a newer ES version.
hmm. thinking. When I worked with Solr Lucene, I remember just iterating through the pages by page number in the get url portion.
@jp are you trying to do infinite scroll?