This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-08
Channels
- # announcements (11)
- # babashka (13)
- # beginners (11)
- # biff (2)
- # calva (17)
- # cider (19)
- # clojure (60)
- # clojure-berlin (1)
- # clojure-dev (20)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (98)
- # clojure-spec (7)
- # clojure-uk (5)
- # core-typed (29)
- # cursive (13)
- # datomic (12)
- # dev-tooling (5)
- # emacs (7)
- # figwheel-main (2)
- # graalvm (4)
- # hyperfiddle (4)
- # introduce-yourself (1)
- # malli (14)
- # missionary (32)
- # off-topic (7)
- # overtone (4)
- # pedestal (10)
- # proletarian (4)
- # re-frame (8)
- # releases (11)
- # tools-build (1)
- # tools-deps (4)
- # xtdb (38)
I'm trying to make a babashka script executable from anywhere on my system. I'm having difficulty because the classpath isn't being found when I call it not in the directory of the project root. I get an error like this:
❯ r.bb 4d8
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: Could not find namespace: dice-roller.roller.
Location: /home/jcd/Projects/dice-roller/r.bb:4:3
----- Context ------------------------------------------------------------------
1: #!/usr/bin/env bb
2:
3: (ns r
4: (:require
^--- Could not find namespace: dice-roller.roller.
5: [dice-roller.roller :as r]
6: ))
7:
8: (prn (r/roll-dice-command (apply str *command-line-args*)))
----- Stack trace --------------------------------------------------------------
r - /home/jcd/Projects/dice-roller/r.bb:4:3
I suspect there is something silly I am doing wrong. Both the deps.edn
and the bb.edn
have :paths ["src"]
declared, which works when I invoke the script from /home/jcd/Projects/dice-roller/
. Any suggestions?@borkdude Is it possible to create compiled binaries against Babashka? I don't just want a script that I can run against bb, I want an executable with everything baked into it. Preferably one that runs across different platforms and OS's
you can't make an executable that runs in all OSes, you have to make one for each OS, but you can easily do so from just 1 linux box and downloading the binaries for different OSes on that + the above method
I’ve got a bunch of text documents with content structured as jsons that I want to compile into some cleaner asciidoctor files, which I can then epub/pdf. Seems like a perfect babashka task. The text does include some inline formatting inside the strings inside the json’s contents, things like ["<b>Bolded text</b> and some unbolded text <i>and some italicized text</i>.", "Other content etc."]
.
I’d need to then replace these as two paragraphs in a new document, like:
*Bolded text* and some unbolded text _and some italicized text_.
Other content etc.
Suggestions for if I should go with regexp to replace tags, or some kind of conversion via hiccup/hickory and then back out to a joined string?If it's just a case of converting all tags to markdown, then a regex on the json will be adequate. I'd consider parsing the strings if things get trickier than that, e.g. if you only want to convert tags nested within a particular element, across multiple lines.
Hi everyone. Hope you're all doing great!
I'm trying to setup a new project with a tools deps and babashka. I can be terribly wrong, but I remember seeing some sort of bb.edn
config in which I could specify where my deps.edn
file is and tell it to use an specific alias
to get :paths
and :deps
from it.
I've searched all over the babashka book, but I didn't find any reference to it 😓 Does anyone know if it's possible? Thank you in advance 🙂
You can use :local/root
but this doesn't support aliases (ask in #C6QH853H8 to support that)
Thank you 🙂