planck

Planck ClojureScript REPL
mnewhook 2016-09-25T12:59:17.000212Z

(ns foo.bar
  (:require
   [planck.core :refer [line-seq *command-line-args*]]
   [<http://planck.io|planck.io>]
   [cljs-time.coerce :as t]
   [cljs-time.format :as tf]
   [cljs-time.core :as time]))

$ time planck -c/Users/matthew/.m2/repository/com/andrewmcveigh/cljs-time/0.4.0/cljs-time-0.4.0.jar test.cljs
planck  test.cljs  6.96s user 0.27s system 134% cpu 5.355 total
That takes ~7s on my macbook pro.

mfikes 2016-09-25T13:01:24.000213Z

@mnewhook Interested in what happens if you add -K or -k &lt;path&gt; and run it twice (once to create cache and again to use it)

mnewhook 2016-09-25T13:01:55.000214Z

ah, you have to use -K each time?

mnewhook 2016-09-25T13:02:20.000215Z

I had already tried the cache but I didn’t realize you had to use -K to actually use the cache πŸ™‚

mnewhook 2016-09-25T13:02:22.000216Z

1s with the cache

mnewhook 2016-09-25T13:02:28.000217Z

much more reasonable.

mfikes 2016-09-25T13:03:32.000218Z

Cool, yes. Cache has always been an opt-in feature for Planck, for better or worse.

mnewhook 2016-09-25T13:03:55.000219Z

it would be nice if it used the cache automatically if it is there.

mfikes 2016-09-25T13:04:26.000220Z

Yeah, there are probably some imrovements to make caching more implicit

anmonteiro 2016-09-25T13:06:15.000221Z

FWIW I like that cache is opt-in, as it could swallow e.g. undeclared var errors when using Planck aggressively at development time

mfikes 2016-09-25T13:06:54.000222Z

Good point

anmonteiro 2016-09-25T13:07:31.000223Z

so it definitely depends on the use case. So far it doesn’t bother me to specify -K or -`k`whenever I want it to use caching

anmonteiro 2016-09-25T13:08:03.000224Z

e.g.: planck -Kc &lt;classpath goes here&gt; is not troublesome at all!

mfikes 2016-09-25T13:09:07.000225Z

(There are some bugs regarding cache like https://github.com/mfikes/planck/issues/227 and https://github.com/mfikes/planck/issues/293)

anmonteiro 2016-09-25T13:10:33.000229Z

@mfikes could #293 be related to a corrupted cache?

mfikes 2016-09-25T13:11:06.000230Z

Yeah, perhaps the exit botches it

anmonteiro 2016-09-25T13:11:44.000231Z

I think there was a fix in the CLJS compiler for that

anmonteiro 2016-09-25T13:11:48.000232Z

on the JVM side, ofc

mfikes 2016-09-25T13:12:03.000233Z

Oh, perhaps it is no longer reproducible then πŸ™‚

mnewhook 2016-09-25T13:12:03.000234Z

perhaps it could be more obvious in the documentation that -K is also necessary to use the cache. > The first time you run Planck this way, it will save the results of compilation into .planck_cache. Then subsequent executions will use the cached results instead. Perhaps instead: The first time you run Planck this way, it will save the results of compilation into .planck_cache. Then subsequent executions with -K will use the cached results instead.

mfikes 2016-09-25T13:13:04.000235Z

@mnewhook Yes, the documentation can definitely be fixed. πŸ™‚

mfikes 2016-09-25T13:13:28.000236Z

I agree it can be interpreted to just use it if it exists πŸ™‚