Fork me on GitHub
#shadow-cljs
<
2017-12-08
>
Jon02:12:44

@thheller not yet... but I noticed WebAssembly is supported by browsers a lot faster than I expected.

Jon02:12:29

All browsers(except for IE...) now supports WebAssembly, Rust has merged support for WebAssembly backend.

Jon02:12:26

In recent Haskell reflecting, several WebAssembly backends have been developed.

Jon02:12:53

I don't use WebAssembly yet. But if its DOM APIs integration is ready, things may change. I heard that would happen in less a year.

Jon02:12:28

also want to know your opinion?

hagmonk05:12:06

I'm trying to make shadow-cljs work with cider ... keep having trouble getting it to switch to a clojurescript repl. Any pointers?

user-error: ‘cider-eval-last-sexp’ needs a ClojureScript REPL.
If you don’t know what that means, you probably need to jack-in (‘C-c M-J’).

hagmonk05:12:40

this is after trying both (shadow.cljs.devtools.api/nrepl-select :plugin) and (cemerick.piggieback/cljs-repl :plugin). I have shadow-cljs watch plugin and shadow-cljs node-nrepl in the background

thheller08:12:01

@hagmonk I don’t know anything about cider setup but @mitchelkuijpers got it working

mitchelkuijpers08:12:03

@hagmonk I start shadow-cljs inside of my clojure process

mitchelkuijpers09:12:42

Would that be an option for you? Then I can help you

Jon15:12:24

=>> yarn watch
yarn run v1.3.2
$ shadow-cljs watch browser
shadow-cljs - config: /Users/chen/repo/mvc-works/mvc-works.org/shadow-cljs.edn version: 2.0.115
shadow-cljs - updating dependencies
Retrieving thheller/shadow-cljs/2.0.115/shadow-cljs-2.0.115.pom from 
Retrieving thheller/shadow-client/1.3.0/shadow-client-1.3.0.pom from 
Retrieving thheller/shadow-cljs/2.0.115/shadow-cljs-2.0.115.jar from 
Retrieving thheller/shadow-client/1.3.0/shadow-client-1.3.0.jar from 
^C
=>> time yarn watch
yarn run v1.3.2
$ shadow-cljs watch browser
shadow-cljs - config: /Users/chen/repo/mvc-works/mvc-works.org/shadow-cljs.edn version: 2.0.115
shadow-cljs - updating dependencies
Retrieving thheller/shadow-cljs/2.0.115/shadow-cljs-2.0.115.jar from 
^C

real	1m3.436s
user	0m0.433s
sys	0m0.083s

Jon15:12:01

switched to 4G network and downloaded in less than 10s, a lot faster than my WiFi

hagmonk17:12:37

thanks @thheller and @mitchelkuijpers, but I hit a different problem that seems harder than the REPL for now 🙂

hagmonk17:12:30

basically I'm trying to convert this to clojurescript, i.e. write a grafana datasource plugin in clojurescript: https://github.com/grafana/simple-json-datasource/

hagmonk17:12:59

shadow-cljs seems perfect because it really cuts away a lot of the ceremony about building cljs projects!

hagmonk17:12:32

I'm trying to figure out if I have parity between what cljs is generating, and what the typescript build process in that plugin is generating

hagmonk17:12:09

right now I'm approaching this as a node-library build target with exports, curious to know if I'm in the right direction ...