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
@sneakypeet dependency as in require a namespace or load a jar?
@sneakypeet also check #beginners if you run into things that are not strictly protorepl related
:thumbsup: sorry realized I should have asked their after I hit enter.
will go ask there as it might benefit others š
@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)
(I'm not even sure myself, heh)
So I want to try out clj-http
lein has downloaded the dependency, but I get file not found exception
when I try with (require '[clj-http.client :as http])
or even (use 'clj-http.client)
so I am not sure if I should require it differently somehow
that looks fine. How are you starting the repl session?
I basically followed the advanced atom setup suggested by the author, and then just call Proto Repl: Toggle
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
I think there is a "Proto Repl: Connect" thing or similar that you should find via the command palette @sneakypeet
ok cool will give that a try. #learnallthethings
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
@sneakypeet cool. How did you figure out there was an error?
it spat out the error when I restarted the repl
Cool š Hope you didn't get sidetracked too much š
I feel like a snail at this point š
The joy of learning new things haah
indeed. but enjoying it at least
That's the most important thing. What's your background and what makes you play with Clojure if I may ask?
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
there is more to the journey but that is best left to discuss over beers š
for some reason Iām getting an unable to resolve symbol defn error with proto-repl
nvm I just connected it to a local repl and it worked
is there anyway to clear inline results?
@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.
I just published a new version of the proto-repl-sayid Atom plugin and the Clojure library.
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.
Actually, Atom devs just said you probably won't have to reinstall it so all should be good.
@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?
@seancorfield: I would make sure that compliment was getting included transitively through the Proto REPL lib dependency.
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!
I hadnāt noticed that dependency on the setup before. I wonder what else Iām missing out on? š
Oh if you're missing that the save and display values won't work.
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.
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!