clojure-dev

2023-10-11T19:28:55.508079Z

Is there a way to see the output of LispReader's reading a given form?

2023-10-11T19:43:36.066219Z

The output is what it returns?

2023-10-11T19:44:25.704819Z

I guess I mean, can I inspect the Read part of "REPL" before it's passed to eval?

2023-10-11T19:45:23.494369Z

You want a side channel of reader output

2023-10-11T19:46:02.101519Z

In that case, no there is nothing built into the reader where you can ask it to send another copy of the output somewhere else

👍 1
2023-10-11T19:46:14.195859Z

cool, thanks

2023-10-11T19:47:39.432229Z

Depending on what you are doing clojure's repl is pretty modular and you could swap in either a custom read or custom eval

2023-10-11T19:48:21.852559Z

prepl might already do something like that

👍 1
2023-10-11T20:26:24.520449Z

so the repl is just calling (clojure.main/repl-read (Object.) (Object.)) to read from stdin which returns the LispReader output, but I guess will be the same as calling (read-string "(+ 1 2)") , you can run both of those from the repl to look at the LispReader output

👍 1