This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-03
Channels
- # aleph (3)
- # announcements (2)
- # babashka (24)
- # beginners (71)
- # biff (5)
- # calva (19)
- # cider (7)
- # clj-kondo (15)
- # cljdoc (3)
- # clojure (76)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-denver (24)
- # clojure-europe (56)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (37)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (6)
- # clojurescript (2)
- # cursive (2)
- # datalevin (71)
- # datomic (9)
- # dev-tooling (5)
- # emacs (19)
- # events (1)
- # gratitude (1)
- # hoplon (6)
- # introduce-yourself (5)
- # jobs (1)
- # juxt (2)
- # lsp (23)
- # nbb (26)
- # off-topic (12)
- # other-languages (97)
- # practicalli (2)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (24)
- # tools-deps (17)
- # vim (2)
Sorry for a dumb question: I want to zip a directory and it just takes a relative file - how do I change the cwd when using fs?
Thanks :path-fn worked. Would be good to have a second parameter so that the function knew the part of the path you want to remove. Just a nice to have.
when you provide :root
it will strip away everything up to the root directory:
https://github.com/babashka/fs/blob/c5c5365585efa44a6c4e8ca91bd84d9adc631a02/src/babashka/fs.cljc#L1003-L1004
This might also be a dumb question 🙂 If I create code that's valid for both babashka and regular JVM Clojure (don't know if I'm even phrasing that right), except for like, the entrypoint for each, am I just a properly set up bb.edn file and project.clj/deps.edn file away from being "cross-platform"?
I think so yes, but you need to include whichever bb-libraries you are using (process, fs, cheshire, ..) in your deps.clj, as these will not be available when you run with clojure/clj otherwise
you can use one deps.edn for both. you can refer to the deps.edn from a bb.edn using {:deps {my.project {:local/root "."}}}
Even smarter!
Very nice 🙂
Cheers! I'll have to fiddle with this. I guess the bb.edn
file can refer to the file containing ns that has the the bb entrypoint (that does like command line flag parsing and associated logic), which could be in some unusual place (like outside /src
), which the deps.edn
file could then safely ignore.
I was thinking of exactly something like that 😅 Cheers both! @U0422G22932 @U04V15CAJ
I built a tiny lib that I was thinking I could run both as a bb program on the command line and as a regular old Clojure lib in a regular old, slow Clojure repl.
Yes, sorry 😓
Not a high priority or anything but I'm curious about the status of the websocket client for https://github.com/babashka/http-client? I've been using the websocket branch successfully for a while now on projects where I need a websocket client. Do you still eventually plan to merge that into the main branch?