This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-06
Channels
- # admin-announcements (1)
- # alda (2)
- # beginners (5)
- # boot (59)
- # clara (6)
- # cljs-dev (40)
- # cljsrn (32)
- # clojure (28)
- # clojure-austin (1)
- # clojure-belgium (67)
- # clojure-greece (60)
- # clojure-ireland (1)
- # clojure-japan (1)
- # clojure-russia (55)
- # clojure-spain (14)
- # clojure-spec (39)
- # clojure-uk (26)
- # clojurescript (152)
- # clojurewerkz (1)
- # cursive (21)
- # datomic (3)
- # dirac (15)
- # emacs (7)
- # events (2)
- # funcool (4)
- # hoplon (43)
- # immutant (1)
- # lambdaisland (1)
- # lein-figwheel (6)
- # leiningen (1)
- # off-topic (1)
- # om (23)
- # onyx (67)
- # other-languages (6)
- # pedestal (7)
- # planck (13)
- # proton (3)
- # protorepl (2)
- # re-frame (6)
- # reagent (5)
- # ring-swagger (6)
- # spacemacs (1)
- # specter (2)
- # yada (27)
hey guys, would you be possible to run boot using https://github.com/ninjudd/drip ?
I know that boot.sh has some crazy way to include the jar file
but can i use just boot.jar
I guess the answer is yes, I will try to investigate
first time:
time drip -cp ~/bin/clj/boot.jar boot.App
real 0m7.177s
user 0m15.919s
sys 0m0.485s
second time:
real 0m2.800s
user 0m0.055s
sys 0m0.039s
so it is faster!
I guess there is a way to use the executable with drip automatically, maybe BOOT_JAVA_COMMAND
?
all of the time is spent compiling and running clojure code that doesn't exist when the jvm starts
i'd be interested to see what it is about your setup that can make boot faster with drip
in that case no I wasn't, I am trying now, but if you say that, probably it is not going to make a difference ...
so is it a script with drip -cp .... enough for bootstrapping boot or I need the same preamble as in the boot
of the README?
@richiardiandrea: that seems like it should work
ok I will
thanks Micha
Ok starting my tests with:
#!/bin/bash
declare -a "options=($BOOT_JVM_OPTIONS)"
self="${BASH_SOURCE[0]}"
selfdir="$(cd "$(dirname "${self}")" ; pwd)"
selfpath="$selfdir/$(basename "$self")"
drip -cp bin/clj/boot.jar "${options[@]}" -Dboot.app.path="$selfpath" boot.App "$@"
yes there is something in their README
> Drip passes all environment variables exported at runtime to the JVM and merges them into the map returned by System.getenv. Keep in mind that the environment isn't modified until we connect to the JVM; during initialization, the environment will be derived from the previous process that launched the spare JVM.
it feels a little bit more responsive on start but I cannot measure, the "execution" time still dominates
after a rm -Rf .drip
it slows down a bit, but my "ad-random" count is in the order of 500ms so...not very noticeable
when doing a boot script defclifn
, is there a way to get the last argument ?
like so: ./myscript --named-arg "ok" last-catchall-arg
? It is not bound into *opts*
@nha:
boot.user=> (cli/defclifn x [] (prn :args *args*))
#'boot.user/x
boot.user=> (x "1" "2" "3")
:args ["1" "2" "3"]
we can't support that for boot tasks because how would boot distinguish between catchall arguments and task names for the next task?
boot.user=> (cli/defclifn x [d doop bool "the doop"] (prn :opts *opts* :args *args*))
#'boot.user/x
boot.user=> (x "1" "2" "3")
:opts {} :args ["1" "2" "3"]
nil
boot.user=> (x "-d" "1" "2" "3")
:opts {:doop true} :args ("1" "2" "3")
nil
Additional question: are out-of-order args meant to be supported ?
Like: ./my-script.clj --bool "lastarg"
gives an *opts
of {:all true}
./my-script.clj "lastarg" --bool
gives an *opts
of {}
no, that's not really something that can be supported if defclifn is used as the basis for deftask