Fork me on GitHub
#shadow-cljs
<
2021-08-12
>
borkdude08:08:58

@haywood depending on your needs, you could also use SCI to evaluate ClojureScript at runtime. It withstands advanced compilation.

haywood14:08:11

huh, this looks worth evaluating, didn’t realize it existed, thanks!

haywood14:08:58

I have been hacking on paren-soup

haywood14:08:35

compiler state is stored in my app db and is passed around to all the editor instances

borkdude14:08:30

I recommend looking at https://nextjournal.github.io/clojure-mode/. That demo also uses SCI

borkdude14:08:53

this website is also using SCI + clojure-mode: https://4clojure.oxal.org/

haywood14:08:59

yea it’s blowing my mind

haywood14:08:32

I have been running into perf problems with paren-soup… and this looks to be a huge improvement how did I miss this in my research 😭

haywood14:08:49

This has been great and I’m almost done with the transition to SCI+clojure-mode, thank you so much for the library. dumb question and apologies for asking directly, but is there an easy way to evaluate strings in a specific namespace without prepending “in-ns” before the code I want to evaluate? I see some dynamic vars in the vars namespace but not sure I’m using it correctly.

borkdude14:08:03

You can possible use sci/binding + sci/ns

borkdude14:08:39

Eg check xterm-sci how to do this

haywood14:08:05

nice! will try this out, and thanks again

borkdude14:08:24

Sure, let me know in #sci if you have any other issues

victorb14:08:01

might not be 100% the right channel, but I feel like the people lurking here is the right audience at least. I'm trying to consume a CLJS library from a JS project. I managed to get it to work mostly, but the library is using keywords for some arguments, and I'm lost trying to create CLJS keywords from JS-land. Anyone have any ideas?

haywood15:08:40

dumb question, how can I specify a deps alias in a specific build? trying a bunch of options based on what’s in the docs

borkdude15:08:25

@haywood shadow doesn't care about bringing in too many sources, like tests, so you can also just use all relevant aliases on the top level

borkdude15:08:31

unless you have some conflicting deps

haywood15:08:19

yea I’d like to keep the namespaces separate from another build, and I know I can pass -A:aliases when I build from the command line, but I’m compiling from the repl and not sure how to pass the aliases option

haywood15:08:31

but perhaps you’re right and it doesn’t matter

thheller16:08:49

@haywood alias per build is not supported and not required. just adding the dependency does not automatically include it in your build, so unless you build requires it directly via ns :require it won't be included

haywood16:08:30

gotcha, thanks for confirming! sorry for the noise