This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-28
Channels
- # announcements (5)
- # asami (34)
- # babashka (15)
- # beginners (222)
- # calva (5)
- # cider (2)
- # circleci (4)
- # cljfx (11)
- # clojure (34)
- # clojure-europe (10)
- # clojure-nl (2)
- # clojure-taiwan (2)
- # clojure-uk (5)
- # clojurescript (27)
- # conjure (8)
- # cryogen (11)
- # cursive (11)
- # datomic (7)
- # depstar (6)
- # fulcro (29)
- # graalvm (2)
- # joker (3)
- # kaocha (9)
- # nrepl (4)
- # off-topic (9)
- # pathom (1)
- # shadow-cljs (11)
- # spacemacs (4)
- # sql (1)
- # tools-deps (12)
I'm trying to use babashka.process to watch a child process and for some reason I'm unable to use an io/reader to read from it (thus blocking the spawned process, as it stop acting when it can't flush the stdout), is there some example code somewhere that handles a streaming process?
@borkdude I can't think of an easy way, it's a process that stops acting when you don't read its stdout... something like "yes" would probably also only fill the cache but there is no accompanying counter to visualize this
@b Yes, a process has a limited buffer, so you can use a StringWriter as :out
for example to let it write to stdout in an unlimited fashion
yeah :inherit true
also works, I want to capture the stdout and act on the different lines, like a real time log reader
@b there might be some relevant things here: https://book.babashka.org/#child_processes
it seems like edn/read is the magic there, I will just try around some more with the java interop
@borkdude I'm a bit lost, what is process in that situation? (p/process ["yes"] {:inherit true})
? or in combination with :out StringWriter (which I have to look up how that gets initalized)