Fork me on GitHub
#sci
<
2022-04-05
>
oddsor12:04:50

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? 🙈

oddsor12:04:41

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

borkdude12:04:22

Yes, there it is :)

borkdude12:04:41

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

borkdude12:04:58

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

oddsor12:04:29

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

oddsor12:04:41

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

borkdude12:04:08

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

oddsor12:04:19

Thanks for the pointers! 🙏