Fork me on GitHub
#babashka
<
2024-07-02
>
M3tti13:07:08

Anyone used zeromq with babashka? Are there libs? I just found https://github.com/zeromq/cljzmq which doesn't have deps.edn so i guess thats needed to get it running

Bob B13:07:33

If the library can be pulled from clojars, it doesn't need to be a deps.edn-based project. With that said, if that library relies on java classes from a java library that isn't built in, it probably won't work with babashka (I don't know that library well enough to say one way or the other).

borkdude14:07:42

(:import
   [org.zeromq ZContext ZMQ$Socket])

M3tti15:07:21

Is that jeromq? @U04V15CAJ

borkdude15:07:01

I don't know, I just looked at the source of what you linked and this indicates that it won't work

frozenlock20:07:16

I'm having some issues loading a library. If the error message is " ^--- Could not locate dresser/base.bb, dresser/base.clj or dresser/base.cljc on classpath.", does it mean that it really cannot locate it, or could it be that the library is using something it cannot parse/use ?

Bob B20:07:51

I'd say it probably can't find the file

✔️ 1
frozenlock21:07:44

I'm testing the library in question and it does run correctly with bb. Looks like it's indeed unable to locate it. :thinking_face:

borkdude21:07:22

@U0ERZQ1K2 what have you done to make bb find the file? added it to bb.edn :deps?

frozenlock21:07:31

I've yet to successfully make it find the file. I tried the following in bb.edn:

{...
:deps {...
       org.clojars.frozenlock/dresser {:local/root "/home/frozenlock/clojure/dresser/dresser-core"}}}

{...
 :deps {...
        org.clojars.frozenlock/dresser {:mvn/version "0.1.0-SNAPSHOT"}}}

borkdude21:07:40

you'll need to add a deps.edn file to this directory, else it won't be recognized as a libary: https://github.com/Frozenlock/dresser/tree/master/dresser-core

frozenlock21:07:52

Yes I've got a slightly more up to date version locally.

frozenlock21:07:06

Oh, that explains it then!

frozenlock21:07:22

Am I correct in deducing that it's not using the same data that Clojure on the jvm is using?

borkdude21:07:54

I think you might be assuming that bb does something with project.clj but that is not the case.

borkdude21:07:21

project.clj is only recognized by leiningen, not even the clojure CLI does something with project.clj, only deps.edn

frozenlock21:07:22

Or with pom.xml (IIRC)

borkdude21:07:40

yeah or pom.xml

borkdude21:07:31

the maven dep might have worked, but since it's a snapshot version, it's not entirely predictable what you have locally since snapshots aren't always updated locally, unless you use -Sforce or so

borkdude21:07:09

gotta go now

frozenlock21:07:20

Alright, thanks for the help!

frozenlock22:07:31

I must say, BB starts FAST!

frozenlock22:07:54

And it already works with CIDER ❤️

cider 5