sci

oddsor 2022-04-05T12:39:50.765279Z

Hello! While testing SCI I bumped into an issue where slurp could not be resolved. Which in turn made me want to see if I could find a list of symbols included in a default configuration. But while scrolling around the source code I had trouble finding out where default symbols from clojure.core are added (or not). I’m probably just bad at searching. Can someone point me in the right direction? πŸ™ˆ

oddsor 2022-04-05T12:41:41.377659Z

Ooh, I think I finally found it in the namespaces-namespace!

borkdude 2022-04-05T12:42:22.373769Z

Yes, there it is :)

borkdude 2022-04-05T12:42:41.363889Z

SCI only includes safe defaults by default, so no access to the file system for example

borkdude 2022-04-05T12:42:58.998159Z

You can look in the babashka repo how to add more from clojure in there, in babashka/impl/clojure/core.clj

oddsor 2022-04-05T12:49:29.621359Z

I think I already figured it out, thanks! 😊 I don’t see 'if and 'and in the list, are they magical symbols? πŸ™ˆ

oddsor 2022-04-05T12:53:41.990549Z

oh I see, there’s a lot going on in the analyzer-namespace. This thing is more elaborate than I thought! Very cool πŸ‘

borkdude 2022-04-05T12:55:08.955159Z

if is a special form, and is treated like a special form for performance

oddsor 2022-04-05T12:57:19.015309Z

Thanks for the pointers! πŸ™