This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-12
Channels
- # adventofcode (2)
- # aleph (2)
- # announcements (5)
- # aws (5)
- # babashka (25)
- # beginners (167)
- # calva (8)
- # cider (1)
- # clj-kondo (3)
- # cljsrn (19)
- # clojure (87)
- # clojure-conj (7)
- # clojure-dev (19)
- # clojure-europe (1)
- # clojure-italy (14)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-spec (18)
- # clojure-uk (29)
- # clojuredesign-podcast (3)
- # clojurescript (40)
- # clojurex (11)
- # core-async (13)
- # core-logic (2)
- # cursive (16)
- # data-science (4)
- # datascript (10)
- # datomic (53)
- # emacs (1)
- # events (15)
- # fulcro (71)
- # jobs (1)
- # jvm (2)
- # malli (4)
- # nrepl (2)
- # pathom (74)
- # re-frame (1)
- # reitit (19)
- # remote-jobs (1)
- # rewrite-clj (18)
- # ring (2)
- # shadow-cljs (132)
- # spacemacs (22)
- # tools-deps (65)
Hello! I see file-seq
isn't supported, right?
apparently not, but I don't see why not. if you like you can make a PR, or I'll do it
it should go here: https://github.com/borkdude/babashka/blob/master/src/babashka/impl/clojure/core.clj#L24
I'll have a look.
Btw I need to replace a string in a file. I guess the simplest way is to just call sed from babashka (I don't want to read the whole file in memory, and the string is in the first few lines)
https://1675-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.27-SNAPSHOT-macos-amd64.zip
$ bb '(map #(.getPath %) (file-seq (io/file "src")))' | bb '(take 3 *in*)'
("src" "src/babashka" "src/babashka/impl")
FYI I am trying to run a file / send a defn
to bb socket repl and I get not very useful
java.lang.IllegalArgumentException: "Don't know how to create ISeq from: clojure.lang.Symbol"
...
in clojure.core/second--5392 (core.clj:96)
in sci.impl.analyzer/expand-fn-args+body (analyzer.cljc:88)
...
Now I send a defn to the REPL so I know which part of the file caused it, when I run the whole file with bb -f ...
then I had no indication of the location. If possible, it would be very helpful to get better error message and with location in the source file.normally it tries to also include the location, but there might be places where it slips through
This is BTW the code that fails, because I unfortunately shadow fn
but SCI doesn't get that:
(defn i-fail [fn] (fn 123))
I fixed a similar thing before once:
$ bb '(defn foo [defmacro] defmacro) (foo 1)'
1
I wonder why fn
is treated specially here, but I'll find outThanks to you for the great work!!!