This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-22
Channels
- # announcements (3)
- # beginners (22)
- # braveandtrue (6)
- # calva (2)
- # cider (85)
- # cljdoc (1)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (70)
- # clojure-italy (9)
- # clojure-spec (1)
- # clojure-uk (144)
- # clojure-ukraine (6)
- # clojurescript (109)
- # cursive (59)
- # data-science (15)
- # datomic (40)
- # emacs (8)
- # fulcro (64)
- # funcool (8)
- # graphql (8)
- # hispano (3)
- # hoplon (7)
- # jobs-discuss (29)
- # leiningen (3)
- # luminus (2)
- # off-topic (13)
- # onyx (9)
- # parinfer (49)
- # pedestal (2)
- # portkey (8)
- # re-frame (10)
- # reagent (33)
- # reitit (13)
- # ring (2)
- # ring-swagger (16)
- # shadow-cljs (193)
- # spacemacs (1)
- # sql (19)
- # tools-deps (19)
I basically want a sequence that gets the next element from a remote server, but I want it to get exactly one element at a time, not in chunk
Has anyone read Paradigms in AI programming? Would the exercises/knowledge apply over to clojure or no
I see that on github there are people who did the exercises in clojure
I'm hoping someone can tell me what the name is of this clojure or clojurescript library I'm trying to remember. I came across it recently (don't remember where) and it has to do with using excel-like formulas in spreadsheets (things like =POW(2, 3)
). I believe it was being used so that users could enter these formulas into web apps.
Does anyone know what that might be?
Is it possible to have a global deps.edn
? Stuff that gets merged in every call to clojure
.
@henrik ~/.clojure/deps.edn
I think
like, currently I'm doing (->> lst (map :thing) (map first) (map :stuff) (map some-fn)) ...
I believe that’s equivalent to (comp (map :thing) (map first) (map :stuff) (map some-fn) ...)
i.e. using transducers.
Or I should say ((comp (map :thing) (map first) (map :stuff) (map some-fn) ...) lst)
You could also go (map (comp some-fn :stuff first :thing))
though the ordering thing may make it confusing
The transducers version does not require you to reverse the order (which hurts my brain, but it’s true), and it’s a bit more efficient.
Just don’t comp
transducers and non-transducers in the same comp
, or it really hurty-brain.
the other caveat with transducers is that comp
of transducers produces another transducer, so you have to use it in a transducing context like into
Hello everybody! is there a way to run a app with clojure tool cli from github if it contains java sources?
I would like to do clj -Sdeps {:deps {may-app {:git/url "...." :sha "..."}}} -m my-app.main
As far as I understand handling Java sources, as in actual source files you want to compile locally, is outside the scope of clj
. It focuses on dependency resolution, not build.
yeah imagined that. thanks @U061HGP8C
Hi everyone. Is there a way to create namespace aliases for use in namespaced keywords without creating a new Clojure namespace? I know that I can use in-ns
to create the namespace and then create an alias for that, but is that the idiomatic approach?
https://clojuredocs.org/clojure.core/create-ns with https://clojuredocs.org/clojure.core/alias clojure/data.xml uses this method to have XML namespaces (which are urls)
you don't need to create a namespace for namespaced keywords
can just do :whatever/keyword
I know. It’s just the aliasing feature I would like, e.g., to avoid writing a long namespace again and again
oh sorry
Running (def a (
and then lsof | grep file.txt
I get a whole lot of threads using file.txt
Any ideas?
if I want a function to gain access to the namespace in which it is being declared, I can define something like this
(def my-ns (str *ns*))
(defn namespacify-symbol
"if the symbol is missing a namespace, lend it ours"
[s]
(if (nil? (namespace s))
(symbol my-ns (str s))
s))
is there a nicer way? (I'd like to avoid the specific declaration of my-ns
if I can)
oh I suppose I can use a let statement instead
(let [my-ns (str *ns*)]
(defn namespacify-symbol
"if the symbol is missing a namespace, lend it ours"
[s]
(if (nil? (namespace s))
(symbol my-ns (str s))
s)))
I'd be inclined to use (name s)
because I think it is closer to your intention, but in practice yours is fine.
you can't do (name *ns*)
but you can do (name s)
cannot do (namespace *ns*)
neither
which I thought was quite interesting
Is there any (easy) way to call FORTRAN code from clojure, or is this a Bad and Dumb Idea?
Most of the complexity would probably be in the JNI->C part, so not even very accessible for someone experienced in clojure.
I did exactly that in the past, clj - java - jni - c - fortran, luckily for me the c part was already written
JNI is quite easy to use, depending on how large the api you need to cover is. Also depending on your requirements you can prolly get away with jna or better, jnr
Another idea I was toying with lately is to use luajit for the ffi and fennel-lang for these kind of things, but if you need stuff from java land this is a no go
so maybe you could do something like that using polyglot Clojure https://github.com/gigasquid/graal-test/blob/master/src/graal_test/core.clj
Maybe looking at core.matrix -> clatrix -> jblas -> LAPACK can provide useful insights?
If that (matrix math on the metal) is what you are looking for, I'd strongly recommend having a look at Neanderthal