Fork me on GitHub
#clojurescript
<
2020-04-04
>
hindol17:04:36

Is is possible to use spyscope with CLJS? I am getting this,

The required namespace "spyscope.core" is not available, it was required by "com/github/hindol/twenty_nine.cljs".
"spyscope/core.clj" was found on the classpath. Maybe this library only supports CLJ?
Using shadow-cljs with deps.edn.

thheller18:04:49

the library is CLJ only, so it is not supported

hindol19:04:02

Okay. The README mentions CLJS and I saw some CLJC files. So got confused.

p-himik20:04:42

It does support CLJS, but the new version with the support hasn't been released.

hindol05:04:57

So, can I use the git coordinate directly?

p-himik08:04:52

I don't think that'll work - the project is lein-based, so AFAIK you can't use its git coordinate in deps.edn.

p-himik08:04:33

You can probably clone it out locally and add it as a local dependency.

p-himik08:04:55

Of course, that should not go into your project's deps.edn. Maybe in ~/.clojure/deps.edn.

thheller08:04:31

the entire setup spyscope uses is not supported by shadow-cljs

thheller08:04:36

so no matter what it won't work

thheller08:04:47

(custom reader literals are not supported)

p-himik09:04:26

> so no matter what it won't work Well, it works if you embed shadow-cljs and call alter-var-root on tags/*cljs-data-readers*. :)

thheller09:04:22

sure you can hack it that way

hindol10:04:58

In absence of reader literals, what trace library do you suggest for CLJS? (doto _ prn) is too intrusive.

thheller10:04:22

nowadays I use tap>

thheller10:04:18

because you need a setup that supports tap. out of the box it does nothing.

hindol10:04:48

Okay, thanks for the tip. Let me find more info about it.

mruzekw17:04:27

Does anyone know how heavy a self-hosted clojurescript instance is? I was wondered about making a CodeSandbox or JSBin for CLJS

thheller18:04:48

baseline is about 5mb+ I'd guess, probably more around 8mb+ if you include some actual code besides cljs.core

mruzekw18:04:46

Hmm. If you were to build something like this, would you include a server element then?

thheller18:04:23

no clue, haven't thought about building something like that. with compression its really not that bad.

mruzekw18:04:18

Hmm so may be worth trying frontend only?

mruzekw18:04:31

(at least for the compilation and run element?)

Braden Shepherdson19:04:21

I think there's a pretty good "getting started" example for getting a self-hosting environment running? it wouldn't have a nice API, but it should be possible to get a REPL you can send strings to from the devtools.

aperson19:04:10

I believe klipse is self hosted

🙏 4
nick02:04:32

oh klipse app is live again! That's good. It was down for a few days(at least), very recently

mruzekw19:04:28

I’ll look into what they do there.

mruzekw19:04:00

I’m glad that’s there, but it’s not as full fledged as something like http://CodeSandbox.io is, which is more of what I’m looking for

lilactown19:04:08

a ton of work has gone into making codesandbox work as well as it does

4
lilactown19:04:31

especially with managing dependencies

lilactown19:04:47

but also the UX

mruzekw19:04:51

That’s fair. Would be nice to at least be able to save, share, and embed

lilactown19:04:40

for plain CLJS that would be mainly UX/UI. it would be a great project

lilactown19:04:16

to import libraries would be very difficult. but it would be very useful even without that

mruzekw19:04:03

Indeed. I didn’t really think about dependencies part…certainly would be helpful when demonstrating 3rd party code

mruzekw19:04:34

Gosh, how do http://codesandbox.io and the like do that? Did they create their own package manager?

João Fernandes19:04:58

I think glitch uses containers, they've built their own orchestrator to manage them, it's insane!

didibus20:04:44

Is codesandbox all client side?

didibus20:04:59

Most of these services normally just use a container on the backend

didibus20:04:53

In theory, with self-hosted ClojureScript, you could import libraries

didibus20:04:12

But one would need to build a ClojureScript resolver for them.

mruzekw20:04:26

I mean, doing containers is a viable solution

mruzekw20:04:39

But yes, I wonder how involved

mruzekw20:04:01

Can http://glitch.com or similar do cljs?

lilactown21:04:14

I think that codesandbox has a thing called “containers”, which does have a backend portion, but I think the normal html/css/js is all frontend

mruzekw21:04:41

Yeah, hmm. I mean, you could conceivable just keep a running container for every open session, and do all the compilation and dependencies with CLJS on the backend

mruzekw21:04:49

But I wonder what the UX of that would be

lilactown21:04:50

it would sort of defeat the purpose of using self-hosted CLJS

lilactown21:04:45

the biggest hurdle is that a lot of libs aren’t self-host compatible

lilactown21:04:08

but if you’re going to compile the code on the server anyway, skip the self hosting bit 😛

mruzekw21:04:59

Sorry, I forgot to mention I was thinking beyond self-hosting

mruzekw21:04:12

But yes, I wouldn’t do them together

mruzekw21:04:19

Self-hosting would be great for something simple without dependencies, but for a full-fledged thing like http://CodeSandbox.io I’d probably deploy containers

Nicholas Sorenson22:04:36

Is it possible to get the vim.fireplace plugin to work with clojurescript as well as clojure?

Nicholas Sorenson22:04:10

Nvm got it to work