This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-24
Channels
- # announcements (31)
- # babashka (21)
- # babashka-sci-dev (4)
- # beginners (8)
- # cherry (4)
- # cider (32)
- # clj-kondo (15)
- # cljdoc (4)
- # cljsrn (4)
- # clojure (69)
- # clojure-dev (1)
- # clojure-europe (12)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (4)
- # clojurescript (16)
- # clr (6)
- # conjure (4)
- # fulcro (4)
- # hispano (1)
- # honeysql (1)
- # humbleui (5)
- # hyperfiddle (8)
- # lambdaisland (4)
- # lsp (8)
- # malli (24)
- # off-topic (3)
- # polylith (5)
- # reagent (10)
- # remote-jobs (3)
- # rewrite-clj (7)
- # scittle (12)
- # spacemacs (4)
- # sql (2)
- # tools-deps (29)
- # xtdb (7)
practically speaking, what’s the difference between declaring
[edit: I misunderstood that the same code can trivially be loaded in either place, confusing :pods {babashka/fs …}
vs the same decl in :deps
? AFAICT the pods directive is broader, allowing non-clojure, proto-following things, but for plain-ole clojure pods, are there other differences?fs
and fswatcher
when scanning]
Hi, have encountered a bit of an issue with transitive pods. I have two local projects. The first depends on a pod (sqlite-3) which I require in the 'new' way by specifying in under the :pods
key of bb.edn
and then requiring in my ns. So far so good. The second project has the first as a dependency. When in the second project, I require the ns from the first that uses the (sqlite) pod, I encounter an error message about pod not loaded.
If I then go back to the first project and specify the pod the 'old' way, by requiring pods, then explicitly loading the pod then requiring it, and jack in again to my second project, I can require the njust fine.
Is this an issue? happy to raise it.. or is it known?
@U121T48Q6 For transitive usage of the pod, declaring it in bb.edn doesn't work. Just use load-pod manually in libraries
I did this in https://github.com/clj-kondo/clj-kondo-bb for example too
There is an issue for this to improve this for dependencies, but it isn't quite there yet
For now I think building a library around a pod, like I did with clj-kondo-bb is the least worst option
What's the purpose of the deps.edn
with just {} in it? Is this so that it can be resolved as a dependency by clojure
?
@U04V15CAJ Is this:point_down::skin-tone-2: called out in the Babashka book?
What's the purpose of the deps.edn with just {} in it? Is this so that it can be resolved as a dependency by clojure?
I would like to understand how works pods. The example project works fine. But at my case.. not really 🙂
#!/usr/bin/env python3
import sys
import imageio
def main(sourcefile, targetfile):
img = imageio.imread(sourcefile)
imageio.imwrite(targetfile, img)
return "success"
if __name__ == "__main__":
if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} <sourcefile> <targetfile>")
sys.exit(1)
sourcefile = sys.argv[1]
targetfile = sys.argv[2]
result = main(sourcefile, targetfile)
print(result)
Error message
./ico-creator.clj -debug
----- Error --------------------------------------------------------------------
Type: java.io.EOFException
Message: Invalid netstring. Less data available than expected.
Location: /Users/..path../ico-creator/./ico-creator.clj:5:1
----- Context ------------------------------------------------------------------
1: #!/usr/bin/env bb
2:
3: (require '[babashka.pods :as pods])
4:
5: (pods/load-pod ["./pod-ico.py"])
^--- Invalid netstring. Less data available than expected.
What is the problem? (lispclouds sqlite example run correct way).. maybe the 2 params at main?
@U2T2ZEVPC how is your program supposed to be invokable as a pod? the pod must implement a protocol which means it sends specific messages back and forth via stdin/stdout
@U04V15CAJ thanks! I don’t understand that before this. So stdin/stdout. I test it.