Fork me on GitHub
#clojure
<
2015-08-21
>
lvh00:08:34

jackjames: I guess it does. Thanks simple_smile

paradoxquine06:08:45

hey, sorry if this is a silly question, but is there a way to clear/reset a namespace in an nrepl just by sending a message to it?

ecelis06:08:56

paradoxquine: Not that I know, without restarting the repl

paradoxquine06:08:40

are old defs lying around just not a concern then? trying to figure out efficient dev processes

ecelis07:08:42

what do you mean by old defs? like things you define while developing in the repl and redefine then later or maybe let unused?

ecelis07:08:48

if you need a clean namespace you can create a new one

paradoxquine07:08:04

i’m making a bundle for my editor to send the current s-exp via nrepl and then display the results, like cursive can do

paradoxquine07:08:31

so i was concerned that sending a lot of defs would eventually cause weird bugs in my code because the old ones would still be around

paradoxquine07:08:02

but i’m relatively inexperienced so it might be needless worrying

magnars07:08:13

I remember reading in this channel about a better alternative to Prismatic Schema to do validation of the shape of data structures, but my google-fu is failing me. Anyone?

magnars07:08:36

seems like there are many things to choose from on http://www.clojure-toolbox.com/

magnars07:08:31

yeah, it was Herbert. No clojurescript support unfortunately.

caskolkm07:08:34

can someone explain the following wont work?:

#(-> %
           :body
           xml/parse
           #(filter (fn [{:keys [tag]}]
                          (= tag :publicKey)) %)
           first)

magnars07:08:36

the threading macro doesn't know about function literals, and messes it up.

magnars07:08:54

also, nested function literals doesn't work

magnars07:08:09

the solution to both is giving that inner function a name

niwinz08:08:56

I prefer it over schema

luxbock12:08:35

I like https://github.com/roomkey/annotate but it doesn't support CLJS yet at least

lvh14:08:56

caskolkm: Another solution may be as->

ricardo15:08:50

@yogthos: Around?

ricardo15:08:13

Figured this would be faster than playing Github issue telegraph.

yogthos15:08:32

haha yeah definitely

yogthos15:08:14

so this appears fine for me now: (set! (.-innerHTML (.-body js/document)) (md->html "\n- l1\n- l2\n- l3\n\nparagraph"))

yogthos15:08:26

and didn't work with the old version

ricardo15:08:30

So regarding md->html, just removed markdown at all from .m2/repository, and when I ran figwheel again it downloaded both .65 and .69. lein deps :tree doesn’t show me anything that depends on .65. Any ideas?

ricardo15:08:55

And needless to say I don’t have it on the project.clj

yogthos15:08:00

oh interesting

yogthos15:08:09

maybe a plugin or something?

yogthos15:08:25

in ~/.lein/profiles

ricardo15:08:09

Ah, don’t lein plugin deps show up on lein deps then? Could be.

yogthos15:08:21

although interestingly I get something similar Retrieving markdown-clj/markdown-clj/0.9.54/markdown-clj-0.9.54.pom from clojars Retrieving markdown-clj/markdown-clj/0.9.69/markdown-clj-0.9.69.pom from clojars Retrieving markdown-clj/markdown-clj/0.9.69/markdown-clj-0.9.69.jar from clojars

yogthos15:08:26

except with 0.9.54

yogthos15:08:46

but I'm only seeing the 0.9.69 in the deps tree for the project

ricardo15:08:47

The only two on ~/.lein/profiles are lein-try and uberimage, which don’t seem to reference markdown.

ricardo15:08:54

Yup, I only see 0.9.69 as well.

yogthos15:08:03

so that might be a red herring then

yogthos15:08:34

does this end up rendering correctly? (set! (.-innerHTML (.-body js/document)) (md->html "\n- l1\n- l2\n- l3\n\nparagraph"))

ricardo15:08:51

No. md->html still returns without the paragraph.

yogthos15:08:27

oh that's weird

ricardo15:08:36

Can I get the version of a loaded namespace? meta seems to only return added metadata.

yogthos15:08:03

hmm not sure about that one

ricardo15:08:56

That chapter of http://clojure-doc.org is empty. 😛

yogthos15:08:36

heh rather inconvenient 😉

ricardo15:08:53

I guess namespaces aren’t necessarily tagged with the version of the project that library provides them…

ricardo15:08:42

Nope, can’t figure this one out. The older .pom is likely a red herring, since the jar isn’t downloaded.

ricardo15:08:20

Aha. Nevermind. Browser cache issue it seems.

ricardo15:08:18

Since I was trying it on figwheel and not on cljs tests. Silly.

yogthos16:08:15

ah good old browser cache

yogthos16:08:37

I'm really glad chrome has the option to disable cache when the dev panel is open

tel16:08:46

Where is that?

tel16:08:57

ohhhh, nice!