something i can’t explain: somehow during a full run of sexps, something like the following (pr-str (sci/eval-string "(completing conj count)")) which returns "#function[clojure.core/completing/fn--8528]" , begins returning "#object[clojure.core$completing$fn__8528 0x2f2a24dc \"clojure.core$completing$fn__8528@2f2a24dc\"]" and my gut is telling me that this is some kind of host access scenario, but i cannot track it down. any ideas?
@devn SCI re-uses the clojure core functions, that's what you are seeing here, the printed version of a function in completing
hmm, i think i’m still missing something/am not following. i can’t seem to produce that #object… string in my code
@devn can you maybe dumb down the problem for me?
im having trouble understanding how #object[...] shows up in these strings when something like (pr-str (sci/eval-string "(comp)")) produces "#function[…]" .
is that any clearer? 🙂
No, can you spell it out more explicit? Please code as if I'm starting my editor from scratch
What you are seeing is just functions / closures being printed - what else do you expect?
sorry, had to step away. i’m totally failing at understanding this/providing a code example to demonstrate.
maybe this is a more fundamental clojure question.
what causes it to be printed as #object[…]?
when i run a function via lein run -m foo.core, they look like "#object[sci.impl.fns$fun$arity_1__26730 0x41167e79 \"sci.impl.fns$fun$arity_1__26730@41167e79\"]" .
if I run it from a repl they look like "#function[sci.impl.fns/fun/arity-1--33946]"
don't know, maybe a print-method on IFn or so?
what kind of REPL?
cider nrepl
maybe a CIDER feature then
try a bare clj REPL
took me a lot of banging my head against the wall to finally narrow it down to REPL v not: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/print_method.clj#L12