This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-15
Channels
- # announcements (20)
- # babashka (281)
- # beginners (13)
- # biff (8)
- # calva (20)
- # cider (5)
- # clj-commons (1)
- # clojure (46)
- # clojure-boston (1)
- # clojure-europe (6)
- # clojure-losangeles (24)
- # clojuredesign-podcast (3)
- # clojurescript (12)
- # datomic (1)
- # events (1)
- # fulcro (12)
- # guix (2)
- # honeysql (1)
- # integrant (1)
- # introduce-yourself (1)
- # rdf (16)
- # reagent (3)
- # reitit (14)
- # releases (3)
- # sci (28)
- # shadow-cljs (122)
- # specter (1)
- # tools-deps (10)
- # xtdb (6)
@devn I've got a fix underway for print-method
- while fixing another issue I found a better way to do it. And by default print-method
in SCI will throw when used with a direction on how to make it work when you don't need sandboxing.
I think that would be the cleanest option, it will make SCI safer by default, while breaking current users but the error should guide them to an easy fix
@borkdude haven’t reviewed the commit yet, but is print-dup going to get the same treatment?
ah looks like this is just print-method, either way i’m just adding print-method and print-dup to my :deny list for now
Thanks for uncovering these things with http://getclojure.org :)
my pleasure! btw, took your observation and removed things returning #object
, though not everywhere as there are cases of (#object[…] #object[...] :foo)
same category yeah, hence all of my confusion relating to the pretty printing in cider nrepl
i now have a new mystery that is frying my brain 😕 I don’t think it’s SCI-related, but:
"(-> 1 inc inc inc inc inc)"
=> "(#object[clojure.core$inc 0x3d328cd6 \"clojure.core$inc@3d328cd6\"] (#object[clojure.core$inc 0x3d328cd6 \"clojure.core$inc@3d328cd6\"] (#object[clojure.core$inc 0x3d328cd6 \"clojure.core$inc@3d328cd6\"] #object[clojure.core$inc 0x3d328cd6 \"clojure.core$inc@3d328cd6\"])))"
meanwhile (-> 3 inc inc inc)
=> 6
yeah, very confused on this one: https://getclojure.org/search?q=inc&num=0
i don’t believe im engaging in any funny business like that, no. https://github.com/devn/getclojure/blob/main/src/getclojure/sexp.clj#L36 of course, I can’t reproduce in the REPL, only when running the full input set which takes about 20min. when i look at the raw strings that make it into elasticsearch, they look completely fine
(sci/eval-string "(-> 1 inc inc)") ;; => 3
(sci/eval-string "(alter-meta! #'-> dissoc :macro)") ;; => nil
(sci/eval-string "(-> 1 inc inc)") ;; => #function[clojure.core/inc]
I’ve created an issue here: https://github.com/babashka/sci/issues/733