This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-27
Channels
- # admin-announcements (72)
- # beginners (121)
- # boot (9)
- # business (1)
- # cider (6)
- # cljs-dev (2)
- # cljsjs (8)
- # cljsrn (12)
- # clojure (142)
- # clojure-dev (5)
- # clojure-nl (7)
- # clojure-russia (41)
- # clojure-uk (3)
- # clojurecup (1)
- # clojurescript (351)
- # cursive (45)
- # data-science (1)
- # datavis (5)
- # datomic (7)
- # editors (6)
- # editors-rus (15)
- # emacs (53)
- # hoplon (1)
- # ldnclj (53)
- # lein-figwheel (7)
- # liberator (2)
- # om (73)
- # onyx (28)
- # re-frame (1)
- # reagent (3)
- # yada (7)
@bensu :min-lein-version is optional only
although Heroku uses it to pick a Lein2
I think you would need to upgrade it yourself if you wanted a specific version
Somehow, lein repl
stopped working. It now gets “REPL server launch timed out”. Is this something someone’s seen?
Resolved. Top-level synthesizing bad keywords. Still not sure why it timed out, though.
What did go wrong here : https://www.refheap.com/112122 when I send (@account) to the repl in Cursive I see this error message : (@account) CompilerException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn
You are calling account as if it was a function. Wrapped in parens (@variable) @variable is treated as a function, in first place onside the parens.
@alexmiller: I saw this page linked from a blog post: http://dev.clojure.org/display/doc/IDEs+and+Editors and I noticed didn’t contain Cursive.
@roelof Your anonymous function: (fn [x] (+ x)) probably should add something :) (+ x) not sure what it does, not at a repl (+ x 1) adds one
@roelof (+ x x) ?
@borkdude: I have made the agent earlier with (def account (agent 0 :validation number?))
when I do this : (send-off account (send account #(+ account amount)) ) I see this error : CompilerException java.lang.RuntimeException: Agent is failed,
According to the programming clojure book send-off is sending the message 1 times where send sends it several times
also (send ...) is not a function. send-off expects a function as the second argument
Still errors . Anyone else who can help me with this code : https://www.refheap.com/112123
@roelof: never used agents, but the doc is there : https://clojuredocs.org/clojure.core/agent
I know, I change it but still the same error : CompilerException java.lang.RuntimeException: Agent is failed,
Is this paper about more efficient collections exciting or old news: http://blog.acolyer.org/2015/11/27/hamt ?
@tomayerst I think it's actually being looked at according to @alexmiller, if I remember correctly
is there some handy tool to log the arguments of a function call + the names of the arguments
@borkdude: https://github.com/spellhouse/clairvoyant — cljs only still ...
@martinklepsch: JVM wanted, but I'll take a look anyway
maybe good old https://github.com/clojure/tools.trace does the job
@borkdude: have you got clj-refactor installed?
if you have it’s ‘cljr-find-usages'
I have clj-refactor prefix bound to C-c <RETURN> then ‘f u’ for find usages.
If you just want to go to the defn or def of a var you can use CIDER by placing cursor on symbol and using C-c M-.
You use C-c M-, to return to where you were
As you’re coming to ClojureX why not talk to @benedek about clj-refactor. He’s one of the authors. Also @bozhidar (CIDER author) will be there too.
haha thx @agile_geek for the promotion 😉
@agile_geek: apparently not, I'll try it now.
@benedek: my pleasure. 😉
@borkdude: it’s a missing piece of the emacs/clojure/cider puzzle!
@chris we recently added hydras (as in https://github.com/abo-abo/hydra) for easier discoverability, see screen cast here: https://github.com/clojure-emacs/clj-refactor.el/wiki/Hydra
@benedek: cool. I think I’m a couple of versions behind!
thanks. I watched @magnars parens-of-the-dead and I was amazed by all the things that clj-refactor could do that I had never even seen, and I’m sure there’s a bunch more in there I haven’t even discovered yet
it also has the added benefit of (1) staying open for a refactoring ‘session’ and (2) ‘teaching’ you the same keycombo-s you can use with your predefined prefix
our wiki is quite complete as well with screencasts etc although naturally it refers to the latest snapshot
@borkdude: I think you got bitten by https://github.com/clojure-emacs/refactor-nrepl/issues/127
most likely you have two nses with the same name (on of them clj other one cljs) which tools.namespace can’t handle right now
borkdude : thanks, this did the job https://www.refheap.com/112143
can emacs highlight unused symbols for me like this? http://twitter.com/borkdude/status/670267589264695296
@borkdude: I don’t think it can at the moment but sounds like a low hanging fruit actually. most likely can be done in clj-refactor as refactor-nrepl
has find-used-locals
re https://github.com/clojure-emacs/refactor-nrepl/issues/127 more details: http://dev.clojure.org/jira/browse/TNS-38
@roelof: loop in Clojure is not an imperative loop. It’s the point at which recur will ‘jump’ to in a recursive call. It also binds the initial values used in the ‘loop’. Think of it like a ‘let’ that you loop back to on a recur call. I hope that makes sense?
You may need to look at 'for' which is a list comprehension. That's a fancy name for something that iteratively consumes a sequence assigning each element to a var. However, when I'm recursing over a sequence I usually use map if I'm just transforming each element in the sequence or reduce if I'm doing something that I need to maintain some state for during the recursion e.g. building a total.
@agile_geek: thanks. the challenge of 4 clojure which I tried to solve was re-implement range
Yep. Although there other ways as with all things!
@agile_geek: can you show me a other way
@roelof I'm just going out but I'll reply directly to you over the weekend
@agile_geek: no problem.
@roelof: here's another way - (defn range' [start end step] (take-while #(< % end) (iterate #(+ % step) start)))
@mccraigmccraig nice! Very idiomatic
what's the best way to pull in a dependency that is only used in a test, that I also want to run from my 'lein repl' development
@mccraigmccraig: oke, I think I understand how it works, The only thing I need to check is iterate
@roelof: (iterate f x)
returns an infinite lazy sequence with (x (f x) (f (f x)) ...)
i.e. to get the next value in the sequence it applies f
to the previous value
anyone here who has succeed in running datomic on clojure. Im following the getting started and ran into issues right away