protorepl

sneakypeet 2016-12-29T13:56:40.000378Z

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

martinklepsch 2016-12-29T14:01:43.000380Z

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

martinklepsch 2016-12-29T14:02:11.000381Z

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

sneakypeet 2016-12-29T14:03:01.000382Z

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

sneakypeet 2016-12-29T14:03:19.000383Z

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

martinklepsch 2016-12-29T14:05:05.000384Z

@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)

martinklepsch 2016-12-29T14:05:17.000385Z

(I'm not even sure myself, heh)

sneakypeet 2016-12-29T14:06:09.000386Z

So I want to try out clj-http

sneakypeet 2016-12-29T14:06:42.000387Z

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

sneakypeet 2016-12-29T14:06:57.000388Z

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

sneakypeet 2016-12-29T14:07:11.000389Z

or even (use 'clj-http.client)

sneakypeet 2016-12-29T14:07:49.000391Z

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

martinklepsch 2016-12-29T14:08:14.000392Z

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

sneakypeet 2016-12-29T14:09:22.000393Z

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

martinklepsch 2016-12-29T14:22:38.000394Z

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

martinklepsch 2016-12-29T14:23:04.000395Z

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

sneakypeet 2016-12-29T14:23:42.000396Z

ok cool will give that a try. #learnallthethings

sneakypeet 2016-12-29T14:28:19.000397Z

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

martinklepsch 2016-12-29T14:29:44.000398Z

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

sneakypeet 2016-12-29T14:30:15.000399Z

it spat out the error when I restarted the repl

martinklepsch 2016-12-29T14:35:13.000400Z

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

sneakypeet 2016-12-29T14:35:33.000401Z

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

martinklepsch 2016-12-29T14:49:06.000402Z

The joy of learning new things haah

sneakypeet 2016-12-29T14:49:23.000403Z

indeed. but enjoying it at least

martinklepsch 2016-12-29T14:56:54.000404Z

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

sneakypeet 2016-12-29T15:00:10.000405Z

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

sneakypeet 2016-12-29T15:02:16.000407Z

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

dorianc.b 2016-12-29T17:13:08.000408Z

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

dorianc.b 2016-12-29T17:15:59.000409Z

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

dorianc.b 2016-12-29T17:16:41.000410Z

is there anyway to clear inline results?

jasongilman 2016-12-29T17:32:42.000411Z

@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.

jasongilman 2016-12-29T21:05:26.000412Z

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

jasongilman 2016-12-29T21:06:11.000413Z

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.

jasongilman 2016-12-29T21:06:18.000414Z

https://atom.io/packages/proto-repl-sayid

jasongilman 2016-12-29T21:06:33.000416Z

https://clojars.org/proto-repl-sayid

jasongilman 2016-12-29T21:07:19.000418Z

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

seancorfield 2016-12-29T21:18:50.000419Z

@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?

jasongilman 2016-12-29T21:33:06.000420Z

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

seancorfield 2016-12-29T21:44:22.000421Z

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!

seancorfield 2016-12-29T21:44:54.000422Z

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

jasongilman 2016-12-29T21:45:21.000423Z

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

jasongilman 2016-12-29T21:45:57.000424Z

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.

seancorfield 2016-12-29T21:50:17.000425Z

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!