Fork me on GitHub
#sci
<
2021-08-12
>
victorb15:08:28

I managed to get SCI to work in a JS-context (I basically compile SCI to a node-library via shadow-cljs that can then be used from node/browser apps), but I'm not getting any of the options to work when passed to sci/init. I'm assuming it's because I'm not creating symbols/keywords correctly, but SCI is not giving me a lot of output to work with, so unsure on how to proceed. Here is one iteration of what I've been doing: https://gist.github.com/victorb/62d7a1b7d41ce8cc2ad8fa4ac6c9f5e1 I've also tried using symbol to create a symbol to str instead for example, but I'm never getting it to actually deny the function call.

borkdude15:08:31

why are you not configuring sci from within CLJS and then exposing that to JS?

borkdude15:08:05

In the early stages SCI had a JS API and a Java API but I deprecated this exactly because it was awkward to make CLJ options from these languages

borkdude15:08:30

you could expose a couple of helper functions if you want your JS env to do specific things

victorb15:08:40

yeah, I could do that I guess, but would add additional build steps in the JS-land process/project, which I wanted to avoid but if there is no other options, yeah

borkdude15:08:14

well, constructing CLJ values from JS should work in theory, but in practice it's a bit tedious

borkdude15:08:08

Here is the JS API, it's not been maintained for a while: https://github.com/borkdude/sci/blob/master/src/sci/impl/js.cljs

victorb15:08:54

that's helpful, thanks a lot!