Janet Notes and Examples

stdin, stdout, & stderr

Print to stdout: print
Print to stderr: eprint

To read a line in from stdin:

(def response (getline "Your name? "))
# `response` is a buffer and has a trailing newline.

# Could also use:
(prin "Your name? ")
(def response (file/read stdin :line))
# `response` contains the trailing newline here too.