This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-18
Channels
- # bangalore-clj (1)
- # beginners (60)
- # boot (98)
- # cider (8)
- # clojure (158)
- # clojure-dusseldorf (16)
- # clojure-france (3)
- # clojure-hamburg (2)
- # clojure-mke (2)
- # clojure-russia (11)
- # clojure-serbia (1)
- # clojure-spec (123)
- # clojure-uk (59)
- # clojurescript (44)
- # code-reviews (16)
- # community-development (51)
- # core-async (46)
- # cryogen (1)
- # cursive (9)
- # datascript (5)
- # datomic (36)
- # emacs (3)
- # events (12)
- # hoplon (57)
- # jobs (1)
- # juxt (3)
- # klipse (55)
- # lein-figwheel (3)
- # leiningen (5)
- # luminus (3)
- # off-topic (8)
- # om (75)
- # om-next (9)
- # onyx (17)
- # pedestal (7)
- # portland-or (3)
- # proton (36)
- # protorepl (6)
- # re-frame (3)
- # reagent (33)
- # remote-jobs (1)
- # ring (23)
- # ring-swagger (2)
- # rum (1)
- # specter (1)
- # untangled (36)
- # yada (11)
Hello, I'm trying to do an exercise from the Brave and True book and I've written a function like this:
clojure
(defn better-symmetrize-body-parts
"Expects a seq of maps that have a :name and :size"
[asym-body-parts]
(reduce (fn [final-body-parts part]
(into final-body-parts (set (into (into [] (matching-part part)) #{part}))))
[]
asym-body-parts))
The full thing with the output is here: https://gist.github.com/dragsubil/630dc31812db31e7748fc778c6b8b09a
@dragsubil what is the problem statement?
To take asym-hobbit-body-parts (the vector of maps you see in the snippet), create new maps for "right", "top" and "bottom" for each map where :name starts with "left", and output a modified version of the vector with the new maps included
@dragsubil left-eye right-eye bottom-eye top-eye ? Is this The hobbit, by H P Lovecraft?
Beginners - I just found this great 1 click installer for a Clojure IDE https://sekao.net/nightcode/
okay, so i'm a complete REPL noob and trying to adopt the "reloaded" workflow, but it appears as if my REPL is pretty wonky... specifically, i made changes to a clojure file, and it doesn't seem to pick up on it, most of the time (sometimes it does pick up on the changes)
@lmergen is your situation like this: a function a/foo
in file a.clj
calls function b/bar
in file b.clj
. then you make changes to b/bar
body and calls reset-all
to reload file b.clj
but when you call a/foo
, it still using old b/bar
code
i have thought about that as well, but i have no idea how to debug this to figure out whether that's actually the case
for what it's worth, i've properly set the the reloaded.repl/set-init
, and the function that's called there does not see the changes
maybe, your problem listed here https://github.com/clojure/tools.namespace/#warnings-and-potential-problems
i'm not sure, but perhaps this is a hint
user> (clojure.tools.namespace.repl/refresh)
:reloading (com.autheos.video.routes com.autheos.video.web-server com.autheos.video.system com.autheos.video.main user)
:ok
user> (clojure.tools.namespace.repl/refresh)
:reloading ()
:ok
user>
as in, maybe my env directories aren't defined properly somewhere ?after the first call to refresh
and the second call to refresh
, did you change those files?
i'm sorry, i've made a wrong question earlier. should be "after the first call to refresh
and before second call to refresh
, did you edit those files?"
@lmergen lmergen, i assumed you use clojure.tools.namespace
directly. i just saw juxt's edge repo and it uses reloaded.repl
which uses c.t.namespace
hard to say, juxt's edge repo uses boot and reloaded.repl
which I never use. When I started learning to use reloaded workflow, I created a blank project with lein new app my-reloaded
and use the guide in clojure.tools.namespace
readme.
like i said, i think i need to go back to the drawing board and make things "simple" again 🙂
oh, this leiningen template from the creator of c.t.namespace helps me a lot to understand how to structure my project with reloaded workflow https://github.com/stuartsierra/reloaded
Out of the box, the edge repo's reset does work, we use it on internal projects & so on.
i almost feel as if its triggered when something breaks during initialization / destruction of the component system
Potentially related: https://github.com/weavejester/reloaded.repl/pull/8