Fork me on GitHub
#planck
<
2017-03-06
>
gamecubate21:03:43

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

mfikes21:03:07

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

mfikes21:03:35

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

gamecubate21:03:31

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

gamecubate21:03:48

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

gamecubate21:03:38

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.

mfikes21:03:22

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

gamecubate21:03:10

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

mfikes21:03:22

Probably under .m2

mfikes21:03:15

boot show -c should reveal where they are

gamecubate21:03:34

And yes, was under .m2

gamecubate21:03:17

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

mfikes21:03:36

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

gamecubate21:03:42

Possibly. Not a light lib.

gamecubate21:03:02

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).

gamecubate21:03:24

Genre…

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

gamecubate21:03:52

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

gamecubate21:03:00

It’s parsing after all. 🙂