This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-13
Channels
- # aleph (7)
- # announcements (3)
- # babashka (29)
- # beginners (70)
- # calva (5)
- # cider (14)
- # clara (3)
- # clj-kondo (25)
- # cljs-dev (2)
- # clojure (237)
- # clojure-conj (3)
- # clojure-europe (6)
- # clojure-italy (14)
- # clojure-nl (4)
- # clojure-uk (40)
- # clojurescript (29)
- # clojurex (1)
- # code-reviews (2)
- # cursive (3)
- # datascript (1)
- # fulcro (11)
- # graalvm (4)
- # graphql (12)
- # jackdaw (1)
- # jobs (1)
- # joker (22)
- # london-clojurians (1)
- # off-topic (132)
- # re-frame (38)
- # rewrite-clj (11)
- # shadow-cljs (200)
- # spacemacs (1)
- # sql (67)
- # tools-deps (15)
@borkdude It would be great to have java.util.regex.Pattern/quote available in bb
And clojure.core/escape
@holyjak Sure. Can you make an issue for those, preferably with an example of how to use them in bb
@holyjak Issue with macro-named binding should be solved on master: https://1678-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.27-SNAPSHOT-macos-amd64.zip
$ ./bb '(defn f [fn] (fn)) (f #(inc 2))'
3
Yes I can now use fn
as an argument name. Thank you!
Can you give this a spin? If everything's working as expected, I'll look at the other issues
@holyjak clojure.string/escape
is already supported:
$ bb '(clojure.string/escape "hello!" {\! "!!!"})'
"hello!!!"
Ah,ok ,then I did something wrong when I tried to use it
Probably :)
Is it possible to support clojure.walk/postwalk
and clojure.walk/prewalk
? I use it a lot in normal clojure code
I'm curious if it was a technical decision or just not implemented yet
(I would be happy to do a pull request once I miss it in practise)
cool, good to hear 🙂
I could do it myself, it's relatively simple, but I appreciate PRs, so more people find their way around the code
makes sense!
As a pointer, here is how the clojure.data.csv namespace is added: https://github.com/borkdude/babashka/blob/master/src/babashka/impl/csv.clj
ah ok, looks simple. Let me or someone else try it 🙂
@holyjak https://1683-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.27-SNAPSHOT-macos-amd64.zip
$ ./bb '(def should-be-true false) (assert should-be-true)'
Assert failed: should-be-true
Also introduced a --verbose
option which will print the entire stacktrace like before
@holyjak The entire java.util.regex.Pattern
class is usable from babashka now:
https://1689-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.27-SNAPSHOT-macos-amd64.zip
e.g.:
$ ./bb "(vec (.split (java.util.regex.Pattern/compile \"f\") \"gfgfg\"))"
["g" "g" "g"]