This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-08
Channels
- # adventofcode (49)
- # babashka (21)
- # babashka-sci-dev (12)
- # beginners (250)
- # calva (23)
- # cider (6)
- # clj-kondo (11)
- # cljsrn (8)
- # clojure (129)
- # clojure-europe (50)
- # clojure-france (8)
- # clojure-italy (6)
- # clojure-nl (14)
- # clojure-romania (7)
- # clojure-spec (21)
- # clojure-uk (3)
- # clojurescript (17)
- # conjure (1)
- # core-async (40)
- # core-logic (24)
- # core-typed (7)
- # datavis (2)
- # datomic (2)
- # emacs (29)
- # fulcro (10)
- # graalvm (6)
- # graphql (24)
- # gratitude (6)
- # jobs (1)
- # lsp (9)
- # malli (6)
- # missionary (1)
- # nextjournal (46)
- # off-topic (2)
- # other-languages (3)
- # pathom (5)
- # portal (2)
- # re-frame (37)
- # remote-jobs (1)
- # shadow-cljs (15)
- # spacemacs (9)
- # testing (6)
- # tools-deps (13)
- # vim (32)
- # xtdb (16)
Good morning, I sometimes have this problem with my nrepl session where I execute a form and then it doesn't return. In this case it's (-> @(p/process ["git" "log" "--numstat" "--pretty=format:'[%h] %an %ad %s'" "--date=short"]) :out slurp)
, where p
is babashka.process
.
@gerome.bochmann Does that process have long output as in, pages long?
In this case it's better to use :out :string
since the way you're doing it now it fills a buffer which is never consumed before the process ends and then the process is waiting.
Hi folks. I’m trying to use (binding [*default-data-reader-fn* tagged-literal] ...)
, but I’m getting this error:
70: (binding [*default-data-reader-fn* tagged-literal]
^--- Could not resolve symbol: *default-data-reader-fn*
What would be the expected way of using tagged-literal
for unknown tags?Also tried to require [clojure.tools.reader.default-data-readers]
, seems that it’s not available
@andre.peric this is added in the newest bb: 0.6.8. are you using that?
I’m getting this error. I though it was supposed to handle all unknown tags:
74: (binding [*default-data-reader-fn* tagged-literal]
75: (main 1))
^--- No reader function for tag my/redacted-tag
I’m reading a file with edn/read-string
in main
.
Maybe my expectations are wrong :thinking_face:yeah, default-data-reader-fn only works for clojure.core/read. edn/read-string supports an options map:
clojure.edn/read
([] [stream] [opts stream])
Reads the next object from stream, which must be an instance of
java.io.PushbackReader or some derivee. stream defaults to the
current value of *in*.
Reads data in the edn format (subset of Clojure data):
opts is a map that can include the following keys:
:eof - value to return on end-of-file. When not supplied, eof throws an exception.
:readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.
When not supplied, only the default-data-readers will be used.
:default - A function of two args, that will, if present and no reader is found for a tag,
be called with the tag and the value.
Added a bunch of libs to CI for testing the new spec compatibility: • better-cond • coax (exoscale) • orchestra (also tests expound indirectly) • integrant • tested guardrails manually, but tests are hard to extract, they are intertwined with loading ClojureScript
Does net.cgrand/xforms work with babashka?
I thought I read that somewhere but I cannot see it in the list of projects (https://github.com/babashka/babashka/blob/master/doc/projects.md) and when I try to add it I get an error
; eval (current-form): (require '[net.cgrand.xforms :as x])
; (err) : Unable to resolve classname: java.util.Comparator
Which version are you using? I have an open PR at xforms which should make it compatible with bb 068. Please leave some feedback at the PR to encourage the maintainer to merge it
I am using 0.6.1. Thanks for the answer I will check the PR.