This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-04
Channels
- # aleph (1)
- # asami (6)
- # babashka (44)
- # beginners (20)
- # calva (6)
- # circleci (1)
- # clj-kondo (2)
- # cljdoc (2)
- # clojure (184)
- # clojure-europe (13)
- # clojure-nl (4)
- # clojure-spain (1)
- # clojure-uk (4)
- # clojurescript (35)
- # code-reviews (1)
- # conjure (3)
- # core-async (60)
- # core-logic (1)
- # cursive (11)
- # data-science (2)
- # events (11)
- # graalvm (4)
- # graphql (2)
- # introduce-yourself (1)
- # jobs (2)
- # leiningen (3)
- # malli (16)
- # minecraft (6)
- # practicalli (1)
- # reagent (3)
- # reitit (1)
- # releases (3)
- # remote-jobs (2)
- # rewrite-clj (21)
- # shadow-cljs (12)
- # tools-deps (21)
- # vim (16)
I am having issues working with files relative to a bb project. I want to save files to a subfolder in the bb project, eg resources/report.csv
However,
(spit (str "resources/report.csv") "test") results in:
java.io.FileNotFoundException: resources/report.csv (No such file or directory)
I have defined the following in bb.edn :paths ["script" "resources"]
I am certainly missing something simple ..Does is suppose to work even if the bb repl is started in another folder, ie not the current bb project root?
this it's relative to the folder where the REPL has been started, not path defined in bb.edn? This part is a bit confusing
how can I force bb to write to "resources" dir even if the repl is started in another dir? (eg /mac/bbproj1/resources/report.cvs
when the repl is started in /mac/awsproject
I am sometimes working on several bb projects and re-evaluating them all in the repl is a chore
which defaults to the current working directory, but you can alter that in your REPL and use that atom in spit
I've been using (fs/absolutize ..) to achive this but ../bbproj1/resources
is more universal
Babashka made Thoughtworks Tech Radar! https://www.thoughtworks.com/radar/platforms/babashka
I'm also offering enterprise support/consulting for those that need an extra level of support around my projects (or related work). https://blog.michielborkent.nl/oss-highlights-nov-dec-2021.html#enterprise-support Sponsors get a discount on the hourly rate.
Hi all, can bb tasks pull dependencies from deps.edn ? is that a workflow that can work or would be encouraged / discouraged ?
@dviramontes yes, it can. Just put {:deps {current/deps {:local/root "."}}}
in your bb.edn
Is it possible to specify an alias, only to reference the deps of, for example, the :dev alias
This is currently not yet supported in bb.edn
but you can do it programmatically with:
(babashka.deps/add-deps (clojure.edn/read-string (slurp "deps.edn")) {:aliases [:dev]})
Anyone tried nbb and exceljs. I.e using nbb to read and write to an excel file? https://github.com/exceljs/exceljs#create-a-workbook
I've tried the following without success
(ns excel
(:require ["exceljs" :as j :refer [Excel.Workbook]]
["exceljs/Excel$Workbook" :as xl]))
(Excel.Workbook.) => Could not resolve symbol ...
(j/ExcelJS.Workbook.) => Could not find static method ExcelJS.Workbook.
(xl) => Could not resolve symbol ...