Fork me on GitHub
#protorepl
<
2016-12-29
>
sneakypeet13:12:40

hi all noob here (started clojure a day ago). how should I load a dependency in proto repl (or any repl for that matter)? Thanks

martinklepsch14:12:43

@sneakypeet dependency as in require a namespace or load a jar?

martinklepsch14:12:11

@sneakypeet also check #beginners if you run into things that are not strictly protorepl related

sneakypeet14:12:01

:thumbsup: sorry realized I should have asked their after I hit enter.

sneakypeet14:12:19

will go ask there as it might benefit others šŸ™‚

martinklepsch14:12:05

@sneakypeet well, depending on whether you were asking about the require stuff or loading a jar it might be protorepl specific (require is general but loading a jar may be specific)

martinklepsch14:12:17

(I'm not even sure myself, heh)

sneakypeet14:12:09

So I want to try out clj-http

sneakypeet14:12:42

lein has downloaded the dependency, but I get file not found exception

sneakypeet14:12:57

when I try with (require '[clj-http.client :as http])

sneakypeet14:12:11

or even (use 'clj-http.client)

sneakypeet14:12:49

so I am not sure if I should require it differently somehow

martinklepsch14:12:14

that looks fine. How are you starting the repl session?

sneakypeet14:12:22

I basically followed the advanced atom setup suggested by the author, and then just call Proto Repl: Toggle

martinklepsch14:12:38

I see. Unfortunately I'm not sure if Proto Repl makes use of the information in your project.clj ā€” you could try starting a repl with lein repl and then connecting to it via proto repl

martinklepsch14:12:04

I think there is a "Proto Repl: Connect" thing or similar that you should find via the command palette @sneakypeet

sneakypeet14:12:42

ok cool will give that a try. #learnallthethings

sneakypeet14:12:19

ok stumbled on it. proto repl will load your lein deps if you run toggle. you can just refer them as usual. this was not working as I had a compiler error in my core.clj file

martinklepsch14:12:44

@sneakypeet cool. How did you figure out there was an error?

sneakypeet14:12:15

it spat out the error when I restarted the repl

martinklepsch14:12:13

Cool šŸ‘ Hope you didn't get sidetracked too much šŸ™‚

sneakypeet14:12:33

I feel like a snail at this point šŸ˜„

martinklepsch14:12:06

The joy of learning new things haah

sneakypeet14:12:23

indeed. but enjoying it at least

martinklepsch14:12:54

That's the most important thing. What's your background and what makes you play with Clojure if I may ask?

sneakypeet15:12:10

typical OO journey. .net/c# and js web dev. stumbled upon f# and elm and something just clicked. did some functional js for a while but decided I wanted functional features as first class citizens (immutable data etc). someone pointed to clojure and I finally have time for a deep dive

sneakypeet15:12:16

there is more to the journey but that is best left to discuss over beers šŸ˜„

dorianc.b17:12:08

for some reason Iā€™m getting an unable to resolve symbol defn error with proto-repl

dorianc.b17:12:59

nvm I just connected it to a local repl and it worked

dorianc.b17:12:41

is there anyway to clear inline results?

jasongilman17:12:42

@dorianc.b: you can clear individual results with esc. There's a keybinding to clear all of them in an open file. See the very last command on the Proto REPL readme.

jasongilman21:12:26

I just published a new version of the proto-repl-sayid Atom plugin and the Clojure library.

jasongilman21:12:11

Unfortunately due to some shenanigans on my part I had to recreate the Atom package if you were trying it out. You may need to uninstall and reinstall it to get the latest version.

jasongilman21:12:19

Actually, Atom devs just said you probably won't have to reinstall it so all should be good.

seancorfield21:12:50

@jasongilman I noticed that for ProtoREPL on Windows I was getting warnings that compliment couldnā€™t be found but I wasnā€™t getting those on macOS. I added compliment as an explicit dependency to my project (when starting a REPL) and now I see much better autocompletion with inline documentation of functions etc. Any idea why a) I didnā€™t get the warnings on macOS and b) why I needed to add compliment manually as a dependency?

jasongilman21:12:06

@seancorfield: I would make sure that compliment was getting included transitively through the Proto REPL lib dependency.

seancorfield21:12:22

Duh! That would actually be my problemā€¦ I followed the ā€œopinionatedā€ setup guide and it doesnā€™t mention adding proto-repl as a Clojure dependency ā€” I see someone noted that in a comment on the Gist!

seancorfield21:12:54

I hadnā€™t noticed that dependency on the setup before. I wonder what else Iā€™m missing out on? šŸ™‚

jasongilman21:12:21

Oh if you're missing that the save and display values won't work.

jasongilman21:12:57

There's a demo project with a list of demos. If you can do all of them or everything in my presentation you're not missing out on anything.

seancorfield21:12:17

Thanks. Iā€™ll take a look at that and see what new features I will have just enabled šŸ˜† And I was already enjoying it before I added the library!