klipse

2019-03-19T01:08:31.019300Z

Hi @viebel. Thanks for the response. I've found a fork created by @djwhitt that I believe is self-host compatible: https://github.com/Zetawar/datascript/tree/macrovich/src However, when I try http://app.klipse.tech/?data-external-libs=%22https://raw.githubusercontent.com/Zetawar/datascript/tree/macrovich/src/%22

2019-03-19T01:09:06.019500Z

I get the error,

#error {:message "No such namespace: datascript.core, could not locate datascript/core.cljs, datascript/core.cljc, or JavaScript source providing \"datascript.core\"", :data {:tag :cljs/analysis-error}}

2019-03-19T01:09:45.019700Z

Can you give me any hints about what I might be doing wrong?

2019-03-19T01:11:30.020100Z

Hey, I noticed the mention and thought maybe I should fill in some details. :)

2019-03-19T01:11:46.020400Z

By all means!

2019-03-19T01:12:03.020600Z

That fork is self-host compatible, but it's pretty experimental and I've only tried it on Lumo.

2019-03-19T01:12:52.020800Z

Even there, it would fail every time the first time it was loaded and then only succeed on subsequent runs. I think probably because the analysis was cached after that.

2019-03-19T01:13:28.021Z

So, you might be able to get it to work in Klipse, but it doesn't surprise me that it's failing either.

2019-03-19T01:13:35.021200Z

Aaaah, ok

2019-03-19T01:14:38.021400Z

Glad you clarified! Datascript in Klipse seems like quite a super-power for sketching out ideas. Can you lend any advice on how to get it there?

2019-03-19T01:16:15.021600Z

First, just to confirm, are you using the "macrovich" branch of that fork?

2019-03-19T01:16:31.021800Z

yes

2019-03-19T01:17:03.022Z

I think the first thing I'd do is just try loading it in Lumo and see if that still works.

2019-03-19T01:17:16.022200Z

I haven't messed with it in quite a while.

2019-03-19T01:17:48.022400Z

I think the general approach I'd take is to try to get everything working cleanly in Lumo or Plank first and then try in Klipse.

2019-03-19T01:18:29.022600Z

Gotcha. Thanks a bunch!

2019-03-19T01:18:48.022800Z

Quick question though

2019-03-19T01:19:09.023Z

Sure

2019-03-19T01:19:25.023200Z

I don't really understand clojurescript compilation at all. Let's say I was building it using cljs-build. Which of the many files generated has what I need?

2019-03-19T01:20:06.023400Z

Hmm... what you need for what specifically?

2019-03-19T01:20:15.023600Z

Well, Klipse, eventually

2019-03-19T01:20:35.023800Z

Klipse seems to accept both directories and JS files.

2019-03-19T01:20:59.024Z

And both are produced, so I'm not sure which I would point it at if I built your branch locally, hosted the results, and tried pointing Klipse at it.

2019-03-19T01:21:09.024200Z

Ah, I haven't looked at Klipse in a bit, but I would assume it wants the straight CLJS rather than compiled JS.

2019-03-19T01:21:29.024400Z

That seems to match what @viebel said above too.

2019-03-19T01:21:53.024600Z

So you don't really want cljs-build output at all. You want cljs/cljc files that are self-host compatible.

2019-03-19T01:22:07.024800Z

Aaah, ok.

2019-03-19T01:22:15.025Z

The magic of Lisp at work.

2019-03-19T01:23:08.025200Z

The main trick to get all the working is dealing with macros since in "normal" JVM compiled CLJS, those are actually evaluated as Clojure rather than ClojureScript.

2019-03-19T01:23:45.025400Z

That's where macrovich comes in, it gives you some tools for writing macros that work in both environments.

2019-03-19T01:24:13.025600Z

Gotcha.