planck

Planck ClojureScript REPL
gamecubate 2017-03-06T21:32:43.000679Z

Hi all. Can one “require” a non planck core namespace into planck? In my case, instaparse.

mfikes 2017-03-06T21:33:07.000680Z

Sure, so long as it is self-host compatible, and on the Planck classpath

mfikes 2017-03-06T21:33:35.000681Z

You’d do planck -c path-to-instaparse.jar

gamecubate 2017-03-06T21:34:05.000682Z

Ah,

gamecubate 2017-03-06T21:34:06.000683Z

ok.

gamecubate 2017-03-06T21:34:31.000684Z

In my case, I am launching planck from within my (boot) project directory.

gamecubate 2017-03-06T21:34:48.000685Z

For that project, I have “required” instaparse via build.boot.

gamecubate 2017-03-06T21:35:38.000686Z

Assuming the jar has been downloaded at “boot dev” time and must now be somewhere within system. Haven’t looked into that but thanks for the hint. Will search.

mfikes 2017-03-06T21:36:22.000688Z

Planck needs to somehow be told where to look for source. The mechanisms are documented here: http://planck-repl.org/dependencies.html

gamecubate 2017-03-06T21:40:10.000689Z

Clear. Yes. Now trying to determine where “retrieved” jars are stashed. Assuming this will be the path I will have to provide to planck.

mfikes 2017-03-06T21:40:22.000690Z

Probably under .m2

mfikes 2017-03-06T21:41:15.000691Z

boot show -c should reveal where they are

gamecubate 2017-03-06T21:42:21.000692Z

Excellent.

gamecubate 2017-03-06T21:42:23.000693Z

Thanks.

gamecubate 2017-03-06T21:42:34.000694Z

And yes, was under .m2

gamecubate 2017-03-06T21:43:17.000695Z

Now having to deal with the 692 errors reported at require time inside planck but it’s a start. 🙂

mfikes 2017-03-06T21:44:36.000696Z

Perhaps Instaparse hasn’t been ported for use with self-hosted ClojureScript

gamecubate 2017-03-06T21:45:42.000697Z

Possibly. Not a light lib.

gamecubate 2017-03-06T21:47:02.000698Z

Seems like a wee-bit of overkill when all I want to is turn a string with embedded brackets into a vector (of keywords and/or sub-vectors).

gamecubate 2017-03-06T21:47:24.000699Z

Genre…

”a b (c d)”
into
[:a :b [:c :d]]

gamecubate 2017-03-06T21:47:52.000700Z

But so far this is what I have been pointed towards and it does make sense.

gamecubate 2017-03-06T21:48:00.000701Z

It’s parsing after all. 🙂