Re: lein repl and own functions

2016-07-15 Thread Gary Fredericks
I use lein-shorthand , which makes arbitrary functions available to me in any project (or no project) and namespace. Gary On Thursday, July 14, 2016 at 8:53:03 AM UTC-5, Cecil Westerhof wrote: > > When I first worked with Clojure I used a Bash script

Re: lein repl and own functions

2016-07-14 Thread Gregg Reynolds
you could also look into boot. nothing says you have to use leiningen. On Jul 14, 2016 1:13 PM, "Cecil Westerhof" wrote: > 2016-07-14 20:06 GMT+02:00 Timothy Baldridge : > >> There probably is, since the user.clj file can exist anywhere on the >> classpath. So it should be possible to add an en

Re: lein repl and own functions

2016-07-14 Thread Gary Trakhman
One way to abuse lein repl, which may get you what you want for a loose 'lein repl' but is sure to cause some problem down the line is to add a project.clj in your home directory. When you call `lein repl` it'll recurse from current working directory through parent dirs until it finds a project.clj

Re: lein repl and own functions

2016-07-14 Thread Ryan Fowler
you might find success with putting some injections in your ~/.lein/profiles.clj file. {:user {:injections [(defn foo[] (println "foo"))]}} On Thu, Jul 14, 2016 at 1:13 PM, Cecil Westerhof wrote: > 2016-07-14 20:06 GMT+02:00 Timothy Baldridge : > >> There probably is, since the user.clj file c

Re: lein repl and own functions

2016-07-14 Thread Cecil Westerhof
2016-07-14 20:06 GMT+02:00 Timothy Baldridge : > There probably is, since the user.clj file can exist anywhere on the > classpath. So it should be possible to add an entry to profile.clj and add > a classpath folder to some global location. > > However, I'm not sure I would recommend this approach

Re: lein repl and own functions

2016-07-14 Thread Timothy Baldridge
There probably is, since the user.clj file can exist anywhere on the classpath. So it should be possible to add an entry to profile.clj and add a classpath folder to some global location. However, I'm not sure I would recommend this approach. IMO, it's better to keep all the development tools for

Re: lein repl and own functions

2016-07-14 Thread Cecil Westerhof
2016-07-14 18:18 GMT+02:00 Timothy Baldridge : > Anything found in src/user.clj will be automatically loaded when lein repl > starts. > ​That works only for that directory. With my Bash script the functions where always included. Is there no way to do it always?​ > On Thu, Jul 14, 2016 at 7:52

Re: lein repl and own functions

2016-07-14 Thread Timothy Baldridge
Anything found in src/user.clj will be automatically loaded when lein repl starts. On Thu, Jul 14, 2016 at 7:52 AM, Cecil Westerhof wrote: > When I first worked with Clojure I used a Bash script with had: > rlwrap java -cp "${CP}" clojure.main --init "${CLOJURE_INIT}" --repl > > In this way

lein repl and own functions

2016-07-14 Thread Cecil Westerhof
When I first worked with Clojure I used a Bash script with had: rlwrap java -cp "${CP}" clojure.main --init "${CLOJURE_INIT}" --repl In this way I had several of my own functions in the REPL. Now I started again with Clojure I understood I should use ‘lein repl’. Is there a method to get my ow