Closed kwccoin closed 5 years ago
Similar to these lines:
`
(defun add-five ()
(print "please enter a number:")
(let ((num (read)))
(print "When I add five I get")
(print (+ num 5))))
`
Hi @kwccoin, we haven't yet implemented the ability to mimic stdin, which read-line
would need.
Ok. I can still do many of those just no reader. Good tools and thanks.
Working on land of lisp to clojure. As that is a console based book, I wonder whether you can do this here. That is can you ask input instead of I have to use a simulated one.
Trying
(Require 'replete.core) (do (print "What's your name? ") (flush) (replete.core.read-line))
` What's your name?
Execution error (ReferenceError) at (:1).
Can't find variable: REPLETE_RAW_READ_STDIN
`
Obviously need to handle read input stream but how to get this.
====
Try
` (def y (cljs.reader.read))
Execution error (Error) at (:1).
Invalid arity: 0
`
Not sure how to proceed. Just want to get user input.