Fork me on GitHub
#beginners
<
2016-06-16
>
roberto02:06:43

how do you package a jar that isn’t available in a repository in an uberjar?

roberto02:06:59

I thought lein uberjar would package everything in resources and put in the uberjar’s classpath

gowder02:06:01

Just in case this is useful to anyone else--- my switch to clojure has finally motivated me to make the leap to emacs over my usual sublime. Of course, the documentation for it is not terribly beginner-friendly at all. Trying out spacemacs, and very slowly collecting everything I learn about how to work the thing in a gist. Linking it here in case anyone is in a similar situation: https://gist.github.com/paultopia/1fcf95aa13ae78000d4b5474f3c6cd2d

gowder02:06:20

(Best viewed in raw mode because github doesn't render pandoc tables right)

adamkowalski04:06:17

how would you go about having protocols which require you to first implement another protocol?

adamkowalski04:06:32

ie I would like to have a functor protocol which means you need to implement fmap for your type

adamkowalski04:06:51

but then I want applicative, which requires you to first be a functor, and then to implement pure and apply?

adamkowalski04:06:15

and then monads should build on top of applicative but also require bind

adamkowalski04:06:11

Should I just use the function satisfies? within those other protocols

dev-hartmann11:06:59

Can anyone tell me how to update cider to work with clj-refactor?

plexus11:06:40

do M-x list-packages, find cider in the list (you can search with C-s), press i, find clj-refactor in the list, press i, now press x to start installation

dev-hartmann12:06:47

Thanks @plexus , i already have both installed, does your answer update both?

plexus12:06:05

yes, it should install the latest version

meowy12:06:47

@gowder: You can use SPC-b-b to get a buffer list, too.

meowy13:06:17

@gowder: You can also replace SPC-m-s-i with ,-s-i. In fact, this works for all CIDER commands with bindings.

meowy13:06:23

, is basically an alias for SPC-m.

meowy13:06:51

Saves a keystroke.

meowy13:06:07

I end up doing :w, ,-s-x a lot. :P

meowy13:06:45

And ,-s-e while editing specific stuff when I don't need to reload the entire file. Edit a function, ,-s-e it, ,-s-e test code.

meowy13:06:15

Talking about testing your creation, it's often really useful to add a (comment) block at the end of the file with some forms to run using ,-s-e in the REPL.

meowy13:06:04

There's actually comment blocks like that in the Clojure source code. XD

meowy13:06:12

Because someone forgot to delete them.

meowy13:06:19

Like this one by Rich himself.

plexus13:06:34

not sure he forgot to delete them, I think it's more intended as documentation. There are quite a few like these around the clojure code base