This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-30
Channels
- # announcements (2)
- # bangalore-clj (6)
- # beginners (33)
- # cider (4)
- # clojure (9)
- # clojure-brasil (2)
- # clojure-spec (6)
- # clojurescript (36)
- # cursive (13)
- # datomic (3)
- # emacs (1)
- # fulcro (6)
- # graalvm (2)
- # interop (4)
- # luminus (1)
- # midje (1)
- # pathom (1)
- # random (1)
- # reagent (4)
- # shadow-cljs (11)
- # tools-deps (42)
- # xtdb (10)
so on windows 10 with native-image:
(ns script
(:gen-class))
(defn -main [& args]
(println (slurp *in*)))
yields a stacktrace involving jni and java.io.FileInputStream.readBytes, but:
(ns script
(:gen-class))
(defn -main [& args]
(println (slurp (clojure.lang.LineNumberingPushbackReader. (java.io.InputStreamReader. System/in)))))
doesn't (and produces the expected output).
the testing is from powershell and cmd.exe, with something like: type project.clj | .\my-native-image.exe
i think it works fine for linux distributions and macos.