This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-30
Channels
- # adventofcode (7)
- # announcements (9)
- # babashka (20)
- # beginners (182)
- # calva (9)
- # cider (20)
- # circleci (3)
- # clj-kondo (1)
- # clojure (269)
- # clojure-europe (2)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (50)
- # clojurescript (56)
- # code-reviews (3)
- # core-async (174)
- # datomic (4)
- # duct (1)
- # emacs (3)
- # events (1)
- # fulcro (31)
- # graalvm (10)
- # graphql (8)
- # jobs (1)
- # joker (11)
- # juxt (7)
- # luminus (2)
- # malli (4)
- # off-topic (2)
- # overtone (1)
- # pathom (2)
- # re-frame (24)
- # shadow-cljs (42)
- # sql (1)
- # tools-deps (10)
it seems useful for babashka to be able to do this, so we can maybe hack a special case for reify
and this class together... not sure, have to think about it
I guess there are also other ways of filtering files? like with normal clojure functions?
$ bb '(shell/with-sh-env {:FOO "BAR"} (shell/sh "bash" "-c" "echo $FOO"))'
{:exit 0, :out "BAR\n", :err ""}
$ BABASHKA_CLASSPATH=. bb --repl
Babashka v0.0.56-SNAPSHOT REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.
user=> (io/resource "deps.edn")
#object[.URL 0x61932785 "file:/Users/borkdude/Dropbox/dev/clojure/carve/deps.edn"]
The order of the arguments is indicated by:
Usage: bb [ -i | -I ] [ -o | -O ] [ --stream ] [--verbose]
[ ( --classpath | -cp ) <cp> ] [ ( --main | -m ) <main-namespace> ]
( -e <expression> | -f <file> | --repl | --socket-repl [<host>:]<port> )
[ --uberscript <file> ] [ arg* ]
@borkdude Out of curiousity, what was the reason you didn't use tools.cli for the parsing of opts? https://github.com/borkdude/babashka/blob/9bdaafbca977c5f283976313024b4abda0d725f3/src/babashka/main.clj#L37
Thanks. Yes can imagine. Although tools.cli is somewhat low level and without side effects, it still has made some decisions for you
Made a thing to cut out the unused vars from a project:
https://github.com/borkdude/carve
Unleashing this on a script produced with --uberscript
will make it even smaller.