This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-02
Channels
- # beginners (118)
- # boot (73)
- # cider (2)
- # cljs-dev (65)
- # cljsrn (18)
- # clojure (49)
- # clojure-argentina (4)
- # clojure-italy (19)
- # clojure-portugal (1)
- # clojure-russia (1)
- # clojure-spec (34)
- # clojure-uk (102)
- # clojurescript (202)
- # code-reviews (3)
- # core-async (5)
- # cursive (11)
- # datomic (25)
- # emacs (1)
- # graphql (22)
- # hoplon (6)
- # keechma (59)
- # leiningen (10)
- # luminus (31)
- # lumo (78)
- # off-topic (141)
- # om (32)
- # om-next (2)
- # onyx (6)
- # parinfer (55)
- # pedestal (3)
- # protorepl (3)
- # re-frame (8)
- # reagent (8)
- # ring-swagger (1)
- # rum (20)
- # specter (1)
- # sql (5)
- # test-check (11)
- # vim (13)
- # yada (7)
@cjsauer Many thanks for you help! I just got home and tried your ideas, turned out I needed to do both the :aot [clojure.tools.logging.impl]
and :main app.core
overrides in my :uberjar
section as my global main was set to :main ^:skip-aot app.core
do you guys knows any “blog app” repository ? need to see a “real” application with authentication
Have you tried cryogen? It's a static blog generator.
I'd like to hear any opinions on the following:
There is a transition :T from state :A to state :B.
:T has a behavior fn :t
:A has a teardown fn :exit
:B has a setup fn :enter
all of the fns above accept entire state machine as an argument (basically can depend on "current state").
There are several ways to implement transition in terms of fns call sequence:
1) :exit :t :enter
– visually intuitive, but "destroys" source state before :t
has a chance to use it (if :t depends on it)
2) :t :exit :enter
– visually unintuitive, but :t
can rely on :A
not being destroyed upon :t
call.
Which one is superior and why? Any input is appreciated.
If :t
can fail then the latter seems fine; I would read it as "`:t` implies the transition :exit
-> :enter
". If :t
cannot fail then the former is more readable and conveys that fact.
failure is interesting :t
aspect, I have not thought through yet. I'd say :t
should be pure in an i/o
sense, but can issue an event, which would trigger another transition in the system.
e.g. I'd choose to put any api calls into :enter
rather than into :t
an example of :t
would be (dec retries-left)
; but I can't come up with a side-effecty, issuing an event one right now.
I’m using clj-http
to do SOAP
requests. Whenever I get a response, the REPL floods with stuff like this:
17-08-02 12:13:45 Mimir.local DEBUG [org.apache.http.wire:73] - http-outgoing-3 >> "<sus:Begin>[\n]"
17-08-02 12:13:45 Mimir.local DEBUG [org.apache.http.wire:73] - http-outgoing-3 >> "2000-01-01[\n]"
One line for every line of XML received by my machine. How do I get it to tone it down a bit?Take a look at this issue https://github.com/dakrone/clj-http/issues/22
I released a new ClojureFX version. It features automatic Controller generation for FXML files: https://bitbucket.org/zilti/clojurefx
Welcome, @triwave, we're glad to have you! If you have any questions feel free to ask (the #beginners channel may be useful)
oh great! I didnt notice the beginner channel in the list..Ill head there now, thanks!
is there any java library which provides a browser dom model via a java api? I want to program against the dom as the UI, but I want to use clojure instead of cljs, is this possible at all?
what does that mean? how would you program "against the dom" from java? other than https://github.com/miraj-project/html, haha.
then there would be bindings which allowed you to register callbaskc on browser events and functions for manipulating the dom
so that the response to a browser event comes from the server? i mean the event calls something on the srver? i don't get it.
I’m seeing that clojure.lang.RT.nthFrom()
is taking 60% of the time in my code, but unfortunately that doesn’t tell me what part of my code that does all those calls
@schmee forgive me if this is obvious, but it means you are calling nth on collections that are not associative
if you can find the main calls to nth that are taking time, you can ensure the input is a vector
which takes nth from linear time (nthFrom) to O(1) (nth)
iterating on a set should not use nth
hmm, ok, thanks for the tip, I’ll dig around and see if I can find any weird iteration going on
the only thing in clojure.core that uses nthFrom is nth, and you can probably find calls to that in your code, or the code of your libs - you know it's a bottleneck but don't know its callers somehow?
it wouldn't be iteration!
iteration isn't going to use nthFrom, if someone sane wrote it
it would be code that's looking for the nth item of a collection that is a list or lazy seq or seq
huh, well, I don’t have a single nth
in my code, it’s either iterate everything or first
what is it that told you nthFrom was taking so much time?
interesting, yourkit's hotspot view shows the most active call chains leading to the call
@noisesmith found it: (let [[[s1 s2] & r] w)
interesting... so you could try some explicit lookups instead of destructuring (I've heard of destructuring being a bottleneck before)
with peek and pop, be sure you know the type of the input of course