From 71004ef2b18140af1f4b8b910e36ed64a83cbb7e Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 22 Oct 2020 13:15:02 +0200 Subject: [PATCH] wip --- deps.edn | 3 ++- project.clj | 3 ++- src/babashka/main.clj | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/deps.edn b/deps.edn index 4468c7aa..832bfd8c 100644 --- a/deps.edn +++ b/deps.edn @@ -26,7 +26,8 @@ datascript/datascript {:mvn/version "1.0.1"} http-kit/http-kit {:mvn/version "2.5.0"} babashka/clojure-lanterna {:mvn/version "0.9.8-SNAPSHOT"} - org.clojure/math.combinatorics {:mvn/version "0.1.6"}} + org.clojure/math.combinatorics {:mvn/version "0.1.6"} + mvxcvi/puget {:mvn/version "1.3.1"}} :aliases {:main {:main-opts ["-m" "babashka.main"]} :profile diff --git a/project.clj b/project.clj index e2b7fd79..c0790870 100644 --- a/project.clj +++ b/project.clj @@ -21,7 +21,8 @@ [cheshire "5.10.0"] [nrepl/bencode "1.1.0"] [borkdude/sci.impl.reflector "0.0.1-java11"] - [org.clojure/math.combinatorics "0.1.6"]] + [org.clojure/math.combinatorics "0.1.6"] + [mvxcvi/puget "1.3.1"]] :profiles {:feature/xml {:source-paths ["feature-xml"] :dependencies [[org.clojure/data.xml "0.2.0-alpha6"]]} :feature/yaml {:source-paths ["feature-yaml"] diff --git a/src/babashka/main.clj b/src/babashka/main.clj index ca9c84de..42c0837a 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -38,7 +38,8 @@ [sci.core :as sci] [sci.impl.namespaces :as sci-namespaces] [sci.impl.unrestrict :refer [*unrestricted*]] - [sci.impl.vars :as vars]) + [sci.impl.vars :as vars] + [puget.printer :as puget]) (:gen-class)) (def windows? @@ -614,7 +615,7 @@ If neither -e, -f, or --socket-repl are specified, then the first argument that :while (not (pipe-signal-received?))] (pr-f l)) (pr-f res)) - (prn res)))) 0]] + (#_prn puget/cprint res)))) 0]] (if stream? (recur) res)))))