Fork me on GitHub
#sci
<
2023-01-24
>
borkdude15:01:11

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

djblue16:01:19

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

borkdude17:01:50

right. the babashka prepl implementation also uses read+string

👍 2
djblue17:01:22

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.

borkdude17:01:59

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

borkdude17:01:25

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

👍 2
borkdude17:01:31

but the ingredients are already there

djblue17:01:58

That would be awesome!

borkdude17:01:05

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

borkdude17:01:40

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