sci 2023-01-24

I think similar. Can you expand on why / where you would need this?

I would like to correlate results with the forms that generated them, this is nice when the user submits multiple forms at one

right. the babashka prepl implementation also uses read+string

👍 1

Yeah, in cljs land, the reader you get back is an https://github.com/clojure/tools.reader/blob/master/src/main/cljs/cljs/tools/reader/reader_types.cljs#L102 which is a little different from clj land.

@djblue I think I can make this available in SCI as well, we have parse-next, we could do parse-next+string

edamame already supports preserving the source string but as metadata, which won't work for numbers, etc

👍 1

but the ingredients are already there

That would be awesome!

(is (= "#(+ 1 2 3)" (:source (meta (p/parse-next (p/source-reader "#(+ 1 2 3)")
                                                   (p/normalize-opts {:all true :source true}))))))

let's see if we can add parse-next+string